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
e78ee4f4
Commit
e78ee4f4
authored
Apr 05, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecrt0: Avoid using wine/port.h.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1c7312a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
debug.c
dlls/winecrt0/debug.c
+5
-7
No files found.
dlls/winecrt0/debug.c
View file @
e78ee4f4
...
...
@@ -20,11 +20,9 @@
#ifdef _WIN32
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
...
...
@@ -54,7 +52,7 @@ static void load_func( void **func, const char *name, void *def )
{
HMODULE
module
=
GetModuleHandleA
(
"ntdll.dll"
);
void
*
proc
=
GetProcAddress
(
module
,
name
);
interlocked_xchg_pt
r
(
func
,
proc
?
proc
:
def
);
InterlockedExchangePointe
r
(
func
,
proc
?
proc
:
def
);
}
}
#define LOAD_FUNC(name) load_func( (void **)&p ## name, #name, fallback ## name )
...
...
@@ -164,8 +162,8 @@ static const char * __cdecl fallback__wine_dbg_strdup( const char *str )
char
*
ret
=
_strdup
(
str
);
int
idx
;
idx
=
interlocked_xchg_add
(
&
pos
,
1
)
%
ARRAY_SIZE
(
list
);
free
(
interlocked_xchg_pt
r
(
(
void
**
)
&
list
[
idx
],
ret
));
idx
=
InterlockedIncrement
(
&
pos
)
%
ARRAY_SIZE
(
list
);
free
(
InterlockedExchangePointe
r
(
(
void
**
)
&
list
[
idx
],
ret
));
return
ret
;
}
...
...
@@ -174,7 +172,7 @@ static int __cdecl fallback__wine_dbg_output( const char *str )
size_t
len
=
strlen
(
str
);
if
(
!
len
)
return
0
;
interlocked_xchg
(
(
LONG
*
)
&
partial_line_tid
,
str
[
len
-
1
]
!=
'\n'
?
GetCurrentThreadId
()
:
0
);
InterlockedExchange
(
(
LONG
*
)
&
partial_line_tid
,
str
[
len
-
1
]
!=
'\n'
?
GetCurrentThreadId
()
:
0
);
return
fwrite
(
str
,
1
,
len
,
stderr
);
}
...
...
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