| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Put the appropriate machinery in place to be able to use the "inline"
and "restrict" keywords with appropriate semantics.
|
|
|
|
|
|
|
|
| |
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 littleendian word order, and use
WORDS_LITTLEENDIAN instead of X86_MEMORY when we don't require
unaligned memory accesses to be permitted.
|
|
|
|
|
| |
OpenWatcom, and possibly other compilers from the DOS universe,
defines __386__ rather than __i386__.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
If MinGW is detected, undefine __STRICT_ANSI__ in compiler.h instead.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.)
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Some versions of MSVC have snprintf() and vsnprintf() only with a
leading underscore. Handle that a bit more cleanly.
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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.
|