Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
document last changes
[simgrid.git] / src / nws_portability / Include / config_portability.h.in
1 /* $Id$ */
2
3 #ifndef CONFIG_PORTABILITY_H
4 #define CONFIG_PORTABILITY_H
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10 #ifndef NULL
11 #  define NULL 0
12 #endif
13
14 /* Have standard C headers. */
15 #undef STDC_HEADERS
16
17 /* Preserve 2.0 interface with this definition */
18 #undef NWS_API_COMPAT
19
20 /* Define to `int' if <sys/types.h> doesn't define.  */
21 #undef pid_t
22
23 /* Define if you have the alarm function.  */
24 #undef HAVE_ALARM
25
26 /* Define if you have inet_ntoa */
27 #undef HAVE_INET_ATON
28
29 /* Define if you have inet_ntoa */
30 #undef HAVE_INET_NTOA
31
32 /* Define if you have gettimeofday */
33 #undef HAVE_GETTIMEOFDAY
34
35 /* Define if you have gethostname. Some OSes doesn't have the definition
36  * in the include: define it here to avoid warning message. */
37 #undef HAVE_GETHOSTNAME
38 #ifdef HAVE_GETHOSTNAME
39 int
40 gethostname();  
41 #endif
42
43 /* Define if you have uname */
44 #undef HAVE_UNAME
45
46 /* Define if you have gethostbyname */
47 #undef HAVE_GETHOSTBYNAME
48
49 /* Define if you have gethostbyaddr */
50 #undef HAVE_GETHOSTBYADDR
51
52 /* Define if you have gethostbyaddr */
53 #undef HAVE_GETHOSTBYADDR_R
54
55 /* Define if you have the getrusage function.  */
56 #undef HAVE_GETRUSAGE
57
58 /* Define if you have the sqrt function.  */
59 #undef HAVE_SQRT
60
61 /* Define if we are going to use SIGALRM for our purposes */
62 #undef USE_ALARM_SIGNAL
63
64 /* Define if you have the sighold function.  */
65 #undef HAVE_SIGHOLD
66
67 /* Define if you have the sigrelse function.  */
68 #undef HAVE_SIGRELSE
69
70 /* Define if you have the siginterrupt function.  */
71 #undef HAVE_SIGINTERRUPT
72
73 /* Define if you have the statvfs function.  */
74 #undef HAVE_STATVFS
75
76 /* Define if you have the sys/vfs.h header.  */
77 #undef HAVE_SYS_VFS_H
78
79 /* Define if you have the math.h header.  */
80 #undef HAVE_MATH_H
81
82 /* Define if you have the inttypes.h header.  */
83 #undef HAVE_INTTYPES_H
84
85 /* Define if you have the declaration of uint32_t.  */
86 #undef HAVE_UINT32_T
87 /* I would love to use UINT32_T but not with autoconf 2.13 */
88 /*#ifdef HAVE_UINT32_T
89 * #     ifdef HAVE_INTTYPES_H
90 * #             include <inttypes.h>
91 * #     endif
92 * typedef uint32_t IPAddress;
93 * #else
94 * typedef unsigned long IPAddress;
95 * #endif */
96 /* kludge to be sure we have uint32_t */
97 #ifdef HAVE_INTTYPES_H
98 #       include <inttypes.h>
99 #endif
100 #ifndef uint32_t
101 #undef uint32_t
102 #endif
103 /* end kludge*/
104
105 /* Define if you have the sysconf function.  */
106 #undef HAVE_SYSCONF
107
108 /* Define if you have the strnlen function.  */
109 #undef HAVE_STRNLEN
110
111 /* Define if you have the fileno function.  */
112 #undef HAVE_FILENO
113
114 /* Define to the type pointed to by the third parameter of getpeername(). */
115 #undef SOCKLEN_T
116
117 /* Define to the (char *) version of the NWS sources. */
118 #undef VERSION
119
120 /* Define as the path to the `uptime' program. */
121 #undef UPTIME_PATH
122
123 /* Define as the path to the `vmstat' program. */
124 #undef VMSTAT_PATH
125
126 /* in some realloc()s, realloc(ptr, 0) != free(ptr) */
127 #undef REALLOC_NOT_POSIX
128
129 /* do we have the pthread header? (and hopefully pthread support) */
130 #undef HAVE_PTHREAD_H
131 #ifdef HAVE_PTHREAD_H
132 #define _REENTRANT
133 #endif
134
135 #undef PS
136
137 #undef AWK
138
139 #undef WITH_NETLOGGER
140
141 #undef WITH_LDAP
142
143
144 #define MALLOC(size) malloc ((size)==0?1:(size))
145
146 #define FREE(ptr) \
147         if (ptr != NULL) { \
148                 free(ptr); \
149                 ptr = NULL; \
150         }
151
152
153 #ifdef REALLOC_NOT_POSIX
154 #define REALLOC(ptr,size) (((size > 0)?((ptr == NULL)?malloc(size):\
155         realloc(ptr,size)):((ptr == NULL)?NULL:(free(ptr),NULL))))
156 #else
157 #define REALLOC(ptr,size) realloc(ptr,size)
158 #endif
159
160 #ifdef __cplusplus
161 }
162 #endif
163
164 #endif /* CONFIG_PORTABILITY_H */