sprintf() and siginterrupt() portability problems fixed.
[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 /* snprintf(3) unsafe emulation */
43 #undef HAVE_SNPRINTF
44
45 /* vsnprintf(3) unsafe emulation */
46 #undef HAVE_VSNPRINTF
47
48 /* printf family accepts %m */
49 #undef PRINTF_WORKS_PM
50
51 /* found lockfile directory */
52 #undef DEF_LOCKFILE
53
54 /* how to declare __atribute__ ((__unused__)) */
55 #undef ATTR_UNUSED
56
57 @BOTTOM@
58
59 #ifndef DONT_NEED_DECLARATIONS
60
61 /* Declaration for gethostname(3)? */
62 #undef NEED_DECLARATION_GETHOSTNAME
63 #ifdef NEED_DECLARATION_GETHOSTNAME
64 #include <unistd.h>
65 int gethostname(char *name, size_t len);
66 #endif
67
68 /* Declaration for kill(2)? */
69 #undef NEED_DECLARATION_KILL
70 #ifdef NEED_DECLARATION_KILL
71 #include <sys/types.h>
72 #include <signal.h>
73 int kill(pid_t pid, int sig);
74 #endif
75
76 /* Declaration for snprintf(3)? */
77 #undef NEED_DECLARATION_SNPRINTF
78 #ifdef NEED_DECLARATION_SNPRINTF
79 #include <stdio.h>
80 int snprintf(char *str, size_t n, const char *format, ...);
81 #endif
82
83 /* Declaration for vsnprintf(3)? */
84 #undef NEED_DECLARATION_VSNPRINTF
85 #ifdef NEED_DECLARATION_VSNPRINTF
86 #include <stdio.h>
87 #include <stdarg.h>
88 int vsnprintf(char *str, size_t n, const char *format, va_list ap);
89 #endif
90
91 /* Declaration for strdup(3)? */
92 #undef NEED_DECLARATION_STRDUP
93 #ifdef NEED_DECLARATION_STRDUP
94 #include <string.h>
95 char *strdup(const char *s);
96 #endif
97
98 /* Declaration for usleep(3)? */
99 #undef NEED_DECLARATION_USLEEP
100 #ifdef NEED_DECLARATION_USLEEP
101 #include <unistd.h>
102 void usleep(unsigned long usec);
103 #endif
104
105 /* Declaration for strcasecmp(3)? */
106 #undef NEED_DECLARATION_STRCASECMP
107 #ifdef NEED_DECLARATION_STRCASECMP
108 #include <string.h>
109 int strcasecmp(const char *s1, const char *s2);
110 #endif
111
112 /* Declaration for siginterrupt(3)? */
113 #undef NEED_DECLARATION_SIGINTERRUPT
114 #ifdef NEED_DECLARATION_SIGINTERRUPT
115 #include <signal.h>
116 int siginterrupt(int sig, int flag);
117 #endif
118
119 #endif /* !DONT_NEED_DECLARATIONS */
120
121 /* snprintf(3) unsafe emulation */
122 #ifdef HAVE_SNPRINTF
123 #define VARPRINTF(v,f,d)      snprintf((v),sizeof((v)),f,(d)      )
124 #define VARPRINTF2(v,f,d1,d2) snprintf((v),sizeof((v)),f,(d1),(d2))
125 #else
126 #define VARPRINTF(v,f,d)      sprintf((v),f,(d)      )
127 #define VARPRINTF2(v,f,d1,d2) sprintf((v),f,(d1),(d2))
128 #endif
129
130 /* vsnprintf(3) unsafe emulation */
131 #ifdef HAVE_VSNPRINTF
132 #define VARVPRINTF(v,f,d)      vsnprintf((v),sizeof((v)),f,(d)      )
133 #define VARVPRINTF2(v,f,d1,d2) vsnprintf((v),sizeof((v)),f,(d1),(d2))
134 #else
135 #define VARVPRINTF(v,f,d)      vsprintf((v),f,(d)      )
136 #define VARVPRINTF2(v,f,d1,d2) vsprintf((v),f,(d1),(d2))
137 #endif
138