Navit SVN

/work/compile/navit/src/navit/support/libc/process.h

00001 /* 
00002  * process.h
00003  * This file has no copyright assigned and is placed in the Public Domain.
00004  * This file is a part of the mingw-runtime package.
00005  * No warranty is given; refer to the file DISCLAIMER within the package.
00006  *
00007  * Function calls for spawning child processes.
00008  *
00009  */
00010 
00011 #ifndef _PROCESS_H_
00012 #define _PROCESS_H_
00013 #if 0
00014 
00015 /* All the headers include this file. */
00016 #include <_mingw.h>
00017 
00018 #include <sys/types.h> /* For _pid_t and pid_t. */
00019 #include <stdint.h>  /* For intptr_t. */
00020 /*
00021  * Constants for cwait actions.
00022  * Obsolete for Win32.
00023  */
00024 #define _WAIT_CHILD             0
00025 #define _WAIT_GRANDCHILD        1
00026 
00027 #ifndef _NO_OLDNAMES
00028 #define WAIT_CHILD              _WAIT_CHILD
00029 #define WAIT_GRANDCHILD         _WAIT_GRANDCHILD
00030 #endif  /* Not _NO_OLDNAMES */
00031 
00032 /*
00033  * Mode constants for spawn functions.
00034  */
00035 #define _P_WAIT         0
00036 #define _P_NOWAIT       1
00037 #define _P_OVERLAY      2
00038 #define _OLD_P_OVERLAY  _P_OVERLAY
00039 #define _P_NOWAITO      3
00040 #define _P_DETACH       4
00041 
00042 #ifndef _NO_OLDNAMES
00043 #define P_WAIT          _P_WAIT
00044 #define P_NOWAIT        _P_NOWAIT
00045 #define P_OVERLAY       _P_OVERLAY
00046 #define OLD_P_OVERLAY   _OLD_P_OVERLAY
00047 #define P_NOWAITO       _P_NOWAITO
00048 #define P_DETACH        _P_DETACH
00049 #endif  /* Not _NO_OLDNAMES */
00050 
00051 
00052 #ifndef RC_INVOKED
00053 
00054 #ifdef  __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 #ifndef __COREDLL__
00059 
00060 _CRTIMP void __cdecl __MINGW_NOTHROW _cexit(void);
00061 _CRTIMP void __cdecl __MINGW_NOTHROW _c_exit(void);
00062 
00063 _CRTIMP int __cdecl __MINGW_NOTHROW _cwait (int*, _pid_t, int);
00064 
00065 _CRTIMP _pid_t __cdecl __MINGW_NOTHROW _getpid(void);
00066 
00067 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execl (const char*, const char*, ...);
00068 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execle        (const char*, const char*, ...);
00069 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execlp        (const char*, const char*, ...);
00070 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execlpe       (const char*, const char*, ...);
00071 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execv (const char*, const char* const*);
00072 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execve        (const char*, const char* const*, const char* const*);
00073 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execvp        (const char*, const char* const*);
00074 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _execvpe       (const char*, const char* const*, const char* const*);
00075 
00076 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnl        (int, const char*, const char*, ...);
00077 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnle       (int, const char*, const char*, ...);
00078 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnlp       (int, const char*, const char*, ...);
00079 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnlpe      (int, const char*, const char*, ...);
00080 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnv        (int, const char*, const char* const*);
00081 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnve       (int, const char*, const char* const*, const char* const*);
00082 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvp       (int, const char*, const char* const*);
00083 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW _spawnvpe      (int, const char*, const char* const*, const char* const*);
00084 
00085 #endif /* !__COREDLL__*/
00086 
00087 /*
00088  * The functions _beginthreadex and _endthreadex are not provided by CRTDLL.
00089  * They are provided by MSVCRT.
00090  *
00091  * NOTE: Apparently _endthread calls CloseHandle on the handle of the thread,
00092  * making for race conditions if you are not careful. Basically you have to
00093  * make sure that no-one is going to do *anything* with the thread handle
00094  * after the thread calls _endthread or returns from the thread function.
00095  *
00096  * NOTE: No old names for these functions. Use the underscore.
00097  */
00098 #if defined     (__MSVCRT__) || defined (__CRTDLL__)
00099 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW
00100         _beginthread    (void (*)(void *), unsigned, void*);
00101 _CRTIMP void __cdecl __MINGW_NOTHROW _endthread (void);
00102 #endif
00103 
00104 #ifdef  __MSVCRT__
00105 _CRTIMP unsigned long __cdecl __MINGW_NOTHROW
00106         _beginthreadex  (void *, unsigned, unsigned (__stdcall *) (void *), 
00107                          void*, unsigned, unsigned*);
00108 _CRTIMP void __cdecl __MINGW_NOTHROW _endthreadex (unsigned);
00109 #endif
00110 
00111 
00112 #ifndef _NO_OLDNAMES
00113 #ifndef __COREDLL__
00114 /*
00115  * Functions without the leading underscore, for portability. These functions
00116  * live in liboldnames.a.
00117  */
00118 _CRTIMP int  __cdecl __MINGW_NOTHROW cwait (int*, pid_t, int);
00119 _CRTIMP pid_t __cdecl __MINGW_NOTHROW getpid (void);
00120 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execl  (const char*, const char*, ...);
00121 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execle (const char*, const char*, ...);
00122 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execlp (const char*, const char*, ...);
00123 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execlpe        (const char*, const char*,...);
00124 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execv  (const char*, const char* const*);
00125 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execve (const char*, const char* const*, const char* const*);
00126 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execvp (const char*, const char* const*);
00127 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW execvpe        (const char*, const char* const*, const char* const*);
00128 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnl (int, const char*, const char*, ...);
00129 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnle        (int, const char*, const char*, ...);
00130 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnlp        (int, const char*, const char*, ...);
00131 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnlpe       (int, const char*, const char*, ...);
00132 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnv (int, const char*, const char* const*);
00133 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnve        (int, const char*, const char* const*, const char* const*);
00134 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnvp        (int, const char*, const char* const*);
00135 _CRTIMP intptr_t __cdecl __MINGW_NOTHROW spawnvpe       (int, const char*, const char* const*, const char* const*);
00136 #endif  /* Not __COREDLL__ */
00137 
00138 #endif  /* Not _NO_OLDNAMES */
00139 
00140 #ifdef  __cplusplus
00141 }
00142 #endif
00143 
00144 #endif  /* Not RC_INVOKED */
00145 #endif
00146 
00147 #endif  /* _PROCESS_H_ not defined */