]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* stdio-common/vfprintf.c (vfprintf): Slightly more compact code.
authorUlrich Drepper <drepper@redhat.com>
Fri, 10 Apr 2009 02:51:29 +0000 (02:51 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 10 Apr 2009 02:51:29 +0000 (02:51 +0000)
ChangeLog
stdio-common/vfprintf.c
sysdeps/unix/sysv/linux/preadv.c
sysdeps/unix/sysv/linux/pwritev.c

index 200c8187d1fbfd00953802b215fb086adb4cbfa6..fe0a899819265a35fa840518e18d3b55b54cb9e0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2009-04-09  Ulrich Drepper  <drepper@redhat.com>
 
+       * stdio-common/vfprintf.c (vfprintf): Slightly more compact code.
+
        * sysdeps/unix/sysv/linux/preadv.c: Avoid prototype for static
        function if it is not defined.  Add some necessary casts.
        * sysdeps/unix/sysv/linux/pwritev.c: Likewise.
index 5d5bb5e5783d5f93e758d1fca0b8ea1ec94595f3..819865f61e8c419b3e416baf1b76130cf058bf48 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008
-   Free Software Foundation, Inc.
+/* Copyright (C) 1991-2008, 2009   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -1743,13 +1742,21 @@ do_positional:
          args_value[cnt].mem = va_arg (ap_save, type);                       \
          break
 
-       T (PA_CHAR, pa_int, int); /* Promoted.  */
        T (PA_WCHAR, pa_wchar, wint_t);
-       T (PA_INT|PA_FLAG_SHORT, pa_int, int); /* Promoted.  */
+       case PA_CHAR:                           /* Promoted.  */
+       case PA_INT|PA_FLAG_SHORT:              /* Promoted.  */
+#if LONG_MAX == INT_MAX
+       case PA_INT|PA_FLAG_LONG:
+#endif
        T (PA_INT, pa_int, int);
-       T (PA_INT|PA_FLAG_LONG, pa_long_int, long int);
+#if LONG_MAX == LONG_LONG_MAX
+       case PA_INT|PA_FLAG_LONG:
+#endif
        T (PA_INT|PA_FLAG_LONG_LONG, pa_long_long_int, long long int);
-       T (PA_FLOAT, pa_double, double);        /* Promoted.  */
+#if LONG_MAX != INT_MAX && LONG_MAX != LONG_LONG_MAX
+# error "he?"
+#endif
+       case PA_FLOAT:                          /* Promoted.  */
        T (PA_DOUBLE, pa_double, double);
        case PA_DOUBLE|PA_FLAG_LONG_DOUBLE:
          if (__ldbl_is_dbl)
@@ -1760,8 +1767,8 @@ do_positional:
          else
            args_value[cnt].pa_long_double = va_arg (ap_save, long double);
          break;
-       T (PA_STRING, pa_string, const char *);
-       T (PA_WSTRING, pa_wstring, const wchar_t *);
+       case PA_STRING:                         /* All pointers are the same */
+       case PA_WSTRING:                        /* All pointers are the same */
        T (PA_POINTER, pa_pointer, void *);
 #undef T
        default:
index 8c89d9200efdf9abd61203cd7b4d79ba51683866..0d4a6c380348a667c399c75c4d12cba2eb4fa101 100644 (file)
 #include <sys/syscall.h>
 #include <kernel-features.h>
 
-#ifdef __x86_64__
-#define __NR_preadv                            295
-#elif defined __i386__
-#define __NR_preadv            333
-#endif
-
 
 #ifndef PREADV
 # define PREADV preadv
index 1916abe485b7054a26d60f6f4ea231b265fb5e7b..5c30eae51f06ae98ab247d7aba20184646340e75 100644 (file)
 #include <sys/syscall.h>
 #include <kernel-features.h>
 
-#ifdef __x86_64__
-#define __NR_pwritev                           296
-#elif defined __i386__
-#define __NR_pwritev           334
-#endif
-
 
 #ifndef PWRITEV
 # define PWRITEV pwritev