1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

- Export strlcat()/strcpy() for Frank.

- Windows doesn't have lstat().
This commit is contained in:
Andi Gutmans
2000-04-20 17:40:03 +00:00
parent 883bd2b1de
commit 503bb3bedb
5 changed files with 10 additions and 4 deletions

View File

@@ -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

View File

@@ -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)

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;