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.
8 #ifndef __WINE_PROCESS_H
9 #define __WINE_PROCESS_H
10 #define __WINE_USE_MSVCRT
13 # ifdef USE_MSVCRT_PREFIX
14 # define MSVCRT(x) MSVCRT_##x
20 #ifndef MSVCRT_WCHAR_T_DEFINED
21 #define MSVCRT_WCHAR_T_DEFINED
23 typedef unsigned short MSVCRT(wchar_t);
27 /* Process creation flags */
35 #define _WAIT_GRANDCHILD 1
40 # define __stdcall __attribute__((__stdcall__))
41 # elif defined(_MSC_VER)
42 /* Nothing needs to be done. __stdcall already exists */
44 # error You need to define __stdcall for your compiler
48 # endif /* __i386__ */
49 #endif /* __stdcall */
55 typedef void (*_beginthread_start_routine_t)(void *);
56 typedef unsigned int (__stdcall *_beginthreadex_start_routine_t)(void *);
58 unsigned long _beginthread(_beginthread_start_routine_t,unsigned int,void*);
59 unsigned long _beginthreadex(void*,unsigned int,_beginthreadex_start_routine_t,void*,unsigned int,unsigned int*);
60 int _cwait(int*,int,int);
61 void _endthread(void);
62 void _endthreadex(unsigned int);
63 int _execl(const char*,const char*,...);
64 int _execle(const char*,const char*,...);
65 int _execlp(const char*,const char*,...);
66 int _execlpe(const char*,const char*,...);
67 int _execv(const char*,char* const *);
68 int _execve(const char*,char* const *,const char* const *);
69 int _execvp(const char*,char* const *);
70 int _execvpe(const char*,char* const *,const char* const *);
72 int _spawnl(int,const char*,const char*,...);
73 int _spawnle(int,const char*,const char*,...);
74 int _spawnlp(int,const char*,const char*,...);
75 int _spawnlpe(int,const char*,const char*,...);
76 int _spawnv(int,const char*,const char* const *);
77 int _spawnve(int,const char*,const char* const *,const char* const *);
78 int _spawnvp(int,const char*,const char* const *);
79 int _spawnvpe(int,const char*,const char* const *,const char* const *);
81 void MSVCRT(_c_exit)(void);
82 void MSVCRT(_cexit)(void);
83 void MSVCRT(_exit)(int);
84 void MSVCRT(abort)(void);
85 void MSVCRT(exit)(int);
86 int MSVCRT(system)(const char*);
88 #ifndef MSVCRT_WPROCESS_DEFINED
89 #define MSVCRT_WPROCESS_DEFINED
90 int _wexecl(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
91 int _wexecle(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
92 int _wexeclp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
93 int _wexeclpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
94 int _wexecv(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
95 int _wexecve(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
96 int _wexecvp(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
97 int _wexecvpe(const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
98 int _wspawnl(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
99 int _wspawnle(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
100 int _wspawnlp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
101 int _wspawnlpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)*,...);
102 int _wspawnv(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
103 int _wspawnve(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
104 int _wspawnvp(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *);
105 int _wspawnvpe(int,const MSVCRT(wchar_t)*,const MSVCRT(wchar_t)* const *,const MSVCRT(wchar_t)* const *);
106 int _wsystem(const MSVCRT(wchar_t)*);
107 #endif /* MSVCRT_WPROCESS_DEFINED */
114 #ifndef USE_MSVCRT_PREFIX
115 #define P_WAIT _P_WAIT
116 #define P_NOWAIT _P_NOWAIT
117 #define P_OVERLAY _P_OVERLAY
118 #define P_NOWAITO _P_NOWAITO
119 #define P_DETACH _P_DETACH
121 #define WAIT_CHILD _WAIT_CHILD
122 #define WAIT_GRANDCHILD _WAIT_GRANDCHILD
125 #define getpid _getpid
127 #define execle _execle
128 #define execlp _execlp
129 #define execlpe _execlpe
131 #define execve _execve
132 #define execvp _execvp
133 #define execvpe _execvpe
134 #define spawnl _spawnl
135 #define spawnle _spawnle
136 #define spawnlp _spawnlp
137 #define spawnlpe _spawnlpe
138 #define spawnv _spawnv
139 #define spawnve _spawnve
140 #define spawnvp _spawnvp
141 #define spawnvpe _spawnvpe
142 #endif /* USE_MSVCRT_PREFIX */
144 #endif /* __WINE_PROCESS_H */