Add BIND 9.2.4rc7.
[dragonfly.git] / contrib / bind-9.2.4rc7 / lib / isc / include / isc / print.h
blobe58400097884b25c9530f80b3bef4a83d8582567
1 /*
2 * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 1999-2001 Internet Software Consortium.
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15 * PERFORMANCE OF THIS SOFTWARE.
18 /* $Id: print.h,v 1.17.2.1 2004/03/09 06:11:59 marka Exp $ */
20 #ifndef ISC_PRINT_H
21 #define ISC_PRINT_H 1
23 /***
24 *** Imports
25 ***/
27 #include <isc/formatcheck.h> /* Required for ISC_FORMAT_PRINTF() macro. */
28 #include <isc/lang.h>
29 #include <isc/platform.h>
32 * This block allows lib/isc/print.c to be cleanly compiled even if
33 * the platform does not need it. The standard Makefile will still
34 * not compile print.c or archive print.o, so this is just to make test
35 * compilation ("make print.o") easier.
37 #if !defined(ISC_PLATFORM_NEEDVSNPRINTF) && defined(ISC__PRINT_SOURCE)
38 #define ISC_PLATFORM_NEEDVSNPRINTF
39 #endif
41 /***
42 *** Macros
43 ***/
44 #define ISC_PRINT_QUADFORMAT ISC_PLATFORM_QUADFORMAT
46 /***
47 *** Functions
48 ***/
50 #ifdef ISC_PLATFORM_NEEDVSNPRINTF
51 #include <stdarg.h>
52 #include <stddef.h>
54 ISC_LANG_BEGINDECLS
56 int
57 isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap)
58 ISC_FORMAT_PRINTF(3, 0);
59 #define vsnprintf isc_print_vsnprintf
61 int
62 isc_print_snprintf(char *str, size_t size, const char *format, ...)
63 ISC_FORMAT_PRINTF(3, 4);
64 #define snprintf isc_print_snprintf
66 ISC_LANG_ENDDECLS
67 #endif /* ISC_PLATFORM_NEEDVSNPRINTF */
69 #endif /* ISC_PRINT_H */