__ERROR__XX__NEVER_USE_STRCASECMP__ (3.0.1 on SGI Irix 6.5)

Christian Griebel Christian.Griebel at merck.de
Thu Jan 8 11:55:39 GMT 2004


Dear Samba fans,

trying to compile samba-3.0.1 on SGI Irix 6.5 with the MIPSPro 7.2 compiler
gives

Compiling nsswitch/wins.c with -KPIC
cc-1020 cc: ERROR File = nsswitch/wins.c, Line = 197
  The identifier "__ERROR__XX__NEVER_USE_STRCASECMP__" is undefined.

        if (strcasecmp(map,"hosts.byaddr") == 0) {
            ^

cc-1018 cc: ERROR File = nsswitch/wins.c, Line = 197
  An unmatched left parentheses "(" appears in an expression.

        if (strcasecmp(map,"hosts.byaddr") == 0) {
            ^

cc-1018 cc: ERROR File = nsswitch/wins.c, Line = 225
  An unmatched left parentheses "(" appears in an expression.

        } else if (strcasecmp(map,"hosts.byname") == 0) {
                   ^
whereas 3.0.0 compiled this without problems. Digging into it, I've found
include/safe_string.h being the place where the
__ERROR__XX__NEVER_USE_STRCASECMP__ gets defined. Few lines are added since
3.0.0's safe_string.h:

diff samba-3.0.*/source/include/safe_string.h
49a50,63
> /*
>  * strcasecmp/strncasecmp aren't an error, but it means you're not thinking about
>  * multibyte. Don't use them. JRA.
>  */
> #ifdef strcasecmp
> #undef strcasecmp
> #endif
> #define strcasecmp __ERROR__XX__NEVER_USE_STRCASECMP__;
> 
> #ifdef strncasecmp
> #undef strncasecmp
> #endif
> #define strncasecmp __ERROR__XX__NEVER_USE_STRCASECMP__;

what seems to cause the MIPSPro compiler to bail out.
Other code above and below these new lines contains the same style of
redefinitions for "dangerous" functions, but this works as expected.
Since I'm an administrator and not a developer, I'm out of luck here. The most
recent binary for Irix is as well not a 3.0.1 so I think this may directly be of
interest to the Irix port's team/person.
Can somebody explain how to work around or how to fix the compiling error?
Answers by eMail preferred...
Many thanks in advance

-- 
_____________________
Christian Griebel                    Pha Pre/BCI, Merck KGaA
Systems Management                   Tel: +49(0)6151 72 3886
mailto:Christian.Griebel_at_Merck.de    Fax:               3261


More information about the samba-technical mailing list