]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Really use the Squid provided strtok_r() library code when needed.
authorserassio <>
Mon, 21 Jan 2008 00:11:14 +0000 (00:11 +0000)
committerserassio <>
Mon, 21 Jan 2008 00:11:14 +0000 (00:11 +0000)
include/strtok_r.h
lib/strtok_r.c
src/squid.h

index 7d3f21b5f0ec680ae8624a2cd1bba68f81d326e7..59bb2c4af35fcccd6283f6975411d827e565023e 100644 (file)
@@ -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 */
index d1522c9b51c55f3636662d3a6759bc121baed7ae..e06600db1d7ccea430d203a6619b8a4b1621cb84 100644 (file)
@@ -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
index 7308ff2f508fa47d6bef2ed8348cd65238038a36..9932e0d3a7acfe6ba2d0d50d844dec80264fabf7 100644 (file)
@@ -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