Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ksh ksh: Drop support for systems without <unistd.h>
details: https://anonhg.NetBSD.org/src/rev/9251e057c756
branches: trunk
changeset: 354610:9251e057c756
user: kamil <kamil%NetBSD.org@localhost>
date: Thu Jun 22 23:15:05 2017 +0000
description:
ksh: Drop support for systems without <unistd.h>
This code wouldn't work for them anyway.
No functional change.
diffstat:
bin/ksh/config.h | 5 +----
bin/ksh/sh.h | 44 +++-----------------------------------------
2 files changed, 4 insertions(+), 45 deletions(-)
diffs (82 lines):
diff -r 83f7f1a70926 -r 9251e057c756 bin/ksh/config.h
--- a/bin/ksh/config.h Thu Jun 22 23:11:48 2017 +0000
+++ b/bin/ksh/config.h Thu Jun 22 23:15:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h,v 1.18 2017/06/22 23:11:48 kamil Exp $ */
+/* $NetBSD: config.h,v 1.19 2017/06/22 23:15:05 kamil Exp $ */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
@@ -23,9 +23,6 @@
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#define HAVE_SYS_WAIT_H 1
-/* Define if you have <unistd.h>. */
-#define HAVE_UNISTD_H 1
-
/* Define if on MINIX. */
/* #undef _MINIX */
diff -r 83f7f1a70926 -r 9251e057c756 bin/ksh/sh.h
--- a/bin/ksh/sh.h Thu Jun 22 23:11:48 2017 +0000
+++ b/bin/ksh/sh.h Thu Jun 22 23:15:05 2017 +0000
@@ -1,10 +1,10 @@
-/* $NetBSD: sh.h,v 1.12 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $ */
/*
* Public Domain Bourne/Korn shell
*/
-/* $Id: sh.h,v 1.12 2017/06/22 14:20:46 kamil Exp $ */
+/* $Id: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $ */
#include "config.h" /* system and option configuration info */
@@ -37,45 +37,7 @@
extern int atoi ARGS((const char *));
#endif /* HAVE_STDLIB_H */
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#else
-/* just a useful subset of what unistd.h would have */
-extern int access ARGS((const char *, int));
-extern int open ARGS((const char *, int, ...));
-extern int creat ARGS((const char *, mode_t));
-extern int read ARGS((int, char *, unsigned));
-extern int write ARGS((int, const char *, unsigned));
-extern off_t lseek ARGS((int, off_t, int));
-extern int close ARGS((int));
-extern int pipe ARGS((int []));
-extern int dup2 ARGS((int, int));
-extern int unlink ARGS((const char *));
-extern int fork ARGS((void));
-extern int execve ARGS((const char *, char * const[], char * const[]));
-extern int chdir ARGS((const char *));
-extern int kill ARGS((pid_t, int));
-extern char *getcwd(); /* no ARGS here - differs on different machines */
-extern int geteuid ARGS((void));
-extern int readlink ARGS((const char *, char *, int));
-extern int getegid ARGS((void));
-extern int getpid ARGS((void));
-extern int getppid ARGS((void));
-extern unsigned int sleep ARGS((unsigned int));
-extern int isatty ARGS((int));
-# ifdef POSIX_PGRP
-extern int getpgrp ARGS((void));
-extern int setpgid ARGS((pid_t, pid_t));
-# endif /* POSIX_PGRP */
-# ifdef BSD_PGRP
-extern int getpgrp ARGS((pid_t));
-extern int setpgrp ARGS((pid_t, pid_t));
-# endif /* BSD_PGRP */
-# ifdef SYSV_PGRP
-extern int getpgrp ARGS((void));
-extern int setpgrp ARGS((void));
-# endif /* SYSV_PGRP */
-#endif /* HAVE_UNISTD_H */
+#include <unistd.h>
#ifdef HAVE_STRING_H
# include <string.h>
Home |
Main Index |
Thread Index |
Old Index