pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/squid3 Fix build with libc++.Fix build with libc++...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e0e35baac3fb
branches:  trunk
changeset: 621738:e0e35baac3fb
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Mon Jul 15 17:56:45 2013 +0000

description:
Fix build with libc++.Fix build with libc++.Fix build with libc++.Fix
build with libc++.Fix build with libc++.Fix build with libc++.Fix build
with libc++.Fix build with libc++.Fix build with libc++.

diffstat:

 www/squid3/distinfo                      |   4 ++-
 www/squid3/patches/patch-compat_unsafe.h |  21 ++++++++++++++++++
 www/squid3/patches/patch-include_Array.h |  37 ++++++++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 1 deletions(-)

diffs (85 lines):

diff -r ff89174edc2a -r e0e35baac3fb www/squid3/distinfo
--- a/www/squid3/distinfo       Mon Jul 15 15:15:17 2013 +0000
+++ b/www/squid3/distinfo       Mon Jul 15 17:56:45 2013 +0000
@@ -1,12 +1,14 @@
-$NetBSD: distinfo,v 1.11 2013/07/14 17:54:43 adam Exp $
+$NetBSD: distinfo,v 1.12 2013/07/15 17:56:45 joerg Exp $
 
 SHA1 (squid-3.3.8.tar.xz) = 39472c7f93e14fb55a65d1730d6594407b7de9f6
 RMD160 (squid-3.3.8.tar.xz) = 32636bd1f2803935bab983bbf08f9eae81980d35
 Size (squid-3.3.8.tar.xz) = 2182240 bytes
+SHA1 (patch-compat_unsafe.h) = 89e6741432357a0523a43ef410d81bffcb263f81
 SHA1 (patch-configure) = 86400fd701a84eb174395755eec7b13cbfce55ec
 SHA1 (patch-errors_Makefile.in) = afbac822ac84d5e1734d55fc625e949ae0b85289
 SHA1 (patch-helpers_basic_auth_MSNT_Makefile.in) = 74a0379d3ec0c2601dbb62b16df889bf4edcaedf
 SHA1 (patch-helpers_log_daemon_DB_config.test) = 2716abf507d8d9f8f31dc6a873afc0f224d1c00b
+SHA1 (patch-include_Array.h) = 5631c937affa41f94263034474951a0cfb409fe6
 SHA1 (patch-src_Makefile.in) = 130e223568a07c474b30a8fa3678c60f8b487c3e
 SHA1 (patch-src_base_TidyPointer.h) = 93428d26bb2479fc845764a324658eaacd26588e
 SHA1 (patch-src_ip_Intercept.cc) = 8a8640d5f7eef217b2536646513eb872c67a7ffc
diff -r ff89174edc2a -r e0e35baac3fb www/squid3/patches/patch-compat_unsafe.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/squid3/patches/patch-compat_unsafe.h  Mon Jul 15 17:56:45 2013 +0000
@@ -0,0 +1,21 @@
+$NetBSD: patch-compat_unsafe.h,v 1.1 2013/07/15 17:56:45 joerg Exp $
+
+Disable macros that break libc++'s cstdio.
+
+--- compat/unsafe.h.orig       2013-07-14 20:04:32.000000000 +0000
++++ compat/unsafe.h
+@@ -6,12 +6,14 @@
+  */
+ 
+ #if !SQUID_NO_STRING_BUFFER_PROTECT
++#if 0
+ #ifndef sprintf
+ #define sprintf ERROR_sprintf_UNSAFE_IN_SQUID
+ #endif
+ #ifndef strdup
+ #define strdup ERROR_strdup_UNSAFE_IN_SQUID
+ #endif
++#endif
+ #endif /* SQUID_NO_STRING_BUFFER_PROTECT */
+ 
+ #endif /* _SQUID_COMPAT_UNSAFE_H */
diff -r ff89174edc2a -r e0e35baac3fb www/squid3/patches/patch-include_Array.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/squid3/patches/patch-include_Array.h  Mon Jul 15 17:56:45 2013 +0000
@@ -0,0 +1,37 @@
+$NetBSD: patch-include_Array.h,v 1.1 2013/07/15 17:56:45 joerg Exp $
+
+Implement enough of the iterator contract to allow building with libc++.
+
+--- include/Array.h.orig       2013-07-14 20:39:37.000000000 +0000
++++ include/Array.h
+@@ -42,12 +42,19 @@
+ #include "compat/assert.h"
+ 
+ /* iterator support */
++#include <iterator>
+ 
+ template <class C>
+ class VectorIteratorBase
+ {
+ 
+ public:
++    typedef typename C::value_type value_type;
++    typedef std::forward_iterator_tag iterator_category;
++    typedef typename C::pointer pointer;
++    typedef typename C::reference reference;
++    typedef typename C::difference_type difference_type;
++
+     VectorIteratorBase();
+     VectorIteratorBase(C &);
+     VectorIteratorBase(size_t, C &);
+@@ -79,8 +86,10 @@ class Vector
+ public:
+     typedef E value_type;
+     typedef E* pointer;
++    typedef E& reference;
+     typedef VectorIteratorBase<Vector<E> > iterator;
+     typedef VectorIteratorBase<Vector<E> const> const_iterator;
++    typedef ptrdiff_t difference_type;
+ 
+     void *operator new (size_t);
+     void operator delete (void *);



Home | Main Index | Thread Index | Old Index