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
f08b1863
Commit
f08b1863
authored
Aug 27, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to derive temp file names from output file names for better
portability.
parent
d1b24def
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
22 deletions
+24
-22
parser.l
tools/widl/parser.l
+1
-1
widl.c
tools/widl/widl.c
+1
-1
import.c
tools/winebuild/import.c
+11
-12
wpp.c
tools/wpp/wpp.c
+9
-6
wpp.h
tools/wpp/wpp.h
+1
-1
wrc.c
tools/wrc/wrc.c
+1
-1
No files found.
tools/widl/parser.l
View file @
f08b1863
...
...
@@ -296,7 +296,7 @@ void do_import(char *fname)
import_stack[ptr].temp_name = temp_name;
import_stack_ptr++;
ret = wpp_parse_temp( path, &temp_name );
ret = wpp_parse_temp( path,
NULL,
&temp_name );
free( path );
if (ret) exit(1);
...
...
tools/widl/widl.c
View file @
f08b1863
...
...
@@ -166,7 +166,7 @@ int main(int argc,char *argv[])
if
(
!
preprocess_only
)
{
ret
=
wpp_parse_temp
(
input_name
,
&
temp_name
);
ret
=
wpp_parse_temp
(
input_name
,
header_name
,
&
temp_name
);
}
else
{
...
...
tools/winebuild/import.c
View file @
f08b1863
...
...
@@ -47,7 +47,6 @@ struct import
int
nb_exports
;
/* number of exported functions */
struct
func
*
imports
;
/* functions we want to import from this dll */
int
nb_imports
;
/* number of imported functions */
int
lineno
;
/* line in .spec file where import is defined */
};
static
char
**
undef_symbols
;
/* list of undefined symbols */
...
...
@@ -58,7 +57,7 @@ static char **ignore_symbols; /* list of symbols to ignore */
static
int
nb_ignore_symbols
;
static
int
ignore_size
;
static
c
onst
c
har
*
ld_tmp_file
;
/* ld temp file name */
static
char
*
ld_tmp_file
;
/* ld temp file name */
static
struct
import
**
dll_imports
=
NULL
;
static
int
nb_imports
=
0
;
/* number of imported dlls (delayed or not) */
...
...
@@ -232,8 +231,6 @@ void add_import_dll( const char *name, int delay )
imp
->
delay
=
delay
;
imp
->
imports
=
NULL
;
imp
->
nb_imports
=
0
;
/* GetToken for the file name has swallowed the '\n', hence pointing to next line */
imp
->
lineno
=
current_line
-
1
;
if
(
delay
)
nb_delayed
++
;
read_exported_symbols
(
fullname
,
imp
);
...
...
@@ -376,7 +373,7 @@ static void add_extra_undef_symbols(void)
/* warn if a given dll is not used, but check forwards first */
static
void
warn_unused
(
const
struct
import
*
imp
)
{
int
i
,
curline
;
int
i
;
size_t
len
=
strlen
(
imp
->
dll
);
const
char
*
p
=
strchr
(
imp
->
dll
,
'.'
);
if
(
p
&&
!
strcasecmp
(
p
,
".dll"
))
len
=
p
-
imp
->
dll
;
...
...
@@ -389,11 +386,7 @@ static void warn_unused( const struct import* imp )
odp
->
link_name
[
len
]
==
'.'
)
return
;
/* found an import, do not warn */
}
/* switch current_line temporarily to the line of the import declaration */
curline
=
current_line
;
current_line
=
imp
->
lineno
;
warning
(
"%s imported but no symbols used
\n
"
,
imp
->
dll
);
current_line
=
curline
;
}
/* combine a list of object files with ld into a single object file */
...
...
@@ -403,11 +396,17 @@ static const char *ldcombine_files( char **argv )
int
i
,
len
=
0
;
char
*
cmd
;
int
fd
,
err
;
char
buffer
[]
=
"/tmp/winebuild.tmp.XXXXXX"
;
if
((
fd
=
mkstemp
(
buffer
)
==
-
1
))
fatal_error
(
"could not generate a temp file
\n
"
);
if
(
output_file_name
&&
output_file_name
[
0
])
{
ld_tmp_file
=
xmalloc
(
strlen
(
output_file_name
)
+
8
);
strcpy
(
ld_tmp_file
,
output_file_name
);
strcat
(
ld_tmp_file
,
".XXXXXX"
);
}
else
ld_tmp_file
=
xstrdup
(
"/tmp/winebuild.tmp.XXXXXX"
);
if
((
fd
=
mkstemp
(
ld_tmp_file
)
==
-
1
))
fatal_error
(
"could not generate a temp file
\n
"
);
close
(
fd
);
ld_tmp_file
=
xstrdup
(
buffer
);
atexit
(
remove_ld_tmp_file
);
for
(
i
=
0
;
argv
[
i
];
i
++
)
len
+=
strlen
(
argv
[
i
])
+
1
;
...
...
tools/wpp/wpp.c
View file @
f08b1863
...
...
@@ -110,20 +110,23 @@ int wpp_parse( const char *input, FILE *output )
/* parse into a temporary file */
int
wpp_parse_temp
(
const
char
*
input
,
char
**
output_name
)
int
wpp_parse_temp
(
const
char
*
input
,
c
onst
char
*
output_base
,
c
har
**
output_name
)
{
FILE
*
output
;
int
ret
,
fd
;
char
tmpfn
[
20
],
*
temp_name
;
char
*
temp_name
;
strcpy
(
tmpfn
,
"/tmp/wpp.XXXXXX"
)
;
if
(
!
output_base
||
!
output_base
[
0
])
output_base
=
"wpptmp"
;
if
((
fd
=
mkstemp
(
tmpfn
))
==
-
1
)
temp_name
=
pp_xmalloc
(
strlen
(
output_base
)
+
8
);
strcpy
(
temp_name
,
output_base
);
strcat
(
temp_name
,
".XXXXXX"
);
if
((
fd
=
mkstemp
(
temp_name
))
==
-
1
)
{
fprintf
(
stderr
,
"Could not generate a temp
-name
\n
"
);
fprintf
(
stderr
,
"Could not generate a temp
name from %s
\n
"
,
temp_name
);
exit
(
2
);
}
temp_name
=
pp_xstrdup
(
tmpfn
);
if
(
!
(
output
=
fdopen
(
fd
,
"wt"
)))
{
...
...
tools/wpp/wpp.h
View file @
f08b1863
...
...
@@ -30,6 +30,6 @@ extern void wpp_set_pedantic( int on );
extern
void
wpp_add_include_path
(
const
char
*
path
);
extern
char
*
wpp_find_include
(
const
char
*
name
,
int
search
);
extern
int
wpp_parse
(
const
char
*
input
,
FILE
*
output
);
extern
int
wpp_parse_temp
(
const
char
*
input
,
char
**
output_name
);
extern
int
wpp_parse_temp
(
const
char
*
input
,
c
onst
char
*
output_base
,
c
har
**
output_name
);
#endif
/* __WINE_WPP_H */
tools/wrc/wrc.c
View file @
f08b1863
...
...
@@ -627,7 +627,7 @@ int main(int argc,char *argv[])
if
(
!
preprocess_only
)
{
atexit
(
rm_tempfile
);
ret
=
wpp_parse_temp
(
input_name
,
&
temp_name
);
ret
=
wpp_parse_temp
(
input_name
,
output_name
,
&
temp_name
);
}
else
if
(
output_name
)
{
...
...
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