[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bison 1.75c
From: |
Paul Eggert |
Subject: |
Re: Bison 1.75c |
Date: |
Mon, 2 Dec 2002 10:23:59 -0800 |
> From: Peter Klein <address@hidden>
> Date: Sun, 1 Dec 2002 22:23:04 +0100 (MET)
>
> When compiling, src/scan-gram.c it won't compile and complains
> (during linking) that strtoul is not known.
> So I changed it into strtol and everything runns fine.
Thanks for reporting that. We really need strtoul, since strtol has
the wrong semantics for numbers >= 2**31 on your host, so I installed
the following patch instead. It should appear in the next test
version of Bison.
2002-12-02 Paul Eggert <address@hidden>
* configure.ac (AC_REPLACE_FUNCS): Add strtoul.
* lib/strtoul.c: New file, from gnulib.
This fixes a porting bug reported by Peter Klein in
<http://mail.gnu.org/pipermail/bug-bison/2002-December/001944.html>.
Index: configure.ac
===================================================================
RCS file: /cvsroot/bison/bison/configure.ac,v
retrieving revision 1.23
diff -p -u -r1.23 configure.ac
--- configure.ac 25 Nov 2002 08:21:40 -0000 1.23
+++ configure.ac 2 Dec 2002 18:16:30 -0000
@@ -87,7 +87,7 @@ AC_CHECK_DECLS([free, getenv, getopt,
stpcpy, strchr, strspn, strnlen,
malloc, memchr, memrchr])
AC_REPLACE_FUNCS(memchr memrchr \
- strchr stpcpy strrchr strspn strtol)
+ strchr stpcpy strrchr strspn strtol strtoul)
AC_FUNC_MALLOC
AC_FUNC_REALLOC
jm_PREREQ_MBSWIDTH
--- /dev/null 2002-09-30 17:56:28.000000000 -0700
+++ lib/strtoul.c 2001-02-17 08:56:20.000000000 -0800
@@ -0,0 +1,22 @@
+/* Copyright (C) 1991, 1999, 2001 Free Software Foundation, Inc.
+
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to address@hidden
+
+This program is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#define UNSIGNED 1
+
+#include "strtol.c"