summaryrefslogtreecommitdiff
path: root/makeint.h
diff options
context:
space:
mode:
Diffstat (limited to 'makeint.h')
-rw-r--r--makeint.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/makeint.h b/makeint.h
index 643b611..812ead1 100644
--- a/makeint.h
+++ b/makeint.h
@@ -168,6 +168,9 @@ unsigned int get_path_max (void);
(! INTEGER_TYPE_SIGNED (t) ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))
#define INTEGER_TYPE_MAXIMUM(t) (~ (t) 0 - INTEGER_TYPE_MINIMUM (t))
+/* The maximum number of digits needed to represent the largest integer. */
+#define INTEGER_LENGTH sizeof("18446744073709551616")
+
#ifndef CHAR_MAX
# define CHAR_MAX INTEGER_TYPE_MAXIMUM (char)
#endif
@@ -379,29 +382,17 @@ extern struct rlimit stack_limit;
#define STRING_SIZE_TUPLE(_s) (_s), CSTRLEN(_s)
-/* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
- variadic versions of these functions. */
-
-#if HAVE_STDARG_H || HAVE_VARARGS_H
-# if HAVE_VPRINTF || HAVE_DOPRNT
-# define USE_VARIADIC 1
-# endif
-#endif
-
-#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
const char *concat (unsigned int, ...);
+const char *message_s (unsigned int length, int prefix, const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+const char *error_s (unsigned int length, const gmk_floc *flocp, const char *fmt, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
void message (int prefix, const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
void error (const gmk_floc *flocp, const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3)));
void fatal (const gmk_floc *flocp, const char *fmt, ...)
__attribute__ ((noreturn, __format__ (__printf__, 2, 3)));
-#else
-const char *concat ();
-void message ();
-void error ();
-void fatal ();
-#endif
void die (int) __attribute__ ((noreturn));
void log_working_directory (int, int);