aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt11
-rw-r--r--common/CMakeLists.txt7
-rw-r--r--common/ipc-client.c3
-rw-r--r--common/log.c1
-rw-r--r--common/stringop.c1
-rw-r--r--common/util.c1
-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/binding_mode_indicator.c1
-rw-r--r--sway/commands/bar/hidden_state.c2
-rw-r--r--sway/commands/bar/id.c1
-rw-r--r--sway/commands/bar/mode.c2
-rw-r--r--sway/commands/bar/output.c1
-rw-r--r--sway/commands/bar/pango_markup.c1
-rw-r--r--sway/commands/bar/position.c1
-rw-r--r--sway/commands/bar/separator_symbol.c1
-rw-r--r--sway/commands/bar/strip_workspace_numbers.c1
-rw-r--r--sway/commands/bar/tray_padding.c1
-rw-r--r--sway/commands/bar/workspace_buttons.c1
-rw-r--r--sway/commands/bar/wrap_scroll.c1
-rw-r--r--sway/commands/border.c1
-rw-r--r--sway/commands/debuglog.c1
-rw-r--r--sway/commands/exec_always.c1
-rw-r--r--sway/commands/floating.c1
-rw-r--r--sway/commands/floating_mod.c1
-rw-r--r--sway/commands/floating_scroll.c2
-rw-r--r--sway/commands/focus.c1
-rw-r--r--sway/commands/focus_follows_mouse.c1
-rw-r--r--sway/commands/font.c1
-rw-r--r--sway/commands/for_window.c1
-rw-r--r--sway/commands/force_focus_wrapping.c1
-rw-r--r--sway/commands/gaps.c1
-rw-r--r--sway/commands/hide_edge_borders.c1
-rw-r--r--sway/commands/input.c1
-rw-r--r--sway/commands/input/accel_profile.c1
-rw-r--r--sway/commands/input/click_method.c1
-rw-r--r--sway/commands/input/drag_lock.c1
-rw-r--r--sway/commands/input/dwt.c1
-rw-r--r--sway/commands/input/events.c1
-rw-r--r--sway/commands/input/left_handed.c1
-rw-r--r--sway/commands/input/middle_emulation.c1
-rw-r--r--sway/commands/input/natural_scroll.c1
-rw-r--r--sway/commands/input/scroll_method.c1
-rw-r--r--sway/commands/input/tap.c1
-rw-r--r--sway/commands/layout.c1
-rw-r--r--sway/commands/log_colors.c1
-rw-r--r--sway/commands/mode.c2
-rw-r--r--sway/commands/mouse_warping.c1
-rw-r--r--sway/commands/move.c1
-rw-r--r--sway/commands/new_float.c1
-rw-r--r--sway/commands/new_window.c1
-rw-r--r--sway/commands/orientation.c1
-rw-r--r--sway/commands/output.c2
-rw-r--r--sway/commands/resize.c1
-rw-r--r--sway/commands/scratchpad.c1
-rw-r--r--sway/commands/seamless_mouse.c1
-rw-r--r--sway/commands/set.c12
-rw-r--r--sway/commands/smart_gaps.c1
-rw-r--r--sway/commands/split.c1
-rw-r--r--sway/commands/workspace.c2
-rw-r--r--sway/commands/workspace_auto_back_and_forth.c1
-rw-r--r--sway/commands/workspace_layout.c1
-rw-r--r--sway/config.c14
-rw-r--r--sway/container.c2
-rw-r--r--sway/criteria.c1
-rw-r--r--sway/handlers.c2
-rw-r--r--sway/input.c1
-rw-r--r--sway/ipc-server.c7
-rw-r--r--sway/layout.c1
-rw-r--r--sway/main.c2
-rw-r--r--sway/security.c2
-rw-r--r--sway/workspace.c1
-rw-r--r--swaybar/bar.c2
-rw-r--r--swaybar/config.c2
-rw-r--r--swaybar/ipc.c2
-rw-r--r--swaybar/main.c1
-rw-r--r--swaybar/status_line.c1
-rw-r--r--swaygrab/json.c2
-rw-r--r--swaygrab/main.c2
-rw-r--r--swaylock/main.c9
-rw-r--r--swaymsg/main.c2
-rw-r--r--wayland/buffers.c1
-rw-r--r--wayland/registry.c1
84 files changed, 123 insertions, 33 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 685e8fc7..ec2c73a2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,9 +7,6 @@ set(CMAKE_C_STANDARD 99)
set(CMAKE_C_EXTENSIONS OFF)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
-add_definitions(
- -D_GNU_SOURCE
- )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wextra")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter")
@@ -70,14 +67,6 @@ find_package(PAM)
find_package(LibInput REQUIRED)
-find_package(Backtrace)
-if(Backtrace_FOUND)
- include_directories("${Backtrace_INCLUDE_DIRS}")
- add_definitions(-DSWAY_Backtrace_FOUND=1)
- set(LINK_LIBRARIES, "${LINK_LIBRARIES} ${Backtrace_LIBRARIES}")
- set(SWAY_Backtrace_HEADER "${Backtrace_HEADER}")
-endif()
-
if (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
find_package(EpollShim REQUIRED)
endif (CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index 3d6e0fb9..11119eeb 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -13,10 +13,3 @@ add_library(sway-common STATIC
)
target_link_libraries(sway-common m)
-
-if(Backtrace_FOUND)
- set_target_properties(sway-common
- PROPERTIES
- COMPILE_FLAGS "-include ${Backtrace_HEADER}"
- )
-endif()
diff --git a/common/ipc-client.c b/common/ipc-client.c
index d011bd26..1ab6627b 100644
--- a/common/ipc-client.c
+++ b/common/ipc-client.c
@@ -1,5 +1,6 @@
-#include <stdint.h>
+#define _POSIX_C_SOURCE 2
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
diff --git a/common/log.c b/common/log.c
index 825b176b..c3809c69 100644
--- a/common/log.c
+++ b/common/log.c
@@ -1,3 +1,4 @@
+#define _POSIX_C_SOURCE 1
#include <errno.h>
#include <libgen.h>
#include <signal.h>
diff --git a/common/stringop.c b/common/stringop.c
index 432bee7f..99e9636d 100644
--- a/common/stringop.c
+++ b/common/stringop.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
diff --git a/common/util.c b/common/util.c
index 73704afd..12ed0cdc 100644
--- a/common/util.c
+++ b/common/util.c
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include <wlc/wlc.h>
#include <xkbcommon/xkbcommon-names.h>
#include "log.h"
diff --git a/sway/commands.c b/sway/commands.c
index 068e8866..dbb34705 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <xkbcommon/xkbcommon.h>
#include <xkbcommon/xkbcommon-names.h>
#include <wlc/wlc.h>
diff --git a/sway/commands/assign.c b/sway/commands/assign.c
index 992b4692..ec262bb8 100644
--- a/sway/commands/assign.c
+++ b/sway/commands/assign.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <stdio.h>
#include <string.h>
#include "sway/commands.h"
diff --git a/sway/commands/bar.c b/sway/commands/bar.c
index e8d24084..04745a6e 100644
--- a/sway/commands/bar.c
+++ b/sway/commands/bar.c
@@ -1,5 +1,6 @@
#include <stdio.h>
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "sway/config.h"
#include "log.h"
diff --git a/sway/commands/bar/binding_mode_indicator.c b/sway/commands/bar/binding_mode_indicator.c
index 6f67e15d..64f5b84f 100644
--- a/sway/commands/bar/binding_mode_indicator.c
+++ b/sway/commands/bar/binding_mode_indicator.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.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 e52a123f..0b49aa6b 100644
--- a/sway/commands/bar/hidden_state.c
+++ b/sway/commands/bar/hidden_state.c
@@ -1,4 +1,6 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/ipc-server.h"
diff --git a/sway/commands/bar/id.c b/sway/commands/bar/id.c
index d62a0961..1221ebf6 100644
--- a/sway/commands/bar/id.c
+++ b/sway/commands/bar/id.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#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 3fd6587f..36816b93 100644
--- a/sway/commands/bar/mode.c
+++ b/sway/commands/bar/mode.c
@@ -1,4 +1,6 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "sway/config.h"
#include "sway/ipc-server.h"
diff --git a/sway/commands/bar/output.c b/sway/commands/bar/output.c
index 01a23d9c..a5710bc0 100644
--- a/sway/commands/bar/output.c
+++ b/sway/commands/bar/output.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/commands.h"
#include "list.h"
diff --git a/sway/commands/bar/pango_markup.c b/sway/commands/bar/pango_markup.c
index 69213c7b..f69e882f 100644
--- a/sway/commands/bar/pango_markup.c
+++ b/sway/commands/bar/pango_markup.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/position.c b/sway/commands/bar/position.c
index 4d0171ba..50de58e2 100644
--- a/sway/commands/bar/position.c
+++ b/sway/commands/bar/position.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/separator_symbol.c b/sway/commands/bar/separator_symbol.c
index 2249da52..2766d8a2 100644
--- a/sway/commands/bar/separator_symbol.c
+++ b/sway/commands/bar/separator_symbol.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/strip_workspace_numbers.c b/sway/commands/bar/strip_workspace_numbers.c
index 7cd19d60..9ac32482 100644
--- a/sway/commands/bar/strip_workspace_numbers.c
+++ b/sway/commands/bar/strip_workspace_numbers.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/tray_padding.c b/sway/commands/bar/tray_padding.c
index 32f8eeba..8c559f65 100644
--- a/sway/commands/bar/tray_padding.c
+++ b/sway/commands/bar/tray_padding.c
@@ -1,5 +1,6 @@
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/workspace_buttons.c b/sway/commands/bar/workspace_buttons.c
index a0e0549d..67dd2d31 100644
--- a/sway/commands/bar/workspace_buttons.c
+++ b/sway/commands/bar/workspace_buttons.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/bar/wrap_scroll.c b/sway/commands/bar/wrap_scroll.c
index caa85660..4ed1f12a 100644
--- a/sway/commands/bar/wrap_scroll.c
+++ b/sway/commands/bar/wrap_scroll.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/border.c b/sway/commands/border.c
index 68ae58a6..0211e40c 100644
--- a/sway/commands/border.c
+++ b/sway/commands/border.c
@@ -1,6 +1,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "sway/container.h"
#include "sway/focus.h"
diff --git a/sway/commands/debuglog.c b/sway/commands/debuglog.c
index 76192fb0..658d6165 100644
--- a/sway/commands/debuglog.c
+++ b/sway/commands/debuglog.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
diff --git a/sway/commands/exec_always.c b/sway/commands/exec_always.c
index 1d7cd494..ab2d8622 100644
--- a/sway/commands/exec_always.c
+++ b/sway/commands/exec_always.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
#include <sys/wait.h>
#include <unistd.h>
diff --git a/sway/commands/floating.c b/sway/commands/floating.c
index 612b8641..113c8b71 100644
--- a/sway/commands/floating.c
+++ b/sway/commands/floating.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "sway/container.h"
#include "sway/ipc-server.h"
diff --git a/sway/commands/floating_mod.c b/sway/commands/floating_mod.c
index b6360d9a..b8e81ab9 100644
--- a/sway/commands/floating_mod.c
+++ b/sway/commands/floating_mod.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "sway/input_state.h"
#include "list.h"
diff --git a/sway/commands/floating_scroll.c b/sway/commands/floating_scroll.c
index 5705cfee..8c50c5bd 100644
--- a/sway/commands/floating_scroll.c
+++ b/sway/commands/floating_scroll.c
@@ -1,4 +1,6 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "log.h"
#include "stringop.h"
diff --git a/sway/commands/focus.c b/sway/commands/focus.c
index 0be442ca..12c5d02c 100644
--- a/sway/commands/focus.c
+++ b/sway/commands/focus.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include <wlc/wlc.h>
#include "sway/commands.h"
#include "sway/container.h"
diff --git a/sway/commands/focus_follows_mouse.c b/sway/commands/focus_follows_mouse.c
index 8ccefa59..7c9c2b13 100644
--- a/sway/commands/focus_follows_mouse.c
+++ b/sway/commands/focus_follows_mouse.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
struct cmd_results *cmd_focus_follows_mouse(int argc, char **argv) {
diff --git a/sway/commands/font.c b/sway/commands/font.c
index 1ee06396..32994f8a 100644
--- a/sway/commands/font.c
+++ b/sway/commands/font.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/border.h"
#include "sway/commands.h"
diff --git a/sway/commands/for_window.c b/sway/commands/for_window.c
index 8c5722fd..d1fd1641 100644
--- a/sway/commands/for_window.c
+++ b/sway/commands/for_window.c
@@ -1,3 +1,4 @@
+#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/commands.h"
#include "sway/criteria.h"
diff --git a/sway/commands/force_focus_wrapping.c b/sway/commands/force_focus_wrapping.c
index 23019cd3..f19dd163 100644
--- a/sway/commands/force_focus_wrapping.c
+++ b/sway/commands/force_focus_wrapping.c
@@ -1,4 +1,5 @@
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
struct cmd_results *cmd_force_focus_wrapping(int argc, char **argv) {
diff --git a/sway/commands/gaps.c b/sway/commands/gaps.c
index fe06add4..0a48592d 100644
--- a/sway/commands/gaps.c
+++ b/sway/commands/gaps.c
@@ -2,6 +2,7 @@
#include <errno.h>
#include <stdlib.h>
#include <string.h>
+#include <strings.h>
#include "sway/commands.h"
#include "sway/cont