diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 11:07:18 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2008-02-12 11:07:18 +0000 |
commit | bd7029a99b0c2974265c6665638ef14a052f42ab (patch) | |
tree | f5661ba73366d81ef6e91f889ea7fec5ebe07b6b /gl/printf-args.h | |
parent | f99612320d6eda67644c07be04bb21aa4d7789db (diff) | |
download | monitoring-plugins-bd7029a99b0c2974265c6665638ef14a052f42ab.tar.gz |
Sync to latest Gnulib
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1925 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'gl/printf-args.h')
-rw-r--r-- | gl/printf-args.h | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/gl/printf-args.h b/gl/printf-args.h index 5759da0e..67cb990c 100644 --- a/gl/printf-args.h +++ b/gl/printf-args.h @@ -1,9 +1,9 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2003, 2006-2007 Free Software Foundation, Inc. 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, @@ -18,16 +18,26 @@ #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 wchar_t. */ -#ifdef HAVE_WCHAR_T +#if HAVE_WCHAR_T # include <stddef.h> #endif /* Get wint_t. */ -#ifdef HAVE_WINT_T +#if HAVE_WINT_T # include <wchar.h> #endif @@ -47,20 +57,18 @@ typedef enum TYPE_UINT, TYPE_LONGINT, TYPE_ULONGINT, -#ifdef HAVE_LONG_LONG_INT +#if HAVE_LONG_LONG_INT TYPE_LONGLONGINT, TYPE_ULONGLONGINT, #endif TYPE_DOUBLE, -#ifdef HAVE_LONG_DOUBLE TYPE_LONGDOUBLE, -#endif TYPE_CHAR, -#ifdef HAVE_WINT_T +#if HAVE_WINT_T TYPE_WIDE_CHAR, #endif TYPE_STRING, -#ifdef HAVE_WCHAR_T +#if HAVE_WCHAR_T TYPE_WIDE_STRING, #endif TYPE_POINTER, @@ -68,9 +76,15 @@ typedef enum TYPE_COUNT_SHORT_POINTER, TYPE_COUNT_INT_POINTER, TYPE_COUNT_LONGINT_POINTER -#ifdef HAVE_LONG_LONG_INT +#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 */ @@ -87,21 +101,19 @@ typedef struct unsigned int a_uint; long int a_longint; unsigned long int a_ulongint; -#ifdef HAVE_LONG_LONG_INT +#if HAVE_LONG_LONG_INT long long int a_longlongint; unsigned long long int a_ulonglongint; #endif float a_float; double a_double; -#ifdef HAVE_LONG_DOUBLE long double a_longdouble; -#endif int a_char; -#ifdef HAVE_WINT_T +#if HAVE_WINT_T wint_t a_wide_char; #endif const char* a_string; -#ifdef HAVE_WCHAR_T +#if HAVE_WCHAR_T const wchar_t* a_wide_string; #endif void* a_pointer; @@ -109,9 +121,15 @@ typedef struct short * a_count_short_pointer; int * a_count_int_pointer; long int * a_count_longint_pointer; -#ifdef HAVE_LONG_LONG_INT +#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; } @@ -131,6 +149,6 @@ STATIC #else extern #endif -int printf_fetchargs (va_list args, arguments *a); +int PRINTF_FETCHARGS (va_list args, arguments *a); #endif /* _PRINTF_ARGS_H */ |