Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Fix COUCHDB-1197 - NIFs, .dll fixes for Windows
Browse files Browse the repository at this point in the history
Many thanks, Dave Cottlehuber.

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@1147001 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
tilgovi committed Jul 15, 2011
1 parent 3e72b96 commit b035c22
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ suggesting improvements or submitting changes. Some of these people are:
* Caolan McMahon <caolan.mcmahon@googlemail.com>
* Andrey Somov <trophybase@gmail.com>
* Chris Coulson <chrisccoulson.googlemail.com>
* Dave Cottlehuber <dave@muse.net.nz>


For a list of authors see the `AUTHORS` file.
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ AC_ENABLE_SHARED
AC_DISABLE_STATIC

AC_PROG_CC
LT_INIT([win32-dll])
AC_PROG_LIBTOOL
AC_PROG_LN_S

Expand Down
9 changes: 6 additions & 3 deletions src/ejson/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,16 @@ ejson_la_LDFLAGS = -module -avoid-version

if WINDOWS
ejson_la_LDFLAGS += -no-undefined
EJSON_SO_NAME = ejson.dll
else
EJSON_SO_NAME = ejson.so
endif

priv/ejson.so: ejson.la
priv/$(EJSON_SO_NAME): ejson.la
@mkdir -p ./priv
cp .libs/ejson.so $@
cp .libs/$(EJSON_SO_NAME) $@

all: priv/ejson.so
all: priv/$(EJSON_SO_NAME)
endif

%.app: %.app.in
Expand Down
2 changes: 1 addition & 1 deletion src/ejson/yajl/yajl_gen.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ yajl_gen_integer(yajl_gen g, long int number)
return yajl_gen_status_ok;
}

#ifdef WIN32
#if defined(_WIN32) || defined(WIN32) || defined(__WIN32__)
#include <float.h>
#define isnan _isnan
#define isinf !_finite
Expand Down
10 changes: 7 additions & 3 deletions src/snappy/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,17 @@ snappy_nif_la_LDFLAGS = -module -avoid-version

if WINDOWS
snappy_nif_la_LDFLAGS += -no-undefined
snappy_nif_la_CXXFLAGS += -EHsc
SNAPPY_SO_NAME = snappy_nif.dll
else
SNAPPY_SO_NAME = snappy_nif.so
endif

priv/snappy_nif.so: snappy_nif.la
priv/$(SNAPPY_SO_NAME): snappy_nif.la
@mkdir -p ./priv
cp .libs/snappy_nif.so $@
cp .libs/$(SNAPPY_SO_NAME) $@

all: priv/snappy_nif.so
all: priv/$(SNAPPY_SO_NAME)
endif

%.app: %.app.in
Expand Down

0 comments on commit b035c22

Please sign in to comment.