Skip to content

Commit 093c6dd

Browse files
jmalakPerditionC
authored andcommitted
correct I186 and I386 macros definition
correct I186 and I386 macros definition to work with all Open Watcom toolchain versions command line definition macro has "1" value but in header file it is defined as blank value anyway I86/I186/I386 macros usage is not transparent, it is definition duplicity in header file and on command line it is wrong solution even if it works on most of compilers (command line macro re-definition is hidden)
1 parent 5ecfdd5 commit 093c6dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hdr/portab.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,10 @@ unsigned short getSS(void);
132132
#pragma enable_message(130)
133133

134134
#if _M_IX86 >= 300 || defined(M_I386)
135+
#ifndef I386
135136
#define I386
136137
#endif
138+
#endif
137139

138140
#elif defined (_MYMC68K_COMILER_)
139141

@@ -185,11 +187,15 @@ We might even deal with a pre-ANSI compiler. This will certainly not compile.
185187

186188
#ifdef I86
187189
#if _M_IX86 >= 300 || defined(M_I386)
190+
#ifndef I386
188191
#define I386
192+
#endif
189193
#elif _M_IX86 >= 100 || defined(M_I286)
194+
#ifndef I186
190195
#define I186
191196
#endif
192197
#endif
198+
#endif
193199

194200
#ifdef MC68K
195201
#define far /* No far type */

0 commit comments

Comments
 (0)