Changeset: d293ed470690 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d293ed470690
Added Files:
        monetdb5/modules/mosaic/mosaic_private.h
Modified Files:
        common/utils/mutils.h
        gdk/gdk_select.c
        monetdb5/modules/mosaic/Makefile.ag
        monetdb5/modules/mosaic/mosaic.h
        monetdb5/modules/mosaic/mosaic_calendar.c
        monetdb5/modules/mosaic/mosaic_delta.c
        monetdb5/modules/mosaic/mosaic_dictionary.c
        monetdb5/modules/mosaic/mosaic_frame.c
        monetdb5/modules/mosaic/mosaic_linear.c
        monetdb5/modules/mosaic/mosaic_prefix.c
        monetdb5/modules/mosaic/mosaic_raw.c
        monetdb5/modules/mosaic/mosaic_runlength.c
        monetdb5/tools/Makefile.ag
        sql/backends/monet5/generator/Makefile.ag
        sql/backends/monet5/generator/generator.c
Branch: mosaic
Log Message:

Fix export of fnextafterf on Windows.
This is a forward port of changeset f999f02a9968 with some more
changes to make it work in this branch.


diffs (251 lines):

diff --git a/common/utils/mutils.h b/common/utils/mutils.h
--- a/common/utils/mutils.h
+++ b/common/utils/mutils.h
@@ -42,6 +42,10 @@ mutils_export int closedir(DIR *dir);
 
 mutils_export char *dirname(char *path);
 
+#ifndef HAVE_NEXTAFTERF
+mutils_export float nextafterf(float x, float y);
+#endif
+
 #endif
 
 #ifndef S_IWGRP
diff --git a/gdk/gdk_select.c b/gdk/gdk_select.c
--- a/gdk/gdk_select.c
+++ b/gdk/gdk_select.c
@@ -14,7 +14,7 @@
 
 #ifndef HAVE_NEXTAFTERF
 #define nextafter      _nextafter
-float nextafterf(float x, float y);
+#include "mutils.h"            /* fnextafter */
 #endif
 
 /* auxiliary functions and structs for imprints */
diff --git a/monetdb5/modules/mosaic/Makefile.ag 
b/monetdb5/modules/mosaic/Makefile.ag
--- a/monetdb5/modules/mosaic/Makefile.ag
+++ b/monetdb5/modules/mosaic/Makefile.ag
@@ -28,7 +28,8 @@ lib_mosaic = {
                mosaic_linear.c mosaic_linear.h \
                mosaic_frame.c mosaic_frame.h \
                mosaic_calendar.c mosaic_calendar.h \
-               mosaic_prefix.c mosaic_prefix.h 
+               mosaic_prefix.c mosaic_prefix.h \
+               mosaic_private.h
 }
 
 headers_mal = {
diff --git a/monetdb5/modules/mosaic/mosaic.h b/monetdb5/modules/mosaic/mosaic.h
--- a/monetdb5/modules/mosaic/mosaic.h
+++ b/monetdb5/modules/mosaic/mosaic.h
@@ -178,39 +178,6 @@ typedef struct MOSTASK{
 
 /* Run through a column to produce a compressed version */
 
-#ifndef HAVE_NEXTAFTERF
-#define nextafter      _nextafter
-mal_export float nextafterf(float x, float y);
-#endif
-
-#define PREVVALUEbit(x) ((x) - 1)
-#define PREVVALUEbte(x) ((x) - 1)
-#define PREVVALUEsht(x) ((x) - 1)
-#define PREVVALUEint(x) ((x) - 1)
-#define PREVVALUElng(x) ((x) - 1)
-#define PREVVALUEoid(x) ((x) - 1)
-#ifdef HAVE_HGE
-#define PREVVALUEhge(x) ((x) - 1)
-#endif
-#define PREVVALUEflt(x) nextafterf((x), -GDK_flt_max)
-#define PREVVALUEdbl(x) nextafter((x), -GDK_dbl_max)
-#define PREVVALUEdate(x) ((x) - 1)
-#define PREVVALUEdaytime(x) ((x) - 1)
-
-#define NEXTVALUEbit(x) ((x) + 1)
-#define NEXTVALUEbte(x) ((x) + 1)
-#define NEXTVALUEsht(x) ((x) + 1)
-#define NEXTVALUEint(x) ((x) + 1)
-#define NEXTVALUElng(x) ((x) + 1)
-#define NEXTVALUEoid(x) ((x) + 1)
-#ifdef HAVE_HGE
-#define NEXTVALUEhge(x) ((x) + 1)
-#endif
-#define NEXTVALUEflt(x) nextafterf((x), GDK_flt_max)
-#define NEXTVALUEdbl(x) nextafter((x), GDK_dbl_max)
-#define NEXTVALUEdate(x) ((x) + 1)
-#define NEXTVALUEdaytime(x) ((x) + 1)
-
 // skip until you hit a candidate
 #define MOSskipit()\
 if ( task->n && task->cl ){\
diff --git a/monetdb5/modules/mosaic/mosaic_calendar.c 
b/monetdb5/modules/mosaic/mosaic_calendar.c
--- a/monetdb5/modules/mosaic/mosaic_calendar.c
+++ b/monetdb5/modules/mosaic/mosaic_calendar.c
@@ -29,6 +29,7 @@
 #include "gdk_bitvector.h"
 #include "mosaic.h"
 #include "mosaic_calendar.h"
+#include "mosaic_private.h"
 
 #define MASKDAY 037
 #define MASKBITS 5
diff --git a/monetdb5/modules/mosaic/mosaic_delta.c 
b/monetdb5/modules/mosaic/mosaic_delta.c
--- a/monetdb5/modules/mosaic/mosaic_delta.c
+++ b/monetdb5/modules/mosaic/mosaic_delta.c
@@ -25,6 +25,7 @@
 #include "monetdb_config.h"
 #include "mosaic.h"
 #include "mosaic_delta.h"
+#include "mosaic_private.h"
 
 //#define _DEBUG_MOSAIC_
 
diff --git a/monetdb5/modules/mosaic/mosaic_dictionary.c 
b/monetdb5/modules/mosaic/mosaic_dictionary.c
--- a/monetdb5/modules/mosaic/mosaic_dictionary.c
+++ b/monetdb5/modules/mosaic/mosaic_dictionary.c
@@ -32,6 +32,7 @@
 #include "gdk_bitvector.h"
 #include "mosaic.h"
 #include "mosaic_dictionary.h"
+#include "mosaic_private.h"
 
 void
 MOSadvance_dictionary(Client cntxt, MOStask task)
diff --git a/monetdb5/modules/mosaic/mosaic_frame.c 
b/monetdb5/modules/mosaic/mosaic_frame.c
--- a/monetdb5/modules/mosaic/mosaic_frame.c
+++ b/monetdb5/modules/mosaic/mosaic_frame.c
@@ -34,6 +34,7 @@
 #include "gdk_bitvector.h"
 #include "mosaic.h"
 #include "mosaic_frame.h"
+#include "mosaic_private.h"
 
 // we use longs as the basis for bit vectors
 #define chunk_size(Task,Cnt) wordaligned(MosaicBlkSize + (Cnt * 
Task->hdr->framebits)/8 + (((Cnt * Task->hdr->framebits) %8) != 0), lng)
diff --git a/monetdb5/modules/mosaic/mosaic_linear.c 
b/monetdb5/modules/mosaic/mosaic_linear.c
--- a/monetdb5/modules/mosaic/mosaic_linear.c
+++ b/monetdb5/modules/mosaic/mosaic_linear.c
@@ -26,6 +26,7 @@
 #include "monetdb_config.h"
 #include "mosaic.h"
 #include "mosaic_linear.h"
+#include "mosaic_private.h"
 
 #define linear_base(BLK) ((void*)(((char*) BLK)+ MosaicBlkSize))
 
diff --git a/monetdb5/modules/mosaic/mosaic_prefix.c 
b/monetdb5/modules/mosaic/mosaic_prefix.c
--- a/monetdb5/modules/mosaic/mosaic_prefix.c
+++ b/monetdb5/modules/mosaic/mosaic_prefix.c
@@ -30,6 +30,7 @@
 #include "monetdb_config.h"
 #include "mosaic.h"
 #include "mosaic_prefix.h"
+#include "mosaic_private.h"
 #include "gdk_bitvector.h"
 
 /* Beware, the dump routines use the compressed part of the task */
diff --git a/monetdb5/modules/mosaic/mosaic_private.h 
b/monetdb5/modules/mosaic/mosaic_private.h
new file mode 100644
--- /dev/null
+++ b/monetdb5/modules/mosaic/mosaic_private.h
@@ -0,0 +1,32 @@
+#ifndef HAVE_NEXTAFTERF
+#define nextafter      _nextafter
+#include "mutils.h"            /* fnextafter */
+#endif
+
+#define PREVVALUEbit(x) ((x) - 1)
+#define PREVVALUEbte(x) ((x) - 1)
+#define PREVVALUEsht(x) ((x) - 1)
+#define PREVVALUEint(x) ((x) - 1)
+#define PREVVALUElng(x) ((x) - 1)
+#define PREVVALUEoid(x) ((x) - 1)
+#ifdef HAVE_HGE
+#define PREVVALUEhge(x) ((x) - 1)
+#endif
+#define PREVVALUEflt(x) nextafterf((x), -GDK_flt_max)
+#define PREVVALUEdbl(x) nextafter((x), -GDK_dbl_max)
+#define PREVVALUEdate(x) ((x) - 1)
+#define PREVVALUEdaytime(x) ((x) - 1)
+
+#define NEXTVALUEbit(x) ((x) + 1)
+#define NEXTVALUEbte(x) ((x) + 1)
+#define NEXTVALUEsht(x) ((x) + 1)
+#define NEXTVALUEint(x) ((x) + 1)
+#define NEXTVALUElng(x) ((x) + 1)
+#define NEXTVALUEoid(x) ((x) + 1)
+#ifdef HAVE_HGE
+#define NEXTVALUEhge(x) ((x) + 1)
+#endif
+#define NEXTVALUEflt(x) nextafterf((x), GDK_flt_max)
+#define NEXTVALUEdbl(x) nextafter((x), GDK_dbl_max)
+#define NEXTVALUEdate(x) ((x) + 1)
+#define NEXTVALUEdaytime(x) ((x) + 1)
diff --git a/monetdb5/modules/mosaic/mosaic_raw.c 
b/monetdb5/modules/mosaic/mosaic_raw.c
--- a/monetdb5/modules/mosaic/mosaic_raw.c
+++ b/monetdb5/modules/mosaic/mosaic_raw.c
@@ -25,6 +25,7 @@
 #include "monetdb_config.h"
 #include "mosaic.h"
 #include "mosaic_raw.h"
+#include "mosaic_private.h"
 
 void
 MOSdump_raw(Client cntxt, MOStask task)
diff --git a/monetdb5/modules/mosaic/mosaic_runlength.c 
b/monetdb5/modules/mosaic/mosaic_runlength.c
--- a/monetdb5/modules/mosaic/mosaic_runlength.c
+++ b/monetdb5/modules/mosaic/mosaic_runlength.c
@@ -25,6 +25,7 @@
 #include "monetdb_config.h"
 #include "mosaic.h"
 #include "mosaic_runlength.h"
+#include "mosaic_private.h"
 
 /* Beware, the dump routines use the compressed part of the task */
 void
diff --git a/monetdb5/tools/Makefile.ag b/monetdb5/tools/Makefile.ag
--- a/monetdb5/tools/Makefile.ag
+++ b/monetdb5/tools/Makefile.ag
@@ -24,7 +24,6 @@ lib_monetdb5 = {
                ../../common/utils/libmcrypt \
                ../../common/utils/libmuuid \
                ../../common/utils/libmsabaoth \
-               ../../common/utils/libmutils \
                $(UUID_LIBS) $(curl_LIBS) \
                $(MATH_LIBS) $(SOCKET_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) \
                $(DL_LIBS) $(openssl_LIBS) $(pcre_LIBS) \
diff --git a/sql/backends/monet5/generator/Makefile.ag 
b/sql/backends/monet5/generator/Makefile.ag
--- a/sql/backends/monet5/generator/Makefile.ag
+++ b/sql/backends/monet5/generator/Makefile.ag
@@ -16,6 +16,7 @@ INCLUDES = ../../../include \
                   ../../../../monetdb5/scheduler \
                   ../../../../common/options \
                   ../../../../common/stream \
+                  ../../../../common/utils \
                   ../../../../gdk
 
 lib__generator = {
@@ -23,8 +24,7 @@ lib__generator = {
        DIR = libdir/monetdb5
        SOURCES = generator.c  generator.h
        LIBS = ../../../../monetdb5/tools/libmonetdb5 \
-                  ../../../../gdk/libbat \
-                  ../../../../common/utils/libmutils
+                  ../../../../gdk/libbat
 }
 
 headers_mal = {
diff --git a/sql/backends/monet5/generator/generator.c 
b/sql/backends/monet5/generator/generator.c
--- a/sql/backends/monet5/generator/generator.c
+++ b/sql/backends/monet5/generator/generator.c
@@ -497,7 +497,7 @@ VLTgenerator_subselect(Client cntxt, Mal
 }
 #ifndef HAVE_NEXTAFTERF
 #define nextafter   _nextafter
-float nextafterf(float x, float y);
+#include "mutils.h"            /* fnextafter */
 #endif
 
 #define PREVVALUEbte(x) ((x) - 1)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to