You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by kx...@apache.org on 2014/11/20 19:27:28 UTC

[3/4] snappy commit: updated refs/heads/master to 0910e27

Drop support of R13


Project: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/commit/1630a4b6
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/tree/1630a4b6
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-snappy/diff/1630a4b6

Branch: refs/heads/master
Commit: 1630a4b6eccb98f2508041b547872822196b7d47
Parents: 923e557
Author: Alexander Shorin <kx...@apache.org>
Authored: Thu Nov 20 02:57:45 2014 +0300
Committer: Alexander Shorin <kx...@apache.org>
Committed: Thu Nov 20 03:03:17 2014 +0300

----------------------------------------------------------------------
 c_src/erl_nif_compat.h | 62 ---------------------------------------------
 c_src/snappy_nif.cc    |  4 ---
 rebar.config           |  2 +-
 3 files changed, 1 insertion(+), 67 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-snappy/blob/1630a4b6/c_src/erl_nif_compat.h
----------------------------------------------------------------------
diff --git a/c_src/erl_nif_compat.h b/c_src/erl_nif_compat.h
index b8eb9b0..0fc5528 100644
--- a/c_src/erl_nif_compat.h
+++ b/c_src/erl_nif_compat.h
@@ -27,66 +27,6 @@ extern "C" {
 #include "erl_nif.h"
 
 
-#if ERL_NIF_MAJOR_VERSION == 0 && ERL_NIF_MINOR_VERSION == 1
-#define OTP_R13B03
-#elif ERL_NIF_MAJOR_VERSION == 1 && ERL_NIF_MINOR_VERSION == 0
-#define OTP_R13B04
-#elif ERL_NIF_MAJOR_VERSION == 2 && ERL_NIF_MINOR_VERSION == 0
-#define OTP_R14A
-#define OTP_R14B
-#define OTP_R14B01
-#elif ERL_NIF_MAJOR_VERSION == 2 && ERL_NIF_MINOR_VERSION == 1
-#define OTP_R14B02
-#endif
-
-
-#ifdef OTP_R13B03
-
-#define enif_open_resource_type_compat enif_open_resource_type
-#define enif_alloc_resource_compat enif_alloc_resource
-#define enif_release_resource_compat enif_release_resource
-#define enif_alloc_binary_compat enif_alloc_binary
-#define enif_alloc_compat enif_alloc
-#define enif_release_binary_compat enif_release_binary
-#define enif_free_compat enif_free
-#define enif_get_atom_compat enif_get_atom
-#define enif_priv_data_compat enif_get_data
-#define enif_make_uint_compat enif_make_ulong
-
-#define enif_make_existing_atom_compat(E, N, R, Enc) \
-    enif_make_existing_atom(E, N, R)
-
-#define enif_make_string_compat(E, B, Enc) \
-    enif_make_string(E, B)
-
-#endif /* R13B03 */
-
-
-#ifdef OTP_R13B04
-
-#define enif_open_resource_type_compat enif_open_resource_type
-#define enif_alloc_resource_compat enif_alloc_resource
-#define enif_release_resource_compat enif_release_resource
-#define enif_alloc_binary_compat enif_alloc_binary
-#define enif_realloc_binary_compat enif_realloc_binary
-#define enif_release_binary_compat enif_release_binary
-#define enif_alloc_compat enif_alloc
-#define enif_free_compat enif_free
-#define enif_get_atom_compat enif_get_atom
-#define enif_priv_data_compat enif_priv_data
-#define enif_make_string_compat enif_make_string
-#define enif_make_uint_compat enif_make_uint
-
-#define enif_make_existing_atom_compat(E, N, R, Enc) \
-    enif_make_existing_atom(E, N, R)
-
-
-#endif /* R13B04 */
-
-
-/* OTP R14A and future releases */
-#if !defined(OTP_R13B03) && !defined(OTP_R13B04)
-
 #define enif_open_resource_type_compat(E, N, D, F, T) \
     enif_open_resource_type(E, NULL, N, D, F, T)
 
@@ -119,8 +59,6 @@ extern "C" {
 #define enif_make_existing_atom_compat enif_make_existing_atom
 #define enif_make_uint_compat enif_make_uint
 
-#endif  /* R14 and future releases */
-
 
 #ifdef __cplusplus
 }

http://git-wip-us.apache.org/repos/asf/couchdb-snappy/blob/1630a4b6/c_src/snappy_nif.cc
----------------------------------------------------------------------
diff --git a/c_src/snappy_nif.cc b/c_src/snappy_nif.cc
index 93c1859..97e283c 100644
--- a/c_src/snappy_nif.cc
+++ b/c_src/snappy_nif.cc
@@ -22,10 +22,6 @@
 #include "snappy/snappy.h"
 #include "snappy/snappy-sinksource.h"
 
-#ifdef OTP_R13B03
-#error OTP R13B03 not supported. Upgrade to R13B04 or later.
-#endif
-
 #ifdef __cplusplus
 #define BEGIN_C extern "C" {
 #define END_C }

http://git-wip-us.apache.org/repos/asf/couchdb-snappy/blob/1630a4b6/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 36625af..8b21c8c 100644
--- a/rebar.config
+++ b/rebar.config
@@ -1,4 +1,4 @@
-{require_otp_vsn, "R13B04|R14|R15|R16|17"}.
+{require_otp_vsn, "R14|R15|R16|17"}.
 
 {erl_opts, [debug_info, warn_unused_vars, warn_shadow_vars, warn_unused_import]}.
 {port_sources, ["c_src/*.cc",