annotate src/portable.h @ 55:3b3750063786 noffle

[svn] * src/portable.h: Added file. This #defines some macros, so the code uses __snprintf() and __vsnprintf if snprintf and vsnprintf aren't available. This is the case on SunOS, for example.
author uh1763
date Tue, 09 May 2000 23:32:33 +0100
parents
children c7df2cc65cc1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55
uh1763
parents:
diff changeset
1 /*
uh1763
parents:
diff changeset
2 portable.h
uh1763
parents:
diff changeset
3
uh1763
parents:
diff changeset
4 Compatibility checks and fallback-functions.
uh1763
parents:
diff changeset
5
uh1763
parents:
diff changeset
6 $Id: portable.h 61 2000-05-09 22:32:33Z uh1763 $
uh1763
parents:
diff changeset
7 */
uh1763
parents:
diff changeset
8
uh1763
parents:
diff changeset
9 #ifndef PORTABLE_H
uh1763
parents:
diff changeset
10 #define PORTABLE_H /* To stop multiple inclusions. */
uh1763
parents:
diff changeset
11
uh1763
parents:
diff changeset
12
uh1763
parents:
diff changeset
13 #if HAVE_CONFIG_H
uh1763
parents:
diff changeset
14 #include <config.h>
uh1763
parents:
diff changeset
15 #endif
uh1763
parents:
diff changeset
16
uh1763
parents:
diff changeset
17 #if !defined(HAVE_VSNPRINTF) && defined(HAVE___VSNPRINTF)
uh1763
parents:
diff changeset
18 #undef vsnprintf
uh1763
parents:
diff changeset
19 #define vsnprintf __vsnprintf
uh1763
parents:
diff changeset
20 #define HAVE_VSNPRINTF
uh1763
parents:
diff changeset
21 #endif
uh1763
parents:
diff changeset
22
uh1763
parents:
diff changeset
23 /* This is *not* good, because vsprintf() doesn't do any bounds-checking */
uh1763
parents:
diff changeset
24 #if !defined(HAVE_VSNPRINTF) && !defined(HAVE___VSNPRINTF)
uh1763
parents:
diff changeset
25 #define vsnprintf(c, len, fmt, args) vsprintf(c, fmt, args)
uh1763
parents:
diff changeset
26 #define HAVE_VSNPRINTF
uh1763
parents:
diff changeset
27 #endif
uh1763
parents:
diff changeset
28
uh1763
parents:
diff changeset
29 #if !defined(HAVE_SNPRINTF) && defined(HAVE___SNPRINTF)
uh1763
parents:
diff changeset
30 #undef snprintf
uh1763
parents:
diff changeset
31 #define snprintf __snprintf
uh1763
parents:
diff changeset
32 #define HAVE_SNPRINTF
uh1763
parents:
diff changeset
33 #endif
uh1763
parents:
diff changeset
34
uh1763
parents:
diff changeset
35
uh1763
parents:
diff changeset
36 #endif
uh1763
parents:
diff changeset
37