]> git.saurik.com Git - apple/libc.git/blame - gen/FreeBSD/getcwd.c.patch
Libc-391.4.3.tar.gz
[apple/libc.git] / gen / FreeBSD / getcwd.c.patch
CommitLineData
3d9156a7
A
1--- getcwd.c.orig 2003-10-29 02:45:01.000000000 -0800
2+++ getcwd.c 2004-10-24 17:19:39.000000000 -0700
9385eb3d
A
3@@ -54,8 +54,6 @@
4 (dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
5 (dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
6
7-extern int __getcwd(char *, size_t);
8-
9 char *
10 getcwd(pt, size)
11 char *pt;
3d9156a7 12@@ -95,18 +93,6 @@
9385eb3d
A
13 return (NULL);
14 ept = pt + ptsize;
15 }
9385eb3d
A
16- if (__getcwd(pt, ept - pt) == 0) {
17- if (*pt != '/') {
18- bpt = pt;
19- ept = pt + strlen(pt) - 1;
20- while (bpt < ept) {
21- c = *bpt;
22- *bpt++ = *ept;
23- *ept-- = c;
24- }
25- }
26- return (pt);
27- }
9385eb3d
A
28 bpt = ept - 1;
29 *bpt = '\0';
30