Is samba 64bit safe ? (PR#19852)
darrenr at telnetmedia.com
Fri Aug 27 07:34:06 GMT 1999
> Darren Reed wrote:
> > Ack. This sounds like a missing prototype for crypt().
> Yup: Interestingly, the generated code (.s) looks
> like it's handling the pointer properly in both
> cases. Probably just to subtle for this dummy (;-))
I added -Xc to the command line for SUNWspro/cc and found that
it also complained about integer/pointer problems for strdup(),
mktemp() and setting sa_handler at the top of CatchSignal() in
lib/signal.h. On Solaris7 (at least), sa_handler is
void (* _handler)().
These warnings also cropped up:
"smbd/nttrans.c", line 2009: warning: integer overflow detected: op "<<"
"smbd/nttrans.c", line 2018: warning: integer overflow detected: op "<<"
"smbd/nttrans.c", line 2027: warning: integer overflow detected: op "<<"
"smbd/nttrans.c", line 2141: warning: integer overflow detected: op "<<"
which sounds, to me, like missing L's or UL's on the end of numerical
constants in #define's. Checking <include/smb.h> showed this to be the
case - some of the #define's are for (1L<<x) and some are just (1<<x).
That -Xc doesn't like "long long" or the bit field things (netinet/ip.h),
isn't so much of a worry :)
Adding in extra prototypes for strdup() and mktemp() to one of the .h
files appears to have fixed the problem of smbd core dumping on Solaris7
when compiled as a 64bit binary (using -xarch=v9) with SUNWspro 5.0's cc.
More information about the samba-technical