Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
483de1a8
Commit
483de1a8
authored
Jun 12, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: Build with msvcrt.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bdd48b41
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
63 additions
and
45 deletions
+63
-45
Makefile.in
dlls/kernelbase/Makefile.in
+2
-1
main.c
dlls/kernelbase/main.c
+10
-0
path.c
dlls/kernelbase/path.c
+0
-0
string.c
dlls/kernelbase/string.c
+49
-44
winegcc.c
tools/winegcc/winegcc.c
+2
-0
No files found.
dlls/kernelbase/Makefile.in
View file @
483de1a8
MODULE
=
kernelbase.dll
IMPORTS
=
uuid advapi32
IMPORTS
=
uuid advapi32 ntdll winecrt0 kernel32
EXTRADLLFLAGS
=
-nodefaultlibs
-nostartfiles
-mno-cygwin
C_SRCS
=
\
main.c
\
...
...
dlls/kernelbase/main.c
View file @
483de1a8
...
...
@@ -31,6 +31,16 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
kernelbase
);
/*************************************************************
* DllMainCRTStartup
*/
BOOL
WINAPI
DllMainCRTStartup
(
HANDLE
inst
,
DWORD
reason
,
LPVOID
reserved
)
{
return
TRUE
;
}
/***********************************************************************
* AppPolicyGetProcessTerminationMethod (KERNELBASE.@)
*/
...
...
dlls/kernelbase/path.c
View file @
483de1a8
This diff is collapsed.
Click to expand it.
dlls/kernelbase/string.c
View file @
483de1a8
...
...
@@ -26,10 +26,13 @@
#include "wine/debug.h"
#include "wine/exception.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
string
);
#define isxdigit(ch) (((ch) >= '0' && (ch) <= '9') || \
((ch) >= 'A' && (ch) <= 'F') || \
((ch) >= 'a' && (ch) <= 'f'))
static
WORD
get_char_type
(
WCHAR
ch
)
{
WORD
type
=
0
;
...
...
@@ -200,7 +203,7 @@ WCHAR * WINAPI StrChrW(const WCHAR *str, WCHAR ch)
if
(
!
str
)
return
NULL
;
return
strchrW
(
str
,
ch
);
return
wcschr
(
str
,
ch
);
}
char
*
WINAPI
StrChrIA
(
const
char
*
str
,
WORD
ch
)
...
...
@@ -227,10 +230,10 @@ WCHAR * WINAPI StrChrIW(const WCHAR *str, WCHAR ch)
if
(
!
str
)
return
NULL
;
ch
=
to
upperW
(
ch
);
ch
=
to
wupper
(
ch
);
while
(
*
str
)
{
if
(
to
upperW
(
*
str
)
==
ch
)
if
(
to
wupper
(
*
str
)
==
ch
)
return
(
WCHAR
*
)
str
;
str
++
;
}
...
...
@@ -284,7 +287,7 @@ WCHAR * WINAPI StrDupW(const WCHAR *str)
TRACE
(
"%s
\n
"
,
wine_dbgstr_w
(
str
));
len
=
(
str
?
strlenW
(
str
)
+
1
:
1
)
*
sizeof
(
WCHAR
);
len
=
(
str
?
l
strlenW
(
str
)
+
1
:
1
)
*
sizeof
(
WCHAR
);
ret
=
LocalAlloc
(
LMEM_FIXED
,
len
);
if
(
ret
)
...
...
@@ -351,7 +354,7 @@ WCHAR * WINAPI StrStrW(const WCHAR *str, const WCHAR *search)
if
(
!
str
||
!
search
||
!*
search
)
return
NULL
;
return
strstrW
(
str
,
search
);
return
wcsstr
(
str
,
search
);
}
WCHAR
*
WINAPI
StrStrNW
(
const
WCHAR
*
str
,
const
WCHAR
*
search
,
UINT
max_len
)
...
...
@@ -363,11 +366,11 @@ WCHAR * WINAPI StrStrNW(const WCHAR *str, const WCHAR *search, UINT max_len)
if
(
!
str
||
!
search
||
!*
search
||
!
max_len
)
return
NULL
;
len
=
strlenW
(
search
);
len
=
l
strlenW
(
search
);
for
(
i
=
max_len
;
*
str
&&
(
i
>
0
);
i
--
,
str
++
)
{
if
(
!
strncmpW
(
str
,
search
,
len
))
if
(
!
wcsncmp
(
str
,
search
,
len
))
return
(
WCHAR
*
)
str
;
}
...
...
@@ -389,11 +392,11 @@ WCHAR * WINAPI StrStrNIW(const WCHAR *str, const WCHAR *search, UINT max_len)
if
(
!
str
||
!
search
||
!*
search
||
!
max_len
)
return
NULL
;
len
=
strlenW
(
search
);
len
=
l
strlenW
(
search
);
for
(
i
=
max_len
;
*
str
&&
(
i
>
0
);
i
--
,
str
++
)
{
if
(
!
strncmpiW
(
str
,
search
,
len
))
if
(
!
wcsnicmp
(
str
,
search
,
len
))
return
(
WCHAR
*
)
str
;
}
...
...
@@ -477,8 +480,8 @@ WCHAR * WINAPI StrStrIW(const WCHAR *str, const WCHAR *search)
if
(
!
str
||
!
search
||
!*
search
)
return
NULL
;
len
=
strlenW
(
search
);
end
=
str
+
strlenW
(
str
);
len
=
l
strlenW
(
search
);
end
=
str
+
l
strlenW
(
str
);
while
(
str
+
len
<=
end
)
{
...
...
@@ -522,7 +525,7 @@ int WINAPI StrSpnA(const char *str, const char *match)
int
WINAPI
StrSpnW
(
const
WCHAR
*
str
,
const
WCHAR
*
match
)
{
if
(
!
str
||
!
match
)
return
0
;
return
strspnW
(
str
,
match
);
return
wcsspn
(
str
,
match
);
}
int
WINAPI
StrCSpnA
(
const
char
*
str
,
const
char
*
match
)
...
...
@@ -537,7 +540,7 @@ int WINAPI StrCSpnW(const WCHAR *str, const WCHAR *match)
if
(
!
str
||
!
match
)
return
0
;
return
strcspnW
(
str
,
match
);
return
wcscspn
(
str
,
match
);
}
int
WINAPI
StrCSpnIA
(
const
char
*
str
,
const
char
*
match
)
...
...
@@ -600,7 +603,7 @@ WCHAR * WINAPI StrRChrW(const WCHAR *str, const WCHAR *end, WORD ch)
WCHAR
*
ret
=
NULL
;
if
(
!
str
)
return
NULL
;
if
(
!
end
)
end
=
str
+
strlenW
(
str
);
if
(
!
end
)
end
=
str
+
l
strlenW
(
str
);
while
(
str
<
end
)
{
if
(
*
str
==
ch
)
ret
=
(
WCHAR
*
)
str
;
...
...
@@ -621,7 +624,7 @@ WCHAR * WINAPI StrRChrIW(const WCHAR *str, const WCHAR *end, WORD ch)
WCHAR
*
ret
=
NULL
;
if
(
!
str
)
return
NULL
;
if
(
!
end
)
end
=
str
+
strlenW
(
str
);
if
(
!
end
)
end
=
str
+
l
strlenW
(
str
);
while
(
str
<
end
)
{
if
(
!
ChrCmpIW
(
*
str
,
ch
))
ret
=
(
WCHAR
*
)
str
;
...
...
@@ -677,10 +680,10 @@ WCHAR * WINAPI StrRStrIW(const WCHAR *str, const WCHAR *end, const WCHAR *search
if
(
!
str
||
!
search
||
!*
search
)
return
NULL
;
len
=
strlenW
(
search
);
len
=
l
strlenW
(
search
);
if
(
!
end
)
end
=
str
+
strlenW
(
str
);
end
=
str
+
l
strlenW
(
str
);
else
end
+=
min
(
len
-
1
,
lstrlenW
(
end
));
...
...
@@ -717,7 +720,7 @@ char * WINAPI StrPBrkA(const char *str, const char *match)
WCHAR
*
WINAPI
StrPBrkW
(
const
WCHAR
*
str
,
const
WCHAR
*
match
)
{
if
(
!
str
||
!
match
)
return
NULL
;
return
strpbrkW
(
str
,
match
);
return
wcspbrk
(
str
,
match
);
}
BOOL
WINAPI
StrTrimA
(
char
*
str
,
const
char
*
trim
)
...
...
@@ -772,7 +775,7 @@ BOOL WINAPI StrTrimW(WCHAR *str, const WCHAR *trim)
while
(
*
ptr
&&
StrChrW
(
trim
,
*
ptr
))
ptr
++
;
len
=
strlenW
(
ptr
);
len
=
l
strlenW
(
ptr
);
if
(
ptr
!=
str
)
{
...
...
@@ -810,7 +813,7 @@ BOOL WINAPI StrToInt64ExA(const char *str, DWORD flags, LONGLONG *ret)
WARN
(
"Unknown flags %#x
\n
"
,
flags
);
/* Skip leading space, '+', '-' */
while
(
isspace
(
*
str
))
while
(
*
str
==
' '
||
(
*
str
>=
'\t'
&&
*
str
<=
'\r'
))
str
=
CharNextA
(
str
);
if
(
*
str
==
'-'
)
...
...
@@ -821,7 +824,7 @@ BOOL WINAPI StrToInt64ExA(const char *str, DWORD flags, LONGLONG *ret)
else
if
(
*
str
==
'+'
)
str
++
;
if
(
flags
&
STIF_SUPPORT_HEX
&&
*
str
==
'0'
&&
tolower
(
str
[
1
])
==
'x'
)
if
(
flags
&
STIF_SUPPORT_HEX
&&
*
str
==
'0'
&&
(
str
[
1
]
==
'x'
||
str
[
1
]
==
'X'
)
)
{
/* Read hex number */
str
+=
2
;
...
...
@@ -832,10 +835,12 @@ BOOL WINAPI StrToInt64ExA(const char *str, DWORD flags, LONGLONG *ret)
while
(
isxdigit
(
*
str
))
{
value
*=
16
;
if
(
isdigit
(
*
str
)
)
if
(
*
str
>=
'0'
&&
*
str
<=
'9'
)
value
+=
(
*
str
-
'0'
);
else
if
(
*
str
>=
'A'
&&
*
str
<=
'F'
)
value
+=
10
+
*
str
-
'A'
;
else
value
+=
10
+
(
tolower
(
*
str
)
-
'a'
)
;
value
+=
10
+
*
str
-
'a'
;
str
++
;
}
...
...
@@ -844,10 +849,10 @@ BOOL WINAPI StrToInt64ExA(const char *str, DWORD flags, LONGLONG *ret)
}
/* Read decimal number */
if
(
!
isdigit
(
*
str
)
)
if
(
*
str
<
'0'
||
*
str
>
'9'
)
return
FALSE
;
while
(
isdigit
(
*
str
)
)
while
(
*
str
>=
'0'
&&
*
str
<=
'9'
)
{
value
*=
10
;
value
+=
(
*
str
-
'0'
);
...
...
@@ -872,7 +877,7 @@ BOOL WINAPI StrToInt64ExW(const WCHAR *str, DWORD flags, LONGLONG *ret)
WARN
(
"Unknown flags %#x.
\n
"
,
flags
);
/* Skip leading space, '+', '-' */
while
(
is
spaceW
(
*
str
))
while
(
is
wspace
(
*
str
))
str
++
;
if
(
*
str
==
'-'
)
...
...
@@ -883,21 +888,21 @@ BOOL WINAPI StrToInt64ExW(const WCHAR *str, DWORD flags, LONGLONG *ret)
else
if
(
*
str
==
'+'
)
str
++
;
if
(
flags
&
STIF_SUPPORT_HEX
&&
*
str
==
'0'
&&
to
lowerW
(
str
[
1
])
==
'x'
)
if
(
flags
&
STIF_SUPPORT_HEX
&&
*
str
==
'0'
&&
to
wlower
(
str
[
1
])
==
'x'
)
{
/* Read hex number */
str
+=
2
;
if
(
!
is
xdigitW
(
*
str
))
if
(
!
is
wxdigit
(
*
str
))
return
FALSE
;
while
(
is
xdigitW
(
*
str
))
while
(
is
wxdigit
(
*
str
))
{
value
*=
16
;
if
(
is
digitW
(
*
str
))
if
(
is
wdigit
(
*
str
))
value
+=
(
*
str
-
'0'
);
else
value
+=
10
+
(
to
lowerW
(
*
str
)
-
'a'
);
value
+=
10
+
(
to
wlower
(
*
str
)
-
'a'
);
str
++
;
}
...
...
@@ -906,10 +911,10 @@ BOOL WINAPI StrToInt64ExW(const WCHAR *str, DWORD flags, LONGLONG *ret)
}
/* Read decimal number */
if
(
!
is
digitW
(
*
str
))
if
(
!
is
wdigit
(
*
str
))
return
FALSE
;
while
(
is
digitW
(
*
str
))
while
(
is
wdigit
(
*
str
))
{
value
*=
10
;
value
+=
(
*
str
-
'0'
);
...
...
@@ -968,7 +973,7 @@ int WINAPI StrToIntW(const WCHAR *str)
if
(
!
str
)
return
0
;
if
(
*
str
==
'-'
||
is
digitW
(
*
str
))
if
(
*
str
==
'-'
||
is
wdigit
(
*
str
))
StrToIntExW
(
str
,
0
,
&
value
);
return
value
;
}
...
...
@@ -1270,11 +1275,11 @@ int WINAPI StrCmpLogicalW(const WCHAR *str, const WCHAR *comp)
{
if
(
!*
comp
)
return
1
;
else
if
(
is
digitW
(
*
str
))
else
if
(
is
wdigit
(
*
str
))
{
int
str_value
,
comp_value
;
if
(
!
is
digitW
(
*
comp
))
if
(
!
is
wdigit
(
*
comp
))
return
-
1
;
/* Compare the numbers */
...
...
@@ -1287,12 +1292,12 @@ int WINAPI StrCmpLogicalW(const WCHAR *str, const WCHAR *comp)
return
1
;
/* Skip */
while
(
is
digitW
(
*
str
))
while
(
is
wdigit
(
*
str
))
str
++
;
while
(
is
digitW
(
*
comp
))
while
(
is
wdigit
(
*
comp
))
comp
++
;
}
else
if
(
is
digitW
(
*
comp
))
else
if
(
is
wdigit
(
*
comp
))
return
1
;
else
{
...
...
@@ -1371,7 +1376,7 @@ WCHAR * WINAPI StrCatBuffW(WCHAR *str, const WCHAR *cat, INT max_len)
if
(
!
str
)
return
NULL
;
len
=
strlenW
(
str
);
len
=
l
strlenW
(
str
);
max_len
-=
len
;
if
(
max_len
>
0
)
StrCpyNW
(
str
+
len
,
cat
,
max_len
);
...
...
@@ -1384,7 +1389,7 @@ DWORD WINAPI StrCatChainW(WCHAR *str, DWORD max_len, DWORD at, const WCHAR *cat)
TRACE
(
"%s, %u, %d, %s
\n
"
,
wine_dbgstr_w
(
str
),
max_len
,
at
,
wine_dbgstr_w
(
cat
));
if
(
at
==
-
1
)
at
=
strlenW
(
str
);
at
=
l
strlenW
(
str
);
if
(
!
max_len
)
return
at
;
...
...
@@ -1442,13 +1447,13 @@ HRESULT WINAPI SHLoadIndirectString(const WCHAR *src, WCHAR *dst, UINT dst_len,
dst
[
0
]
=
0
;
dllname
=
StrDupW
(
src
+
1
);
index_str
=
strchrW
(
dllname
,
','
);
index_str
=
wcschr
(
dllname
,
','
);
if
(
!
index_str
)
goto
end
;
*
index_str
=
0
;
index_str
++
;
index
=
atoiW
(
index_str
);
index
=
wcstol
(
index_str
,
NULL
,
10
);
hmod
=
LoadLibraryW
(
dllname
);
if
(
!
hmod
)
goto
end
;
...
...
tools/winegcc/winegcc.c
View file @
483de1a8
...
...
@@ -1158,6 +1158,8 @@ static void build(struct options* opts)
strarray_add
(
link_args
,
"-lc"
);
}
if
(
opts
->
nodefaultlibs
&&
is_pe
)
strarray_add
(
link_args
,
"-lgcc"
);
spawn
(
opts
->
prefix
,
link_args
,
0
);
strarray_free
(
link_args
);
...
...
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