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