From fad85e3bd2eda0ef08422ab28daf36149a24afa6 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 13 Oct 2018 21:09:50 +0900 Subject: [PATCH] Replaced _BSD_SOURCE, _SVID_SOURCE with _DEFAULT_SOURCE. Removed AC_CHECK_GNU_EXTENSIONS. Signed-off-by: Michele Calgaro --- acinclude.m4 | 32 ++------------------------------ aclocal.m4 | 32 ++------------------------------ 2 files changed, 4 insertions(+), 60 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 5a99c8d..10f05df 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -2681,34 +2681,6 @@ AC_DEFUN(AC_CHECK_BOOL, AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool]) ]) -AC_DEFUN(AC_CHECK_GNU_EXTENSIONS, -[ -AC_MSG_CHECKING(if you need GNU extensions) -AC_CACHE_VAL(ac_cv_gnu_extensions, -[ -cat > conftest.c << EOF -#include - -#ifdef __GNU_LIBRARY__ -yes -#endif -EOF - -if (eval "$ac_cpp conftest.c") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_gnu_extensions=yes -else - ac_cv_gnu_extensions=no -fi -]) - -AC_MSG_RESULT($ac_cv_gnu_extensions) -if test "$ac_cv_gnu_extensions" = "yes"; then - AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions]) -fi -]) - AC_DEFUN(KDE_CHECK_COMPILER_FLAG, [ AC_MSG_CHECKING([whether $CXX supports -$1]) @@ -2901,8 +2873,8 @@ AC_DEFUN(AC_CHECK_COMPILERS, if test "$GCC" = "yes"; then case $host in *-*-linux-gnu) - CFLAGS="-ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS" - CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS" + CFLAGS="-ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE $CFLAGS" + CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS" KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"]) ;; esac diff --git a/aclocal.m4 b/aclocal.m4 index 6dbdf31..4ecd72a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -2693,34 +2693,6 @@ AC_DEFUN(AC_CHECK_BOOL, AC_DEFINE_UNQUOTED(HAVE_BOOL, 1, [You _must_ have bool]) ]) -AC_DEFUN(AC_CHECK_GNU_EXTENSIONS, -[ -AC_MSG_CHECKING(if you need GNU extensions) -AC_CACHE_VAL(ac_cv_gnu_extensions, -[ -cat > conftest.c << EOF -#include - -#ifdef __GNU_LIBRARY__ -yes -#endif -EOF - -if (eval "$ac_cpp conftest.c") 2>&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - ac_cv_gnu_extensions=yes -else - ac_cv_gnu_extensions=no -fi -]) - -AC_MSG_RESULT($ac_cv_gnu_extensions) -if test "$ac_cv_gnu_extensions" = "yes"; then - AC_DEFINE_UNQUOTED(_GNU_SOURCE, 1, [Define if you need to use the GNU extensions]) -fi -]) - AC_DEFUN(KDE_CHECK_COMPILER_FLAG, [ AC_MSG_CHECKING([whether $CXX supports -$1]) @@ -2913,8 +2885,8 @@ AC_DEFUN(AC_CHECK_COMPILERS, if test "$GCC" = "yes"; then case $host in *-*-linux-gnu) - CFLAGS="-ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS" - CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS" + CFLAGS="-ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE $CFLAGS" + CXXFLAGS="-ansi -D_XOPEN_SOURCE=500 -D_DEFAULT_SOURCE -Wcast-align -Wconversion -Wchar-subscripts $CXXFLAGS" KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"; CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"]) ;; esac