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
4c188026
Commit
4c188026
authored
Apr 30, 2000
by
Bruce Korb
Committed by
Bruce Korb
Apr 30, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added definitions needed by OSR5
From-SVN: r33556
parent
0ca4f243
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
238 additions
and
114 deletions
+238
-114
gcc/ChangeLog
+6
-0
gcc/fixinc/fixincl.x
+0
-0
gcc/fixinc/inclhack.def
+85
-54
gcc/fixinc/inclhack.sh
+147
-60
No files found.
gcc/ChangeLog
View file @
4c188026
2000
-
40
-
30
Bruce
Korb
<
bkorb
@gnu
.
org
>
*
fixinc
/
inclhack
.
def
:
Added
definitions
needed
by
OSR5
*
fixinc
/
inclhack
.
sh
:
regen
*
fixinc
/
fixincl
.
x
:
regen
2000
-
04
-
30
Richard
Henderson
<
rth
@cygnus
.
com
>
*
ifcvt
.
c
(
dead_or_predicable
)
:
Manually
squeeze
non
-
movable
notes
...
...
gcc/fixinc/fixincl.x
View file @
4c188026
This diff is collapsed.
Click to expand it.
gcc/fixinc/inclhack.def
View file @
4c188026
...
...
@@ -791,28 +791,6 @@ fix = {
};
/*
* On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains
* tiny static wrappers that aren't C++ safe.
*/
fix = {
hackname = sco5_stat_wrappers;
mach = "i*86-*-sco3.2v5*";
files = "sys/stat.h";
sed = "/^static int[ \t]*[a-z]*stat(/i\\\n"
"#ifdef __cplusplus\\\n"
"extern \"C\"\\\n"
"{\\\n"
"#endif\\\n";
sed = "/^}$/a\\\n"
"#ifdef __cplusplus\\\n"
"}\\\n"
"#endif \/* __cplusplus *\/\\\n";
};
#ifdef OLD_CPP
/*
* Fix else and endif directives that contain non-commentary text
...
...
@@ -904,6 +882,7 @@ fix = {
sed = "s/^extern struct sigevent;/struct sigevent;/";
};
/*
* get rid of bogus inline definitions in HP-UX 8.0
*/
...
...
@@ -1540,6 +1519,56 @@ fix = {
/*
* "!__STDC__" is "!defined( __STRICT_ANSI__ )"
*/
fix = {
hackname = sco_strict_ansi;
mach = "i?86-*-sco3.2*";
select = "^[ \t]*#[ \t]*if.*!__STDC__";
sed = 's/!__STDC__/!defined(__STRICT_ANSI__)/g';
};
/*
* The static functions lstat() and fchmod() in <sys/stat.h>
* cause G++ grief since they're not wrapped in "if __cplusplus".
*
* On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains
* tiny static wrappers that aren't C++ safe.
*/
fix = {
hackname = sco_static_func;
files = sys/stat.h;
mach = "i?86-*-sco3.2*";
select = "^static int";
sed = "/^static int/i\\\n"
"#if __cplusplus\\\n"
"extern \"C\" {\\\n"
"#endif /* __cplusplus */";
sed = "/^}$/a\\\n"
"#if __cplusplus\\\n"
" }\\\n"
"#endif /* __cplusplus */";
};
/*
* Fix prototype declaration of utime in sys/times.h.
* In 3.2v4.0 the const is missing.
*/
fix = {
hackname = sco_utime;
files = sys/times.h;
mach = "i?86-*-sco3.2v4*";
select = "\(const char \*, struct utimbuf \*\);";
sed = 's/(const char \*, struct utimbuf \*);/'
'(const char *, const struct utimbuf *);/';
};
/*
* Sony NEWSOS 5.0 does not support the complete ANSI C standard.
*/
#ifdef SONY
...
...
@@ -1673,6 +1702,33 @@ fix = {
};
#endif
/*
* Apply fix this to all OSs since this problem seems to effect
* more than just SunOS.
*/
fix = {
hackname = sun_auth_proto;
files = rpc/auth.h;
files = rpc/clnt.h;
files = rpc/svc.h;
files = rpc/xdr.h;
/*
* Select those files containing '(*name)()'.
*/
select = '\(\*[a-z][a-z_]*\)\(\)';
sed = 's'
'/^\(.*(\*[a-z][a-z_]*)(\)' '\();.*\)'
"/\\\n"
"#ifdef __cplusplus\\\n"
'\1...\2' "\\\n"
"#else\\\n"
'\1\2' "\\\n"
"#endif"
"/";
};
/*
* Fix bogus #ifdef on SunOS 4.1.
*/
...
...
@@ -1760,33 +1816,6 @@ fix = {
/*
* Apply fix this to all OSs since this problem seems to effect
* more than just SunOS. In general, fixes which are triggered
* by a specific target are bad.
*/
fix = {
hackname = sun_auth_proto;
files = rpc/auth.h;
files = rpc/clnt.h;
files = rpc/svc.h;
files = rpc/xdr.h;
/*
* Select those files containing '(*name)()'.
*/
select = '\(\*[a-z][a-z_]*\)\(\)';
sed = 's'
'/^\(.*(\*[a-z][a-z_]*)(\)' '\();.*\)'
"/\\\n"
"#ifdef __cplusplus\\\n"
'\1...\2' "\\\n"
"#else\\\n"
'\1\2' "\\\n"
"#endif"
"/";
};
/*
* math.h on SunOS 4 puts the declaration of matherr before the definition
* of struct exception, so the prototype (added by fixproto) causes havoc.
*/
...
...
@@ -1943,16 +1972,16 @@ fix = {
/*
* Fix broken decl of getcwd present on some svr4 systems.
*/
#ifdef SVR4
fix = {
hackname = svr4_getcwd;
files = stdlib.h;
files = unistd.h;
files = prototypes.h;
select = 'getcwd\(char \*, int\)';
sed = 's/getcwd(char \*, int)/getcwd(char *, size_t)/';
};
#endif
/*
* set ifdef _KERNEL
...
...
@@ -2034,10 +2063,10 @@ fix = {
};
#endif
/*
* Fix broken decl of profil present on some svr4 systems.
*/
#ifdef SVR4
fix = {
hackname = svr4_profil;
files = stdlib.h;
...
...
@@ -2047,7 +2076,7 @@ fix = {
'unsigned int, unsigned int)'
'/profil(unsigned short *, size_t, int, unsigned)/';
};
#endif
/*
* Convert functions to prototype form, and fix arg names in <sys/stat.h>.
...
...
@@ -2143,7 +2172,9 @@ fix = {
};
#endif /* SVR5 */
/* Fix these files to use the same types that we think they should.
/*
* Fix these files to use the same types that we think they should.
* XXX - extremely dubious changes here.
*/
fix = {
...
...
gcc/fixinc/inclhack.sh
View file @
4c188026
...
...
@@ -6,7 +6,7 @@
# files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search.
#
# This script contains 11
3
fixup scripts.
# This script contains 11
7
fixup scripts.
#
# See README-fixinc for more information.
#
...
...
@@ -1283,37 +1283,6 @@ struct rusage;
#
# Fix Sco5_Stat_Wrappers
#
case
"
${
file
}
"
in
./sys/stat.h
)
case
"
$target_canonical
"
in
i
*
86-
*
-sco3
.2v5
*
)
fixlist
=
"
${
fixlist
}
sco5_stat_wrappers"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
'/^static int[ ]*[a-z]*stat(/i\
#ifdef __cplusplus\
extern "C"\
{\
#endif\
'
\
-e
'/^}$/a\
#ifdef __cplusplus\
}\
#endif /* __cplusplus */\
'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
;;
# case end for machine type test
esac
;;
# case end for file name test
esac
#
# Fix Hp_Inline
#
case
"
${
file
}
"
in
./sys/spinlock.h
)
...
...
@@ -2426,6 +2395,82 @@ typedef __regmatch_t regmatch_t;
#
# Fix Sco_Strict_Ansi
#
case
"
$target_canonical
"
in
i?86-
*
-sco3
.2
*
)
if
(
test
-n
"
`
egrep
'^[ ]*#[ ]*if.*!__STDC__'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sco_strict_ansi"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/!__STDC__/!defined(__STRICT_ANSI__)/g'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for machine type test
esac
#
# Fix Sco_Static_Func
#
case
"
${
file
}
"
in
./sys/stat.h
)
case
"
$target_canonical
"
in
i?86-
*
-sco3
.2
*
)
if
(
test
-n
"
`
egrep
'^static int'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sco_static_func"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
'/^static int/i\
#if __cplusplus\
extern "C" {\
#endif /* __cplusplus */'
\
-e
'/^}$/a\
#if __cplusplus\
}\
#endif /* __cplusplus */'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for machine type test
esac
;;
# case end for file name test
esac
#
# Fix Sco_Utime
#
case
"
${
file
}
"
in
./sys/times.h
)
case
"
$target_canonical
"
in
i?86-
*
-sco3
.2v4
*
)
if
(
test
-n
"
`
egrep
'(const char *, struct utimbuf *);'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sco_utime"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/(const char \*, struct utimbuf \*);/(const char *, const struct utimbuf *);/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for machine type test
esac
;;
# case end for file name test
esac
#
# Fix Sony_Include
#
case
"
${
file
}
"
in
./machine/machparam.h
)
...
...
@@ -2523,6 +2568,35 @@ s@_Va_LIST@_VA_LIST@' \
#
# Fix Sun_Auth_Proto
#
case
"
${
file
}
"
in
./rpc/auth.h
|
\
./rpc/clnt.h
|
\
./rpc/svc.h
|
\
./rpc/xdr.h
)
if
(
test
-n
"
`
egrep
'\\(\\*[a-z][a-z_]*\\)\\(\\)'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sun_auth_proto"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/^\(.*(\*[a-z][a-z_]*)(\)\();.*\)/\
#ifdef __cplusplus\
\1...\2\
#else\
\1\2\
#endif/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for file name test
esac
#
# Fix Sun_Bogus_Ifdef
#
case
"
${
file
}
"
in
./hsfs/hsfs_spec.h
|
\
...
...
@@ -2665,71 +2739,65 @@ void (*signal(...))(...);\
#
# Fix Sun
_Auth_Proto
# Fix Sun
os_Matherr_Decl
#
case
"
${
file
}
"
in
./rpc/auth.h
|
\
./rpc/clnt.h
|
\
./rpc/svc.h
|
\
./rpc/xdr.h
)
if
(
test
-n
"
`
egrep
'\\(\\*[a-z][a-z_]*\\)\\(\\)'
${
file
}
`
"
case
"
${
file
}
"
in
./math.h
)
if
(
test
-z
"
`
egrep
'matherr.*struct exception'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sun
_auth_proto
"
sun
os_matherr_decl
"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/^\(.*(\*[a-z][a-z_]*)(\)\();.*\)/\
#ifdef __cplusplus\
\1...\2\
#else\
\1\2\
#endif/'
\
sed
-e
'/^struct exception/,$b'
\
-e
'/matherr/i\
struct exception;
'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of
select
'if'
fi
# end of
bypass
'if'
;;
# case end for file name test
esac
#
# Fix Sunos_
Matherr_Decl
# Fix Sunos_
Strlen
#
case
"
${
file
}
"
in
./
math
.h
)
if
(
test
-
z
"
`
egrep
'matherr.*struct exceptio
n'
${
file
}
`
"
case
"
${
file
}
"
in
./
strings
.h
)
if
(
test
-
n
"
`
egrep
'int[ ]*strle
n'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sunos_
matherr_decl
"
sunos_
strlen
"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
'/^struct exception/,$b'
\
-e
'/matherr/i\
struct exception;
'
\
sed
-e
's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of
bypass
'if'
fi
# end of
select
'if'
;;
# case end for file name test
esac
#
# Fix S
unos_Strlen
# Fix S
vr4_Getcwd
#
case
"
${
file
}
"
in
./strings.h
)
if
(
test
-n
"
`
egrep
'int[ ]*strlen'
${
file
}
`
"
case
"
${
file
}
"
in
./stdlib.h
|
\
./unistd.h
|
\
./prototypes.h
)
if
(
test
-n
"
`
egrep
'getcwd\\(char \\*, int\\)'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
s
unos_strlen
"
s
vr4_getcwd
"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/
int[ ]*strlen();/__SIZE_TYPE__ strlen();
/'
\
sed
-e
's/
getcwd(char \*, int)/getcwd(char *, size_t)
/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
...
...
@@ -2739,6 +2807,25 @@ struct exception;
#
# Fix Svr4_Profil
#
case
"
${
file
}
"
in
./stdlib.h
|
\
./unistd.h
)
fixlist
=
"
${
fixlist
}
svr4_profil"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/profil(unsigned short \*, unsigned int, unsigned int, unsigned int)/profil(unsigned short *, size_t, int, unsigned)/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
;;
# case end for file name test
esac
#
# Fix Systypes
#
case
"
${
file
}
"
in
./sys/types.h
|
\
...
...
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