summaryrefslogtreecommitdiff
path: root/devel/apr
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2014-11-25 14:55:46 +0000
committerjoerg <joerg@pkgsrc.org>2014-11-25 14:55:46 +0000
commite42307d7e8757379cadc99e30b80c5dcf5d5f41c (patch)
treea6b75c147de364be0855c45f2c0f1c23423a9b12 /devel/apr
parent8a3bee4426170ada929fd7b83161cbff979d5360 (diff)
downloadpkgsrc-e42307d7e8757379cadc99e30b80c5dcf5d5f41c.tar.gz
Unconditionally use the !ARM, !CRAY version of APR_OFFSET.
Diffstat (limited to 'devel/apr')
-rw-r--r--devel/apr/distinfo3
-rw-r--r--devel/apr/patches/patch-include_apr__general.h41
2 files changed, 43 insertions, 1 deletions
diff --git a/devel/apr/distinfo b/devel/apr/distinfo
index ad9ce34ec42..32a246f280c 100644
--- a/devel/apr/distinfo
+++ b/devel/apr/distinfo
@@ -1,5 +1,6 @@
-$NetBSD: distinfo,v 1.38 2014/04/23 06:56:04 tron Exp $
+$NetBSD: distinfo,v 1.39 2014/11/25 14:55:46 joerg Exp $
SHA1 (apr-1.5.1.tar.bz2) = f94e4e0b678282e0704e573b5b2fe6d48bd1c309
RMD160 (apr-1.5.1.tar.bz2) = 076d354e6699b8c14854359028d7fb74a34d80be
Size (apr-1.5.1.tar.bz2) = 817569 bytes
+SHA1 (patch-include_apr__general.h) = bff357eee11218a6c53769278fc3f9094b062fdf
diff --git a/devel/apr/patches/patch-include_apr__general.h b/devel/apr/patches/patch-include_apr__general.h
new file mode 100644
index 00000000000..0b60f5e3c3e
--- /dev/null
+++ b/devel/apr/patches/patch-include_apr__general.h
@@ -0,0 +1,41 @@
+$NetBSD: patch-include_apr__general.h,v 1.1 2014/11/25 14:55:46 joerg Exp $
+
+--- include/apr_general.h.orig 2014-11-21 11:49:41.000000000 +0000
++++ include/apr_general.h
+@@ -67,36 +67,9 @@ extern "C" {
+ /** signal numbers typedef */
+ typedef int apr_signum_t;
+
+-/**
+- * Finding offsets of elements within structures.
+- * Taken from the X code... they've sweated portability of this stuff
+- * so we don't have to. Sigh...
+- * @param p_type pointer type name
+- * @param field data field within the structure pointed to
+- * @return offset
+- */
+-
+-#if defined(CRAY) || (defined(__arm) && !(defined(LINUX) || defined(__FreeBSD__)))
+-#ifdef __STDC__
+-#define APR_OFFSET(p_type,field) _Offsetof(p_type,field)
+-#else
+-#ifdef CRAY2
+-#define APR_OFFSET(p_type,field) \
+- (sizeof(int)*((unsigned int)&(((p_type)NULL)->field)))
+-
+-#else /* !CRAY2 */
+-
+-#define APR_OFFSET(p_type,field) ((unsigned int)&(((p_type)NULL)->field))
+-
+-#endif /* !CRAY2 */
+-#endif /* __STDC__ */
+-#else /* ! (CRAY || __arm) */
+-
+ #define APR_OFFSET(p_type,field) \
+ ((long) (((char *) (&(((p_type)NULL)->field))) - ((char *) NULL)))
+
+-#endif /* !CRAY */
+-
+ /**
+ * Finding offsets of elements within structures.
+ * @param s_type structure type name