Eliminate win95nt.h

- Most of this is builtin php.h now
- Removed some dead defines
- We now pass /D _USE_MATH_DEFINES for M_PI etc
This commit is contained in:
Kalle Sommer Nielsen 2016-12-22 06:51:18 +01:00
parent a569d003e2
commit d4831e2d0a
5 changed files with 50 additions and 85 deletions

View file

@ -47,7 +47,6 @@
#ifdef PHP_WIN32
# include "tsrm_win32.h"
# include "win95nt.h"
# ifdef PHP_EXPORTS
# define PHPAPI __declspec(dllexport)
# else
@ -66,6 +65,53 @@
# define PHP_EOL "\n"
#endif
/* 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
#if PHP_DEBUG
#undef NDEBUG