Joseph S. Myers - fixinc v. glibc <values.h>

Bruce Korb bkorb@sco.COM
Wed Nov 29 17:26:00 GMT 2000


This diff is a consequence of this "fix":

  /*
   *  HPUX 10.x sys/param.h defines MAXINT which clashes with values.h
   */
  fix = {
    hackname  = hpux_maxint;
    files     = sys/param.h;
    files     = values.h;
    select    = "^#[ \t]*define[ \t]*MAXINT[ \t]";

    c_fix     = format;
    c_fix_arg = "#ifndef MAXINT\n%0\n#endif";
    c_fix_arg = "^#[ \t]*define[ \t]*MAXINT[ \t].*";

    test_text = '#define MAXINT 0x7FFFFFFF';
  };

I think from the comment, we can add:

  test =
  "-n \"`egrep '#[ \t]*define[ \t]+MAXINT[ \t]' sys/param.h`\"";

which will cause the fix to be applied only if the egrep
finds matching text in sys/param.h.  (The fixinclude working
directory is /usr/include.)
Title: Joseph S. Myers - fixinc v. glibc <values.h>














This is the mail archive of the 
gcc-bugs@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 ]
  






fixinc v. glibc <values.h>



To : <gcc-bugs at gcc dot gnu dot org>,  <libc-alpha at sources dot redhat dot com>
Subject : fixinc v. glibc <values.h>
>From : "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
Date : Thu, 23 Nov 2000 12:52:57 +0000 (GMT)






GCC's fixincludes makes the following changes to glibc 2.2's
<values.h>.  One of glibc and fixincludes is presumably buggy here;
which?

--- /usr/include/values.h	Fri Nov 10 10:24:00 2000
+++ values.h	Thu Nov 23 10:41:05 2000
@@ -1,3 +1,12 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"/usr/include/values.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
 /* Old compatibility names for <limits.h> and <float.h> constants.
    Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
@@ -42,7 +51,9 @@
 #define	MINLONG		LONG_MIN

 #define	MAXSHORT	SHRT_MAX
+#ifndef MAXINT
 #define	MAXINT		INT_MAX
+#endif
 #define	MAXLONG		LONG_MAX

 #define HIBITS		MINSHORT

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc-bugs mailing list