Add PHPAPI for Windows.

This commit is contained in:
Sascha Schumann 1999-11-30 20:46:07 +00:00
parent 3a17630121
commit cfc7e27a7f
2 changed files with 12 additions and 13 deletions

View file

@ -36,38 +36,38 @@
#if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME) #if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME)
#define PHP_NEED_REENTRANCY 1 #define PHP_NEED_REENTRANCY 1
#define localtime_r php_localtime_r #define localtime_r php_localtime_r
struct tm *localtime_r(const time_t *const timep, struct tm *p_tm); PHPAPI struct tm *localtime_r(const time_t *const timep, struct tm *p_tm);
#endif #endif
#if !defined(HAVE_CTIME_R) && defined(HAVE_CTIME) #if !defined(HAVE_CTIME_R) && defined(HAVE_CTIME)
#define PHP_NEED_REENTRANCY 1 #define PHP_NEED_REENTRANCY 1
#define ctime_r php_ctime_r #define ctime_r php_ctime_r
char *ctime_r(const time_t *clock, char *buf); PHPAPI char *ctime_r(const time_t *clock, char *buf);
#endif #endif
#if !defined(HAVE_ASCTIME_R) && defined(HAVE_ASCTIME) #if !defined(HAVE_ASCTIME_R) && defined(HAVE_ASCTIME)
#define PHP_NEED_REENTRANCY 1 #define PHP_NEED_REENTRANCY 1
#define asctime_r php_asctime_r #define asctime_r php_asctime_r
char *asctime_r(const struct tm *tm, char *buf); PHPAPI char *asctime_r(const struct tm *tm, char *buf);
#endif #endif
#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME) #if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME)
#define PHP_NEED_REENTRANCY 1 #define PHP_NEED_REENTRANCY 1
#define gmtime_r php_gmtime_r #define gmtime_r php_gmtime_r
struct tm *gmtime_r(const time_t *const timep, struct tm *p_tm); PHPAPI struct tm *gmtime_r(const time_t *const timep, struct tm *p_tm);
#endif #endif
#if !defined(HAVE_STRTOK_R) #if !defined(HAVE_STRTOK_R)
#define strtok_r php_strtok_r #define strtok_r php_strtok_r
char *strtok_r(char *s, const char *delim, char **last); PHPAPI char *strtok_r(char *s, const char *delim, char **last);
#endif #endif
#if !defined(HAVE_RAND_R) #if !defined(HAVE_RAND_R)
#define rand_r php_rand_r #define rand_r php_rand_r
int rand_r(unsigned int *seed); PHPAPI int rand_r(unsigned int *seed);
#endif #endif
#if !defined(ZTS) #if !defined(ZTS)

View file

@ -47,7 +47,7 @@ static MUTEX_T reentrant_locks[NUMBER_OF_LOCKS];
#if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME) #if !defined(HAVE_LOCALTIME_R) && defined(HAVE_LOCALTIME)
struct tm *localtime_r(const time_t *const timep, struct tm *p_tm) PHPAPI struct tm *localtime_r(const time_t *const timep, struct tm *p_tm)
{ {
struct tm *tmp; struct tm *tmp;
@ -65,7 +65,7 @@ struct tm *localtime_r(const time_t *const timep, struct tm *p_tm)
#if !defined(HAVE_CTIME_R) && defined(HAVE_CTIME) #if !defined(HAVE_CTIME_R) && defined(HAVE_CTIME)
char *ctime_r(const time_t *clock, char *buf) PHPAPI char *ctime_r(const time_t *clock, char *buf)
{ {
char *tmp; char *tmp;
@ -83,7 +83,7 @@ char *ctime_r(const time_t *clock, char *buf)
#if !defined(HAVE_ASCTIME_R) && defined(HAVE_ASCTIME) #if !defined(HAVE_ASCTIME_R) && defined(HAVE_ASCTIME)
char *asctime_r(const struct tm *tm, char *buf) PHPAPI char *asctime_r(const struct tm *tm, char *buf)
{ {
char *tmp; char *tmp;
@ -101,7 +101,7 @@ char *asctime_r(const struct tm *tm, char *buf)
#if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME) #if !defined(HAVE_GMTIME_R) && defined(HAVE_GMTIME)
struct tm *gmtime_r(const time_t *const timep, struct tm *p_tm) PHPAPI struct tm *gmtime_r(const time_t *const timep, struct tm *p_tm)
{ {
struct tm *tmp; struct tm *tmp;
@ -186,7 +186,7 @@ do_rand(unsigned long *ctx)
} }
int PHPAPI int
rand_r(unsigned int *ctx) rand_r(unsigned int *ctx)
{ {
u_long val = (u_long) *ctx; u_long val = (u_long) *ctx;
@ -243,9 +243,8 @@ rand_r(unsigned int *ctx)
*/ */
#include <stddef.h> #include <stddef.h>
#include <string.h>
char * PHPAPI char *
strtok_r(char *s, const char *delim, char **last) strtok_r(char *s, const char *delim, char **last)
{ {
char *spanp; char *spanp;