re PR target/33700 (FAIL: 17_intro/headers/all_pedantic_errors.cc (test for excess errors))

PR target/33700
	* inclhack.def (hpux11_pthread_const): New.
	* fixincl.x: Regenerate.
	* tests/base/sys/pthread.h: Update.

From-SVN: r129304
This commit is contained in:
John David Anglin 2007-10-14 22:22:25 +00:00 committed by John David Anglin
parent 4b7ed13a8f
commit 6f8c175007
4 changed files with 80 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2007-10-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR target/33700
* inclhack.def (hpux11_pthread_const): New.
* fixincl.x: Regenerate.
* tests/base/sys/pthread.h: Update.
2007-10-12 Kai Tietz <kai.tietz@onevision.com>
* configure.ac: x86_64 mingw target uses twoprocess.

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Monday October 8, 2007 at 12:36:37 PM PDT
* It has been AutoGen-ed Sunday October 14, 2007 at 06:17:05 PM EDT
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT SVN-MERGE THIS FILE, EITHER Mon Oct 8 12:36:37 PDT 2007
/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Oct 14 18:17:05 EDT 2007
*
* You must regenerate it. Use the ./genfixes script.
*
@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work
* correctly with ANSI C and placed in a directory that GNU C will search.
*
* This file contains 209 fixup descriptions.
* This file contains 210 fixup descriptions.
*
* See README for more information.
*
@ -26,7 +26,8 @@
*
* You may redistribute it and/or modify it under the terms of the
* GNU General Public License, as published by the Free Software
* Foundation; either version 2, or (at your option) any later version.
* Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* inclhack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@ -34,10 +35,10 @@
* See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with inclhack. See the file "COPYING". If not,
* write to: The Free Software Foundation, Inc.,
* 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* along with inclhack. If not, write to:
* The Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301, USA.
*/
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@ -3417,6 +3418,43 @@ extern \"C\" {\n\
#endif",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux11_Pthread_Const fix
*/
tSCC zHpux11_Pthread_ConstName[] =
"hpux11_pthread_const";
/*
* File name selection pattern
*/
tSCC zHpux11_Pthread_ConstList[] =
"sys/pthread.h\0";
/*
* Machine/OS name selection pattern
*/
tSCC* apzHpux11_Pthread_ConstMachs[] = {
"*-hp-hpux11.[0-3]*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zHpux11_Pthread_ConstSelect0[] =
"^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
#define HPUX11_PTHREAD_CONST_TEST_CT 1
static tTestDesc aHpux11_Pthread_ConstTests[] = {
{ TT_EGREP, zHpux11_Pthread_ConstSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Hpux11_Pthread_Const
*/
static const char* apzHpux11_Pthread_ConstPatch[] = {
"format",
"#define __POINTER_SET\t\t((void *) 1L)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hpux_Pthread_Initializers fix
@ -8501,9 +8539,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 252
#define REGEX_COUNT 253
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 209
#define FIX_COUNT 210
/*
* Enumerate the fixes
@ -8589,6 +8627,7 @@ typedef enum {
HPUX11_EXTERN_SENDFILE_FIXIDX,
HPUX11_EXTERN_SENDPATH_FIXIDX,
HPUX_EXTERN_ERRNO_FIXIDX,
HPUX11_PTHREAD_CONST_FIXIDX,
HPUX_PTHREAD_INITIALIZERS_FIXIDX,
HUGE_VAL_HEX_FIXIDX,
HUGE_VALF_HEX_FIXIDX,
@ -9121,6 +9160,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
HPUX_EXTERN_ERRNO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux_Extern_ErrnoTests, apzHpux_Extern_ErrnoPatch, 0 },
{ zHpux11_Pthread_ConstName, zHpux11_Pthread_ConstList,
apzHpux11_Pthread_ConstMachs,
HPUX11_PTHREAD_CONST_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aHpux11_Pthread_ConstTests, apzHpux11_Pthread_ConstPatch, 0 },
{ zHpux_Pthread_InitializersName, zHpux_Pthread_InitializersList,
apzHpux_Pthread_InitializersMachs,
HPUX_PTHREAD_INITIALIZERS_TEST_CT, FD_MACH_ONLY,

View File

@ -1951,6 +1951,20 @@ fix = {
test_text = " extern int errno;\n";
};
/*
* Fix C99 constant in __POINTER_SET define.
*/
fix = {
hackname = hpux11_pthread_const;
mach = "*-hp-hpux11.[0-3]*";
files = sys/pthread.h;
select = "^#define[ \t]*__POINTER_SET[ \t]*\\(\\(void \\*\\) 1LL\\)";
c_fix = format;
c_fix_arg = "#define __POINTER_SET\t\t((void *) 1L)";
test_text = "#define __POINTER_SET\t\t((void *) 1LL)";
};
/*
* Add missing braces to pthread initializer defines.
*/

View File

@ -9,6 +9,11 @@
#if defined( HPUX11_PTHREAD_CONST_CHECK )
#define __POINTER_SET ((void *) 1L)
#endif /* HPUX11_PTHREAD_CONST_CHECK */
#if defined( HPUX_PTHREAD_INITIALIZERS_CHECK )
#define PTHREAD_MUTEX_INITIALIZER { \
{ __PTHREAD_MUTEX_VALID, 0 }, \