Subject: [clisp-list] 64-bit CLISP on AIX 5.1?

From: Jason Riedy <[email-masked]>
Date: Sat May 10 12:41:09 2003

Has anyone succeeded in using CLISP from cvs on AIX 5.1 in 64-bit 
mode?  With appropriate twiddles, I can get it to work in 32-bit 
mode, but only with gcc.  (And libsigsegv's second test dies for
both compilers, too, even with o_vaddr changed to except[0].)

With gcc 3.2.1 and -maix64, and also with xlc 6.0.0.2 -q64, I run into
the following:
  ffcall/avcall/avcall-rs6000-aix.new.s: line 11: 1252-191 Only .llong should be used for relocatable expressions.

Patching up that one line to use .llong doesn't help.  Changing
the .long LT..__builtin_avcall-.__builtin_avcall line doesn't,
either.  Obviously I'm shooting in the dark.  Ideas?

And for 32-bit mode, gcc 3.2.1, stdint.h.in needs modified slightly.
This AIX seems to have sys/inttypes.h, and that file defines everything
needed.  The appended patch "works", but probably breaks for older AIX
versions.

Also, utils/gcc-cccp treats __func__ as a string literal, and it isn't.  
The utils/gcc-cccp/Makefile assumes cc is gcc, or at least understands
__func__.  Using gcc-2.95.2 for compiling cccp and 3.2.1 for the rest
works when CLISP is configured with --without-unicode.  Threading seems
unhappy; the mmap defs are strange.  And libcharset runs into the AIX
shared-library idiocy.  augh.

IBM defined boolean_t somewhere, so all definitions in CLISP die when 
using xlc.  There are also problems with the definition of struct 
in6_addr.  That's as far as I've gotten with xlc.

Jason

--- clisp/src/stdint.h.in       2002-07-26 14:49:56.000000000 -0700
+++ ../stdint.h.in      2003-05-09 21:25:24.000000000 -0700
@@ -30,7 +30,7 @@
 #include <limits.h>
 
 /* Get those types that are already defined in other system include files.  */
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__)||defined(_AIX)
 # include <sys/inttypes.h>
 #endif
 #if defined(__sun__)
@@ -40,7 +40,7 @@
 #  define NEED_SIGNED_INT_TYPES
 #endif
 
-#if !defined(__sun__)
+#if !( defined(__sun__) || defined(_AIX) )
 
 /* 7.18.1.1. Exact-width integer types */