]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
authorBruno Haible <bruno@clisp.org>
Tue, 30 Jan 2007 01:10:14 +0000 (01:10 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:14:39 +0000 (12:14 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/printf-args.c
gettext-runtime/intl/printf-args.h
gettext-runtime/intl/printf-parse.c
gettext-runtime/intl/vasnprintf.c
gettext-runtime/libasprintf/ChangeLog
gettext-runtime/libasprintf/printf-args.c
gettext-runtime/libasprintf/printf-args.h
gettext-runtime/libasprintf/printf-parse.c
gettext-runtime/libasprintf/vasnprintf.c

index 6ca9dd2c5e25fe9cf1a5a5c9754036e987f529ec..f6e6690608e2760d3dfd3dc0aa9bddc028d9765a 100644 (file)
@@ -1,3 +1,10 @@
+2007-01-29  Bruno Haible  <bruno@clisp.org>
+
+       * lib/printf-args.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
+       * lib/printf-args.c: Likewise.
+       * lib/printf-parse.c: Likewise.
+       * lib/vasnprintf.c: Likewise.
+
 2007-01-27  Bruno Haible  <bruno@clisp.org>
 
        * tsearch.h: New file, from gnulib.
index ee0faba16ba7fc1f87737c1cbb5c7f43e4ad35cb..b43f89b7bba48062267ebf4686aaea99785a7900 100644 (file)
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2003, 2005-2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
@@ -57,7 +57,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_ULONGINT:
        ap->a.a_ulongint = va_arg (args, unsigned long int);
        break;
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
       case TYPE_LONGLONGINT:
        ap->a.a_longlongint = va_arg (args, long long int);
        break;
@@ -68,7 +68,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_DOUBLE:
        ap->a.a_double = va_arg (args, double);
        break;
-#ifdef HAVE_LONG_DOUBLE
+#if HAVE_LONG_DOUBLE
       case TYPE_LONGDOUBLE:
        ap->a.a_longdouble = va_arg (args, long double);
        break;
@@ -76,7 +76,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_CHAR:
        ap->a.a_char = va_arg (args, int);
        break;
-#ifdef HAVE_WINT_T
+#if HAVE_WINT_T
       case TYPE_WIDE_CHAR:
        /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
           default argument promotions", this is not the case in mingw32,
@@ -95,7 +95,7 @@ printf_fetchargs (va_list args, arguments *a)
        if (ap->a.a_string == NULL)
          ap->a.a_string = "(NULL)";
        break;
-#ifdef HAVE_WCHAR_T
+#if HAVE_WCHAR_T
       case TYPE_WIDE_STRING:
        ap->a.a_wide_string = va_arg (args, const wchar_t *);
        /* A null pointer is an invalid argument for "%ls", but in practice
@@ -129,7 +129,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_COUNT_LONGINT_POINTER:
        ap->a.a_count_longint_pointer = va_arg (args, long int *);
        break;
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
       case TYPE_COUNT_LONGLONGINT_POINTER:
        ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
        break;
index 886febe666abba246a8e17f60898ecce7e7b4fc3..43eef0e899a8702eb24fb89b98fd261c3159a0de 100644 (file)
@@ -1,5 +1,5 @@
 /* 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 Library General Public License as published
 #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
 
@@ -48,20 +48,20 @@ 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
+#if 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,
@@ -69,7 +69,7 @@ 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
 } arg_type;
@@ -88,21 +88,21 @@ 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
+#if 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;
@@ -110,7 +110,7 @@ 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
   }
index 766880668388d93606736b47ba74bcbe50702a98..57b72fc5d46d4b06f827168b3916391f680110d1 100644 (file)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999-2000, 2002-2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 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 Library General Public License as published
@@ -327,7 +327,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                      flags += 8;
                      cp++;
                    }
-#ifdef HAVE_INTMAX_T
+#if HAVE_INTMAX_T
                  else if (*cp == 'j')
                    {
                      if (sizeof (intmax_t) > sizeof (long))
@@ -383,7 +383,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
              switch (c)
                {
                case 'd': case 'i':
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
                  /* If 'long long' exists and is larger than 'long':  */
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_LONGLONGINT;
@@ -401,7 +401,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                    type = TYPE_INT;
                  break;
                case 'o': case 'u': case 'x': case 'X':
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
                  /* If 'long long' exists and is larger than 'long':  */
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_ULONGLONGINT;
@@ -420,7 +420,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  break;
                case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
                case 'a': case 'A':
-#ifdef HAVE_LONG_DOUBLE
+#if HAVE_LONG_DOUBLE
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_LONGDOUBLE;
                  else
@@ -429,7 +429,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  break;
                case 'c':
                  if (flags >= 8)
-#ifdef HAVE_WINT_T
+#if HAVE_WINT_T
                    type = TYPE_WIDE_CHAR;
 #else
                    goto error;
@@ -437,7 +437,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  else
                    type = TYPE_CHAR;
                  break;
-#ifdef HAVE_WINT_T
+#if HAVE_WINT_T
                case 'C':
                  type = TYPE_WIDE_CHAR;
                  c = 'c';
@@ -445,7 +445,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
 #endif
                case 's':
                  if (flags >= 8)
-#ifdef HAVE_WCHAR_T
+#if HAVE_WCHAR_T
                    type = TYPE_WIDE_STRING;
 #else
                    goto error;
@@ -453,7 +453,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  else
                    type = TYPE_STRING;
                  break;
-#ifdef HAVE_WCHAR_T
+#if HAVE_WCHAR_T
                case 'S':
                  type = TYPE_WIDE_STRING;
                  c = 's';
@@ -463,7 +463,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  type = TYPE_POINTER;
                  break;
                case 'n':
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
                  /* If 'long long' exists and is larger than 'long':  */
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_COUNT_LONGLONGINT_POINTER;
index 8b073103bd344f8c13faaf47a8b556e069b18b1d..48cac1b3ca3ed2fc689385df648ea0ef2c5c13f4 100644 (file)
@@ -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 Library General Public License as published
@@ -50,8 +50,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
@@ -249,7 +249,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;
@@ -323,7 +323,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
@@ -353,7 +353,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
@@ -381,7 +381,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
@@ -409,7 +409,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
@@ -438,7 +438,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
@@ -447,7 +447,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 =
@@ -528,7 +528,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';
@@ -536,15 +536,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;
@@ -682,7 +682,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;
@@ -702,7 +702,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;
@@ -716,7 +716,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;
@@ -730,7 +730,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;
index 1009bcbed8292319f3edf72b3172e1f31d1e26fa..7b886769aeb400fa5fc879c387d719238a4bbfca 100644 (file)
@@ -1,3 +1,10 @@
+2007-01-29  Bruno Haible  <bruno@clisp.org>
+
+       * printf-args.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
+       * printf-args.c: Likewise.
+       * printf-parse.c: Likewise.
+       * vasnprintf.c: Likewise.
+
 2006-11-01  Bruno Haible  <bruno@clisp.org>
 
        * printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
index ee0faba16ba7fc1f87737c1cbb5c7f43e4ad35cb..b43f89b7bba48062267ebf4686aaea99785a7900 100644 (file)
@@ -1,5 +1,5 @@
 /* Decomposed printf argument list.
-   Copyright (C) 1999, 2002-2003, 2005-2006 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002-2003, 2005-2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify it
    under the terms of the GNU Library General Public License as published
@@ -57,7 +57,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_ULONGINT:
        ap->a.a_ulongint = va_arg (args, unsigned long int);
        break;
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
       case TYPE_LONGLONGINT:
        ap->a.a_longlongint = va_arg (args, long long int);
        break;
@@ -68,7 +68,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_DOUBLE:
        ap->a.a_double = va_arg (args, double);
        break;
-#ifdef HAVE_LONG_DOUBLE
+#if HAVE_LONG_DOUBLE
       case TYPE_LONGDOUBLE:
        ap->a.a_longdouble = va_arg (args, long double);
        break;
@@ -76,7 +76,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_CHAR:
        ap->a.a_char = va_arg (args, int);
        break;
-#ifdef HAVE_WINT_T
+#if HAVE_WINT_T
       case TYPE_WIDE_CHAR:
        /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
           default argument promotions", this is not the case in mingw32,
@@ -95,7 +95,7 @@ printf_fetchargs (va_list args, arguments *a)
        if (ap->a.a_string == NULL)
          ap->a.a_string = "(NULL)";
        break;
-#ifdef HAVE_WCHAR_T
+#if HAVE_WCHAR_T
       case TYPE_WIDE_STRING:
        ap->a.a_wide_string = va_arg (args, const wchar_t *);
        /* A null pointer is an invalid argument for "%ls", but in practice
@@ -129,7 +129,7 @@ printf_fetchargs (va_list args, arguments *a)
       case TYPE_COUNT_LONGINT_POINTER:
        ap->a.a_count_longint_pointer = va_arg (args, long int *);
        break;
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
       case TYPE_COUNT_LONGLONGINT_POINTER:
        ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
        break;
index 886febe666abba246a8e17f60898ecce7e7b4fc3..43eef0e899a8702eb24fb89b98fd261c3159a0de 100644 (file)
@@ -1,5 +1,5 @@
 /* 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 Library General Public License as published
 #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
 
@@ -48,20 +48,20 @@ 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
+#if 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,
@@ -69,7 +69,7 @@ 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
 } arg_type;
@@ -88,21 +88,21 @@ 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
+#if 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;
@@ -110,7 +110,7 @@ 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
   }
index 766880668388d93606736b47ba74bcbe50702a98..57b72fc5d46d4b06f827168b3916391f680110d1 100644 (file)
@@ -1,5 +1,5 @@
 /* Formatted output to strings.
-   Copyright (C) 1999-2000, 2002-2003, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1999-2000, 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 Library General Public License as published
@@ -327,7 +327,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                      flags += 8;
                      cp++;
                    }
-#ifdef HAVE_INTMAX_T
+#if HAVE_INTMAX_T
                  else if (*cp == 'j')
                    {
                      if (sizeof (intmax_t) > sizeof (long))
@@ -383,7 +383,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
              switch (c)
                {
                case 'd': case 'i':
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
                  /* If 'long long' exists and is larger than 'long':  */
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_LONGLONGINT;
@@ -401,7 +401,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                    type = TYPE_INT;
                  break;
                case 'o': case 'u': case 'x': case 'X':
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
                  /* If 'long long' exists and is larger than 'long':  */
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_ULONGLONGINT;
@@ -420,7 +420,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  break;
                case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
                case 'a': case 'A':
-#ifdef HAVE_LONG_DOUBLE
+#if HAVE_LONG_DOUBLE
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_LONGDOUBLE;
                  else
@@ -429,7 +429,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  break;
                case 'c':
                  if (flags >= 8)
-#ifdef HAVE_WINT_T
+#if HAVE_WINT_T
                    type = TYPE_WIDE_CHAR;
 #else
                    goto error;
@@ -437,7 +437,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  else
                    type = TYPE_CHAR;
                  break;
-#ifdef HAVE_WINT_T
+#if HAVE_WINT_T
                case 'C':
                  type = TYPE_WIDE_CHAR;
                  c = 'c';
@@ -445,7 +445,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
 #endif
                case 's':
                  if (flags >= 8)
-#ifdef HAVE_WCHAR_T
+#if HAVE_WCHAR_T
                    type = TYPE_WIDE_STRING;
 #else
                    goto error;
@@ -453,7 +453,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  else
                    type = TYPE_STRING;
                  break;
-#ifdef HAVE_WCHAR_T
+#if HAVE_WCHAR_T
                case 'S':
                  type = TYPE_WIDE_STRING;
                  c = 's';
@@ -463,7 +463,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
                  type = TYPE_POINTER;
                  break;
                case 'n':
-#ifdef HAVE_LONG_LONG_INT
+#if HAVE_LONG_LONG_INT
                  /* If 'long long' exists and is larger than 'long':  */
                  if (flags >= 16 || (flags & 4))
                    type = TYPE_COUNT_LONGLONGINT_POINTER;
index 8b073103bd344f8c13faaf47a8b556e069b18b1d..48cac1b3ca3ed2fc689385df648ea0ef2c5c13f4 100644 (file)
@@ -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 Library General Public License as published
@@ -50,8 +50,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
@@ -249,7 +249,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;
@@ -323,7 +323,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
@@ -353,7 +353,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
@@ -381,7 +381,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
@@ -409,7 +409,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
@@ -438,7 +438,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
@@ -447,7 +447,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 =
@@ -528,7 +528,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';
@@ -536,15 +536,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;
@@ -682,7 +682,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;
@@ -702,7 +702,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;
@@ -716,7 +716,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;
@@ -730,7 +730,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;