This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to libiberty: #include <limits.h> botch
- To: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Subject: Re: PATCH to libiberty: #include <limits.h> botch
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Sun, 23 Jul 2000 13:14:35 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <0007220147.AA10375@ivan.Harhan.ORG>you write:
> Hi there,
>
> Below is a patch to libiberty fixing a 4.3BSD build failure. You can't #inc
> lude
> <limits.h> blindly and expect everyone to have it, the portable way is to h
> ave
> configure check for <limits.h> and <sys/param.h> (it was already doing the
> latter) and #include the one(s) actually found. This patch does so.
>
> --
> Michael Sokolov Harhan Engineering Laboratory
> Public Service Agent International Free Computing Task Force
> International Engineering and Science Task Force
> 615 N GOOD LATIMER EXPY STE #4
> DALLAS TX 75204-5852 USA
>
> Phone: +1-214-824-7693 (Harhan Eng Lab office)
> E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)
>
> 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
>
> * configure.in (AC_CHECK_HEADERS): Add limits.h.
> * configure, config.in: Regenerate.
> * sort.c: Portably #include <limits.h> and/or <sys/param.h>.
> * strtol.c, strtoul.c: #include "config.h". Portably #include
> <limits.h> and/or <sys/param.h>.
A few notes.
First, you forgot to update the dependencies in Makefile.in for strtol.o
strtoul.o after you added include "config.h" to those file. I've fixed
this problem.
Second, the way your're making diffs makes them a pain to apply to the tree.
Look at the filenames in your diff headers:
> *** strtol.c.orig Fri Jul 21 20:26:42 2000
> --- strtol.c.1 Fri Jul 21 20:32:21 2000
Note strtol.c.orig and strtol.c.1, but not strtol.c. This confuses patch
since the file you want to change is strtol.c. Similarly for other files
you modified with that patch. I've fixed that problem too.
jeff