You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2015/07/17 06:14:32 UTC

[1/2] couchdb-b64url git commit: Support Windows build target

Repository: couchdb-b64url
Updated Branches:
  refs/heads/master 30a50f268 -> 4ee0dcc0b


Support Windows build target


Project: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/commit/3df89ea8
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/tree/3df89ea8
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/diff/3df89ea8

Branch: refs/heads/master
Commit: 3df89ea8c474d0adda833422c1c72fbea9fa98b9
Parents: 30a50f2
Author: Joan Touzet <wo...@apache.org>
Authored: Sat Jul 11 19:24:23 2015 -0400
Committer: Joan Touzet <wo...@apache.org>
Committed: Fri Jul 17 00:13:45 2015 -0400

----------------------------------------------------------------------
 .gitignore     |  4 +++-
 c_src/b64url.c | 24 +++++++++++++++---------
 rebar.config   |  4 +++-
 3 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-b64url/blob/3df89ea8/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index d1356fa..24f9e66 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,6 @@
 .eunit/
 c_src/*.o
 ebin/
-priv/*.so
+priv/
+.rebar/
+vc110.pdb

http://git-wip-us.apache.org/repos/asf/couchdb-b64url/blob/3df89ea8/c_src/b64url.c
----------------------------------------------------------------------
diff --git a/c_src/b64url.c b/c_src/b64url.c
index 074d9a0..d9e2e04 100644
--- a/c_src/b64url.c
+++ b/c_src/b64url.c
@@ -15,6 +15,12 @@
 
 #include "erl_nif.h"
 
+#ifdef _WIN32
+#define INLINE __inline
+#else
+#define INLINE inline
+#endif
+
 
 typedef ERL_NIF_TERM ENTERM;
 
@@ -93,7 +99,7 @@ const unsigned char B64URL_A2B[256] = {
 
 #define BYTES_PER_PERCENT 64
 
-static inline int
+static INLINE int
 do_consume_timeslice(ErlNifEnv* env) {
 #if(ERL_NIF_MAJOR_VERSION >= 2 && ERL_NIF_MINOR_VERSION >= 4)
     return enif_consume_timeslice(env, 1);
@@ -103,7 +109,7 @@ do_consume_timeslice(ErlNifEnv* env) {
 }
 
 
-static inline ENTERM
+static INLINE ENTERM
 make_atom(ErlNifEnv* env, const char* name)
 {
     ENTERM ret;
@@ -114,21 +120,21 @@ make_atom(ErlNifEnv* env, const char* name)
 }
 
 
-static inline ENTERM
+static INLINE ENTERM
 make_ok(ErlNifEnv* env, b64url_priv* priv, ENTERM value)
 {
     return enif_make_tuple2(env, priv->atom_ok, value);
 }
 
 
-static inline ENTERM
+static INLINE ENTERM
 make_error(ErlNifEnv* env, b64url_priv* priv, ENTERM value)
 {
     return enif_make_tuple2(env, priv->atom_error, value);
 }
 
 
-static inline ENTERM
+static INLINE ENTERM
 make_bad_block(ErlNifEnv* env, b64url_priv* priv, size_t pos)
 {
     ENTERM pterm = enif_make_uint64(env, pos);
@@ -136,14 +142,14 @@ make_bad_block(ErlNifEnv* env, b64url_priv* priv, size_t pos)
 }
 
 
-static inline ENTERM
+static INLINE ENTERM
 make_partial(ErlNifEnv* env, b64url_priv* priv, ENTERM value)
 {
     return enif_make_tuple2(env, priv->atom_partial, value);
 }
 
 
-static inline int
+static INLINE int
 check_pid(ErlNifEnv* env, b64url_st* st)
 {
     ErlNifPid self_pid;
@@ -304,7 +310,7 @@ unload(ErlNifEnv* env, void* priv)
 }
 
 
-static inline b64url_status
+static INLINE b64url_status
 b64url_encode(ErlNifEnv* env, ErlNifBinary* src, b64url_st* st)
 {
     size_t chunk_start = st->si;
@@ -442,7 +448,7 @@ b64url_encode_cont(ErlNifEnv* env, int argc, const ENTERM argv[])
 }
 
 
-static inline b64url_status
+static INLINE b64url_status
 b64url_decode(ErlNifEnv* env, ErlNifBinary* src, b64url_st* st, ENTERM* ret)
 {
     b64url_priv* priv = (b64url_priv*) enif_priv_data(env);

http://git-wip-us.apache.org/repos/asf/couchdb-b64url/blob/3df89ea8/rebar.config
----------------------------------------------------------------------
diff --git a/rebar.config b/rebar.config
index 534c049..4732af8 100644
--- a/rebar.config
+++ b/rebar.config
@@ -9,5 +9,7 @@
     % {".*", "CFLAGS", "$CFLAGS -g -Wall -Werror -fPIC"}
 
     % Production compilation
-    {".*", "CFLAGS", "$CFLAGS -Wall -Werror -DNDEBUG -O3"}
+    {"(linux|solaris|darwin|freebsd)", "CFLAGS", "$CFLAGS -Wall -Werror -DNDEBUG -O3"},
+    {"win32", "CFLAGS", "$CFLAGS /O2 /DNDEBUG /Wall"}
+
 ]}.


[2/2] couchdb-b64url git commit: Merge branch 'windows_support'

Posted by wo...@apache.org.
Merge branch 'windows_support'


Project: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/commit/4ee0dcc0
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/tree/4ee0dcc0
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-b64url/diff/4ee0dcc0

Branch: refs/heads/master
Commit: 4ee0dcc0bc68dddbd6394f133f64fc57be2d2ad4
Parents: 30a50f2 3df89ea
Author: Joan Touzet <wo...@apache.org>
Authored: Fri Jul 17 00:14:14 2015 -0400
Committer: Joan Touzet <wo...@apache.org>
Committed: Fri Jul 17 00:14:14 2015 -0400

----------------------------------------------------------------------
 .gitignore     |  4 +++-
 c_src/b64url.c | 24 +++++++++++++++---------
 rebar.config   |  4 +++-
 3 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------