[gnutls-devel] GnuTLS requires a C99 compiler on W32

LRN lrn1986 at gmail.com
Tue Oct 1 19:07:52 CEST 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

GnuTLS uses gnulib's time.h, which has the following:
_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict
__timer, struct tm *restrict __result) _GL_ARG_NONNULL ((1, 2)));

"restrict" is a keyword that requires -std=c99 (using mingw-w64 gcc
4.8.1), otherwise you get:

In file included from ./includes/gnutls/gnutls.h:49:0,
                 from ../../gnutls-3.2.4/lib/tpm.c:30:
./../gl/time.h:468:1: error: expected ';', ',' or ')' before '__timer'
 _GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict
__timer,
 ^
./../gl/time.h:490:1: error: expected ';', ',' or ')' before '__timer'
 _GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer,
 ^

The "#define restrict __restrict" from config.h doesn't reach gnulib
here, because tpm.c doesn't include config.h

Adding
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
to tpm.c fixes this.

There is another problem that prevents GnuTLS from building, but it's
unrelated to this, so i'll start a new thread for it.

- -- 
O< ascii ribbon - stop html email! - www.asciiribbon.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSSwFoAAoJEOs4Jb6SI2CwpdoIAI4omghdCLabBqvDNfI+v+jC
OL5va8FXWqnrt0aUwWXbK8OYKHLlV/G092IzKKJwBQSsexRElK4oI+O+U1enuFwn
qj/Zq0m6DZc+fDFisulhBBfyD2mxhoL1ig/oxklUvzJwbQ/eEkexLY4jRMArEkK+
gzD3rjr9b+83gm/tCnZiEAKCkyCLPvoAfTIb0ST7uTokDhcWFRA5X0THoxpb9cu2
/mLLe2dTiEN4lqKD9eMYYMoPoW5olr+TnSgo0WBYs0G66zgdZhLueCb/0Zq1ZDaz
HXd+kkc+0kQKbrm4FizmP2nNKu9JAYFJdBz7RkY8OWvT+zZZl/GHzGNttzRhyYw=
=WqY0
-----END PGP SIGNATURE-----



More information about the Gnutls-devel mailing list