kopia lustrzana https://gitlab.com/sane-project/backends
Change GCC mode from ISO C90 to ISO C99
Add GCC flag "-std=c99". Also remove GCC flag "-ansi" which is an alias for "-std=c90" and would make the flag "-std=c99" ineffective. This fixes all occurrences of the following GCC warning: warning: ISO C90 does not support '__func__' predefined identifiermerge-requests/1/head
rodzic
baec5e0395
commit
58052a7ce6
12
acinclude.m4
12
acinclude.m4
|
@ -27,9 +27,11 @@ AC_DEFUN([SANE_SET_CFLAGS],
|
|||
[
|
||||
if test "${ac_cv_c_compiler_gnu}" = "yes"; then
|
||||
NORMAL_CFLAGS="\
|
||||
-std=c99 \
|
||||
-W \
|
||||
-Wall"
|
||||
WARN_CFLAGS="\
|
||||
-std=c99 \
|
||||
-W \
|
||||
-Wall \
|
||||
-Wcast-align \
|
||||
|
@ -41,16 +43,6 @@ if test "${ac_cv_c_compiler_gnu}" = "yes"; then
|
|||
-Wstrict-prototypes \
|
||||
-pedantic"
|
||||
|
||||
# Some platforms are overly strict with -ansi enabled. Exclude those.
|
||||
ANSI_FLAG=-ansi
|
||||
case "${host_os}" in
|
||||
solaris* | hpux* | os2* | darwin* | cygwin* | mingw*)
|
||||
ANSI_FLAG=
|
||||
;;
|
||||
esac
|
||||
NORMAL_CFLAGS="${NORMAL_CFLAGS} ${ANSI_FLAG}"
|
||||
WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}"
|
||||
|
||||
AC_ARG_ENABLE(warnings,
|
||||
AC_HELP_STRING([--enable-warnings],
|
||||
[turn on tons of compiler warnings (GCC only)]),
|
||||
|
|
|
@ -5185,9 +5185,11 @@ fi
|
|||
|
||||
if test "${ac_cv_c_compiler_gnu}" = "yes"; then
|
||||
NORMAL_CFLAGS="\
|
||||
-std=c99 \
|
||||
-W \
|
||||
-Wall"
|
||||
WARN_CFLAGS="\
|
||||
-std=c99 \
|
||||
-W \
|
||||
-Wall \
|
||||
-Wcast-align \
|
||||
|
@ -5199,16 +5201,6 @@ if test "${ac_cv_c_compiler_gnu}" = "yes"; then
|
|||
-Wstrict-prototypes \
|
||||
-pedantic"
|
||||
|
||||
# Some platforms are overly strict with -ansi enabled. Exclude those.
|
||||
ANSI_FLAG=-ansi
|
||||
case "${host_os}" in
|
||||
solaris* | hpux* | os2* | darwin* | cygwin* | mingw*)
|
||||
ANSI_FLAG=
|
||||
;;
|
||||
esac
|
||||
NORMAL_CFLAGS="${NORMAL_CFLAGS} ${ANSI_FLAG}"
|
||||
WARN_CFLAGS="${WARN_CFLAGS} ${ANSI_FLAG}"
|
||||
|
||||
# Check whether --enable-warnings was given.
|
||||
if test "${enable_warnings+set}" = set; then :
|
||||
enableval=$enable_warnings;
|
||||
|
|
Ładowanie…
Reference in New Issue