diff options
| author | Drew DeVault <sir@cmpwn.com> | 2017-03-10 23:41:24 -0500 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2017-03-10 23:41:24 -0500 |
| commit | 9aed9d93596cdc72e305338d82ccc0dcaf85c6e2 (patch) | |
| tree | b5a3db4994970b2d0033e717771b24a92503ddac | |
| parent | 74d4f1bec9a70bc800ecd7b15c9c6c0d7a5ce918 (diff) | |
UnGNUify the codebase
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/container.h" #include "sway/focus.h" diff --git a/sway/commands/hide_edge_borders.c b/sway/commands/hide_edge_borders.c index cb4f052d..ee2a2644 100644 --- a/sway/commands/hide_edge_borders.c +++ b/sway/commands/hide_edge_bo |
