summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-05-21 16:50:52 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-05-21 16:50:52 +0200
commit65bf851838611139239805bee63a7cea4cb0a309 (patch)
tree89865869c0b4ca26bc0f0a2774c43d3b122aa3a1
parent5c1715d8f847a5a3d8b8128d2dcc8a7622a9df1b (diff)
* buildlib/inttypes.h.in:
- remove inttypes.h compatibility as providing such a c99 types compatibility conflicts with the usage of c99 type long long
-rw-r--r--COMPILING1
-rw-r--r--buildlib/config.h.in14
-rw-r--r--buildlib/environment.mak.in1
-rw-r--r--buildlib/inttypes.h.in50
-rw-r--r--buildlib/makefile.in5
-rw-r--r--buildlib/sizetable25
-rw-r--r--configure.in45
-rw-r--r--debian/changelog3
8 files changed, 4 insertions, 140 deletions
diff --git a/COMPILING b/COMPILING
index 5ea5e52d1..bc934c846 100644
--- a/COMPILING
+++ b/COMPILING
@@ -36,7 +36,6 @@ functionality. Patches to make autoconf detect these cases and generate the
required shims are OK.
Current shims:
- * C99 integer types 'inttypes.h'
* sys/statvfs.h to convert from BSD/old-glibc statfs to SUS statvfs
* rfc2553 hostname resolution (methods/rfc*), shims to normal gethostbyname.
The more adventurous could steal the KAME IPv6 enabled resolvers for those
diff --git a/buildlib/config.h.in b/buildlib/config.h.in
index 656705038..85d3883fc 100644
--- a/buildlib/config.h.in
+++ b/buildlib/config.h.in
@@ -2,20 +2,6 @@
byte first (like Motorola and SPARC, unlike Intel and VAX). */
#undef WORDS_BIGENDIAN
-/* The following 4 are only used by inttypes.h shim if the system lacks
- inttypes.h */
-/* The number of bytes in a usigned char. */
-#undef SIZEOF_CHAR
-
-/* The number of bytes in a unsigned int. */
-#undef SIZEOF_INT
-
-/* The number of bytes in a unsigned long. */
-#undef SIZEOF_LONG
-
-/* The number of bytes in a unsigned short. */
-#undef SIZEOF_SHORT
-
/* Define if we have the timegm() function */
#undef HAVE_TIMEGM
diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in
index 7ceae70ce..fc859951e 100644
--- a/buildlib/environment.mak.in
+++ b/buildlib/environment.mak.in
@@ -54,7 +54,6 @@ BDBLIB = @BDBLIB@
INTLLIBS = @INTLLIBS@
# Shim Headerfile control
-HAVE_C9X = @HAVE_C9X@
HAVE_STATVFS = @HAVE_STATVFS@
HAVE_ZLIB = @HAVE_ZLIB@
HAVE_BZ2 = @HAVE_BZ2@
diff --git a/buildlib/inttypes.h.in b/buildlib/inttypes.h.in
deleted file mode 100644
index 3b43b7672..000000000
--- a/buildlib/inttypes.h.in
+++ /dev/null
@@ -1,50 +0,0 @@
-/* This is an ISO C 9X header file. We omit this copy to the include
- directory if the local platform does not have inttypes.h, it contains
- [u]int[8,16,32]_t fixed width types */
-
-#include <config.h>
-
-#undef int32_t
-#undef uint32_t
-#undef int16_t
-#undef uint16_t
-#undef int8_t
-#undef uint8_t
-
-/* Generate the fixed bit size types */
-#if SIZEOF_INT == 4
- typedef int int32_t;
- typedef unsigned int uint32_t;
-#else
-# if SIZEOF_LONG == 4
- typedef long int32_t;
- typedef unsigned long uint32_t;
-# else
-# if SIZEOF_SHORT == 4
- typedef short int32_t;
- typedef unsigned short uint32_t;
-# else
-# error Must have a form of 32-bit integer
-# endif
-# endif
-#endif
-
-#if SIZEOF_INT == 2
- typedef int int16_t;
- typedef unsigned int uint16_t;
-#else
-# if SIZEOF_LONG == 2
- typedef long int16_t;
- typedef unsigned long uint16_t;
-# else
-# if SIZEOF_SHORT == 2
- typedef short int16_t;
- typedef unsigned short uint16_t;
-# else
-# error Must have a form of 16-bit integer
-# endif
-# endif
-#endif
-
-typedef signed char int8_t;
-typedef unsigned char uint8_t;
diff --git a/buildlib/makefile.in b/buildlib/makefile.in
index 756565f40..66144cfc6 100644
--- a/buildlib/makefile.in
+++ b/buildlib/makefile.in
@@ -31,11 +31,6 @@ maintainer-clean dist-clean pristine sanity distclean:
.PHONY: dirs
dirs:
$(MAKE) -C $(SRCDIR) -f Makefile $@
-ifeq ($(HAVE_C9X),yes)
- @rm -f include/inttypes.h > /dev/null 2>&1
-else
- @cp -p $(SRCDIR)/buildlib/inttypes.h.in include/inttypes.h
-endif
ifeq ($(HAVE_STATVFS),yes)
@rm -f include/statvfs.h > /dev/null 2>&1
else
diff --git a/buildlib/sizetable b/buildlib/sizetable
deleted file mode 100644
index 372ddd091..000000000
--- a/buildlib/sizetable
+++ /dev/null
@@ -1,25 +0,0 @@
-#
-# This file lists common architectures for cross-compilation (CPUs, not
-# OSs), and the endian-ness and relative type sizes. It is not needed for
-# native compilation.
-#
-# If you wish to cross-compile APT, and your architecture is not listed
-# here, you should add it, and submit it by email to the APT team at
-# <apt@packages.debian.org>.
-#
-# This is used primarily for the MD5 algorithm.
-# The format is:-
-# CPU endian sizeof: char, int, short, long
-i386 little 1 4 2 4
-amd64 little 1 4 2 8
-armeb big 1 4 2 4
-arm little 1 4 2 4
-alpha little 1 4 2 8
-mipsel little 1 4 2 4
-sparc big 1 4 2 4
-sparc64 big 1 4 2 8
-m68k big 1 4 2 4
-powerpc big 1 4 2 4
-mips big 1 4 2 4
-hppa big 1 4 2 4
-m32r big 1 4 2 4
diff --git a/configure.in b/configure.in
index f98f288b1..d574c18e5 100644
--- a/configure.in
+++ b/configure.in
@@ -119,12 +119,6 @@ fi
AC_MSG_RESULT($archset)
AC_DEFINE_UNQUOTED(COMMON_ARCH,"$archset")
-dnl We use C99 types if at all possible
-AC_CACHE_CHECK([for C99 integer types],apt_cv_c9x_ints,[
- AC_TRY_COMPILE([#include <inttypes.h>],
- [uint8_t Foo1;uint16_t Foo2;uint32_t Foo3;],
- apt_cv_c9x_ints=yes,apt_cv_c9x_ints=no)])
-
dnl Single Unix Spec statvfs
AC_CHECK_FUNC(statvfs,[HAVE_STATVFS=yes])
AC_SUBST(HAVE_STATVFS)
@@ -144,46 +138,9 @@ dnl We should use the real timegm function if we have it.
AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
AC_SUBST(HAVE_TIMEGM)
-dnl Check the sizes etc. of the architecture
-dnl This is stupid, it should just use the AC macros like it does below
-dnl Cross compilers can either get a real C library or preload the cache
-dnl with their size values.
-changequote(,)
-archline="`awk \" ! /^#|^\\\$/ {if (match(\\\"$archset\\\",\\\$1)) {print; exit}}\" $srcdir/buildlib/sizetable | cut -f 2- -d ' '`"
-if test "x$archline" != "x"; then
- changequote([,])
- set $archline
- if test "$1" = "little"; then
- ac_cv_c_bigendian=no
- else
- ac_cv_c_bigendian=yes
- fi
- size_char=$2
- size_int=$3
- size_short=$4
- size_long=$5
-fi
-
-dnl I wonder what AC_C_BIGENDIAN does if you cross compile...
-dnl This is probably bogus, as above we only care if we have to build our own
-dnl C9x types.
-if test "$cross_compiling" = "yes" -a "x$archline" = "x"; then
- AC_MSG_ERROR(When cross compiling, architecture must be present in sizetable)
-fi
+dnl Check the architecture
AC_C_BIGENDIAN
-dnl We do not need this if we have inttypes!
-HAVE_C9X=yes
-if test x"$apt_cv_c9x_ints" = x"no"; then
- AC_CHECK_SIZEOF(char,$size_char)
- AC_CHECK_SIZEOF(int,$size_int)
- AC_CHECK_SIZEOF(short,$size_short)
- AC_CHECK_SIZEOF(long,$size_long)
-
- HAVE_C9X=
- AC_SUBST(HAVE_C9X)
-fi
-
dnl HP-UX sux..
AC_MSG_CHECKING(for missing socklen_t)
AC_EGREP_HEADER(socklen_t, sys/socket.h,[AC_MSG_RESULT(no)],[
diff --git a/debian/changelog b/debian/changelog
index aeda80024..b23232c7b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,9 @@ apt (0.9.5) UNRELEASED; urgency=low
* buildlib/podomain.mak:
- ensure that all sources end up in the srclist so that we don't
forget to extract half of the translation strings
+ * buildlib/inttypes.h.in:
+ - remove inttypes.h compatibility as providing such a c99 types
+ compatibility conflicts with the usage of c99 type long long
-- David Kalnischkies <kalnischkies@gmail.com> Mon, 21 May 2012 15:10:49 +0200