Rev 5123 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5123 | Rev 8501 | ||
---|---|---|---|
1 | #ifndef _HEADER_SYSTEM_PROCESS_H |
1 | #ifndef _HEADER_SYSTEM_PROCESS_H |
2 | #define _HEADER_SYSTEM_PROCESS_H |
2 | #define _HEADER_SYSTEM_PROCESS_H |
3 | 3 | ||
4 | #include |
4 | #include |
5 | #include |
5 | #include |
6 | 6 | ||
7 | #if defined _KOLIBRI |
7 | #if defined _KOLIBRI |
8 | # define DIR_SEPARATOR ('/') |
8 | # define DIR_SEPARATOR ('/') |
9 | inline long GetProcessId() {return 0;} |
9 | inline long GetProcessId() {return 0;} |
10 | inline long DuplicateProcess() {return -1;} |
10 | inline long DuplicateProcess() {return -1;} |
11 | inline int random(int m) {return ((unsigned long)rand()) % m;} |
11 | inline int random(int m) {return ((unsigned long)rand()) % m;} |
12 | inline void randomize() {srand(__menuet__getsystemclock());} |
12 | inline void randomize() {srand(time(0));} |
13 | #elif defined __GNUC__ |
13 | #elif defined __GNUC__ |
14 | # include |
14 | # include |
15 | # define DIR_SEPARATOR ('/') |
15 | # define DIR_SEPARATOR ('/') |
16 | inline long GetProcessId() {return (long)getpid();} |
16 | inline long GetProcessId() {return (long)getpid();} |
17 | inline long DuplicateProcess() {return (long)fork();} |
17 | inline long DuplicateProcess() {return (long)fork();} |
18 | inline int random(int m) {return ((unsigned long)rand()) % m;} |
18 | inline int random(int m) {return ((unsigned long)rand()) % m;} |
19 | inline void randomize() {srand(time(0));} |
19 | inline void randomize() {srand(time(0));} |
20 | #elif defined __TURBOC__ |
20 | #elif defined __TURBOC__ |
21 | # include |
21 | # include |
22 | # define DIR_SEPARATOR ('\\') |
22 | # define DIR_SEPARATOR ('\\') |
23 | inline long GetProcessId() {return (long)getpid();} |
23 | inline long GetProcessId() {return (long)getpid();} |
24 | inline long DuplicateProcess() {return -1;} |
24 | inline long DuplicateProcess() {return -1;} |
25 | #else |
25 | #else |
26 | # define DIR_SEPARATOR ('\\') |
26 | # define DIR_SEPARATOR ('\\') |
27 | inline long GetProcessId() {return 0;} |
27 | inline long GetProcessId() {return 0;} |
28 | inline long DuplicateProcess() {return -1;} |
28 | inline long DuplicateProcess() {return -1;} |
29 | #endif |
29 | #endif |
30 | 30 | ||
31 | #endif //_HEADER_SYSTEM_PROCESS_H |
31 | #endif //_HEADER_SYSTEM_PROCESS_H |