--- xview-3.2p1.4-19c.orig/Build-XView.bash	2005-03-28 20:16:58.000000000 +0200
+++ xview-3.2p1.4-19c/Build-XView.bash	2014-12-01 10:29:57.874707577 +0100
@@ -37,11 +37,12 @@
 
 # Variable-definitions appended by imake-wrapper
   XVDESTDIR      = $OWDEST
-  EXTRA_DEFINES  = -DOPENWINHOME_DEFAULT=\"$OPENWINHOME\"
+  EXTRA_DEFINES  = -DOPENWINHOME_DEFAULT=\"$OPENWINHOME\" -DSYSV_UCONTEXT -DANSI_FUNC_PROTO -D__openindiana__
   CONFIGDIR      = $X11DEST
   INCLUDES      := -I`pwd`/build/include $IMAKE_EXTRA_INCLUDES -I$OWDEST/include \$(INCLUDES)
   LOCAL_LDFLAGS := -L`pwd`/lib/libolgx -L`pwd`/lib/libxview $IMAKE_EXTRA_LOCAL_LDFLAGS -L$OWDEST/lib \$(LOCAL_LDFLAGS)
   MAKEOVERRIDES  =
+  MAKE           = /usr/bin/gmake
 # End of variable-definitions appended by imake-wrapper
 
 EOF
--- xview-3.2p1.4-19c.orig/lib/libxview/misc/gettext.c	2005-03-28 16:41:36.000000000 +0200
+++ xview-3.2p1.4-19c/lib/libxview/misc/gettext.c	2014-11-27 12:11:23.989184471 +0100
@@ -10,7 +10,9 @@
 #include <string.h>
 #include <xview_private/gettext.h>
 
+#if 0
 char * dgettext(char *, char *), *bindtextdomain();
+#endif
 char *_gettext();
 char *fgets(), *getenv();
 #if (!defined(__linux__) || !defined(__GLIBC__)) && !defined(__CYGWIN__)
@@ -133,6 +135,7 @@
     return (NULL);
 }
 
+#if 0
 char *
 bindtextdomain(domain_name, binding)
     char    *domain_name;
@@ -216,6 +219,7 @@
     bind->nextdomain = NULL;
     return (bind->binding);
 }
+#endif
 
 static char *
 findtextdomain(domain_name)
--- xview-3.2p1.4-19c.orig/lib/libxview/notify/sys_select.c	2005-03-28 16:41:00.000000000 +0200
+++ xview-3.2p1.4-19c/lib/libxview/notify/sys_select.c	2014-11-28 11:34:32.442288086 +0100
@@ -26,6 +26,7 @@
 #include <sys/types.h>
 #include <sys/syscall.h>
 #include <sys/poll.h>
+#include <poll.h>
 #include <sys/select.h>
 #endif /* SVR4 */
 #include <xview_private/ntfy.h>	/* For ntfy_assert */
@@ -168,7 +169,11 @@
      * Now do the poll.
      */
     n = p - pfd;		/* number of pollfd's */
+#if 0
     rv = syscall (SYS_poll, pfd, (u_long)n, ms);
+#else
+    rv = poll(pfd,n,ms);
+#endif
     if (rv < 0)		/* let 0 drop through so fs_set's get 0'ed */
 	    return (rv);
 
--- xview-3.2p1.4-19c.orig/lib/libxview/sel/sel_agent.c	2005-03-28 16:41:13.000000000 +0200
+++ xview-3.2p1.4-19c/lib/libxview/sel/sel_agent.c	2014-11-28 11:38:59.849438380 +0100
@@ -314,9 +314,11 @@
     struct stat     stat_buf;
     int             count, size;
     char           *destp;
+#if 0
 #ifndef __CYGWIN__
     extern long     lseek();
 #endif
+#endif
     if (fstat(fd, &stat_buf) != 0) {
 	perror(XV_MSG("Agent couldn't reply about a file"));
 	return SELN_FAILED;
--- xview-3.2p1.4-19c.orig/lib/libxview/textsw/txt_again.c	2005-03-28 16:40:33.000000000 +0200
+++ xview-3.2p1.4-19c/lib/libxview/textsw/txt_again.c	2014-12-01 10:35:07.052163496 +0100
@@ -177,7 +177,7 @@
  * Recording routines
  */
 
-#if defined __linux__ || defined __CYGWIN__
+#if defined __linux__ || defined __CYGWIN__ || defined __openindiana__
 /* The textsw_printf as written created a FILE struct, and called
  * _doprnt() to format the text to an XView internal buffer. If I
  * understand this correctly, it's just a replacement for vsprintf.
@@ -286,7 +286,6 @@
 }
 
 #else /* SVR4 */
-
 static int
 #ifdef ANSI_FUNC_PROTO
 textsw_printf(register string_t *ptr_to_string, register char  *fmt, ...)
@@ -643,7 +642,7 @@
  * Replaying routines
  */
 
-#if defined __linux__ || defined __CYGWIN__
+#if defined __linux__ || defined __CYGWIN__ || defined __openindiana__
 /* The textsw_scanf as written created a FILE struct, and called
  * _doscan() to do the scanning on the instring.
  * This depends heavily on the internal structure of FILE, and is not
--- xview-3.2p1.4-19c.orig/lib/libxview/textsw/txt_once.c	2005-03-28 16:40:33.000000000 +0200
+++ xview-3.2p1.4-19c/lib/libxview/textsw/txt_once.c	2014-11-28 12:08:26.848573936 +0100
@@ -1357,7 +1357,9 @@
 	    
 	xv_destroy(view->drop_site);
 	textsw_view_cleanup(view);
+#if 0
 	VIEW_PRIVATE(view_public) = NULL; /* WG Mar '95 */
+#endif
 	break;
 
       default:			/* Conservative in face of new cases. */
diff -Naur /home/metro/src.libxview/xview-3.2p1.4-19c/lib/libxview/notify/ntfy.h src.libxview/xview-3.2p1.4-19c/lib/libxview/notify/ntfy.h
--- xview-3.2p1.4-19c.orig/lib/libxview/notify/ntfy.h       2005-03-28 16:41:00.000000000 +0200
+++ xview-3.2p1.4-19c/lib/libxview/notify/ntfy.h   2014-11-28 11:11:05.000000000 +0100
@@ -31,9 +31,11 @@
 #include <sys/types.h>
 #include <xview_private/ultrix_cpt.h>
 #include <sys/time.h>
+#if 0
 #ifdef SVR4
 #include <sys/rusage.h>
 #endif
+#endif
 #include <sys/resource.h>
 #include <xview/notify.h>

