Justtechjobs.com Find a programming school near you






Online Campus Both


php4-beta | 200004

[PHP4BETA] cvs: /php4 php.h php_virtual_cwd.c php_virtual_cwd.h strlcat.c strlcpy.c From: Andi Gutmans (andi <email protected>)
Date: 04/20/00

andi Thu Apr 20 10:40:33 2000 EDT

  Modified files:
    /php4 php.h php_virtual_cwd.c php_virtual_cwd.h strlcat.c strlcpy.c
  Log:
  - Export strlcat()/strcpy() for Frank.
  - Windows doesn't have lstat().
  
  
Index: php4/php.h
diff -u php4/php.h:1.84 php4/php.h:1.85
--- php4/php.h:1.84 Thu Apr 20 10:23:59 2000
+++ php4/php.h Thu Apr 20 10:40:03 2000
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php.h,v 1.84 2000/04/20 17:23:59 zeev Exp $ */
+/* $Id: php.h,v 1.85 2000/04/20 17:40:03 andi Exp $ */
 
 #ifndef _PHP_H
 #define _PHP_H
@@ -96,11 +96,11 @@
 #endif
 
 #ifndef HAVE_STRLCPY
-size_t strlcpy(char *dst, const char *src, size_t siz);
+PHPAPI size_t strlcpy(char *dst, const char *src, size_t siz);
 #endif
 
 #ifndef HAVE_STRLCAT
-size_t strlcat(char *dst, const char *src, size_t siz);
+PHPAPI size_t strlcat(char *dst, const char *src, size_t siz);
 #endif
 
 #ifndef HAVE_STRTOK_R
Index: php4/php_virtual_cwd.c
diff -u php4/php_virtual_cwd.c:1.33 php4/php_virtual_cwd.c:1.34
--- php4/php_virtual_cwd.c:1.33 Thu Apr 20 10:23:59 2000
+++ php4/php_virtual_cwd.c Thu Apr 20 10:40:03 2000
@@ -400,6 +400,8 @@
         return retval;
 }
 
+#ifndef ZEND_WIN32
+
 CWD_API int virtual_lstat(const char *path, struct stat *buf)
 {
         cwd_state new_state;
@@ -414,6 +416,8 @@
         CWD_STATE_FREE(&new_state);
         return retval;
 }
+
+#endif
 
 #if 0
 
Index: php4/php_virtual_cwd.h
diff -u php4/php_virtual_cwd.h:1.14 php4/php_virtual_cwd.h:1.15
--- php4/php_virtual_cwd.h:1.14 Thu Apr 20 10:23:59 2000
+++ php4/php_virtual_cwd.h Thu Apr 20 10:40:03 2000
@@ -43,7 +43,9 @@
 CWD_API int virtual_filepath(char *path, char **filepath);
 CWD_API FILE *virtual_fopen(const char *path, const char *mode);
 CWD_API int virtual_stat(const char *path, struct stat *buf);
+#ifndef ZEND_WIN32
 CWD_API int virtual_lstat(const char *path, struct stat *buf);
+#endif
 CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func verify_path);
 
 ZEND_BEGIN_MODULE_GLOBALS(cwd)
Index: php4/strlcat.c
diff -u php4/strlcat.c:1.4 php4/strlcat.c:1.5
--- php4/strlcat.c:1.4 Fri Nov 26 16:48:50 1999
+++ php4/strlcat.c Thu Apr 20 10:40:03 2000
@@ -44,7 +44,7 @@
  * will be copied. Always NUL terminates (unless siz == 0).
  * Returns strlen(src); if retval >= siz, truncation occurred.
  */
-size_t strlcat(dst, src, siz)
+PHPAPI size_t strlcat(dst, src, siz)
         char *dst;
         const char *src;
         size_t siz;
Index: php4/strlcpy.c
diff -u php4/strlcpy.c:1.4 php4/strlcpy.c:1.5
--- php4/strlcpy.c:1.4 Fri Nov 26 16:48:50 1999
+++ php4/strlcpy.c Thu Apr 20 10:40:03 2000
@@ -43,7 +43,7 @@
  * will be copied. Always NUL terminates (unless siz == 0).
  * Returns strlen(src); if retval >= siz, truncation occurred.
  */
-size_t strlcpy(dst, src, siz)
+PHPAPI size_t strlcpy(dst, src, siz)
         char *dst;
         const char *src;
         size_t siz;

-- 
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe <email protected>
For additional commands, e-mail: php4beta-help <email protected>
To contact the list administrators, e-mail: php4beta-admin <email protected>