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
7b78a14a
Commit
7b78a14a
authored
May 27, 2001
by
Bruce Korb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorganize inclhacks and apply fix to fixtests.c
From-SVN: r42663
parent
f71aebba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
64 additions
and
35 deletions
+64
-35
gcc/ChangeLog
+16
-0
gcc/README-fixinc
+11
-6
gcc/fixinc/check.tpl
+14
-15
gcc/fixinc/fixfixes.c
+0
-8
gcc/fixinc/fixincl.tpl
+14
-1
gcc/fixinc/fixincl.x
+0
-0
gcc/fixinc/fixtests.c
+4
-0
gcc/fixinc/inclhack.def
+0
-0
gcc/fixinc/tests/base/stdio.h
+5
-5
No files found.
gcc/ChangeLog
View file @
7b78a14a
2001
-
05
-
27
Kaveh
R
.
Ghazi
<
ghazi
@caip
.
rutgers
.
edu
>
*
fixinc
/
fixtests
.
c
:
Declare
entries
in
ENV_TABLE
.
2001
-
05
-
27
Bruce
Korb
<
bkorb
@gnu
.
org
>
*
fixinc
/
check
.
tpl
(
HACK
)
add
and
use
a
Scheme
variable
(
has
no
test
text
)
:
error
out
if
no
"test_text"
is
defined
*
fixinc
/
fixincl
.
tpl
:
likewise
(
FIXIDX
)
:
make
it
an
enumeration
so
we
minimize
diffs
*
fixinc
/
inclhack
.
def
:
re
-
alphabetize
and
add
sort
instructions
*
fixinc
/
fixincl
.
x
:
regenerate
*
fixinc
/
tests
/
base
/
stdio
.
h
:
test
output
got
moved
due
to
the
alphabetizing
*
README
-
fixinc
:
rewrite
(
mostly
)
2001
-
05
-
27
Neil
Booth
<
neil
@daikokuya
.
demon
.
co
.
uk
>
*
cpplib
.
c
(
run_directive
)
:
Set
pfile
->
directive
.
...
...
gcc/README-fixinc
View file @
7b78a14a
This README file is copied into the directory for GCC-only header files
when fixincludes is run by the makefile for GCC.
Many of the files in this directory were made from the standard system
header files of this system by the shell script `fixincludes'.
They are system-specific, and will not work on any other kind of system.
They are also not part of GCC. The reason for making the files here
is to fix the places in the header files which use constructs
that are incompatible with ANSI C.
Many of the files in this directory were automatically edited from the
standard system header files by the fixincludes process. They are
system-specific, and will not work on any other kind of system. They
are also not part of GCC. The reason we have to do this is because
GCC requires ANSI C headers and many vendors supply ANSI-incompatible
headers.
Because this is an automated process, sometimes headers get "fixed"
that do not, strictly speaking, need a fix. As long as nothing is broken
by the process, it is just an unfortunate collateral inconvenience.
We would like to rectify it, if it is not "too inconvenient".
gcc/fixinc/check.tpl
View file @
7b78a14a
...
...
@@ -40,12 +40,13 @@ mkdir ${DESTDIR} ${SRCDIR}
cd inc
[=
(define sfile "")
(define HACK "")
(define dfile "") =][=
FOR fix =][=
IF (> (count "test_text") 1) =][=
(set! HACK (string-upcase! (get "hackname")))
(set! sfile (if (exist? "files") (get "files[]") "testing.h"))
(set! dfile (string-append
(if (*==* sfile "/")
...
...
@@ -58,9 +59,9 @@ FOR fix =][=
cat >> [=(. sfile)=]
<
<
_HACK_EOF_
#
if
defined
(
[=(
string-upcase
!
(
get
"
hackname
")
)=]
_CHECK_
[=(
for-index
)=]
)
#
if
defined
(
[=(
.
HACK
)=]
_CHECK_
[=(
for-index
)=]
)
[=
test_text=
]
#
endif
/*
[=(
string-upcase
!
(
get
"
hackname
")
)=]
_CHECK_
[=(
for-index
)=]
*/
#
endif
/*
[=(
.
HACK
)=]
_CHECK_
[=(
for-index
)=]
*/
_HACK_EOF_
echo
[=(.
sfile
)=]
|
../../
fixincl
mv
-f
[=(.
sfile
)=]
[=(.
dfile
)=]
-
[=(
for-index
)=].
h
...
...
@@ -75,17 +76,15 @@ ENDFOR fix
=
][=
FOR
fix =
][=
FOR
fix =
][=
(
set
!
HACK
(
string-upcase
!
(
get
"
hackname
")))
=][=
IF
(
not
(
exist
?
"
test_text
"))
=][=
IF
(
not
(
exist
?
"
replace
"))
=]
echo
No
test
for
[=
hackname=
]
in
inc
/[=
IF
(
exist
?
"
files
")
=][=
files
[
0
]
=][=
ELSE =
]testing.h[=
ENDIF =
][=
ENDIF =
][=
ELSE =
]
(
if
(
not
(
exist
?
"
replace
"))
(
error
(
sprintf
"
include
fix
'%
s
'
has
no
test
text
"
(
get
"
hackname
")
))
)
=][=
ELSE =
]
cat
>
> [=
IF (exist? "files") =][=
files[0] =][=
...
...
@@ -93,9 +92,9 @@ cat >> [=
ENDIF =]
<
<
_HACK_EOF_
#
if
defined
(
[=(
string-upcase
!
(
get
"
hackname
")
)=]
_CHECK
)
#
if
defined
(
[=(
.
HACK
)=]
_CHECK
)
[=
test_text=
]
#
endif
/*
[=(
string-upcase
!
(
get
"
hackname
")
)=]
_CHECK
*/
#
endif
/*
[=(
.
HACK
)=]
_CHECK
*/
_HACK_EOF_
[=
ENDIF =
][=
...
...
@@ -103,7 +102,7 @@ ENDFOR fix
=
]
find
.
-type
f
|
sed
'
s
;\./;;'
|
sort
|
../../
fixincl
find
.
-type
f
|
sed
'
s
;
^
\./;;'
|
sort
|
../../
fixincl
cd
$
{
DESTDIR
}
exitok=
true
...
...
gcc/fixinc/fixfixes.c
View file @
7b78a14a
...
...
@@ -30,14 +30,6 @@ Here are the rules:
This may be useful, for example, if there are interesting strings
or pre-compiled regular expressions stored there.
It is also possible to access fix descriptions by using the
index of a known fix, "my_fix_name" for example:
tFixDesc* p_desc = fixDescList + MY_FIX_NAME_FIXIDX;
tTestDesc* p_tlist = p_desc->p_test_desc;
regexec (p_tlist->p_test_regex, ...)
= = = = = = = = = = = = = = = = = = = = = = = = =
This file is part of GNU CC.
...
...
gcc/fixinc/fixincl.tpl
View file @
7b78a14a
...
...
@@ -26,6 +26,8 @@ FOR fix =]
* Description of [=
(set! Hack (string-capitalize! (get "hackname")))
(set! HACK (string-upcase! (get "hackname")))
(if (and (not (exist? "test_text")) (not (exist? "replace")))
(error (sprintf "include fix '%s' has no test text" Hack )) )
(. Hack)=] fix
*/[=
...
...
@@ -33,7 +35,6 @@ FOR fix =]
some C fix wishes to refer to the regexps it is paired with.
See commentary at the top of fixfixes.c.
=]
#define [=(sprintf "%-32s" (string-append HACK "_FIXIDX"))=] [=(for-index)=]
tSCC z[=(. Hack)=]Name[] =
"[=hackname=]";
...
...
@@ -181,6 +182,18 @@ static const char* apz[=(. Hack)=]Patch[] = {[=
#define MACH_LIST_SIZE_LIMIT [= (+ 128 max-mach) =]
#define FIX_COUNT [= (count "fix") =]
/*
* Enumerate the fixes[= # in a way that minimizes diffs :-) =]
*/
typedef enum {[=
FOR fix "," =]
[=(string-upcase! (get "hackname"))=]_FIXIDX[=
ENDFOR
=]
} t_fixinc_idx;
tFixDesc fixDescList[ FIX_COUNT ] = {[=
...
...
gcc/fixinc/fixincl.x
View file @
7b78a14a
This diff is collapsed.
Click to expand it.
gcc/fixinc/fixtests.c
View file @
7b78a14a
...
...
@@ -47,6 +47,10 @@ Boston, MA 02111-1307, USA. */
#include "fixlib.h"
#define _ENV_(v,m,n,t) extern tCC* v;
ENV_TABLE
#undef _ENV_
typedef
apply_fix_p_t
t_test_proc
PARAMS
((
tCC
*
file
,
tCC
*
text
));
typedef
struct
{
...
...
gcc/fixinc/inclhack.def
View file @
7b78a14a
This diff is collapsed.
Click to expand it.
gcc/fixinc/tests/base/stdio.h
View file @
7b78a14a
...
...
@@ -19,6 +19,11 @@ extern int getopt(int, char *const[], const char *);
#endif
/* ALPHA_GETOPT_CHECK */
#if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK )
extern
int
printf
(
const
char
*
,
__gnuc_va_list
);
#endif
/* IRIX_STDIO_DUMMY_VA_LIST_CHECK */
#if defined( ISC_OMITS_WITH_STDC_CHECK )
#if !defined(_POSIX_SOURCE)
/* ? ! */
int
foo
;
...
...
@@ -26,11 +31,6 @@ int foo;
#endif
/* ISC_OMITS_WITH_STDC_CHECK */
#if defined( IRIX_STDIO_DUMMY_VA_LIST_CHECK )
extern
int
printf
(
const
char
*
,
__gnuc_va_list
);
#endif
/* IRIX_STDIO_DUMMY_VA_LIST_CHECK */
#if defined( READ_RET_TYPE_CHECK )
extern
unsigned
int
fread
(),
fwrite
();
extern
int
fclose
(),
fflush
(),
foo
();
...
...
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