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
299ce6f9
Commit
299ce6f9
authored
Apr 10, 2014
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makedep: Add a helper function to check if a string exists in an array.
parent
f9ddafa8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
11 deletions
+16
-11
makedep.c
tools/makedep.c
+16
-11
No files found.
tools/makedep.c
View file @
299ce6f9
...
@@ -343,14 +343,23 @@ static void strarray_addall( struct strarray *array, struct strarray added )
...
@@ -343,14 +343,23 @@ static void strarray_addall( struct strarray *array, struct strarray added )
/*******************************************************************
/*******************************************************************
* strarray_
add_uniq
* strarray_
exists
*/
*/
static
void
strarray_add_uniq
(
struct
strarray
*
array
,
const
char
*
str
)
static
int
strarray_exists
(
struct
strarray
*
array
,
const
char
*
str
)
{
{
unsigned
int
i
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
array
->
count
;
i
++
)
if
(
!
strcmp
(
array
->
str
[
i
],
str
))
return
;
for
(
i
=
0
;
i
<
array
->
count
;
i
++
)
if
(
!
strcmp
(
array
->
str
[
i
],
str
))
return
1
;
strarray_add
(
array
,
str
);
return
0
;
}
/*******************************************************************
* strarray_add_uniq
*/
static
void
strarray_add_uniq
(
struct
strarray
*
array
,
const
char
*
str
)
{
if
(
!
strarray_exists
(
array
,
str
))
strarray_add
(
array
,
str
);
}
}
...
@@ -2417,16 +2426,12 @@ static void update_makefile( const char *path )
...
@@ -2417,16 +2426,12 @@ static void update_makefile( const char *path )
if
(
make
->
module
&&
strendswith
(
make
->
module
,
".a"
))
make
->
staticlib
=
make
->
module
;
if
(
make
->
module
&&
strendswith
(
make
->
module
,
".a"
))
make
->
staticlib
=
make
->
module
;
make
->
use_msvcrt
=
0
;
make
->
is_win16
=
strarray_exists
(
&
make
->
extradllflags
,
"-m16"
)
;
for
(
i
=
0
;
i
<
make
->
appmode
.
count
&&
!
make
->
use_msvcrt
;
i
++
)
make
->
use_msvcrt
=
strarray_exists
(
&
make
->
appmode
,
"-mno-cygwin"
);
make
->
use_msvcrt
=
!
strcmp
(
make
->
appmode
.
str
[
i
],
"-mno-cygwin"
);
for
(
i
=
0
;
i
<
make
->
imports
.
count
&&
!
make
->
use_msvcrt
;
i
++
)
for
(
i
=
0
;
i
<
make
->
imports
.
count
&&
!
make
->
use_msvcrt
;
i
++
)
make
->
use_msvcrt
=
!
strncmp
(
make
->
imports
.
str
[
i
],
"msvcr"
,
5
);
make
->
use_msvcrt
=
!
strncmp
(
make
->
imports
.
str
[
i
],
"msvcr"
,
5
);
make
->
is_win16
=
0
;
for
(
i
=
0
;
i
<
make
->
extradllflags
.
count
&&
!
make
->
is_win16
;
i
++
)
if
(
!
strcmp
(
make
->
extradllflags
.
str
[
i
],
"-m16"
))
make
->
is_win16
=
1
;
make
->
include_args
=
empty_strarray
;
make
->
include_args
=
empty_strarray
;
make
->
define_args
=
empty_strarray
;
make
->
define_args
=
empty_strarray
;
strarray_add
(
&
make
->
define_args
,
"-D__WINESRC__"
);
strarray_add
(
&
make
->
define_args
,
"-D__WINESRC__"
);
...
...
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