Expand PMF_FN_* macros.
[netbsd-mini2440.git] / dist / ntp / include / isc / print.h
blob4d2ee33a70d7766136433df4a27b1d14e5c31b3d
1 /* $NetBSD$ */
3 /*
4 * Copyright (C) 1999-2001 Internet Software Consortium.
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM
11 * DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
12 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL
13 * INTERNET SOFTWARE CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT,
14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
15 * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
16 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
17 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20 /* Id: print.h,v 1.17 2001/02/27 02:19:33 gson Exp */
22 #ifndef ISC_PRINT_H
23 #define ISC_PRINT_H 1
25 /***
26 *** Imports
27 ***/
29 #include <isc/formatcheck.h> /* Required for ISC_FORMAT_PRINTF() macro. */
30 #include <isc/lang.h>
31 #include <isc/platform.h>
34 * This block allows lib/isc/print.c to be cleanly compiled even if
35 * the platform does not need it. The standard Makefile will still
36 * not compile print.c or archive print.o, so this is just to make test
37 * compilation ("make print.o") easier.
39 #if !defined(ISC_PLATFORM_NEEDVSNPRINTF) && defined(ISC__PRINT_SOURCE)
40 #define ISC_PLATFORM_NEEDVSNPRINTF
41 #endif
43 /***
44 *** Macros
45 ***/
46 #define ISC_PRINT_QUADFORMAT ISC_PLATFORM_QUADFORMAT
48 /***
49 *** Functions
50 ***/
52 #ifdef ISC_PLATFORM_NEEDVSNPRINTF
53 #include <stdarg.h>
54 #include <stddef.h>
56 ISC_LANG_BEGINDECLS
58 int
59 isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap)
60 ISC_FORMAT_PRINTF(3, 0);
61 #define vsnprintf isc_print_vsnprintf
63 int
64 isc_print_snprintf(char *str, size_t size, const char *format, ...)
65 ISC_FORMAT_PRINTF(3, 4);
66 #define snprintf isc_print_snprintf
68 ISC_LANG_ENDDECLS
69 #endif /* ISC_PLATFORM_NEEDVSNPRINTF */
71 #endif /* ISC_PRINT_H */