55
+ − 1 /*
+ − 2 portable.h
+ − 3
+ − 4 Compatibility checks and fallback-functions.
+ − 5
74
+ − 6 $Id: portable.h 80 2000-05-13 15:36:35Z bears $
55
+ − 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
74
+ − 35 /* Indicate deliberately unused argument. Possibly compiler specific. */
+ − 36 #define UNUSED(x) { ( void ) x; }
55
+ − 37
+ − 38 #endif
+ − 39