mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
dirmngr: Require a c99 compiler
* configure.ac (USE_C99_CFLAGS): New ac_subst. Set to -std=gnu99 for gcc. * dirmngr/Makefile.am (AM_CFLAGS): Add USE_C99_CFLAGS. (t_http_CFLAGS): Ditto. (t_ldap_parse_uri_CFLAGS): Ditto. (t_dns_stuff_CFLAGS): Ditto. -- C99 and the GCC option is required for use with dns.c which makes heavy use of C99 features. We should consider to switch GnuPG entirely to C99 but enable gcc warnings to detect features which are not supported by not-real-c99 compilers and which makes audits harder (VLA etc.). Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
d84f5a8823
commit
392966aed9
@ -1577,8 +1577,13 @@ if test "$GCC" = yes; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
CFLAGS="$mycflags $mycflags_save"
|
CFLAGS="$mycflags $mycflags_save"
|
||||||
|
USE_C99_CFLAGS="-std=gnu99"
|
||||||
|
else
|
||||||
|
USE_C99_CFLAGS=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_SUBST(USE_C99_CFLAGS)
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# This is handy for debugging so the compiler doesn't rearrange
|
# This is handy for debugging so the compiler doesn't rearrange
|
||||||
|
@ -35,7 +35,8 @@ AM_CPPFLAGS = -I$(top_srcdir)/common
|
|||||||
|
|
||||||
include $(top_srcdir)/am/cmacros.am
|
include $(top_srcdir)/am/cmacros.am
|
||||||
|
|
||||||
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS) \
|
AM_CFLAGS = $(USE_C99_CFLAGS) \
|
||||||
|
$(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) $(LIBASSUAN_CFLAGS) \
|
||||||
$(GPG_ERROR_CFLAGS) $(NPTH_CFLAGS) $(NTBTLS_CFLAGS) \
|
$(GPG_ERROR_CFLAGS) $(NPTH_CFLAGS) $(NTBTLS_CFLAGS) \
|
||||||
$(LIBGNUTLS_CFLAGS)
|
$(LIBGNUTLS_CFLAGS)
|
||||||
|
|
||||||
@ -132,7 +133,7 @@ endif
|
|||||||
|
|
||||||
# http tests
|
# http tests
|
||||||
t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c
|
t_http_SOURCES = $(t_common_src) t-http.c http.c dns-stuff.c
|
||||||
t_http_CFLAGS = -DWITHOUT_NPTH=1 \
|
t_http_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
|
||||||
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
|
$(LIBGCRYPT_CFLAGS) $(NTBTLS_CFLAGS) $(LIBGNUTLS_CFLAGS) \
|
||||||
$(GPG_ERROR_CFLAGS)
|
$(GPG_ERROR_CFLAGS)
|
||||||
t_http_LDADD = $(t_common_ldadd) \
|
t_http_LDADD = $(t_common_ldadd) \
|
||||||
@ -142,11 +143,11 @@ t_ldap_parse_uri_SOURCES = \
|
|||||||
t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
|
t-ldap-parse-uri.c ldap-parse-uri.c ldap-parse-uri.h \
|
||||||
http.c dns-stuff.c \
|
http.c dns-stuff.c \
|
||||||
$(ldap_url) $(t_common_src)
|
$(ldap_url) $(t_common_src)
|
||||||
t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 \
|
t_ldap_parse_uri_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
|
||||||
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
|
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
|
||||||
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
|
t_ldap_parse_uri_LDADD = $(ldaplibs) $(t_common_ldadd) $(DNSLIBS)
|
||||||
|
|
||||||
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1 \
|
t_dns_stuff_CFLAGS = -DWITHOUT_NPTH=1 $(USE_C99_CFLAGS) \
|
||||||
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
|
$(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
|
||||||
t_dns_stuff_SOURCES = $(t_common_src) t-dns-stuff.c dns-stuff.c
|
t_dns_stuff_SOURCES = $(t_common_src) t-dns-stuff.c dns-stuff.c
|
||||||
t_dns_stuff_LDADD = $(t_common_ldadd) $(DNSLIBS)
|
t_dns_stuff_LDADD = $(t_common_ldadd) $(DNSLIBS)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user