summaryrefslogtreecommitdiff
path: root/compiler.h
Commit message (Collapse)AuthorAgeFilesLines
* Make it possible to use "inline" and "restrict"H. Peter Anvin2008-06-101-2/+14
| | | | | Put the appropriate machinery in place to be able to use the "inline" and "restrict" keywords with appropriate semantics.
* Introduce likely/unlikely macros, use them in saa.cH. Peter Anvin2008-06-101-0/+12
| | | | | | | | Introduce the likely() and unlikely() macros, as used in Linux. They are compiler-dependent hints that a particular boolean expression is likely to be true or false, respectively. Currently only implemented for gcc.
* Use autoconf to detect WORDS_LITTLEENDIANH. Peter Anvin2008-06-081-0/+3
| | | | | | Use autoconf to detect littleendian word order, and use WORDS_LITTLEENDIAN instead of X86_MEMORY when we don't require unaligned memory accesses to be permitted.
* Some compilers define __386__ instead of __i386__H. Peter Anvin2008-02-161-1/+1
| | | | | OpenWatcom, and possibly other compilers from the DOS universe, defines __386__ rather than __i386__.
* regularized spelling of license to match name of LICENSE fileBeroset2007-12-291-1/+1
|
* Address data is int64_t; simplify writing an address objectH. Peter Anvin2007-11-131-0/+11
| | | | | | | Address data is always int64_t even if the size itself is smaller; this was broken on bigendian hosts (still need testing!) Create simple "write sized object" macros.
* Better handling of platforms which hide "extended" functionalityH. Peter Anvin2007-10-261-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.
* Cleaner solution for MinGW handling of __STRICT_ANSI__H. Peter Anvin2007-10-181-0/+5
| | | | If MinGW is detected, undefine __STRICT_ANSI__ in compiler.h instead.
* Define macros necessary for <inttypes.h> on C++H. Peter Anvin2007-10-111-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.
* Use the compiler-provided booleans if available, otherwise emulateH. Peter Anvin2007-10-101-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.
* Use autoconf to request feature macrosH. Peter Anvin2007-10-031-8/+0
|
* Portability fixesH. Peter Anvin2007-10-021-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.)
* Add substitutes for snprintf() and vsnprintf()H. Peter Anvin2007-09-281-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.
* Cleaner way to handle MSVC's _snprintf() underscore damageH. Peter Anvin2007-09-171-0/+10
| | | | | Some versions of MSVC have snprintf() and vsnprintf() only with a leading underscore. Handle that a bit more cleanly.
* AIf we have config.h, we should actually include it!!H. Peter Anvin2007-04-131-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.
* Macroize any compiler-specific code; macros defined in "compiler.h"H. Peter Anvin2007-04-131-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.