diff options
author | Guy Harris <guy@alum.mit.edu> | 2017-09-30 15:30:33 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2017-09-30 15:30:33 -0700 |
commit | b0df8f30fe522088344f81ff1e5b45ec034acbc0 (patch) | |
tree | 12c3c6c6c8214dbf19a555cfa47fecd8a2c111d3 | |
parent | edd9fb622ac112438e0631ebf5ae054099c208f0 (diff) |
If we're going to use FILE *, we need to include <stdio.h> first.
-rw-r--r-- | portability.h | 7 |
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); |