mirror of
https://github.com/swaywm/sway.git
synced 2024-11-22 16:01:27 +00:00
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:
parent
827e5513e0
commit
3a310f92ab
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <linux/input-event-codes.h>
|
#include <linux/input-event-codes.h>
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/criteria.h"
|
#include "sway/criteria.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input/input-manager.h"
|
#include "sway/input/input-manager.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input/input-manager.h"
|
#include "sway/input/input-manager.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input/input-manager.h"
|
#include "sway/input/input-manager.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input/input-manager.h"
|
#include "sway/input/input-manager.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/input/input-manager.h"
|
#include "sway/input/input-manager.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/criteria.h"
|
#include "sway/criteria.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/commands.h"
|
#include "sway/commands.h"
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#include "sway/input/input-manager.h"
|
#include "sway/input/input-manager.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <linux/input-event-codes.h>
|
#include <linux/input-event-codes.h>
|
||||||
#elif __FreeBSD__
|
#elif __FreeBSD__
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -38,7 +38,7 @@ void free_workspace_config(struct workspace_config *wsc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prevent_invalid_outer_gaps(struct workspace_config *wsc) {
|
static void prevent_invalid_outer_gaps(struct workspace_config *wsc) {
|
||||||
if (wsc->gaps_outer.top != INT_MIN &&
|
if (wsc->gaps_outer.top != INT_MIN &&
|
||||||
wsc->gaps_outer.top < -wsc->gaps_inner) {
|
wsc->gaps_outer.top < -wsc->gaps_inner) {
|
||||||
wsc->gaps_outer.top = -wsc->gaps_inner;
|
wsc->gaps_outer.top = -wsc->gaps_inner;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#define _POSIX_C_SOURCE 200809L
|
#define _XOPEN_SOURCE 600 // for realpath
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#define _POSIX_C_SOURCE 200809L
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#define _XOPEN_SOURCE 700
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/config.h"
|
#include "sway/config.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#include <linux/input-event-codes.h>
|
#include <linux/input-event-codes.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#define _POSIX_C_SOURCE 199309L
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#define _POSIX_C_SOURCE 200112L
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <pango/pangocairo.h>
|
#include <pango/pangocairo.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "sway/security.h"
|
#include "sway/security.h"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#define _POSIX_C_SOURCE 200112L
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <security/pam_appl.h>
|
#include <security/pam_appl.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _XOPEN_SOURCE 500
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#define _POSIX_C_SOURCE 199506L
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE
|
#define _XOPEN_SOURCE // for crypt
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <shadow.h>
|
#include <shadow.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 700
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#define _POSIX_C_SOURCE 200112L
|
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <wordexp.h>
|
#include <wordexp.h>
|
||||||
|
@ -398,4 +397,3 @@ int swaynag_load_config(char *path, struct swaynag *swaynag, list_t *types) {
|
||||||
fclose(config);
|
fclose(config);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
@ -130,4 +130,3 @@ cleanup:
|
||||||
swaynag_destroy(&swaynag);
|
swaynag_destroy(&swaynag);
|
||||||
return exit_code;
|
return exit_code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#define _XOPEN_SOURCE 500
|
#define _POSIX_C_SOURCE 200809L
|
||||||
#include <getopt.h>
|
#include <getopt.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
Loading…
Reference in a new issue