From: Mark Mitchell Date: Tue, 4 Jan 2005 00:17:16 +0000 (+0000) Subject: testsuite_hooks.cc: Update coypright and follow style guidelines. X-Git-Tag: releases/gcc-4.0.0~1787 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ca82e0965810836f314b8578d888875fa8fafe3;p=thirdparty%2Fgcc.git testsuite_hooks.cc: Update coypright and follow style guidelines. * testsuite/testsuite_hooks.cc: Update coypright and follow style guidelines. * testsuite/testsuite_hooks.h: Likewise. * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use semaphores, not sleep. * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise. * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise. * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: Likewise. * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: Likewise. * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise. * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise. * testsuite/27_io/objects/char/7.cc: Likewise. * testsuite/27_io/objects/char/9661-1.cc: Likewise. * testsuite/27_io/objects/wchar_t/7.cc: Likewise. * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise. From-SVN: r92877 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index aee8b4f649e2..453b1d00ff45 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,22 @@ 2005-01-03 Mark Mitchell + * testsuite/testsuite_hooks.cc: Update coypright and follow style + guidelines. + * testsuite/testsuite_hooks.h: Likewise. + * testsuite/27_io/basic_filebuf/close/char/4879.cc: Use + semaphores, not sleep. + * testsuite/27_io/basic_filebuf/close/char/9964.cc: Likewise. + * testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc: Likewise. + * testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc: Likewise. + * testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc: + Likewise. + * testsuite/27_io/basic_filebuf/open/char/9507.cc: Likewise. + * testsuite/27_io/basic_filebuf/underflow/char/10097.cc: Likewise. + * testsuite/27_io/objects/char/7.cc: Likewise. + * testsuite/27_io/objects/char/9661-1.cc: Likewise. + * testsuite/27_io/objects/wchar_t/7.cc: Likewise. + * testsuite/27_io/objects/wchar_t/9661-1.cc: Likewise. + * configure.ac: Check for sys/ipc.h and sys/sem.h. * config.h.in: Regenerated. * configure: Likewise. diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc index 1d251174099a..96033e5a6583 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/4879.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc index 57f6de9c5ee6..d46184a705cf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/close/char/9964.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc index ec2d321bbf5d..e62ed05b5e07 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13171-2.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2003 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc index 07f6529de4aa..79cd00a15b2d 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/13582-2.cc @@ -1,6 +1,6 @@ // 2004-01-11 Petur Runolfsson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc index a87bf8ffd60f..2e6f9ec41494 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/wchar_t/14975-2.cc @@ -1,6 +1,6 @@ // 2004-04-16 Petur Runolfsson -// Copyright (C) 2004 Free Software Foundation, Inc. +// Copyright (C) 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc index 7c5aeab5d87e..775c72c1c6ab 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/open/char/9507.cc @@ -1,4 +1,4 @@ -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc index 3bbff078f8e9..88ba371d1d93 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/underflow/char/10097.cc @@ -1,6 +1,6 @@ // 2001-05-21 Benjamin Kosnik -// Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +// Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/objects/char/7.cc b/libstdc++-v3/testsuite/27_io/objects/char/7.cc index 609415882b6b..9650f7b26dfe 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/7.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/7.cc @@ -1,6 +1,6 @@ // 2003-04-26 Petur Runolfsson -// Copyright (C) 2003 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc index 9530328afc9a..51f2de1402d8 100644 --- a/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/char/9661-1.cc @@ -1,6 +1,6 @@ // 2003-04-30 Petur Runolfsson -// Copyright (C) 2003 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc index ee7aac6ec166..f51b3de8d574 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/7.cc @@ -1,6 +1,6 @@ // 2003-05-01 Petur Runolfsson -// Copyright (C) 2003 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc index f944ef2524aa..c9e848aaf61f 100644 --- a/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc +++ b/libstdc++-v3/testsuite/27_io/objects/wchar_t/9661-1.cc @@ -1,6 +1,6 @@ // 2003-04-30 Petur Runolfsson -// Copyright (C) 2003 Free Software Foundation, Inc. +// Copyright (C) 2003, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc index e4cf7fdd7a70..fba220968700 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.cc +++ b/libstdc++-v3/testsuite/testsuite_hooks.cc @@ -1,7 +1,7 @@ // -*- C++ -*- // Utility subroutines for the C++ library testsuite. // -// Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +// Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the @@ -278,8 +278,7 @@ namespace __gnu_test }; #endif - semaphore::semaphore () - { + semaphore::semaphore() { #ifdef _GLIBCXX_SYSV_SEM // Remeber the PID for the process that created the semaphore set // so that only one process will destroy the set. @@ -295,42 +294,40 @@ namespace __gnu_test #endif // Get a semaphore set with one semaphore. - sem_set_ = semget (IPC_PRIVATE, 1, SEM_R | SEM_A); + sem_set_ = semget(IPC_PRIVATE, 1, SEM_R | SEM_A); if (sem_set_ == -1) throw std::runtime_error ("could not obtain semaphore set"); // Initialize the semaphore. union semun val; val.val = 0; - if (semctl (sem_set_, 0, SETVAL, val) == -1) - throw std::runtime_error ("could not initialize semaphore"); + if (semctl(sem_set_, 0, SETVAL, val) == -1) + throw std::runtime_error("could not initialize semaphore"); #else // There are no semaphores on this system. We have no way to mark // a test as "unsupported" at runtime, so we just exit, pretending // that the test passed. - exit (0); + exit(0); #endif } - semaphore::~semaphore () - { + semaphore::~semaphore() { #ifdef _GLIBCXX_SYSV_SEM union semun val; // Destroy the semaphore set only in the process that created it. - if (pid_ == getpid ()) - semctl (sem_set_, 0, IPC_RMID, val); + if (pid_ == getpid()) + semctl(sem_set_, 0, IPC_RMID, val); #endif } void - semaphore::signal () - { + semaphore::signal() { #ifdef _GLIBCXX_SYSV_SEM struct sembuf op[1] = { { 0, 1, 0 } }; - if (semop (sem_set_, op, 1) == -1) - throw std::runtime_error ("could not signal semaphore"); + if (semop(sem_set_, op, 1) == -1) + throw std::runtime_error("could not signal semaphore"); #endif } @@ -340,8 +337,8 @@ namespace __gnu_test struct sembuf op[1] = { { 0, -1, SEM_UNDO } }; - if (semop (sem_set_, op, 1) == -1) - throw std::runtime_error ("could not wait for semaphore"); + if (semop(sem_set_, op, 1) == -1) + throw std::runtime_error("could not wait for semaphore"); #endif } }; // namespace __gnu_test diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h index 79495fbd357c..1ce9c65b0dfa 100644 --- a/libstdc++-v3/testsuite/testsuite_hooks.h +++ b/libstdc++-v3/testsuite/testsuite_hooks.h @@ -387,17 +387,17 @@ namespace __gnu_test public: // Creates a binary semaphore. The semaphore is initially in the // unsignaled state. - semaphore (); + semaphore(); // Destroy the semaphore. ~semaphore(); // Signal the semaphore. If there are processes blocked in // "wait", exactly one will be permitted to proceed. - void signal (); + void signal(); // Wait until the semaphore is signaled. - void wait (); + void wait(); private: int sem_set_;