diff -u ./gllib/acl-internal.h.orig ./gllib/acl-internal.h
--- ./gllib/acl-internal.h.orig	2010-08-10 19:25:14.000000000 -0500
+++ ./gllib/acl-internal.h	2010-10-03 13:01:03.000000000 -0500
@@ -29,6 +29,12 @@
 #if defined HAVE_ACL && ! defined GETACLCNT && defined ACL_CNT
 # define GETACLCNT ACL_CNT
 #endif
+#ifdef __TANDEM
+typedef struct acl aclent_t;
+#define GETACL ACL_GET
+#define SETACL ACL_SET
+#endif
+
 
 /* On Linux, additional ACL related API is available in <acl/libacl.h>.  */
 #ifdef HAVE_ACL_LIBACL_H
diff -u ./gllib/arpa_inet.in.h.orig ./gllib/arpa_inet.in.h
--- ./gllib/arpa_inet.in.h.orig	2010-10-02 05:48:12.000000000 -0500
+++ ./gllib/arpa_inet.in.h	2010-10-04 09:51:10.000000000 -0500
@@ -68,8 +68,13 @@
 
    For more details, see the POSIX:2001 specification
    <http://www.opengroup.org/susv3xsh/inet_ntop.html>.  */
+#ifdef __TANDEM
+extern const char *inet_ntop (int af, const void *restrict src,
+                              char *restrict dst, size_t cnt)
+#else
 extern const char *inet_ntop (int af, const void *restrict src,
                               char *restrict dst, socklen_t cnt)
+#endif
      _GL_ARG_NONNULL ((2, 3));
 # endif
 #elif defined GNULIB_POSIXCHECK
diff -u ./gllib/copy-acl.c.orig ./gllib/copy-acl.c
--- ./gllib/copy-acl.c.orig	2010-08-10 19:25:14.000000000 -0500
+++ ./gllib/copy-acl.c	2010-10-04 07:24:41.000000000 -0500
@@ -290,7 +290,7 @@
     {
       count = (source_desc != -1
                ? facl (source_desc, GETACLCNT, 0, NULL)
-               : acl (src_name, GETACLCNT, 0, NULL));
+               : acl ((char *)src_name, GETACLCNT, 0, NULL));
 
       if (count < 0)
         {
@@ -319,7 +319,7 @@
 
       if ((source_desc != -1
            ? facl (source_desc, GETACL, count, entries)
-           : acl (src_name, GETACL, count, entries))
+           : acl ((char *)src_name, GETACL, count, entries))
           == count)
         break;
       /* Huh? The number of ACL entries changed since the last call.
@@ -354,7 +354,7 @@
     {
       ret = (dest_desc != -1
              ? facl (dest_desc, SETACL, count, entries)
-             : acl (dst_name, SETACL, count, entries));
+             : acl ((char *)dst_name, SETACL, count, entries));
       if (ret < 0 && saved_errno == 0)
         {
           saved_errno = errno;
diff -u ./gllib/errno.in.h.orig ./gllib/errno.in.h
--- ./gllib/errno.in.h.orig	2010-03-30 05:01:15.000000000 -0500
+++ ./gllib/errno.in.h	2010-10-04 07:51:01.000000000 -0500
@@ -98,6 +98,7 @@
 
 /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
    EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
+   Likewise, on NonStop Kernel, EDQUOT is not defined.
    Define them here.  Values >= 2000 seem safe to use: Solaris ESTALE = 151,
    HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
 
@@ -150,6 +151,11 @@
 #  define GNULIB_defined_ESTALE 1
 # endif
 
+# ifndef EDQUOT
+#  define EDQUOT    2009
+#  define GNULIB_defined_EDQUOT 1
+# endif
+
 # ifndef ECANCELED
 #  define ECANCELED 2008
 #  define GNULIB_defined_ECANCELED 1
diff -u ./gllib/fbufmode.c.orig ./gllib/fbufmode.c
--- ./gllib/fbufmode.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/fbufmode.c	2010-10-04 05:11:11.000000000 -0500
@@ -77,6 +77,12 @@
   if (fp->__linebuf)
     return _IOLBF;
   return (fp->__bufsize > 0 ? _IOFBF : _IONBF);
+#elif defined __TANDEM /* HP NonStop */
+  if (fp->_flag & _IOLBF)
+    return _IOLBF;
+  if (fp->_flag & _IONBF)
+    return _IONBF;
+  return _IOFBF;
 #else
  #error "Please port gnulib fbufmode.c to your platform! Look at the setvbuf implementation."
 #endif
diff -u ./gllib/file-has-acl.c.orig ./gllib/file-has-acl.c
--- ./gllib/file-has-acl.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/file-has-acl.c	2010-10-03 13:02:36.000000000 -0500
@@ -397,7 +397,7 @@
 
         for (;;)
           {
-            count = acl (name, GETACLCNT, 0, NULL);
+            count = acl ((char *)name, GETACLCNT, 0, NULL);
 
             if (count < 0)
               {
@@ -423,7 +423,7 @@
                 errno = ENOMEM;
                 return -1;
               }
-            if (acl (name, GETACL, count, entries) == count)
+            if (acl ((char *)name, GETACL, count, entries) == count)
               {
                 if (acl_nontrivial (count, entries))
                   {
diff -u ./gllib/fpurge.c.orig ./gllib/fpurge.c
--- ./gllib/fpurge.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/fpurge.c	2010-10-04 05:14:45.000000000 -0500
@@ -129,6 +129,11 @@
   /* Nothing in the buffer, next putc is nontrivial.  */
   fp->__put_limit = fp->__buffer;
   return 0;
+#elif defined __TANDEM /* HP NonStop */
+  fp->_ptr = fp->_base;
+  if (fp->_ptr != NULL)
+    fp->_cnt = 0;
+  return 0;
 # else
  #error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
 # endif
diff -u ./gllib/freadable.c.orig ./gllib/freadable.c
--- ./gllib/freadable.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/freadable.c	2010-10-04 05:28:30.000000000 -0500
@@ -39,6 +39,12 @@
   return (fp->_Mode & 0x1 /* _MOPENR */) != 0;
 #elif defined __MINT__              /* Atari FreeMiNT */
   return fp->__mode.__read;
+#elif defined __TANDEM /* HP NonStop */
+#if 0 /* ToDo */
+  return (fp->_flag & (_IORW | _IOREAD)) != 0;
+#else
+  return 0;
+#endif
 #else
  #error "Please port gnulib freadable.c to your platform! Look at the definition of fopen, fdopen on your system, then report this to bug-gnulib."
 #endif
diff -u ./gllib/freadahead.c.orig ./gllib/freadahead.c
--- ./gllib/freadahead.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/freadahead.c	2010-10-04 05:16:47.000000000 -0500
@@ -79,6 +79,12 @@
 #elif defined SLOW_BUT_NO_HACKS     /* users can define this */
   abort ();
   return 0;
+#elif defined __TANDEM /* HP NonStop */
+#if 0 /* ToDo */
+  if ((fp_->_flag & _IOWRT) != 0)
+    return 0;
+#endif
+  return fp->_cnt;
 #else
  #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
 #endif
diff -u ./gllib/freading.c.orig ./gllib/freading.c
--- ./gllib/freading.c.orig	2010-05-02 06:17:08.000000000 -0500
+++ ./gllib/freading.c	2010-10-04 07:27:20.000000000 -0500
@@ -60,6 +60,12 @@
 # else
   return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/);
 # endif
+#elif defined __TANDEM
+#if 0 /* ToDo */
+  return (fp->_flag & _IOREAD) != 0;
+#else
+    return 0;
+#endif
 #else
  #error "Please port gnulib freading.c to your platform!"
 #endif
diff -u ./gllib/freadptr.c.orig ./gllib/freadptr.c
--- ./gllib/freadptr.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/freadptr.c	2010-10-04 05:18:38.000000000 -0500
@@ -97,6 +97,16 @@
   /* This implementation is correct on any ANSI C platform.  It is just
      awfully slow.  */
   return NULL;
+#elif defined __TANDEM /* HP NonStop */
+#if 0 /* ToDo */
+  if ((fp_->_flag & _IOWRT) != 0)
+    return NULL;
+#endif
+  size = fp->_cnt;
+  if (size == 0)
+    return NULL;
+  *sizep = size;
+  return (const char *) fp->_ptr;
 #else
  #error "Please port gnulib freadptr.c to your platform! Look at the definition of fflush, fread, getc, getc_unlocked on your system, then report this to bug-gnulib."
 #endif
diff -u ./gllib/freadseek.c.orig ./gllib/freadseek.c
--- ./gllib/freadseek.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/freadseek.c	2010-10-04 05:03:23.000000000 -0500
@@ -56,6 +56,9 @@
 #elif defined __MINT__              /* Atari FreeMiNT */
   fp->__bufp += increment;
 #elif defined SLOW_BUT_NO_HACKS     /* users can define this */
+#elif defined __TANDEM /* HP NonStop */
+  fp->_ptr += increment;
+  fp->_cnt -= increment;
 #else
  #error "Please port gnulib freadseek.c to your platform! Look at the definition of getc, getc_unlocked on your system, then report this to bug-gnulib."
 #endif
diff -u ./gllib/fseterr.c.orig ./gllib/fseterr.c
--- ./gllib/fseterr.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/fseterr.c	2010-10-04 07:30:02.000000000 -0500
@@ -68,6 +68,8 @@
       close (fd2);
     }
   errno = saved_errno;
+#elif defined __TANDEM /* HP NonStop */
+  fp->_flag |= 64; /* found by experiment ... */
 #else
  #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
 #endif
diff -u ./gllib/fwritable.c.orig ./gllib/fwritable.c
--- ./gllib/fwritable.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/fwritable.c	2010-10-04 07:34:47.000000000 -0500
@@ -39,6 +39,12 @@
   return (fp->_Mode & 0x2 /* _MOPENW */) != 0;
 #elif defined __MINT__              /* Atari FreeMiNT */
   return fp->__mode.__write;
+#elif defined __TANDEM /* HP NonStop */
+#if 0 /* ToDo */
+  return (fp->_flag & (_IORW | _IOWRT)) != 0;
+#else
+  return 0;
+#endif
 #else
  #error "Please port gnulib fwritable.c to your platform! Look at the definition of fopen, fdopen on your system, then report this to bug-gnulib."
 #endif
diff -u ./gllib/fwriting.c.orig ./gllib/fwriting.c
--- ./gllib/fwriting.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/fwriting.c	2010-10-04 07:36:05.000000000 -0500
@@ -50,6 +50,12 @@
 # else
   return (fp->__buffer < fp->__put_limit /*|| fp->__bufp == fp->__get_limit ??*/);
 # endif
+#elif defined __TANDEM /* HP NonStop */
+#if 0 /* ToDo */
+  return (fp->_flag & _IOWRT) != 0;
+#else
+  return 0;
+#endif
 #else
  #error "Please port gnulib fwriting.c to your platform!"
 #endif
diff -u ./gllib/pty.in.h.orig ./gllib/pty.in.h
--- ./gllib/pty.in.h.orig	2010-09-10 04:53:13.000000000 -0500
+++ ./gllib/pty.in.h	2010-10-04 05:07:20.000000000 -0500
@@ -41,6 +41,9 @@
 
 /* Get 'struct termios' and 'struct winsize'.  */
 #include <termios.h>
+#ifdef __TANDEM
+#include <stropts.h>
+#endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
diff -u ./gllib/set-mode-acl.c.orig ./gllib/set-mode-acl.c
--- ./gllib/set-mode-acl.c.orig	2010-03-06 04:00:52.000000000 -0600
+++ ./gllib/set-mode-acl.c	2010-10-03 11:35:12.000000000 -0500
@@ -384,7 +384,7 @@
     if (desc != -1)
       ret = facl (desc, SETACL, sizeof (entries) / sizeof (aclent_t), entries);
     else
-      ret = acl (name, SETACL, sizeof (entries) / sizeof (aclent_t), entries);
+      ret = acl ((char *)name, SETACL, sizeof (entries) / sizeof (aclent_t), entries);
     if (ret < 0)
       {
         if (errno == ENOSYS || errno == EOPNOTSUPP)
diff -u ./gllib/spawni.c.orig ./gllib/spawni.c
--- ./gllib/spawni.c.orig	2010-01-01 03:50:43.000000000 -0600
+++ ./gllib/spawni.c	2010-10-03 11:50:53.000000000 -0500
@@ -132,6 +132,11 @@
   }
 }
 
+#ifndef NSIG
+#ifdef __TANDEM
+#define NSIG 34
+#endif
+#endif
 
 /* Spawn a new process executing PATH with the attributes describes in *ATTRP.
    Before running the process perform the actions described in FILE-ACTIONS. */
diff -u ./gllib/sys_select.in.h.orig ./gllib/sys_select.in.h
--- ./gllib/sys_select.in.h.orig	2010-03-07 20:24:46.000000000 -0600
+++ ./gllib/sys_select.in.h	2010-10-04 09:25:54.000000000 -0500
@@ -66,6 +66,9 @@
 #if !@HAVE_SYS_SELECT_H@ || @REPLACE_SELECT@
 /* A platform that lacks <sys/select.h>.  */
 # include <sys/socket.h>
+# ifdef __TANDEM /* HP NonStop */
+#  include <sys/time.h> /* for fd_set and friends */
+# endif
 #endif
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
diff -u ./gllib/sys_socket.in.h.orig ./gllib/sys_socket.in.h
--- ./gllib/sys_socket.in.h.orig	2010-10-02 05:48:12.000000000 -0500
+++ ./gllib/sys_socket.in.h	2010-10-04 10:04:16.000000000 -0500
@@ -91,6 +91,8 @@
   __ss_aligntype __ss_align;  /* Force desired alignment.  */
   char __ss_padding[_SS_PADSIZE];
 };
+#elif __TANDEM
+#define ss_family __ss_family
 #endif
 
 #if @HAVE_SYS_SOCKET_H@
diff -u ./gllib/unistd.in.h.orig ./gllib/unistd.in.h
--- ./gllib/unistd.in.h.orig	2010-08-09 15:47:58.000000000 -0500
+++ ./gllib/unistd.in.h	2010-10-04 10:34:40.000000000 -0500
@@ -49,6 +49,9 @@
 # include <winsock2.h>
 # undef _GL_INCLUDING_WINSOCK2_H
 #endif
+#ifdef __TANDEM
+#include <netdb.h>
+#endif
 
 #if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H
 #define _GL_UNISTD_H
diff -u ./gltests/test-gethostname.c.orig ./gltests/test-gethostname.c
--- ./gltests/test-gethostname.c.orig	2010-01-31 10:29:44.000000000 -0600
+++ ./gltests/test-gethostname.c	2010-10-04 12:22:24.000000000 -0500
@@ -16,6 +16,9 @@
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include <config.h>
+#ifdef __TANDEM
+#define HOST_NAME_MAX 64 /* like MAXHOSTNAMELEN in <arpa/nameser.h> */
+#endif
 
 /* Get gethostname() declaration.  */
 #include <unistd.h>
