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
935dea2f
Commit
935dea2f
authored
Nov 03, 2005
by
Kevin Koltzau
Committed by
Alexandre Julliard
Nov 03, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix warnings and errors in 64bit.
parent
f5acfaad
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
131 additions
and
94 deletions
+131
-94
msvcrt.h
dlls/msvcrt/msvcrt.h
+10
-2
process.c
dlls/msvcrt/process.c
+32
-35
string.c
dlls/msvcrt/string.c
+1
-1
headers.c
dlls/msvcrt/tests/headers.c
+2
-0
thread.c
dlls/msvcrt/thread.c
+4
-4
process.h
include/msvcrt/process.h
+52
-52
stddef.h
include/msvcrt/stddef.h
+30
-0
No files found.
dlls/msvcrt/msvcrt.h
View file @
935dea2f
...
...
@@ -50,7 +50,15 @@ typedef unsigned short MSVCRT_wint_t;
typedef
unsigned
short
MSVCRT_wctype_t
;
typedef
unsigned
short
MSVCRT__ino_t
;
typedef
unsigned
long
MSVCRT__fsize_t
;
typedef
unsigned
int
MSVCRT_size_t
;
#ifdef _WIN64
typedef
unsigned
__int64
MSVCRT_size_t
;
typedef
__int64
MSVCRT_intptr_t
;
typedef
unsigned
__int64
MSVCRT_uintptr_t
;
#else
typedef
unsigned
int
MSVCRT_size_t
;
typedef
int
MSVCRT_intptr_t
;
typedef
unsigned
int
MSVCRT_uintptr_t
;
#endif
typedef
unsigned
int
MSVCRT__dev_t
;
typedef
int
MSVCRT__off_t
;
typedef
long
MSVCRT_clock_t
;
...
...
@@ -584,7 +592,7 @@ int _write(int,const void*,unsigned int);
int
_getch
(
void
);
int
_vsnwprintf
(
MSVCRT_wchar_t
*
,
MSVCRT_size_t
,
const
MSVCRT_wchar_t
*
,
va_list
);
int
_ismbstrail
(
const
unsigned
char
*
start
,
const
unsigned
char
*
str
);
int
_spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
MSVCRT_intptr_t
_spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
void
_searchenv
(
const
char
*
,
const
char
*
,
char
*
);
int
_getdrive
(
void
);
char
*
_strdup
(
const
char
*
);
...
...
dlls/msvcrt/process.c
View file @
935dea2f
...
...
@@ -35,14 +35,11 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
msvcrt
);
/* INTERNAL: Spawn a child process */
static
in
t
msvcrt_spawn
(
int
flags
,
const
char
*
exe
,
char
*
cmdline
,
char
*
env
)
static
MSVCRT_intptr_
t
msvcrt_spawn
(
int
flags
,
const
char
*
exe
,
char
*
cmdline
,
char
*
env
)
{
STARTUPINFOA
si
;
PROCESS_INFORMATION
pi
;
if
(
sizeof
(
HANDLE
)
!=
sizeof
(
int
))
WARN
(
"This call is unsuitable for your architecture
\n
"
);
if
((
unsigned
)
flags
>
MSVCRT__P_DETACH
)
{
*
MSVCRT__errno
()
=
MSVCRT_EINVAL
;
...
...
@@ -69,7 +66,7 @@ static int msvcrt_spawn(int flags, const char* exe, char* cmdline, char* env)
GetExitCodeProcess
(
pi
.
hProcess
,
&
pi
.
dwProcessId
);
CloseHandle
(
pi
.
hProcess
);
CloseHandle
(
pi
.
hThread
);
return
(
int
)
pi
.
dwProcessId
;
return
pi
.
dwProcessId
;
case
MSVCRT__P_DETACH
:
CloseHandle
(
pi
.
hProcess
);
pi
.
hProcess
=
0
;
...
...
@@ -77,7 +74,7 @@ static int msvcrt_spawn(int flags, const char* exe, char* cmdline, char* env)
case
MSVCRT__P_NOWAIT
:
case
MSVCRT__P_NOWAITO
:
CloseHandle
(
pi
.
hThread
);
return
(
in
t
)
pi
.
hProcess
;
return
(
MSVCRT_intptr_
t
)
pi
.
hProcess
;
case
MSVCRT__P_OVERLAY
:
MSVCRT__exit
(
0
);
}
...
...
@@ -186,7 +183,7 @@ static char* msvcrt_valisttos(const char* arg0, va_list alist, char delim)
/*********************************************************************
* _cwait (MSVCRT.@)
*/
int
_cwait
(
int
*
status
,
in
t
pid
,
int
action
)
MSVCRT_intptr_t
_cwait
(
int
*
status
,
MSVCRT_intptr_
t
pid
,
int
action
)
{
HANDLE
hPid
=
(
HANDLE
)
pid
;
int
doserrno
;
...
...
@@ -201,7 +198,7 @@ int _cwait(int *status, int pid, int action)
GetExitCodeProcess
(
hPid
,
&
stat
);
*
status
=
(
int
)
stat
;
}
return
(
int
)
pid
;
return
pid
;
}
doserrno
=
GetLastError
();
...
...
@@ -222,11 +219,11 @@ int _cwait(int *status, int pid, int action)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_execl
(
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_execl
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
va_list
ap
;
char
*
args
;
in
t
ret
;
MSVCRT_intptr_
t
ret
;
va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -241,7 +238,7 @@ int _execl(const char* name, const char* arg0, ...)
/*********************************************************************
* _execle (MSVCRT.@)
*/
in
t
_execle
(
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_execle
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
FIXME
(
"stub
\n
"
);
return
-
1
;
...
...
@@ -253,11 +250,11 @@ int _execle(const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_execlp
(
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_execlp
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
va_list
ap
;
char
*
args
;
in
t
ret
;
MSVCRT_intptr_
t
ret
;
char
fullname
[
MAX_PATH
];
_searchenv
(
name
,
"PATH"
,
fullname
);
...
...
@@ -275,7 +272,7 @@ int _execlp(const char* name, const char* arg0, ...)
/*********************************************************************
* _execlpe (MSVCRT.@)
*/
in
t
_execlpe
(
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_execlpe
(
const
char
*
name
,
const
char
*
arg0
,
...)
{
FIXME
(
"stub
\n
"
);
return
-
1
;
...
...
@@ -287,7 +284,7 @@ int _execlpe(const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_execv
(
const
char
*
name
,
char
*
const
*
argv
)
MSVCRT_intptr_
t
_execv
(
const
char
*
name
,
char
*
const
*
argv
)
{
return
_spawnve
(
MSVCRT__P_OVERLAY
,
name
,
(
const
char
*
const
*
)
argv
,
NULL
);
}
...
...
@@ -298,7 +295,7 @@ int _execv(const char* name, char* const* argv)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_execve
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
MSVCRT_intptr_
t
_execve
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_spawnve
(
MSVCRT__P_OVERLAY
,
name
,
(
const
char
*
const
*
)
argv
,
envv
);
}
...
...
@@ -309,7 +306,7 @@ int _execve(const char* name, char* const* argv, const char* const* envv)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_execvpe
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
MSVCRT_intptr_
t
_execvpe
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
char
fullname
[
MAX_PATH
];
...
...
@@ -324,7 +321,7 @@ int _execvpe(const char* name, char* const* argv, const char* const* envv)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_execvp
(
const
char
*
name
,
char
*
const
*
argv
)
MSVCRT_intptr_
t
_execvp
(
const
char
*
name
,
char
*
const
*
argv
)
{
return
_execvpe
(
name
,
argv
,
NULL
);
}
...
...
@@ -335,11 +332,11 @@ int _execvp(const char* name, char* const* argv)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_spawnl
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_spawnl
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
va_list
ap
;
char
*
args
;
in
t
ret
;
MSVCRT_intptr_
t
ret
;
va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -354,12 +351,12 @@ int _spawnl(int flags, const char* name, const char* arg0, ...)
/*********************************************************************
* _spawnle (MSVCRT.@)
*/
in
t
_spawnle
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_spawnle
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
va_list
ap
;
char
*
args
,
*
envs
=
NULL
;
const
char
*
const
*
envp
;
in
t
ret
;
MSVCRT_intptr_
t
ret
;
va_start
(
ap
,
arg0
);
args
=
msvcrt_valisttos
(
arg0
,
ap
,
' '
);
...
...
@@ -385,11 +382,11 @@ int _spawnle(int flags, const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_spawnlp
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_spawnlp
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
va_list
ap
;
char
*
args
;
in
t
ret
;
MSVCRT_intptr_
t
ret
;
char
fullname
[
MAX_PATH
];
_searchenv
(
name
,
"PATH"
,
fullname
);
...
...
@@ -407,12 +404,12 @@ int _spawnlp(int flags, const char* name, const char* arg0, ...)
/*********************************************************************
* _spawnlpe (MSVCRT.@)
*/
in
t
_spawnlpe
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
MSVCRT_intptr_
t
_spawnlpe
(
int
flags
,
const
char
*
name
,
const
char
*
arg0
,
...)
{
va_list
ap
;
char
*
args
,
*
envs
=
NULL
;
const
char
*
const
*
envp
;
in
t
ret
;
MSVCRT_intptr_
t
ret
;
char
fullname
[
MAX_PATH
];
_searchenv
(
name
,
"PATH"
,
fullname
);
...
...
@@ -440,13 +437,13 @@ int _spawnlpe(int flags, const char* name, const char* arg0, ...)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_spawnve
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
MSVCRT_intptr_
t
_spawnve
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
char
*
args
=
msvcrt_argvtos
(
argv
,
' '
);
char
*
envs
=
msvcrt_argvtos
(
envv
,
0
);
const
char
*
fullname
=
name
;
in
t
ret
=
-
1
;
MSVCRT_intptr_
t
ret
=
-
1
;
FIXME
(
":not translating name %s to locate program
\n
"
,
fullname
);
TRACE
(
":call (%s), params (%s), env (%s)
\n
"
,
debugstr_a
(
name
),
debugstr_a
(
args
),
...
...
@@ -469,7 +466,7 @@ int _spawnve(int flags, const char* name, const char* const* argv,
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_spawnv
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
MSVCRT_intptr_
t
_spawnv
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
_spawnve
(
flags
,
name
,
argv
,
NULL
);
}
...
...
@@ -480,7 +477,7 @@ int _spawnv(int flags, const char* name, const char* const* argv)
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_spawnvpe
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
MSVCRT_intptr_
t
_spawnvpe
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
char
fullname
[
MAX_PATH
];
...
...
@@ -494,7 +491,7 @@ int _spawnvpe(int flags, const char* name, const char* const* argv,
* Like on Windows, this function does not handle arguments with spaces
* or double-quotes.
*/
in
t
_spawnvp
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
MSVCRT_intptr_
t
_spawnvp
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
_spawnvpe
(
flags
,
name
,
argv
,
NULL
);
}
...
...
@@ -635,15 +632,15 @@ int MSVCRT_system(const char* cmd)
/*********************************************************************
* _loaddll (MSVCRT.@)
*/
in
t
_loaddll
(
const
char
*
dllname
)
MSVCRT_intptr_
t
_loaddll
(
const
char
*
dllname
)
{
return
(
in
t
)
LoadLibraryA
(
dllname
);
return
(
MSVCRT_intptr_
t
)
LoadLibraryA
(
dllname
);
}
/*********************************************************************
* _unloaddll (MSVCRT.@)
*/
int
_unloaddll
(
in
t
dll
)
int
_unloaddll
(
MSVCRT_intptr_
t
dll
)
{
if
(
FreeLibrary
((
HMODULE
)
dll
))
return
0
;
...
...
@@ -658,7 +655,7 @@ int _unloaddll(int dll)
/*********************************************************************
* _getdllprocaddr (MSVCRT.@)
*/
void
*
_getdllprocaddr
(
in
t
dll
,
const
char
*
name
,
int
ordinal
)
void
*
_getdllprocaddr
(
MSVCRT_intptr_
t
dll
,
const
char
*
name
,
int
ordinal
)
{
if
(
name
)
{
...
...
dlls/msvcrt/string.c
View file @
935dea2f
...
...
@@ -57,7 +57,7 @@ char* _strdup(const char* str)
/*********************************************************************
* _strnset (MSVCRT.@)
*/
char
*
_strnset
(
char
*
str
,
int
value
,
unsigned
in
t
len
)
char
*
_strnset
(
char
*
str
,
int
value
,
MSVCRT_size_
t
len
)
{
if
(
len
>
0
&&
str
)
while
(
*
str
&&
len
--
)
...
...
dlls/msvcrt/tests/headers.c
View file @
935dea2f
...
...
@@ -81,6 +81,8 @@ static void test_types(void)
CHECK_TYPE
(
_ino_t
);
CHECK_TYPE
(
_fsize_t
);
CHECK_TYPE
(
size_t
);
CHECK_TYPE
(
intptr_t
);
CHECK_TYPE
(
uintptr_t
);
CHECK_TYPE
(
_dev_t
);
CHECK_TYPE
(
_off_t
);
CHECK_TYPE
(
clock_t
);
...
...
dlls/msvcrt/thread.c
View file @
935dea2f
...
...
@@ -70,7 +70,7 @@ static DWORD CALLBACK _beginthread_trampoline(LPVOID arg)
/*********************************************************************
* _beginthread (MSVCRT.@)
*/
unsigned
long
_beginthread
(
MSVCRT_uintptr_t
_beginthread
(
MSVCRT__beginthread_start_routine_t
start_address
,
/* [in] Start address of routine that begins execution of new thread */
unsigned
int
stack_size
,
/* [in] Stack size for new thread or 0 */
void
*
arglist
)
/* [in] Argument list to be passed to new thread or NULL */
...
...
@@ -88,14 +88,14 @@ unsigned long _beginthread(
trampoline
->
arglist
=
arglist
;
/* FIXME */
return
(
unsigned
long
)
CreateThread
(
NULL
,
stack_size
,
_beginthread_trampoline
,
return
(
MSVCRT_uintptr_t
)
CreateThread
(
NULL
,
stack_size
,
_beginthread_trampoline
,
trampoline
,
0
,
NULL
);
}
/*********************************************************************
* _beginthreadex (MSVCRT.@)
*/
unsigned
long
_beginthreadex
(
MSVCRT_uintptr_t
_beginthreadex
(
void
*
security
,
/* [in] Security descriptor for new thread; must be NULL for Windows 9x applications */
unsigned
int
stack_size
,
/* [in] Stack size for new thread or 0 */
MSVCRT__beginthreadex_start_routine_t
start_address
,
/* [in] Start address of routine that begins execution of new thread */
...
...
@@ -106,7 +106,7 @@ unsigned long _beginthreadex(
TRACE
(
"(%p, %d, %p, %p, %d, %p)
\n
"
,
security
,
stack_size
,
start_address
,
arglist
,
initflag
,
thrdaddr
);
/* FIXME */
return
(
unsigned
long
)
CreateThread
(
security
,
stack_size
,
return
(
MSVCRT_uintptr_t
)
CreateThread
(
security
,
stack_size
,
(
LPTHREAD_START_ROUTINE
)
start_address
,
arglist
,
initflag
,
(
LPDWORD
)
thrdaddr
);
}
...
...
include/msvcrt/process.h
View file @
935dea2f
...
...
@@ -49,28 +49,28 @@ extern "C" {
typedef
void
(
*
_beginthread_start_routine_t
)(
void
*
);
typedef
unsigned
int
(
__stdcall
*
_beginthreadex_start_routine_t
)(
void
*
);
u
nsigned
long
_beginthread
(
_beginthread_start_routine_t
,
unsigned
int
,
void
*
);
u
nsigned
long
_beginthreadex
(
void
*
,
unsigned
int
,
_beginthreadex_start_routine_t
,
void
*
,
unsigned
int
,
unsigned
int
*
);
int
_cwait
(
int
*
,
in
t
,
int
);
u
intptr_t
_beginthread
(
_beginthread_start_routine_t
,
unsigned
int
,
void
*
);
u
intptr_t
_beginthreadex
(
void
*
,
unsigned
int
,
_beginthreadex_start_routine_t
,
void
*
,
unsigned
int
,
unsigned
int
*
);
int
ptr_t
_cwait
(
int
*
,
intptr_
t
,
int
);
void
_endthread
(
void
);
void
_endthreadex
(
unsigned
int
);
int
_execl
(
const
char
*
,
const
char
*
,...);
int
_execle
(
const
char
*
,
const
char
*
,...);
int
_execlp
(
const
char
*
,
const
char
*
,...);
int
_execlpe
(
const
char
*
,
const
char
*
,...);
int
_execv
(
const
char
*
,
char
*
const
*
);
int
_execve
(
const
char
*
,
char
*
const
*
,
const
char
*
const
*
);
int
_execvp
(
const
char
*
,
char
*
const
*
);
int
_execvpe
(
const
char
*
,
char
*
const
*
,
const
char
*
const
*
);
int
ptr_t
_execl
(
const
char
*
,
const
char
*
,...);
int
ptr_t
_execle
(
const
char
*
,
const
char
*
,...);
int
ptr_t
_execlp
(
const
char
*
,
const
char
*
,...);
int
ptr_t
_execlpe
(
const
char
*
,
const
char
*
,...);
int
ptr_t
_execv
(
const
char
*
,
char
*
const
*
);
int
ptr_t
_execve
(
const
char
*
,
char
*
const
*
,
const
char
*
const
*
);
int
ptr_t
_execvp
(
const
char
*
,
char
*
const
*
);
int
ptr_t
_execvpe
(
const
char
*
,
char
*
const
*
,
const
char
*
const
*
);
int
_getpid
(
void
);
int
_spawnl
(
int
,
const
char
*
,
const
char
*
,...);
int
_spawnle
(
int
,
const
char
*
,
const
char
*
,...);
int
_spawnlp
(
int
,
const
char
*
,
const
char
*
,...);
int
_spawnlpe
(
int
,
const
char
*
,
const
char
*
,...);
int
_spawnv
(
int
,
const
char
*
,
const
char
*
const
*
);
int
_spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
int
_spawnvp
(
int
,
const
char
*
,
const
char
*
const
*
);
int
_spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
int
ptr_t
_spawnl
(
int
,
const
char
*
,
const
char
*
,...);
int
ptr_t
_spawnle
(
int
,
const
char
*
,
const
char
*
,...);
int
ptr_t
_spawnlp
(
int
,
const
char
*
,
const
char
*
,...);
int
ptr_t
_spawnlpe
(
int
,
const
char
*
,
const
char
*
,...);
int
ptr_t
_spawnv
(
int
,
const
char
*
,
const
char
*
const
*
);
int
ptr_t
_spawnve
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
int
ptr_t
_spawnvp
(
int
,
const
char
*
,
const
char
*
const
*
);
int
ptr_t
_spawnvpe
(
int
,
const
char
*
,
const
char
*
const
*
,
const
char
*
const
*
);
void
_c_exit
(
void
);
void
_cexit
(
void
);
...
...
@@ -81,22 +81,22 @@ int system(const char*);
#ifndef _WPROCESS_DEFINED
#define _WPROCESS_DEFINED
int
_wexecl
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wexecle
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wexeclp
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wexeclpe
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wexecv
(
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
_wexecve
(
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
_wexecvp
(
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
_wexecvpe
(
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
_wspawnl
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wspawnle
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wspawnlp
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wspawnlpe
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
_wspawnv
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
_wspawnve
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
_wspawnvp
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
_wspawnvpe
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wexecl
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wexecle
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wexeclp
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wexeclpe
(
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wexecv
(
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wexecve
(
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wexecvp
(
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wexecvpe
(
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wspawnl
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wspawnle
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wspawnlp
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wspawnlpe
(
int
,
const
wchar_t
*
,
const
wchar_t
*
,...);
int
ptr_t
_wspawnv
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wspawnve
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wspawnvp
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
);
int
ptr_t
_wspawnvpe
(
int
,
const
wchar_t
*
,
const
wchar_t
*
const
*
,
const
wchar_t
*
const
*
);
int
_wsystem
(
const
wchar_t
*
);
#endif
/* _WPROCESS_DEFINED */
...
...
@@ -114,26 +114,26 @@ int _wsystem(const wchar_t*);
#define WAIT_CHILD _WAIT_CHILD
#define WAIT_GRANDCHILD _WAIT_GRANDCHILD
static
inline
int
cwait
(
int
*
status
,
in
t
pid
,
int
action
)
{
return
_cwait
(
status
,
pid
,
action
);
}
static
inline
int
ptr_t
cwait
(
int
*
status
,
intptr_
t
pid
,
int
action
)
{
return
_cwait
(
status
,
pid
,
action
);
}
static
inline
int
getpid
(
void
)
{
return
_getpid
();
}
static
inline
int
execv
(
const
char
*
name
,
char
*
const
*
argv
)
{
return
_execv
(
name
,
argv
);
}
static
inline
int
execve
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_execve
(
name
,
argv
,
envv
);
}
static
inline
int
execvp
(
const
char
*
name
,
char
*
const
*
argv
)
{
return
_execvp
(
name
,
argv
);
}
static
inline
int
execvpe
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_execvpe
(
name
,
argv
,
envv
);
}
static
inline
int
spawnv
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
_spawnv
(
flags
,
name
,
argv
);
}
static
inline
int
spawnve
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_spawnve
(
flags
,
name
,
argv
,
envv
);
}
static
inline
int
spawnvp
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
_spawnvp
(
flags
,
name
,
argv
);
}
static
inline
int
spawnvpe
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_spawnvpe
(
flags
,
name
,
argv
,
envv
);
}
static
inline
int
ptr_t
execv
(
const
char
*
name
,
char
*
const
*
argv
)
{
return
_execv
(
name
,
argv
);
}
static
inline
int
ptr_t
execve
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_execve
(
name
,
argv
,
envv
);
}
static
inline
int
ptr_t
execvp
(
const
char
*
name
,
char
*
const
*
argv
)
{
return
_execvp
(
name
,
argv
);
}
static
inline
int
ptr_t
execvpe
(
const
char
*
name
,
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_execvpe
(
name
,
argv
,
envv
);
}
static
inline
int
ptr_t
spawnv
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
_spawnv
(
flags
,
name
,
argv
);
}
static
inline
int
ptr_t
spawnve
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_spawnve
(
flags
,
name
,
argv
,
envv
);
}
static
inline
int
ptr_t
spawnvp
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
)
{
return
_spawnvp
(
flags
,
name
,
argv
);
}
static
inline
int
ptr_t
spawnvpe
(
int
flags
,
const
char
*
name
,
const
char
*
const
*
argv
,
const
char
*
const
*
envv
)
{
return
_spawnvpe
(
flags
,
name
,
argv
,
envv
);
}
#if defined(__GNUC__) && (__GNUC__ < 4)
extern
int
execl
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execl"
)));
extern
int
execle
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execle"
)));
extern
int
execlp
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execlp"
)));
extern
int
execlpe
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execlpe"
)));
extern
int
spawnl
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnl"
)));
extern
int
spawnle
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnle"
)));
extern
int
spawnlp
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnlp"
)));
extern
int
spawnlpe
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnlpe"
)));
extern
int
ptr_t
execl
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execl"
)));
extern
int
ptr_t
execle
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execle"
)));
extern
int
ptr_t
execlp
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execlp"
)));
extern
int
ptr_t
execlpe
(
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_execlpe"
)));
extern
int
ptr_t
spawnl
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnl"
)));
extern
int
ptr_t
spawnle
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnle"
)));
extern
int
ptr_t
spawnlp
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnlp"
)));
extern
int
ptr_t
spawnlpe
(
int
,
const
char
*
,
const
char
*
,...)
__attribute__
((
alias
(
"_spawnlpe"
)));
#else
#define execl _execl
#define execle _execle
...
...
include/msvcrt/stddef.h
View file @
935dea2f
...
...
@@ -30,13 +30,39 @@ typedef unsigned short wchar_t;
#endif
#endif
#ifndef _INTPTR_T_DEFINED
#ifdef _WIN64
typedef
__int64
intptr_t
;
#else
typedef
int
intptr_t
;
#endif
#define _INTPTR_T_DEFINED
#endif
#ifndef _UINTPTR_T_DEFINED
#ifdef _WIN64
typedef
unsigned
__int64
uintptr_t
;
#else
typedef
unsigned
int
uintptr_t
;
#endif
#define _UINTPTR_T_DEFINED
#endif
#ifndef _PTRDIFF_T_DEFINED
#ifdef _WIN64
typedef
__int64
ptrdiff_t
;
#else
typedef
int
ptrdiff_t
;
#endif
#define _PTRDIFF_T_DEFINED
#endif
#ifndef _SIZE_T_DEFINED
#ifdef _WIN64
typedef
unsigned
__int64
size_t
;
#else
typedef
unsigned
int
size_t
;
#endif
#define _SIZE_T_DEFINED
#endif
...
...
@@ -48,7 +74,11 @@ typedef unsigned int size_t;
#endif
#endif
#ifdef _WIN64
#define offsetof(s,m) (size_t)((ptrdiff_t)&(((s*)NULL)->m))
#else
#define offsetof(s,m) (size_t)&(((s*)NULL)->m)
#endif
#ifdef __cplusplus
...
...
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