diff --git a/Makefile b/Makefile index 1668139a25..a222fa572a 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,7 @@ ifeq ($(kernel_name),SunOS) BSON_DYLIB_MAKE_CMD=$(CC) -G -o $(BSON_DYLIBNAME) -h $(BSON_DYLIB_MINOR_NAME) $(ALL_LDFLAGS) endif ifeq ($(kernel_name),Darwin) - ALL_CFLAGS+=-std=$(STD) $(CFLAGS) $(OPTIMIZATION) $(WARNINGS) $(DEBUG) $(ALL_DEFINES) -DMONGO_OSX_ + ALL_CFLAGS+=-std=$(STD) $(CFLAGS) $(OPTIMIZATION) $(WARNINGS) $(DEBUG) $(ALL_DEFINES) DYLIBSUFFIX=dylib MONGO_DYLIB_MINOR_NAME=$(MONGO_LIBNAME).$(DYLIBSUFFIX).$(MONGO_MAJOR).$(MONGO_MINOR) MONGO_DYLIB_MAJOR_NAME=$(MONGO_LIBNAME).$(DYLIBSUFFIX).$(MONGO_MAJOR) diff --git a/SConstruct b/SConstruct index b712a5d007..55d1967b00 100644 --- a/SConstruct +++ b/SConstruct @@ -92,10 +92,7 @@ else: if os.sys.platform in ["darwin", "linux2"]: - if os.sys.platform in ["darwin"]: - env.Append( CPPFLAGS=" -pedantic -Wall -ggdb -DMONGO_HAVE_STDINT -DMONGO_OSX_" ) - else: - env.Append( CPPFLAGS=" -pedantic -Wall -ggdb -DMONGO_HAVE_STDINT" ) + env.Append( CPPFLAGS=" -pedantic -Wall -ggdb -DMONGO_HAVE_STDINT" ) env.Append( CPPPATH=["/opt/local/include/"] ) env.Append( LIBPATH=["/opt/local/lib/"] ) diff --git a/src/env_default.c b/src/env_default.c index f82e5478f1..9cbeab3d77 100644 --- a/src/env_default.c +++ b/src/env_default.c @@ -29,7 +29,7 @@ int mongo_write_socket( mongo *conn, const void *buf, int len ) { #ifdef _WIN32 int flags = 0; #else -#ifdef MONGO_OSX_ +#ifdef __APPLE__ int flags = 0; #else int flags = MSG_NOSIGNAL; diff --git a/src/env_posix.c b/src/env_posix.c index 0ec811908e..8d27e4d5c3 100644 --- a/src/env_posix.c +++ b/src/env_posix.c @@ -43,11 +43,7 @@ static void mongo_set_error( mongo *conn, int err, const char *str ) { int mongo_write_socket( mongo *conn, const void *buf, int len ) { const char *cbuf = buf; -#ifdef MONGO_OSX_ - int flags = 0; -#else int flags = MSG_NOSIGNAL; -#endif while ( len ) { int sent = send( conn->sock, cbuf, len, flags );