Changeset: f167f7445b5d for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f167f7445b5d Modified Files: clients/mapilib/Makefile.ag common/utils/mcrypt.h monetdb5/tools/Makefile.ag sql/backends/monet5/Makefile.ag Branch: Mar2018 Log Message:
Export mcrypt functions from libmapi; restore list of hashes. diffs (82 lines): diff --git a/clients/mapilib/Makefile.ag b/clients/mapilib/Makefile.ag --- a/clients/mapilib/Makefile.ag +++ b/clients/mapilib/Makefile.ag @@ -7,7 +7,7 @@ MTSAFE INCLUDES = ../../common/options ../../common/stream ../../common/utils \ - $(MSGCONTROL_FLAGS) + $(MSGCONTROL_FLAGS) $(openssl_CFLAGS) lib_mapi = { VERSION = $(MAPI_VERSION) diff --git a/common/utils/mcrypt.h b/common/utils/mcrypt.h --- a/common/utils/mcrypt.h +++ b/common/utils/mcrypt.h @@ -9,14 +9,25 @@ #ifndef _SEEN_MCRYPT_H #define _SEEN_MCRYPT_H 1 -const char *mcrypt_getHashAlgorithms(void); -char *mcrypt_MD5Sum(const char *string, size_t len); -char *mcrypt_SHA1Sum(const char *string, size_t len); -char *mcrypt_SHA224Sum(const char *string, size_t len); -char *mcrypt_SHA256Sum(const char *string, size_t len); -char *mcrypt_SHA384Sum(const char *string, size_t len); -char *mcrypt_SHA512Sum(const char *string, size_t len); -char *mcrypt_RIPEMD160Sum(const char *string, size_t len); -char *mcrypt_BackendSum(const char *string, size_t len); -char *mcrypt_hashPassword(const char *algo, const char *password, const char *challenge); +#if defined(_MSC_VER) || defined(__CYGWIN__) || defined(__MINGW32__) +#if !defined(LIBMAPI) && !defined(LIBMCRYPT) +#define mcrypt_export extern __declspec(dllimport) +#else +#define mcrypt_export extern __declspec(dllexport) +#endif +#else +#define mcrypt_export extern #endif + +mcrypt_export const char *mcrypt_getHashAlgorithms(void); +mcrypt_export char *mcrypt_MD5Sum(const char *string, size_t len); +mcrypt_export char *mcrypt_SHA1Sum(const char *string, size_t len); +mcrypt_export char *mcrypt_SHA224Sum(const char *string, size_t len); +mcrypt_export char *mcrypt_SHA256Sum(const char *string, size_t len); +mcrypt_export char *mcrypt_SHA384Sum(const char *string, size_t len); +mcrypt_export char *mcrypt_SHA512Sum(const char *string, size_t len); +mcrypt_export char *mcrypt_RIPEMD160Sum(const char *string, size_t len); +mcrypt_export char *mcrypt_BackendSum(const char *string, size_t len); +mcrypt_export char *mcrypt_hashPassword(const char *algo, const char *password, const char *challenge); +#endif + diff --git a/monetdb5/tools/Makefile.ag b/monetdb5/tools/Makefile.ag --- a/monetdb5/tools/Makefile.ag +++ b/monetdb5/tools/Makefile.ag @@ -17,9 +17,8 @@ lib_monetdb5 = { LIBS = ../mal/libmal ../modules/atoms/libatoms \ ../modules/kernel/libkernel ../modules/mal/libmal \ ../optimizer/liboptimizer ../scheduler/libscheduler \ - ../../common/utils/libmcrypt \ + ../../common/utils/libmsabaoth \ ../../common/utils/libmuuid \ - ../../common/utils/libmsabaoth \ WIN32?../../gdk/libbat \ WIN32&HAVE_MAPI?../../clients/mapilib/libmapi \ WIN32?../../common/stream/libstream \ diff --git a/sql/backends/monet5/Makefile.ag b/sql/backends/monet5/Makefile.ag --- a/sql/backends/monet5/Makefile.ag +++ b/sql/backends/monet5/Makefile.ag @@ -47,11 +47,12 @@ lib__sql = { sql_orderidx.c sql_orderidx.h \ wlr.c wlr.h \ sql_rank.c sql_rank.h + # libmapi on Windows for mcrypt_* LIBS = ../../server/libsqlserver \ ../../storage/libstore \ ../../storage/bat/libbatstore \ ../../common/libsqlcommon \ - WIN32?../../../common/utils/libmcrypt \ + WIN32?../../../clients/mapilib/libmapi \ WIN32?../../../monetdb5/tools/libmonetdb5 \ WIN32?../../../gdk/libbat \ WIN32?../../../common/stream/libstream \ _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list