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
aa76a77e
Commit
aa76a77e
authored
Sep 12, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove fix_argv kludge.
From-SVN: r10340
parent
cf601f01
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
46 deletions
+14
-46
gcc/gcc.c
+14
-46
No files found.
gcc/gcc.c
View file @
aa76a77e
...
...
@@ -41,6 +41,8 @@ compilation is specified by a string called a "spec". */
#include <sys/file.h>
/* May get R_OK, etc. on some systems. */
#else
#include <process.h>
int
__spawnv
();
int
__spawnvp
();
#endif
#include "config.h"
...
...
@@ -2112,54 +2114,20 @@ pexecute (search_flag, program, argv, not_last)
#endif
/* not __MSDOS__ and not OS2 and not _WIN32 */
#if defined(OS2)
|| defined(_WIN32)
#if defined(OS2)
#ifdef _WIN32
/* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguments. */
const
char
*
const
fix_argv
(
argvec
)
char
**
argvec
;
static
int
pexecute
(
search_flag
,
program
,
argv
,
not_last
)
int
search_flag
;
char
*
program
;
char
*
argv
[];
int
not_last
;
{
int
i
;
for
(
i
=
1
;
argvec
[
i
]
!=
0
;
i
++
)
{
int
len
,
j
;
char
*
temp
,
*
newtemp
;
temp
=
argvec
[
i
];
len
=
strlen
(
temp
);
for
(
j
=
0
;
j
<
len
;
j
++
)
{
if
(
temp
[
j
]
==
'"'
)
{
newtemp
=
xmalloc
(
len
+
2
);
strncpy
(
newtemp
,
temp
,
j
);
newtemp
[
j
]
=
'\\'
;
strncpy
(
&
newtemp
[
j
+
1
],
&
temp
[
j
],
len
-
j
);
newtemp
[
len
+
1
]
=
0
;
temp
=
newtemp
;
len
++
;
j
++
;
}
}
argvec
[
i
]
=
temp
;
}
return
(
const
char
*
const
*
)
argvec
;
return
(
search_flag
?
spawnv
:
spawnvp
)
(
1
,
program
,
argv
);
}
#endif
/* OS2 */
#define FIX_ARGV(a) fix_argv(a)
#else
#define FIX_ARGV(a) a
#endif
#if defined(_WIN32)
static
int
pexecute
(
search_flag
,
program
,
argv
,
not_last
)
...
...
@@ -2168,9 +2136,9 @@ pexecute (search_flag, program, argv, not_last)
char
*
argv
[];
int
not_last
;
{
return
(
search_flag
?
spawnv
:
spawnvp
)
(
1
,
program
,
FIX_ARGV
(
argv
)
);
return
(
search_flag
?
__spawnv
:
__spawnvp
)
(
1
,
program
,
argv
);
}
#endif
/*
OS2 or
_WIN32 */
#endif
/* _WIN32 */
/* Execute the command specified by the arguments on the current line of spec.
...
...
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