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 <stdlib.h>



details:   https://anonhg.NetBSD.org/src/rev/6b9c997c8773
branches:  trunk
changeset: 824912:6b9c997c8773
user:      kamil <kamil%NetBSD.org@localhost>
date:      Thu Jun 22 23:17:50 2017 +0000

description:
ksh: Drop support for systems without <stdlib.h>

No functional change.

diffstat:

 bin/ksh/config.h |   5 +----
 bin/ksh/sh.h     |  19 +++----------------
 2 files changed, 4 insertions(+), 20 deletions(-)

diffs (57 lines):

diff -r 0cbe1ae56f92 -r 6b9c997c8773 bin/ksh/config.h
--- a/bin/ksh/config.h  Thu Jun 22 23:15:05 2017 +0000
+++ b/bin/ksh/config.h  Thu Jun 22 23:17:50 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.h,v 1.19 2017/06/22 23:15:05 kamil Exp $        */
+/*     $NetBSD: config.h,v 1.20 2017/06/22 23:17:50 kamil Exp $        */
 
 /* config.h.  Generated automatically by configure.  */
 /* config.h.in.  Generated automatically from configure.in by autoheader.  */
@@ -292,9 +292,6 @@
 /* Define if you have the <stddef.h> header file.  */
 #define HAVE_STDDEF_H 1
 
-/* Define if you have the <stdlib.h> header file.  */
-#define HAVE_STDLIB_H 1
-
 /* Define if you have the <string.h> header file.  */
 #define HAVE_STRING_H 1
 
diff -r 0cbe1ae56f92 -r 6b9c997c8773 bin/ksh/sh.h
--- a/bin/ksh/sh.h      Thu Jun 22 23:15:05 2017 +0000
+++ b/bin/ksh/sh.h      Thu Jun 22 23:17:50 2017 +0000
@@ -1,10 +1,10 @@
-/*     $NetBSD: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $    */
+/*     $NetBSD: sh.h,v 1.14 2017/06/22 23:17:50 kamil Exp $    */
 
 /*
  * Public Domain Bourne/Korn shell
  */
 
-/* $Id: sh.h,v 1.13 2017/06/22 23:15:05 kamil Exp $ */
+/* $Id: sh.h,v 1.14 2017/06/22 23:17:50 kamil Exp $ */
 
 #include "config.h"    /* system and option configuration info */
 
@@ -23,20 +23,7 @@
 # include <stddef.h>
 #endif
 
-#ifdef HAVE_STDLIB_H
-# include <stdlib.h>
-#else
-/* just a useful subset of what stdlib.h would have */
-extern char * getenv  ARGS((const char *));
-extern void * malloc  ARGS((size_t));
-extern void * realloc ARGS((void *, size_t));
-extern int    free    ARGS((void *));
-extern int    exit    ARGS((int));
-extern int    rand    ARGS((void));
-extern void   srand   ARGS((unsigned int));
-extern int    atoi    ARGS((const char *));
-#endif /* HAVE_STDLIB_H */
-
+#include <stdlib.h>
 #include <unistd.h>
 
 #ifdef HAVE_STRING_H



Home | Main Index | Thread Index | Old Index