55
|
1 /*
|
|
2 portable.h
|
|
3
|
|
4 Compatibility checks and fallback-functions.
|
|
5
|
|
6 $Id: portable.h 61 2000-05-09 22:32:33Z uh1763 $
|
|
7 */
|
|
8
|
|
9 #ifndef PORTABLE_H
|
|
10 #define PORTABLE_H /* To stop multiple inclusions. */
|
|
11
|
|
12
|
|
13 #if HAVE_CONFIG_H
|
|
14 #include <config.h>
|
|
15 #endif
|
|
16
|
|
17 #if !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF)
|
|
18 #undef vsnprintf
|
|
19 #define vsnprintf __vsnprintf
|
|
20 #define HAVE_VSNPRINTF
|
|
21 #endif
|
|
22
|
|
23 /* This is *not* good, because vsprintf() doesn't do any bounds-checking */
|
|
24 #if !defined(HAVE_VSNPRINTF) && !defined(HAVE___VSNPRINTF)
|
|
25 #define vsnprintf(c, len, fmt, args) vsprintf(c, fmt, args)
|
|
26 #define HAVE_VSNPRINTF
|
|
27 #endif
|
|
28
|
|
29 #if !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF)
|
|
30 #undef snprintf
|
|
31 #define snprintf __snprintf
|
|
32 #define HAVE_SNPRINTF
|
|
33 #endif
|
|
34
|
|
35
|
|
36 #endif
|
|
37
|