httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Slemko <>
Subject Re: getcd vs getcwd
Date Sat, 15 Feb 1997 22:47:36 GMT
Two proposals:

1. Replace the (one) place where getwd is with ap_getwd, then have
a #define in conf.h that sets it to getwd or getcwd depending on
platform.  This way we don't get hurt when a platform does have
getwd but we try to redefine it anyway.

2. Just get rid of the one place where we use getwd.  Doesn't look
too hard to do...  

I don't recall any problems with a system having neither.  

Comments?  I will do either once I get some comments unless anyone else is

On Wed, 12 Feb 1997, Jim Jagielski wrote:

> FYI: Even though for BSD systems getcd is implemented via getcwd,
>      for SysV systems, most of the time getcwd is implemented
>      using the popen/pwd method. For some SysV/BSD hybrids,
>      there are 2 sep versions: the SysV-popen version (getcwd)
>      and the BSD version, which directly determines the cwd
>      (getwd). So although at first blush using getcd might
>      seem backwards, and we should use getcwd in pref, for some
>      OSs just the reverse is true.
>      Of course, for the roll-your-own version, we're stuck with
>      popen for simple portability :/
> -- 
> ====================================================================
>       Jim Jagielski            |       jaguNET Access Services
>           |
>                   "Not the Craw... the CRAW!"

View raw message