www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Bug 68] New: phobos recls_fileinfo_unix.cpp compile error

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=68

           Summary: phobos recls_fileinfo_unix.cpp compile error
           Product: D
           Version: 0.150
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: benoit tionex.de


I get the following compile errors:

g++ -Wall  -O4 -mcpu=i686  -DNDEBUG -DUNIX -D_M_IX86 -c -I. -I../stlsoft
-orecls_fileinfo_unix.o recls_fileinfo_unix.cpp
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
recls_fileinfo_unix.cpp: In function »const recls::recls_fileinfo_t*
recls::FileInfo_Allocate(size_t)«:
../stlsoft/stlsoft_null.h:194: Fehler: »stlsoft::NULL_v::NULL_v(const
stlsoft::NULL_v&)« ist privat
recls_fileinfo_unix.cpp:237: Fehler: in diesem Zusammenhang
recls_fileinfo_unix.cpp: In function »void recls::FileInfo_Release(const
recls::recls_fileinfo_t*)«:
../stlsoft/stlsoft_null.h:194: Fehler: »stlsoft::NULL_v::NULL_v(const
stlsoft::NULL_v&)« ist privat
recls_fileinfo_unix.cpp:256: Fehler: in diesem Zusammenhang
recls_fileinfo_unix.cpp: In function »recls::recls_rc_t
recls::FileInfo_Copy(const recls::recls_fileinfo_t*, const
recls::recls_fileinfo_t**)«:
../stlsoft/stlsoft_null.h:194: Fehler: »stlsoft::NULL_v::NULL_v(const
stlsoft::NULL_v&)« ist privat
recls_fileinfo_unix.cpp:277: Fehler: in diesem Zusammenhang


I made these changes, only to make it compile:

Index: phobos/etc/c/recls/recls_fileinfo_unix.cpp
===================================================================
--- phobos/etc/c/recls/recls_fileinfo_unix.cpp  (Revision 15)
+++ phobos/etc/c/recls/recls_fileinfo_unix.cpp  (Arbeitskopie)
   -234,7 +234,7   
     counted_recls_info_t    *ci     =  
static_cast<counted_recls_info_t*>(malloc(cb - sizeof(struct recls_fileinfo_t)
+ sizeof(struct counted_recls_info_t)));
     recls_info_t            info;

-    if(NULL == ci)
+    if(0 == ci)
     {
         info = NULL;
     }
   -253,7 +253,7   

 RECLS_FNDECL(void) FileInfo_Release(recls_info_t fileInfo)
 {
-    if(NULL != fileInfo)
+    if(0 != fileInfo)
     {
         counted_recls_info_t    *pci    =   counted_info_from_info(fileInfo);

   -274,7 +274,7   
 {
     recls_assert(NULL != pinfo);

-    if(NULL != fileInfo)
+    if(0 != fileInfo)
     {
         counted_recls_info_t    *pci    =   counted_info_from_info(fileInfo);


-- 
Mar 23 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=68






An additional compile problem

../stlsoft/unixstl_glob_sequence.h: In member function
»stlsoft::unixstl_project::us_int_t
stlsoft::unixstl_project::glob_sequence::_init(const
stlsoft::unixstl_project::us_char_a_t*, const
stlsoft::unixstl_project::us_char_a_t*)«:
../stlsoft/unixstl_glob_sequence.h:365: Fehler:
»stlsoft::unixstl_project::glob_sequence::<anonymous enum>« ist/verwendet
anonymen Typen
../stlsoft/unixstl_glob_sequence.h:365: Fehler:   Versuch, »template<class T>
stlsoft::ss_bool_t stlsoft::operator==(const stlsoft::NULL_v&, const T&)« zu
instanziieren
../stlsoft/unixstl_glob_sequence.h:422: Fehler:
»stlsoft::unixstl_project::glob_sequence::<anonymous enum>« ist/verwendet
anonymen Typen
../stlsoft/unixstl_glob_sequence.h:422: Fehler:   Versuch, »template<class T>
stlsoft::ss_bool_t stlsoft::operator==(const stlsoft::NULL_v&, const T&)« zu
instanziieren
make[2]: *** [recls_api_unix.o] Fehler 1

this only happens with gcc-4.0. Calling make with CC=gcc-3.4 compiles


-- 
Apr 01 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=68






I got it to compile with gcc 4.0.3 replacing all "NULL" with "0" (even the ones
in  the asserts)


-- 
Apr 04 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/bugzilla/show_bug.cgi?id=68


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX





std.recls has been dropped.


-- 
May 14 2006