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]

UnixWare 7 g++ Failures: Proposed inclhack.def patch


Most of the g++ testsuite failures for 3.1 on UnixWare 7 appear to be from the following warnings.
Hacking the wchar.h file output from fixincludes as below removes the warning for the testcase I tried
Is using `_GLIBCPP_HAVE_WCHAR_H' getting too specific?

The following patch to inclhack.def for fixincludes is untested - autogen 4.5.12 doesn't like the
current inclhack.def. Also does it count as a minor patch since my corporate assignment
is in abeyance?

--- inclhack.def.orig    Thu Sep 13 12:13:20 2001
+++ inclhack.def    Sat Nov  3 19:30:58 2001
@@ -2826,6 +2826,27 @@ fix = {


 /*
+ *  UnixWare 7.1.0 doesn't expose v{f,s,}wscanf by default, but
+ *  libstdc++-v3/include/bits/std_cwchar.h warn if they aren't declared.
+ *  - dependant on strict_ansi_not having been run.
+ */
+#ifdef SVR5
+fix = {
+    hackname = svr5_wchar_glibcpp;
+    mach     = 'i[34567]86-*-sysv5*';
+    files    = wchar.h;
+    select   = "!defined\(__STRICT_ANSI__\)[ \t]*"
+         "&&[ \t]*!defined\(_XOPEN_SOURCE\)";
+    c_fix     = format;
+    c_fix_arg = "(%0) || defined(_GLIBCPP_HAVE_WCHAR_H)";
+
+    test_text =
+    "#if  !defined(__STRICT_ANSI__) && !defined(_XOPEN_SOURCE)\n";
+};
+#endif /*  SVR5 */
+
+
+/*
  *  Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
  *  in string.h on sysV68
  *  Correct the return type for strlen in string.h on Lynx.
@@ -2990,7 +3011,6 @@ fix = {
     select   = ULTRIX;

     c_fix     = format;
-    c_fix_arg = "struct utsname;\n%0";
     c_fix_arg = "^[ \t]*extern[ \t]*int[ \t]*uname\\(\\);";

     test_text =
spawn /devel/src/gcc-3.1-experimental/gcc/testsuite/../g++ -B/devel/src/gcc-3.1-experimental/gcc/testsuite/../
/devel/src/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C -nostdinc++
-I/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/i686-unknown-sysv5UnixWare7.1.0
-I/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include -I/devel/src/gcc/libstdc++-v3/libsupc++
-I/devel/src/gcc/libstdc++-v3/libio -I/devel/src/gcc/libstdc++-v3/include/backward -I/devel/src/gcc/libstdc++-v3/testsuite -fmessage-length=0 -ansi
-pedantic-errors -Wno-long-long -lstdc++ -L/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0//libstdc++-v3/src/.libs
-L/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0//libiberty -lm -o
/devel/src/gcc-3.1-experimental/gcc/testsuite/g++-benjamin-15071-C.exe
In file included from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/fpos.h:40,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_iosfwd.h:41,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_ios.h:39,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_ostream.h:39,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_iostream.h:40,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/iostream:36,
                 from /devel/src/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C:5:
/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_cwchar.h:146: `vfwscanf' not declared
/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_cwchar.h:148: `vswscanf' not declared
/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_cwchar.h:150: `vwscanf' not declared
compiler exited with status 1
output is:
In file included from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/fpos.h:40,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_iosfwd.h:41,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_ios.h:39,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_ostream.h:39,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_iostream.h:40,
                 from /devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/iostream:36,
                 from /devel/src/gcc/gcc/testsuite/g++.old-deja/g++.benjamin/15071.C:5:
/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_cwchar.h:146: `vfwscanf' not declared
/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_cwchar.h:148: `vswscanf' not declared
/devel/src/gcc-3.1-experimental/i686-unknown-sysv5UnixWare7.1.0/libstdc++-v3/include/bits/std_cwchar.h:150: `vwscanf' not declared

FAIL: g++.benjamin/15071.C (test for excess errors)

--- include/wchar.h.orig Wed Oct 31 19:13:26 2001
+++ include/wchar.h Wed Oct 31 19:01:33 2001
@@ -208,7 +208,7 @@

 #endif /*_XOPEN_SOURCE*/

-#if  !defined(__STRICT_ANSI__) && !defined(_XOPEN_SOURCE)
+#if  (!defined(__STRICT_ANSI__) && !defined(_XOPEN_SOURCE)) || defined(_GLIBCPP_HAVE_WCHAR_H)
 extern int    mbswidth(const char *, size_t);
 extern int    wcwidth(wint_t);
 extern int    vfwscanf(struct _FILE_ *, const wchar_t *, _VA_LIST);


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