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
2dbb8078
Commit
2dbb8078
authored
Sep 24, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Insert newlines just before end of 'sed' command strings if last 'sed'
command is 'a' or 'i'. From-SVN: r12830
parent
30657ee3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
34 deletions
+61
-34
gcc/fixinc.ptx
+5
-3
gcc/fixinc.svr4
+48
-27
gcc/fixincludes
+8
-4
No files found.
gcc/fixinc.ptx
View file @
2dbb8078
...
@@ -129,7 +129,8 @@ if [ \! -z "$file_to_fix" ]; then
...
@@ -129,7 +129,8 @@ if [ \! -z "$file_to_fix" ]; then
\
\
#if defined(__STDC__) || defined(__cplusplus)\
#if defined(__STDC__) || defined(__cplusplus)\
#include <stdio.h>\
#include <stdio.h>\
#endif /* __STDC__ */'
\
#endif /* __STDC__ */
'
\
$file_to_fix
>
${
LIB
}
/
${
file
}
.sed
$file_to_fix
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
echo
Fixed
$file_to_fix
echo
Fixed
$file_to_fix
...
@@ -183,10 +184,11 @@ if [ \! -z "$file_to_fix" ]; then
...
@@ -183,10 +184,11 @@ if [ \! -z "$file_to_fix" ]; then
\
\
#if defined (__GNUC__) || defined (__GNUG__)\
#if defined (__GNUC__) || defined (__GNUG__)\
#include <sys/byteorder.h>\
#include <sys/byteorder.h>\
#else /* not __GNUC__ */
\
#else /* not __GNUC__ */
'
\
'
\
-e
'/#endif[ ]*\/\* NETSWAP \*\//i\
-e
'/#endif[ ]*\/\* NETSWAP \*\//i\
#endif /* not __GNUC__ */'
\
#endif /* not __GNUC__ */
'
\
$file_to_fix
>
${
LIB
}
/
${
file
}
.sed
$file_to_fix
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
echo
Fixed
$file_to_fix
echo
Fixed
$file_to_fix
...
...
gcc/fixinc.svr4
View file @
2dbb8078
#! /bin/sh
#! /bin/sh
#
# Install modified versions of certain ANSI-incompatible
# fixinc.svr4 -- Install modified versions of certain ANSI-incompatible
# native System V Release 4 system include files.
# native System V Release 4 system include files.
# Copyright (C) 1994, 1996 Free Software Foundation, Inc.
#
# Contributed by Ron Guilmette (rfg@monkeys.com).
# Written by Ron Guilmette (rfg@ncd.com).
#
#
# This file is part of GNU CC.
# This file is part of GNU CC.
#
#
...
@@ -476,14 +475,16 @@ else
...
@@ -476,14 +475,16 @@ else
static\
static\
#else\
#else\
extern\
extern\
#endif'
\
#endif
'
\
-e
's/extern \(int ftw(const.*\)$/\1/'
\
-e
's/extern \(int ftw(const.*\)$/\1/'
\
-e
'/^extern int nftw/i\
-e
'/^extern int nftw/i\
#if defined(_STYPES)\
#if defined(_STYPES)\
static\
static\
#else\
#else\
extern\
extern\
#endif'
\
#endif
'
\
-e
's/extern \(int nftw.*\)$/\1/'
\
-e
's/extern \(int nftw.*\)$/\1/'
\
-e
'/^extern int ftw(),/c\
-e
'/^extern int ftw(),/c\
#if !defined(_STYPES)\
#if !defined(_STYPES)\
...
@@ -1029,9 +1030,11 @@ fi
...
@@ -1029,9 +1030,11 @@ fi
# true
# true
# else
# else
# sed -e '/#ifdef INKERNEL/i\
# sed -e '/#ifdef INKERNEL/i\
# #ifdef _KERNEL' \
# #ifdef _KERNEL
# ' \
# -e '/#endif[ ]*\/\* INKERNEL \*\//a\
# -e '/#endif[ ]*\/\* INKERNEL \*\//a\
# #endif /* _KERNEL */' \
# #endif /* _KERNEL */
# ' \
# $file_to_fix > ${LIB}/${file}.sed
# $file_to_fix > ${LIB}/${file}.sed
# rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
# rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
# echo Fixed $file_to_fix
# echo Fixed $file_to_fix
...
@@ -1057,10 +1060,12 @@ if [ \! -z "$file_to_fix" ]; then
...
@@ -1057,10 +1060,12 @@ if [ \! -z "$file_to_fix" ]; then
true
true
else
else
sed
-e
'/# ifdef __STDC__/i\
sed
-e
'/# ifdef __STDC__/i\
# if !defined (__GNUC__) && !defined (__GNUG__)'
\
# if !defined (__GNUC__) && !defined (__GNUG__)
'
\
-e
'/# include <sys\/byteorder.h>/s/ / /'
\
-e
'/# include <sys\/byteorder.h>/s/ / /'
\
-e
'/# include <sys\/byteorder.h>/i\
-e
'/# include <sys\/byteorder.h>/i\
# endif /* !defined (__GNUC__) && !defined (__GNUG__) */'
\
# endif /* !defined (__GNUC__) && !defined (__GNUG__) */
'
\
$file_to_fix
>
${
LIB
}
/
${
file
}
.sed
$file_to_fix
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
echo
Fixed
$file_to_fix
echo
Fixed
$file_to_fix
...
@@ -1336,29 +1341,41 @@ fi
...
@@ -1336,29 +1341,41 @@ fi
if
[
\!
-z
"
$file_to_fix
"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
/tmp/
$base
>
/dev/null 2>&1
;
then
\
true
true
else
else
...
@@ -1409,9 +1426,11 @@ fi
...
@@ -1409,9 +1426,11 @@ fi
if
[
\!
-z
"
$file_to_fix
"
]
;
then
if
[
\!
-z
"
$file_to_fix
"
]
;
then
echo
Checking
$file_to_fix
echo
Checking
$file_to_fix
sed
-e
'/define[ ]HUGE_VAL[ ]/i\
sed
-e
'/define[ ]HUGE_VAL[ ]/i\
#ifndef HUGE_VAL'
\
#ifndef HUGE_VAL
'
\
-e
'/define[ ]HUGE_VAL[ ]/a\
-e
'/define[ ]HUGE_VAL[ ]/a\
#endif'
$file_to_fix
>
/tmp/
$base
#endif
'
$file_to_fix
>
/tmp/
$base
if
cmp
$file_to_fix
/tmp/
$base
>
/dev/null 2>&1
;
then
\
if
cmp
$file_to_fix
/tmp/
$base
>
/dev/null 2>&1
;
then
\
true
true
else
else
...
@@ -1440,9 +1459,11 @@ for file in math.h floatingpoint.h; do
...
@@ -1440,9 +1459,11 @@ for file in math.h floatingpoint.h; do
if
[
\!
-z
"
$file_to_fix
"
]
;
then
if
[
\!
-z
"
$file_to_fix
"
]
;
then
echo
Checking
$file_to_fix
echo
Checking
$file_to_fix
sed
-e
'/^#define[ ]*__P/i\
sed
-e
'/^#define[ ]*__P/i\
#ifndef __P'
\
#ifndef __P
'
\
-e
'/^#define[ ]*__P/a\
-e
'/^#define[ ]*__P/a\
#endif'
$file_to_fix
>
/tmp/
$base
#endif
'
$file_to_fix
>
/tmp/
$base
if
cmp
$file_to_fix
/tmp/
$base
>
/dev/null 2>&1
;
then
\
if
cmp
$file_to_fix
/tmp/
$base
>
/dev/null 2>&1
;
then
\
true
true
else
else
...
...
gcc/fixincludes
View file @
2dbb8078
...
@@ -2078,13 +2078,17 @@ for files in curses.h; do
...
@@ -2078,13 +2078,17 @@ for files in curses.h; do
echo
Fixing
$file
echo
Fixing
$file
sed
-e
'/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\
sed
-e
'/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\
#ifndef __cplusplus'
\
#ifndef __cplusplus
'
\
-e
'/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/a\
-e
'/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/a\
#endif'
\
#endif
'
\
-e
'/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/i\
-e
'/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/i\
#ifndef __cplusplus'
\
#ifndef __cplusplus
'
\
-e
'/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\
-e
'/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\
#endif'
\
#endif
'
\
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
>
${
LIB
}
/
${
file
}
.sed
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
rm
-f
${
LIB
}
/
$file
;
mv
${
LIB
}
/
${
file
}
.sed
${
LIB
}
/
$file
if
cmp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
;
then
if
cmp
$file
${
LIB
}
/
$file
>
/dev/null 2>&1
;
then
...
...
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