mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
- Make dir functions compile in Win32
- Fix too early memory manager initialization (For you Thies)
This commit is contained in:
parent
99947a251e
commit
14d9a59f1c
@ -30,6 +30,12 @@
|
||||
#include <dirent.h>
|
||||
#endif
|
||||
|
||||
#if WIN32||WINNT
|
||||
#define NEEDRDH 1
|
||||
#include "win32/readdir.h"
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "php_session.h"
|
||||
|
@ -1629,9 +1629,9 @@ PHP_FUNCTION(set_magic_quotes_runtime)
|
||||
if (ARG_COUNT(ht)!=1 || getParameters(ht, 1, &new_setting)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long(new_setting);
|
||||
convert_to_boolean(new_setting);
|
||||
|
||||
PG(magic_quotes_runtime)=new_setting->value.lval;
|
||||
PG(magic_quotes_runtime) = (zend_bool) new_setting->value.lval;
|
||||
RETURN_TRUE;
|
||||
}
|
||||
|
||||
@ -2346,6 +2346,8 @@ PHP_FUNCTION(defined)
|
||||
Returns true if client disconnected */
|
||||
PHP_FUNCTION(connection_aborted)
|
||||
{
|
||||
PLS_FETCH();
|
||||
|
||||
RETURN_LONG(PG(connection_status)&PHP_CONNECTION_ABORTED);
|
||||
}
|
||||
/* }}} */
|
||||
@ -2354,6 +2356,7 @@ PHP_FUNCTION(connection_aborted)
|
||||
Returns true if script timed out */
|
||||
PHP_FUNCTION(connection_timeout)
|
||||
{
|
||||
PLS_FETCH();
|
||||
|
||||
RETURN_LONG(PG(connection_status)&PHP_CONNECTION_TIMEOUT);
|
||||
}
|
||||
@ -2363,6 +2366,7 @@ PHP_FUNCTION(connection_timeout)
|
||||
Returns the connection status bitfield */
|
||||
PHP_FUNCTION(connection_status)
|
||||
{
|
||||
PLS_FETCH();
|
||||
|
||||
RETURN_LONG(PG(connection_status));
|
||||
}
|
||||
@ -2374,6 +2378,7 @@ PHP_FUNCTION(ignore_user_abort)
|
||||
{
|
||||
pval *arg;
|
||||
int old_setting;
|
||||
PLS_FETCH();
|
||||
|
||||
old_setting = PG(ignore_user_abort);
|
||||
switch (ARG_COUNT(ht)) {
|
||||
@ -2383,8 +2388,8 @@ PHP_FUNCTION(ignore_user_abort)
|
||||
if (getParameters(ht,1,&arg) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
convert_to_long(arg);
|
||||
PG(ignore_user_abort)=arg->value.lval;
|
||||
convert_to_boolean(arg);
|
||||
PG(ignore_user_abort) = (zend_bool) arg->value.lval;
|
||||
break;
|
||||
default:
|
||||
WRONG_PARAM_COUNT;
|
||||
|
@ -33,10 +33,8 @@
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#if MSVC5
|
||||
#if !(APACHE)
|
||||
#if WIN32||WINNT
|
||||
#define NEEDRDH 1
|
||||
#endif
|
||||
#include "win32/readdir.h"
|
||||
#endif
|
||||
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#include "php.h"
|
||||
#include "SAPI.h"
|
||||
#ifdef ZTS
|
||||
#include "TSRM.h"
|
||||
|
12
php4dll.dsp
12
php4dll.dsp
@ -327,6 +327,10 @@ SOURCE=.\ext\standard\iptc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ext\standard\lcg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ext\standard\link.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -347,6 +351,10 @@ SOURCE=.\ext\standard\microtime.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ext\session\mod_files.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ext\bcmath\number.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -383,6 +391,10 @@ SOURCE=.\ext\standard\reg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ext\session\session.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ext\standard\soundex.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -30,8 +30,9 @@ typedef struct {
|
||||
} DIR;
|
||||
|
||||
/* Function prototypes */
|
||||
extern DIR *opendir(const char *);
|
||||
extern struct dirent *readdir(DIR *);
|
||||
extern int closedir(DIR *);
|
||||
DIR *opendir(const char *);
|
||||
struct dirent *readdir(DIR *);
|
||||
int closedir(DIR *);
|
||||
void rewinddir(DIR *);
|
||||
|
||||
#endif
|
||||
extern void rewinddir(DIR *);
|
||||
|
Loading…
Reference in New Issue
Block a user