summaryrefslogtreecommitdiff
path: root/fixincludes
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-12-06 08:28:35 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-12-06 08:28:35 +0000
commit3fc92e702e2a3a109cacb81416557d550e26ce44 (patch)
treebba0202d063e46f1ca52ae47268984f42a318896 /fixincludes
parent7376f39723c7cbcc0112245964801670f15a12f8 (diff)
inclhack.def (suse_linux_vt_cxx): New fix for linux/vt.h being not compatible with C++.
2013-12-06 Richard Biener <rguenther@suse.de> * inclhack.def (suse_linux_vt_cxx): New fix for linux/vt.h being not compatible with C++. * tests/base/linux/vt.h: New test. From-SVN: r205729
Diffstat (limited to 'fixincludes')
-rw-r--r--fixincludes/ChangeLog7
-rw-r--r--fixincludes/fixincl.x51
-rw-r--r--fixincludes/inclhack.def14
-rw-r--r--fixincludes/tests/base/linux/vt.h14
4 files changed, 81 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index 925423c3822..5e48ce17ad8 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,10 @@
+2013-12-06 Richard Biener <rguenther@suse.de>
+
+ * inclhack.def (suse_linux_vt_cxx): New fix for linux/vt.h
+ being not compatible with C++.
+ * fixincl.x: Regenerate.
+ * tests/base/linux/vt.h: New test.
+
2013-09-20 Alan Modra <amodra@gmail.com>
* configure: Regenerate.
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
index eb2ee648fba..ec585cbd5a3 100644
--- a/fixincludes/fixincl.x
+++ b/fixincludes/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed August 31, 2013 at 04:29:02 PM by AutoGen 5.12
+ * It has been AutoGen-ed December 6, 2013 at 09:26:10 AM by AutoGen 5.11.8
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Aug 31 16:29:02 PDT 2013
+/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Dec 6 09:26:10 CET 2013
*
* You must regenerate it. Use the ./genfixes script.
*
@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
- * This file contains 228 fixup descriptions.
+ * This file contains 229 fixup descriptions.
*
* See README for more information.
*
@@ -7871,6 +7871,41 @@ static const char* apzSunos_StrlenPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Suse_Linux_Vt_Cxx fix
+ */
+tSCC zSuse_Linux_Vt_CxxName[] =
+ "suse_linux_vt_cxx";
+
+/*
+ * File name selection pattern
+ */
+tSCC zSuse_Linux_Vt_CxxList[] =
+ "linux/vt.h\0";
+/*
+ * Machine/OS name selection pattern
+ */
+#define apzSuse_Linux_Vt_CxxMachs (const char**)NULL
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zSuse_Linux_Vt_CxxSelect0[] =
+ "^[ \t]*unsigned int new;";
+
+#define SUSE_LINUX_VT_CXX_TEST_CT 1
+static tTestDesc aSuse_Linux_Vt_CxxTests[] = {
+ { TT_EGREP, zSuse_Linux_Vt_CxxSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Suse_Linux_Vt_Cxx
+ */
+static const char* apzSuse_Linux_Vt_CxxPatch[] = {
+ "format",
+ "unsigned int newev;",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Svr4_Disable_Opt fix
*/
tSCC zSvr4_Disable_OptName[] =
@@ -9368,9 +9403,9 @@ static const char* apzComplier_H_TradcppPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 267
+#define REGEX_COUNT 268
#define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT 228
+#define FIX_COUNT 229
/*
* Enumerate the fixes
@@ -9566,6 +9601,7 @@ typedef enum {
SUN_RUSERS_SEMI_FIXIDX,
SUN_SIGNAL_FIXIDX,
SUNOS_STRLEN_FIXIDX,
+ SUSE_LINUX_VT_CXX_FIXIDX,
SVR4_DISABLE_OPT_FIXIDX,
SVR4_GETCWD_FIXIDX,
SVR4_PROFIL_FIXIDX,
@@ -10557,6 +10593,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSunos_StrlenTests, apzSunos_StrlenPatch, 0 },
+ { zSuse_Linux_Vt_CxxName, zSuse_Linux_Vt_CxxList,
+ apzSuse_Linux_Vt_CxxMachs,
+ SUSE_LINUX_VT_CXX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aSuse_Linux_Vt_CxxTests, apzSuse_Linux_Vt_CxxPatch, 0 },
+
{ zSvr4_Disable_OptName, zSvr4_Disable_OptList,
apzSvr4_Disable_OptMachs,
SVR4_DISABLE_OPT_TEST_CT, FD_MACH_ONLY,
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 996356a3930..11ac9448c5b 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -4066,6 +4066,20 @@ fix = {
};
/*
+ * Linux kernel's vt.h breaks C++
+ */
+fix = {
+ hackname = suse_linux_vt_cxx;
+ files = linux/vt.h;
+
+ select = "^[ \t]*unsigned int new;";
+ c_fix = format;
+ c_fix_arg = "unsigned int newev;";
+
+ test_text = " unsigned int new; /* New console (if changing) */";
+};
+
+/*
* Disable apparent native compiler optimization cruft in SVR4.2 <string.h>
* that is visible to any ANSI compiler using this include. Simply
* delete the lines that #define some string functions to internal forms.
diff --git a/fixincludes/tests/base/linux/vt.h b/fixincludes/tests/base/linux/vt.h
new file mode 100644
index 00000000000..4814ab642c0
--- /dev/null
+++ b/fixincludes/tests/base/linux/vt.h
@@ -0,0 +1,14 @@
+/* DO NOT EDIT THIS FILE.
+
+ It has been auto-edited by fixincludes from:
+
+ "fixinc/tests/inc/linux/vt.h"
+
+ This had to be done to correct non-standard usages in the
+ original, manufacturer supplied header file. */
+
+
+
+#if defined( SUSE_LINUX_VT_CXX_CHECK )
+unsigned int newev; /* New console (if changing) */
+#endif /* SUSE_LINUX_VT_CXX_CHECK */