Changeset: 2ad2de062fbe for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=2ad2de062fbe Modified Files: clients/examples/C/Makefile.ag clients/mapiclient/Makefile.ag clients/odbc/driver/Makefile.ag common/options/monet_getopt.h common/options/monet_options.mx monetdb4/tools/Makefile.ag monetdb5/extras/compiler/Makefile.ag monetdb5/extras/crackers/Makefile.ag monetdb5/extras/rdf/Makefile.ag monetdb5/extras/xml/Makefile.ag monetdb5/tools/Makefile.ag pathfinder/src/tools/Makefile.ag sql/backends/monet5/Makefile.ag Branch: default Log Message:
Get to compile again on Windows. libmoptions is a NOINST library which is included in both the libmapi and libbat DLLs. This means it should export its symbols only when the header file is included in any of those libraries, and it should not be listed on the linker commandline when either of those libraries is already mentioned. Also removed some apparently unneeded libstreams. diffs (truncated from 334 to 300 lines): diff -r 6c23c7dc7084 -r 2ad2de062fbe clients/examples/C/Makefile.ag --- a/clients/examples/C/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/clients/examples/C/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -26,6 +26,5 @@ SOURCES = sample0.c sample1.c sample2.c sample3.c sample4.c \ smack00.c smack01.c LIBS = $(MAPI_LIBS) ../../mapilib/libmapi \ - ../../../common/options/libmoptions \ $(curl_LIBS) } diff -r 6c23c7dc7084 -r 2ad2de062fbe clients/mapiclient/Makefile.ag --- a/clients/mapiclient/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/clients/mapiclient/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -25,9 +25,9 @@ bin_mclient = { SOURCES = mclient.c ReadlineTools.c - LIBS = libmcutil ../mapilib/libmapi $(READLINE_LIBS) \ + LIBS = libmcutil ../mapilib/libmapi \ ../../common/stream/libstream \ - ../../common/options/libmoptions \ + $(READLINE_LIBS) \ $(curl_LIBS) $(LTLIBICONV) } @@ -35,7 +35,6 @@ SOURCES = msqldump.c LIBS = libmcutil ../mapilib/libmapi \ ../../common/stream/libstream \ - ../../common/options/libmoptions \ $(curl_LIBS) } @@ -43,7 +42,6 @@ SOURCES = stethoscope.c LIBS = libmcutil ../mapilib/libmapi \ ../../common/stream/libstream \ - ../../common/options/libmoptions \ $(curl_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) } diff -r 6c23c7dc7084 -r 2ad2de062fbe clients/odbc/driver/Makefile.ag --- a/clients/odbc/driver/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/clients/odbc/driver/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -116,6 +116,6 @@ SQLTransact.c \ driver.rc \ ODBC.syms - LIBS = ../../mapilib/libmapi ../../../common/options/libmoptions $(ICONV_LIBS) $(ODBC_LIBS) $(SOCKET_LIBS) + LIBS = ../../mapilib/libmapi $(ICONV_LIBS) $(ODBC_LIBS) $(SOCKET_LIBS) } diff -r 6c23c7dc7084 -r 2ad2de062fbe common/options/monet_getopt.h --- a/common/options/monet_getopt.h Mon Jan 17 16:28:45 2011 +0100 +++ b/common/options/monet_getopt.h Mon Jan 17 16:31:35 2011 +0100 @@ -57,13 +57,26 @@ extern "C" { #endif +#ifndef moptions_export +/* avoid using "#ifdef WIN32" so that this file does not need our config.h */ +#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) +#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI) +#define moptions_export extern __declspec(dllimport) +#else +#define moptions_export extern __declspec(dllexport) +#endif +#else +#define moptions_export extern +#endif +#endif + /* For communication from `getopt' to the caller. When `getopt' finds an option that takes an argument, the argument value is returned here. Also, when `ordering' is RETURN_IN_ORDER, each non-option ARGV-element is returned here. */ - extern char *optarg; + moptions_export char *optarg; /* Index in ARGV of the next element to be scanned. This is used for communication to and from the caller @@ -77,16 +90,16 @@ Otherwise, `optind' communicates from one call to the next how much of ARGV has been scanned so far. */ - extern int optind; + moptions_export int optind; /* Callers store zero here to inhibit the error message `getopt' prints for unrecognized options. */ - extern int opterr; + moptions_export int opterr; /* Set to an option character which was unrecognized. */ - extern int optopt; + moptions_export int optopt; #ifndef __need_getopt /* Describe the long-named options requested by the application. @@ -161,28 +174,28 @@ differences in the consts, in stdlib.h. To avoid compilation errors, only prototype getopt for the GNU C library. */ #ifndef HAVE_GETOPT - extern int getopt(int __argc__, char *const *__argv__, const char *__shortopts); + moptions_export int getopt(int __argc__, char *const *__argv__, const char *__shortopts); #endif # else /* not __GNU_LIBRARY__ */ #ifndef HAVE_GETOPT - extern int getopt(); + moptions_export int getopt(); #endif # endif /* __GNU_LIBRARY__ */ # ifndef __need_getopt - extern int getopt_long(int __argc__, char *const *__argv__, const char *__shortopts, const struct option *__longopts, int *__longind); - extern int getopt_long_only(int __argc__, char *const *__argv__, const char *__shortopts, const struct option *__longopts, int *__longind); + moptions_export int getopt_long(int __argc__, char *const *__argv__, const char *__shortopts, const struct option *__longopts, int *__longind); + moptions_export int getopt_long_only(int __argc__, char *const *__argv__, const char *__shortopts, const struct option *__longopts, int *__longind); /* Internal only. Users should not call this directly. */ extern int _getopt_internal(int __argc__, char *const *__argv__, const char *__shortopts, const struct option *__longopts, int *__longind, int __long_only); # endif #else /* not __STDC__ */ #ifndef HAVE_GETOPT - extern int getopt(); + moptions_export int getopt(); #endif # ifndef __need_getopt - extern int getopt_long(); - extern int getopt_long_only(); + moptions_export int getopt_long(); + moptions_export int getopt_long_only(); extern int _getopt_internal(); # endif diff -r 6c23c7dc7084 -r 2ad2de062fbe common/options/monet_options.mx --- a/common/options/monet_options.mx Mon Jan 17 16:28:45 2011 +0100 +++ b/common/options/monet_options.mx Mon Jan 17 16:31:35 2011 +0100 @@ -50,7 +50,7 @@ #ifndef moptions_export /* avoid using "#ifdef WIN32" so that this file does not need our config.h */ #if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) -#ifndef MONETDB_RELEASE /* assume only defined within MonetDB */ +#if !defined(LIBMOPTIONS) && !defined(LIBGDK) && !defined(LIBMAPI) #define moptions_export extern __declspec(dllimport) #else #define moptions_export extern __declspec(dllexport) diff -r 6c23c7dc7084 -r 2ad2de062fbe monetdb4/tools/Makefile.ag --- a/monetdb4/tools/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/monetdb4/tools/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -90,8 +90,6 @@ LIBS = libinitmodules STATIC_MODS @SHARED_LIBS@ $(EXTRA_LIBS) \ ../monet/libmonet \ ../../gdk/libbat \ - ../../common/options/libmoptions \ - ../../common/stream/libstream \ $(pcre_LIBS) $(openssl_LIBS) } @@ -100,9 +98,7 @@ LIBS = libinitmodules STATIC_MODS @SHARED_LIBS@ $(EXTRA_LIBS) \ ../monet/libmonet \ ../../gdk/libbat \ - ../../common/options/libmoptions \ - ../../clients/mapilib/libmapi \ - ../../common/stream/libstream + ../../clients/mapilib/libmapi } bin_Mbeddedmil = { @@ -111,9 +107,7 @@ libembeddedmil \ ../monet/libmonet \ ../../gdk/libbat \ - ../../common/options/libmoptions \ - ../../clients/mapilib/libmapi \ - ../../common/stream/libstream + ../../clients/mapilib/libmapi } EXTRA_DIST_DIR = Tests diff -r 6c23c7dc7084 -r 2ad2de062fbe monetdb5/extras/compiler/Makefile.ag --- a/monetdb5/extras/compiler/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/monetdb5/extras/compiler/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -29,7 +29,6 @@ SOURCES = mal_compiler.mx LIBS = ../../tools/libmonetdb5 \ - ../../../common/options/libmoptions \ ../../../gdk/libbat \ ../../../common/stream/libstream \ $(MALLOC_LIBS) diff -r 6c23c7dc7084 -r 2ad2de062fbe monetdb5/extras/crackers/Makefile.ag --- a/monetdb5/extras/crackers/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/monetdb5/extras/crackers/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -31,7 +31,6 @@ crackers_joinselect_ops.mx crackers_select_ops.mx crackers_sideways.mx crackers_partial_sideways.mx crackers_updates.mx crackers_joins.mx crackers_sortmerge.mx crackers_crackmerge.mx crackers_pq.mx \ crackers_populate.mx LIBS = ../../tools/libmonetdb5 \ - ../../../common/options/libmoptions \ ../../../gdk/libbat \ ../../../common/stream/libstream \ $(MALLOC_LIBS) diff -r 6c23c7dc7084 -r 2ad2de062fbe monetdb5/extras/rdf/Makefile.ag --- a/monetdb5/extras/rdf/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/monetdb5/extras/rdf/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -28,9 +28,7 @@ DIR = libdir/monetdb5 SOURCES = rdf.mx rdf_shredder.mx LIBS = ../../tools/libmonetdb5 \ - ../../../common/options/libmoptions \ ../../../gdk/libbat \ - ../../../common/stream/libstream \ $(MALLOC_LIBS) $(raptor_LIBS) } diff -r 6c23c7dc7084 -r 2ad2de062fbe monetdb5/extras/xml/Makefile.ag --- a/monetdb5/extras/xml/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/monetdb5/extras/xml/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -28,7 +28,6 @@ SOURCES = xml.mx LIBS = ../../tools/libmonetdb5 \ - ../../../common/options/libmoptions \ ../../../gdk/libbat \ $(MALLOC_LIBS) $(libxml2_LIBS) } @@ -50,7 +49,6 @@ SEP = _ SOURCES = batxml.mx LIBS = lib_xml ../../tools/libmonetdb5 \ - ../../../common/options/libmoptions \ ../../../gdk/libbat \ $(MATH_LIBS) $(MALLOC_LIBS) $(libxml2_LIBS) } diff -r 6c23c7dc7084 -r 2ad2de062fbe monetdb5/tools/Makefile.ag --- a/monetdb5/tools/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/monetdb5/tools/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -33,10 +33,10 @@ LIBS = ../mal/libmal ../modules/atoms/libatoms \ ../modules/kernel/libkernel ../modules/mal/libmal \ ../optimizer/liboptimizer ../scheduler/libscheduler \ - ../../common/options/libmoptions \ ../../gdk/libbat \ + ../../clients/mapilib/libmapi \ ../../common/stream/libstream \ - ../../clients/mapilib/libmapi $(curl_LIBS) \ + $(curl_LIBS) \ $(MATH_LIBS) $(SOCKET_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) \ $(DL_LIBS) $(READLINE_LIBS) $(openssl_LIBS) $(pcre_LIBS) \ $(LTLIBICONV) $(zlib_LIBS) @@ -45,9 +45,7 @@ bin_mserver5 = { SOURCES = mserver5.mx monet_version.h monet_version.c.in LIBS = libmonetdb5 @SHARED_LIBS@ \ - ../../common/options/libmoptions \ ../../gdk/libbat \ - ../../common/stream/libstream \ $(SOCKET_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS) \ $(curl_LIBS) $(pcre_LIBS) $(openssl_LIBS) } @@ -55,9 +53,7 @@ lib_embeddedmal = { SOURCES = embeddedclient.c.in LIBS = libmonetdb5 @SHARED_LIBS@ \ - ../../common/options/libmoptions \ ../../gdk/libbat \ - ../../common/stream/libstream \ ../../clients/mapilib/libmapi $(curl_LIBS) \ $(SOCKET_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS) } @@ -65,9 +61,7 @@ bin_mbeddedmal = { SOURCES = prog.c LIBS = libembeddedmal @SHARED_LIBS@ \ - ../../common/options/libmoptions \ ../../gdk/libbat \ - ../../common/stream/libstream \ ../../clients/mapilib/libmapi $(curl_LIBS) \ $(SOCKET_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS) } diff -r 6c23c7dc7084 -r 2ad2de062fbe pathfinder/src/tools/Makefile.ag --- a/pathfinder/src/tools/Makefile.ag Mon Jan 17 16:28:45 2011 +0100 +++ b/pathfinder/src/tools/Makefile.ag Mon Jan 17 16:31:35 2011 +0100 @@ -83,8 +83,6 @@ SOURCES = Mserver.mx LIBS = libinitmodules STATIC_MODS @SHARED_LIBS@ $(EXTRA_LIBS) \ ../../../gdk/libbat \ - ../../../common/options/libmoptions \ - ../../../common/stream/libstream \ ../../../monetdb4/monet/libmonet } @@ -92,8 +90,6 @@ SOURCES = embeddedclient.c.in LIBS = libinitmodules STATIC_MODS @SHARED_LIBS@ $(EXTRA_LIBS) \ _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list