From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18906 invoked by alias); 7 Jun 2010 12:08:15 -0000 Received: (qmail 18889 invoked by uid 22791); 7 Jun 2010 12:08:13 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,TW_FW,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sunsite.ms.mff.cuni.cz (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Jun 2010 12:08:01 +0000 Received: from sunsite.mff.cuni.cz (localhost [127.0.0.1]) by sunsite.mff.cuni.cz (8.14.3/8.14.3) with ESMTP id o57C7hh8004943; Mon, 7 Jun 2010 14:07:43 +0200 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.14.3/8.14.3/Submit) id o57C7hhb004941; Mon, 7 Jun 2010 14:07:43 +0200 Date: Mon, 07 Jun 2010 12:08:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Fix a couple of __REDIRECT () __THROW occurrences Message-ID: <20100607120742.GG26878@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) Mailing-List: contact libc-hacker-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00002.txt.bz2 Hi! This patch fixes some cases which fail to parse with C++. 2010-06-07 Jakub Jelinek * 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. --- libc/libio/stdio.h.jj 2010-01-12 11:36:06.000000000 +0100 +++ libc/libio/stdio.h 2010-06-07 13:52:48.000000000 +0200 @@ -447,9 +447,9 @@ extern int __REDIRECT (fscanf, (FILE *__ __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; @@ -501,11 +501,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, --- libc/wcsmbs/wchar.h.jj 2010-05-03 20:18:36.000000000 +0200 +++ libc/wcsmbs/wchar.h 2010-06-07 14:02:36.000000000 +0200 @@ -658,10 +658,10 @@ extern int __REDIRECT (fwscanf, (__FILE 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 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, --- libc/posix/getopt.h.jj 2009-05-16 19:23:37.000000000 +0200 +++ libc/posix/getopt.h 2010-06-07 13:51:31.000000000 +0200 @@ -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 *co 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; Jakub