summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <RyanDwyer@users.noreply.github.com>2018-11-26 21:25:45 +1000
committerLibravatar GitHub <noreply@github.com>2018-11-26 21:25:45 +1000
commitaf7a97623bf147205abffb7e17d55aca980cbaf1 (patch)
tree033e8758cc4bfc23326fa3cdab86540307241d1c
parentMerge pull request #3191 from emersion/fix-swayidle-busy-dispatch (diff)
parentReplace _XOPEN_SOURCE with _POSIX_C_SOURCE (diff)
downloadsway-af7a97623bf147205abffb7e17d55aca980cbaf1.tar.gz
sway-af7a97623bf147205abffb7e17d55aca980cbaf1.tar.zst
sway-af7a97623bf147205abffb7e17d55aca980cbaf1.zip
Merge pull request #3185 from emersion/remove-xopen-source
Replace _XOPEN_SOURCE with _POSIX_C_SOURCE
-rw-r--r--common/stringop.c2
-rw-r--r--sway/commands/assign.c2
-rw-r--r--sway/commands/bar/bindsym.c1
-rw-r--r--sway/commands/bar/hidden_state.c2
-rw-r--r--sway/commands/bar/icon_theme.c1
-rw-r--r--sway/commands/bar/id.c2
-rw-r--r--sway/commands/bar/mode.c2
-rw-r--r--sway/commands/bar/output.c2
-rw-r--r--sway/commands/bar/separator_symbol.c2
-rw-r--r--sway/commands/bar/tray_output.c1
-rw-r--r--sway/commands/bind.c2
-rw-r--r--sway/commands/exec_always.c2
-rw-r--r--sway/commands/for_window.c1
-rw-r--r--sway/commands/input/xkb_layout.c2
-rw-r--r--sway/commands/input/xkb_model.c2
-rw-r--r--sway/commands/input/xkb_options.c2
-rw-r--r--sway/commands/input/xkb_rules.c2
-rw-r--r--sway/commands/input/xkb_variant.c2
-rw-r--r--sway/commands/mode.c2
-rw-r--r--sway/commands/move.c2
-rw-r--r--sway/commands/no_focus.c1
-rw-r--r--sway/commands/reload.c2
-rw-r--r--sway/commands/rename.c1
-rw-r--r--sway/commands/seat/attach.c2
-rw-r--r--sway/commands/seat/cursor.c2
-rw-r--r--sway/commands/set.c2
-rw-r--r--sway/commands/workspace.c4
-rw-r--r--sway/config.c3
-rw-r--r--sway/config/bar.c1
-rw-r--r--sway/config/input.c2
-rw-r--r--sway/config/output.c2
-rw-r--r--sway/config/seat.c2
-rw-r--r--sway/criteria.c2
-rw-r--r--sway/input/cursor.c2
-rw-r--r--sway/input/input-manager.c2
-rw-r--r--sway/input/seat.c3
-rw-r--r--sway/main.c3
-rw-r--r--sway/security.c2
-rw-r--r--swaybar/bar.c2
-rw-r--r--swaybar/config.c2
-rw-r--r--swaybar/main.c2
-rw-r--r--swaylock/main.c3
-rw-r--r--swaylock/pam.c2
-rw-r--r--swaylock/password.c1
-rw-r--r--swaylock/render.c1
-rw-r--r--swaylock/shadow.c2
-rw-r--r--swaymsg/main.c2
-rw-r--r--swaynag/config.c4
-rw-r--r--swaynag/main.c3
-rw-r--r--swaynag/swaynag.c2
-rw-r--r--swaynag/types.c2
51 files changed, 43 insertions, 59 deletions
diff --git a/common/stringop.c b/common/stringop.c
index d2c91c24..df016e9d 100644
--- a/common/stringop.c
+++ b/common/stringop.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <stdio.h> 3#include <stdio.h>
4#include <string.h> 4#include <string.h>
diff --git a/sway/commands/assign.c b/sway/commands/assign.c
index 04582e88..716d70cf 100644
--- a/sway/commands/assign.c
+++ b/sway/commands/assign.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <stdio.h> 2#include <stdio.h>
3#include <string.h> 3#include <string.h>
4#include "sway/commands.h" 4#include "sway/commands.h"
diff --git a/sway/commands/bar/bindsym.c b/sway/commands/bar/bindsym.c
index 965c8903..e6d6220e 100644
--- a/sway/commands/bar/bindsym.c
+++ b/sway/commands/bar/bindsym.c
@@ -1,4 +1,3 @@
1#define _XOPEN_SOURCE 500
2#include <stdlib.h> 1#include <stdlib.h>
3#include <string.h> 2#include <string.h>
4#include <strings.h> 3#include <strings.h>
diff --git a/sway/commands/bar/hidden_state.c b/sway/commands/bar/hidden_state.c
index 5be6c2dc..79eaf01c 100644
--- a/sway/commands/bar/hidden_state.c
+++ b/sway/commands/bar/hidden_state.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <string.h> 2#include <string.h>
3#include <strings.h> 3#include <strings.h>
4#include "sway/commands.h" 4#include "sway/commands.h"
diff --git a/sway/commands/bar/icon_theme.c b/sway/commands/bar/icon_theme.c
index 44cd3076..0e30409b 100644
--- a/sway/commands/bar/icon_theme.c
+++ b/sway/commands/bar/icon_theme.c
@@ -1,4 +1,3 @@
1#define _XOPEN_SOURCE 500
2#include <string.h> 1#include <string.h>
3#include "sway/commands.h" 2#include "sway/commands.h"
4 3
diff --git a/sway/commands/bar/id.c b/sway/commands/bar/id.c
index 7690a852..35509459 100644
--- a/sway/commands/bar/id.c
+++ b/sway/commands/bar/id.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <string.h> 2#include <string.h>
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "log.h" 4#include "log.h"
diff --git a/sway/commands/bar/mode.c b/sway/commands/bar/mode.c
index 2cba785e..dcaf6da9 100644
--- a/sway/commands/bar/mode.c
+++ b/sway/commands/bar/mode.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <string.h> 2#include <string.h>
3#include <strings.h> 3#include <strings.h>
4#include "sway/commands.h" 4#include "sway/commands.h"
diff --git a/sway/commands/bar/output.c b/sway/commands/bar/output.c
index 72754e05..930d779d 100644
--- a/sway/commands/bar/output.c
+++ b/sway/commands/bar/output.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdbool.h> 2#include <stdbool.h>
3#include <string.h> 3#include <string.h>
4#include "sway/commands.h" 4#include "sway/commands.h"
diff --git a/sway/commands/bar/separator_symbol.c b/sway/commands/bar/separator_symbol.c
index 392ab730..060b8f52 100644
--- a/sway/commands/bar/separator_symbol.c
+++ b/sway/commands/bar/separator_symbol.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <string.h> 2#include <string.h>
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "log.h" 4#include "log.h"
diff --git a/sway/commands/bar/tray_output.c b/sway/commands/bar/tray_output.c
index 6ab16731..e6c77128 100644
--- a/sway/commands/bar/tray_output.c
+++ b/sway/commands/bar/tray_output.c
@@ -1,4 +1,3 @@
1#define _XOPEN_SOURCE 500
2#include <string.h> 1#include <string.h>
3#include "sway/commands.h" 2#include "sway/commands.h"
4 3
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index a9de227f..08acbe7a 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#ifdef __linux__ 2#ifdef __linux__
3#include <linux/input-event-codes.h> 3#include <linux/input-event-codes.h>
4#elif __FreeBSD__ 4#elif __FreeBSD__
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index 7a15709b..9ec28d81 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <stdint.h> 3#include <stdint.h>
4#include <string.h> 4#include <string.h>
diff --git a/sway/commands/for_window.c b/sway/commands/for_window.c
index ac4d6563..7c0f7d7f 100644
--- a/sway/commands/for_window.c
+++ b/sway/commands/for_window.c
@@ -1,4 +1,3 @@
1#define _XOPEN_SOURCE 500
2#include <string.h> 1#include <string.h>
3#include "sway/commands.h" 2#include "sway/commands.h"
4#include "sway/criteria.h" 3#include "sway/criteria.h"
diff --git a/sway/commands/input/xkb_layout.c b/sway/commands/input/xkb_layout.c
index 5fccd4a3..43166401 100644
--- a/sway/commands/input/xkb_layout.c
+++ b/sway/commands/input/xkb_layout.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include "sway/config.h" 2#include "sway/config.h"
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "sway/input/input-manager.h" 4#include "sway/input/input-manager.h"
diff --git a/sway/commands/input/xkb_model.c b/sway/commands/input/xkb_model.c
index c4d04638..066f632b 100644
--- a/sway/commands/input/xkb_model.c
+++ b/sway/commands/input/xkb_model.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include "sway/config.h" 2#include "sway/config.h"
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "sway/input/input-manager.h" 4#include "sway/input/input-manager.h"
diff --git a/sway/commands/input/xkb_options.c b/sway/commands/input/xkb_options.c
index 794ab6e9..09dc4a5c 100644
--- a/sway/commands/input/xkb_options.c
+++ b/sway/commands/input/xkb_options.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include "sway/config.h" 2#include "sway/config.h"
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "sway/input/input-manager.h" 4#include "sway/input/input-manager.h"
diff --git a/sway/commands/input/xkb_rules.c b/sway/commands/input/xkb_rules.c
index 257c3288..d3e576e6 100644
--- a/sway/commands/input/xkb_rules.c
+++ b/sway/commands/input/xkb_rules.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include "sway/config.h" 2#include "sway/config.h"
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "sway/input/input-manager.h" 4#include "sway/input/input-manager.h"
diff --git a/sway/commands/input/xkb_variant.c b/sway/commands/input/xkb_variant.c
index 3832dc8e..2d7581d1 100644
--- a/sway/commands/input/xkb_variant.c
+++ b/sway/commands/input/xkb_variant.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include "sway/config.h" 2#include "sway/config.h"
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "sway/input/input-manager.h" 4#include "sway/input/input-manager.h"
diff --git a/sway/commands/mode.c b/sway/commands/mode.c
index 637ca45e..189e3c1a 100644
--- a/sway/commands/mode.c
+++ b/sway/commands/mode.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdbool.h> 2#include <stdbool.h>
3#include <string.h> 3#include <string.h>
4#include <strings.h> 4#include <strings.h>
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 7d8c1f1a..240b9f04 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <ctype.h> 2#include <ctype.h>
3#include <stdbool.h> 3#include <stdbool.h>
4#include <string.h> 4#include <string.h>
diff --git a/sway/commands/no_focus.c b/sway/commands/no_focus.c
index 61a8de7e..cb81a445 100644
--- a/sway/commands/no_focus.c
+++ b/sway/commands/no_focus.c
@@ -1,4 +1,3 @@
1#define _XOPEN_SOURCE 500
2#include <string.h> 1#include <string.h>
3#include "sway/commands.h" 2#include "sway/commands.h"
4#include "sway/criteria.h" 3#include "sway/criteria.h"
diff --git a/sway/commands/reload.c b/sway/commands/reload.c
index 62105cdc..c64de4bd 100644
--- a/sway/commands/reload.c
+++ b/sway/commands/reload.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <string.h> 2#include <string.h>
3#include "sway/commands.h" 3#include "sway/commands.h"
4#include "sway/config.h" 4#include "sway/config.h"
diff --git a/sway/commands/rename.c b/sway/commands/rename.c
index 0cee9293..29f90d81 100644
--- a/sway/commands/rename.c
+++ b/sway/commands/rename.c
@@ -1,4 +1,3 @@
1#define _XOPEN_SOURCE 500
2#include <ctype.h> 1#include <ctype.h>
3#include <string.h> 2#include <string.h>
4#include <strings.h> 3#include <strings.h>
diff --git a/sway/commands/seat/attach.c b/sway/commands/seat/attach.c
index 6b4bcf1f..8d646c2d 100644
--- a/sway/commands/seat/attach.c
+++ b/sway/commands/seat/attach.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <string.h> 2#include <string.h>
3#include <strings.h> 3#include <strings.h>
4#include "sway/input/input-manager.h" 4#include "sway/input/input-manager.h"
diff --git a/sway/commands/seat/cursor.c b/sway/commands/seat/cursor.c
index 1d41a94e..495c2338 100644
--- a/sway/commands/seat/cursor.c
+++ b/sway/commands/seat/cursor.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#ifdef __linux__ 2#ifdef __linux__
3#include <linux/input-event-codes.h> 3#include <linux/input-event-codes.h>
4#elif __FreeBSD__ 4#elif __FreeBSD__
diff --git a/sway/commands/set.c b/sway/commands/set.c
index be51230b..d912e4fd 100644
--- a/sway/commands/set.c
+++ b/sway/commands/set.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <stdio.h> 2#include <stdio.h>
3#include <string.h> 3#include <string.h>
4#include <strings.h> 4#include <strings.h>
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index 92118ecf..7d32e65b 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <ctype.h> 2#include <ctype.h>
3#include <limits.h> 3#include <limits.h>
4#include <string.h> 4#include <string.h>
@@ -38,7 +38,7 @@ void free_workspace_config(struct workspace_config *wsc) {
38} 38}
39 39
40static void prevent_invalid_outer_gaps(struct workspace_config *wsc) { 40static void prevent_invalid_outer_gaps(struct workspace_config *wsc) {
41 if (wsc->gaps_outer.top != INT_MIN && 41 if (wsc->gaps_outer.top != INT_MIN &&
42 wsc->gaps_outer.top < -wsc->gaps_inner) { 42 wsc->gaps_outer.top < -wsc->gaps_inner) {
43 wsc->gaps_outer.top = -wsc->gaps_inner; 43 wsc->gaps_outer.top = -wsc->gaps_inner;
44 } 44 }
diff --git a/sway/config.c b/sway/config.c
index 675d20e5..ed288060 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -1,5 +1,4 @@
1#define _POSIX_C_SOURCE 200809L 1#define _XOPEN_SOURCE 600 // for realpath
2#define _XOPEN_SOURCE 700
3#include <stdio.h> 2#include <stdio.h>
4#include <stdbool.h> 3#include <stdbool.h>
5#include <stdlib.h> 4#include <stdlib.h>
diff --git a/sway/config/bar.c b/sway/config/bar.c
index 7009d0a0..36e10527 100644
--- a/sway/config/bar.c
+++ b/sway/config/bar.c
@@ -1,5 +1,4 @@
1#define _POSIX_C_SOURCE 200809L 1#define _POSIX_C_SOURCE 200809L
2#define _XOPEN_SOURCE 700
3#include <stdio.h> 2#include <stdio.h>
4#include <stdbool.h> 3#include <stdbool.h>
5#include <stdlib.h> 4#include <stdlib.h>
diff --git a/sway/config/input.c b/sway/config/input.c
index d5d2d90b..d649d34d 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <limits.h> 3#include <limits.h>
4#include <float.h> 4#include <float.h>
diff --git a/sway/config/output.c b/sway/config/output.c
index 07543e3c..75309289 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <assert.h> 2#include <assert.h>
3#include <stdbool.h> 3#include <stdbool.h>
4#include <string.h> 4#include <string.h>
diff --git a/sway/config/seat.c b/sway/config/seat.c
index 46456caf..56fa6095 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <string.h> 3#include <string.h>
4#include "sway/config.h" 4#include "sway/config.h"
diff --git a/sway/criteria.c b/sway/criteria.c
index 3393852c..54583b04 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <stdio.h> 3#include <stdio.h>
4#include <stdbool.h> 4#include <stdbool.h>
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index d89f64d8..14e25726 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <math.h> 2#include <math.h>
3#ifdef __linux__ 3#ifdef __linux__
4#include <linux/input-event-codes.h> 4#include <linux/input-event-codes.h>
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index 68445d68..89146d5b 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <ctype.h> 2#include <ctype.h>
3#include <float.h> 3#include <float.h>
4#include <limits.h> 4#include <limits.h>
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 663c5140..53fb2ed7 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1,5 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#define _POSIX_C_SOURCE 199309L
3#include <assert.h> 2#include <assert.h>
4#include <errno.h> 3#include <errno.h>
5#ifdef __linux__ 4#ifdef __linux__
diff --git a/sway/main.c b/sway/main.c
index 920cea11..a21970e2 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -1,5 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#define _POSIX_C_SOURCE 200112L
3#include <getopt.h> 2#include <getopt.h>
4#include <pango/pangocairo.h> 3#include <pango/pangocairo.h>
5#include <signal.h> 4#include <signal.h>
diff --git a/sway/security.c b/sway/security.c
index cc0d3f66..6a00229e 100644
--- a/sway/security.c
+++ b/sway/security.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <string.h> 3#include <string.h>
4#include "sway/security.h" 4#include "sway/security.h"
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 2178f542..47c89a39 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <assert.h> 2#include <assert.h>
3#include <errno.h> 3#include <errno.h>
4#include <fcntl.h> 4#include <fcntl.h>
diff --git a/swaybar/config.c b/swaybar/config.c
index 0ab346b1..16febb2e 100644
--- a/swaybar/config.c
+++ b/swaybar/config.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <string.h> 3#include <string.h>
4#include <wlr/util/log.h> 4#include <wlr/util/log.h>
diff --git a/swaybar/main.c b/swaybar/main.c
index 2672abef..06238c62 100644
--- a/swaybar/main.c
+++ b/swaybar/main.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdio.h> 2#include <stdio.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
diff --git a/swaylock/main.c b/swaylock/main.c
index 9b74b671..50f145e3 100644
--- a/swaylock/main.c
+++ b/swaylock/main.c
@@ -1,5 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#define _POSIX_C_SOURCE 200112L
3#include <assert.h> 2#include <assert.h>
4#include <ctype.h> 3#include <ctype.h>
5#include <errno.h> 4#include <errno.h>
diff --git a/swaylock/pam.c b/swaylock/pam.c
index cac95a85..b90d9e87 100644
--- a/swaylock/pam.c
+++ b/swaylock/pam.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <pwd.h> 2#include <pwd.h>
3#include <security/pam_appl.h> 3#include <security/pam_appl.h>
4#include <stdbool.h> 4#include <stdbool.h>
diff --git a/swaylock/password.c b/swaylock/password.c
index 6138e1fe..db8ecaeb 100644
--- a/swaylock/password.c
+++ b/swaylock/password.c
@@ -1,4 +1,3 @@
1#define _XOPEN_SOURCE 500
2#include <assert.h> 1#include <assert.h>
3#include <errno.h> 2#include <errno.h>
4#include <pwd.h> 3#include <pwd.h>
diff --git a/swaylock/render.c b/swaylock/render.c
index fa8832bd..cbd5d01d 100644
--- a/swaylock/render.c
+++ b/swaylock/render.c
@@ -1,4 +1,3 @@
1#define _POSIX_C_SOURCE 199506L
2#include <math.h> 1#include <math.h>
3#include <stdlib.h> 2#include <stdlib.h>
4#include <wayland-client.h> 3#include <wayland-client.h>
diff --git a/swaylock/shadow.c b/swaylock/shadow.c
index f928eaa3..b7b10a67 100644
--- a/swaylock/shadow.c
+++ b/swaylock/shadow.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 1#define _XOPEN_SOURCE // for crypt
2#include <pwd.h> 2#include <pwd.h>
3#include <shadow.h> 3#include <shadow.h>
4#include <stdbool.h> 4#include <stdbool.h>
diff --git a/swaymsg/main.c b/swaymsg/main.c
index 243b5fdc..e640cadf 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdio.h> 2#include <stdio.h>
3#include <stdlib.h> 3#include <stdlib.h>
4#include <string.h> 4#include <string.h>
diff --git a/swaynag/config.c b/swaynag/config.c
index cd34dcc2..63808ce4 100644
--- a/swaynag/config.c
+++ b/swaynag/config.c
@@ -1,5 +1,4 @@
1#define _XOPEN_SOURCE 700 1#define _POSIX_C_SOURCE 200809L
2#define _POSIX_C_SOURCE 200112L
3#include <getopt.h> 2#include <getopt.h>
4#include <stdlib.h> 3#include <stdlib.h>
5#include <wordexp.h> 4#include <wordexp.h>
@@ -398,4 +397,3 @@ int swaynag_load_config(char *path, struct swaynag *swaynag, list_t *types) {
398 fclose(config); 397 fclose(config);
399 return 0; 398 return 0;
400} 399}
401
diff --git a/swaynag/main.c b/swaynag/main.c
index bae3c0e2..9f00ac7e 100644
--- a/swaynag/main.c
+++ b/swaynag/main.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <signal.h> 3#include <signal.h>
4#include "log.h" 4#include "log.h"
@@ -130,4 +130,3 @@ cleanup:
130 swaynag_destroy(&swaynag); 130 swaynag_destroy(&swaynag);
131 return exit_code; 131 return exit_code;
132} 132}
133
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c
index 06185f20..74e127b6 100644
--- a/swaynag/swaynag.c
+++ b/swaynag/swaynag.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <stdlib.h> 2#include <stdlib.h>
3#include <assert.h> 3#include <assert.h>
4#include <sys/stat.h> 4#include <sys/stat.h>
diff --git a/swaynag/types.c b/swaynag/types.c
index 1e0a138b..129644b7 100644
--- a/swaynag/types.c
+++ b/swaynag/types.c
@@ -1,4 +1,4 @@
1#define _XOPEN_SOURCE 500 1#define _POSIX_C_SOURCE 200809L
2#include <getopt.h> 2#include <getopt.h>
3#include <stdbool.h> 3#include <stdbool.h>
4#include <stdlib.h> 4#include <stdlib.h>