summaryrefslogtreecommitdiff
path: root/main/php.h
diff options
context:
space:
mode:
Diffstat (limited to 'main/php.h')
-rw-r--r--main/php.h79
1 files changed, 73 insertions, 6 deletions
diff --git a/main/php.h b/main/php.h
index 1da67b2909..2d22297d3a 100644
--- a/main/php.h
+++ b/main/php.h
@@ -26,7 +26,7 @@
#include <dmalloc.h>
#endif
-#define PHP_API_VERSION 20160303
+#define PHP_API_VERSION 20160731
#define PHP_HAVE_STREAMS
#define YYDEBUG 0
#define PHP_DEFAULT_CHARSET "UTF-8"
@@ -41,13 +41,27 @@
#undef sprintf
#define sprintf php_sprintf
+/* Operating system family defintion */
+#ifdef PHP_WIN32
+# define PHP_OS_FAMILY "Windows"
+#elif defined(BSD) || defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+# define PHP_OS_FAMILY "BSD"
+#elif defined(__APPLE__) || defined(__MACH__)
+# define PHP_OS_FAMILY "OSX"
+#elif defined(__sun__)
+# define PHP_OS_FAMILY "Solaris"
+#elif defined(__linux__)
+# define PHP_OS_FAMILY "Linux"
+#else
+# define PHP_OS_FAMILY "Unknown"
+#endif
+
/* PHP's DEBUG value must match Zend's ZEND_DEBUG value */
#undef PHP_DEBUG
#define PHP_DEBUG ZEND_DEBUG
#ifdef PHP_WIN32
# include "tsrm_win32.h"
-# include "win95nt.h"
# ifdef PHP_EXPORTS
# define PHPAPI __declspec(dllexport)
# else
@@ -66,10 +80,51 @@
# define PHP_EOL "\n"
#endif
-#ifdef NETWARE
-/* For php_get_uname() function */
-#define PHP_UNAME "NetWare"
-#define PHP_OS PHP_UNAME
+/* Windows specific defines */
+#ifdef PHP_WIN32
+# define PHP_PROG_SENDMAIL "Built in mailer"
+# define HAVE_DECLARED_TIMEZONE
+# define WIN32_LEAN_AND_MEAN
+# define NOOPENFILE
+
+# include <io.h>
+# include <malloc.h>
+# include <direct.h>
+# include <stdlib.h>
+# include <stdio.h>
+# include <stdarg.h>
+# include <sys/types.h>
+# include <process.h>
+
+typedef int uid_t;
+typedef int gid_t;
+typedef char * caddr_t;
+typedef unsigned int uint;
+typedef unsigned long ulong;
+# if !NSAPI
+typedef int pid_t;
+# endif
+
+# ifndef PHP_DEBUG
+# ifdef inline
+# undef inline
+# endif
+# define inline __inline
+# endif
+
+# define M_TWOPI (M_PI * 2.0)
+# define off_t _off_t
+
+# define lstat(x, y) php_sys_lstat(x, y)
+# define chdir(path) _chdir(path)
+# define mkdir(a, b) _mkdir(a)
+# define rmdir(a) _rmdir(a)
+# define getpid _getpid
+# define php_sleep(t) SleepEx(t*1000, TRUE)
+
+# ifndef getcwd
+# define getcwd(a, b) _getcwd(a, b)
+# endif
#endif
#if HAVE_ASSERT_H
@@ -126,6 +181,8 @@ PHPAPI size_t php_strlcpy(char *dst, const char *src, size_t siz);
END_EXTERN_C()
#undef strlcpy
#define strlcpy php_strlcpy
+#define HAVE_STRLCPY 1
+#define USE_STRLCPY_PHP_IMPL 1
#endif
#ifndef HAVE_STRLCAT
@@ -134,6 +191,16 @@ PHPAPI size_t php_strlcat(char *dst, const char *src, size_t siz);
END_EXTERN_C()
#undef strlcat
#define strlcat php_strlcat
+#define HAVE_STRLCAT 1
+#define USE_STRLCAT_PHP_IMPL 1
+#endif
+
+#ifndef HAVE_EXPLICIT_BZERO
+BEGIN_EXTERN_C()
+PHPAPI void php_explicit_bzero(void *dst, size_t siz);
+END_EXTERN_C()
+#undef explicit_bzero
+#define explicit_bzero php_explicit_bzero
#endif
#ifndef HAVE_STRTOK_R