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
2629a114
Commit
2629a114
authored
Dec 13, 2000
by
Bruce Korb
Committed by
Bruce Korb
Dec 13, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use one makefile for fixinc
From-SVN: r38231
parent
c36ee164
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
95 additions
and
140 deletions
+95
-140
gcc/ChangeLog
+18
-0
gcc/fixinc/Makefile.in
+25
-14
gcc/fixinc/fixfixes.c
+8
-1
gcc/fixinc/fixincl.c
+2
-2
gcc/fixinc/fixlib.h
+7
-3
gcc/fixinc/fixtests.c
+1
-0
gcc/fixinc/genfixes
+1
-1
gcc/fixinc/gnu-regex.c
+4
-15
gcc/fixinc/mkfixinc.sh
+12
-21
gcc/fixinc/procopen.c
+8
-33
gcc/fixinc/server.c
+4
-30
gcc/fixinc/server.h
+5
-20
No files found.
gcc/ChangeLog
View file @
2629a114
2000-12-13 Bruce Korb <bkorb@gnu.org>
* fixinc/Makefile.in(*): substantial rewrite to accommodate systems
that cannot handle bi-directional pipes, viz. BeOS and DOS.
* fixinc/fixlib.h(IGNORE_ARG): new macro
(STATIC): define for all of fixinc to use
* fixinc/fixfixes.c(*): eliminate unused arg warnings
* fixinc/fixtests.c(*): ditto
* fixinc/fixincl.c(start_fixer): chain_open now uses const arg list
* fixinc/gnu-regex.c: reorder some includes to avoid _GNU_SOURCE
warning. Also, eliminate the ``#ifdef emacs'' stuff.
(re_syntax_options): make global as it is declared so.
* fixinc/mkfixinc.sh: process the argument list more consistently
(beos/msdosdjgpp): set TARGETS to twoprocess vs. oneprocess
* fixinc/procopen.c(globals): include "fixlib.h" for std defs
* fixinc/server.c(globals): ditto
* fixinc/server.h(defines): ditto
2000-12-13 Neil Booth <neil@daikokuya.demon.co.uk>
2000-12-13 Neil Booth <neil@daikokuya.demon.co.uk>
* tradcpp.c (special_symbol): Improve test for definedness,
* tradcpp.c (special_symbol): Improve test for definedness,
...
...
gcc/fixinc/Makefile.in
View file @
2629a114
...
@@ -59,23 +59,38 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. \
...
@@ -59,23 +59,38 @@ INCLUDES = -I. -I.. -I$(srcdir) -I$(srcdir)/.. \
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
LIBERTY
=
../../libiberty/libiberty.a
LIBERTY
=
../../libiberty/libiberty.a
OBJ
=
fixincl.o fixtests.o fixfixes.o server.o procopen.o
\
ALLOBJ
=
fixincl.o fixtests.o fixfixes.o server.o procopen.o
\
gnu-regex.o fixlib.o
gnu-regex.o fixlib.o
HDR
=
server.h gnu-regex.h fixlib.h machname.h
TESTOBJ
=
fixincl.o fixlib.o fixtests.o gnu-regex.o
FIXOBJ
=
fixfixes.o fixlib.o gnu-regex.o
TARGETS
=
fixincl@build_exeext@
HDR
=
server.h gnu-regex.h fixlib.h machname.h
FI
=
fixincl@build_exeext@
AF
=
applyfix@build_exeext@
all
:
$(TARGETS)
all
:
$(TARGETS)
gen
:
$(srcdir)/fixincl.x
gen
:
$(srcdir)/fixincl.x
fixincl@build_exeext@
:
$(OBJ) $(LIBERTY)
oneprocess
:
full-stamp
$(CC)
$(FIXINC_DEFS)
$(LDFLAGS)
-o
$@
$(OBJ)
$(LIBERTY)
twoprocess
:
test-stamp $(AF)
full-stamp
:
$(ALLOBJ) $(LIBERTY)
$(CC)
$(FIXINC_DEFS)
$(LDFLAGS)
-o
$(FI)
$(ALLOBJ)
$(LIBERTY)
touch
$@
test-stamp
:
$(TESTOBJ) $(LIBERTY)
$(CC)
$(FIXINC_DEFS)
$(LDFLAGS)
-o
$(FI)
$(TESTOBJ)
$(LIBERTY)
touch
$@
$(AF)
:
$(FIXOBJ) $(LIBERTY)
$(CC)
$(FIXINC_DEFS)
$(LDFLAGS)
-o
$@
$(FIXOBJ)
$(LIBERTY)
$(
OBJ)
:
$(HDR)
$(
ALLOBJ)
:
$(HDR)
fixincl.o
:
$(srcdir)/fixincl.x fixincl.c
fixincl.o
:
fixincl.c $(srcdir)/fixincl.x
fixtests.o
:
fixtests.c
fixtests.o
:
fixtests.c
fixfixes.o
:
fixfixes.c
fixfixes.o
:
fixfixes.c
$(srcdir)/fixincl.x
server.o
:
server.c
server.o
:
server.c
procopen.o
:
procopen.c
procopen.o
:
procopen.c
gnu-regex.o
:
gnu-regex.c
gnu-regex.o
:
gnu-regex.c
...
@@ -91,7 +106,7 @@ $(srcdir)/fixincl.x: fixincl.tpl inclhack.def
...
@@ -91,7 +106,7 @@ $(srcdir)/fixincl.x: fixincl.tpl inclhack.def
cd
$(srcdir)
;
$(SHELL)
./genfixes
$@
cd
$(srcdir)
;
$(SHELL)
./genfixes
$@
clean
:
clean
:
rm
-f
*
.o
$(TARGETS
)
machname.h
*
~
rm
-f
*
.o
*
-stamp
$(AF)
$(FI
)
machname.h
*
~
maintainer-clean
:
clean
maintainer-clean
:
clean
rm
-f
$(srcdir)
/fixincl.x
rm
-f
$(srcdir)
/fixincl.x
...
@@ -103,11 +118,7 @@ install-bin : $(TARGETS)
...
@@ -103,11 +118,7 @@ install-bin : $(TARGETS)
./fixincl
-v
./fixincl
-v
@
if
[
-f
../fixinc.sh
]
;
then
rm
-f
../fixinc.sh
||
\
@
if
[
-f
../fixinc.sh
]
;
then
rm
-f
../fixinc.sh
||
\
mv
-f
../fixinc.sh ../fixinc.sh.
$$
||
exit
1
;
fi
mv
-f
../fixinc.sh ../fixinc.sh.
$$
||
exit
1
;
fi
@
if
[
-f
./fixincl.sh
]
;
\
@
cp
$(srcdir)
/fixincl.sh ../fixinc.sh
then
echo
cp ./fixincl.sh ../fixinc.sh
;
\
cp ./fixincl.sh ../fixinc.sh
;
\
else
echo
cp
$(srcdir)
/fixincl.sh ../fixinc.sh
;
\
cp
$(srcdir)
/fixincl.sh ../fixinc.sh
;
fi
chmod 755 ../fixinc.sh
chmod 755 ../fixinc.sh
Makefile
:
Makefile.in ../config.status
Makefile
:
Makefile.in ../config.status
...
...
gcc/fixinc/fixfixes.c
View file @
2629a114
...
@@ -257,6 +257,7 @@ FIX_PROC_HEAD( format_fix )
...
@@ -257,6 +257,7 @@ FIX_PROC_HEAD( format_fix )
tCC
*
pz_fmt
=
p_fixd
->
patch_args
[
1
];
tCC
*
pz_fmt
=
p_fixd
->
patch_args
[
1
];
regex_t
re
;
regex_t
re
;
regmatch_t
rm
[
10
];
regmatch_t
rm
[
10
];
IGNORE_ARG
(
filname
);
/*
/*
* We must have a format
* We must have a format
...
@@ -335,6 +336,7 @@ FIX_PROC_HEAD( char_macro_use_fix )
...
@@ -335,6 +336,7 @@ FIX_PROC_HEAD( char_macro_use_fix )
regmatch_t
rm
[
1
];
regmatch_t
rm
[
1
];
const
char
*
p
,
*
limit
;
const
char
*
p
,
*
limit
;
size_t
len
;
size_t
len
;
IGNORE_ARG
(
filname
);
if
(
str
==
NULL
)
if
(
str
==
NULL
)
{
{
...
@@ -419,6 +421,7 @@ FIX_PROC_HEAD( char_macro_def_fix )
...
@@ -419,6 +421,7 @@ FIX_PROC_HEAD( char_macro_def_fix )
const
char
*
p
,
*
limit
;
const
char
*
p
,
*
limit
;
char
arg
;
char
arg
;
size_t
len
;
size_t
len
;
IGNORE_ARG
(
filname
);
if
(
str
==
NULL
)
if
(
str
==
NULL
)
{
{
...
@@ -511,6 +514,8 @@ FIX_PROC_HEAD( machine_name_fix )
...
@@ -511,6 +514,8 @@ FIX_PROC_HEAD( machine_name_fix )
regex_t
*
label_re
,
*
name_re
;
regex_t
*
label_re
,
*
name_re
;
char
scratch
[
SCRATCHSZ
];
char
scratch
[
SCRATCHSZ
];
size_t
len
;
size_t
len
;
IGNORE_ARG
(
filname
);
IGNORE_ARG
(
p_fixd
);
mn_get_regexps
(
&
label_re
,
&
name_re
,
"machine_name_fix"
);
mn_get_regexps
(
&
label_re
,
&
name_re
,
"machine_name_fix"
);
...
@@ -598,7 +603,7 @@ FIX_PROC_HEAD( machine_name_fix )
...
@@ -598,7 +603,7 @@ FIX_PROC_HEAD( machine_name_fix )
FIX_PROC_HEAD
(
wrap_fix
)
FIX_PROC_HEAD
(
wrap_fix
)
{
{
tSCC
z_no_wrap_pat
[]
=
"^#if.*__need_"
;
tSCC
z_no_wrap_pat
[]
=
"^#if.*__need_"
;
static
regex_t
no_wrapping_re
=
{
NULL
,
0
,
0
};
static
regex_t
no_wrapping_re
;
/* assume zeroed data */
char
z_fixname
[
64
];
char
z_fixname
[
64
];
tCC
*
pz_src
=
p_fixd
->
fix_name
;
tCC
*
pz_src
=
p_fixd
->
fix_name
;
...
@@ -606,6 +611,7 @@ FIX_PROC_HEAD( wrap_fix )
...
@@ -606,6 +611,7 @@ FIX_PROC_HEAD( wrap_fix )
char
*
pz_dst
=
z_fixname
;
char
*
pz_dst
=
z_fixname
;
int
do_end
=
0
;
int
do_end
=
0
;
size_t
len
=
0
;
size_t
len
=
0
;
IGNORE_ARG
(
filname
);
if
(
no_wrapping_re
.
allocated
==
0
)
if
(
no_wrapping_re
.
allocated
==
0
)
compile_re
(
z_no_wrap_pat
,
&
no_wrapping_re
,
0
,
"no-wrap pattern"
,
compile_re
(
z_no_wrap_pat
,
&
no_wrapping_re
,
0
,
"no-wrap pattern"
,
...
@@ -670,6 +676,7 @@ FIX_PROC_HEAD( gnu_type_fix )
...
@@ -670,6 +676,7 @@ FIX_PROC_HEAD( gnu_type_fix )
const
char
*
pz_pat
;
const
char
*
pz_pat
;
regex_t
re
;
regex_t
re
;
regmatch_t
rm
[
GTYPE_SE_CT
+
1
];
regmatch_t
rm
[
GTYPE_SE_CT
+
1
];
IGNORE_ARG
(
filname
);
{
{
tTestDesc
*
pTD
=
p_fixd
->
p_test_desc
;
tTestDesc
*
pTD
=
p_fixd
->
p_test_desc
;
...
...
gcc/fixinc/fixincl.c
View file @
2629a114
:
1066
/* Install modified versions of certain ANSI-incompatible system header
/* Install modified versions of certain ANSI-incompatible system header
files which are fixed to work correctly with ANSI C and placed in a
files which are fixed to work correctly with ANSI C and placed in a
directory that GNU C will search.
directory that GNU C will search.
...
@@ -1066,7 +1066,7 @@ start_fixer (read_fd, p_fixd, pz_fix_file)
...
@@ -1066,7 +1066,7 @@ start_fixer (read_fd, p_fixd, pz_fix_file)
int
fd
;
int
fd
;
fd
=
chain_open
(
read_fd
,
fd
=
chain_open
(
read_fd
,
(
t
_pchar
*
)
p_fixd
->
patch_args
,
(
t
CC
*
*
)
p_fixd
->
patch_args
,
(
process_chain_head
==
-
1
)
(
process_chain_head
==
-
1
)
?
&
process_chain_head
:
(
pid_t
*
)
NULL
);
?
&
process_chain_head
:
(
pid_t
*
)
NULL
);
...
...
gcc/fixinc/fixlib.h
View file @
2629a114
...
@@ -51,6 +51,11 @@ typedef int t_success;
...
@@ -51,6 +51,11 @@ typedef int t_success;
#define FAILED(p) ((p) < SUCCESS)
#define FAILED(p) ((p) < SUCCESS)
#define HADGLITCH(p) ((p) > SUCCESS)
#define HADGLITCH(p) ((p) > SUCCESS)
#ifndef DEBUG
# define STATIC static
#else
# define STATIC
#endif
#define tSCC static const char
#define tSCC static const char
#define tCC const char
#define tCC const char
...
@@ -81,13 +86,12 @@ typedef int t_success;
...
@@ -81,13 +86,12 @@ typedef int t_success;
#define EXIT_PANIC 99
#define EXIT_PANIC 99
#endif
/* NOPROCESS */
#endif
/* NOPROCESS */
#
ifndef HAVE_T_BOOL_ENUM
#
define IGNORE_ARG(a) ((void)(a))
#define HAVE_T_BOOL_ENUM
typedef
enum
typedef
enum
{
{
BOOL_FALSE
,
BOOL_TRUE
BOOL_FALSE
,
BOOL_TRUE
}
t_bool
;
}
t_bool
;
#endif
typedef
int
apply_fix_p_t
;
/* Apply Fix Predicate Type */
typedef
int
apply_fix_p_t
;
/* Apply Fix Predicate Type */
...
...
gcc/fixinc/fixtests.c
View file @
2629a114
...
@@ -72,6 +72,7 @@ TEST_FOR_FIX_PROC_HEAD( machine_name_test )
...
@@ -72,6 +72,7 @@ TEST_FOR_FIX_PROC_HEAD( machine_name_test )
regex_t
*
label_re
,
*
name_re
;
regex_t
*
label_re
,
*
name_re
;
regmatch_t
match
[
2
];
regmatch_t
match
[
2
];
tCC
*
base
,
*
limit
;
tCC
*
base
,
*
limit
;
IGNORE_ARG
(
fname
);
mn_get_regexps
(
&
label_re
,
&
name_re
,
"machine_name_test"
);
mn_get_regexps
(
&
label_re
,
&
name_re
,
"machine_name_test"
);
...
...
gcc/fixinc/genfixes
View file @
2629a114
...
@@ -63,7 +63,7 @@ if [ $# -eq 0 ] ; then
...
@@ -63,7 +63,7 @@ if [ $# -eq 0 ] ; then
set
--
fixincl.x
set
--
fixincl.x
fi
fi
AG
=
"autogen
$AG
"
AG
=
"autogen
4
$AG
"
set
-e
set
-e
case
"
$1
"
in
case
"
$1
"
in
...
...
gcc/fixinc/gnu-regex.c
View file @
2629a114
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
along with this program; if not, write to the Free Software Foundation,
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "auto-host.h"
#undef _GNU_SOURCE
#undef _GNU_SOURCE
#define _GNU_SOURCE
#define _GNU_SOURCE
...
@@ -76,18 +78,6 @@
...
@@ -76,18 +78,6 @@
# define gettext_noop(String) String
# define gettext_noop(String) String
#endif
#endif
/* The `emacs' switch turns on certain matching commands
that make sense only in Emacs. */
#ifdef emacs
# include "lisp.h"
# include "buffer.h"
# include "syntax.h"
#else
/* not emacs */
# include "auto-host.h"
# if !defined(volatile) && !defined(HAVE_VOLATILE)
# if !defined(volatile) && !defined(HAVE_VOLATILE)
# define volatile
# define volatile
# endif
# endif
...
@@ -191,8 +181,6 @@ init_syntax_once ()
...
@@ -191,8 +181,6 @@ init_syntax_once ()
# endif
/* not SYNTAX_TABLE */
# endif
/* not SYNTAX_TABLE */
# define SYNTAX(c) re_syntax_table[c]
# define SYNTAX(c) re_syntax_table[c]
#endif
/* not emacs */
/* Get the interface, including the syntax bits. */
/* Get the interface, including the syntax bits. */
/* GCC LOCAL: call it gnu-regex.h, not regex.h, to avoid name conflicts */
/* GCC LOCAL: call it gnu-regex.h, not regex.h, to avoid name conflicts */
...
@@ -922,7 +910,7 @@ printchar (c)
...
@@ -922,7 +910,7 @@ printchar (c)
syntax, so it can be changed between regex compilations. */
syntax, so it can be changed between regex compilations. */
/* This has no initializer because initialized variables in Emacs
/* This has no initializer because initialized variables in Emacs
become read-only after dumping. */
become read-only after dumping. */
static
reg_syntax_t
re_syntax_options
;
reg_syntax_t
re_syntax_options
;
/* Specify the precise syntax of regexps for compilation. This provides
/* Specify the precise syntax of regexps for compilation. This provides
...
@@ -5710,6 +5698,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
...
@@ -5710,6 +5698,7 @@ regerror (errcode, preg, errbuf, errbuf_size)
{
{
const
char
*
msg
;
const
char
*
msg
;
size_t
msg_size
;
size_t
msg_size
;
(
void
)
preg
;
if
(
errcode
<
0
if
(
errcode
<
0
||
errcode
>=
(
int
)
(
sizeof
(
re_error_msgid
)
||
errcode
>=
(
int
)
(
sizeof
(
re_error_msgid
)
...
...
gcc/fixinc/mkfixinc.sh
View file @
2629a114
#! /bin/sh
#! /bin/sh
build
=
$1
if
[
$#
-ne
2
]
machine
=
$2
if
[
-z
"
$build
"
]
then
echo
No target system name given
exit
1
fi
# If we don't get two arguments, then assume both arguments
# are the same
#
if
[
-z
"
$machine
"
]
then
then
machine
=
"
$build
"
echo
"Usage:
$0
<build-mach-triplet> <target-mach-triplet>"
exit
1
fi
fi
build
=
$1
machine
=
$2
target
=
../fixinc.sh
target
=
../fixinc.sh
echo
constructing
${
target
}
for
$machine
to run on
$build
echo
constructing
${
target
}
for
$machine
to run on
$build
fixincludes
=
"
${
machine
}
"
fixincludes
=
"
${
machine
}
"
# Choose fix build method by build system
# Choose one or two-process fix methodology. Systems that cannot handle
# bi-directional pipes must use the twoprocess method.
#
case
$build
in
case
$build
in
i?86-
*
-msdosdjgpp
*
)
i?86-
*
-msdosdjgpp
*
|
\
MAKE
=
"
${
MAKE
}
-f
${
srcdir
}
/Makefile.DOS srcdir=
${
srcdir
}
"
;;
*
-
*
-beos
*
)
*
-
*
-beos
*
)
MAKE
=
"
${
MAKE
}
-f
${
srcdir
}
/Makefile.BEOS srcdir=
${
srcdir
}
"
MAKE
=
"
${
MAKE
}
TARGETS=twoprocess"
CFLAGS
=
"
${
CFLAGS
}
-DSEPARATE_FIX_PROC"
;;
;;
*
)
*
)
MAKE
=
"
${
MAKE
}
-f Makefile
"
MAKE
=
"
${
MAKE
}
TARGETS=oneprocess
"
;;
;;
esac
esac
...
...
gcc/fixinc/procopen.c
View file @
2629a114
...
@@ -50,34 +50,9 @@
...
@@ -50,34 +50,9 @@
#include "system.h"
#include "system.h"
#include "server.h"
#include "server.h"
#include "fixlib.h"
/* If this particular system's header files define the macro `MAXPATHLEN',
STATIC
const
char
*
def_args
[]
=
we happily take advantage of it; otherwise we use a value which ought
to be large enough. */
#ifndef MAXPATHLEN
# define MAXPATHLEN 4096
#endif
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
#ifndef STDOUT_FILENO
# define STDOUT_FILENO 1
#endif
#ifdef DEBUG
#define STATIC
#else
#define STATIC static
#endif
#ifndef tSCC
#define tSCC static const char
#endif
#ifndef NUL
#define NUL '\0'
#endif
STATIC
t_pchar
def_args
[]
=
{
(
char
*
)
NULL
,
(
char
*
)
NULL
};
{
(
char
*
)
NULL
,
(
char
*
)
NULL
};
/*
/*
...
@@ -92,12 +67,12 @@ STATIC t_pchar def_args[] =
...
@@ -92,12 +67,12 @@ STATIC t_pchar def_args[] =
int
int
chain_open
(
stdin_fd
,
pp_args
,
p_child
)
chain_open
(
stdin_fd
,
pp_args
,
p_child
)
int
stdin_fd
;
int
stdin_fd
;
t
_pchar
*
pp_args
;
t
CC
*
*
pp_args
;
pid_t
*
p_child
;
pid_t
*
p_child
;
{
{
t_fd_pair
stdout_pair
;
t_fd_pair
stdout_pair
;
pid_t
ch_id
;
pid_t
ch_id
;
char
*
pz_cmd
;
tCC
*
pz_cmd
;
stdout_pair
.
read_fd
=
stdout_pair
.
write_fd
=
-
1
;
stdout_pair
.
read_fd
=
stdout_pair
.
write_fd
=
-
1
;
...
@@ -115,7 +90,7 @@ chain_open (stdin_fd, pp_args, p_child)
...
@@ -115,7 +90,7 @@ chain_open (stdin_fd, pp_args, p_child)
/*
/*
* If we did not get an arg list, use the default
* If we did not get an arg list, use the default
*/
*/
if
(
pp_args
==
(
t
_pchar
*
)
NULL
)
if
(
pp_args
==
(
t
CC
*
*
)
NULL
)
pp_args
=
def_args
;
pp_args
=
def_args
;
/*
/*
...
@@ -192,7 +167,7 @@ chain_open (stdin_fd, pp_args, p_child)
...
@@ -192,7 +167,7 @@ chain_open (stdin_fd, pp_args, p_child)
if
(
*
pp_args
==
(
char
*
)
NULL
)
if
(
*
pp_args
==
(
char
*
)
NULL
)
*
pp_args
=
pz_cmd
;
*
pp_args
=
pz_cmd
;
execvp
(
pz_cmd
,
pp_args
);
execvp
(
pz_cmd
,
(
char
**
)
pp_args
);
fprintf
(
stderr
,
"Error %d: Could not execvp( '%s', ... ): %s
\n
"
,
fprintf
(
stderr
,
"Error %d: Could not execvp( '%s', ... ): %s
\n
"
,
errno
,
pz_cmd
,
xstrerror
(
errno
));
errno
,
pz_cmd
,
xstrerror
(
errno
));
exit
(
EXIT_PANIC
);
exit
(
EXIT_PANIC
);
...
@@ -212,7 +187,7 @@ chain_open (stdin_fd, pp_args, p_child)
...
@@ -212,7 +187,7 @@ chain_open (stdin_fd, pp_args, p_child)
pid_t
pid_t
proc2_open
(
p_pair
,
pp_args
)
proc2_open
(
p_pair
,
pp_args
)
t_fd_pair
*
p_pair
;
t_fd_pair
*
p_pair
;
t
_pchar
*
pp_args
;
t
CC
*
*
pp_args
;
{
{
pid_t
ch_id
;
pid_t
ch_id
;
...
@@ -239,7 +214,7 @@ proc2_open (p_pair, pp_args)
...
@@ -239,7 +214,7 @@ proc2_open (p_pair, pp_args)
pid_t
pid_t
proc2_fopen
(
pf_pair
,
pp_args
)
proc2_fopen
(
pf_pair
,
pp_args
)
t_pf_pair
*
pf_pair
;
t_pf_pair
*
pf_pair
;
t
_pchar
*
pp_args
;
t
CC
*
*
pp_args
;
{
{
t_fd_pair
fd_pair
;
t_fd_pair
fd_pair
;
pid_t
ch_id
=
proc2_open
(
&
fd_pair
,
pp_args
);
pid_t
ch_id
=
proc2_open
(
&
fd_pair
,
pp_args
);
...
...
gcc/fixinc/server.c
View file @
2629a114
...
@@ -53,32 +53,6 @@
...
@@ -53,32 +53,6 @@
#include "server.h"
#include "server.h"
/* If this particular system's header files define the macro `MAXPATHLEN',
we happily take advantage of it; otherwise we use a value which ought
to be large enough. */
#ifndef MAXPATHLEN
# define MAXPATHLEN 4096
#endif
#ifndef STDIN_FILENO
# define STDIN_FILENO 0
#endif
#ifndef STDOUT_FILENO
# define STDOUT_FILENO 1
#endif
#ifdef DEBUG
#define STATIC
#else
#define STATIC static
#endif
#ifndef tSCC
#define tSCC static const char
#endif
#ifndef NUL
#define NUL '\0'
#endif
#if !defined(volatile) && !defined(HAVE_VOLATILE)
#if !defined(volatile) && !defined(HAVE_VOLATILE)
# define volatile
# define volatile
#endif
#endif
...
@@ -86,7 +60,7 @@
...
@@ -86,7 +60,7 @@
STATIC
volatile
t_bool
read_pipe_timeout
;
STATIC
volatile
t_bool
read_pipe_timeout
;
STATIC
pid_t
server_master_pid
=
NOPROCESS
;
STATIC
pid_t
server_master_pid
=
NOPROCESS
;
static
t_pchar
def_args
[]
=
tSCC
*
def_args
[]
=
{
(
char
*
)
NULL
,
(
char
*
)
NULL
};
{
(
char
*
)
NULL
,
(
char
*
)
NULL
};
STATIC
t_pf_pair
server_pair
=
STATIC
t_pf_pair
server_pair
=
{
(
FILE
*
)
NULL
,
(
FILE
*
)
NULL
};
{
(
FILE
*
)
NULL
,
(
FILE
*
)
NULL
};
...
@@ -97,7 +71,7 @@ STATIC pid_t server_id = NULLPROCESS;
...
@@ -97,7 +71,7 @@ STATIC pid_t server_id = NULLPROCESS;
* the terminating output line.
* the terminating output line.
*/
*/
tSCC
z_done
[]
=
"ShElL-OuTpUt-HaS-bEeN-cOmPlEtEd"
;
tSCC
z_done
[]
=
"ShElL-OuTpUt-HaS-bEeN-cOmPlEtEd"
;
STATIC
t_pchar
p_cur_dir
=
(
char
*
)
NULL
;
tSCC
*
p_cur_dir
=
(
char
*
)
NULL
;
/*
/*
* load_data
* load_data
...
@@ -257,8 +231,8 @@ server_setup ()
...
@@ -257,8 +231,8 @@ server_setup ()
* override with $CONFIG_SHELL, so we do the same.
* override with $CONFIG_SHELL, so we do the same.
*/
*/
static
char
*
find_shell
PARAMS
((
void
));
static
c
onst
c
har
*
find_shell
PARAMS
((
void
));
static
char
*
static
c
onst
c
har
*
find_shell
()
find_shell
()
{
{
char
*
shell
=
getenv
(
"CONFIG_SHELL"
);
char
*
shell
=
getenv
(
"CONFIG_SHELL"
);
...
...
gcc/fixinc/server.h
View file @
2629a114
...
@@ -54,6 +54,8 @@
...
@@ -54,6 +54,8 @@
#include <unistd.h>
#include <unistd.h>
#endif
#endif
#include "fixlib.h"
/*
/*
* Dual pipe opening of a child process
* Dual pipe opening of a child process
*/
*/
...
@@ -70,27 +72,10 @@ typedef struct
...
@@ -70,27 +72,10 @@ typedef struct
FILE
*
pf_write
;
/* parent write fp */
FILE
*
pf_write
;
/* parent write fp */
}
t_pf_pair
;
}
t_pf_pair
;
typedef
char
*
t_pchar
;
#ifndef NOPROCESS
#define NOPROCESS ((pid_t) -1)
#define NULLPROCESS ((pid_t)0)
#define EXIT_PANIC 99
#endif
/* NOPROCESS */
#ifndef HAVE_T_BOOL_ENUM
#define HAVE_T_BOOL_ENUM
typedef
enum
{
BOOL_FALSE
,
BOOL_TRUE
}
t_bool
;
#endif
char
*
run_shell
PARAMS
((
const
char
*
pzCmd
));
char
*
run_shell
PARAMS
((
const
char
*
pzCmd
));
pid_t
proc2_fopen
PARAMS
((
t_pf_pair
*
p_pair
,
t
_pchar
*
pp_args
));
pid_t
proc2_fopen
PARAMS
((
t_pf_pair
*
p_pair
,
t
CC
*
*
pp_args
));
pid_t
proc2_open
PARAMS
((
t_fd_pair
*
p_pair
,
t
_pchar
*
pp_args
));
pid_t
proc2_open
PARAMS
((
t_fd_pair
*
p_pair
,
t
CC
*
*
pp_args
));
int
chain_open
PARAMS
((
int
in_fd
,
t
_pchar
*
pp_args
,
int
chain_open
PARAMS
((
int
in_fd
,
t
CC
*
*
pp_args
,
pid_t
*
p_child
));
pid_t
*
p_child
));
void
close_server
PARAMS
((
void
));
void
close_server
PARAMS
((
void
));
#endif
/* FIXINC_SERVER_H */
#endif
/* FIXINC_SERVER_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