diff options
author | Randall Leeds <randall@apache.org> | 2012-01-03 14:14:55 -0500 |
---|---|---|
committer | Randall Leeds <randall@apache.org> | 2012-01-03 14:44:47 -0500 |
commit | 32fb9f8e0416910a2431227b5fbdeef93ccd94bc (patch) | |
tree | b63dd7f37f766208a2c69ea4d8b781e198c2cd35 | |
parent | 3f2537fc71833752df6f4cb602c28c59e573e9ab (diff) | |
download | couchdb-32fb9f8e0416910a2431227b5fbdeef93ccd94bc.tar.gz |
Use ICU_CPPFLAGS instead of _CFLAGS
This removes the need for c4f6ff9c6cf5512546d5799f05dd445a4da979b3
which was made in response to -ansi coming from icu-config on my
system. Instead, it's more sensible to use the preprocessor flags from
icu-config which provides the -I header locations and -D definitions
but doesn't add a bunch of excessive warning flags or ansi conformance.
This reverts commit c4f6ff9c6cf5512546d5799f05dd445a4da979b3.
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | src/couchdb/priv/Makefile.am | 4 | ||||
-rw-r--r-- | src/couchdb/priv/icu_driver/couch_icu_driver.c | 8 |
3 files changed, 6 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 5eb2e6908..646b8a8da 100644 --- a/configure.ac +++ b/configure.ac @@ -323,7 +323,7 @@ CPPFLAGS="$OLD_CPPFLAGS" AC_ARG_WITH([win32-icu-binaries], [AC_HELP_STRING([--with-win32-icu-binaries=PATH], [set PATH to the Win32 native ICU binaries directory])], [ - ICU_CFLAGS="-I$withval/include" + ICU_CPPFLAGS="-I$withval/include" ICU_LIBS="-L$withval/lib -licuuc -licudt -licuin" ICU_BIN=$withval/bin ], [ @@ -336,6 +336,7 @@ AC_ARG_WITH([win32-icu-binaries], [AC_HELP_STRING([--with-win32-icu-binaries=PAT ]) AC_SUBST(ICU_CFLAGS) +AC_SUBST(ICU_CPPFLAGS) AC_SUBST(ICU_LIBS) AC_SUBST(ICU_BIN) diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am index 1080b011c..02f7a7ff0 100644 --- a/src/couchdb/priv/Makefile.am +++ b/src/couchdb/priv/Makefile.am @@ -32,7 +32,7 @@ couchprivlib_LTLIBRARIES = couch_icu_driver.la if USE_EJSON_COMPARE_NIF couchprivlib_LTLIBRARIES += couch_ejson_compare.la couch_ejson_compare_la_SOURCES = couch_ejson_compare/couch_ejson_compare.c -couch_ejson_compare_la_CFLAGS = -D_BSD_SOURCE $(ICU_CFLAGS) $(ERLANG_FLAGS) +couch_ejson_compare_la_CPPFLAGS = -D_BSD_SOURCE $(ICU_CPPFLAGS) $(ERLANG_FLAGS) couch_ejson_compare_la_LDFLAGS = -module -avoid-version couch_ejson_compare_la_LIBADD = $(ICU_LIBS) if WINDOWS @@ -41,7 +41,7 @@ endif endif couch_icu_driver_la_SOURCES = icu_driver/couch_icu_driver.c couch_icu_driver_la_LDFLAGS = -module -avoid-version -couch_icu_driver_la_CFLAGS = $(ICU_CFLAGS) $(ERLANG_FLAGS) +couch_icu_driver_la_CPPFLAGS = $(ICU_CPPFLAGS) $(ERLANG_FLAGS) couch_icu_driver_la_LIBADD = $(ICU_LIBS) if WINDOWS diff --git a/src/couchdb/priv/icu_driver/couch_icu_driver.c b/src/couchdb/priv/icu_driver/couch_icu_driver.c index c627fcaed..edfd84a3b 100644 --- a/src/couchdb/priv/icu_driver/couch_icu_driver.c +++ b/src/couchdb/priv/icu_driver/couch_icu_driver.c @@ -30,10 +30,6 @@ specific language governing permissions and limitations under the License. #include <string.h> /* for memcpy */ #endif -#define DRIVER_NAME "couch_icu_driver" - -DRIVER_INIT(DRIVER_NAME); /* prototype for erl_driver entry point */ - typedef struct { ErlDrvPort port; UCollator* collNoCase; @@ -159,7 +155,7 @@ ErlDrvEntry couch_driver_entry = { NULL, /* F_PTR output, called when erlang has sent */ NULL, /* F_PTR ready_input, called when input descriptor ready */ NULL, /* F_PTR ready_output, called when output descriptor ready */ - (char*)DRIVER_NAME, /* char *driver_name, the argument to open_port */ + "couch_icu_driver", /* char *driver_name, the argument to open_port */ NULL, /* F_PTR finish, called when unloaded */ NULL, /* Not used */ couch_drv_control, /* F_PTR control, port_command callback */ @@ -177,7 +173,7 @@ ErlDrvEntry couch_driver_entry = { NULL, /* F_PTR process_exit */ }; -DRIVER_INIT(DRIVER_NAME) /* must match name in driver_entry */ +DRIVER_INIT(couch_icu_driver) /* must match name in driver_entry */ { return &couch_driver_entry; } |