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
224b1df0
Commit
224b1df0
authored
Feb 15, 1994
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use __SIZE_TYPE__ for size_t type, rather than running gcc to get it.
From-SVN: r6563
parent
e138174b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
gcc/fixincludes
+6
-12
No files found.
gcc/fixincludes
View file @
224b1df0
...
...
@@ -5,9 +5,6 @@
# See README-fixinc for more information.
# Command to run gcc.
GCCCMD
=
${
4
-
${
GCCCMD
-gcc
}}
# Directory where gcc sources (and sometimes special include files) live.
# fixincludes doesn't use this, but fixinc.svr4 does, and I want to make
# sure somebody doesn't try to use arg3 for something incompatible. -- gumby
...
...
@@ -353,15 +350,12 @@ for file in sys/types.h stdlib.h sys/stdtypes.h stddef.h memory.h unistd.h; do
fi
if
[
-r
${
LIB
}
/
$file
]
;
then
echo
Fixing
$file
comment
# Get the definition of __SIZE_TYPE__, if any.
# (This file must be called something.c).
echo
"__SIZE_TYPE__"
>
${
LIB
}
/types.c
foo
=
`
${
GCCCMD
}
-E
-P
${
LIB
}
/types.c
`
rm
-f
${
LIB
}
/types.c
# Default to our preferred type.
if
[
"
$foo
"
=
__SIZE_TYPE__
]
;
then
foo
=
"unsigned long int"
;
fi
sed
-e
"s/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/typedef
$foo
size_t/"
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
echo
Fixing size_t
in
$file
sed
-e
'/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/i\
#ifndef __SIZE_TYPE__\
#define __SIZE_TYPE__ long unsigned int\
#endif'
\
-e
's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/typedef __SIZE_TYPE__ size_t/'
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
if
cmp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
;
then
rm
${
LIB
}
/
$file
...
...
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