PennMUSH Community

Changeset 1308

Show
Ignore:
Timestamp:
10/10/08 12:52:40 (2 months ago)
Author:
shawnw
Message:

Use the GNU libc strchrnul() function in favor of our own seek_char() when present.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.3/branches/devel/config.h.in

    r1302 r1308  
    267267 
    268268 
     269#undef HAVE_STRCHRNUL 
     270 
    269271#undef HAVE_STRDUP 
    270272 
  • 1.8.3/branches/devel/configure

    r1302 r1308  
    1659116591 
    1659216592 
    16593 for ac_func in strxfrm _strncoll _stricoll _strnicoll strdup 
     16593for ac_func in strxfrm _strncoll _stricoll _strnicoll strchrnul 
    1659416594do 
    1659516595as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 
  • 1.8.3/branches/devel/configure.in

    r1302 r1308  
    244244AC_CHECK_FUNCS([strcasecmp strncasecmp _stricmp _strnicmp strdup]) 
    245245AC_FUNC_STRCOLL 
    246 AC_CHECK_FUNCS([strxfrm _strncoll _stricoll _strnicoll strdup]) 
     246AC_CHECK_FUNCS([strxfrm _strncoll _stricoll _strnicoll strchrnul]) 
    247247AC_CHECK_FUNC(sysconf, [AC_DEFINE(HAS_SYSCONF)]) 
    248248AC_CHECK_FUNC(textdomain, [AC_DEFINE(HAS_TEXTDOMAIN)]) 
  • 1.8.3/branches/devel/hdrs/externs.h

    r1298 r1308  
    434434char *upcasestr(char *s); 
    435435char *skip_space(const char *s); 
     436#ifdef HAVE_STRCHRNUL 
     437#define seek_char(s,c) strchrnul((s),(c)) 
     438#else 
    436439char *seek_char(const char *s, char c); 
     440#endif 
    437441size_t u_strlen(const unsigned char *s); 
    438442unsigned char *u_strncpy 
  • 1.8.3/branches/devel/src/funlist.c

    r1157 r1308  
    99 
    1010#include "config.h" 
     11#define _GNU_SOURCE 
    1112#include <string.h> 
    1213#include <ctype.h> 
  • 1.8.3/branches/devel/src/look.c

    r1150 r1308  
    99#include "config.h" 
    1010#include "copyrite.h" 
    11  
     11#define _GNU_SOURCE 
    1212#include <string.h> 
    1313#include <ctype.h> 
  • 1.8.3/branches/devel/src/strutil.c

    r1156 r1308  
    862862} 
    863863 
     864#ifndef HAVE_STRCHRNUL 
    864865/** Return a pointer to next char in s which matches c, or to the terminating 
    865866 * nul at the end of s. 
     
    878879  return p; 
    879880} 
     881#endif 
    880882 
    881883/** Unsigned char version of strlen.