win95nt.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2016 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. /* Defines and types for Windows 95/NT */
  20. #define HAVE_DECLARED_TIMEZONE
  21. #define WIN32_LEAN_AND_MEAN
  22. #include <io.h>
  23. #include <malloc.h>
  24. #include <direct.h>
  25. #include <stdlib.h>
  26. #include <stdio.h>
  27. #include <stdarg.h>
  28. #include <sys/types.h>
  29. #include <process.h>
  30. typedef int uid_t;
  31. typedef int gid_t;
  32. typedef char * caddr_t;
  33. #define lstat(x, y) php_sys_lstat(x, y)
  34. #define _IFIFO 0010000 /* fifo */
  35. #define _IFBLK 0060000 /* block special */
  36. #define _IFLNK 0120000 /* symbolic link */
  37. #define S_IFIFO _IFIFO
  38. #define S_IFBLK _IFBLK
  39. #define S_IFLNK _IFLNK
  40. #ifndef S_ISREG
  41. #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
  42. #endif
  43. #define chdir(path) _chdir(path)
  44. #define mkdir(a, b) _mkdir(a)
  45. #define rmdir(a) _rmdir(a)
  46. #define getpid _getpid
  47. #define php_sleep(t) SleepEx(t*1000, TRUE)
  48. #ifndef getcwd
  49. # define getcwd(a, b) _getcwd(a, b)
  50. #endif
  51. #define off_t _off_t
  52. typedef unsigned int uint;
  53. typedef unsigned long ulong;
  54. #if !NSAPI
  55. typedef long pid_t;
  56. #endif
  57. /* missing in vc5 math.h */
  58. #define M_PI 3.14159265358979323846
  59. #define M_TWOPI (M_PI * 2.0)
  60. #define M_PI_2 1.57079632679489661923
  61. #ifndef M_PI_4
  62. #define M_PI_4 0.78539816339744830962
  63. #endif
  64. #if !defined(PHP_DEBUG)
  65. #ifdef inline
  66. #undef inline
  67. #endif
  68. #define inline __inline
  69. #endif
  70. /* General Windows stuff */
  71. #ifndef WINDOWS
  72. # define WINDOWS 1
  73. #endif
  74. /* Prevent use of VC5 OpenFile function */
  75. #define NOOPENFILE
  76. /* sendmail is built-in */
  77. #ifdef PHP_PROG_SENDMAIL
  78. #undef PHP_PROG_SENDMAIL
  79. #define PHP_PROG_SENDMAIL "Built in mailer"
  80. #endif