Replace _XOPEN_SOURCE with _POSIX_C_SOURCE

And make sure we don't define both in the same source file.
This commit is contained in:
emersion 2018-11-25 12:12:48 +01:00
parent b0b20a8e1f
commit 8191c2147b
5 changed files with 3 additions and 6 deletions

3
main.c
View File

@ -1,5 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200112L
#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <ctype.h>
#include <errno.h>

2
pam.c
View File

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <pwd.h>
#include <security/pam_appl.h>
#include <stdbool.h>

View File

@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 500
#include <assert.h>
#include <errno.h>
#include <pwd.h>

View File

@ -1,4 +1,3 @@
#define _POSIX_C_SOURCE 199506L
#include <math.h>
#include <stdlib.h>
#include <wayland-client.h>

View File

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE
#define _XOPEN_SOURCE // for crypt
#include <pwd.h>
#include <shadow.h>
#include <stdbool.h>