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
c1ea0a44
Commit
c1ea0a44
authored
Jun 21, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(math.h): Correct the collision of "exception".
From-SVN: r14280
parent
8b83775b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
gcc/fixinc.sco
+40
-0
No files found.
gcc/fixinc.sco
View file @
c1ea0a44
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
# Based on fixinc.svr4 script by Ron Guilmette (rfg@ncd.com) (SCO
# Based on fixinc.svr4 script by Ron Guilmette (rfg@ncd.com) (SCO
# modifications by Ian Lance Taylor (ian@airs.com)).
# modifications by Ian Lance Taylor (ian@airs.com)).
#
#
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
#
# This file is part of GNU CC.
# This file is part of GNU CC.
#
#
# GNU CC is free software; you can redistribute it and/or modify
# GNU CC is free software; you can redistribute it and/or modify
...
@@ -290,6 +292,44 @@ if [ -r ${LIB}/$file ]; then
...
@@ -290,6 +292,44 @@ if [ -r ${LIB}/$file ]; then
fi
fi
fi
fi
# This function is borrowed from fixinclude.svr4
# The OpenServer math.h defines struct exception, which conflicts with
# the class exception defined in the C++ file std/stdexcept.h. We
# redefine it to __math_exception. This is not a great fix, but I
# haven't been able to think of anything better.
file
=
math.h
base
=
`
basename
$file
`
if
[
-r
${
LIB
}
/
$file
]
;
then
file_to_fix
=
${
LIB
}
/
$file
else
if
[
-r
${
INPUT
}
/
$file
]
;
then
file_to_fix
=
${
INPUT
}
/
$file
else
file_to_fix
=
""
fi
fi
if
[
\!
-z
"
$file_to_fix
"
]
;
then
echo
Checking
$file_to_fix
sed
-e
'/struct exception/i\
#ifdef __cplusplus\
#define exception __math_exception\
#endif'
\
-e
'/struct exception/a\
#ifdef __cplusplus\
#undef exception\
#endif'
$file_to_fix
>
/tmp/
$base
if
cmp
$file_to_fix
/tmp/
$base
>
/dev/null 2>&1
;
then
\
true
else
echo
Fixed
$file_to_fix
rm
-f
${
LIB
}
/
$file
cp /tmp/
$base
${
LIB
}
/
$file
chmod a+r
${
LIB
}
/
$file
fi
rm
-f
/tmp/
$base
fi
echo
'Removing unneeded directories:'
echo
'Removing unneeded directories:'
cd
$LIB
cd
$LIB
files
=
`
find
.
-type
d
-print
| sort
-r
`
files
=
`
find
.
-type
d
-print
| sort
-r
`
...
...
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