Browse Source

basename.c: define it correctly, use the proper header for each version

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Peter S. Mazinger 13 years ago
parent
commit
32506112b4
2 changed files with 5 additions and 2 deletions
  1. 4 1
      libc/string/__xpg_basename.c
  2. 1 1
      libc/string/basename.c

+ 4 - 1
libc/string/__xpg_basename.c

@@ -5,7 +5,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#include "_string.h"
 #include <libgen.h>
 
 char *__xpg_basename(register char *path)
@@ -34,3 +33,7 @@ char *__xpg_basename(register char *path)
 
 	return first;
 }
+#ifndef __USE_GNU
+# undef basename
+weak_alias(__xpg_basename,basename)
+#endif

+ 1 - 1
libc/string/basename.c

@@ -5,7 +5,7 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-#include "_string.h"
+#include <string.h>
 
 #ifdef __USE_GNU