#include <stddef.h>
/* Get intmax_t. */
-#if HAVE_STDINT_H_WITH_UINTMAX
+#ifdef HAVE_STDINT_H_WITH_UINTMAX
# include <stdint.h>
#endif
-#if HAVE_INTTYPES_H_WITH_UINTMAX
+#ifdef HAVE_INTTYPES_H_WITH_UINTMAX
# include <inttypes.h>
#endif
char *p;
unsigned int prefix_count;
int prefixes[2];
-#if !HAVE_SNPRINTF
+#ifndef HAVE_SNPRINTF
unsigned int tmp_length;
char tmpbuf[700];
char *tmp;
break;
}
*p = dp->conversion;
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
p[1] = '%';
p[2] = 'n';
p[3] = '\0';
abort ();
prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
}
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
/* Prepare checking whether snprintf returns the count
via %n. */
ENSURE_ALLOCATION (length + 1);
for (;;) {
size_t maxlen;
int count;
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
int retcount;
#endif
maxlen = allocated - length;
count = -1;
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
retcount = 0;
#define SNPRINTF_BUF(arg) \
while (digitp != dp->precision_end);
}
}
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
count = print_long_long (result + length, maxlen,
width, precision, dp->flags, dp->conversion, arg);
#else
abort ();
}
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
/* Portability: Not all implementations of snprintf()
are ISO C 99 compliant. Determine the number of
bytes that snprintf() has produced or would have
errno = EINVAL;
return NULL;
}
-#if !HAVE_SNPRINTF
+#ifndef HAVE_SNPRINTF
if (count >= tmp_length)
/* tmp_length was incorrectly calculated - fix the
code above! */
n = 2 * allocated;
ENSURE_ALLOCATION (n);
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
continue;
#endif
}
-#if HAVE_SNPRINTF
+#ifdef HAVE_SNPRINTF
/* The snprintf() result did fit. */
#else
/* Append the sprintf() result. */
#ifndef __attribute__
/* This feature is available in gcc versions 2.5 and later. */
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || defined (__STRICT_ANSI__)
# define __attribute__(Spec) /* empty */
# endif
/* The __-protected variants of `format' and `printf' attributes