XOPEN posix source macro change for bsd
authorTimmy Douglas <slate@timmy.tmbx.com>
Wed, 26 May 2010 01:56:56 +0000 (21:56 -0400)
committerTimmy Douglas <slate@timmy.tmbx.com>
Wed, 26 May 2010 01:57:59 +0000 (21:57 -0400)
common.mk
src/vm/external-library.cpp

index 727a33e..63c34a3 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -67,7 +67,8 @@ EMACS       := emacs
 ## Platform independent definitions
 
 INCLUDES    += 
-CFLAGS      += -DSLATE_DATADIR=$(datadir) -D_POSIX_SOURCE=200112L -D_POSIX_C_SOURCE=200112L
+#CFLAGS      += -DSLATE_DATADIR=$(datadir) -D_POSIX_SOURCE=200112L -D_POSIX_C_SOURCE=200112L
+CFLAGS      += -DSLATE_DATADIR=$(datadir) -D_XOPEN_SOURCE=600
 CFLAGS      += $(COPTFLAGS) -Wall -Wno-unknown-pragmas -pthread $(PRINT_DEBUG) $(EXTRACFLAGS)  $(INCLUDES)
 # include -pedantic later fixme
 
index 40bafb2..c8116d7 100644 (file)
@@ -292,6 +292,7 @@ struct Object* applyExternalLibraryPrimitive(struct object_heap* oh, struct Byte
          double d;
          word_t u[2];
        } convert;
+        memset(&convert, 0, sizeof(convert));
        if (object_is_smallint(element)) {
          convert.d = (double) object_to_smallint(element);
         } else {