]> granicus.if.org Git - php/commitdiff
MFH: move function definition from .h to .c, where it should be
authorAntony Dovgal <tony2001@php.net>
Wed, 8 Feb 2006 20:50:03 +0000 (20:50 +0000)
committerAntony Dovgal <tony2001@php.net>
Wed, 8 Feb 2006 20:50:03 +0000 (20:50 +0000)
TSRM/tsrm_virtual_cwd.c
TSRM/tsrm_virtual_cwd.h

index 4ab511f313f9f2eda784e82eae925c26363c2c1b..a7ce9d29c4ba5bea096e2e24e30ebb641f88e74c 100644 (file)
@@ -1035,6 +1035,26 @@ CWD_API FILE *virtual_popen(const char *command, const char *type TSRMLS_DC)
 
 #endif
 
+/* On AIX & Tru64 when a file does not exist realpath() returns
+ * NULL, and sets errno to ENOENT. Unlike in other libc implementations
+ * the destination is not filled and remains undefined. Therefor, we
+ * must populate it manually using strcpy as done on systems with no
+ * realpath() function.
+ */
+#if defined(__osf__) || defined(_AIX)
+char *php_realpath_hack(char *src, char *dest)
+{
+       char *ret;
+
+       if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
+               return strcpy(dest, src);
+       } else {
+               return ret;
+       }
+}
+#endif
+
+
 
 /*
  * Local variables:
index 362659bc9d74816ba7be19cf773d144f12c3c2c4..9c1b9d2f0a263355ed8106186b3d1008374be9e3 100644 (file)
@@ -166,23 +166,8 @@ CWD_API int virtual_access(const char *pathname, int mode TSRMLS_DC);
 #endif
 #endif
 
-/* On AIX & Tru64 when a file does not exist realpath() returns
- * NULL, and sets errno to ENOENT. Unlike in other libc implementations
- * the destination is not filled and remains undefined. Therefor, we
- * must populate it manually using strcpy as done on systems with no
- * realpath() function.
- */
 #if defined(__osf__) || defined(_AIX)
-static char *php_realpath_hack(char *src, char *dest)
-{
-       char *ret;
-
-       if ((ret = realpath(src, dest)) == NULL && errno == ENOENT) {
-               return strcpy(dest, src);
-       } else {
-               return ret;
-       }
-}
+char *php_realpath_hack(char *src, char *dest);
 #endif
 
 #if HAVE_UTIME