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]
Other format: [Raw text]

[Bug other/12969] New: Including sys/byteorder.h on Sun Solaris 2.9 breaks configure checks


In gcc 3.3.2, the following change was made from gcc 3.3.1:

diff -ru gcc-3.3.1/gcc/fixinc/inclhack.def gcc-3.3.2/gcc/fixinc/inclhack.def
--- gcc-3.3.1/gcc/fixinc/inclhack.def   Wed Jul  2 01:47:05 2003
+++ gcc-3.3.2/gcc/fixinc/inclhack.def   Tue Oct 14 06:42:40 2003
@@ -297,19 +297,10 @@

 /*
  *  Completely replace <sys/byteorder.h>; with a file that implements gcc's
- *  optimized byteswapping.  Restricted to "SVR4" machines until either
- *  it is shown to be safe to replace this file always, or we get bolder ;-)
+ *  optimized byteswapping.
  */
 fix = {
     hackname = AAB_svr4_replace_byteorder;
-#ifndef SVR5
-    mach = "*-*-sysv4*";
-    mach = "i[34567]86-*-sysv5*";
-    mach = "i[34567]86-*-udk*";
-    mach = "i[34567]86-*-solaris2.[0-4]";
-    mach = "powerpcle-*-solaris2.[0-4]";
-    mach = "sparc-*-solaris2.[0-4]";
-#endif /* SVR5 */
     files    = sys/byteorder.h;
     replace  = '#ifndef _SYS_BYTEORDER_H
 \#define _SYS_BYTEORDER_H

so a new sys/byteorder.h is now generated by fixincludes. However, several
configure checks for common software, like openssh, use the c preprocessor to
determine if a header file exists. If you run the c-preprocessor on the
following file in gcc 3.3.1, you get:

pkw@hedwig:~$ cpp --version
cpp (GCC) 3.3.1
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pkw@hedwig:~$ echo "#include <netdb.h>" > test.c
pkw@hedwig:~$ cpp test.c > /dev/null
pkw@hedwig:~$ echo $?
0

With gcc 3.3.2, you get:

pkw@hedwig:~$ /opt/csw/gcc3/bin/cpp --version
cpp (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

pkw@hedwig:~$ echo "#include <netdb.h>" > test.c
pkw@hedwig:~$ /opt/csw/gcc3/bin/cpp test.c > /dev/null
In file included from /usr/include/netinet/in.h:48,
                 from /usr/include/netdb.h:98,
                 from test.c:1:
/opt/csw/gcc3/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/include/sys/byteorder.h:26:2:
#error You lose! This file is only useful with GNU compilers.
pkw@hedwig:~$ echo $?
1

-- 
           Summary: Including sys/byteorder.h on Sun Solaris 2.9 breaks
                    configure checks
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pkw at austin dot rr dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.9
  GCC host triplet: sparc-sun-solaris2.9
GCC target triplet: sparc-sun-solaris2.9


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12969


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