[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Compiling SAMBA 2.0



I tried to compile Samba 2.0.0beta1 the other day and ran into a little
problem.  Compilation failed in printing/printing.c with an error as
follows...

Compiling printing/printing.c
printing/printing.c: In function `parse_lpq_bsd':
printing/printing.c:266: `__ERROR__XX__NEVER_USE_STRCAT___' undeclared
(first use this function)
printing/printing.c:266: (Each undeclared identifier is reported only
once
printing/printing.c:266: for each function it appears in.)
printing/printing.c:266: parse error before `;'
printing/printing.c:267: parse error before `;'
printing/printing.c: In function `parse_lpq_lprng':
printing/printing.c:381: `__ERROR__XX__NEVER_USE_STRCAT___' undeclared
(first use this function)
printing/printing.c:381: parse error before `;'
printing/printing.c:382: parse error before `;'
make: *** [printing/printing.o] Error 1

The line that causes this error is...
     strncat(buf->file," ",bufsize);
 
What I did was to remove the following define from the include/include.h
file ins the samba source tree.

#ifdef strcat
#undef strcat
#endif /* strcat */
#define strcat(dest,src) __ERROR__XX__NEVER_USE_STRCAT___;

So, after all that, have I done the right thing?  
It compiled quite happily after that and seems to work correctly.  For
those that haven't tried it yet, Samba 2 performs significantly better
that Samba 1

Regards
Michael Anthon

TAMS Systems


Reply to: