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 <assert.h>
#include <errno.h>
#include <fcntl.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 <string.h>
#include "swaybar/config.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 <json.h>
#include <linux/input-event-codes.h>
#include <ctype.h>

View file

@ -1,4 +1,8 @@
#define _POSIX_C_SOURCE 200809
#if !defined(_POSIX_C_SOURCE) || _POSIX_C_SOURCE+0 < 200809L
#undef _POSIX_C_SOURCE
#define _POSIX_C_SOURCE 200809L
#endif
#include <limits.h>
#include <poll.h>
#include <stdio.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 <stdio.h>
#include <stdlib.h>
#include <string.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 <assert.h>
#include <linux/input-event-codes.h>
#include <limits.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 <assert.h>
#include <fcntl.h>
#include <sys/ioctl.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 <stdbool.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 <ctype.h>
#include <dirent.h>
#include <stdbool.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 <arpa/inet.h>
#include <cairo.h>
#include <limits.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 <stdbool.h>
#include <stddef.h>
#include <stdio.h>