svn commit: r217128 - in head: gnu/usr.bin/cc sys/arm/include
sys/i386/include sys/mips/include sys/powerpc/include
Tijl Coosemans
tijl at FreeBSD.org
Fri Jan 7 22:57:31 UTC 2011
Author: tijl
Date: Fri Jan 7 22:57:31 2011
New Revision: 217128
URL: http://svn.freebsd.org/changeset/base/217128
Log:
Remove unused support for 64 bit long on 32 bit architectures.
It was used mainly to discover and fix some 64-bit portability problems
before 64-bit arches were widely available.
Discussed with: bde
Approved by: kib (mentor)
Modified:
head/gnu/usr.bin/cc/Makefile.inc
head/sys/arm/include/_limits.h
head/sys/i386/include/_limits.h
head/sys/mips/include/_limits.h
head/sys/powerpc/include/_limits.h
Modified: head/gnu/usr.bin/cc/Makefile.inc
==============================================================================
--- head/gnu/usr.bin/cc/Makefile.inc Fri Jan 7 22:34:56 2011 (r217127)
+++ head/gnu/usr.bin/cc/Makefile.inc Fri Jan 7 22:57:31 2011 (r217128)
@@ -22,12 +22,6 @@ CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\
#CFLAGS+= -DWANT_COMPILER_INVARIANTS
CSTD?= gnu89
-# If building 64-bit longs for the i386, "_LARGE_LONG" should also be defined
-# to get the proper sizes in limits.h
-.if defined(LONG_TYPE_SIZE)
-CFLAGS+= -DLONG_TYPE_SIZE=${LONG_TYPE_SIZE}
-.endif
-
.if ${TARGET_ARCH} != ${MACHINE_ARCH}
CFLAGS+= -DCROSS_COMPILE
.endif
Modified: head/sys/arm/include/_limits.h
==============================================================================
--- head/sys/arm/include/_limits.h Fri Jan 7 22:34:56 2011 (r217127)
+++ head/sys/arm/include/_limits.h Fri Jan 7 22:57:31 2011 (r217128)
@@ -59,16 +59,9 @@
#define __INT_MAX 0x7fffffff /* max value for an int */
#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */
-/* Bad hack for gcc configured to give 64-bit longs. */
-#ifdef _LARGE_LONG
-#define __ULONG_MAX 0xffffffffffffffffUL
-#define __LONG_MAX 0x7fffffffffffffffL
-#define __LONG_MIN (-0x7fffffffffffffffL - 1)
-#else
#define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
#define __LONG_MAX 0x7fffffffL /* max value for a long */
#define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
-#endif
/* max value for an unsigned long long */
#define __ULLONG_MAX 0xffffffffffffffffULL
@@ -87,11 +80,7 @@
#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
-#ifdef _LARGE_LONG
-#define __LONG_BIT 64
-#else
#define __LONG_BIT 32
-#endif
#define __WORD_BIT 32
/* Minimum signal stack size. */
Modified: head/sys/i386/include/_limits.h
==============================================================================
--- head/sys/i386/include/_limits.h Fri Jan 7 22:34:56 2011 (r217127)
+++ head/sys/i386/include/_limits.h Fri Jan 7 22:57:31 2011 (r217128)
@@ -59,16 +59,9 @@
#define __INT_MAX 0x7fffffff /* max value for an int */
#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */
-/* Bad hack for gcc configured to give 64-bit longs. */
-#ifdef _LARGE_LONG
-#define __ULONG_MAX 0xffffffffffffffffUL
-#define __LONG_MAX 0x7fffffffffffffffL
-#define __LONG_MIN (-0x7fffffffffffffffL - 1)
-#else
#define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
#define __LONG_MAX 0x7fffffffL /* max value for a long */
#define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
-#endif
/* max value for an unsigned long long */
#define __ULLONG_MAX 0xffffffffffffffffULL
@@ -87,11 +80,7 @@
#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
-#ifdef _LARGE_LONG
-#define __LONG_BIT 64
-#else
#define __LONG_BIT 32
-#endif
#define __WORD_BIT 32
/*
Modified: head/sys/mips/include/_limits.h
==============================================================================
--- head/sys/mips/include/_limits.h Fri Jan 7 22:34:56 2011 (r217127)
+++ head/sys/mips/include/_limits.h Fri Jan 7 22:57:31 2011 (r217128)
@@ -34,10 +34,6 @@
#ifndef _MACHINE__LIMITS_H_
#define _MACHINE__LIMITS_H_
-#if _MIPS_SZLONG == 64
-#define _LARGE_LONG
-#endif
-
/*
* According to ANSI (section 2.2.4.2), the values below must be usable by
* #if preprocessing directives. Additionally, the expression must have the
@@ -64,15 +60,16 @@
#define __INT_MAX 0x7fffffff /* max value for an int */
#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */
-/* Bad hack for gcc configured to give 64-bit longs. */
-#ifdef _LARGE_LONG
+#ifdef __LP64__
#define __ULONG_MAX 0xffffffffffffffffUL
#define __LONG_MAX 0x7fffffffffffffffL
#define __LONG_MIN (-0x7fffffffffffffffL - 1)
+#define __LONG_BIT 64
#else
#define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
#define __LONG_MAX 0x7fffffffL /* max value for a long */
#define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
+#define __LONG_BIT 32
#endif
/* max value for an unsigned long long */
@@ -92,11 +89,6 @@
#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
-#ifdef _LARGE_LONG
-#define __LONG_BIT 64
-#else
-#define __LONG_BIT 32
-#endif
#define __WORD_BIT 32
#define __MINSIGSTKSZ (512 * 4)
Modified: head/sys/powerpc/include/_limits.h
==============================================================================
--- head/sys/powerpc/include/_limits.h Fri Jan 7 22:34:56 2011 (r217127)
+++ head/sys/powerpc/include/_limits.h Fri Jan 7 22:57:31 2011 (r217128)
@@ -59,14 +59,16 @@
#define __INT_MAX 0x7fffffff /* max value for an int */
#define __INT_MIN (-0x7fffffff - 1) /* min value for an int */
-#if defined(_LARGE_LONG) || defined(__LP64__)
+#ifdef __LP64__
#define __ULONG_MAX 0xffffffffffffffffUL
#define __LONG_MAX 0x7fffffffffffffffL
#define __LONG_MIN (-0x7fffffffffffffffL - 1)
+#define __LONG_BIT 64
#else
#define __ULONG_MAX 0xffffffffUL /* max value for an unsigned long */
#define __LONG_MAX 0x7fffffffL /* max value for a long */
#define __LONG_MIN (-0x7fffffffL - 1) /* min value for a long */
+#define __LONG_BIT 32
#endif
#define __ULLONG_MAX 0xffffffffffffffffULL
@@ -89,11 +91,6 @@
#define __QUAD_MAX __LLONG_MAX /* max value for a quad_t */
#define __QUAD_MIN __LLONG_MIN /* min value for a quad_t */
-#if defined(_LARGE_LONG) || defined(__LP64__)
-#define __LONG_BIT 64
-#else
-#define __LONG_BIT 32
-#endif
#define __WORD_BIT 32
/* Minimum signal stack size. */
More information about the svn-src-head
mailing list