revert config/* to upstream versions, let rules configure target handle update
[debian/amanda] / gnulib / printf-args.h
index 74a18d9bf342426fac0d39e7d45ce94d1516d6a6..67cb990cad30aedd50637eec0a27430792d90dfa 100644 (file)
@@ -3,7 +3,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    This program is distributed in the hope that it will be useful,
    any later version.
 
    This program is distributed in the hope that it will be useful,
 #ifndef _PRINTF_ARGS_H
 #define _PRINTF_ARGS_H
 
 #ifndef _PRINTF_ARGS_H
 #define _PRINTF_ARGS_H
 
+/* This file can be parametrized with the following macros:
+     ENABLE_UNISTDIO    Set to 1 to enable the unistdio extensions.
+     PRINTF_FETCHARGS   Name of the function to be declared.
+     STATIC             Set to 'static' to declare the function static.  */
+
+/* Default parameters.  */
+#ifndef PRINTF_FETCHARGS
+# define PRINTF_FETCHARGS printf_fetchargs
+#endif
+
 /* Get size_t.  */
 #include <stddef.h>
 
 /* Get size_t.  */
 #include <stddef.h>
 
@@ -52,9 +62,7 @@ typedef enum
   TYPE_ULONGLONGINT,
 #endif
   TYPE_DOUBLE,
   TYPE_ULONGLONGINT,
 #endif
   TYPE_DOUBLE,
-#if HAVE_LONG_DOUBLE
   TYPE_LONGDOUBLE,
   TYPE_LONGDOUBLE,
-#endif
   TYPE_CHAR,
 #if HAVE_WINT_T
   TYPE_WIDE_CHAR,
   TYPE_CHAR,
 #if HAVE_WINT_T
   TYPE_WIDE_CHAR,
@@ -71,6 +79,12 @@ typedef enum
 #if HAVE_LONG_LONG_INT
 , TYPE_COUNT_LONGLONGINT_POINTER
 #endif
 #if HAVE_LONG_LONG_INT
 , TYPE_COUNT_LONGLONGINT_POINTER
 #endif
+#if ENABLE_UNISTDIO
+  /* The unistdio extensions.  */
+, TYPE_U8_STRING
+, TYPE_U16_STRING
+, TYPE_U32_STRING
+#endif
 } arg_type;
 
 /* Polymorphic argument */
 } arg_type;
 
 /* Polymorphic argument */
@@ -93,9 +107,7 @@ typedef struct
 #endif
     float                      a_float;
     double                     a_double;
 #endif
     float                      a_float;
     double                     a_double;
-#if HAVE_LONG_DOUBLE
     long double                        a_longdouble;
     long double                        a_longdouble;
-#endif
     int                                a_char;
 #if HAVE_WINT_T
     wint_t                     a_wide_char;
     int                                a_char;
 #if HAVE_WINT_T
     wint_t                     a_wide_char;
@@ -111,6 +123,12 @@ typedef struct
     long int *                 a_count_longint_pointer;
 #if HAVE_LONG_LONG_INT
     long long int *            a_count_longlongint_pointer;
     long int *                 a_count_longint_pointer;
 #if HAVE_LONG_LONG_INT
     long long int *            a_count_longlongint_pointer;
+#endif
+#if ENABLE_UNISTDIO
+    /* The unistdio extensions.  */
+    const uint8_t *            a_u8_string;
+    const uint16_t *           a_u16_string;
+    const uint32_t *           a_u32_string;
 #endif
   }
   a;
 #endif
   }
   a;
@@ -131,6 +149,6 @@ STATIC
 #else
 extern
 #endif
 #else
 extern
 #endif
-int printf_fetchargs (va_list args, arguments *a);
+int PRINTF_FETCHARGS (va_list args, arguments *a);
 
 #endif /* _PRINTF_ARGS_H */
 
 #endif /* _PRINTF_ARGS_H */