summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-02-16 15:17:18 +0100
committerKirill Primak <vyivel@eclair.cafe>2024-02-23 17:43:19 +0300
commitfc640d5f6c82883c35e90a64f0098486e6091293 (patch)
tree654d9fb88fb1885088a6638169bff592b8bd0bc0
parent07b059852673cd9e148c2adfc6bb4f8a0d0ff315 (diff)
Define _POSIX_C_SOURCE globally
See discussion in https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4555
-rw-r--r--client/pool-buffer.c1
-rw-r--r--common/gesture.c1
-rw-r--r--common/ipc-client.c1
-rw-r--r--common/log.c1
-rw-r--r--common/loop.c1
-rw-r--r--common/stringop.c1
-rw-r--r--common/util.c1
-rw-r--r--meson.build1
-rw-r--r--sway/commands.c1
-rw-r--r--sway/commands/assign.c1
-rw-r--r--sway/commands/bar.c1
-rw-r--r--sway/commands/bar/font.c1
-rw-r--r--sway/commands/bar/hidden_state.c1
-rw-r--r--sway/commands/bar/icon_theme.c1
-rw-r--r--sway/commands/bar/id.c1
-rw-r--r--sway/commands/bar/mode.c1
-rw-r--r--sway/commands/bar/output.c1
-rw-r--r--sway/commands/bar/position.c1
-rw-r--r--sway/commands/bar/separator_symbol.c1
-rw-r--r--sway/commands/bar/tray_output.c1
-rw-r--r--sway/commands/bind.c1
-rw-r--r--sway/commands/exec_always.c1
-rw-r--r--sway/commands/font.c1
-rw-r--r--sway/commands/gesture.c1
-rw-r--r--sway/commands/input/calibration_matrix.c1
-rw-r--r--sway/commands/input/map_from_region.c1
-rw-r--r--sway/commands/input/map_to_output.c1
-rw-r--r--sway/commands/input/map_to_region.c1
-rw-r--r--sway/commands/input/xkb_file.c1
-rw-r--r--sway/commands/input/xkb_layout.c1
-rw-r--r--sway/commands/input/xkb_model.c1
-rw-r--r--sway/commands/input/xkb_numlock.c1
-rw-r--r--sway/commands/input/xkb_options.c1
-rw-r--r--sway/commands/input/xkb_rules.c1
-rw-r--r--sway/commands/input/xkb_switch_layout.c1
-rw-r--r--sway/commands/input/xkb_variant.c1
-rw-r--r--sway/commands/mark.c1
-rw-r--r--sway/commands/mode.c1
-rw-r--r--sway/commands/move.c1
-rw-r--r--sway/commands/output/background.c1
-rw-r--r--sway/commands/reload.c1
-rw-r--r--sway/commands/seat/attach.c1
-rw-r--r--sway/commands/seat/cursor.c1
-rw-r--r--sway/commands/seat/hide_cursor.c1
-rw-r--r--sway/commands/seat/idle.c1
-rw-r--r--sway/commands/seat/xcursor_theme.c1
-rw-r--r--sway/commands/set.c1
-rw-r--r--sway/commands/show_marks.c1
-rw-r--r--sway/commands/swap.c1
-rw-r--r--sway/commands/title_format.c1
-rw-r--r--sway/commands/unmark.c1
-rw-r--r--sway/commands/workspace.c1
-rw-r--r--sway/config.c1
-rw-r--r--sway/config/bar.c1
-rw-r--r--sway/config/input.c1
-rw-r--r--sway/config/output.c1
-rw-r--r--sway/config/seat.c1
-rw-r--r--sway/criteria.c1
-rw-r--r--sway/desktop/launcher.c1
-rw-r--r--sway/desktop/output.c1
-rw-r--r--sway/desktop/transaction.c1
-rw-r--r--sway/desktop/xdg_shell.c1
-rw-r--r--sway/desktop/xwayland.c1
-rw-r--r--sway/input/cursor.c1
-rw-r--r--sway/input/input-manager.c1
-rw-r--r--sway/input/seat.c1
-rw-r--r--sway/input/seatop_default.c1
-rw-r--r--sway/input/seatop_down.c1
-rw-r--r--sway/input/seatop_move_floating.c1
-rw-r--r--sway/input/seatop_move_tiling.c1
-rw-r--r--sway/input/seatop_resize_floating.c1
-rw-r--r--sway/input/seatop_resize_tiling.c1
-rw-r--r--sway/input/tablet.c1
-rw-r--r--sway/ipc-server.c1
-rw-r--r--sway/lock.c1
-rw-r--r--sway/main.c1
-rw-r--r--sway/server.c1
-rw-r--r--sway/sway_text_node.c1
-rw-r--r--sway/swaynag.c1
-rw-r--r--sway/tree/arrange.c1
-rw-r--r--sway/tree/container.c1
-rw-r--r--sway/tree/node.c1
-rw-r--r--sway/tree/output.c1
-rw-r--r--sway/tree/root.c1
-rw-r--r--sway/tree/view.c1
-rw-r--r--sway/tree/workspace.c1
-rw-r--r--swaybar/bar.c1
-rw-r--r--swaybar/config.c1
-rw-r--r--swaybar/i3bar.c1
-rw-r--r--swaybar/ipc.c1
-rw-r--r--swaybar/main.c1
-rw-r--r--swaybar/render.c1
-rw-r--r--swaybar/status_line.c1
-rw-r--r--swaybar/tray/host.c1
-rw-r--r--swaybar/tray/icon.c1
-rw-r--r--swaybar/tray/item.c1
-rw-r--r--swaybar/tray/watcher.c1
-rw-r--r--swaymsg/main.c1
-rw-r--r--swaynag/config.c1
-rw-r--r--swaynag/main.c1
-rw-r--r--swaynag/swaynag.c1
-rw-r--r--swaynag/types.c1
102 files changed, 2 insertions, 100 deletions
diff --git a/client/pool-buffer.c b/client/pool-buffer.c
index 3546b8971..c47c40ebc 100644
--- a/client/pool-buffer.c
+++ b/client/pool-buffer.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809
#include <assert.h>
#include <cairo.h>
#include <errno.h>
diff --git a/common/gesture.c b/common/gesture.c
index 58170443d..272aa8374 100644
--- a/common/gesture.c
+++ b/common/gesture.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "gesture.h"
#include <math.h>
diff --git a/common/ipc-client.c b/common/ipc-client.c
index d30212d25..a0be2b2d9 100644
--- a/common/ipc-client.c
+++ b/common/ipc-client.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
diff --git a/common/log.c b/common/log.c
index 483420e7f..3eacdb346 100644
--- a/common/log.c
+++ b/common/log.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200112L
#include <signal.h>
#include <stdarg.h>
#include <stdio.h>
diff --git a/common/loop.c b/common/loop.c
index 80fe18eae..b99c6d55c 100644
--- a/common/loop.c
+++ b/common/loop.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200112L
#include <limits.h>
#include <string.h>
#include <stdbool.h>
diff --git a/common/stringop.c b/common/stringop.c
index c503143ae..16d04917e 100644
--- a/common/stringop.c
+++ b/common/stringop.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <stdarg.h>
#include <stdbool.h>
diff --git a/common/util.c b/common/util.c
index 5d4c0673d..7c492bcbf 100644
--- a/common/util.c
+++ b/common/util.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <fcntl.h>
#include <math.h>
diff --git a/meson.build b/meson.build
index f8bf4f80d..1043e4ba9 100644
--- a/meson.build
+++ b/meson.build
@@ -14,6 +14,7 @@ project(
add_project_arguments(
[
'-DWLR_USE_UNSTABLE',
+ '-D_POSIX_C_SOURCE=200809L',
'-Wno-unused-parameter',
'-Wno-unused-result',
diff --git a/sway/commands.c b/sway/commands.c
index 6becf3c85..8d003dfa6 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809
#include <ctype.h>
#include <stdarg.h>
#include <stdlib.h>
diff --git a/sway/commands/assign.c b/sway/commands/assign.c
index f7d911f77..bf95cf002 100644
--- a/sway/commands/assign.c
+++ b/sway/commands/assign.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <string.h>
#include "sway/commands.h"
diff --git a/sway/commands/bar.c b/sway/commands/bar.c
index 22756acbf..635e895be 100644
--- a/sway/commands/bar.c
+++ b/sway/commands/bar.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809
#include <stdio.h>
#include <string.h>
#include <strings.h>
diff --git a/sway/commands/bar/font.c b/sway/commands/bar/font.c
index 891c87af8..0c074679a 100644
--- a/sway/commands/bar/font.c
+++ b/sway/commands/bar/font.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/hidden_state.c b/sway/commands/bar/hidden_state.c
index 8b661e3a1..7b38831e4 100644
--- a/sway/commands/bar/hidden_state.c
+++ b/sway/commands/bar/hidden_state.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/commands.h"
diff --git a/sway/commands/bar/icon_theme.c b/sway/commands/bar/icon_theme.c
index 6ac07843d..fee217099 100644
--- a/sway/commands/bar/icon_theme.c
+++ b/sway/commands/bar/icon_theme.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "config.h"
#include "sway/commands.h"
diff --git a/sway/commands/bar/id.c b/sway/commands/bar/id.c
index a9a617430..46cf4ca9a 100644
--- a/sway/commands/bar/id.c
+++ b/sway/commands/bar/id.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/mode.c b/sway/commands/bar/mode.c
index 7c2f423bb..d69e910bf 100644
--- a/sway/commands/bar/mode.c
+++ b/sway/commands/bar/mode.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/commands.h"
diff --git a/sway/commands/bar/output.c b/sway/commands/bar/output.c
index cac1d0568..51730176d 100644
--- a/sway/commands/bar/output.c
+++ b/sway/commands/bar/output.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <string.h>
#include "sway/commands.h"
diff --git a/sway/commands/bar/position.c b/sway/commands/bar/position.c
index b207de0bf..94f530ecd 100644
--- a/sway/commands/bar/position.c
+++ b/sway/commands/bar/position.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/commands.h"
diff --git a/sway/commands/bar/separator_symbol.c b/sway/commands/bar/separator_symbol.c
index 6737d4d24..50e9a873d 100644
--- a/sway/commands/bar/separator_symbol.c
+++ b/sway/commands/bar/separator_symbol.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/tray_output.c b/sway/commands/bar/tray_output.c
index eb3b486e2..679facf7a 100644
--- a/sway/commands/bar/tray_output.c
+++ b/sway/commands/bar/tray_output.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "config.h"
#include "sway/commands.h"
diff --git a/sway/commands/bind.c b/sway/commands/bind.c
index 979e178fd..268f28553 100644
--- a/sway/commands/bind.c
+++ b/sway/commands/bind.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <libevdev/libevdev.h>
#include <linux/input-event-codes.h>
#include <string.h>
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index 8fca19093..8bc1048cd 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
diff --git a/sway/commands/font.c b/sway/commands/font.c
index 74bb6b9f4..9920d03eb 100644
--- a/sway/commands/font.c
+++ b/sway/commands/font.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/gesture.c b/sway/commands/gesture.c
index d4442cc35..90a20716d 100644
--- a/sway/commands/gesture.c
+++ b/sway/commands/gesture.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "gesture.h"
diff --git a/sway/commands/input/calibration_matrix.c b/sway/commands/input/calibration_matrix.c
index 38749fbb9..53fe2c35e 100644
--- a/sway/commands/input/calibration_matrix.c
+++ b/sway/commands/input/calibration_matrix.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/config.h"
diff --git a/sway/commands/input/map_from_region.c b/sway/commands/input/map_from_region.c
index 4400e111c..2f8f753db 100644
--- a/sway/commands/input/map_from_region.c
+++ b/sway/commands/input/map_from_region.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <string.h>
#include <strings.h>
diff --git a/sway/commands/input/map_to_output.c b/sway/commands/input/map_to_output.c
index f60fb7d57..a7266baac 100644
--- a/sway/commands/input/map_to_output.c
+++ b/sway/commands/input/map_to_output.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/config.h"
diff --git a/sway/commands/input/map_to_region.c b/sway/commands/input/map_to_region.c
index ad535db23..9087c5898 100644
--- a/sway/commands/input/map_to_region.c
+++ b/sway/commands/input/map_to_region.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <string.h>
#include "sway/commands.h"
diff --git a/sway/commands/input/xkb_file.c b/sway/commands/input/xkb_file.c
index 493f94fbd..056f00e52 100644
--- a/sway/commands/input/xkb_file.c
+++ b/sway/commands/input/xkb_file.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <unistd.h>
#include <errno.h>
#include "sway/config.h"
diff --git a/sway/commands/input/xkb_layout.c b/sway/commands/input/xkb_layout.c
index 226265175..1d01886c3 100644
--- a/sway/commands/input/xkb_layout.c
+++ b/sway/commands/input/xkb_layout.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/input/xkb_model.c b/sway/commands/input/xkb_model.c
index f4a33de3e..a9144a8a7 100644
--- a/sway/commands/input/xkb_model.c
+++ b/sway/commands/input/xkb_model.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/input/xkb_numlock.c b/sway/commands/input/xkb_numlock.c
index 87d3e60c1..bbe848fe1 100644
--- a/sway/commands/input/xkb_numlock.c
+++ b/sway/commands/input/xkb_numlock.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "util.h"
diff --git a/sway/commands/input/xkb_options.c b/sway/commands/input/xkb_options.c
index d609293f7..7ca20777b 100644
--- a/sway/commands/input/xkb_options.c
+++ b/sway/commands/input/xkb_options.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/input/xkb_rules.c b/sway/commands/input/xkb_rules.c
index 3b59622c4..8fbd26fbe 100644
--- a/sway/commands/input/xkb_rules.c
+++ b/sway/commands/input/xkb_rules.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/input/xkb_switch_layout.c b/sway/commands/input/xkb_switch_layout.c
index 3cce4ec8d..ecac8e6c2 100644
--- a/sway/commands/input/xkb_switch_layout.c
+++ b/sway/commands/input/xkb_switch_layout.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <wlr/interfaces/wlr_keyboard.h>
#include "sway/config.h"
diff --git a/sway/commands/input/xkb_variant.c b/sway/commands/input/xkb_variant.c
index d0e21d778..2d14ea9c7 100644
--- a/sway/commands/input/xkb_variant.c
+++ b/sway/commands/input/xkb_variant.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/mark.c b/sway/commands/mark.c
index 30cf458c7..2bfc86b30 100644
--- a/sway/commands/mark.c
+++ b/sway/commands/mark.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/mode.c b/sway/commands/mode.c
index 7263efcba..b32169679 100644
--- a/sway/commands/mode.c
+++ b/sway/commands/mode.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <string.h>
#include "sway/commands.h"
diff --git a/sway/commands/move.c b/sway/commands/move.c
index 69ed06c0b..bcbdaa2dd 100644
--- a/sway/commands/move.c
+++ b/sway/commands/move.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <math.h>
#include <stdbool.h>
diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c
index d691295f4..55bd7671f 100644
--- a/sway/commands/output/background.c
+++ b/sway/commands/output/background.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <libgen.h>
#include <stdio.h>
#include <string.h>
diff --git a/sway/commands/reload.c b/sway/commands/reload.c
index 82967ca7f..6c0aac261 100644
--- a/sway/commands/reload.c
+++ b/sway/commands/reload.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/seat/attach.c b/sway/commands/seat/attach.c
index 00bfdab69..47d18546b 100644
--- a/sway/commands/seat/attach.c
+++ b/sway/commands/seat/attach.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/seat/cursor.c b/sway/commands/seat/cursor.c
index 5a8a3bc8f..85c5edcad 100644
--- a/sway/commands/seat/cursor.c
+++ b/sway/commands/seat/cursor.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <linux/input-event-codes.h>
#include <strings.h>
diff --git a/sway/commands/seat/hide_cursor.c b/sway/commands/seat/hide_cursor.c
index e09b82d99..f5177a471 100644
--- a/sway/commands/seat/hide_cursor.c
+++ b/sway/commands/seat/hide_cursor.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/seat/idle.c b/sway/commands/seat/idle.c
index 62b94db21..2974453e9 100644
--- a/sway/commands/seat/idle.c
+++ b/sway/commands/seat/idle.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <limits.h>
#include <string.h>
#include <strings.h>
diff --git a/sway/commands/seat/xcursor_theme.c b/sway/commands/seat/xcursor_theme.c
index 202f35b9e..61322a577 100644
--- a/sway/commands/seat/xcursor_theme.c
+++ b/sway/commands/seat/xcursor_theme.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/set.c b/sway/commands/set.c
index c539e9fc7..ba384c7cb 100644
--- a/sway/commands/set.c
+++ b/sway/commands/set.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <string.h>
#include <strings.h>
diff --git a/sway/commands/show_marks.c b/sway/commands/show_marks.c
index fecb5ade4..60cef9fa6 100644
--- a/sway/commands/show_marks.c
+++ b/sway/commands/show_marks.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/swap.c b/sway/commands/swap.c
index d44eb006c..e142eede8 100644
--- a/sway/commands/swap.c
+++ b/sway/commands/swap.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <strings.h>
#include "config.h"
#include "log.h"
diff --git a/sway/commands/title_format.c b/sway/commands/title_format.c
index a2446b7e4..0b2ea2659 100644
--- a/sway/commands/title_format.c
+++ b/sway/commands/title_format.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/unmark.c b/sway/commands/unmark.c
index c3a6ac4b9..4aba5bae0 100644
--- a/sway/commands/unmark.c
+++ b/sway/commands/unmark.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index 03e488ba9..a14ebb209 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <limits.h>
#include <string.h>
diff --git a/sway/config.c b/sway/config.c
index e91c0c8b1..568c8b534 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -1,3 +1,4 @@
+#undef _POSIX_C_SOURCE
#define _XOPEN_SOURCE 700 // for realpath
#include <stdio.h>
#include <stdbool.h>
diff --git a/sway/config/bar.c b/sway/config/bar.c
index a8389244f..908b28650 100644
--- a/sway/config/bar.c
+++ b/sway/config/bar.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <signal.h>
#include <stdbool.h>
#include <stdio.h>
diff --git a/sway/config/input.c b/sway/config/input.c
index 44c2be289..de3b21ed4 100644
--- a/sway/config/input.c
+++ b/sway/config/input.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <limits.h>
#include <float.h>
diff --git a/sway/config/output.c b/sway/config/output.c
index 54ebaa17a..557797710 100644
--- a/sway/config/output.c
+++ b/sway/config/output.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <drm_fourcc.h>
#include <stdbool.h>
diff --git a/sway/config/seat.c b/sway/config/seat.c
index 6d5d91ae4..f2326189e 100644
--- a/sway/config/seat.c
+++ b/sway/config/seat.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <limits.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sway/criteria.c b/sway/criteria.c
index 78ea8b8a4..e16b4fa82 100644
--- a/sway/criteria.c
+++ b/sway/criteria.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
diff --git a/sway/desktop/launcher.c b/sway/desktop/launcher.c
index 0c02b997d..28043d192 100644
--- a/sway/desktop/launcher.c
+++ b/sway/desktop/launcher.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <string.h>
#include <wlr/types/wlr_xdg_activation_v1.h>
diff --git a/sway/desktop/output.c b/sway/desktop/output.c
index 81290ccb2..600423bcf 100644
--- a/sway/desktop/output.c
+++ b/sway/desktop/output.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <stdlib.h>
#include <strings.h>
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index fd1c3d3a1..042141ab2 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c
index f4a25cf48..27a73f8a0 100644
--- a/sway/desktop/xdg_shell.c
+++ b/sway/desktop/xdg_shell.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 199309L
#include <float.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c
index 9f3f4d5f2..270cf08f8 100644
--- a/sway/desktop/xwayland.c
+++ b/sway/desktop/xwayland.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 199309L
#include <float.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index b00f81a95..e8cd81122 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <math.h>
#include <libevdev/libevdev.h>
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index c1bbdde0e..9ee635af2 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <stdio.h>
#include <string.h>
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 75fea484c..9dd078c61 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <linux/input-event-codes.h>
#include <string.h>
diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c
index c56330fd9..f2a9c2cdf 100644
--- a/sway/input/seatop_default.c
+++ b/sway/input/seatop_default.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <float.h>
#include <libevdev/libevdev.h>
#include <wlr/types/wlr_cursor.h>
diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c
index b4421fe6a..12d7ae7a6 100644
--- a/sway/input/seatop_down.c
+++ b/sway/input/seatop_down.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <float.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_tablet_v2.h>
diff --git a/sway/input/seatop_move_floating.c b/sway/input/seatop_move_floating.c
index 21d048ce2..7de3f4d83 100644
--- a/sway/input/seatop_move_floating.c
+++ b/sway/input/seatop_move_floating.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <wlr/types/wlr_cursor.h>
#include "sway/desktop/transaction.h"
#include "sway/input/cursor.h"
diff --git a/sway/input/seatop_move_tiling.c b/sway/input/seatop_move_tiling.c
index 7de39ff60..4f4d6e419 100644
--- a/sway/input/seatop_move_tiling.c
+++ b/sway/input/seatop_move_tiling.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <limits.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/util/edges.h>
diff --git a/sway/input/seatop_resize_floating.c b/sway/input/seatop_resize_floating.c
index df6830266..168dfffe3 100644
--- a/sway/input/seatop_resize_floating.c
+++ b/sway/input/seatop_resize_floating.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <limits.h>
#include <wlr/types/wlr_cursor.h>
#include <wlr/types/wlr_xcursor_manager.h>
diff --git a/sway/input/seatop_resize_tiling.c b/sway/input/seatop_resize_tiling.c
index 869d11b50..9ce4ff8b1 100644
--- a/sway/input/seatop_resize_tiling.c
+++ b/sway/input/seatop_resize_tiling.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <wlr/types/wlr_cursor.h>
#include <wlr/util/edges.h>
#include "sway/commands.h"
diff --git a/sway/input/tablet.c b/sway/input/tablet.c
index 902cb7eda..2863642a7 100644
--- a/sway/input/tablet.c
+++ b/sway/input/tablet.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <wlr/config.h>
#include <wlr/types/wlr_tablet_v2.h>
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index 9692a77fd..7f353c0ec 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -1,5 +1,4 @@
// See https://i3wm.org/docs/ipc.html for protocol information
-#define _POSIX_C_SOURCE 200112L
#include <linux/input-event-codes.h>
#include <assert.h>
#include <errno.h>
diff --git a/sway/lock.c b/sway/lock.c
index d267de4fb..289e8ca46 100644
--- a/sway/lock.c
+++ b/sway/lock.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_session_lock_v1.h>
diff --git a/sway/main.c b/sway/main.c
index 73254dc22..1c4939aa0 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <getopt.h>
#include <pango/pangocairo.h>
#include <signal.h>
diff --git a/sway/server.c b/sway/server.c
index 5b389f69a..684b1dbde 100644
--- a/sway/server.c
+++ b/sway/server.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/sway/sway_text_node.c b/sway/sway_text_node.c
index 664db40e9..5eba53ba4 100644
--- a/sway/sway_text_node.c
+++ b/sway/sway_text_node.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <drm_fourcc.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/sway/swaynag.c b/sway/swaynag.c
index 6031174d2..bc5e23ea4 100644
--- a/sway/swaynag.c
+++ b/sway/swaynag.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <signal.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/sway/tree/arrange.c b/sway/tree/arrange.c
index af925d054..d4003fe65 100644
--- a/sway/tree/arrange.c
+++ b/sway/tree/arrange.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <stdbool.h>
#include <stdlib.h>
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 784480903..9224b4fb4 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <drm_fourcc.h>
#include <stdint.h>
diff --git a/sway/tree/node.c b/sway/tree/node.c
index 213cf0a6b..7aaf97627 100644
--- a/sway/tree/node.c
+++ b/sway/tree/node.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include "sway/output.h"
#include "sway/server.h"
#include "sway/tree/container.h"
diff --git a/sway/tree/output.c b/sway/tree/output.c
index cd7bf0c27..2d11195e4 100644
--- a/sway/tree/output.c
+++ b/sway/tree/output.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <ctype.h>
#include <string.h>
diff --git a/sway/tree/root.c b/sway/tree/root.c
index e9cea5e22..ae3c3cb20 100644
--- a/sway/tree/root.c
+++ b/sway/tree/root.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 4a0d8069d..35b4b73f4 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <strings.h>
#include <wayland-server-core.h>
diff --git a/sway/tree/workspace.c b/sway/tree/workspace.c
index 40d33435c..a68dc9277 100644
--- a/sway/tree/workspace.c
+++ b/sway/tree/workspace.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809
#include <ctype.h>
#include <limits.h>
#include <stdbool.h>
diff --git a/swaybar/bar.c b/swaybar/bar.c
index 021fc3bdb..5b1213a8d 100644
--- a/swaybar/bar.c
+++ b/swaybar/bar.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/swaybar/config.c b/swaybar/config.c
index 5e8287734..55bfcb722 100644
--- a/swaybar/config.c
+++ b/swaybar/config.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <string.h>
#include "swaybar/config.h"
diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c
index ccd5a076e..62c22d43c 100644
--- a/swaybar/i3bar.c
+++ b/swaybar/i3bar.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <json.h>
#include <linux/input-event-codes.h>
#include <ctype.h>
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index 33ae65448..03500bdf3 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809
#include <limits.h>
#include <poll.h>
#include <stdio.h>
diff --git a/swaybar/main.c b/swaybar/main.c
index a44c1e639..3dc672334 100644
--- a/swaybar/main.c
+++ b/swaybar/main.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
diff --git a/swaybar/render.c b/swaybar/render.c
index 1113ca44a..879a4e42a 100644
--- a/swaybar/render.c
+++ b/swaybar/render.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <linux/input-event-codes.h>
#include <limits.h>
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index 2e9bb7f1d..e542e606b 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <assert.h>
#include <fcntl.h>
#include <sys/ioctl.h>
diff --git a/swaybar/tray/host.c b/swaybar/tray/host.c
index eea2caa59..79b54606f 100644
--- a/swaybar/tray/host.c
+++ b/swaybar/tray/host.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/swaybar/tray/icon.c b/swaybar/tray/icon.c
index b513dca55..659edd86f 100644
--- a/swaybar/tray/icon.c
+++ b/swaybar/tray/icon.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <dirent.h>
#include <stdbool.h>
diff --git a/swaybar/tray/item.c b/swaybar/tray/item.c
index d5fe50b15..ca6c03ad5 100644
--- a/swaybar/tray/item.c
+++ b/swaybar/tray/item.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <arpa/inet.h>
#include <cairo.h>
#include <limits.h>
diff --git a/swaybar/tray/watcher.c b/swaybar/tray/watcher.c
index 2458a8c2f..3cfea8d8e 100644
--- a/swaybar/tray/watcher.c
+++ b/swaybar/tray/watcher.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <stddef.h>
#include <stdio.h>
diff --git a/swaymsg/main.c b/swaymsg/main.c
index db9346c4b..573a7b166 100644
--- a/swaymsg/main.c
+++ b/swaymsg/main.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <limits.h>
#include <stdio.h>
diff --git a/swaynag/config.c b/swaynag/config.c
index cff3930f1..efd71ce73 100644
--- a/swaynag/config.c
+++ b/swaynag/config.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/swaynag/main.c b/swaynag/main.c
index 203902072..634bddbfc 100644
--- a/swaynag/main.c
+++ b/swaynag/main.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <signal.h>
#include "log.h"
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c
index 6ea739e30..50eea1483 100644
--- a/swaynag/swaynag.c
+++ b/swaynag/swaynag.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <assert.h>
#include <sys/stat.h>
diff --git a/swaynag/types.c b/swaynag/types.c
index 409cc6688..821e5b217 100644
--- a/swaynag/types.c
+++ b/swaynag/types.c
@@ -1,4 +1,3 @@
-#define _POSIX_C_SOURCE 200809L
#include <getopt.h>
#include <stdbool.h>
#include <stdlib.h>