Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Propagate file renaming to windows
[simgrid.git] / tools / tesh2 / include / def.h
1 #ifndef __DEF_H
2 #define __DEF_H
3
4 /* must be defined first */
5 #ifdef WIN32
6
7         #define _WIN32_WINNT    0x0400
8         
9         #if (_MSC_VER >= 1400 && !defined(_CRT_SECURE_NO_DEPRECATE))
10                 #define _CRT_SECURE_NO_DEPRECATE
11         #endif
12         
13         #include <direct.h> /* for getcwd(), _chdir() */
14         
15 #endif
16
17
18 #include <error.h>
19
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23
24 #ifdef WIN32
25         
26         #define strdup                  _strdup
27         #define chdir                   _chdir
28         #define getcwd                  _getcwd
29         
30         #ifndef S_ISDIR
31                 #define S_ISDIR(__mode) (((__mode) & S_IFMT) == S_IFDIR)
32         #endif
33
34         #ifndef S_ISREG
35                 #define S_ISREG(__mode) (((__mode) & S_IFMT) == S_IFREG)
36         #endif
37         
38         #define INDEFINITE_PID  NULL
39         #define INDEFINITE_FD   NULL
40 #else
41         #define INDEFINITE_PID  ((int)-1)
42         #define INDEFINITE_FD   ((int)-1)       
43 #endif
44
45 #ifndef MAX_PATH
46         #define MAX_PATH                ((unsigned int)255)
47 #endif
48
49
50 #define INDEFINITE                                              ((int)-1)
51 #define INDEFINITE_SIGNAL                               NULL
52
53 #define DEFAULT_FSTREAMS_CAPACITY               ((int)128)
54 #define DEFAULT_INCLUDE_DIRS_CAPACITY   DEFAULT_FSTREAMS_CAPACITY
55 #define DEFAULT_UNITS_CAPACITY                  ((int)64)
56 #define DEFAULT_INCLUDES                                ((int)8)
57 #define DEFAULT_COMMANDS_CAPACITY               ((int)512)
58 #define DEFAULT_SUITES_CAPACITY                 ((int)32)
59
60 #define                                                                 MAX_SUFFIX ((unsigned int)9)
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66
67 #endif /* !__DEF_H */
68