aboutsummaryrefslogtreecommitdiff
path: root/portability.h
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-09-30 15:30:33 -0700
committerGuy Harris <guy@alum.mit.edu>2017-09-30 15:30:33 -0700
commitb0df8f30fe522088344f81ff1e5b45ec034acbc0 (patch)
tree12c3c6c6c8214dbf19a555cfa47fecd8a2c111d3 /portability.h
parentedd9fb622ac112438e0631ebf5ae054099c208f0 (diff)
If we're going to use FILE *, we need to include <stdio.h> first.
Diffstat (limited to 'portability.h')
-rw-r--r--portability.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/portability.h b/portability.h
index 241acc17..3531fdca 100644
--- a/portability.h
+++ b/portability.h
@@ -99,6 +99,13 @@ extern "C" {
#endif
#define setbuf(x, y) \
setvbuf((x), (y), _IONBF, 0)
+
+ /*
+ * Make fopen() call a wrapper that calls fopen_s(), to squelch
+ * warnings.
+ */
+ #include <stdio.h>
+
#define fopen(x, y) \
fopen_safe((x), (y))
FILE *fopen_safe(const char *filename, const char* mode);