#! /bin/sh
# cd into emacs source root before applying this patch
[ -d lisp ] || echo "must be in emacs source root"
[ -d lisp ] || exit 1
patch -p1 <<EOF
Index: emacs/src/dispnew.c
diff -c emacs/src/dispnew.c:1.3 emacs/src/dispnew.c:1.4
*** emacs/src/dispnew.c:1.3	Wed Jul 31 01:37:21 1996
--- emacs/src/dispnew.c	Sat Aug  3 20:51:28 1996
***************
*** 1264,1284 ****
--- 1264,1292 ----
  #ifdef HAVE_WIN
    if (FRAME_WIN_P (f))
      {
+ #ifdef HAVE_X_WINDOWS
        if (FRAME_X_P (f))
          leftmost = downto = f->display.x->internal_border_width;
+ #endif
+ #ifdef HAVE_NS
        if (FRAME_NS_P (f))
          leftmost = downto = f->display.ns->internal_border_width;
+ #endif
        if (desired_frame->enable[0])
  	{
  	  current_frame->top_left_x[FRAME_HEIGHT (f) - 1] = leftmost;
+ #ifdef HAVE_X_WINDOWS
            if (FRAME_X_P (f))
              current_frame->top_left_y[FRAME_HEIGHT (f) - 1]
                = X_PIXEL_HEIGHT (f) - f->display.x->internal_border_width
  	      - current_frame->pix_height[FRAME_HEIGHT (f) - 1];
+ #endif
+ #ifdef HAVE_NS
            if (FRAME_NS_P (f))
              current_frame->top_left_y[FRAME_HEIGHT (f) - 1]
                = NS_PIXEL_HEIGHT (f) - f->display.ns->internal_border_width
  	      - current_frame->pix_height[FRAME_HEIGHT (f) - 1];
+ #endif
  	  current_frame->top_left_x[0] = leftmost;
  	  current_frame->top_left_y[0] = downto;
  	}
Index: emacs/src/multi-frame.c
diff -c emacs/src/multi-frame.c:1.3 emacs/src/multi-frame.c:1.4
*** emacs/src/multi-frame.c:1.3	Thu Aug  1 02:48:17 1996
--- emacs/src/multi-frame.c	Sat Aug  3 20:51:32 1996
***************
*** 871,876 ****
--- 871,877 ----
  {
    if (FRAME_WIN_P (selected_frame))
    {
+ #ifdef HAVE_X_WINDOWS
      if (EQ(Vwindow_system,Qx))
      {
        struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (selected_frame);
***************
*** 882,893 ****
--- 883,897 ----
          UNBLOCK_INPUT;
        }
      }
+ #endif
+ #ifdef HAVE_NS
      if (EQ(Vwindow_system,Qns))
      {
        BLOCK_INPUT;
        ns_unfocus_frame(ns_focus_frame);
        UNBLOCK_INPUT;
      }
+ #endif
    }
  
    return Qnil;
EOF trailing garbage...
