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 with broken <sys/time....
details: https://anonhg.NetBSD.org/src/rev/c0869e876d08
branches: trunk
changeset: 354799:c0869e876d08
user: kamil <kamil%NetBSD.org@localhost>
date: Fri Jun 30 03:43:57 2017 +0000
description:
ksh: Drop support for systems with broken <sys/time.h> / <time.h>
diffstat:
bin/ksh/c_sh.c | 7 ++++---
bin/ksh/c_ulimit.c | 7 ++++---
bin/ksh/config.h | 11 +----------
bin/ksh/ksh_time.h | 27 ---------------------------
bin/ksh/mail.c | 9 +++++----
bin/ksh/main.c | 7 ++++---
bin/ksh/var.c | 9 +++++----
7 files changed, 23 insertions(+), 54 deletions(-)
diffs (207 lines):
diff -r ac31f1b1b45c -r c0869e876d08 bin/ksh/c_sh.c
--- a/bin/ksh/c_sh.c Fri Jun 30 03:35:16 2017 +0000
+++ b/bin/ksh/c_sh.c Fri Jun 30 03:43:57 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_sh.c,v 1.20 2017/06/30 03:23:18 kamil Exp $ */
+/* $NetBSD: c_sh.c,v 1.21 2017/06/30 03:43:57 kamil Exp $ */
/*
* built-in Bourne commands
@@ -6,14 +6,15 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_sh.c,v 1.20 2017/06/30 03:23:18 kamil Exp $");
+__RCSID("$NetBSD: c_sh.c,v 1.21 2017/06/30 03:43:57 kamil Exp $");
#endif
+#include <sys/time.h>
#include <sys/times.h>
+#include <time.h>
#include "sh.h"
#include "ksh_stat.h" /* umask() */
-#include "ksh_time.h"
static char *clocktos ARGS((clock_t t));
diff -r ac31f1b1b45c -r c0869e876d08 bin/ksh/c_ulimit.c
--- a/bin/ksh/c_ulimit.c Fri Jun 30 03:35:16 2017 +0000
+++ b/bin/ksh/c_ulimit.c Fri Jun 30 03:43:57 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_ulimit.c,v 1.15 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: c_ulimit.c,v 1.16 2017/06/30 03:43:57 kamil Exp $ */
/*
ulimit -- handle "ulimit" builtin
@@ -20,12 +20,13 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_ulimit.c,v 1.15 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: c_ulimit.c,v 1.16 2017/06/30 03:43:57 kamil Exp $");
#endif
+#include <sys/time.h>
+#include <time.h>
#include "sh.h"
-#include "ksh_time.h"
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif /* HAVE_SYS_RESOURCE_H */
diff -r ac31f1b1b45c -r c0869e876d08 bin/ksh/config.h
--- a/bin/ksh/config.h Fri Jun 30 03:35:16 2017 +0000
+++ b/bin/ksh/config.h Fri Jun 30 03:43:57 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h,v 1.49 2017/06/30 03:35:16 kamil Exp $ */
+/* $NetBSD: config.h,v 1.50 2017/06/30 03:43:57 kamil Exp $ */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
@@ -33,9 +33,6 @@
/* Define if `sys_siglist' is declared by <signal.h>. */
#define SYS_SIGLIST_DECLARED 1
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#define TIME_WITH_SYS_TIME 1
-
/* Define as the return value of signal handlers (0 or ). */
#define RETSIGVAL
@@ -57,9 +54,6 @@
/* Define if C compiler groks __attribute__((...)) (const, noreturn, format) */
#define HAVE_GCC_FUNC_ATTR 1
-/* Define if time() is declared in <time.h> */
-#define TIME_DECLARED 1
-
/* Define if sys_errlist[] and sys_nerr are in the C library */
#define HAVE_SYS_ERRLIST 1
@@ -196,9 +190,6 @@
/* Define if you have the <sys/resource.h> header file. */
#define HAVE_SYS_RESOURCE_H 1
-/* Define if you have the <sys/time.h> header file. */
-#define HAVE_SYS_TIME_H 1
-
/* Define if you have the <ulimit.h> header file. */
#define HAVE_ULIMIT_H
diff -r ac31f1b1b45c -r c0869e876d08 bin/ksh/ksh_time.h
--- a/bin/ksh/ksh_time.h Fri Jun 30 03:35:16 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/* $NetBSD: ksh_time.h,v 1.2 1997/01/12 19:12:01 tls Exp $ */
-
-#ifndef KSH_TIME_H
-# define KSH_TIME_H
-
-/* Wrapper around the ugly time.h,sys/time.h includes/ifdefs */
-/* $NetBSD: ksh_time.h,v 1.2 1997/01/12 19:12:01 tls Exp $ */
-
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else /* TIME_WITH_SYS_TIME */
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# include <time.h>
-# endif
-#endif /* TIME_WITH_SYS_TIME */
-
-#ifndef TIME_DECLARED
-extern time_t time ARGS((time_t *));
-#endif
-
-#ifndef CLK_TCK
-# define CLK_TCK 60 /* 60HZ */
-#endif
-#endif /* KSH_TIME_H */
diff -r ac31f1b1b45c -r c0869e876d08 bin/ksh/mail.c
--- a/bin/ksh/mail.c Fri Jun 30 03:35:16 2017 +0000
+++ b/bin/ksh/mail.c Fri Jun 30 03:43:57 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mail.c,v 1.5 2006/01/15 18:16:30 jschauma Exp $ */
+/* $NetBSD: mail.c,v 1.6 2017/06/30 03:43:57 kamil Exp $ */
/*
* Mailbox checking code by Robert J. Gibson, adapted for PD ksh by
@@ -7,16 +7,17 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mail.c,v 1.5 2006/01/15 18:16:30 jschauma Exp $");
+__RCSID("$NetBSD: mail.c,v 1.6 2017/06/30 03:43:57 kamil Exp $");
#endif
-
#include "config.h"
#ifdef KSH
+#include <sys/time.h>
+#include <time.h>
+
#include "sh.h"
#include "ksh_stat.h"
-#include "ksh_time.h"
#define MBMESSAGE "You have mail in $_"
diff -r ac31f1b1b45c -r c0869e876d08 bin/ksh/main.c
--- a/bin/ksh/main.c Fri Jun 30 03:35:16 2017 +0000
+++ b/bin/ksh/main.c Fri Jun 30 03:43:57 2017 +0000
@@ -1,13 +1,15 @@
-/* $NetBSD: main.c,v 1.18 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: main.c,v 1.19 2017/06/30 03:43:57 kamil Exp $ */
/*
* startup, main loop, environments and error handling
*/
#include <sys/cdefs.h>
+#include <sys/time.h>
#include <locale.h>
+#include <time.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.18 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: main.c,v 1.19 2017/06/30 03:43:57 kamil Exp $");
#endif
@@ -15,7 +17,6 @@
#include "sh.h"
#include "ksh_stat.h"
-#include "ksh_time.h"
extern char **environ;
diff -r ac31f1b1b45c -r c0869e876d08 bin/ksh/var.c
--- a/bin/ksh/var.c Fri Jun 30 03:35:16 2017 +0000
+++ b/bin/ksh/var.c Fri Jun 30 03:43:57 2017 +0000
@@ -1,17 +1,18 @@
-/* $NetBSD: var.c,v 1.17 2011/10/16 17:12:11 joerg Exp $ */
+/* $NetBSD: var.c,v 1.18 2017/06/30 03:43:57 kamil Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: var.c,v 1.17 2011/10/16 17:12:11 joerg Exp $");
+__RCSID("$NetBSD: var.c,v 1.18 2017/06/30 03:43:57 kamil Exp $");
#endif
+#include <sys/time.h>
+#include <time.h>
+#include <ctype.h>
#include "sh.h"
-#include "ksh_time.h"
#include "ksh_limval.h"
#include "ksh_stat.h"
-#include <ctype.h>
/*
* Variables
Home |
Main Index |
Thread Index |
Old Index