Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6429 | siemargl | 1 | /** |
2 | * This file has no copyright assigned and is placed in the Public Domain. |
||
3 | * This file is part of the w64 mingw-runtime package. |
||
4 | * No warranty is given; refer to the file DISCLAIMER within this package. |
||
5 | */ |
||
6 | #ifndef _INC_PROCESS |
||
7 | #define _INC_PROCESS |
||
8 | |||
9 | #include <_mingw.h> |
||
10 | |||
11 | /* Includes a definition of _pid_t and pid_t */ |
||
12 | #include |
||
13 | |||
14 | #ifndef _POSIX_ |
||
15 | #ifdef __cplusplus |
||
16 | extern "C" { |
||
17 | #endif |
||
18 | |||
19 | #define _P_WAIT 0 |
||
20 | #define _P_NOWAIT 1 |
||
21 | #define _OLD_P_OVERLAY 2 |
||
22 | #define _P_NOWAITO 3 |
||
23 | #define _P_DETACH 4 |
||
24 | #define _P_OVERLAY 2 |
||
25 | |||
26 | #define _WAIT_CHILD 0 |
||
27 | #define _WAIT_GRANDCHILD 1 |
||
28 | |||
29 | _CRTIMP uintptr_t __cdecl _beginthread(void (__cdecl *_StartAddress) (void *),unsigned _StackSize,void *_ArgList); |
||
30 | _CRTIMP void __cdecl _endthread(void); |
||
31 | _CRTIMP uintptr_t __cdecl _beginthreadex(void *_Security,unsigned _StackSize,unsigned (__stdcall *_StartAddress) (void *),void *_ArgList,unsigned _InitFlag,unsigned *_ThrdAddr); |
||
32 | _CRTIMP void __cdecl _endthreadex(unsigned _Retval); |
||
33 | |||
34 | #ifndef _CRT_TERMINATE_DEFINED |
||
35 | #define _CRT_TERMINATE_DEFINED |
||
36 | void __cdecl __MINGW_NOTHROW exit(int _Code) __MINGW_ATTRIB_NORETURN; |
||
37 | _CRTIMP void __cdecl __MINGW_NOTHROW _exit(int _Code) __MINGW_ATTRIB_NORETURN; |
||
38 | |||
39 | #pragma push_macro("abort") |
||
40 | #undef abort |
||
41 | void __cdecl __declspec(noreturn) abort(void); |
||
42 | #pragma pop_macro("abort") |
||
43 | |||
44 | #endif |
||
45 | |||
46 | _CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void); |
||
47 | _CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void); |
||
48 | _CRTIMP int __cdecl _getpid(void); |
||
49 | _CRTIMP intptr_t __cdecl _cwait(int *_TermStat,intptr_t _ProcHandle,int _Action); |
||
50 | _CRTIMP intptr_t __cdecl _execl(const char *_Filename,const char *_ArgList,...); |
||
51 | _CRTIMP intptr_t __cdecl _execle(const char *_Filename,const char *_ArgList,...); |
||
52 | _CRTIMP intptr_t __cdecl _execlp(const char *_Filename,const char *_ArgList,...); |
||
53 | _CRTIMP intptr_t __cdecl _execlpe(const char *_Filename,const char *_ArgList,...); |
||
54 | _CRTIMP intptr_t __cdecl _execv(const char *_Filename,const char *const *_ArgList); |
||
55 | _CRTIMP intptr_t __cdecl _execve(const char *_Filename,const char *const *_ArgList,const char *const *_Env); |
||
56 | _CRTIMP intptr_t __cdecl _execvp(const char *_Filename,const char *const *_ArgList); |
||
57 | _CRTIMP intptr_t __cdecl _execvpe(const char *_Filename,const char *const *_ArgList,const char *const *_Env); |
||
58 | _CRTIMP intptr_t __cdecl _spawnl(int _Mode,const char *_Filename,const char *_ArgList,...); |
||
59 | _CRTIMP intptr_t __cdecl _spawnle(int _Mode,const char *_Filename,const char *_ArgList,...); |
||
60 | _CRTIMP intptr_t __cdecl _spawnlp(int _Mode,const char *_Filename,const char *_ArgList,...); |
||
61 | _CRTIMP intptr_t __cdecl _spawnlpe(int _Mode,const char *_Filename,const char *_ArgList,...); |
||
62 | _CRTIMP intptr_t __cdecl _spawnv(int _Mode,const char *_Filename,const char *const *_ArgList); |
||
63 | _CRTIMP intptr_t __cdecl _spawnve(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); |
||
64 | _CRTIMP intptr_t __cdecl _spawnvp(int _Mode,const char *_Filename,const char *const *_ArgList); |
||
65 | _CRTIMP intptr_t __cdecl _spawnvpe(int _Mode,const char *_Filename,const char *const *_ArgList,const char *const *_Env); |
||
66 | |||
67 | #ifndef _CRT_SYSTEM_DEFINED |
||
68 | #define _CRT_SYSTEM_DEFINED |
||
69 | int __cdecl system(const char *_Command); |
||
70 | #endif |
||
71 | |||
72 | #ifndef _WPROCESS_DEFINED |
||
73 | #define _WPROCESS_DEFINED |
||
74 | _CRTIMP intptr_t __cdecl _wexecl(const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
75 | _CRTIMP intptr_t __cdecl _wexecle(const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
76 | _CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
77 | _CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
78 | _CRTIMP intptr_t __cdecl _wexecv(const wchar_t *_Filename,const wchar_t *const *_ArgList); |
||
79 | _CRTIMP intptr_t __cdecl _wexecve(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); |
||
80 | _CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *_Filename,const wchar_t *const *_ArgList); |
||
81 | _CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); |
||
82 | _CRTIMP intptr_t __cdecl _wspawnl(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
83 | _CRTIMP intptr_t __cdecl _wspawnle(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
84 | _CRTIMP intptr_t __cdecl _wspawnlp(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
85 | _CRTIMP intptr_t __cdecl _wspawnlpe(int _Mode,const wchar_t *_Filename,const wchar_t *_ArgList,...); |
||
86 | _CRTIMP intptr_t __cdecl _wspawnv(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); |
||
87 | _CRTIMP intptr_t __cdecl _wspawnve(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); |
||
88 | _CRTIMP intptr_t __cdecl _wspawnvp(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList); |
||
89 | _CRTIMP intptr_t __cdecl _wspawnvpe(int _Mode,const wchar_t *_Filename,const wchar_t *const *_ArgList,const wchar_t *const *_Env); |
||
90 | #ifndef _CRT_WSYSTEM_DEFINED |
||
91 | #define _CRT_WSYSTEM_DEFINED |
||
92 | _CRTIMP int __cdecl _wsystem(const wchar_t *_Command); |
||
93 | #endif |
||
94 | #endif |
||
95 | |||
96 | void __cdecl __security_init_cookie(void); |
||
97 | #if (defined(_X86_) && !defined(__x86_64)) |
||
98 | void __fastcall __security_check_cookie(uintptr_t _StackCookie); |
||
99 | __declspec(noreturn) void __cdecl __report_gsfailure(void); |
||
100 | #else |
||
101 | void __cdecl __security_check_cookie(uintptr_t _StackCookie); |
||
102 | __declspec(noreturn) void __cdecl __report_gsfailure(uintptr_t _StackCookie); |
||
103 | #endif |
||
104 | extern uintptr_t __security_cookie; |
||
105 | |||
106 | intptr_t __cdecl _loaddll(char *_Filename); |
||
107 | int __cdecl _unloaddll(intptr_t _Handle); |
||
108 | int (__cdecl *__cdecl _getdllprocaddr(intptr_t _Handle,char *_ProcedureName,intptr_t _Ordinal))(void); |
||
109 | |||
110 | #ifdef _DECL_DLLMAIN |
||
111 | #ifdef _WINDOWS_ |
||
112 | WINBOOL WINAPI DllMain(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); |
||
113 | WINBOOL WINAPI _CRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); |
||
114 | WINBOOL WINAPI _wCRT_INIT(HANDLE _HDllHandle,DWORD _Reason,LPVOID _Reserved); |
||
115 | extern WINBOOL (WINAPI *const _pRawDllMain)(HANDLE,DWORD,LPVOID); |
||
116 | #else |
||
117 | int __stdcall DllMain(void *_HDllHandle,unsigned _Reason,void *_Reserved); |
||
118 | int __stdcall _CRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved); |
||
119 | int __stdcall _wCRT_INIT(void *_HDllHandle,unsigned _Reason,void *_Reserved); |
||
120 | extern int (__stdcall *const _pRawDllMain)(void *,unsigned,void *); |
||
121 | #endif |
||
122 | #endif |
||
123 | |||
124 | #ifndef NO_OLDNAMES |
||
125 | #define P_WAIT _P_WAIT |
||
126 | #define P_NOWAIT _P_NOWAIT |
||
127 | #define P_OVERLAY _P_OVERLAY |
||
128 | #define OLD_P_OVERLAY _OLD_P_OVERLAY |
||
129 | #define P_NOWAITO _P_NOWAITO |
||
130 | #define P_DETACH _P_DETACH |
||
131 | #define WAIT_CHILD _WAIT_CHILD |
||
132 | #define WAIT_GRANDCHILD _WAIT_GRANDCHILD |
||
133 | |||
134 | intptr_t __cdecl cwait(int *_TermStat,intptr_t _ProcHandle,int _Action); |
||
135 | #ifdef __GNUC__ |
||
136 | int __cdecl execl(const char *_Filename,const char *_ArgList,...); |
||
137 | int __cdecl execle(const char *_Filename,const char *_ArgList,...); |
||
138 | int __cdecl execlp(const char *_Filename,const char *_ArgList,...); |
||
139 | int __cdecl execlpe(const char *_Filename,const char *_ArgList,...); |
||
140 | #else |
||
141 | intptr_t __cdecl execl(const char *_Filename,const char *_ArgList,...); |
||
142 | intptr_t __cdecl execle(const char *_Filename,const char *_ArgList,...); |
||
143 | intptr_t __cdecl execlp(const char *_Filename,const char *_ArgList,...); |
||
144 | intptr_t __cdecl execlpe(const char *_Filename,const char *_ArgList,...); |
||
145 | #endif |
||
146 | intptr_t __cdecl spawnl(int,const char *_Filename,const char *_ArgList,...); |
||
147 | intptr_t __cdecl spawnle(int,const char *_Filename,const char *_ArgList,...); |
||
148 | intptr_t __cdecl spawnlp(int,const char *_Filename,const char *_ArgList,...); |
||
149 | intptr_t __cdecl spawnlpe(int,const char *_Filename,const char *_ArgList,...); |
||
150 | int __cdecl getpid(void); |
||
151 | #ifdef __GNUC__ |
||
152 | /* Those methods are predefined by gcc builtins to return int. So to prevent |
||
153 | stupid warnings, define them in POSIX way. This is save, because those |
||
154 | methods do not return in success case, so that the return value is not |
||
155 | really dependent to its scalar width. */ |
||
156 | int __cdecl execv(const char *_Filename,const char *const _ArgList[]); |
||
157 | int __cdecl execve(const char *_Filename,const char *const _ArgList[],const char *const _Env[]); |
||
158 | int __cdecl execvp(const char *_Filename,const char *const _ArgList[]); |
||
159 | int __cdecl execvpe(const char *_Filename,const char *const _ArgList[],const char *const _Env[]); |
||
160 | #else |
||
161 | intptr_t __cdecl execv(const char *_Filename,const char *const _ArgList[]); |
||
162 | intptr_t __cdecl execve(const char *_Filename,const char *const _ArgList[],const char *const _Env[]); |
||
163 | intptr_t __cdecl execvp(const char *_Filename,const char *const _ArgList[]); |
||
164 | intptr_t __cdecl execvpe(const char *_Filename,const char *const _ArgList[],const char *const _Env[]); |
||
165 | #endif |
||
166 | intptr_t __cdecl spawnv(int,const char *_Filename,const char *const _ArgList[]); |
||
167 | intptr_t __cdecl spawnve(int,const char *_Filename,const char *const _ArgList[],const char *const _Env[]); |
||
168 | intptr_t __cdecl spawnvp(int,const char *_Filename,const char *const _ArgList[]); |
||
169 | intptr_t __cdecl spawnvpe(int,const char *_Filename,const char *const _ArgList[],char *const _Env[]); |
||
170 | #endif |
||
171 | |||
172 | #ifdef __cplusplus |
||
173 | } |
||
174 | #endif |
||
175 | #endif |
||
176 | #endif |