mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
Remove unused u64 type definitions.
* configure.ac: Remove check for uint64 and UINT64_C. * include/types.h: Remove u64 stuff. * common/types.h: Ditto. -- There have been relicts from GnuPG-1. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
0ee66a6f66
commit
362a30d8c2
@ -96,20 +96,6 @@
|
||||
# define HAVE_U32_TYPEDEF
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_U64_TYPEDEF
|
||||
# undef u64 /* There might be a macro with this name. */
|
||||
# if SIZEOF_UNSIGNED_INT == 8
|
||||
typedef unsigned int u64;
|
||||
# define HAVE_U64_TYPEDEF
|
||||
# elif SIZEOF_UNSIGNED_LONG == 8
|
||||
typedef unsigned long u64;
|
||||
# define HAVE_U64_TYPEDEF
|
||||
# elif __GNUC__ >= 2 || defined(__SUNPRO_C)
|
||||
typedef unsigned long long u64;
|
||||
# define HAVE_U64_TYPEDEF
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
/* Some GCC attributes. Note that we use also define some in
|
||||
mischelp.h, but this header and types.h are not always included.
|
||||
|
13
configure.ac
13
configure.ac
@ -797,6 +797,7 @@ AC_SUBST(LIBUSB_LIBS)
|
||||
|
||||
#
|
||||
# Check wether it is necessary to link against libdl.
|
||||
# (For example to load libpcsclite)
|
||||
#
|
||||
gnupg_dlopen_save_libs="$LIBS"
|
||||
LIBS=""
|
||||
@ -1140,7 +1141,7 @@ fi
|
||||
# We use HAVE_LANGINFO_CODESET in a couple of places.
|
||||
AM_LANGINFO_CODESET
|
||||
|
||||
# Checks required for our use locales
|
||||
# Checks required for our use of locales
|
||||
gt_LC_MESSAGES
|
||||
|
||||
|
||||
@ -1216,16 +1217,6 @@ AC_CHECK_SIZEOF(time_t,,[[
|
||||
GNUPG_TIME_T_UNSIGNED
|
||||
|
||||
|
||||
# Ensure that we have UINT64_C before we bother to check for uint64_t
|
||||
# Fixme: really needed in gnupg? I think it is only useful in libcgrypt.
|
||||
AC_CACHE_CHECK([for UINT64_C],[gnupg_cv_uint64_c_works],
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <inttypes.h>]],
|
||||
[[uint64_t foo=UINT64_C(42);]])],
|
||||
gnupg_cv_uint64_c_works=yes,gnupg_cv_uint64_c_works=no))
|
||||
if test "$gnupg_cv_uint64_c_works" = "yes" ; then
|
||||
AC_CHECK_SIZEOF(uint64_t)
|
||||
fi
|
||||
|
||||
if test "$ac_cv_sizeof_unsigned_short" = "0" \
|
||||
|| test "$ac_cv_sizeof_unsigned_int" = "0" \
|
||||
|| test "$ac_cv_sizeof_unsigned_long" = "0"; then
|
||||
|
@ -21,8 +21,7 @@
|
||||
#define G10_TYPES_H
|
||||
|
||||
#ifdef HAVE_INTTYPES_H
|
||||
/* For uint64_t */
|
||||
#include <inttypes.h>
|
||||
# include <inttypes.h>
|
||||
#endif
|
||||
|
||||
/* The AC_CHECK_SIZEOF() in configure fails for some machines.
|
||||
@ -93,40 +92,12 @@ typedef unsigned long u32;
|
||||
#define HAVE_U32_TYPEDEF
|
||||
#endif
|
||||
|
||||
/****************
|
||||
* Warning: Some systems segfault when this u64 typedef and
|
||||
* the dummy code in cipher/md.c is not available. Examples are
|
||||
* Solaris and IRIX.
|
||||
*/
|
||||
#ifndef HAVE_U64_TYPEDEF
|
||||
#undef u64 /* maybe there is a macro with this name */
|
||||
#if SIZEOF_UINT64_T == 8
|
||||
typedef uint64_t u64;
|
||||
#define U64_C(c) (UINT64_C(c))
|
||||
#define HAVE_U64_TYPEDEF
|
||||
#elif SIZEOF_UNSIGNED_INT == 8
|
||||
typedef unsigned int u64;
|
||||
#define U64_C(c) (c ## U)
|
||||
#define HAVE_U64_TYPEDEF
|
||||
#elif SIZEOF_UNSIGNED_LONG == 8
|
||||
typedef unsigned long u64;
|
||||
#define U64_C(c) (c ## UL)
|
||||
#define HAVE_U64_TYPEDEF
|
||||
#elif SIZEOF_UNSIGNED_LONG_LONG == 8
|
||||
typedef unsigned long long u64;
|
||||
#define U64_C(c) (c ## ULL)
|
||||
#define HAVE_U64_TYPEDEF
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef union {
|
||||
int a;
|
||||
short b;
|
||||
char c[1];
|
||||
long d;
|
||||
#ifdef HAVE_U64_TYPEDEF
|
||||
u64 e;
|
||||
#endif
|
||||
float f;
|
||||
double g;
|
||||
} PROPERLY_ALIGNED_TYPE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user