Makefile: switch to use CPPFLAGS -D_DEFAULT_SOURCE - sfeed_curses - sfeed curses UI (now part of sfeed, development is in sfeed)
(HTM) git clone git://git.codemadness.org/sfeed_curses
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit b624558593a0d366e17c083a7a238203d5a52472
(DIR) parent c665475737051568791b0c1f9c198e69aa94c644
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 5 Jun 2021 15:41:17 +0200
Makefile: switch to use CPPFLAGS -D_DEFAULT_SOURCE
This fixes a warning on Linux glibc:
/usr/include/features.h:187:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
187 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
| ^~~~~~~
Tested on Gentoo, Void GNU/Linux glibc with gcc. Tested on various other
platforms for regressions too namely: OpenBSD, NetBSD, FreeBSD, Void GNU/Linux
musl.
Diffstat:
M Makefile | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/Makefile b/Makefile
@@ -14,7 +14,7 @@ DOCPREFIX = ${PREFIX}/share/doc/${NAME}
# use system flags.
SFEED_CFLAGS = ${CFLAGS}
SFEED_LDFLAGS = ${LDFLAGS} -lcurses
-SFEED_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \
+SFEED_CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \
-DSFEED_THEME=\"themes/${SFEED_THEME}.h\"
# Linux: some distros use ncurses and require -lncurses.
@@ -23,11 +23,9 @@ SFEED_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \
# Gentoo Linux: some distros might also require -ltinfo and -D_DEFAULT_SOURCE
# to prevent warnings about feature macros.
#SFEED_LDFLAGS = ${LDFLAGS} -lcurses -ltinfo
-#SFEED_CPPFLAGS = -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L \
-# -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -DSFEED_THEME=\"themes/${SFEED_THEME}.h\"
# use minicurses with hardcoded escape sequences (not the system curses).
-#SFEED_CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \
+#SFEED_CPPFLAGS = -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -D_BSD_SOURCE \
# -DSFEED_THEME=\"themes/${SFEED_THEME}.h\" -DSFEED_MINICURSES
#SFEED_LDFLAGS = ${LDFLAGS}