]> sourceware.org Git - libabigail.git/commitdiff
make abipkgdiff compile with GCC 4.4.7
authorDodji Seketeli <dodji@redhat.com>
Fri, 21 Aug 2015 11:08:38 +0000 (13:08 +0200)
committerDodji Seketeli <dodji@redhat.com>
Fri, 21 Aug 2015 11:08:38 +0000 (13:08 +0200)
GCC 4.4.7 won't let us declare an instance of string with __thread.
So for now, package::extracted_packages_parent_dir() juststores its string
globally.  We are single-threaded for now anyway.

* tools/abipkgdiff.cc (package::extracted_packages_parent_dir):
The string holding the dir name is no more __thread, as this won't
compile with GCC 4.4.7

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
tools/abipkgdiff.cc

index 0e7c55c654aa65688f7bf10529d9c9a8c297ae2c..7adb0a1d53e8ab8376621e88907b694610e6eb70 100644 (file)
@@ -330,7 +330,12 @@ public:
 const string&
 package::extracted_packages_parent_dir()
 {
-  static __thread string p;
+  // I tried to declare this in thread-local storage, but GCC 4.4.7
+  //won't let me.  So for now, I am just making it static.  I'll deal
+  //with this later when time of multi-threading comes.
+
+  //static __thread string p;
+  static string p;
 
   if (p.empty())
     {
This page took 0.065401 seconds and 5 git commands to generate.