Date: Wed, 24 Jul 2013 21:35:51 +0000 (UTC) From: Matthias Andree <mandree@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323621 - in head/databases: db5 db5/files db6 db6/files Message-ID: <201307242135.r6OLZpFo030131@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mandree Date: Wed Jul 24 21:35:51 2013 New Revision: 323621 URL: http://svnweb.freebsd.org/changeset/ports/323621 Log: Fix C++11 compatibility by renaming atomic_init(). Modified version of dim's patch, where most of the stuff moves into a REINPLACE_CMD called from post-patch. Submitted by: dim Added: head/databases/db6/files/ head/databases/db6/files/patch-src_dbinc_atomic.h (contents, props changed) Modified: head/databases/db5/Makefile head/databases/db5/files/patch-src_dbinc_atomic.h (contents, props changed) head/databases/db6/Makefile Modified: head/databases/db5/Makefile ============================================================================== --- head/databases/db5/Makefile Wed Jul 24 21:04:41 2013 (r323620) +++ head/databases/db5/Makefile Wed Jul 24 21:35:51 2013 (r323621) @@ -81,6 +81,7 @@ CONFIGURE_ARGS+= --enable-debug --enable post-patch: ${REINPLACE_CMD} -e '/^DOCLIST/{s/csharp//;}' ${WRKSRC}/../dist/Makefile.in + ${REINPLACE_CMD} -Ee 's/[[:<:]]atomic_init[[:>:]]/db_atomic_init/g' ${WRKSRC}/../src/mp/mp* ${WRKSRC}/../src/mutex/mut_* post-install: .for i in libdb libdb_cxx libdb_stl ${libdb_sql} ${libdb_java} Modified: head/databases/db5/files/patch-src_dbinc_atomic.h ============================================================================== --- head/databases/db5/files/patch-src_dbinc_atomic.h Wed Jul 24 21:04:41 2013 (r323620) +++ head/databases/db5/files/patch-src_dbinc_atomic.h Wed Jul 24 21:35:51 2013 (r323621) @@ -1,5 +1,14 @@ --- ../src/dbinc/atomic.h.orig 2012-02-29 19:48:38.000000000 +0100 +++ ../src/dbinc/atomic.h 2012-05-04 22:39:32.000000000 +0200 +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define db_atomic_init(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + @@ -144,7 +144,7 @@ typedef LONG volatile *interlocked_val; #define atomic_inc(env, p) __atomic_inc(p) #define atomic_dec(env, p) __atomic_dec(p) @@ -18,3 +27,12 @@ db_atomic_t *p, atomic_value_t oldval, atomic_value_t newval) { atomic_value_t was; +@@ -206,7 +206,7 @@ static inline int __atomic_compare_excha + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ db_atomic_init(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p) Modified: head/databases/db6/Makefile ============================================================================== --- head/databases/db6/Makefile Wed Jul 24 21:04:41 2013 (r323620) +++ head/databases/db6/Makefile Wed Jul 24 21:35:51 2013 (r323621) @@ -84,6 +84,7 @@ CONFIGURE_ARGS+= --enable-debug --enable post-patch: ${REINPLACE_CMD} -e '/^DOCLIST/{s/csharp//;}' ${WRKSRC}/../dist/Makefile.in + ${REINPLACE_CMD} -Ee 's/[[:<:]]atomic_init[[:>:]]/db_atomic_init/g' ${WRKSRC}/../src/mp/mp* ${WRKSRC}/../src/mutex/mut_* post-install: .for i in libdb libdb_cxx libdb_stl ${libdb_sql} ${libdb_java} Added: head/databases/db6/files/patch-src_dbinc_atomic.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/db6/files/patch-src_dbinc_atomic.h Wed Jul 24 21:35:51 2013 (r323621) @@ -0,0 +1,20 @@ +--- ../src/dbinc/atomic.h.orig 2012-02-29 19:48:38.000000000 +0100 ++++ ../src/dbinc/atomic.h 2012-05-04 22:39:32.000000000 +0200 +@@ -70,7 +70,7 @@ typedef struct { + * These have no memory barriers; the caller must include them when necessary. + */ + #define atomic_read(p) ((p)->value) +-#define atomic_init(p, val) ((p)->value = (val)) ++#define db_atomic_init(p, val) ((p)->value = (val)) + + #ifdef HAVE_ATOMIC_SUPPORT + +@@ -206,7 +206,7 @@ static inline int __atomic_compare_excha + #define atomic_dec(env, p) (--(p)->value) + #define atomic_compare_exchange(env, p, oldval, newval) \ + (DB_ASSERT(env, atomic_read(p) == (oldval)), \ +- atomic_init(p, (newval)), 1) ++ db_atomic_init(p, (newval)), 1) + #else + #define atomic_inc(env, p) __atomic_inc(env, p) + #define atomic_dec(env, p) __atomic_dec(env, p)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307242135.r6OLZpFo030131>