Work around a glibc bug in strtok_r.
[gnulib.git] / lib / strtok_r.c
index 232474a..f7e0e63 100644 (file)
@@ -1,5 +1,5 @@
 /* Reentrant string tokenizer.  Generic version.
-   Copyright (C) 1991,1996-1999,2001,2004,2007 Free Software Foundation, Inc.
+   Copyright (C) 1991,1996-1999,2001,2004,2007,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software: you can redistribute it and/or modify
 
 #include <string.h>
 
-#undef strtok_r
-#undef __strtok_r
-
-#ifndef _LIBC
+#ifdef _LIBC
+# undef strtok_r
+# undef __strtok_r
+#else
 # define __strtok_r strtok_r
 # define __rawmemchr strchr
 #endif