diff options
author | Simon Josefsson <simon@josefsson.org> | 2007-01-31 04:48:42 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2007-01-31 04:48:42 +0000 |
commit | e7fb1c2a2085133739a9e661866f97da146d8137 (patch) | |
tree | 593e71e3da1e85175a201b8e682c3a959492994d /lgl/vasnprintf.c | |
parent | 554e4119202f749b36c72b79b4969a1794867bcf (diff) | |
download | gnutls-e7fb1c2a2085133739a9e661866f97da146d8137.tar.gz |
Update.
Diffstat (limited to 'lgl/vasnprintf.c')
-rw-r--r-- | lgl/vasnprintf.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/lgl/vasnprintf.c b/lgl/vasnprintf.c index 8f6730468b..8e5c8c39f5 100644 --- a/lgl/vasnprintf.c +++ b/lgl/vasnprintf.c @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2006 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -49,8 +49,8 @@ /* Checked size_t computations. */ #include "xsize.h" -#ifdef HAVE_WCHAR_T -# ifdef HAVE_WCSLEN +#if HAVE_WCHAR_T +# if HAVE_WCSLEN # define local_wcslen wcslen # else /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid @@ -248,7 +248,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar case TYPE_COUNT_LONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longint_pointer = length; break; -#ifdef HAVE_LONG_LONG_INT +#if HAVE_LONG_LONG_INT case TYPE_COUNT_LONGLONGINT_POINTER: *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; break; @@ -322,7 +322,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar { case 'd': case 'i': case 'u': -# ifdef HAVE_LONG_LONG_INT +# if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT @@ -352,7 +352,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar break; case 'o': -# ifdef HAVE_LONG_LONG_INT +# if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT @@ -380,7 +380,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar break; case 'x': case 'X': -# ifdef HAVE_LONG_LONG_INT +# if HAVE_LONG_LONG_INT if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) tmp_length = (unsigned int) (sizeof (unsigned long long) * CHAR_BIT @@ -408,7 +408,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar break; case 'f': case 'F': -# ifdef HAVE_LONG_DOUBLE +# if HAVE_LONG_DOUBLE if (type == TYPE_LONGDOUBLE) tmp_length = (unsigned int) (LDBL_MAX_EXP @@ -437,7 +437,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar break; case 'c': -# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION +# if HAVE_WINT_T && !WIDE_CHAR_VERSION if (type == TYPE_WIDE_CHAR) tmp_length = MB_CUR_MAX; else @@ -446,7 +446,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar break; case 's': -# ifdef HAVE_WCHAR_T +# if HAVE_WCHAR_T if (type == TYPE_WIDE_STRING) { tmp_length = @@ -527,7 +527,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar switch (type) { -#ifdef HAVE_LONG_LONG_INT +#if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: case TYPE_ULONGLONGINT: *p++ = 'l'; @@ -535,15 +535,15 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar #endif case TYPE_LONGINT: case TYPE_ULONGINT: -#ifdef HAVE_WINT_T +#if HAVE_WINT_T case TYPE_WIDE_CHAR: #endif -#ifdef HAVE_WCHAR_T +#if HAVE_WCHAR_T case TYPE_WIDE_STRING: #endif *p++ = 'l'; break; -#ifdef HAVE_LONG_DOUBLE +#if HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: *p++ = 'L'; break; @@ -681,7 +681,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar SNPRINTF_BUF (arg); } break; -#ifdef HAVE_LONG_LONG_INT +#if HAVE_LONG_LONG_INT case TYPE_LONGLONGINT: { long long int arg = a.arg[dp->arg_index].a.a_longlongint; @@ -701,7 +701,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar SNPRINTF_BUF (arg); } break; -#ifdef HAVE_LONG_DOUBLE +#if HAVE_LONG_DOUBLE case TYPE_LONGDOUBLE: { long double arg = a.arg[dp->arg_index].a.a_longdouble; @@ -715,7 +715,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar SNPRINTF_BUF (arg); } break; -#ifdef HAVE_WINT_T +#if HAVE_WINT_T case TYPE_WIDE_CHAR: { wint_t arg = a.arg[dp->arg_index].a.a_wide_char; @@ -729,7 +729,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar SNPRINTF_BUF (arg); } break; -#ifdef HAVE_WCHAR_T +#if HAVE_WCHAR_T case TYPE_WIDE_STRING: { const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; |