cvs: TSRM(PHP_5_1) / tsrm_virtual_cwd.c tsrm_virtual_cwd.h
| From: | Antony Dovgal | Date: | Wed, 08 Feb 2006 20:50:03 +0000 |
| Subject: | cvs: TSRM(PHP_5_1) / tsrm_virtual_cwd.c tsrm_virtual_cwd.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4577@lists.php.net to get a copy of this message | ||
tony2001 Wed Feb 8 20:50:03 2006 UTC
Modified files: (Branch: PHP_5_1)
/TSRM tsrm_virtual_cwd.c tsrm_virtual_cwd.h
Log:
MFH: move function definition from .h to .c, where it should be
http://cvs.php.net/viewcvs.cgi/TSRM/tsrm_virtual_cwd.c?r1=1.74.2.7&r2=1.74.2.8&diff_format=u
Index: TSRM/tsrm_virtual_cwd.c
diff -u TSRM/tsrm_virtual_cwd.c:1.74.2.7 TSRM/tsrm_virtual_cwd.c:1.74.2.8
--- TSRM/tsrm_virtual_cwd.c:1.74.2.7 Mon Feb 6 20:37:11 2006
+++ TSRM/tsrm_virtual_cwd.c Wed Feb 8 20:50:03 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.c,v 1.74.2.7 2006/02/06 20:37:11 tony2001 Exp $ */
+/* $Id: tsrm_virtual_cwd.c,v 1.74.2.8 2006/02/08 20:50:03 tony2001 Exp $ */
#include <sys/types.h>
#include <sys/stat.h>
@@ -1035,6 +1035,26 @@
#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:
http://cvs.php.net/viewcvs.cgi/TSRM/tsrm_virtual_cwd.h?r1=1.48.2.2&r2=1.48.2.3&diff_format=u
Index: TSRM/tsrm_virtual_cwd.h
diff -u TSRM/tsrm_virtual_cwd.h:1.48.2.2 TSRM/tsrm_virtual_cwd.h:1.48.2.3
--- TSRM/tsrm_virtual_cwd.h:1.48.2.2 Mon Jan 16 09:09:37 2006
+++ TSRM/tsrm_virtual_cwd.h Wed Feb 8 20:50:03 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_virtual_cwd.h,v 1.48.2.2 2006/01/16 09:09:37 dmitry Exp $ */
+/* $Id: tsrm_virtual_cwd.h,v 1.48.2.3 2006/02/08 20:50:03 tony2001 Exp $ */
#ifndef VIRTUAL_CWD_H
#define VIRTUAL_CWD_H
@@ -166,23 +166,8 @@
#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