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

index 61e3e40f0295e084deaf31a87936f2edf7cea538..59a6b81d1deb861e2a52fa350632ca9a9a65ff8d 100644 (file)
@@ -1043,6 +1043,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 cdd99e36f69f226e362131654940fe62d45d211d..5ad435d274ec75623225107e61f3a69e338012f5 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