F162 - Failure Feedback Forum
Here's a patch that hardens the preprocessing symbols in that module so that it compiles on Solaris.
--- vlerq.c.orig Fri Jun 22 08:13:24 2007
+++ vlerq.c Fri Jun 22 08:15:08 2007
@@ -38,3 +38,3 @@
-#if WORDS_BIGENDIAN && !defined(_BIG_ENDIAN)
+#if defined(WORDS_BIGENDIAN) && !defined(_BIG_ENDIAN)
#define _BIG_ENDIAN 1
@@ -42,3 +42,3 @@
-#if DEBUG
+#if defined(DEBUG)
#define Assert(x) do if (!(x)) FailedAssert(#x, __FILE__, __LINE__); while (0)
@@ -1968,3 +1968,3 @@
static void MappedFileCleaner (MappedFile_p map) {
-#if WIN32
+#if defined(WIN32)
UnmapViewOfFile(map->data[2].p);
@@ -1980,3 +1980,3 @@
-#if WIN32
+#if defined(WIN32)
{
@@ -2024,3 +2024,3 @@
static int IsReversedEndian(MappedFile_p map) {
-#if _BIG_ENDIAN
+#if defined(_BIG_ENDIAN)
return *MF_Data(map) == 'J';
@@ -2510,3 +2510,3 @@
-#if VALUES_MUST_BE_ALIGNED
+#if defined(VALUES_MUST_BE_ALIGNED)
@@ -2514,3 +2514,3 @@
const Byte_t *ptr = (const Byte_t*) item->c.seq->data[0].p + row * 2;
-#if _BIG_ENDIAN
+#if defined(_BIG_ENDIAN)
item->i = (((int8_t) ptr[0]) << 8) | ptr[1];
@@ -2584,3 +2584,3 @@
const Byte_t *ptr = (const Byte_t*) item->c.seq->data[0].p + row * 2;
-#if _BIG_ENDIAN
+#if defined(_BIG_ENDIAN)
item->i = (((int8_t) ptr[1]) << 8) | ptr[0];
@@ -3869,3 +3869,3 @@
-#if MUT_DEBUG
+#if defined(MUT_DEBUG)
#include <stdio.h>
@@ -4064,3 +4064,3 @@
-#if MUT_DEBUG
+#if defined(MUT_DEBUG)
printf("fslot %d fpos %d tslot %d tpos %d drows %d offset %d count %d fend %d tend %d\n", fslot,fpos,tslot,tpos,drows,offset,count,fend,tend);
@@ -6281,3 +6281,3 @@
-#if DEBUG
+#if defined(DEBUG)
DbgIf(DBG_trace) printf(" rt %p var: %s\n", (void*) obj, name1);
@@ -6325,3 +6325,3 @@
-#if DEBUG
+#if defined(DEBUG)
DbgIf(DBG_trace) printf("svfar %p var: %s\n", (void*) obj, var);
@@ -6408,3 +6408,3 @@
-#if DEBUG
+#if defined(DEBUG)
DbgIf(DBG_deps) printf(" +dep %p %p\n", (void*) obj, (void*) child);
@@ -6424,3 +6424,3 @@
-#if DEBUG
+#if defined(DEBUG)
DbgIf(DBG_deps) printf(" -dep %p %p\n", (void*) obj, (void*) child);
@@ -6454,3 +6454,3 @@
-#if DEP_DEBUG
+#if defined(DEP_DEBUG)
printf("inval %p deps %d refs %d\n",
@@ -6793,3 +6793,3 @@
/* stub interface code, removes the need to link with libtclstub*.a */
-#if STATIC_BUILD
+#if defined(STATIC_BUILD)
#define MyInitStubs(x) 1
@@ -6839,3 +6839,3 @@
-#if NO_THREAD_CALLS
+#if defined(NO_THREAD_CALLS)
Shared_p GetShared (void) {
Created
(Changed: stat)
Thanks, will integrate this with the vqcore source code.
(Changed: stat)
(Changed: stat)
(slightly different) changes checked in, will be on the web tomorrow
(Changed: stat)