]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix a couple of __REDIRECT () __THROW occurrences
authorJakub Jelinek <jakub@redhat.com>
Mon, 14 Jun 2010 15:18:26 +0000 (08:18 -0700)
committerPetr Baudis <pasky@suse.cz>
Mon, 1 Nov 2010 21:03:00 +0000 (22:03 +0100)
This patch fixes some cases which fail to parse with C++.
(cherry picked from commit f32f28695d938597ad93177dc83225dcb3c69f74)

ChangeLog
libio/stdio.h
posix/getopt.h
wcsmbs/wchar.h

index b03035f17d49c81d7d7bdba9086b0abc637eea40..1732fe528c4269cffaae88afcad88e16f0f3bb87 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-06-07  Jakub Jelinek  <jakub@redhat.com>
+
+       * libio/stdio.h (sscanf, vsscanf): Use __REDIRECT_NTH instead of
+       __REDIRECT followed by __THROW.
+       * wcsmbs/wchar.h (swscanf, vswscanf): Likewise.
+       * posix/getopt.h (getopt): Likewise.
+
 2010-05-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        [BZ #11640]
index d7d241c92512bc925e806acaf7954b5032fe2ecd..a6d24e54ef1379e52f4e02125e4437fd75445029 100644 (file)
@@ -427,9 +427,9 @@ extern int __REDIRECT (fscanf, (FILE *__restrict __stream,
                       __isoc99_fscanf) __wur;
 extern int __REDIRECT (scanf, (__const char *__restrict __format, ...),
                       __isoc99_scanf) __wur;
-extern int __REDIRECT (sscanf, (__const char *__restrict __s,
-                               __const char *__restrict __format, ...),
-                      __isoc99_sscanf) __THROW;
+extern int __REDIRECT_NTH (sscanf, (__const char *__restrict __s,
+                                   __const char *__restrict __format, ...),
+                          __isoc99_sscanf);
 # else
 extern int __isoc99_fscanf (FILE *__restrict __stream,
                            __const char *__restrict __format, ...) __wur;
@@ -481,11 +481,11 @@ extern int __REDIRECT (vfscanf,
 extern int __REDIRECT (vscanf, (__const char *__restrict __format,
                                _G_va_list __arg), __isoc99_vscanf)
      __attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
-extern int __REDIRECT (vsscanf,
-                      (__const char *__restrict __s,
-                       __const char *__restrict __format, _G_va_list __arg),
-                      __isoc99_vsscanf)
-     __THROW __attribute__ ((__format__ (__scanf__, 2, 0)));
+extern int __REDIRECT_NTH (vsscanf,
+                          (__const char *__restrict __s,
+                           __const char *__restrict __format,
+                           _G_va_list __arg), __isoc99_vsscanf)
+     __attribute__ ((__format__ (__scanf__, 2, 0)));
 #  else
 extern int __isoc99_vfscanf (FILE *__restrict __s,
                             __const char *__restrict __format,
index ff0251dec0bb3dbd884d589c87449251a30bc15f..6e2fa27180be0abed12fecb8bfaea55dbb64ba33 100644 (file)
@@ -1,5 +1,5 @@
 /* Declarations for getopt.
-   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009
+   Copyright (C) 1989-1994,1996-1999,2001,2003,2004,2009,2010
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -158,9 +158,9 @@ extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
    additional functionality can be disable at runtime.  This redirection
    helps to also do this at runtime.  */
 #  ifdef __REDIRECT
-  extern int __REDIRECT (getopt, (int ___argc, char *const *___argv,
-                                 const char *__shortopts),
-                        __posix_getopt) __THROW;
+  extern int __REDIRECT_NTH (getopt, (int ___argc, char *const *___argv,
+                                     const char *__shortopts),
+                            __posix_getopt);
 #  else
 extern int __posix_getopt (int ___argc, char *const *___argv,
                           const char *__shortopts) __THROW;
index 7a659116c3ad5e6023926fdb394b86d0a624ad6c..eb5b2448999b6679524d6459e9d70e35ff0c91c5 100644 (file)
@@ -658,10 +658,10 @@ extern int __REDIRECT (fwscanf, (__FILE *__restrict __stream,
 extern int __REDIRECT (wscanf, (__const wchar_t *__restrict __format, ...),
                       __isoc99_wscanf)
      /* __attribute__ ((__format__ (__wscanf__, 1, 2))) */;
-extern int __REDIRECT (swscanf, (__const wchar_t *__restrict __s,
-                                __const wchar_t *__restrict __format, ...),
-                      __isoc99_swscanf)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
+extern int __REDIRECT_NTH (swscanf, (__const wchar_t *__restrict __s,
+                                    __const wchar_t *__restrict __format,
+                                    ...), __isoc99_swscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 3))) */;
 #  else
 extern int __isoc99_fwscanf (__FILE *__restrict __stream,
                             __const wchar_t *__restrict __format, ...);
@@ -712,10 +712,10 @@ extern int __REDIRECT (vfwscanf, (__FILE *__restrict __s,
 extern int __REDIRECT (vwscanf, (__const wchar_t *__restrict __format,
                                 __gnuc_va_list __arg), __isoc99_vwscanf)
      /* __attribute__ ((__format__ (__wscanf__, 1, 0))) */;
-extern int __REDIRECT (vswscanf, (__const wchar_t *__restrict __s,
-                                 __const wchar_t *__restrict __format,
-                                 __gnuc_va_list __arg), __isoc99_vswscanf)
-     __THROW /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
+extern int __REDIRECT_NTH (vswscanf, (__const wchar_t *__restrict __s,
+                                     __const wchar_t *__restrict __format,
+                                     __gnuc_va_list __arg), __isoc99_vswscanf)
+     /* __attribute__ ((__format__ (__wscanf__, 2, 0))) */;
 #  else
 extern int __isoc99_vfwscanf (__FILE *__restrict __s,
                              __const wchar_t *__restrict __format,