Is HAVE_GETCWD needed?

From: Date: Wed, 06 Mar 2002 16:51:01 +0000
Subject: Is HAVE_GETCWD needed?
Groups: php.dev 
Request: Send a blank email to php-dev+get-80805@lists.php.net to get a copy of this message
I am trying to beat out a bug with opendir(), getcwd(), and VCWD_GETCWD. Way back in Oct. '99 when thies added the PHP function "getcwd()", he had this code: #if HAVE_GETCWD ret = getcwd(path, MAXPATHLEN); #elif HAVE_GETWD ret = getwd(path); #endif and since then "getcwd" and "getwd" have been replaced by "VCWD_GETCWD" and "VCWD_GETWD". I grep'd the source tree, and the HAVE_GETCWD and HAVE_GETWD macros are only tested in two places: ext/mysql/libmysql/my_getwd.c ext/standard/dir.c And in my_getwd.c it is around "getcwd()" and "getwd()". The VCWD_GETCWD macro is now used in several places without testing HAVE_GETCWD. Is this an oversight in those places, or did it's use in dir.c just get overlooked? -James

« previous php.dev (#80805) next »