Subject: [clisp-list] Re: 2.32 compile problem on solaris

From: Bruno Haible <[email-masked]>
Date: Mon Mar 1 03:28:02 2004

> In file included from spvwtabs.d:25:
> constsym.d:623: structure has no member named `S_open64'
> constsym.d:623: initializer element is not constant
> constsym.d:623: (near initialization for `symbol_tab_data.S_open.GCself')
> constsym.d:1011: structure has no member named `S_truncate64'
> constsym.d:1011: initializer element is not constant
> constsym.d:1011: (near initialization for `symbol_tab_data.S_truncate.GCself')
> constsym.d:1017: structure has no member named `S_ftruncate64'
> constsym.d:1017: initializer element is not constant
> constsym.d:1017: (near initialization for `symbol_tab_data.S_ftruncate.GCself')

Thanks for reporting this. The appended patch should fix it.

Bruno

*** spvwtabs.d  23 Jun 2003 22:29:53 -0000      1.5
--- spvwtabs.d  1 Mar 2004 11:05:55 -0000
***************
*** 15,20 ****
--- 15,25 ----
  #undef write
  /* LISPBIBL.D does "#define export" */
  #undef export
+ /* Large File Support on some versions of Solaris does "#define open open64",
+    "#define truncate truncate64", "#define ftruncate ftruncate64" */
+ #undef open
+ #undef truncate
+ #undef ftruncate
  
  /* Table of all fixed symbols: */
  global struct symbol_tab_ symbol_tab_data
*** lisparit.d  23 Feb 2004 17:08:40 -0000      1.58
--- lisparit.d  1 Mar 2004 11:05:55 -0000
***************
*** 10,15 ****
--- 10,17 ----
  #define LISPARIT  /* in the following not only macros, but also functions */
  
  #undef LF         /* LF here does not mean 'Linefeed', but 'LongFloat' */
+ #undef truncate   /* undo a possible "#define truncate truncate64" from LFS */
+ #undef ftruncate  /* undo a possible "#define ftruncate ftruncate64" from LFS */

  /* UP: decides over number equality

---

From: Russell McManus <[email-masked]>
Date: Mon Mar 1 08:07:08 2004

Thanks for looking into this, Bruno.

I had one other problem on the same solaris machine, after applying
your previous patch (which btw seems to be working OK):

gcc -W -Wswitch -Wcomment -Wpointer-arith -Wimplicit -Wreturn-type  -Wno-sign-compare -O2 -fno-schedule-insns -fno-gcse -DUNIX_BINARY_DISTRIB -DUNICODE -DDYNAMIC_FFI -DDYNAMIC_MODULES -DNO_GETTEXT -DNO_SIGSEGV -I. -fPIC -I../ -c regexi.m.c -o regexi.o
In file included from regexi.c:7:
../clisp.h:560: parse error before `saved_back_trace'
../clisp.h:560: warning: type defaults to `int' in declaration of `saved_back_trace'
../clisp.h:560: warning: data definition has no type or storage class
../clisp.h:3511: warning: call-clobbered register used for global register variable

I moved the definition of saved_back_trace below the p_backtrace_t
struct definition in clisp.h, which seemed to work.

-russ

---

From: Sam Steingold <[email-masked]>
Date: Mon Mar 1 09:45:17 2004

> * Russell McManus <[email-masked]> [2004-03-01 10:54:10 -0500]:
>

please try the appended patch.
thanks.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.honestreporting.com>
Old Age Comes at a Bad Time.

--- genclisph.d.~1.95.~	2004-02-27 09:54:31.888619500 -0500
+++ genclisph.d	2004-03-01 12:30:46.235633600 -0500
@@ -1251,7 +1251,7 @@
   printf("extern object saved_value1;\n");
 #endif
 #ifdef HAVE_SAVED_back_trace
-  printf("extern p_backtrace_t saved_back_trace;\n");
+  printf("extern struct backtrace_t* saved_back_trace;\n");
 #endif
 #if defined(HAVE_SAVED_STACK)
   printf("extern gcv_object_t* saved_STACK;\n");