unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: 60022@debbugs.gnu.org
Subject: bug#60022: configure.ac fix for C99 compatibility
Date: Mon, 12 Dec 2022 22:35:33 +0100	[thread overview]
Message-ID: <874ju0paoq.fsf@oldenburg.str.redhat.com> (raw)

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	other threads:[~2022-12-12 21:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 21:35 Florian Weimer [this message]
2023-01-16 22:19 ` bug#60022: configure.ac fix for C99 compatibility Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874ju0paoq.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=60022@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).