diff options
author | Mark Mitchell <mark@codesourcery.com> | 2005-01-04 00:17:16 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2005-01-04 00:17:16 +0000 |
commit | 8ca82e0965810836f314b8578d888875fa8fafe3 (patch) | |
tree | cda026dfac59121ecc60169068abdda560ef2f7c /libstdc++-v3 | |
parent | 85b7d88973b5032a985e459c781dfedf38de70ec (diff) | |
download | gcc-8ca82e0965810836f314b8578d888875fa8fafe3.zip gcc-8ca82e0965810836f314b8578d888875fa8fafe3.tar.gz gcc-8ca82e0965810836f314b8578d888875fa8fafe3.tar.bz2 |
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
Diffstat (limited to 'libstdc++-v3')
14 files changed, 45 insertions, 31 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index aee8b4f..453b1d0 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,22 @@ 2005-01-03 Mark Mitchell <mark@codesourcery.com> + * 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 1d25117..96033e5 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 57f6de9..d46184a 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 ec2d321..e62ed05 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 07f6529..79cd00a 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 <peturr02@ru.is> -// 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 a87bf8f..2e6f9ec 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 <peturr02@ru.is> -// 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 7c5aeab..775c72c 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 3bbff07..88ba371 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 <bkoz@redhat.com> -// 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 6094158..9650f7b 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 <peturr02@ru.is> -// 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 9530328..51f2de1 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 <peturr02@ru.is> -// 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 ee7aac6..f51b3de 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 <peturr02@ru.is> -// 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 f944ef2..c9e848a 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 <peturr02@ru.is> -// 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 e4cf7fd..fba2209 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 79495fb..1ce9c65 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_; |