summaryrefslogtreecommitdiff
path: root/compiler.h
AgeCommit message (Collapse)AuthorFilesLines
2007-10-26Better handling of platforms which hide "extended" functionalityH. Peter Anvin1-5/+21
Some platforms apparently feel -std=c99, which defines __STRICT_ANSI__, should also hide a bunch of function prototypes. This rather sucks. At least try to deal with it. MinGW and DJGPP both have this problem, in particular.
2007-10-18Cleaner solution for MinGW handling of __STRICT_ANSI__H. Peter Anvin1-0/+5
If MinGW is detected, undefine __STRICT_ANSI__ in compiler.h instead.
2007-10-11Define macros necessary for <inttypes.h> on C++H. Peter Anvin1-0/+7
NASM currently doesn't compile with a C++ compiler, but the error messages are sometimes useful. Define macros necessary for <inttypes.h> to work with a C++ compiler.
2007-10-10Use the compiler-provided booleans if available, otherwise emulateH. Peter Anvin1-0/+8
Both C and C++ have "bool", "true" and "false" in lower case; C requires <stdbool.h> for this, in C++ it is an inherent type built into the compiler. Use those instead of the old macros; emulate with a simple typedef enum if unavailable.
2007-10-03Use autoconf to request feature macrosH. Peter Anvin1-8/+0
2007-10-02Portability fixesH. Peter Anvin1-4/+14
Concentrate compiler dependencies to compiler.h; make sure compiler.h is included first in every .c file (since some prototypes may depend on the presence of feature request macros.) Actually use the conditional inclusion of various functions (totally broken in previous releases.)
2007-09-28Add substitutes for snprintf() and vsnprintf()H. Peter Anvin1-5/+16
To deal with fools^Wpeople trying to keep really old systems alive, create a proper framework for substitution functions, and make it possible to deal with the lack of snprintf/vsnprintf in particular.
2007-09-17Cleaner way to handle MSVC's _snprintf() underscore damageH. Peter Anvin1-0/+10
Some versions of MSVC have snprintf() and vsnprintf() only with a leading underscore. Handle that a bit more cleanly.
2007-04-13AIf we have config.h, we should actually include it!!H. Peter Anvin1-2/+6
Apparently configure was generating config.h, and nothing ever actually included it. Include it in nasm.h as well as compiler.h, and in rdoff/rdlar.h which uses these macros. There appears to be no use of HAVE_* macros in any file that doesn't have nasm.h included; in fact, so far the only use has been in rdoff/rdlar.h.
2007-04-13Macroize any compiler-specific code; macros defined in "compiler.h"H. Peter Anvin1-0/+36
Move anything compiler-specific to "compiler.h". There was an unguarded use of __attribute__(()) in outmacho.c; also require gcc 4+ for __builtin_ctlz(). Speed up the open-coded version, too.