From xemacs-m  Mon Jan 13 08:58:17 1997
Received: from teapot.netman.dk (teapot.netman.dk [193.88.72.6])
          by xemacs.org (8.8.4/8.8.4) with ESMTP
	  id IAA05547 for <xemacs-beta@xemacs.org>; Mon, 13 Jan 1997 08:58:01 -0600 (CST)
Received: from crow.netman.dk (crow.netman.dk [193.88.72.5]) by teapot.netman.dk (8.7.1/8.7.1) with ESMTP id PAA29367 for <xemacs-beta@xemacs.org>; Mon, 13 Jan 1997 15:57:14 +0100 (MET)
Received: (from tmadsen@localhost) by crow.netman.dk (8.7.1/8.7.1) id PAA07300; Mon, 13 Jan 1997 15:57:13 +0100 (MET)
To: xemacs-beta@xemacs.org
Subject: [19.15-b7] build problems on Digital UNIX V3.2D with native compiler
From: Tonny Madsen <Tonny.Madsen@netman.dk>
Date: 13 Jan 1997 15:57:11 +0100
Message-ID: <rriv51zkqg.fsf@crow.netman.dk>
Lines: 119
X-Mailer: Red Gnus v0.76/XEmacs 19.14

Build problem on Digital UNIX V3.2D with native compiler.

The native compiler for Digital UNIX V3.2D has a couple of problems
with 19.15-b7:

- alloca does not return a pointer that can be automatically casted.
  Need to change some assignments directly from alloca.
- stream_semi_canonicalize_console_connection&co not declared
- 'if (elt != Qnil)' not supported. Changed to 'NILP(elt)'

The following patch will fix the problems.

/tonny

diff -rc xemacs-19.15-b7-orig/src/buffer.h xemacs-19.15-b7/src/buffer.h
*** xemacs-19.15-b7-orig/src/buffer.h	Wed Dec 18 04:37:37 1996
--- xemacs-19.15-b7/src/buffer.h	Mon Jan 13 14:58:16 1997
***************
*** 1072,1078 ****
    __gseda_ptr__ = convert_to_external_format (string_data (__gseda_s__),   \
  					      string_length (__gseda_s__), \
  					      &__gseda_len__, fmt);	   \
!   (stick_value_here) = alloca (1 + __gseda_len__);			   \
    memcpy ((Extbyte *) stick_value_here, __gseda_ptr__, 1 + __gseda_len__); \
    (stick_len_here) = __gseda_len__;					   \
  } while (0)
--- 1072,1078 ----
    __gseda_ptr__ = convert_to_external_format (string_data (__gseda_s__),   \
  					      string_length (__gseda_s__), \
  					      &__gseda_len__, fmt);	   \
!   (stick_value_here) = (Extbyte *)alloca (1 + __gseda_len__);		   \
    memcpy ((Extbyte *) stick_value_here, __gseda_ptr__, 1 + __gseda_len__); \
    (stick_len_here) = __gseda_len__;					   \
  } while (0)
diff -rc xemacs-19.15-b7-orig/src/device.h xemacs-19.15-b7/src/device.h
*** xemacs-19.15-b7-orig/src/device.h	Wed Dec 18 04:48:23 1996
--- xemacs-19.15-b7/src/device.h	Mon Jan 13 15:30:04 1997
***************
*** 384,387 ****
--- 384,397 ----
  Lisp_Object find_nonminibuffer_frame_not_on_device (Lisp_Object device);
  void set_device_selected_frame (struct device *d, Lisp_Object frame);
  
+ /* called from console-tty.c */
+ Lisp_Object stream_semi_canonicalize_console_connection (Lisp_Object connection,
+ 							 Error_behavior errb);
+ Lisp_Object stream_canonicalize_console_connection (Lisp_Object connection,
+ 						    Error_behavior errb);
+ Lisp_Object stream_semi_canonicalize_device_connection (Lisp_Object connection,
+ 							Error_behavior errb);
+ Lisp_Object stream_canonicalize_device_connection (Lisp_Object connection,
+ 						   Error_behavior errb);
+ 
  #endif /* _XEMACS_DEVICE_H_ */
diff -rc xemacs-19.15-b7-orig/src/redisplay-x.c xemacs-19.15-b7/src/redisplay-x.c
*** xemacs-19.15-b7-orig/src/redisplay-x.c	Wed Dec 18 04:38:46 1996
--- xemacs-19.15-b7/src/redisplay-x.c	Mon Jan 13 15:30:45 1997
***************
*** 779,786 ****
    GC bgc, gc;
    int height;
    int len = Dynarr_length (buf);
!   unsigned char *text_storage = alloca (2 * len);
!   struct textual_run *runs = alloca (len * sizeof (struct textual_run));
    int nruns;
    int i;
    struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, findex);
--- 779,786 ----
    GC bgc, gc;
    int height;
    int len = Dynarr_length (buf);
!   unsigned char *text_storage = (unsigned char *)alloca (2 * len);
!   struct textual_run *runs = (struct textual_run *)alloca (len * sizeof (struct textual_run));
    int nruns;
    int i;
    struct face_cachel *cachel = WINDOW_FACE_CACHEL (w, findex);
diff -rc xemacs-19.15-b7-orig/src/toolbar.c xemacs-19.15-b7/src/toolbar.c
*** xemacs-19.15-b7-orig/src/toolbar.c	Sat Jan  4 22:20:29 1997
--- xemacs-19.15-b7/src/toolbar.c	Mon Jan 13 14:56:54 1997
***************
*** 1691,1697 ****
    elt = list1 (Fcons (list1 (Qtty), Qzero));
  #endif
  #ifdef HAVE_X_WINDOWS
!   if (elt != Qnil)
      elt = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)), elt);
    else
      elt = list1 (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)));
--- 1691,1697 ----
    elt = list1 (Fcons (list1 (Qtty), Qzero));
  #endif
  #ifdef HAVE_X_WINDOWS
!   if (!NILP(elt))
      elt = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)), elt);
    else
      elt = list1 (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_HEIGHT)));
***************
*** 1706,1712 ****
    elt = list1 (Fcons (list1 (Qtty), Qzero));
  #endif
  #ifdef HAVE_X_WINDOWS
!   if (elt != Qnil)
      elt = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)), elt);
    else
      elt = list1 (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)));
--- 1706,1712 ----
    elt = list1 (Fcons (list1 (Qtty), Qzero));
  #endif
  #ifdef HAVE_X_WINDOWS
!   if (!NILP(elt))
      elt = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)), elt);
    else
      elt = list1 (Fcons (list1 (Qx), make_int (DEFAULT_TOOLBAR_WIDTH)));


-- 
Tonny Madsen, NetMan a/s, Vandtaarnsvej 77, DK-2860 Soeborg, Denmark
E-mail: Tonny.Madsen@netman.dk 
Telephone: +45 39 66 40 20 Fax: +45 39 66 06 75

