]> granicus.if.org Git - php/commitdiff
*** empty log message ***
authorZeev Suraski <zeev@php.net>
Fri, 9 Jul 1999 11:19:38 +0000 (11:19 +0000)
committerZeev Suraski <zeev@php.net>
Fri, 9 Jul 1999 11:19:38 +0000 (11:19 +0000)
Zend/config.w32.h
Zend/configure.in
Zend/zend_alloc.c

index 358f7d0b54cb6814065be2da533e04580517ab32..3dee0b66760e91ac4079818075d896f480a9fd60 100644 (file)
@@ -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 */
index 539774c44db6df60f85b9ca05b680209f0684d3b..b0217eb04c806ef94327f2ad9354a4640ddf8c6f 100644 (file)
@@ -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
index b6fcbfc6bac12fdabf427d6edd81a0c64de29f17..2b12a5312baed69f6387cefc6d893bd9d4e06597 100644 (file)
 #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);