public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Pinski <pinskia@physics.uc.edu>
To: "gcc-patches@gcc.gnu.org Patches" <gcc-patches@gcc.gnu.org>
Cc: libstdc++@gcc.gnu.org
Subject: [PATCH] Fix some of the mt_allocator testcases on darwin
Date: Sat, 23 Oct 2004 16:29:00 -0000	[thread overview]
Message-ID: <C9BCD792-2509-11D9-8879-000A95D692F4@physics.uc.edu> (raw)

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]

The problem is that the testcases use *_t as typedef which is reserved 
by
POSIX and one of them conflicts with Darwin's headers, policy_t.  I 
changed
all the *_t to be named *_type which is consistent with other libstdc++
tests and other mt_allocator tests.

OK?

Thanks,
Andrew Pinski

ChangeLog:

	* testsuite/ext/mt_allocator/deallocate_global-2.c:
	s/value_t/value_type/. s/traits_t/traits_type/.
	s/policy_t/policy_type/. s/allocator_t/allocator_type/.
	s/string_t/string_type/. s/list_t/list_type/.
	* testsuite/ext/mt_allocator/deallocate_global-4.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global_thread-1.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_global_thread-3.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-2.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local-4.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-1.cc: Likewise.
	* testsuite/ext/mt_allocator/deallocate_local_thread-3.cc: Likewise.
	


[-- Attachment #2: temp.diff.txt --]
[-- Type: text/plain, Size: 9159 bytes --]

? temp.diff.txt
Index: ext/mt_allocator/deallocate_global-2.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-2.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global-2.cc
--- ext/mt_allocator/deallocate_global-2.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global-2.cc	23 Oct 2004 15:32:39 -0000
@@ -66,14 +66,14 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef std::string value_t;
-typedef __gnu_cxx::__common_pool_policy<false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef std::string value_type;
+typedef __gnu_cxx::__common_pool_policy<false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::char_traits<value_type> traits_type;
+typedef std::list<value_type, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_global-4.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global-4.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global-4.cc
--- ext/mt_allocator/deallocate_global-4.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global-4.cc	23 Oct 2004 15:32:39 -0000
@@ -67,13 +67,13 @@ void operator delete(void* p) throw()
 }
 
 typedef std::string value_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef __gnu_cxx::__per_type_pool_policy<value_t, false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_t, policy_type> allocator_type;
+typedef std::char_traits<value_t> traits_type;
+typedef std::list<value_t, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_global_thread-1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-1.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global_thread-1.cc
--- ext/mt_allocator/deallocate_global_thread-1.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global_thread-1.cc	23 Oct 2004 15:32:39 -0000
@@ -66,14 +66,14 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef std::string value_t;
-typedef __gnu_cxx::__common_pool_policy<true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef std::string value_type;
+typedef __gnu_cxx::__common_pool_policy<true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::char_traits<value_type> traits_type;
+typedef std::list<value_type, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_global_thread-3.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_global_thread-3.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_global_thread-3.cc
--- ext/mt_allocator/deallocate_global_thread-3.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_global_thread-3.cc	23 Oct 2004 15:32:39 -0000
@@ -66,14 +66,14 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef std::string value_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::char_traits<value_t> traits_t;
-typedef std::list<value_t, allocator_t> list_t;
+typedef std::string value_type;
+typedef __gnu_cxx::__per_type_pool_policy<value_type, true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::char_traits<value_type> traits_type;
+typedef std::list<value_type, allocator_type> list_type;
 
 // Second.
-list_t l;
+list_type l;
 
 int main()
 {
Index: ext/mt_allocator/deallocate_local-2.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-2.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local-2.cc
--- ext/mt_allocator/deallocate_local-2.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local-2.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__common_pool_policy<false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__common_pool_policy<false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;
Index: ext/mt_allocator/deallocate_local-4.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local-4.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local-4.cc
--- ext/mt_allocator/deallocate_local-4.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local-4.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, false> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__per_type_pool_policy<value_type, false> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;
Index: ext/mt_allocator/deallocate_local_thread-1.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-1.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local_thread-1.cc
--- ext/mt_allocator/deallocate_local_thread-1.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local_thread-1.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__common_pool_policy<true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__common_pool_policy<true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;
Index: ext/mt_allocator/deallocate_local_thread-3.cc
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/testsuite/ext/mt_allocator/deallocate_local_thread-3.cc,v
retrieving revision 1.3
diff -u -p -r1.3 deallocate_local_thread-3.cc
--- ext/mt_allocator/deallocate_local_thread-3.cc	12 Oct 2004 01:10:39 -0000	1.3
+++ ext/mt_allocator/deallocate_local_thread-3.cc	23 Oct 2004 15:32:39 -0000
@@ -64,17 +64,17 @@ void operator delete(void* p) throw()
   free(p);
 }
 
-typedef char value_t;
-typedef std::char_traits<value_t> traits_t;
-typedef __gnu_cxx::__per_type_pool_policy<value_t, true> policy_t;
-typedef __gnu_cxx::__mt_alloc<value_t, policy_t> allocator_t;
-typedef std::basic_string<value_t, traits_t, allocator_t> string_t;
+typedef char value_type;
+typedef std::char_traits<value_type> traits_type;
+typedef __gnu_cxx::__per_type_pool_policy<value_type, true> policy_type;
+typedef __gnu_cxx::__mt_alloc<value_type, policy_type> allocator_type;
+typedef std::basic_string<value_type, traits_type, allocator_type> string_type;
 
 int main()
 {
   bool test __attribute__((unused)) = true;
   {
-    string_t s;
+    string_type s;
     s += "bayou bend";
   }
   return 0;

             reply	other threads:[~2004-10-23 15:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-23 16:29 Andrew Pinski [this message]
2004-10-23 19:04 ` Dale Johannesen
2004-10-23 19:17   ` Zack Weinberg
2004-10-23 19:58 ` Benjamin Kosnik
2004-10-25  8:34 ` Phil Edwards

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=C9BCD792-2509-11D9-8879-000A95D692F4@physics.uc.edu \
    --to=pinskia@physics.uc.edu \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).