Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/ksh Drop HP-UX support from ksh(1)



details:   https://anonhg.NetBSD.org/src/rev/1bf6fe13331d
branches:  trunk
changeset: 824893:1bf6fe13331d
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu Jun 22 13:35:47 2017 +0000

description:
Drop HP-UX support from ksh(1)

OK by <kre>

diffstat:

 bin/ksh/c_ksh.c    |   6 +++---
 bin/ksh/c_ulimit.c |   7 ++-----
 bin/ksh/config.h   |   6 +-----
 bin/ksh/misc.c     |  29 ++---------------------------
 4 files changed, 8 insertions(+), 40 deletions(-)

diffs (139 lines):

diff -r 605202ba6284 -r 1bf6fe13331d bin/ksh/c_ksh.c
--- a/bin/ksh/c_ksh.c   Thu Jun 22 13:34:48 2017 +0000
+++ b/bin/ksh/c_ksh.c   Thu Jun 22 13:35:47 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $ */
+/*     $NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $ */
 
 /*
  * built-in Korn commands: c_*
@@ -6,7 +6,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.20 2017/06/22 13:33:39 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.21 2017/06/22 13:35:47 kamil Exp $");
 #endif
 
 #include "sh.h"
@@ -325,7 +325,7 @@
 
                                switch ((c = *s++)) {
                                /* Oddly enough, \007 seems more portable than
-                                * \a (due to HP-UX cc, Ultrix cc, old pcc's,
+                                * \a (due to Ultrix cc, old pcc's,
                                 * etc.).
                                 */
                                case 'a': c = '\007'; break;
diff -r 605202ba6284 -r 1bf6fe13331d bin/ksh/c_ulimit.c
--- a/bin/ksh/c_ulimit.c        Thu Jun 22 13:34:48 2017 +0000
+++ b/bin/ksh/c_ulimit.c        Thu Jun 22 13:35:47 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $   */
+/*     $NetBSD: c_ulimit.c,v 1.13 2017/06/22 13:35:47 kamil Exp $      */
 
 /*
        ulimit -- handle "ulimit" builtin
@@ -20,7 +20,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: c_ulimit.c,v 1.12 2015/05/09 13:26:06 christos Exp $");
+__RCSID("$NetBSD: c_ulimit.c,v 1.13 2017/06/22 13:35:47 kamil Exp $");
 #endif
 
 
@@ -113,9 +113,6 @@
 #  ifdef UL_GETBREAK /* osf/1 */
                { "vmemory(maxaddr)", ULIMIT, UL_GETBREAK, -1, 1, 'v' },
 #  else /* UL_GETBREAK */
-#   ifdef UL_GETMAXBRK /* hpux */
-               { "vmemory(maxaddr)", ULIMIT, UL_GETMAXBRK, -1, 1, 'v' },
-#   endif /* UL_GETMAXBRK */
 #  endif /* UL_GETBREAK */
 # endif /* UL_GMEMLIM */
 #endif /* RLIMIT_VMEM */
diff -r 605202ba6284 -r 1bf6fe13331d bin/ksh/config.h
--- a/bin/ksh/config.h  Thu Jun 22 13:34:48 2017 +0000
+++ b/bin/ksh/config.h  Thu Jun 22 13:35:47 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.h,v 1.10 2017/06/22 13:34:48 kamil Exp $        */
+/*     $NetBSD: config.h,v 1.11 2017/06/22 13:35:47 kamil Exp $        */
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -194,10 +194,6 @@
 #define DEFAULT_PATH "/bin:/usr/bin:/sbin:/usr/sbin"
 #endif
 
-/* Define if your C library's getwd/getcwd function dumps core in unreadable
- * directories.  */
-/* #undef HPUX_GETWD_BUG */
-
 /* Include ksh features? */
 #define KSH 1
 
diff -r 605202ba6284 -r 1bf6fe13331d bin/ksh/misc.c
--- a/bin/ksh/misc.c    Thu Jun 22 13:34:48 2017 +0000
+++ b/bin/ksh/misc.c    Thu Jun 22 13:35:47 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: misc.c,v 1.18 2017/06/22 13:33:39 kamil Exp $  */
+/*     $NetBSD: misc.c,v 1.19 2017/06/22 13:35:47 kamil Exp $  */
 
 /*
  * Miscellaneous functions
@@ -6,7 +6,7 @@
 #include <sys/cdefs.h>
 
 #ifndef lint
-__RCSID("$NetBSD: misc.c,v 1.18 2017/06/22 13:33:39 kamil Exp $");
+__RCSID("$NetBSD: misc.c,v 1.19 2017/06/22 13:35:47 kamil Exp $");
 #endif
 
 
@@ -1284,25 +1284,6 @@
 # define MAXPATHLEN PATH
 #endif /* MAXPATHLEN */
 
-#ifdef HPUX_GETWD_BUG
-# include "ksh_dir.h"
-
-/*
- * Work around bug in hpux 10.x C library - getwd/getcwd dump core
- * if current directory is not readable.  Done in macro 'cause code
- * is needed in GETWD and GETCWD cases.
- */
-# define HPUX_GETWD_BUG_CODE \
-       { \
-           DIR *d = ksh_opendir("."); \
-           if (!d) \
-               return (char *) 0; \
-           closedir(d); \
-       }
-#else /* HPUX_GETWD_BUG */
-# define HPUX_GETWD_BUG_CODE
-#endif /* HPUX_GETWD_BUG */
-
 /* Like getcwd(), except bsize is ignored if buf is 0 (MAXPATHLEN is used) */
 char *
 ksh_get_wd(buf, bsize)
@@ -1313,9 +1294,6 @@
        char *b;
        char *ret;
 
-       /* Before memory allocated */
-       HPUX_GETWD_BUG_CODE
-
        /* Assume getcwd() available */
        if (!buf) {
                bsize = MAXPATHLEN;
@@ -1338,9 +1316,6 @@
        char *b;
        int len;
 
-       /* Before memory allocated */
-       HPUX_GETWD_BUG_CODE
-
        if (buf && bsize > MAXPATHLEN)
                b = buf;
        else



Home | Main Index | Thread Index | Old Index