[X2Go-Commits] [nx-libs] 09/14: In Types.h, don't use STL internals on libc++ (605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch).

git-admin at x2go.org git-admin at x2go.org
Fri Feb 13 13:59:13 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit ab8d1276f5c7ebef6f959cfb691cce5fff6867b4
Author: Clemens Lang <cal at macports.org>
Date:   Fri Feb 13 13:35:40 2015 +0100

    In Types.h, don't use STL internals on libc++ (605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch).
    
      The nx-libs-lite package does not compile on OS X Mavericks because
      Apple's clang compilers now default to compiling against the libc++ STL
      rather than (their outdated copy of) libstdc++.
    
      While the compiler still allows changing that, we should not rely on
      this being possible forever.
    
      The compiler chokes in Types.h, specifically the clear() methods in
      subclasses of vectors that use implementation details of the GNU STL.
      The attached patch fixes these compilation issues by not overriding the
      clear() method when compiling against libc++, since the libc++ headers
      seem to do essentially the same as the overriden method.
---
 ...ont-use-STL-internals-on-libc++.full+lite.patch |   52 --------------------
 debian/patches/series                              |    1 -
 nxcomp/Types.h                                     |    8 +++
 3 files changed, 8 insertions(+), 53 deletions(-)

diff --git a/debian/patches/605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch b/debian/patches/605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch
deleted file mode 100644
index 60f33ce..0000000
--- a/debian/patches/605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-Description: In Types.h, don't use STL internals on libc++.
-Author: Clemens Lang <cal at macports.org>
-Abstract:
- The nx-libs-lite package does not compile on OS X Mavericks because
- Apple's clang compilers now default to compiling against the libc++ STL
- rather than (their outdated copy of) libstdc++.
- .
- While the compiler still allows changing that, we should not rely on
- this being possible forever.
- .
- The compiler chokes in Types.h, specifically the clear() methods in
- subclasses of vectors that use implementation details of the GNU STL.
- The attached patch fixes these compilation issues by not overriding the
- clear() method when compiling against libc++, since the libc++ headers
- seem to do essentially the same as the overriden method.
---- a/nxcomp/Types.h	2013-11-05 01:35:22.000000000 +0100
-+++ b/nxcomp/Types.h	2013-11-05 01:37:30.000000000 +0100
-@@ -55,6 +55,9 @@
-     return &*(vector < unsigned char >::begin());
-   }
- 
-+  // Avoid overriding clear() when using libc++. Fiddling with STL internals
-+  // doesn't really seem like a good idea to me anyway.
-+  #ifndef _LIBCPP_VECTOR
-   void clear()
-   {
-     #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H)
-@@ -95,12 +98,16 @@
- 
-     #endif  /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-   }
-+  #endif /* #ifdef _LIBCPP_VECTOR */
- };
- 
- class T_messages : public vector < Message * >
- {
-   public:
- 
-+  // Avoid overriding clear() when using libc++. Fiddling with STL internals
-+  // doesn't really seem like a good idea to me anyway.
-+  #ifndef _LIBCPP_VECTOR
-   void clear()
-   {
-     #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H)
-@@ -141,6 +148,7 @@
- 
-     #endif /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */
-   }
-+  #endif /* #ifndef _LIBCPP_VECTOR */
- };
- 
- typedef md5_byte_t * T_checksum;
diff --git a/debian/patches/series b/debian/patches/series
index 1d0f53b..ee95c5b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
 #401_nxcomp_bigrequests-and-genericevent-extensions.full+lite.patch
-605_nxcomp_Types.h-dont-use-STL-internals-on-libc++.full+lite.patch
 606_nx-X11_build-on-aarch64.full.patch
 607_nxcomp_macosx-X11-launcher-in-private-tmp.full+lite.patch
 990_fix-DEBUG-and-TEST-builds.full.patch
diff --git a/nxcomp/Types.h b/nxcomp/Types.h
index 05f62bd..b3fe40e 100644
--- a/nxcomp/Types.h
+++ b/nxcomp/Types.h
@@ -55,6 +55,9 @@ class T_data : public vector < unsigned char >
     return &*(vector < unsigned char >::begin());
   }
 
+  // Avoid overriding clear() when using libc++. Fiddling with STL internals
+  // doesn't really seem like a good idea to me anyway.
+  #ifndef _LIBCPP_VECTOR
   void clear()
   {
     #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H)
@@ -95,12 +98,16 @@ class T_data : public vector < unsigned char >
 
     #endif  /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */
   }
+  #endif /* #ifdef _LIBCPP_VECTOR */
 };
 
 class T_messages : public vector < Message * >
 {
   public:
 
+  // Avoid overriding clear() when using libc++. Fiddling with STL internals
+  // doesn't really seem like a good idea to me anyway.
+  #ifndef _LIBCPP_VECTOR
   void clear()
   {
     #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H)
@@ -141,6 +148,7 @@ class T_messages : public vector < Message * >
 
     #endif /* #if defined(__STL_USE_STD_ALLOCATORS) || defined(__GLIBCPP_INTERNAL_VECTOR_H) */
   }
+  #endif /* #ifndef _LIBCPP_VECTOR */
 };
 
 typedef md5_byte_t * T_checksum;

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list