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
a72e508d
Commit
a72e508d
authored
Jun 19, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial revision
From-SVN: r10011
parent
0887bd4b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
73 additions
and
0 deletions
+73
-0
gcc/config/winnt/spawnv.c
+73
-0
No files found.
gcc/config/winnt/spawnv.c
0 → 100644
View file @
a72e508d
/* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguements. */
#define index(s,c) strchr((s),(c))
extern
char
*
xmalloc
();
const
char
*
const
*
fix_argv
(
argv
)
char
**
argv
;
{
static
char
sh_chars
[]
=
"
\"
"
;
int
i
,
len
;
char
*
new_argv
;
char
*
p
,
*
ap
;
for
(
i
=
1
;
argv
[
i
];
i
++
)
{
len
=
strlen
(
argv
[
i
]);
new_argv
=
xmalloc
(
2
*
len
+
3
);
ap
=
new_argv
;
*
ap
++
=
'"'
;
for
(
p
=
argv
[
i
];
*
p
!=
'\0'
;
++
p
)
{
if
(
index
(
sh_chars
,
*
p
)
!=
0
)
*
ap
++
=
'\\'
;
*
ap
++
=
*
p
;
}
*
ap
++
=
'"'
;
*
ap
=
'\0'
;
argv
[
i
]
=
new_argv
;
}
return
(
const
char
*
const
*
)
argv
;
}
int
spawnv
(
mode
,
cmdname
,
argv
)
int
mode
;
const
char
*
cmdname
;
char
**
argv
;
{
_spawnv
(
mode
,
cmdname
,
fix_argv
(
argv
));
}
int
spawnvp
(
mode
,
cmdname
,
argv
)
int
mode
;
const
char
*
cmdname
;
char
**
argv
;
{
_spawnvp
(
mode
,
cmdname
,
fix_argv
(
argv
));
}
int
spawnve
(
mode
,
cmdname
,
argv
,
envp
)
int
mode
;
const
char
*
cmdname
;
char
**
argv
;
const
char
*
const
*
envp
;
{
_spawnve
(
mode
,
cmdname
,
fix_argv
(
argv
),
envp
);
}
int
spawnvpe
(
mode
,
cmdname
,
argv
,
envp
)
int
mode
;
const
char
*
cmdname
;
char
**
argv
;
const
char
*
const
*
envp
;
{
_spawnvpe
(
mode
,
cmdname
,
fix_argv
(
argv
),
envp
);
}
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