summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndi Gutmans <andi@php.net>2000-04-20 17:40:03 +0000
committerAndi Gutmans <andi@php.net>2000-04-20 17:40:03 +0000
commit503bb3bedb847ed99722208da1878ab56f3b5e9d (patch)
tree40ceec254e6e67d4ddc393ea51f799c2cf6eeb09
parent883bd2b1de0afae5a3b9f36c0778ba0b08390e25 (diff)
downloadphp-git-503bb3bedb847ed99722208da1878ab56f3b5e9d.tar.gz
- Export strlcat()/strcpy() for Frank.
- Windows doesn't have lstat().
-rw-r--r--main/php.h4
-rw-r--r--main/php_virtual_cwd.c4
-rw-r--r--main/php_virtual_cwd.h2
-rw-r--r--main/strlcat.c2
-rw-r--r--main/strlcpy.c2
5 files changed, 10 insertions, 4 deletions
diff --git a/main/php.h b/main/php.h
index 97596d16d3..b13a60c6fe 100644
--- a/main/php.h
+++ b/main/php.h
@@ -96,11 +96,11 @@ extern unsigned char second_arg_allow_ref[];
#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
diff --git a/main/php_virtual_cwd.c b/main/php_virtual_cwd.c
index a3d98baa21..fdb7685db3 100644
--- a/main/php_virtual_cwd.c
+++ b/main/php_virtual_cwd.c
@@ -400,6 +400,8 @@ CWD_API int virtual_stat(const char *path, struct stat *buf)
return retval;
}
+#ifndef ZEND_WIN32
+
CWD_API int virtual_lstat(const char *path, struct stat *buf)
{
cwd_state new_state;
@@ -415,6 +417,8 @@ CWD_API int virtual_lstat(const char *path, struct stat *buf)
return retval;
}
+#endif
+
#if 0
main(void)
diff --git a/main/php_virtual_cwd.h b/main/php_virtual_cwd.h
index 406ebf1240..339c4250aa 100644
--- a/main/php_virtual_cwd.h
+++ b/main/php_virtual_cwd.h
@@ -43,7 +43,9 @@ CWD_API int virtual_chdir_file(char *path);
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)
diff --git a/main/strlcat.c b/main/strlcat.c
index 6b2cc1f679..fb390dfe91 100644
--- a/main/strlcat.c
+++ b/main/strlcat.c
@@ -44,7 +44,7 @@ static char *rcsid = "$OpenBSD: strlcat.c,v 1.2 1999/06/17 16:28:58 millert Exp
* 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;
diff --git a/main/strlcpy.c b/main/strlcpy.c
index c34bf0a001..382d8ba56e 100644
--- a/main/strlcpy.c
+++ b/main/strlcpy.c
@@ -43,7 +43,7 @@ static char *rcsid = "$OpenBSD: strlcpy.c,v 1.4 1999/05/01 18:56:41 millert Exp
* 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;