C: Handle _POSIX_C_SOURCE macro properly

This commit is contained in:
Issam E. Maghni 2021-05-10 21:27:12 -04:00
parent 31b4b96ebf
commit 539ef77bfa
97 changed files with 393 additions and 5 deletions

View file

@ -1,4 +1,8 @@
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE+0 < 200809L
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>

View file

@ -1,4 +1,8 @@
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE+0 < 200809L
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <stdlib.h>
#include <signal.h>
#include "log.h"

View file

@ -1,4 +1,8 @@
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE+0 < 200809L
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>

View file

@ -1,4 +1,8 @@
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE+0 < 200809L
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <getopt.h>
#include <stdbool.h>
#include <stdlib.h>