This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH to libiberty: size_t portability
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH to libiberty: size_t portability
- From: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Date: Fri, 21 Jul 00 21:08:10 CDT
Hi there,
Below is a patch to libiberty fixing a 4.3BSD build failure. To use size_t
portably, one must #include <sys/types.h> whereever it's used, in case it's
defined there, and add AC_TYPE_SIZE_T to configure.in, in case it's missing
altogether. This patch does so.
This patch applies cleanly after my previous two.
--
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_TYPE_SIZE_T): Add check.
* configure, config.in: Regenerate.
* cp-demangle.c, mkstemps.c: #include <sys/types.h>.
*** configure.in.2 Fri Jul 21 20:28:27 2000
--- configure.in Fri Jul 21 18:11:34 2000
***************
*** 112,117 ****
--- 112,118 ----
AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
+ AC_TYPE_SIZE_T
# This is the list of functions which libiberty will provide if they
# are not available on the host.
*** cp-demangle.c.orig Fri Jul 21 20:25:23 2000
--- cp-demangle.c Fri Jul 21 18:02:01 2000
***************
*** 27,32 ****
--- 27,34 ----
#include "config.h"
#endif
+ #include <sys/types.h>
+
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
*** mkstemps.c.orig Fri Jul 21 20:25:49 2000
--- mkstemps.c Fri Jul 21 20:04:52 2000
***************
*** 20,25 ****
--- 20,26 ----
#include "config.h"
#endif
+ #include <sys/types.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif