[uClibc-cvs] uClibc/extra/gcc-uClibc gcc-uClibc.c,1.55,1.56
Erik Andersen
andersen at uclibc.org
Wed May 28 07:15:50 UTC 2003
Update of /var/cvs/uClibc/extra/gcc-uClibc
In directory winder:/tmp/cvs-serv29839
Modified Files:
gcc-uClibc.c
Log Message:
Accomodate building under cygwin
Index: gcc-uClibc.c
===================================================================
RCS file: /var/cvs/uClibc/extra/gcc-uClibc/gcc-uClibc.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gcc-uClibc.c 5 Mar 2003 10:55:31 -0000 1.55
+++ gcc-uClibc.c 28 May 2003 07:15:46 -0000 1.56
@@ -75,7 +75,6 @@
#include <stdarg.h>
#include <string.h>
#include <unistd.h>
-#include <libgen.h>
#include "gcc-uClibc.h"
@@ -89,6 +88,22 @@
#ifdef __UCLIBC_CTOR_DTOR__
static char nostdinc_plus[] = "-nostdinc++";
#endif
+
+/* Include a local implementation of basename, since this
+ * uses the host system's C lib, and CYGWIN apparently
+ * doesn't provide an implementation of basename(). */
+char *basename(const char *path)
+{
+ register const char *s;
+ register const char *p;
+ p = s = path;
+ while (*s) {
+ if (*s++ == '/') {
+ p = s;
+ }
+ }
+ return (char *) p;
+}
extern void *xmalloc(size_t size)
More information about the uClibc-cvs
mailing list