From: serassio <> Date: Mon, 21 Jan 2008 00:11:14 +0000 (+0000) Subject: Really use the Squid provided strtok_r() library code when needed. X-Git-Tag: BASIC_TPROXY4~175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33b67fb66827f09af5143fdf63f2fb3c3c3fb486;p=thirdparty%2Fsquid.git Really use the Squid provided strtok_r() library code when needed. --- diff --git a/include/strtok_r.h b/include/strtok_r.h index 7d3f21b5f0..59bb2c4af3 100644 --- a/include/strtok_r.h +++ b/include/strtok_r.h @@ -45,9 +45,6 @@ See also strsep(). */ -#if defined HAVE_DECL_STRTOK_R && !HAVE_DECL_STRTOK_R -extern char *strtok_r(char *restrict s, const char *restrict sep, - char **restrict lasts); -#endif +SQUIDCEXTERN char *strtok_r(char *s, const char *sep, char **lasts); #endif /* STRTOK_R_H */ diff --git a/lib/strtok_r.c b/lib/strtok_r.c index d1522c9b51..e06600db1d 100644 --- a/lib/strtok_r.c +++ b/lib/strtok_r.c @@ -43,7 +43,7 @@ // s = "abc\0-def\0" */ char * -__strtok_r (char *s, const char *delim, char **save_ptr) +strtok_r (char *s, const char *delim, char **save_ptr) { char *token; @@ -72,7 +72,3 @@ __strtok_r (char *s, const char *delim, char **save_ptr) } return token; } -#ifdef weak_alias -libc_hidden_def (__strtok_r) -weak_alias (__strtok_r, strtok_r) -#endif diff --git a/src/squid.h b/src/squid.h index 7308ff2f50..9932e0d3a7 100644 --- a/src/squid.h +++ b/src/squid.h @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.269 2007/12/14 23:11:48 amosjeffries Exp $ + * $Id: squid.h,v 1.270 2008/01/20 17:11:15 serassio Exp $ * * AUTHOR: Duane Wessels * @@ -388,6 +388,10 @@ extern "C" #include "strtoll.h" #endif +#if !HAVE_STRTOK_R +#include "strtok_r.h" +#endif + #if !HAVE_INITGROUPS #include "initgroups.h" #endif