]> git.saurik.com Git - wxWidgets.git/blob - utils/Install/inczip/os2cfg.h
no real changes
[wxWidgets.git] / utils / Install / inczip / os2cfg.h
1 /*---------------------------------------------------------------------------
2 OS/2 specific configuration section:
3 ---------------------------------------------------------------------------*/
4
5 #ifndef __os2cfg_h
6 #define __os2cfg_h
7
8 #ifdef MSDOS
9 # include <dos.h> /* for REGS macro (TC) or _dos_setftime (MSC) */
10 # ifdef __TURBOC__ /* includes Power C */
11 # include <sys/timeb.h> /* for structure ftime */
12 # ifndef __BORLANDC__ /* there appears to be a bug (?) in Borland's */
13 # include <mem.h> /* MEM.H related to __STDC__ and far poin- */
14 # endif /* ters. (dpk) [mem.h included for memcpy] */
15 # endif
16 #endif /* MSDOS */
17
18 #ifdef __IBMC__
19 # define S_IFMT 0xF000
20 # define timezone _timezone /* (underscore names work with */
21 # define tzset _tzset /* all versions of C Set) */
22 # define PIPE_ERROR (errno == EERRSET || errno == EOS2ERR)
23 #endif /* __IBMC__ */
24
25 #ifdef __WATCOMC__
26 # ifdef __386__
27 # ifndef WATCOMC_386
28 # define WATCOMC_386
29 # endif
30 # define __32BIT__
31 # undef far
32 # define far
33 # undef near
34 # define near
35
36 /* Get asm routines to link properly without using "__cdecl": */
37 # ifndef USE_ZLIB
38 # pragma aux crc32 "_*" parm caller [] value [eax] modify [eax]
39 # pragma aux get_crc_table "_*" parm caller [] value [eax] \
40 modify [eax ecx edx]
41 # endif /* !USE_ZLIB */
42 # else /* !__386__ */
43 # ifndef USE_ZLIB
44 # pragma aux crc32 "_*" parm caller [] value [ax dx] \
45 modify [ax cx dx bx]
46 # pragma aux get_crc_table "_*" parm caller [] value [ax] \
47 modify [ax cx dx bx]
48 # endif /* !USE_ZLIB */
49 # endif /* ?__386__ */
50
51 # ifndef EPIPE
52 # define EPIPE -1
53 # endif
54 # define PIPE_ERROR (errno == EPIPE)
55 #endif /* __WATCOMC__ */
56
57 #ifdef __EMX__
58 # ifndef __32BIT__
59 # define __32BIT__
60 # endif
61 # define far
62 #endif
63
64 #ifndef __32BIT__
65 # define __16BIT__
66 #endif
67
68 #ifdef MSDOS
69 # undef MSDOS
70 #endif
71
72 #if defined(M_I86CM) || defined(M_I86LM)
73 # define MED_MEM
74 #endif
75 #if (defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__))
76 # define MED_MEM
77 #endif
78 #ifdef __16BIT__
79 # ifndef MED_MEM
80 # define SMALL_MEM
81 # endif
82 #endif
83
84 #ifdef __16BIT__
85 # if defined(MSC) || defined(__WATCOMC__)
86 # include <malloc.h>
87 # define nearmalloc _nmalloc
88 # define nearfree _nfree
89 # endif
90 # if defined(__TURBOC__) && defined(DYNALLOC_CRCTAB)
91 # if defined(__COMPACT__) || defined(__LARGE__) || defined(__HUGE__)
92 # undef DYNALLOC_CRCTAB
93 # endif
94 # endif
95 # ifndef nearmalloc
96 # define nearmalloc malloc
97 # define nearfree free
98 # endif
99 #endif
100
101 /* TIMESTAMP is now supported on OS/2, so enable it by default */
102 #if (!defined(NOTIMESTAMP) && !defined(TIMESTAMP))
103 # define TIMESTAMP
104 #endif
105
106 /* check that TZ environment variable is defined before using UTC times */
107 #if (!defined(NO_IZ_CHECK_TZ) && !defined(IZ_CHECK_TZ))
108 # define IZ_CHECK_TZ
109 #endif
110
111 #ifndef OS2_EAS
112 # define OS2_EAS /* for -l and -v listings (list.c) */
113 #endif
114
115 #ifdef isupper
116 # undef isupper
117 #endif
118 #ifdef tolower
119 # undef tolower
120 #endif
121 #define isupper(x) IsUpperNLS((unsigned char)(x))
122 #define tolower(x) ToLowerNLS((unsigned char)(x))
123 #define USETHREADID
124
125 /* handlers for OEM <--> ANSI string conversions */
126 #ifndef _OS2_ISO_ANSI
127 /* use home-brewed conversion functions; internal charset is OEM */
128 # ifdef CRTL_CP_IS_ISO
129 # undef CRTL_CP_IS_ISO
130 # endif
131 # ifndef CRTL_CP_IS_OEM
132 # define CRTL_CP_IS_OEM
133 # endif
134 #endif
135
136 #endif /* !__os2cfg_h */