Define feature test macros in common.h

This enables necessary functions once for all.

As a consequence, define common.h before any other header.
This commit is contained in:
Romain Vimont
2021-01-08 19:24:51 +01:00
parent 59feb2a15c
commit ab912c23e7
37 changed files with 77 additions and 53 deletions

View File

@@ -1,14 +1,3 @@
// for portability (kill, readlink, strdup, strtok_r)
#define _POSIX_C_SOURCE 200809L
#define _BSD_SOURCE
// modern glibc will complain without this
#define _DEFAULT_SOURCE
#ifdef __APPLE__
# define _DARWIN_C_SOURCE // for strdup(), strtok_r(), memset_pattern4()
#endif
#include "util/process.h"
#include <errno.h>