diff options
author | Zeev Suraski <zeev@php.net> | 1999-07-09 11:19:38 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 1999-07-09 11:19:38 +0000 |
commit | cdce334c5657de5d9805c10bc2ba1e7eb99815f4 (patch) | |
tree | 796f03b2c9f209083239db5d8b8d5c6181e92391 | |
parent | cc26d0e60940b7a317768f86a07580b457069b0e (diff) | |
download | php-git-cdce334c5657de5d9805c10bc2ba1e7eb99815f4.tar.gz |
*** empty log message ***
-rw-r--r-- | Zend/config.w32.h | 5 | ||||
-rw-r--r-- | Zend/configure.in | 2 | ||||
-rw-r--r-- | Zend/zend_alloc.c | 10 |
3 files changed, 13 insertions, 4 deletions
diff --git a/Zend/config.w32.h b/Zend/config.w32.h index 358f7d0b54..3dee0b6676 100644 --- a/Zend/config.w32.h +++ b/Zend/config.w32.h @@ -13,6 +13,9 @@ typedef unsigned int uint; #define HAVE_DIRENT_H 0 +#define HAVE_KILL 0 +#define HAVE_GETPID 1 + #ifdef inline #undef inline #endif @@ -35,4 +38,4 @@ typedef unsigned int uint; # define ZEND_API __declspec(dllimport) #endif -#endif /* _ZEND_CONFIG_W32_H */
\ No newline at end of file +#endif /* _ZEND_CONFIG_W32_H */ diff --git a/Zend/configure.in b/Zend/configure.in index 539774c44d..b0217eb04c 100644 --- a/Zend/configure.in +++ b/Zend/configure.in @@ -84,7 +84,7 @@ AC_CHECK_SIZEOF(void *, 4) dnl Checks for library functions. AC_FUNC_VPRINTF -AC_CHECK_FUNCS(memcpy memmove strdup strerror strcasecmp strstr flock lockf putenv tempnam usleep setlocale gettimeofday setvbuf srand48 lrand48 srandom random link symlink regcomp getlogin cuserid vsnprintf snprintf gcvt utime crypt setitimer rint unsetenv strftime setsockopt tzset statvfs statfs inet_aton) +AC_CHECK_FUNCS(memcpy memmove strdup strerror strcasecmp strstr flock lockf putenv tempnam usleep setlocale gettimeofday setvbuf srand48 lrand48 srandom random link symlink regcomp getlogin cuserid vsnprintf snprintf gcvt utime crypt setitimer rint unsetenv strftime setsockopt tzset statvfs statfs inet_aton getpid kill) AC_FUNC_UTIME_NULL AC_FUNC_ALLOCA AC_BROKEN_SPRINTF diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index b6fcbfc6ba..2b12a5312b 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -19,6 +19,12 @@ #include "zend.h" #include "zend_alloc.h" #include "zend_globals.h" +#if HAVE_SIGNAL_H +#include <signal.h> +#endif +#if HAVE_UNISTD_H +#include <unistd.h> +#endif #ifndef ZTS static zend_alloc_globals alloc_globals; @@ -116,7 +122,7 @@ ZEND_API void *_emalloc(size_t size) if (!p) { fprintf(stderr,"FATAL: emalloc(): Unable to allocate %ld bytes\n", (long) size); -#if !(WIN32||WINNT) && ZEND_DEBUG +#if ZEND_DEBUG && HAVE_KILL && HAVE_GETPID kill(getpid(), SIGSEGV); #else exit(1); @@ -226,7 +232,7 @@ ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure) if (!p) { if (!allow_failure) { fprintf(stderr,"FATAL: erealloc(): Unable to allocate %ld bytes\n", (long) size); -#if !(WIN32||WINNT) && ZEND_DEBUG +#if ZEND_DEBUG && HAVE_KILL && HAVE_GETPID kill(getpid(), SIGSEGV); #else exit(1); |