mirror of
https://github.com/Cloudef/bemenu
synced 2025-02-19 00:06:50 +00:00
Get rid of _DEFAULT_SOURCE #defines, set this in cmake and also use
secure_getenv where it makes sense.
This commit is contained in:
parent
6ac8d8c4d8
commit
f76cfbca4f
@ -9,8 +9,8 @@ INCLUDE(CTest)
|
||||
INCLUDE(GetGitRevisionDescription)
|
||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||
|
||||
# C99
|
||||
ADD_DEFINITIONS(-std=c99)
|
||||
# C99 and _GNU_SOURCE for secure_getenv
|
||||
ADD_DEFINITIONS(-std=c99 -D_GNU_SOURCE)
|
||||
|
||||
# Compile library
|
||||
ADD_SUBDIRECTORY(lib)
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "common.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -123,12 +123,12 @@ bm_init(void)
|
||||
return true;
|
||||
|
||||
static const char *rpath = INSTALL_PREFIX "/lib/bemenu";
|
||||
const char *path = getenv("BEMENU_RENDERER");
|
||||
const char *path = secure_getenv("BEMENU_RENDERER");
|
||||
|
||||
if (path)
|
||||
return load_to_list(path);
|
||||
|
||||
path = getenv("BEMENU_RENDERERS");
|
||||
path = secure_getenv("BEMENU_RENDERERS");
|
||||
|
||||
if (!path || access(path, R_OK) == -1)
|
||||
path = rpath;
|
||||
|
@ -1,6 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
|
||||
#include "internal.h"
|
||||
#include "version.h"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "wayland.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "internal.h"
|
||||
#include "version.h"
|
||||
#include "wayland.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "internal.h"
|
||||
#include "wayland.h"
|
||||
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#include "internal.h"
|
||||
#include "version.h"
|
||||
#include "x11.h"
|
||||
|
@ -1,4 +1,3 @@
|
||||
#define _DEFAULT_SOURCE
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
|
Loading…
Reference in New Issue
Block a user