
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <orc/orc.h>

#include <stdio.h>


int main (int argc, char *argv[])
{
  long offset;
  int expected_offset;
  int error = 0;

  offset = ((long) ((unsigned char *) &((OrcProgram*) 0)->code_exec));

  if (sizeof(void *) == 4) {
    expected_offset = 8360;
  } else {
    expected_offset = 9688;
  }

  if (offset != expected_offset) {
    printf("ABI bug: OrcProgram->code_exec should be at offset %ld instead of %d\n",
        offset, expected_offset);
    error = 1;
  }

  return error;
}



#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <orc/orc.h>

#include <stdio.h>


int main (int argc, char *argv[])
{
  int offset;
  int expected_offset;
  int error = 0;

  offset = ((int) ((unsigned char *) &((OrcProgram*) 0)->code_exec));

  if (sizeof(void *) == 4) {
    expected_offset = 8360;
  } else {
    expected_offset = 9688;
  }

  if (offset != expected_offset) {
    printf("ABI bug: OrcProgram->code_exec should be at offset %d instead of %d\n",
        offset, expected_offset);
    error = 1;
  }

  return error;
}


--- 
+++ 
@@ -10,11 +10,11 @@
 
 int main (int argc, char *argv[])
 {
-  int offset;
+  long offset;
   int expected_offset;
   int error = 0;
 
-  offset = ((int) ((unsigned char *) &((OrcProgram*) 0)->code_exec));
+  offset = ((long) ((unsigned char *) &((OrcProgram*) 0)->code_exec));
 
   if (sizeof(void *) == 4) {
     expected_offset = 8360;
@@ -23,7 +23,7 @@
   }
 
   if (offset != expected_offset) {
-    printf("ABI bug: OrcProgram->code_exec should be at offset %d instead of %d\n",
+    printf("ABI bug: OrcProgram->code_exec should be at offset %ld instead of %d\n",
         offset, expected_offset);
     error = 1;
   }
tests: Fix compilation of the ABI test on 64 bit architectures

Casting a pointer to a plain int will cause a compiler error, use long instead.
