Module Name:    src
Committed By:   kamil
Date:           Thu Jun 22 13:35:47 UTC 2017

Modified Files:
        src/bin/ksh: c_ksh.c c_ulimit.c config.h misc.c

Log Message:
Drop HP-UX support from ksh(1)

OK by <kre>


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/c_ulimit.c
cvs rdiff -u -r1.10 -r1.11 src/bin/ksh/config.h
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/misc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.20 src/bin/ksh/c_ksh.c:1.21
--- src/bin/ksh/c_ksh.c:1.20	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/c_ksh.c	Thu Jun 22 13:35:47 2017
@@ -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 @@ c_print(wp)
 
 				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;

Index: src/bin/ksh/c_ulimit.c
diff -u src/bin/ksh/c_ulimit.c:1.12 src/bin/ksh/c_ulimit.c:1.13
--- src/bin/ksh/c_ulimit.c:1.12	Sat May  9 13:26:06 2015
+++ src/bin/ksh/c_ulimit.c	Thu Jun 22 13:35:47 2017
@@ -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 @@ c_ulimit(wp)
 #  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 */

Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.10 src/bin/ksh/config.h:1.11
--- src/bin/ksh/config.h:1.10	Thu Jun 22 13:34:48 2017
+++ src/bin/ksh/config.h	Thu Jun 22 13:35:47 2017
@@ -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
 

Index: src/bin/ksh/misc.c
diff -u src/bin/ksh/misc.c:1.18 src/bin/ksh/misc.c:1.19
--- src/bin/ksh/misc.c:1.18	Thu Jun 22 13:33:39 2017
+++ src/bin/ksh/misc.c	Thu Jun 22 13:35:47 2017
@@ -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 @@ reset_nonblock(fd)
 # 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 @@ ksh_get_wd(buf, bsize)
 	char *b;
 	char *ret;
 
-	/* Before memory allocated */
-	HPUX_GETWD_BUG_CODE
-
 	/* Assume getcwd() available */
 	if (!buf) {
 		bsize = MAXPATHLEN;
@@ -1338,9 +1316,6 @@ ksh_get_wd(buf, bsize)
 	char *b;
 	int len;
 
-	/* Before memory allocated */
-	HPUX_GETWD_BUG_CODE
-
 	if (buf && bsize > MAXPATHLEN)
 		b = buf;
 	else

Reply via email to