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
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
INTLLIBS = @INTLLIBS@
# Shim Headerfile control
-HAVE_C9X = @HAVE_C9X@
HAVE_STATVFS = @HAVE_STATVFS@
HAVE_ZLIB = @HAVE_ZLIB@
HAVE_BZ2 = @HAVE_BZ2@
+++ /dev/null
-/* 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;
.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
+++ /dev/null
-#
-# 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
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)
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)],[
* 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