summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-02 21:53:51 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-02 21:53:51 -0700
commitfe501957c09a80347b1eb005ba1b1bc0fce14b0d (patch)
tree6747b0e256b60819125c652dd58577b12c71556e /lib
parent4a8daf06074351df2588a9f5cd2b4a558bde9935 (diff)
downloadnasm-fe501957c09a80347b1eb005ba1b1bc0fce14b0d.tar.gz
Portability fixes
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.)
Diffstat (limited to 'lib')
-rw-r--r--lib/snprintf.c2
-rw-r--r--lib/vsnprintf.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/snprintf.c b/lib/snprintf.c
index f56a492a..de4d96da 100644
--- a/lib/snprintf.c
+++ b/lib/snprintf.c
@@ -4,6 +4,8 @@
* Implement snprintf() in terms of vsnprintf()
*/
+#include "compiler.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
diff --git a/lib/vsnprintf.c b/lib/vsnprintf.c
index 2c9399a0..976b0eac 100644
--- a/lib/vsnprintf.c
+++ b/lib/vsnprintf.c
@@ -5,6 +5,8 @@
* that don't have them...
*/
+#include "compiler.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>