msxml3/tests: Avoid an unneeded lstrlenW() call.
[wine/zf.git] / include / msvcrt / process.h
blob2514e242387fd8f48293cf474e257862b1f1dea4
1 /*
2 * Process definitions
4 * Derived from the mingw header written by Colin Peters.
5 * Modified for Wine use by Jon Griffiths and Francois Gouget.
6 * This file is in the public domain.
7 */
8 #ifndef __WINE_PROCESS_H
9 #define __WINE_PROCESS_H
11 #include <corecrt.h>
13 /* Process creation flags */
14 #define _P_WAIT 0
15 #define _P_NOWAIT 1
16 #define _P_OVERLAY 2
17 #define _P_NOWAITO 3
18 #define _P_DETACH 4
20 #define _WAIT_CHILD 0
21 #define _WAIT_GRANDCHILD 1
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
27 typedef void (__cdecl *_beginthread_start_routine_t)(void *);
28 typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
30 uintptr_t __cdecl _beginthread(_beginthread_start_routine_t,unsigned int,void*);
31 uintptr_t __cdecl _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
32 intptr_t __cdecl _cwait(int*,intptr_t,int);
33 void __cdecl _endthread(void) DECLSPEC_NORETURN;
34 void __cdecl _endthreadex(unsigned int) DECLSPEC_NORETURN;
35 intptr_t WINAPIV _execl(const char*,const char*,...);
36 intptr_t WINAPIV _execle(const char*,const char*,...);
37 intptr_t WINAPIV _execlp(const char*,const char*,...);
38 intptr_t WINAPIV _execlpe(const char*,const char*,...);
39 intptr_t __cdecl _execv(const char*,const char* const *);
40 intptr_t __cdecl _execve(const char*,const char* const *,const char* const *);
41 intptr_t __cdecl _execvp(const char*,const char* const *);
42 intptr_t __cdecl _execvpe(const char*,const char* const *,const char* const *);
43 int __cdecl _getpid(void);
44 intptr_t WINAPIV _spawnl(int,const char*,const char*,...);
45 intptr_t WINAPIV _spawnle(int,const char*,const char*,...);
46 intptr_t WINAPIV _spawnlp(int,const char*,const char*,...);
47 intptr_t WINAPIV _spawnlpe(int,const char*,const char*,...);
48 intptr_t __cdecl _spawnv(int,const char*,const char* const *);
49 intptr_t __cdecl _spawnve(int,const char*,const char* const *,const char* const *);
50 intptr_t __cdecl _spawnvp(int,const char*,const char* const *);
51 intptr_t __cdecl _spawnvpe(int,const char*,const char* const *,const char* const *);
53 void __cdecl _c_exit(void);
54 void __cdecl _cexit(void);
55 void __cdecl _exit(int) DECLSPEC_NORETURN;
56 void __cdecl abort(void) DECLSPEC_NORETURN;
57 void __cdecl exit(int) DECLSPEC_NORETURN;
58 int __cdecl system(const char*);
60 #ifndef _WPROCESS_DEFINED
61 #define _WPROCESS_DEFINED
62 intptr_t WINAPIV _wexecl(const wchar_t*,const wchar_t*,...);
63 intptr_t WINAPIV _wexecle(const wchar_t*,const wchar_t*,...);
64 intptr_t WINAPIV _wexeclp(const wchar_t*,const wchar_t*,...);
65 intptr_t WINAPIV _wexeclpe(const wchar_t*,const wchar_t*,...);
66 intptr_t __cdecl _wexecv(const wchar_t*,const wchar_t* const *);
67 intptr_t __cdecl _wexecve(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
68 intptr_t __cdecl _wexecvp(const wchar_t*,const wchar_t* const *);
69 intptr_t __cdecl _wexecvpe(const wchar_t*,const wchar_t* const *,const wchar_t* const *);
70 intptr_t WINAPIV _wspawnl(int,const wchar_t*,const wchar_t*,...);
71 intptr_t WINAPIV _wspawnle(int,const wchar_t*,const wchar_t*,...);
72 intptr_t WINAPIV _wspawnlp(int,const wchar_t*,const wchar_t*,...);
73 intptr_t WINAPIV _wspawnlpe(int,const wchar_t*,const wchar_t*,...);
74 intptr_t __cdecl _wspawnv(int,const wchar_t*,const wchar_t* const *);
75 intptr_t __cdecl _wspawnve(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
76 intptr_t __cdecl _wspawnvp(int,const wchar_t*,const wchar_t* const *);
77 intptr_t __cdecl _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wchar_t* const *);
78 int __cdecl _wsystem(const wchar_t*);
79 #endif /* _WPROCESS_DEFINED */
81 #ifdef __cplusplus
83 #endif
86 #define P_WAIT _P_WAIT
87 #define P_NOWAIT _P_NOWAIT
88 #define P_OVERLAY _P_OVERLAY
89 #define P_NOWAITO _P_NOWAITO
90 #define P_DETACH _P_DETACH
92 #define WAIT_CHILD _WAIT_CHILD
93 #define WAIT_GRANDCHILD _WAIT_GRANDCHILD
95 static inline intptr_t cwait(int *status, intptr_t pid, int action) { return _cwait(status, pid, action); }
96 static inline int getpid(void) { return _getpid(); }
97 static inline intptr_t spawnv(int flags, const char* name, const char* const* argv) { return _spawnv(flags, name, argv); }
98 static inline intptr_t spawnve(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnve(flags, name, argv, envv); }
99 static inline intptr_t spawnvp(int flags, const char* name, const char* const* argv) { return _spawnvp(flags, name, argv); }
100 static inline intptr_t spawnvpe(int flags, const char* name, const char* const* argv, const char* const* envv) { return _spawnvpe(flags, name, argv, envv); }
101 #define execv _execv
102 #define execve _execve
103 #define execvp _execvp
104 #define execvpe _execvpe
106 #if defined(__GNUC__) && (__GNUC__ < 4)
107 extern intptr_t WINAPIV execl(const char*,const char*,...) __attribute__((alias("_execl")));
108 extern intptr_t WINAPIV execle(const char*,const char*,...) __attribute__((alias("_execle")));
109 extern intptr_t WINAPIV execlp(const char*,const char*,...) __attribute__((alias("_execlp")));
110 extern intptr_t WINAPIV execlpe(const char*,const char*,...) __attribute__((alias("_execlpe")));
111 extern intptr_t WINAPIV spawnl(int,const char*,const char*,...) __attribute__((alias("_spawnl")));
112 extern intptr_t WINAPIV spawnle(int,const char*,const char*,...) __attribute__((alias("_spawnle")));
113 extern intptr_t WINAPIV spawnlp(int,const char*,const char*,...) __attribute__((alias("_spawnlp")));
114 extern intptr_t WINAPIV spawnlpe(int,const char*,const char*,...) __attribute__((alias("_spawnlpe")));
115 #else
116 #define execl _execl
117 #define execle _execle
118 #define execlp _execlp
119 #define execlpe _execlpe
120 #define spawnl _spawnl
121 #define spawnle _spawnle
122 #define spawnlp _spawnlp
123 #define spawnlpe _spawnlpe
124 #endif /* __GNUC__ */
126 #endif /* __WINE_PROCESS_H */