diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:18:42 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-04-15 18:18:42 +0000 |
commit | 7a0415cfd70a02b2280d27556c6c54cef1c86e1a (patch) | |
tree | 37a88a1c4611ee37f2a3209873fc9a34a2624587 /Src/compat.c | |
parent | 904b939cbd81a542303da2c58288b95b153106f5 (diff) | |
download | zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.tar.gz zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.tar.xz zsh-7a0415cfd70a02b2280d27556c6c54cef1c86e1a.zip |
zsh-3.1.5-pws-11 zsh-3.1.5-pws-11
Diffstat (limited to 'Src/compat.c')
-rw-r--r-- | Src/compat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Src/compat.c b/Src/compat.c index b1bcbc21b..53ab6b7a3 100644 --- a/Src/compat.c +++ b/Src/compat.c @@ -115,7 +115,7 @@ zgetdir(struct dirsav *d) struct stat sbuf; ino_t pino; dev_t pdev; -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) && !defined(USE_GETCWD) struct dirent *de; DIR *dir; dev_t dev; @@ -123,7 +123,7 @@ zgetdir(struct dirsav *d) int len; #endif - buf = halloc(bufsiz = PATH_MAX); + buf = zhalloc(bufsiz = PATH_MAX); pos = bufsiz - 1; buf[pos] = '\0'; strcpy(nbuf, "../"); @@ -142,7 +142,7 @@ zgetdir(struct dirsav *d) #ifdef HAVE_FCHDIR else #endif -#ifndef __CYGWIN__ +#if !defined(__CYGWIN__) && !defined(USE_GETCWD) holdintr(); for (;;) { @@ -202,7 +202,7 @@ zgetdir(struct dirsav *d) len = strlen(nbuf + 2); pos -= len; while (pos <= 1) { - char *newbuf = halloc(2*bufsiz); + char *newbuf = zhalloc(2*bufsiz); memcpy(newbuf + bufsiz, buf, bufsiz); buf = newbuf; pos += bufsiz; @@ -228,7 +228,7 @@ zgetdir(struct dirsav *d) zchdir(buf + pos + 1); noholdintr(); -#else /* __CYGWIN__ case */ +#else /* __CYGWIN__, USE_GETCWD cases */ if (!getcwd(buf, bufsiz)) { if (d) { |