4859a4b6042c336098482f141f683a1709ca9d86
[mdsms.git] / acconfig.h
1 /* acconfig.h  Generated manually for use by autoheader.  */
2 /*
3  * $Id$
4  */
5
6 /* __NORETURN define - usually a GCC extension. */
7 #undef __NORETURN
8
9 /* __NORETURN2 define - usually a GCC extension. */
10 #undef __NORETURN2
11
12 /* Turn on debugging to stderr. */
13 #undef DEBUG
14
15 /* Disable runtime assertion checks. */
16 #undef NDEBUG
17
18 /* Provide stub for MAX-function if needed. */
19 #undef HAVE_MAX
20 #ifndef HAVE_MAX
21 #define MAX(a,b) ((a)>(b)?(a):(b))
22 #endif
23
24 /* Provide stub for MIN-function if needed. */
25 #undef HAVE_MIN
26 #ifndef HAVE_MIN
27 #define MIN(a,b) ((a)<(b)?(a):(b))
28 #endif
29
30 /* LINE_MAX from <limits.h>, provide default if not defined. */
31 #undef HAVE_LINE_MAX
32 #undef LINE_MAX
33
34 /* CBAUD define, may be missing. */
35 #undef HAVE_CBAUD
36 #undef CBAUD
37
38 /* CBAUDEX define, may be missing. */
39 #undef HAVE_CBAUDEX
40 #undef CBAUDEX
41
42 /* FD_SETSIZE define, may be missing. */
43 #undef HAVE_FD_SETSIZE
44
45 /* offsetof() define, may be missing. */
46 #undef HAVE_OFFSETOF
47
48 /* snprintf(3) unsafe emulation */
49 #undef HAVE_SNPRINTF
50
51 /* vsnprintf(3) unsafe emulation */
52 #undef HAVE_VSNPRINTF
53
54 /* found lockfile directory */
55 #undef DEF_LOCKFILE
56
57 /* how to declare __atribute__ ((__unused__)) */
58 #undef ATTR_UNUSED
59
60 /* whether they have __atttribute__ ((format(printf,...))) */
61 #undef HAVE_PRINTFORMAT
62 #ifdef HAVE_PRINTFORMAT
63 #define ATTR_PRINTFORMAT(a,b) __attribute__ ((format(printf,(a),(b))))
64 #else
65 #define ATTR_PRINTFORMAT(a,b)
66 #endif
67
68 @BOTTOM@
69
70 #ifndef DONT_NEED_DECLARATIONS
71
72 /* Declaration for gethostname(3)? */
73 #undef NEED_DECLARATION_GETHOSTNAME
74 #ifdef NEED_DECLARATION_GETHOSTNAME
75 #include <unistd.h>
76 int gethostname(char *name, size_t len);
77 #endif
78
79 /* Declaration for kill(2)? */
80 #undef NEED_DECLARATION_KILL
81 #ifdef NEED_DECLARATION_KILL
82 #include <sys/types.h>
83 #include <signal.h>
84 int kill(pid_t pid, int sig);
85 #endif
86
87 /* Declaration for snprintf(3)? */
88 #undef NEED_DECLARATION_SNPRINTF
89 #ifdef NEED_DECLARATION_SNPRINTF
90 #include <stdio.h>
91 int snprintf(char *str, size_t n, const char *format, ...);
92 #endif
93
94 /* Declaration for vsnprintf(3)? */
95 #undef NEED_DECLARATION_VSNPRINTF
96 #ifdef NEED_DECLARATION_VSNPRINTF
97 #include <stdio.h>
98 #include <stdarg.h>
99 int vsnprintf(char *str, size_t n, const char *format, va_list ap);
100 #endif
101
102 /* Declaration for strdup(3)? */
103 #undef NEED_DECLARATION_STRDUP
104 #ifdef NEED_DECLARATION_STRDUP
105 #include <string.h>
106 char *strdup(const char *s);
107 #endif
108
109 /* Declaration for usleep(3)? */
110 #undef NEED_DECLARATION_USLEEP
111 #ifdef NEED_DECLARATION_USLEEP
112 #include <unistd.h>
113 void usleep(unsigned long usec);
114 #endif
115
116 /* Declaration for strcasecmp(3)? */
117 #undef NEED_DECLARATION_STRCASECMP
118 #ifdef NEED_DECLARATION_STRCASECMP
119 #include <string.h>
120 int strcasecmp(const char *s1, const char *s2);
121 #endif
122
123 /* Declaration for siginterrupt(3)? */
124 #undef NEED_DECLARATION_SIGINTERRUPT
125 #ifdef NEED_DECLARATION_SIGINTERRUPT
126 #include <signal.h>
127 int siginterrupt(int sig, int flag);
128 #endif
129
130 /* Declaration for popen(3)? */
131 #undef NEED_DECLARATION_POPEN
132 #ifdef NEED_DECLARATION_POPEN
133 #include <stdio.h>
134 FILE *popen(const char *command, const char *type);
135 #endif
136
137 /* Declaration for pclose(3)? */
138 #undef NEED_DECLARATION_PCLOSE
139 #ifdef NEED_DECLARATION_PCLOSE
140 #include <stdio.h>
141 int pclose(FILE *stream);
142 #endif
143
144 #endif /* !DONT_NEED_DECLARATIONS */
145
146 /* snprintf(3) unsafe emulation */
147 #ifdef HAVE_SNPRINTF
148 #define VARPRINTF(v,f,d)               snprintf((v),sizeof((v)),f,(d)                     )
149 #define VARPRINTF2(v,f,d1,d2)          snprintf((v),sizeof((v)),f,(d1),(d2)               )
150 #define VARPRINTF5(v,f,d1,d2,d3,d4,d5) snprintf((v),sizeof((v)),f,(d1),(d2),(d3),(d4),(d5))
151 #else
152 #define VARPRINTF(v,f,d)               sprintf((v),f,(d)                     )
153 #define VARPRINTF2(v,f,d1,d2)          sprintf((v),f,(d1),(d2)               )
154 #define VARPRINTF5(v,f,d1,d2,d3,d4,d5) sprintf((v),f,(d1),(d2),(d3),(d4),(d5))
155 #endif
156
157 /* vsnprintf(3) unsafe emulation */
158 #ifdef HAVE_VSNPRINTF
159 #define VARVPRINTF(v,f,d)      vsnprintf((v),sizeof((v)),f,(d)      )
160 #define VARVPRINTF2(v,f,d1,d2) vsnprintf((v),sizeof((v)),f,(d1),(d2))
161 #else
162 #define VARVPRINTF(v,f,d)      vsprintf((v),f,(d)      )
163 #define VARVPRINTF2(v,f,d1,d2) vsprintf((v),f,(d1),(d2))
164 #endif
165
166 #ifndef HAVE_STRERROR
167 extern char *sys_errlist[];
168 #define strerror(i) sys_errlist[i]
169 #endif
170
171 #ifndef HAVE_STRCHR
172 #define strchr index
173 #endif
174
175 #ifndef HAVE_STRRCHR
176 #define strrchr rindex
177 #endif
178
179 #ifdef HAVE_STRCASECMP
180 #define strtrycasecmp strcasecmp
181 #else
182 #define strtrycasecmp strcmp
183 #endif
184
185 #ifndef HAVE_OFFSETOF
186 #define offsetof(a,b) ((size_t)&((a *)0)->b)
187 #endif