Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
c5ee64a1
Commit
c5ee64a1
authored
May 25, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
May 26, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegcc: Add support for @file arguments.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f42e4431
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
winegcc.c
tools/winegcc/winegcc.c
+39
-1
No files found.
tools/winegcc/winegcc.c
View file @
c5ee64a1
...
...
@@ -1623,7 +1623,45 @@ int main(int argc, char **argv)
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
strarray_add
(
opts
.
args
,
argv
[
i
]
);
char
*
input_buffer
=
NULL
,
*
iter
,
*
opt
,
*
out
;
struct
stat
st
;
int
fd
;
if
(
argv
[
i
][
0
]
!=
'@'
||
(
fd
=
open
(
argv
[
i
]
+
1
,
O_RDONLY
|
O_BINARY
))
==
-
1
)
{
strarray_add
(
opts
.
args
,
argv
[
i
]
);
continue
;
}
if
((
fstat
(
fd
,
&
st
)
==
-
1
))
error
(
"Cannot stat %s"
,
argv
[
i
]
+
1
);
if
(
st
.
st_size
)
{
input_buffer
=
xmalloc
(
st
.
st_size
+
1
);
if
(
read
(
fd
,
input_buffer
,
st
.
st_size
)
!=
st
.
st_size
)
error
(
"Cannot read %s
\n
"
,
argv
[
i
]
+
1
);
}
close
(
fd
);
for
(
iter
=
input_buffer
;
iter
<
input_buffer
+
st
.
st_size
;
iter
++
)
{
char
quote
=
0
;
while
(
iter
<
input_buffer
+
st
.
st_size
&&
isspace
(
*
iter
))
iter
++
;
if
(
iter
==
input_buffer
+
st
.
st_size
)
break
;
opt
=
out
=
iter
;
while
(
iter
<
input_buffer
+
st
.
st_size
&&
(
quote
||
!
isspace
(
*
iter
)))
{
if
(
*
iter
==
quote
)
{
iter
++
;
quote
=
0
;
}
else
if
(
*
iter
==
'\''
||
*
iter
==
'"'
)
quote
=
*
iter
++
;
else
{
if
(
*
iter
==
'\\'
&&
iter
+
1
<
input_buffer
+
st
.
st_size
)
iter
++
;
*
out
++
=
*
iter
++
;
}
}
*
out
=
0
;
strarray_add
(
opts
.
args
,
opt
);
}
}
/* parse options */
...
...
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