+ 637. [port] Use isc_u?int64_t instead of (unsigned) long long in
+ lib/isc/print.c. Also allow lib/isc/print.c to
+ be compiled even if the platform does not need it.
+ [RT #592]
+
636. [port] Shut up MSVC++ about a possible loss of precision
in the ISC__BUFFER_PUTUINT*() macros. [RT #592]
628. [bug] If the root hints contained only AAAA addresses,
named would be unable to perform resolution.
- 627. [bug] The EDNS0 blackhole detection code of 324. waited
- for three retransmissions to each server, which
- takes much too long when a domain has many name
- servers and all of them drop EDNS0 queries. Now
- we retry without EDNS0 after three consecutive
+ 627. [bug] The EDNS0 blackhole detection code of changed 324
+ waited for three retransmissions to each server,
+ which takes much too long when a domain has many
+ name servers and all of them drop EDNS0 queries.
+ Now we retry without EDNS0 after three consecutive
timeouts, even if they are all from different
servers. [RT #143]
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: print.h,v 1.11 2000/11/14 23:40:31 tale Exp $ */
+/* $Id: print.h,v 1.12 2000/12/26 21:00:40 tale Exp $ */
#ifndef ISC_PRINT_H
#define ISC_PRINT_H 1
#include <isc/lang.h>
#include <isc/platform.h>
+/*
+ * This block allows lib/isc/print.c to be cleanly compiled even if
+ * the platform does not need it. The standard Makefile will still
+ * not compile print.c or archive print.o, so this is just to make test
+ * compilation ("make print.o") easier.
+ */
+#if !defined(ISC_PLATFORM_NEEDVSNPRINTF) && define(ISC__PRINT_SOURCE)
+#define ISC_PLATFORM_NEEDVSNPRINTF
+#endif
+
/***
*** Macros
***/
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: print.c,v 1.15 2000/12/06 00:30:06 tale Exp $ */
+/* $Id: print.c,v 1.16 2000/12/26 21:00:41 tale Exp $ */
#include <config.h>
#include <stdio.h> /* for sprintf */
#include <stdlib.h>
+#define ISC__PRINT_SOURCE /* Used to get the isc_print_* prototypes. */
+
#include <isc/assertions.h>
+#include <isc/int.h>
#include <isc/msgs.h>
#include <isc/print.h>
-#include <isc/platform.h>
#include <isc/util.h>
-#ifndef ISC_PLATFORM_NEEDVSNPRINTF
-#error ISC_PLATFORM_NEEDVSPRINTF needs to be defined to compile this file.
-#endif
-
/*
* Return length of string that would have been written if not truncated.
*/
int space;
int neg;
long long tmpi;
- unsigned long long tmpui;
+ isc_uint64_t tmpui;
unsigned long width;
unsigned long precision;
unsigned int length;
char buf[1024];
- char *cp;
- char *save = str;
char c;
void *v;
- char *head;
+ char *save = str;
+ const char *cp;
+ const char *head;
int count = 0;
int pad;
int zeropad;
case 'i':
case 'd':
if (q)
- tmpi = va_arg(ap, long long);
+ tmpi = va_arg(ap, isc_int64_t);
else if (l)
tmpi = va_arg(ap, long int);
else
goto printint;
case 'o':
if (q)
- tmpui = va_arg(ap, unsigned long long);
+ tmpui = va_arg(ap, isc_uint64_t);
else if (l)
tmpui = va_arg(ap, long int);
else
goto printint;
case 'u':
if (q)
- tmpui = va_arg(ap, unsigned long long);
+ tmpui = va_arg(ap, isc_uint64_t);
else if (l)
tmpui = va_arg(ap, unsigned long int);
else
goto printint;
case 'x':
if (q)
- tmpui = va_arg(ap, unsigned long long);
+ tmpui = va_arg(ap, isc_uint64_t);
else if (l)
tmpui = va_arg(ap, unsigned long int);
else
goto printint;
case 'X':
if (q)
- tmpui = va_arg(ap, unsigned long long);
+ tmpui = va_arg(ap, isc_uint64_t);
else if (l)
tmpui = va_arg(ap, unsigned long int);
else
/*
* cp need not be NULL terminated.
*/
- char *tp;
+ const char *tp;
unsigned long n;
n = precision;
* MAX 1.7976931348623157E+308
* VAX floating point has a smaller range than IEEE.
*
- * precisions > 324 don't make much sence.
+ * precisions > 324 don't make much sense.
* if we cap the precision at 512 we will not
* overflow buf.
*/