declare basename in string.h when _GNU_SOURCE is defined
authorRich Felker <dalias@aerifal.cx>
Tue, 7 Feb 2012 18:10:30 +0000 (13:10 -0500)
committerRich Felker <dalias@aerifal.cx>
Tue, 7 Feb 2012 18:10:30 +0000 (13:10 -0500)
note that it still will have the standards-conformant behavior, not
the GNU behavior. but at least this prevents broken code from ending
up with truncated pointers due to implicit declarations...

include/string.h

index c2dc7e3..10d5b17 100644 (file)
@@ -85,6 +85,7 @@ char *strcasestr(const char *, const char *);
 char *strsep(char **, const char *);
 void *memrchr(const void *, int, size_t);
 void *mempcpy(void *, const void *, size_t);
 char *strsep(char **, const char *);
 void *memrchr(const void *, int, size_t);
 void *mempcpy(void *, const void *, size_t);
+char *basename(char *);
 #endif
 
 #ifdef __cplusplus
 #endif
 
 #ifdef __cplusplus