home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / zip22.zip / win32 / osdep.h < prev    next >
C/C++ Source or Header  |  1997-10-26  |  3KB  |  115 lines

  1. /*
  2.  
  3.  Copyright (C) 1990-1997 Mark Adler, Richard B. Wales, Jean-loup Gailly,
  4.  Kai Uwe Rommel, Onno van der Linden and Igor Mandrichenko.
  5.  Permission is granted to any individual or institution to use, copy, or
  6.  redistribute this software so long as all of the original files are included,
  7.  that it is not sold for profit, and that this copyright notice is retained.
  8.  
  9. */
  10.  
  11. /* Automatic setting of the common Microsoft C idenfifier MSC.
  12.  * NOTE: Watcom also defines M_I*86 !
  13.  */
  14. #if defined(_MSC_VER) || (defined(M_I86) && !defined(__WATCOMC__))
  15. #  ifndef MSC
  16. #    define MSC                 /* This should work for older MSC, too!  */
  17. #  endif
  18. #endif
  19.  
  20. #if defined(__WATCOMC__) && defined(__386__)
  21. #  define WATCOMC_386
  22. #endif
  23.  
  24. #ifndef MSDOS
  25. /*
  26.  * Windows 95 (and Windows NT) file systems are (to some extend)
  27.  * extensions of MSDOS. Common features include for example:
  28.  *      FAT or (FAT like) file systems,
  29.  *      '\\' as directory separator in paths,
  30.  *      "\r\n" as record (line) terminator in text files, ...
  31.  */
  32. #  define MSDOS
  33. /* inherit MS-DOS file system etc. stuff */
  34. #endif
  35.  
  36. #define USE_CASE_MAP
  37. #define PROCNAME(n) (action == ADD || action == UPDATE ? wild(n) : procname(n))
  38. #define BROKEN_FSEEK
  39. #define HAVE_FSEEKABLE
  40.  
  41. /* File operations--use "b" for binary if allowed or fixed length 512 on VMS */
  42. #define FOPR "rb"
  43. #define FOPM "r+b"
  44. #define FOPW "wb"
  45.  
  46. #if !defined(NO_EF_UT_TIME) && !defined(USE_EF_UT_TIME)
  47. #  define USE_EF_UT_TIME
  48. #endif
  49. #ifdef __RSXNT__
  50. #  ifndef NO_NTSD_WITH_RSXNT
  51. #    define NO_NTSD_WITH_RSXNT  /* RSXNT windows.h does not yet support NTSD */
  52. #  endif
  53. #else /* !__RSXNT__ */
  54. #  ifndef NTSD_EAS
  55. #    define NTSD_EAS
  56. #  endif
  57. #endif /* ?__RSXNT__ */
  58.  
  59. #ifdef WINDLL
  60. #ifndef NO_ASM
  61. #   define NO_ASM
  62. #endif
  63. #ifndef MSWIN
  64. #   define MSWIN
  65. #endif
  66. #ifndef REENTRANT
  67. #   define REENTRANT
  68. #endif
  69. #   define ZIPERR(errcode, msg) return(ziperr(errcode, msg), (errcode))
  70. #endif
  71.  
  72. /* Enable use of optimized x86 assembler version of longest_match() for
  73.    MSDOS, WIN32 and OS2 per default.  */
  74. #if !defined(NO_ASM) && !defined(ASMV)
  75. #  define ASMV
  76. #endif
  77.  
  78. #if !defined(__GO32__) && !defined(__EMX__)
  79. #  define NO_UNISTD_H
  80. #endif
  81.  
  82. /* Get types and stat */
  83. #include <sys/types.h>
  84. #include <sys/stat.h>
  85. #include <io.h>
  86. #include <malloc.h>
  87.  
  88. #ifdef ZCRYPT_INTERNAL
  89. #  ifdef WINDLL
  90. #    define ZCR_SEED2     (unsigned)3141592654L /* use PI as seed pattern */
  91. #  else
  92. #    include <process.h>        /* getpid() declaration for srand seed */
  93. #  endif
  94. #endif
  95.  
  96. #ifdef __WATCOMC__
  97. #  define NO_MKTEMP
  98. #  define SSTAT stat_bandaid
  99.    int stat_bandaid(const char *path, struct stat *buf);
  100.  
  101. /* Get asm routines to link properly without using "__cdecl": */
  102. #  ifdef __386__
  103. #    ifdef ASMV
  104. #      pragma aux match_init    "_*" parm caller [] modify []
  105. #      pragma aux longest_match "_*" parm caller [] value [eax] \
  106.                                       modify [eax ecx edx]
  107. #    endif
  108. #    if defined(ASM_CRC) && !defined(USE_ZLIB)
  109. #      pragma aux crc32         "_*" parm caller [] value [eax] modify [eax]
  110. #      pragma aux get_crc_table "_*" parm caller [] value [eax] \
  111.                                       modify [eax ecx edx]
  112. #    endif /* ASM_CRC && !USE_ZLIB */
  113. #  endif /* __386__ */
  114. #endif /* __WATCOMC__ */
  115.