]> andersk Git - openssh.git/commitdiff
- (bal) Changed from GNU rx to PCRE on suggestion from djm.
authormouring <mouring>
Wed, 18 Oct 2000 00:02:25 +0000 (00:02 +0000)
committermouring <mouring>
Wed, 18 Oct 2000 00:02:25 +0000 (00:02 +0000)
 - (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki
   <nakaji@tutrp.tut.ac.jp>

ChangeLog
INSTALL
acconfig.h
compat.c
configure.in
defines.h
includes.h
news4-posix.c [new file with mode: 0644]
news4-posix.h [new file with mode: 0644]
pty.c

index 2070718cce9126276a82d2812d9f0a0eab4f15c2..3d3a04a93855ce58720eb4857518f0220ee181c2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,9 @@
  - (djm) Don't rely on atomicio's retval to determine length of askpass
    supplied passphrase. Problem report from Lutz Jaenicke
    <Lutz.Jaenicke@aet.TU-Cottbus.DE>
+ - (bal) Changed from GNU rx to PCRE on suggestion from djm.
+ - (bal) Integrated Sony NEWS-OS patches from NAKAJI Hirouyuki 
+   <nakaji@tutrp.tut.ac.jp>
 
 20001016
  - (djm) Sync with OpenBSD:
diff --git a/INSTALL b/INSTALL
index b201eccd54770c8137a153e2f2a98f82f7964aa8..9112b92b57f21eab1e8a201847ff1da77186a738 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -40,8 +40,8 @@ ftp://ftp.gnu.org/gnu/make/
 OpenSSH has only been tested with GNU make. It may work with other
 'make' programs, but you are on your own.
 
-GNU rx:
-ftp:://ftp.gnu.org/gnu/rx/
+pcre (POSIX Regular Expression library):
+ftp://ftp.cus.cam.ac.uk/pub/software/programs/pcre/
 
 Most platforms do not required this.  However older 4.3 BSD do not
 have a posix regex library. 
index d212b90f7a37279ad09c34f63041e8b6affd149f..0837eb3f455292b47b9f31e98cf57ebc532d45cf 100644 (file)
@@ -52,8 +52,8 @@
 /* Define if you are on Cygwin */
 #undef HAVE_CYGWIN
 
-/* Define if you lack native POSIX regex and you are using GNU rx library */
-#undef HAVE_LIBRX
+/* Define if you lack native POSIX regex and you are using PCRE */
+#undef HAVE_LIBPCRE
 
 /* Define if you have a broken realpath. */
 #undef BROKEN_REALPATH
@@ -61,6 +61,9 @@
 /* Define if you are on NeXT */
 #undef HAVE_NEXT
 
+/* Define if you are on NEWS-OS */
+#undef HAVE_NEWS4
+
 /* Define if you want to disable PAM support */
 #undef DISABLE_PAM
 
 /* Use IPv4 for connection by default, IPv6 can still if explicity asked */
 #undef IPV4_DEFAULT
 
+/* If you have no atexit() but xatexit(), and want to use xatexit() */
+#undef HAVE_XATEXIT
+
 /* getaddrinfo is broken (if present) */
 #undef BROKEN_GETADDRINFO
 
index 0e12b77c6300c423b0ae8b6c0870a67e188815fd..49bc0519ab219489f5e5ac938d90754b533c90bd 100644 (file)
--- a/compat.c
+++ b/compat.c
@@ -29,8 +29,8 @@ RCSID("$OpenBSD: compat.c,v 1.25 2000/10/14 12:16:56 markus Exp $");
 #include "packet.h"
 #include "xmalloc.h"
 #include "compat.h"
-#ifdef HAVE_LIBRX
-#  include <rxposix.h>
+#ifdef HAVE_LIBPCRE
+#  include <pcreposix.h>
 #else /* Use native regex libraries */
 #  include <regex.h>
 #endif /* HAVE_LIBRX */
index c859b66d21a2f39bdad48317177163e6fdadc615..1a57583fa1eb42c197171fda69475797a4df96f4 100644 (file)
@@ -119,6 +119,13 @@ case "$host" in
        AC_DEFINE(PAM_TTY_KLUDGE)
        inet6_default_4in6=yes
        ;;
+mips-sony-bsd|mips-sony-newsos4)
+       AC_DEFINE(HAVE_NEWS4)
+       SONY=1
+       AC_CHECK_LIB(iberty, xatexit, AC_DEFINE(HAVE_XATEXIT),
+               AC_MSG_ERROR([*** libiberty missing - please install first ***])
+        )
+       ;;
 *-*-netbsd*)
        need_dash_r=1
        ;;
@@ -257,7 +264,8 @@ AC_ARG_WITH(libs,
 # Checks for libraries.
 AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first ***]))
 AC_CHECK_LIB(util, login, AC_DEFINE(HAVE_LIBUTIL_LOGIN) LIBS="$LIBS -lutil")
-AC_CHECK_LIB(rx, regcomp, AC_DEFINE(HAVE_LIBRX) LIBS="$LIBS -lrx")
+AC_CHECK_LIB(pcre, pcre_info, 
+       AC_DEFINE(HAVE_LIBPCRE) LIBS="$LIBS -lpcreposix -lpcre")
 
 if test -z "$no_libsocket" ; then
        AC_CHECK_LIB(nsl, yp_match, , )
@@ -490,6 +498,11 @@ else
        fi
 fi
 
+# Cheap hack to ensure NEWS-OS libraries are arranged right.
+if test ! -z "$SONY" ; then
+  LIBS="$LIBS -liberty";
+fi
+
 # Checks for data types
 AC_CHECK_SIZEOF(char, 1)
 AC_CHECK_SIZEOF(short int, 2)
index 323ff29b57d9599ef3978c7a6a66f346053734a5..79d98e2e067165714270555107ffd8c93a6f3d95 100644 (file)
--- a/defines.h
+++ b/defines.h
@@ -354,6 +354,10 @@ struct winsize {
 
 #if !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT)
 # define atexit(a) on_exit(a)
+#else
+# if defined(HAVE_XATEXIT)
+#  define atexit(a) xatexit(a)
+# endif /* defined(HAVE_XATEXIT) */
 #endif /* !defined(HAVE_ATEXIT) && defined(HAVE_ON_EXIT) */
 
 #if defined(HAVE_VHANGUP) && !defined(BROKEN_VHANGUP)
index 797c5e851e163b3d4505bbf1262907489d434c5b..9160663263c954e829d6a1811a4e3aa40885465a 100644 (file)
@@ -20,6 +20,7 @@ static /**/const char *const rcsid[] = { (char *)rcsid, "\100(#)" msg }
 #include "config.h"
 
 #include "next-posix.h"
+#include "news4-posix.h"
 
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/news4-posix.c b/news4-posix.c
new file mode 100644 (file)
index 0000000..b1a289f
--- /dev/null
@@ -0,0 +1,39 @@
+#include "config.h"
+
+#ifdef HAVE_NEWS4
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include <sys/fcntl.h>
+#include <sys/ioctl.h>
+#include <sys/time.h>
+#include <sys/file.h>
+#include <errno.h>
+#include <termios.h>
+#include <sys/wait.h>
+
+#include "xmalloc.h"
+#include "ssh.h"
+#include "news4-posix.h"
+
+int
+waitpid(int    pid, int        *stat_loc, int  options)
+{
+       if (pid <= 0) {
+               if (pid != -1) {
+                       errno = EINVAL;
+                       return -1;
+               }
+               pid = 0;        /* wait4() expects pid=0 for indiscriminate wait. */
+       }
+       return wait4(pid, (union wait *)stat_loc, options, NULL);
+}
+
+#endif /* HAVE_NEWS4 */
diff --git a/news4-posix.h b/news4-posix.h
new file mode 100644 (file)
index 0000000..8740679
--- /dev/null
@@ -0,0 +1,35 @@
+/*
+ * Defines and prototypes specific to News4 system
+ */
+
+#ifndef _NEWS4_POSIX_H
+#define _NEWS4_POSIX_H
+
+#ifdef HAVE_NEWS4
+
+#include <sys/wait.h>
+
+typedef long   clock_t;
+
+/* FILE */
+#define O_NONBLOCK      00004   /* non-blocking open */
+
+/* WAITPID */
+#undef WIFEXITED
+#undef WIFSTOPPED
+#undef WIFSIGNALED
+
+#define _W_INT(w)      (*(int*)&(w))   /* convert union wait to int */
+#define WIFEXITED(w)   (!((_W_INT(w)) & 0377))
+#define WIFSTOPPED(w)  ((_W_INT(w)) & 0100)
+#define WIFSIGNALED(w) (!WIFEXITED(w) && !WIFSTOPPED(w))
+#define WEXITSTATUS(w) (int)(WIFEXITED(w) ? ((_W_INT(w) >> 8) & 0377) : -1)
+#define WTERMSIG(w)    (int)(WIFSIGNALED(w) ? (_W_INT(w) & 0177) : -1)
+#define WCOREFLAG      0x80
+#define WCOREDUMP(w)   ((_W_INT(w)) & WCOREFLAG)
+
+int waitpid(int pid,int *stat_loc,int options);
+#define setsid() setpgrp(0, getpid())
+
+#endif /* HAVE_NEWS4 */
+#endif /* _NEWS4_POSIX_H */
diff --git a/pty.c b/pty.c
index cbbe5845e046c8f15c6eadc5d22412dd6aa5f052..04004d20f672ec3ab05a88b2363f6bc02b68e40b 100644 (file)
--- a/pty.c
+++ b/pty.c
@@ -242,6 +242,10 @@ pty_make_controlling_tty(int *ttyfd, const char *ttyname)
         */
        ioctl(*ttyfd, TIOCSCTTY, NULL);
 #endif /* TIOCSCTTY */
+#ifdef HAVE_NEWS4
+       if (setpgrp(0,0) < 0)
+               error("SETPGRP %s",strerror(errno));
+#endif /* HAVE_NEWS4 */
 #ifdef USE_VHANGUP
        old = signal(SIGHUP, SIG_IGN);
        vhangup();
This page took 0.081753 seconds and 5 git commands to generate.