From: Ivan Maidanski Date: Mon, 16 Jan 2012 04:42:33 +0000 (+0400) Subject: Minor adjustment of libcord visibility fix X-Git-Tag: gc7_3alpha2~218^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=abbafab4892609f7fe8473a43bbb1ac12b648132;p=gc Minor adjustment of libcord visibility fix * cord/cord.am (libcord_la_CPPFLAGS): Do not define CORD_BUILD and GC_DLL here (same approach as for GC_BUILD). * cord/cordbscs.c: Include config.h if HAVE_CONFIG_H (for GC_DLL) and define CORD_BUILD (before including cord.h). * cord/cordprnt.c: Likewise. * cord/cordxtra.c: Likewise. --- diff --git a/cord/cord.am b/cord/cord.am index f95fedf8..7d3fbe55 100644 --- a/cord/cord.am +++ b/cord/cord.am @@ -3,7 +3,7 @@ lib_LTLIBRARIES += libcord.la libcord_la_LIBADD = $(top_builddir)/libgc.la libcord_la_LDFLAGS = -version-info 1:3:0 -no-undefined -libcord_la_CPPFLAGS = $(AM_CPPFLAGS) -DCORD_BUILD -DGC_DLL +libcord_la_CPPFLAGS = $(AM_CPPFLAGS) libcord_la_SOURCES = \ cord/cordbscs.c \ diff --git a/cord/cordbscs.c b/cord/cordbscs.c index eace2e9c..0314b7ae 100644 --- a/cord/cordbscs.c +++ b/cord/cordbscs.c @@ -11,6 +11,13 @@ * modified is included with the above copyright notice. */ +#ifdef HAVE_CONFIG_H +# include "private/config.h" +#endif +#ifndef CORD_BUILD +# define CORD_BUILD +#endif + # include "gc.h" # include "cord.h" # include diff --git a/cord/cordprnt.c b/cord/cordprnt.c index f4c63868..5c8ba8c4 100644 --- a/cord/cordprnt.c +++ b/cord/cordprnt.c @@ -21,6 +21,13 @@ /* All this cruft is needed because we want to rely on the underlying */ /* sprintf implementation whenever possible. */ +#ifdef HAVE_CONFIG_H +# include "private/config.h" +#endif +#ifndef CORD_BUILD +# define CORD_BUILD +#endif + #include "cord.h" #include "ec.h" #include diff --git a/cord/cordxtra.c b/cord/cordxtra.c index abb34f64..19acafea 100644 --- a/cord/cordxtra.c +++ b/cord/cordxtra.c @@ -17,6 +17,13 @@ * cord_basics. */ +#ifdef HAVE_CONFIG_H +# include "private/config.h" +#endif +#ifndef CORD_BUILD +# define CORD_BUILD +#endif + # include # include # include