[PATCH] AIX BOOL conflict in tdb + largefile issue

Peter Somogyi psomogyi at gamax.hu
Wed Sep 20 16:39:46 GMT 2006


Hi,

I've got the following 2 separate compile errors on AIX 5.3 with trunk:

Error #1:
...
Compiling tdb/common/tdb.c
"./tdb/include/tdbutil.h", line 56.1: 1506-166 (S) Definition of function BOOL 
requires parentheses.
"./tdb/include/tdbutil.h", line 56.6: 1506-276 (S) Syntax error: possible 
missing '{'?

Attached a symptomatic treatment patch (svn.diff) for AIX. However, this BOOL 
conflict is a much more common issue under AIX... (I've tried, 
somehow /usr/include/stdbool.h gets included in tdb... Unfortunately, many 
AIX headers also use _BOOL for guarding its different _Bool and friends...) 
I'd suggest testing this patch on other platforms, too - but strongly advise 
renaming the _BOOL macro everywhere...

BTW. this error is the same existing on another AIX machine which is 5.2 
(http://build.samba.org/?function=View+Build;host=oehmesrs6k;tree=samba_3_0;compiler=cc)

Error #2:

I also had to use --disable-largefile, otherwise I've got error (see 
error2.txt). I took me some time to realize how to proceed... I'm not going 
to solve this one.

Now it compiles (haven't run any tests yet...)

Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svn.diff
Type: text/x-diff
Size: 378 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060920/1a839c0f/svn.bin
-------------- next part --------------
Using FLAGS =  -O -D_SAMBA_BUILD_ -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 -I/tests/psomogyi/samba/trunk/source/popt -I/tests/psomogyi/samba/trunk/source/iniparser/src -Iinclude -I./include  -I. -I. -I./lib/replace -I./tdb/include -I./libaddns -I./librpc  -DHAVE_CONFIG_H
      LIBS =
      LDSHFLAGS = -Wl,-G,-bexpall
      LDFLAGS =
      PIE_CFLAGS =
      PIE_LDFLAGS =
Compiling nsswitch/winbind_nss_aix.c with -O2
"/usr/include/unistd.h", line 171.17: 1506-343 (S) Redeclaration of lseek64 differs from previous declaration on line 169 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 171.17: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 171.17: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/sys/lockf.h", line 64.20: 1506-343 (S) Redeclaration of lockf64 differs from previous declaration on line 62 of "/usr/include/sys/lockf.h".
"/usr/include/sys/lockf.h", line 64.20: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".
"/usr/include/unistd.h", line 795.33: 1506-343 (S) Redeclaration of ftruncate64 differs from previous declaration on line 793 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 795.33: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 831.33: 1506-343 (S) Redeclaration of truncate64 differs from previous declaration on line 829 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 831.33: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 848.33: 1506-343 (S) Redeclaration of pread64 differs from previous declaration on line 845 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 848.33: 1506-377 (I) The type "long long" of parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 849.33: 1506-343 (S) Redeclaration of pwrite64 differs from previous declaration on line 846 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 849.33: 1506-377 (I) The type "long long" of parameter 4 differs from the previous type "long".
"/usr/include/unistd.h", line 916.25: 1506-343 (S) Redeclaration of fclear64 differs from previous declaration on line 913 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 916.25: 1506-050 (I) Return type "long long" in redeclaration is not compatible with the previous return type "long".
"/usr/include/unistd.h", line 916.25: 1506-377 (I) The type "long long" of parameter 2 differs from the previous type "long".
"/usr/include/unistd.h", line 917.25: 1506-343 (S) Redeclaration of fsync_range64 differs from previous declaration on line 914 of "/usr/include/unistd.h".
"/usr/include/unistd.h", line 917.25: 1506-377 (I) The type "long long" of parameter 3 differs from the previous type "long".
The following command failed:
/usr/vac/bin/cc -qlanglvl=extc99 -I. -I/tests/psomogyi/samba/trunk/source  -O -D_SAMBA_BUILD_ -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 -D_LINUX_SOURCE_COMPAT -qmaxmem=32000 -I/tests/psomogyi/samba/trunk/source/popt -I/tests/psomogyi/samba/trunk/source/iniparser/src -Iinclude -I./include  -I. -I. -I./lib/replace -I./tdb/include -I./libaddns -I./librpc  -DHAVE_CONFIG_H      -O2 -c nsswitch/winbind_nss_aix.c -o nsswitch/winbind_nss_aix.po.o
make: The error code from the last command is 1.


More information about the samba-technical mailing list