7 |
|
*/ |
8 |
|
#ifndef _RAD_PROCESS_H_ |
9 |
|
#define _RAD_PROCESS_H_ |
10 |
– |
#ifdef __cplusplus |
11 |
– |
extern "C" { |
12 |
– |
#endif |
10 |
|
|
11 |
< |
#include <sys/types.h> |
11 |
> |
#include <errno.h> |
12 |
|
#ifdef _WIN32 |
13 |
< |
#include <windows.h> |
13 |
> |
#include <windows.h> /* DWORD etc. */ |
14 |
> |
typedef DWORD pid_t; |
15 |
> |
#include <process.h> /* getpid() and others */ |
16 |
|
#else |
17 |
|
#include <sys/param.h> |
19 |
– |
#include <unistd.h> |
18 |
|
#endif |
21 |
– |
#ifndef BSD |
22 |
– |
#include <errno.h> |
23 |
– |
#endif |
19 |
|
|
20 |
|
#include "paths.h" |
21 |
|
|
22 |
+ |
#ifdef __cplusplus |
23 |
+ |
extern "C" { |
24 |
+ |
#endif |
25 |
|
|
26 |
|
/* On Windows, a process ID is a DWORD. That might actually be the |
27 |
|
same thing as an int, but it's better not to assume anything. |
36 |
|
runtime, so that client modules can still use -1 as invalid PID. |
37 |
|
*/ |
38 |
|
|
41 |
– |
#ifdef _WIN32 |
42 |
– |
typedef DWORD pid_t; |
43 |
– |
#endif |
39 |
|
|
40 |
|
#ifndef PIPE_BUF |
41 |
|
#ifdef PIPSIZ |