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:
emersion 2018-11-25 12:12:48 +01:00
parent 827e5513e0
commit 3a310f92ab
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
51 changed files with 43 additions and 59 deletions

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <string.h>
#include "sway/commands.h"

View file

@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 500
#include <stdlib.h>
#include <string.h>
#include <strings.h>

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/commands.h"

View file

@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/commands.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "log.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/commands.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <string.h>
#include "sway/commands.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "log.h"

View file

@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/commands.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#ifdef __linux__
#include <linux/input-event-codes.h>
#elif __FreeBSD__

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <stdint.h>
#include <string.h>

View file

@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/commands.h"
#include "sway/criteria.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include "sway/config.h"
#include "sway/commands.h"
#include "sway/input/input-manager.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <stdbool.h>
#include <string.h>
#include <strings.h>

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <stdbool.h>
#include <string.h>

View file

@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 500
#include <string.h>
#include "sway/commands.h"
#include "sway/criteria.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include "sway/commands.h"
#include "sway/config.h"

View file

@ -1,4 +1,3 @@
#define _XOPEN_SOURCE 500
#include <ctype.h>
#include <string.h>
#include <strings.h>

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include <string.h>
#include <strings.h>
#include "sway/input/input-manager.h"

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#ifdef __linux__
#include <linux/input-event-codes.h>
#elif __FreeBSD__

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 700
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <string.h>
#include <strings.h>

View file

@ -1,4 +1,4 @@
#define _XOPEN_SOURCE 500
#define _POSIX_C_SOURCE 200809L
#include <ctype.h>
#include <limits.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) {
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;
}