From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653644221560.tru64-unix-managers.marc@archive.invalid> From: Uwe Lienig Date: Mon, 03 Dec 2001 13:37:39 +0000 To: tru64-unix-managers Subject: Problems compiling SAMBA 2.2.2 X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653644221560 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--------------8306F3713BCCD5EE0A119D96" This is a multi-part message in MIME format. --------------8306F3713BCCD5EE0A119D96 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I downloaded samba-2.2.2 and tried to compile ( I prefer compiling a source tar-ball myself, just to provide my own configuration flags, if any). configure went smoothly ( I was wondering, why snprintf and vsnprintf are not defined, but I learned, that these 'MACROS' are provided by the software itself ). But then it doesn't compile: First I used CC="cc -std1" The compilation stops at tdb/tdb.c with: cc: Error: tdb/tdb.c, line 106: In this statement, "tdb->map_ptr" and "(-1)" cannot be compared for equality or inequality. (noequality) if (tdb->map_ptr == MAP_FAILED) { --------------------^ gmake: *** [tdb/tdb.o] Error 1 I checked the includes and man pages, but there are no clue as to why cc is complaining! mmap return a void * . I then used CC="cc -std1 -D_ANSI_C_SOURCE -isoc94" as described in the man page for cc. This aborts configure due to failing file locking ! [:-\] CC="cc -std" complaines that the declaration of vsnprintf uses different argument types. After all I decided to modify the c source in question: Here is a short description MAP_FAILED is #def'd #define MAP_FAILED ((void *) -1) I modified if (tdb->map_ptr == MAP_FAILED) to if (tdb->map_ptr == ((void *) -1)) { and it works ! In my opinion MAP_FAILED gets simply replaced by the pre processor, so the modified line is exactly the same as the original line that will be seen by the compiler itself, since the macro MAP_FAILED gets replaced by the pre processor before cc itself sees this line ... or I'm wrong ? The next issue I discovered is that cc shows a warning that long long is a lang extension but goes ahead in compiling. Anybody out there who can give some advice ? --------------8306F3713BCCD5EE0A119D96 Content-Type: text/x-vcard; charset=us-ascii; name="Uwe.Lienig.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Uwe Lienig Content-Disposition: attachment; filename="Uwe.Lienig.vcf" begin:vcard n:Lienig;Uwe tel;fax:(+49 351) 462 3476 tel;work:(+49 351) 462 2780 x-mozilla-html:FALSE org:Forschungsinstitut Fahrzeugtechnik -FiF-;Computer Aided Design and Advanced Simulation Technology adr:;;Friedrich-List-Platz 1;Dresden;Saxony;01069;Germany version:2.1 email;internet:uwe.lienig@fif.mw.htw-dresden.de note;quoted-printable:... have you ever seen MicroSoft users smiling ...=0D=0A=0D=0ASysAdmin x-mozilla-cpt:;-6720 fn:Uwe Lienig end:vcard --------------8306F3713BCCD5EE0A119D96--