Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Indent the rest of the code (examples, buildtools, doc...) except for examples/SMPI...
[simgrid.git] / tools / tesh2 / include / def.h
1 #ifndef __DEF_H
2 #define __DEF_H
3
4 #if (defined(__BUILTIN) && !defined(__CHKCMD) && !defined(WARN_DEF_MISMATCH))
5 #ifdef _XBT_WIN32
6 #pragma message(Macro definition mismatch : __BUILTIN defined but __CHKCMD not defined)
7 #else
8 #warning "Macro definition mismatch : __BUILTIN defined but __CHKCMD not defined"
9 #endif
10 #define WARN_DEF_MISMATCH       1
11 #endif
12
13 /* must be defined first */
14 #ifdef _XBT_WIN32
15
16 #define _WIN32_WINNT    0x0400
17
18 #if (_MSC_VER >= 1400 && !defined(_CRT_SECURE_NO_DEPRECATE))
19 #define _CRT_SECURE_NO_DEPRECATE
20 #endif
21
22 #include <direct.h>             /* for getcwd(), _chdir() */
23
24 #endif
25
26 #include <xerrno.h>
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31
32 #ifdef _XBT_WIN32
33
34 #define strdup                  _strdup
35 #define chdir                   _chdir
36 #define getcwd                  _getcwd
37
38 #ifndef S_ISDIR
39 #define S_ISDIR(__mode) (((__mode) & S_IFMT) == S_IFDIR)
40 #endif
41
42 #ifndef S_ISREG
43 #define S_ISREG(__mode) (((__mode) & S_IFMT) == S_IFREG)
44 #endif
45
46 #define INDEFINITE_PID  NULL
47 #define INDEFINITE_FD   NULL
48 #else
49 #define INDEFINITE_PID  ((int)-1)
50 #define INDEFINITE_FD   ((int)-1)
51 #endif
52
53 #ifndef PATH_MAX
54 #define PATH_MAX                ((unsigned int)260)
55 #endif
56
57 #ifndef VAR_NAME_MAX
58 #define VAR_NAME_MAX    ((unsigned int) 80)
59 #endif
60
61 #define INDEFINITE                                              ((int)-1)
62 #define INDEFINITE_SIGNAL                               NULL
63 #define MAX_SUFFIX                                              ((unsigned int)9)
64
65
66 #ifdef __cplusplus
67 }
68 #endif
69 #endif                          /* !__DEF_H */