Bug 2144 - Samba 3.0.8/3.0.9 compile failure under Tru64 Unix 4.0g
Summary: Samba 3.0.8/3.0.9 compile failure under Tru64 Unix 4.0g
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Build environment (show other bugs)
Version: 3.0.9
Hardware: Alpha OSF/1
: P3 regression
Target Milestone: none
Assignee: Tim Potter
QA Contact: Samba QA Contact
URL:
Keywords:
: 4376 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-12-10 09:59 UTC by Scott McAskill (mail address dead)
Modified: 2019-06-11 21:25 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Scott McAskill (mail address dead) 2004-12-10 09:59:55 UTC
Samba 3.0.8/3.0.9 compile failure under Tru64 Unix 4.0g. Running make fails as 
follows for either Samba version:
.
.
.
----------------------------------------------------^
cc: Info: include/proto.h, line 6731: In this declaration, type "unsigned long l
ong" is a language extension. (longlongtype)
int vfs_allocate_file_space(files_struct *fsp, SMB_BIG_UINT len);
-----------------------------------------------^
cc: Info: lib/util_file.c, line 171: In this declaration, type "unsigned long lo
ng" is a language extension. (longlongtype)
SMB_BIG_UINT getfilepwpos(void *vp)
^
cc: Info: lib/util_file.c, line 173: In this statement, type "unsigned long long
" is a language extension. (longlongtype)
        return (SMB_BIG_UINT)sys_ftell((FILE *)vp);
----------------^
cc: Info: lib/util_file.c, line 181: In this declaration, type "unsigned long lo
ng" is a language extension. (longlongtype)
BOOL setfilepwpos(void *vp, SMB_BIG_UINT tok)
----------------------------^
cc: Error: lib/util_file.c, line 458: In this statement, "p" and "(-1)" cannot b
e compared for equality or inequality. (noequality)
        if (p == MAP_FAILED) {
------------^
*** Exit 1
Stop.
#
Comment 1 Peter Marquardt 2005-02-05 04:42:28 UTC
As far as I found out this bug was introduced first in 3.0.8 through switching
from Autoconf 2.53 to Autoconf 2.59. The later autoconf generates Makefiles for
Tru64 4.0[fg] which use "CC=cc -std1" instead of "CC=cc".

-std1 handles comparisms a little bit tougher (well too tough is this case) and
so samba stumbles over the definition of MAP_FAILED (-1L) in
/usr/sys/include/sys/mman.h . this "should" be defined to ((void *)-1L).
lib/util_file.c does this for you, but since it already has been defined in
.../sys/mman.h it ignored. The same problem appears in tdb/tdb.c

Since I dunno much about autoconf/configure (besides I hate it) I cannot supply
a proper patch to fix this, but I'm confident someone here will 8)

So to fix this, some developers should 

   * ignore the system supplied definition of MAP_FAILED
   * redefine MAP_FAILED to ((void *)-1L)

or patch lib/util_file.c and tdb/tdb.c to reflect this.


Comment 2 Gerald (Jerry) Carter (dead mail address) 2006-04-14 14:53:24 UTC
Please retest against a current release and reopen if the issue is still present.
Comment 3 Andrew Bartlett 2019-06-11 13:13:46 UTC
*** Bug 4376 has been marked as a duplicate of this bug. ***