| 8 |
|
#ifndef _RAD_PROCESS_H_ |
| 9 |
|
#define _RAD_PROCESS_H_ |
| 10 |
|
|
| 11 |
< |
#include <errno.h> |
| 12 |
< |
#include <stdio.h> |
| 11 |
> |
#include <errno.h> |
| 12 |
> |
#include "paths.h" |
| 13 |
|
#if defined(_WIN32) || defined(_WIN64) |
| 14 |
|
#include <windows.h> /* DWORD etc. */ |
| 15 |
|
typedef DWORD RT_PID; |
| 17 |
|
#define getpid _getpid |
| 18 |
|
#define execv _execv |
| 19 |
|
#define execvp _execvp |
| 20 |
+ |
#ifdef _MSC_VER |
| 21 |
+ |
#include <BaseTsd.h> |
| 22 |
+ |
typedef SSIZE_T ssize_t; |
| 23 |
+ |
#endif |
| 24 |
|
#else |
| 21 |
– |
#include <sys/param.h> |
| 22 |
– |
#include <sys/types.h> |
| 25 |
|
typedef pid_t RT_PID; |
| 26 |
|
#endif |
| 27 |
|
|
| 26 |
– |
#include "paths.h" |
| 28 |
|
|
| 29 |
|
#ifdef __cplusplus |
| 30 |
|
extern "C" { |
| 135 |
|
extern int open_process(SUBPROC *pd, char *av[]); |
| 136 |
|
extern int close_processes(SUBPROC pd[], int nproc); |
| 137 |
|
extern int process(SUBPROC *pd, char *recvbuf, char *sendbuf, int nbr, int nbs); |
| 138 |
< |
extern int readbuf(int fd, char *bpos, int siz); |
| 139 |
< |
extern int writebuf(int fd, char *bpos, int siz); |
| 138 |
> |
extern ssize_t readbuf(int fd, char *bpos, ssize_t siz); |
| 139 |
> |
extern ssize_t writebuf(int fd, char *bpos, ssize_t siz); |
| 140 |
|
|
| 141 |
|
#if defined(_WIN32) || defined(_WIN64) |
| 142 |
|
/* any non-negative increment will send the process to IDLE_PRIORITY_CLASS. */ |