x86-64: Make ABI for long double compatible with GCC.
[tinycc/kirr.git] / win32 / include / process.h
blob3d764df0f12d89e5e0db99e15e80f6568e0fd824
1 /*
2 * process.h
4 * Function calls for spawning child processes.
6 * This file is part of the Mingw32 package.
8 * Contributors:
9 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 * $Revision: 1.2 $
22 * $Author: bellard $
23 * $Date: 2005/04/17 13:14:29 $
27 #ifndef __STRICT_ANSI__
29 #ifndef _PROCESS_H_
30 #define _PROCESS_H_
32 /* All the headers include this file. */
33 #include <_mingw.h>
35 /* Includes a definition of _pid_t and pid_t */
36 #include <sys/types.h>
39 * Constants for cwait actions.
40 * Obsolete for Win32.
42 #define _WAIT_CHILD 0
43 #define _WAIT_GRANDCHILD 1
45 #ifndef _NO_OLDNAMES
46 #define WAIT_CHILD _WAIT_CHILD
47 #define WAIT_GRANDCHILD _WAIT_GRANDCHILD
48 #endif /* Not _NO_OLDNAMES */
51 * Mode constants for spawn functions.
53 #define _P_WAIT 0
54 #define _P_NOWAIT 1
55 #define _P_OVERLAY 2
56 #define _OLD_P_OVERLAY _P_OVERLAY
57 #define _P_NOWAITO 3
58 #define _P_DETACH 4
60 #ifndef _NO_OLDNAMES
61 #define P_WAIT _P_WAIT
62 #define P_NOWAIT _P_NOWAIT
63 #define P_OVERLAY _P_OVERLAY
64 #define OLD_P_OVERLAY _OLD_P_OVERLAY
65 #define P_NOWAITO _P_NOWAITO
66 #define P_DETACH _P_DETACH
67 #endif /* Not _NO_OLDNAMES */
70 #ifndef RC_INVOKED
72 #ifdef __cplusplus
73 extern "C" {
74 #endif
76 void _cexit(void);
77 void _c_exit(void);
79 int _cwait (int*, _pid_t, int);
81 _pid_t _getpid(void);
83 int _execl (const char*, const char*, ...);
84 int _execle (const char*, const char*, ...);
85 int _execlp (const char*, const char*, ...);
86 int _execlpe (const char*, const char*, ...);
87 int _execv (const char*, char* const*);
88 int _execve (const char*, char* const*, char* const*);
89 int _execvp (const char*, char* const*);
90 int _execvpe (const char*, char* const*, char* const*);
92 int _spawnl (int, const char*, const char*, ...);
93 int _spawnle (int, const char*, const char*, ...);
94 int _spawnlp (int, const char*, const char*, ...);
95 int _spawnlpe (int, const char*, const char*, ...);
96 int _spawnv (int, const char*, char* const*);
97 int _spawnve (int, const char*, char* const*, char* const*);
98 int _spawnvp (int, const char*, char* const*);
99 int _spawnvpe (int, const char*, char* const*, char* const*);
102 * The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
103 * They are provided by MSVCRT.
105 * NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
106 * making for race conditions if you are not careful. Basically you have to
107 * make sure that no-one is going to do *anything* with the thread handle
108 * after the thread calls _endthread or returns from the thread function.
110 * NOTE: No old names for these functions. Use the underscore.
112 unsigned long
113 _beginthread (void (*)(void *), unsigned, void*);
114 void _endthread (void);
116 #ifdef __MSVCRT__
117 unsigned long
118 _beginthreadex (void *, unsigned, unsigned (__stdcall *) (void *),
119 void*, unsigned, unsigned*);
120 void _endthreadex (unsigned);
121 #endif
124 #ifndef _NO_OLDNAMES
126 * Functions without the leading underscore, for portability. These functions
127 * live in liboldnames.a.
129 int cwait (int*, pid_t, int);
130 pid_t getpid (void);
131 int execl (const char*, const char*, ...);
132 int execle (const char*, const char*, ...);
133 int execlp (const char*, const char*, ...);
134 int execlpe (const char*, const char*, ...);
135 int execv (const char*, char* const*);
136 int execve (const char*, char* const*, char* const*);
137 int execvp (const char*, char* const*);
138 int execvpe (const char*, char* const*, char* const*);
139 int spawnl (int, const char*, const char*, ...);
140 int spawnle (int, const char*, const char*, ...);
141 int spawnlp (int, const char*, const char*, ...);
142 int spawnlpe (int, const char*, const char*, ...);
143 int spawnv (int, const char*, char* const*);
144 int spawnve (int, const char*, char* const*, char* const*);
145 int spawnvp (int, const char*, char* const*);
146 int spawnvpe (int, const char*, char* const*, char* const*);
147 #endif /* Not _NO_OLDNAMES */
149 #ifdef __cplusplus
151 #endif
153 #endif /* Not RC_INVOKED */
155 #endif /* _PROCESS_H_ not defined */
157 #endif /* Not __STRICT_ANSI__ */