This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

3.0.1 PATCH: Fix gcc.c-torture/execute/builtin-abs-[12].c on Tru64 UNIX


Looking at the remaining testsuite failures on Tru64 UNIX, I noticed that
builtin-abs-1.c (and -2.c) didn't compile because __LONG_LONG_MAX__ was
undeclared.  I could trace this down as follows:

Tru64 UNIX V4.0F and V5.1 has a /usr/include/limits.h that needs to be
fixincluded, so the installation procedure installs that fixed version as
include/syslimits.h.  The installed limits.h (based on limitx.h, glimits.h,
and limity.h) basically looked like this:

#include "syslimits.h"

#ifndef _MACH_MACHLIMITS_H_

/* _MACH_MACHLIMITS_H_ is used on OSF/1.  */
#define _MACH_MACHLIMITS_H_

<body of glimits.h defining __LONG_LONG_MAX__>

#endif /* _MACH_MACHLIMITS_H_ */

But syslimits.h already included <machine/machlimits.h>, which defines
_MACH_MACHLIMITS_H_, so the definition of __LONG_LONG_MAX__ never happens,
leading to the described testsuite failure.  I think the inclusion guard
above can simply be removed (it existed since rev. 1.2 in the gcc-cvsroot
tar file, dating back to 1991), since the body of glimits.h always
undefines the system macros before defining it's own version.

The patch below implements this, bootstrapped on alpha-dec-osf5.1 with no
regressions and fixes the two affected testcases.

Ok for branch and mainline?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University

Email: ro@TechFak.Uni-Bielefeld.DE


Mon Jul 16 19:57:19 2001  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	* glimits.h (_MACH_MACHLIMITS_H_): Delete.

===================================================================
RCS file: gcc/RCS/glimits.h,v
retrieving revision 1.1
diff -up -r1.1 gcc/glimits.h
--- gcc/glimits.h	2000/07/21 00:47:27	1.1
+++ gcc/glimits.h	2000/07/20 22:47:27
@@ -1,9 +1,5 @@
 #ifndef _LIMITS_H___
-#ifndef _MACH_MACHLIMITS_H_
-
-/* _MACH_MACHLIMITS_H_ is used on OSF/1.  */
 #define _LIMITS_H___
-#define _MACH_MACHLIMITS_H_
 
 /* Number of bits in a `char'.  */
 #undef CHAR_BIT
@@ -107,5 +103,4 @@
 #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
 #endif
 
-#endif /* _MACH_MACHLIMITS_H_ */
 #endif /* _LIMITS_H___ */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]