diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2015-08-10 11:20:29 +0200 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2015-08-10 11:20:29 +0200 |
commit | bfe0583a1264e2b1467942ec33e1fa773d450d9b (patch) | |
tree | aa7347636eddb765fec8c8b7af11456f7ce209c2 /src/libpiano | |
parent | 3a196f51581ffca2d2a902e83a9b69ac4702316c (diff) | |
download | pianobar-bfe0583a1264e2b1467942ec33e1fa773d450d9b.tar.gz pianobar-bfe0583a1264e2b1467942ec33e1fa773d450d9b.tar.bz2 pianobar-bfe0583a1264e2b1467942ec33e1fa773d450d9b.zip |
Move feature test macros to config.h
I removed most of the *BSD-related stuff, because I can’t test these. If
this breaks your build, send me a patch please.
Diffstat (limited to 'src/libpiano')
-rw-r--r-- | src/libpiano/config.h | 1 | ||||
-rw-r--r-- | src/libpiano/piano.c | 6 | ||||
-rw-r--r-- | src/libpiano/piano.h | 2 | ||||
-rw-r--r-- | src/libpiano/request.c | 5 | ||||
-rw-r--r-- | src/libpiano/response.c | 5 |
5 files changed, 5 insertions, 14 deletions
diff --git a/src/libpiano/config.h b/src/libpiano/config.h deleted file mode 100644 index febad25..0000000 --- a/src/libpiano/config.h +++ /dev/null @@ -1 +0,0 @@ -#define PACKAGE "libpiano" diff --git a/src/libpiano/piano.c b/src/libpiano/piano.c index b519f49..72502f7 100644 --- a/src/libpiano/piano.c +++ b/src/libpiano/piano.c @@ -21,10 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef __FreeBSD__ -#define _BSD_SOURCE /* required by strdup() */ -#define _DARWIN_C_SOURCE /* strdup() on OS X */ -#endif +#include "../config.h" #include <stdio.h> #include <string.h> @@ -34,7 +31,6 @@ THE SOFTWARE. #include "piano_private.h" #include "piano.h" -#include "config.h" /* initialize piano handle * @param piano handle diff --git a/src/libpiano/piano.h b/src/libpiano/piano.h index f0ba4cf..1a84d4a 100644 --- a/src/libpiano/piano.h +++ b/src/libpiano/piano.h @@ -24,6 +24,8 @@ THE SOFTWARE. #ifndef SRC_LIBPIANO_PIANO_H_MFBT13PN #define SRC_LIBPIANO_PIANO_H_MFBT13PN +#include "../config.h" + #include <stdbool.h> #ifdef __FreeBSD__ #define _GCRYPT_IN_LIBGCRYPT diff --git a/src/libpiano/request.c b/src/libpiano/request.c index 95ac2d0..02b4b43 100644 --- a/src/libpiano/request.c +++ b/src/libpiano/request.c @@ -21,10 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef __FreeBSD__ -#define _BSD_SOURCE /* required by strdup() */ -#define _DARWIN_C_SOURCE /* strdup() on OS X */ -#endif +#include "../config.h" #include <curl/curl.h> #include <json.h> diff --git a/src/libpiano/response.c b/src/libpiano/response.c index 542ef00..7f0cee0 100644 --- a/src/libpiano/response.c +++ b/src/libpiano/response.c @@ -21,10 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#ifndef __FreeBSD__ -#define _BSD_SOURCE /* required by strdup() */ -#define _DARWIN_C_SOURCE /* strdup() on OS X */ -#endif +#include "../config.h" #include <json.h> #include <string.h> |