bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60022: configure.ac fix for C99 compatibility


From: Florian Weimer
Subject: bug#60022: configure.ac fix for C99 compatibility
Date: Mon, 12 Dec 2022 22:35:33 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux)

This patch is needed to improve C99 compatibility:

diff --git a/configure.ac b/configure.ac
index b3879df1f..cc865a028 100644
--- a/configure.ac
+++ b/configure.ac
@@ -904,7 +904,7 @@ AC_CACHE_VAL(guile_cv_localtime_cache,
 AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
 #include <stdlib.h>
 extern char **environ;
-unset_TZ ()
+int unset_TZ ()
 {
   char **from, **to;
   for (to = from = environ; (*to = *from); from++)
@@ -913,7 +913,7 @@ unset_TZ ()
 }
 char TZ_GMT0[] = "TZ=GMT0";
 char TZ_PST8[] = "TZ=PST8";
-main()
+int main()
 {
   time_t now = time ((time_t *) 0);
   int hour_GMT0, hour_unset;

Future compilers are likely to reject implicit int types by default.

Found via:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

Thanks,
Florian






reply via email to

[Prev in Thread] Current Thread [Next in Thread]