Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
88acf854
Commit
88acf854
authored
24 years ago
by
Bruce Korb
Committed by
Bruce Korb
24 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix up some of the testing
From-SVN: r33886
parent
aeb4f5ef
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
184 additions
and
99 deletions
+184
-99
gcc/ChangeLog
+6
-0
gcc/fixinc/check.diff
+64
-3
gcc/fixinc/fixfixes.c
+1
-1
gcc/fixinc/fixincl.tpl
+1
-1
gcc/fixinc/fixincl.x
+82
-78
gcc/fixinc/genfixes
+1
-1
gcc/fixinc/inclhack.def
+29
-15
No files found.
gcc/ChangeLog
View file @
88acf854
...
...
@@ -86,6 +86,12 @@ Fri May 12 19:03:58 2000 Philippe De Muyter <phdm@macqel.be>
2000
-
05
-
12
Bruce
Korb
<
bkorb
@gnu
.
org
>
*
fixinc
/
fixfixes
.
c
(
format_write
)
:
buglet
&
relaxed
rules
*
fixinc
/
check
.
diff
:
updated
*
fixinc
/
inclhack
.
def
:
corrected
&
added
some
test_text
-
s
*
fixinc
/
genfixes
:
removed
unneeded
options
to
autogen
invocation
*
fixinc
/
fixincl
.
tpl
:
Specified
the
output
file
*
fixinc
/
fixfixes
.
c
:
visual
appearance
*
fixinc
/
fixincl
.
x
:
regenerate
2000
-
05
-
12
Zack
Weinberg
<
zack
@wolery
.
cumb
.
org
>
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/check.diff
View file @
88acf854
...
...
@@ -88,7 +88,7 @@
--- 1,7 ----
+ #ifdef __cplusplus
+ #include <stdlib.h>
+ #endif
+ #endif
/* BROKEN_ASSERT_STDLIB_CHECK fix stamp */
+ #include <stdio.h>
...
...
@@ -156,7 +156,7 @@
*** inc/stdio.h
--- res/stdio.h
***************
*** 1,
7
****
*** 1,
12
****
#ifndef ALPHA_GETOPT_CHECK
...
...
@@ -164,7 +164,12 @@
#endif /* ALPHA_GETOPT_CHECK */
--- 1,9 ----
#ifndef ISC_OMITS_WITH_STDC_CHECK
! #if !defined(__STDC__) && !defined(_POSIX_SOURCE) /* ? ! */
int foo;
#endif
#endif /* ISC_OMITS_WITH_STDC_CHECK */
--- 1,14 ----
+ #define __need___va_list
+ #include <stdarg.h>
...
...
@@ -174,6 +179,11 @@
#endif /* ALPHA_GETOPT_CHECK */
#ifndef ISC_OMITS_WITH_STDC_CHECK
! #if !defined(_POSIX_SOURCE) /* ? ! */
int foo;
#endif
#endif /* ISC_OMITS_WITH_STDC_CHECK */
*** inc/stdlib.h
--- res/stdlib.h
***************
...
...
@@ -246,6 +256,38 @@
extern int foo;
#endif
#endif /* ALPHA_PARENS_CHECK */
*** inc/sys/file.h
--- res/sys/file.h
***************
*** 1,5 ****
#ifndef HP_SYSFILE_CHECK
! extern void foo(...); /* HPUX_SOURCE - bad varargs */
#endif /* HP_SYSFILE_CHECK */
--- 1,5 ----
#ifndef HP_SYSFILE_CHECK
! extern void foo(struct file *, ...); /* HPUX_SOURCE - bad varargs */
#endif /* HP_SYSFILE_CHECK */
*** inc/sys/mman.h
--- res/sys/mman.h
***************
*** 1,5 ****
--- 1,12 ----
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* CXX_UNREADY_CHECK */
+
#ifndef CXX_UNREADY_CHECK
extern void* malloc( size_t );
#endif /* CXX_UNREADY_CHECK */
+ #ifdef __cplusplus
+ }
+ #endif /* CXX_UNREADY_CHECK */
*** inc/sys/param.h
--- res/sys/param.h
***************
...
...
@@ -290,6 +332,25 @@
#ifndef AIX_VOLATILE_CHECK
! typedef int sig_atomic_t;
#endif /* AIX_VOLATILE_CHECK */
*** inc/sys/spinlock.h
--- res/sys/spinlock.h
***************
*** 1,7 ****
#ifndef HP_INLINE_CHECK
! # include "../machine/inline.h"
# include "../machine/dontfix.h"
! # include "../machine/psl.h"
#endif /* HP_INLINE_CHECK */
--- 1,7 ----
#ifndef HP_INLINE_CHECK
! # include <machine/inline.h>
# include "../machine/dontfix.h"
! # include <machine/psl.h>
#endif /* HP_INLINE_CHECK */
*** inc/sys/time.h
--- res/sys/time.h
***************
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/fixfixes.c
View file @
88acf854
...
...
@@ -69,7 +69,7 @@ typedef struct {
_FT_( "format", format_fix ) \
_FT_( "char_macro_use", char_macro_use_fix ) \
_FT_( "char_macro_def", char_macro_def_fix ) \
_FT_( "machine_name",
machine_name_fix )
_FT_( "machine_name",
machine_name_fix )
#define FIX_PROC_HEAD( fix ) \
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/fixincl.tpl
View file @
88acf854
[= autogen template -*- Mode: C -*-
x =]
x
=fixincl.x
=]
/*
* DO NOT EDIT THIS FILE - it has been generated
*
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/fixincl.x
View file @
88acf854
...
...
@@ -754,18 +754,22 @@ tSCC zAix_SyswaitList[] =
* content selection pattern - do fix if pattern found
*/
tSCC zAix_SyswaitSelect0[] =
"^extern pid_t wait3\\(\\);\n";
tSCC zAix_SyswaitSelect1[] =
"bos325,";
#define AIX_SYSWAIT_TEST_CT
1
#define AIX_SYSWAIT_TEST_CT
2
tTestDesc aAix_SyswaitTests[] = {
{ TT_EGREP, zAix_SyswaitSelect0, (regex_t*)NULL }, };
{ TT_EGREP, zAix_SyswaitSelect0, (regex_t*)NULL },
{ TT_EGREP, zAix_SyswaitSelect1, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Aix_Syswait
*/
const char* apzAix_SyswaitPatch[] = { "sed",
"-e", "/^extern pid_t wait3();$/i\\\n\
struct rusage;\n",
const char* apzAix_SyswaitPatch[] = {
"format",
"struct rusage;\n\
%0",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
...
...
@@ -1257,7 +1261,7 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed",
"-e", "1i\\\n\
#ifdef __cplusplus\\\n\
#include <stdlib.h>\\\n\
#endif\n",
#endif
/* BROKEN_ASSERT_STDLIB_CHECK fix stamp */
\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
...
...
@@ -1466,12 +1470,12 @@ const char* apzCxx_UnreadyPatch[] = { "sed",
"-e", "1i\\\n\
#ifdef __cplusplus\\\n\
extern \"C\" {\\\n\
#endif\\\n\
#endif
/* CXX_UNREADY_CHECK */
\\\n\
\n",
"-e", "$a\\\n\
#ifdef __cplusplus\\\n\
}\\\n\
#endif\n",
#endif
/* CXX_UNREADY_CHECK */
\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
...
...
@@ -1642,7 +1646,7 @@ tSCC zIsc_Omits_With_StdcList[] =
* content selection pattern - do fix if pattern found
*/
tSCC zIsc_Omits_With_StdcSelect0[] =
"!defined
(__STDC__) && !defined(_POSIX_SOURCE
)";
"!defined
\\(__STDC__\\) && !defined\\(_POSIX_SOURCE\\
)";
#define ISC_OMITS_WITH_STDC_TEST_CT 1
tTestDesc aIsc_Omits_With_StdcTests[] = {
...
...
@@ -1657,140 +1661,140 @@ const char* apzIsc_Omits_With_StdcPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Io_
Use_Quotes
fix
* Description of Io_
Quotes_Use
fix
*/
#define IO_
USE_QUOTES
_FIXIDX 38
tSCC zIo_
Use_Quotes
Name[] =
"io_
use_quotes
";
#define IO_
QUOTES_USE
_FIXIDX 38
tSCC zIo_
Quotes_Use
Name[] =
"io_
quotes_use
";
/*
* File name selection pattern
*/
#define zIo_
Use_Quotes
List (char*)NULL
#define zIo_
Quotes_Use
List (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzIo_
Use_Quotes
Machs (const char**)NULL
#define apzIo_
Quotes_Use
Machs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zIo_
Use_Quotes
Select0[] =
tSCC zIo_
Quotes_Use
Select0[] =
"define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*\\( *[^,']";
#define IO_
USE_QUOTES
_TEST_CT 1
tTestDesc aIo_
Use_Quotes
Tests[] = {
{ TT_EGREP, zIo_
Use_Quotes
Select0, (regex_t*)NULL }, };
#define IO_
QUOTES_USE
_TEST_CT 1
tTestDesc aIo_
Quotes_Use
Tests[] = {
{ TT_EGREP, zIo_
Quotes_Use
Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Io_
Use_Quotes
* Fix Command Arguments for Io_
Quotes_Use
*/
const char* apzIo_
Use_Quotes
Patch[] = {
const char* apzIo_
Quotes_Use
Patch[] = {
"char_macro_use",
"IO",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Io_
Def_Quotes
fix
* Description of Io_
Quotes_Def
fix
*/
#define IO_
DEF_QUOTES
_FIXIDX 39
tSCC zIo_
Def_Quotes
Name[] =
"io_
def_quotes
";
#define IO_
QUOTES_DEF
_FIXIDX 39
tSCC zIo_
Quotes_Def
Name[] =
"io_
quotes_def
";
/*
* File name selection pattern
*/
#define zIo_
Def_Quotes
List (char*)NULL
#define zIo_
Quotes_Def
List (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzIo_
Def_Quotes
Machs (const char**)NULL
#define apzIo_
Quotes_Def
Machs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zIo_
Def_Quotes
Select0[] =
tSCC zIo_
Quotes_Def
Select0[] =
"define[ \t]+[A-Z0-9_]+IO[A-Z]*\\(([a-zA-Z]).*'\\1'";
#define IO_
DEF_QUOTES
_TEST_CT 1
tTestDesc aIo_
Def_Quotes
Tests[] = {
{ TT_EGREP, zIo_
Def_Quotes
Select0, (regex_t*)NULL }, };
#define IO_
QUOTES_DEF
_TEST_CT 1
tTestDesc aIo_
Quotes_Def
Tests[] = {
{ TT_EGREP, zIo_
Quotes_Def
Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Io_
Def_Quotes
* Fix Command Arguments for Io_
Quotes_Def
*/
const char* apzIo_
Def_Quotes
Patch[] = {
const char* apzIo_
Quotes_Def
Patch[] = {
"char_macro_def",
"IO",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Ctrl_
Use_Quotes
fix
* Description of Ctrl_
Quotes_Use
fix
*/
#define CTRL_
USE_QUOTES
_FIXIDX 40
tSCC zCtrl_
Use_Quotes
Name[] =
"ctrl_
use_quotes
";
#define CTRL_
QUOTES_USE
_FIXIDX 40
tSCC zCtrl_
Quotes_Use
Name[] =
"ctrl_
quotes_use
";
/*
* File name selection pattern
*/
#define zCtrl_
Use_Quotes
List (char*)NULL
#define zCtrl_
Quotes_Use
List (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzCtrl_
Use_Quotes
Machs (const char**)NULL
#define apzCtrl_
Quotes_Use
Machs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zCtrl_
Use_Quotes
Select0[] =
tSCC zCtrl_
Quotes_Use
Select0[] =
"define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
#define CTRL_
USE_QUOTES
_TEST_CT 1
tTestDesc aCtrl_
Use_Quotes
Tests[] = {
{ TT_EGREP, zCtrl_
Use_Quotes
Select0, (regex_t*)NULL }, };
#define CTRL_
QUOTES_USE
_TEST_CT 1
tTestDesc aCtrl_
Quotes_Use
Tests[] = {
{ TT_EGREP, zCtrl_
Quotes_Use
Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ctrl_
Use_Quotes
* Fix Command Arguments for Ctrl_
Quotes_Use
*/
const char* apzCtrl_
Use_Quotes
Patch[] = {
const char* apzCtrl_
Quotes_Use
Patch[] = {
"char_macro_use",
"CTRL",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Ctrl_
Def_Quotes
fix
* Description of Ctrl_
Quotes_Def
fix
*/
#define CTRL_
DEF_QUOTES
_FIXIDX 41
tSCC zCtrl_
Def_Quotes
Name[] =
"ctrl_
def_quotes
";
#define CTRL_
QUOTES_DEF
_FIXIDX 41
tSCC zCtrl_
Quotes_Def
Name[] =
"ctrl_
quotes_def
";
/*
* File name selection pattern
*/
#define zCtrl_
Def_Quotes
List (char*)NULL
#define zCtrl_
Quotes_Def
List (char*)NULL
/*
* Machine/OS name selection pattern
*/
#define apzCtrl_
Def_Quotes
Machs (const char**)NULL
#define apzCtrl_
Quotes_Def
Machs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zCtrl_
Def_Quotes
Select0[] =
tSCC zCtrl_
Quotes_Def
Select0[] =
"define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
#define CTRL_
DEF_QUOTES
_TEST_CT 1
tTestDesc aCtrl_
Def_Quotes
Tests[] = {
{ TT_EGREP, zCtrl_
Def_Quotes
Select0, (regex_t*)NULL }, };
#define CTRL_
QUOTES_DEF
_TEST_CT 1
tTestDesc aCtrl_
Quotes_Def
Tests[] = {
{ TT_EGREP, zCtrl_
Quotes_Def
Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Ctrl_
Def_Quotes
* Fix Command Arguments for Ctrl_
Quotes_Def
*/
const char* apzCtrl_
Def_Quotes
Patch[] = {
const char* apzCtrl_
Quotes_Def
Patch[] = {
"char_macro_def",
"CTRL",
(char*)NULL };
...
...
@@ -4685,7 +4689,7 @@ extern char *\tsprintf();\\\n\
*
* List of all fixes
*/
#define REGEX_COUNT 10
4
#define REGEX_COUNT 10
5
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 118
...
...
@@ -4757,7 +4761,7 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAix_SyswaitName, zAix_SyswaitList,
apzAix_SyswaitMachs,
AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY,
AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY
| FD_SUBROUTINE
,
aAix_SyswaitTests, apzAix_SyswaitPatch },
{ zAix_VolatileName, zAix_VolatileList,
...
...
@@ -4880,25 +4884,25 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ISC_OMITS_WITH_STDC_TEST_CT, FD_MACH_ONLY,
aIsc_Omits_With_StdcTests, apzIsc_Omits_With_StdcPatch },
{ zIo_
Use_QuotesName, zIo_Use_Quotes
List,
apzIo_
Use_Quotes
Machs,
IO_
USE_QUOTES
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIo_
Use_QuotesTests, apzIo_Use_Quotes
Patch },
{ zIo_
Def_QuotesName, zIo_Def_Quotes
List,
apzIo_
Def_Quotes
Machs,
IO_
DEF_QUOTES
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIo_
Def_QuotesTests, apzIo_Def_Quotes
Patch },
{ zCtrl_
Use_QuotesName, zCtrl_Use_Quotes
List,
apzCtrl_
Use_Quotes
Machs,
CTRL_
USE_QUOTES
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCtrl_
Use_QuotesTests, apzCtrl_Use_Quotes
Patch },
{ zCtrl_
Def_QuotesName, zCtrl_Def_Quotes
List,
apzCtrl_
Def_Quotes
Machs,
CTRL_
DEF_QUOTES
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCtrl_
Def_QuotesTests, apzCtrl_Def_Quotes
Patch },
{ zIo_
Quotes_UseName, zIo_Quotes_Use
List,
apzIo_
Quotes_Use
Machs,
IO_
QUOTES_USE
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIo_
Quotes_UseTests, apzIo_Quotes_Use
Patch },
{ zIo_
Quotes_DefName, zIo_Quotes_Def
List,
apzIo_
Quotes_Def
Machs,
IO_
QUOTES_DEF
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aIo_
Quotes_DefTests, apzIo_Quotes_Def
Patch },
{ zCtrl_
Quotes_UseName, zCtrl_Quotes_Use
List,
apzCtrl_
Quotes_Use
Machs,
CTRL_
QUOTES_USE
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCtrl_
Quotes_UseTests, apzCtrl_Quotes_Use
Patch },
{ zCtrl_
Quotes_DefName, zCtrl_Quotes_Def
List,
apzCtrl_
Quotes_Def
Machs,
CTRL_
QUOTES_DEF
_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aCtrl_
Quotes_DefTests, apzCtrl_Quotes_Def
Patch },
{ zIp_Missing_SemiName, zIp_Missing_SemiList,
apzIp_Missing_SemiMachs,
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/genfixes
View file @
88acf854
...
...
@@ -71,7 +71,7 @@ fixincl.x | */fixincl.x )
if
(
${
AG
}
--help
>
/dev/null 2>&1
)
then
echo
AutoGen-ing fixincl.x
$AG
-T
fixincl.tpl
-b
fixincl
inclhack.def
$AG
inclhack.def
else
echo
"AutoGen does not appear to be correctly installed."
echo
"Please download and install:"
...
...
This diff is collapsed.
Click to expand it.
gcc/fixinc/inclhack.def
View file @
88acf854
...
...
@@ -523,9 +523,10 @@ fix = {
fix = {
hackname = aix_syswait;
files = sys/wait.h;
select = "^extern pid_t wait3\\(\\);\n";
select = "bos325,";
sed = "/^extern pid_t wait3();$/i\\\n"
"struct rusage;\n
";
c_fix = format;
c_fix_arg = "struct rusage;\n%0
";
test_text = "/* bos325, */\nextern pid_t wait3();";
};
...
...
@@ -768,7 +769,7 @@ fix = {
sed = "1i\\\n"
"#ifdef __cplusplus\\\n"
"#include <stdlib.h>\\\n"
"#endif\n";
"#endif
/* BROKEN_ASSERT_STDLIB_CHECK fix stamp */
\n";
test_text = "extern void exit ( int );";
};
...
...
@@ -831,7 +832,9 @@ fix = {
select = 'include.*"\.\./machine/';
sed = "s,\"../machine/inline.h\",<machine/inline.h>,";
sed = "s,\"../machine/psl.h\",<machine/psl.h>,";
test_text = '# include "../machine/fumble.h"';
test_text = '# include "../machine/inline.h"' "\n"
'# include "../machine/dontfix.h"' "\n"
'# include "../machine/psl.h"';
};
...
...
@@ -842,8 +845,8 @@ fix = {
hackname = hp_sysfile;
files = sys/file.h;
select = "HPUX_SOURCE";
sed = 's/(\.\.\.)/(struct file *, ...)/';
test_text = "extern void foo(...); /* bad varargs */";
sed
= 's/(\.\.\.)/(struct file *, ...)/';
test_text = "extern void foo(...); /*
HPUX_SOURCE -
bad varargs */";
};
...
...
@@ -865,11 +868,12 @@ fix = {
sed = "1i\\\n"
"#ifdef __cplusplus\\\n"
"extern \"C\" {\\\n"
"#endif\\\n\n";
"#endif
/* CXX_UNREADY_CHECK */
\\\n\n";
sed = "$a\\\n"
"#ifdef __cplusplus\\\n"
"}\\\n"
"#endif\n";
"#endif /* CXX_UNREADY_CHECK */\n";
test_text = "extern void* malloc( size_t );";
};
...
...
@@ -956,7 +960,7 @@ fix = {
files = "sys/fcntl.h";
files = "sys/dirent.h";
select =
"!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)"
;
select =
'!defined\(__STDC__\) && !defined\(_POSIX_SOURCE\)'
;
sed = "s/!defined(__STDC__) && !defined(_POSIX_SOURCE)/"
"!defined(_POSIX_SOURCE)/";
...
...
@@ -978,14 +982,15 @@ fix = {
* _IO might be: _IO DESIO BSD43__IO with W, R, WR, C, ... suffixes.
*/
fix = {
hackname = io_use_quotes;
select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*\\( *[^,']";
hackname = io_quotes_use;
select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+IO[A-Z]*[ \t]*"
"\\( *[^,']";
c_fix = char_macro_use;
c_fix_arg = "IO";
};
fix = {
hackname = io_
def_quotes
;
hackname = io_
quotes_def
;
select = "define[ \t]+[A-Z0-9_]+IO[A-Z]*\\(([a-zA-Z]).*'\\1'";
c_fix = char_macro_def;
c_fix_arg = "IO";
...
...
@@ -993,18 +998,27 @@ fix = {
/*
* Same deal for CTRL() macros.
* Fix various macros used to define ioctl numbers. The traditional
* syntax was
* #define _CTRL(n, x) (('n'<<8)+x)
* #define TIOCFOO _CTRL(T, 1)
* but this does not work with the C standard, which disallows macro
* expansion inside strings. We have to rewrite it thus:
* #define _CTRL(n, x) ((n<<8)+x)
* #define TIOCFOO _CTRL('T', 1)
* The select expressions match too much, but the c_fix code is cautious.
*
* CTRL might be: CTRL _CTRL ISCTRL BSD43_CTRL ...
*/
fix = {
hackname = ctrl_
use_quotes
;
hackname = ctrl_
quotes_use
;
select = "define[ \t]+[A-Z0-9_]+[ \t]+[A-Z0-9_]+CTRL[ \t]*\\( *[^,']";
c_fix = char_macro_use;
c_fix_arg = "CTRL";
};
fix = {
hackname = ctrl_
def_quotes
;
hackname = ctrl_
quotes_def
;
select = "define[ \t]+[A-Z0-9_]+CTRL\\(([a-zA-Z]).*'\\1'";
c_fix = char_macro_def;
c_fix_arg = "CTRL";
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment