Loading...
gen/FreeBSD/getcwd.c.patch /dev/null Libc-391.2.5
--- /dev/null
+++ Libc/Libc-391.2.5/gen/FreeBSD/getcwd.c.patch
@@ -0,0 +1,30 @@
+--- getcwd.c.orig	2003-10-29 02:45:01.000000000 -0800
++++ getcwd.c	2004-10-24 17:19:39.000000000 -0700
+@@ -54,8 +54,6 @@
+ 	(dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
+ 	    (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
+ 
+-extern int __getcwd(char *, size_t);
+-
+ char *
+ getcwd(pt, size)
+ 	char *pt;
+@@ -95,18 +93,6 @@
+ 			return (NULL);
+ 		ept = pt + ptsize;
+ 	}
+-	if (__getcwd(pt, ept - pt) == 0) {
+-		if (*pt != '/') {
+-			bpt = pt;
+-			ept = pt + strlen(pt) - 1;
+-			while (bpt < ept) {
+-				c = *bpt;
+-				*bpt++ = *ept;
+-				*ept-- = c;
+-			}
+-		}
+-		return (pt);
+-	}
+ 	bpt = ept - 1;
+ 	*bpt = '\0';
+