Changeset: b20d07dccd40 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b20d07dccd40
Added Files:
tools/embedded/undef.h
Modified Files:
common/utils/muuid.c
configure.ag
monetdb5/modules/atoms/uuid.c
Branch: embedded
Log Message:
Zap dependencies
diffs (63 lines):
diff --git a/common/utils/muuid.c b/common/utils/muuid.c
--- a/common/utils/muuid.c
+++ b/common/utils/muuid.c
@@ -43,8 +43,8 @@ generateUUID(void)
/* try to do some pseudo interesting stuff, and stash it in the
* format of a UUID to at least return some uniform answer */
char out[37];
+#ifdef HAVE_OPENSSL
unsigned char randbuf[16];
-#ifdef HAVE_OPENSSL
if (RAND_bytes(randbuf, 16) >= 0) {
snprintf(out, sizeof(out),
"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-"
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -3416,6 +3416,10 @@ typedef lng ptrdiff_t;
#define LIBXML_ATTR_ALLOC_SIZE(x)
#endif
+#ifdef HAVE_EMBEDDED
+#include "tools/embedded/undef.h"
+#endif
+
#endif /* _SEEN_MONETDB_CONFIG_H */
])
diff --git a/monetdb5/modules/atoms/uuid.c b/monetdb5/modules/atoms/uuid.c
--- a/monetdb5/modules/atoms/uuid.c
+++ b/monetdb5/modules/atoms/uuid.c
@@ -164,19 +164,20 @@ str
UUIDgenerateUuid(uuid **retval)
{
uuid *u;
+ int i, r;
if (*retval == NULL)
*retval = GDKmalloc(UUID_SIZE);
u = *retval;
#ifdef HAVE_UUID
uuid_generate(u->u);
+ (void) i;
+ (void) r;
#else
#ifdef HAVE_OPENSSL
if (RAND_bytes(u->u, 16) < 0) {
#endif
/* if it failed, use rand */
- int i, r;
-
for (i = 0; i < UUID_SIZE;) {
r = rand() % 65536;
u->u[i++] = (unsigned char) (r >> 8);
diff --git a/tools/embedded/undef.h b/tools/embedded/undef.h
new file mode 100644
--- /dev/null
+++ b/tools/embedded/undef.h
@@ -0,0 +1,5 @@
+#undef HAVE_OPENSSL
+#undef HAVE_UUID
+#undef HAVE_CURL
+#undef HAVE_LIBBZ2
+#undef HAVE_LIBLZMA
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list