home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 15 / AACD15.ISO / AACD / Magazine / HomeAutomation / Apache / include / php / main / win95nt.h < prev   
Encoding:
C/C++ Source or Header  |  2000-03-11  |  1.8 KB  |  74 lines

  1. /* Defines and types for Windows 95/NT */
  2. #define HAVE_DECLARED_TIMEZONE
  3. #define WIN32_LEAN_AND_MEAN
  4. #include <io.h>
  5. #include <malloc.h>
  6. #include <direct.h>
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. #include <stdarg.h>
  10. #include <sys/types.h>
  11. typedef int uid_t;
  12. typedef int gid_t;
  13. typedef int mode_t;
  14. typedef char * caddr_t;
  15. #define lstat(x, y) stat(x, y)
  16. #define        _IFIFO    0010000    /* fifo */
  17. #define        _IFBLK    0060000    /* block special */
  18. #define        _IFLNK    0120000    /* symbolic link */
  19. #define S_IFIFO        _IFIFO
  20. #define S_IFBLK        _IFBLK
  21. #define    S_IFLNK        _IFLNK
  22. #define pclose(a)        _pclose(a)
  23. #define popen(a, b)        _popen(a, b)
  24. #define chdir(path) SetCurrentDirectory(path)
  25. #define mkdir(a,b)    _mkdir(a)
  26. #define rmdir(a)    _rmdir(a)
  27. #define getpid        _getpid
  28. #define php_sleep(t)    Sleep(t*1000)
  29. #define getcwd(a, b)        _getcwd(a, b)
  30. #define snprintf    _snprintf
  31. #define off_t        _off_t
  32. #define vsnprintf    _vsnprintf
  33. typedef unsigned int uint;
  34. typedef unsigned long ulong;
  35. #if !NSAPI
  36. #define strcasecmp(s1, s2) stricmp(s1, s2)
  37. #define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
  38. typedef long pid_t;
  39. #endif
  40.  
  41. /* missing in vc5 math.h */
  42. #define M_PI             3.14159265358979323846
  43. #define M_TWOPI         (M_PI * 2.0)
  44. #define M_PI_2           1.57079632679489661923
  45. #define M_PI_4           0.78539816339744830962
  46.  
  47. #if !PHP_DEBUG
  48. #ifdef inline
  49. #undef inline
  50. #endif
  51. #define inline  __inline
  52. #endif
  53.  
  54. /* General Windows stuff */
  55. #define WINDOWS 1
  56.  
  57. /* Prevent use of VC5 OpenFile function */
  58. #define NOOPENFILE
  59.  
  60. /* sendmail is built-in */
  61. #ifdef PHP_PROG_SENDMAIL
  62. #undef PHP_PROG_SENDMAIL
  63. #define PHP_PROG_SENDMAIL "Built in mailer"
  64. #endif
  65.  
  66. #define CONVERT_TO_WIN_FS(Filename)             \
  67. {                                                   \
  68.     char *stemp;                                   \
  69.     if (Filename)                                \
  70.         for (stemp = Filename; *stemp; stemp++) \
  71.             if ( *stemp    == '/')                    \
  72.                 *stemp = '\\';                    \
  73. }                                     
  74.