zsh-workers
 help / color / mirror / code / Atom feed
From: Felipe Contreras <felipe.contreras@gmail.com>
To: zsh-workers@zsh.org
Cc: Felipe Contreras <felipe.contreras@gmail.com>
Subject: [PATCH 2/3] autoconf: remove deprecated functions
Date: Wed, 30 Dec 2020 23:41:30 -0600	[thread overview]
Message-ID: <20201231054131.682544-3-felipe.contreras@gmail.com> (raw)
In-Reply-To: <20201231054131.682544-1-felipe.contreras@gmail.com>

STDC_HEADERS and TIME_WITH_SYS_TIME are deprecated.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 Src/Modules/files.c |  6 ------
 Src/mem.c           | 16 ++++------------
 Src/zsh_system.h    | 21 ++-------------------
 configure.ac        |  4 +---
 4 files changed, 7 insertions(+), 40 deletions(-)

diff --git a/Src/Modules/files.c b/Src/Modules/files.c
index 7ebacba6c..a1d6f6bf2 100644
--- a/Src/Modules/files.c
+++ b/Src/Modules/files.c
@@ -32,12 +32,6 @@
 typedef int (*MoveFunc) _((char const *, char const *));
 typedef int (*RecurseFunc) _((char *, char *, struct stat const *, void *));
 
-#ifndef STDC_HEADERS
-extern int link _((const char *, const char *));
-extern int symlink _((const char *, const char *));
-extern int rename _((const char *, const char *));
-#endif
-
 struct recursivecmd;
 
 #include "files.pro"
diff --git a/Src/mem.c b/Src/mem.c
index 5951e57ed..25b2bbce7 100644
--- a/Src/mem.c
+++ b/Src/mem.c
@@ -1072,18 +1072,10 @@ zrealloc(void *ptr, size_t size)
 # endif
 #endif
 
-#if defined(_BSD) && !defined(STDC_HEADERS)
-# define FREE_RET_T   int
-# define FREE_ARG_T   char *
-# define FREE_DO_RET
-# define MALLOC_RET_T char *
-# define MALLOC_ARG_T size_t
-#else
-# define FREE_RET_T   void
-# define FREE_ARG_T   void *
-# define MALLOC_RET_T void *
-# define MALLOC_ARG_T size_t
-#endif
+#define FREE_RET_T   void
+#define FREE_ARG_T   void *
+#define MALLOC_RET_T void *
+#define MALLOC_ARG_T size_t
 
 /* structure for building free list in blocks holding small blocks */
 
diff --git a/Src/zsh_system.h b/Src/zsh_system.h
index 161b073b4..6f4efce96 100644
--- a/Src/zsh_system.h
+++ b/Src/zsh_system.h
@@ -235,16 +235,8 @@ char *alloca _((size_t));
 # include <errno.h>
 #endif
 
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-#  include <time.h>
-# endif
-#endif
+#include <sys/time.h>
+#include <time.h>
 
 /* This is needed by some old SCO unices */
 #if !defined(HAVE_STRUCT_TIMEZONE) && !defined(ZSH_OOT_MODULE)
@@ -279,16 +271,7 @@ struct timespec {
 # include <sys/times.h>
 #endif
 
-#if STDC_HEADERS || HAVE_STRING_H
 # include <string.h>
-/* An ANSI string.h and pre-ANSI memory.h might conflict.  */
-# if !STDC_HEADERS && HAVE_MEMORY_H
-#  include <memory.h>
-# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
-#else   /* not STDC_HEADERS and not HAVE_STRING_H */
-# include <strings.h>
-/* memory.h and strings.h conflict on some systems.  */
-#endif /* not STDC_HEADERS and not HAVE_STRING_H */
 
 #ifdef HAVE_LOCALE_H
 # include <locale.h>
diff --git a/configure.ac b/configure.ac
index 549cae3d6..c39915528 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,7 +28,7 @@ dnl
 AC_INIT
 AC_CONFIG_SRCDIR([Src/zsh.h])
 AC_PREREQ([2.69])
-AC_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
 
 dnl What version of zsh are we building ?
 . ${srcdir}/Config/version.mk
@@ -657,8 +657,6 @@ dnl ------------------
 dnl CHECK HEADER FILES
 dnl ------------------
 AC_HEADER_DIRENT
-AC_HEADER_STDC
-AC_HEADER_TIME
 AC_HEADER_STAT
 AC_HEADER_SYS_WAIT
 
-- 
2.30.0



  parent reply	other threads:[~2020-12-31  5:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-31  5:41 [PATCH 0/3] Build fixes Felipe Contreras
2020-12-31  5:41 ` [PATCH 1/3] src: fix build warnings Felipe Contreras
2021-01-02 11:22   ` Daniel Shahaf
2021-01-02 16:41     ` Mikael Magnusson
2021-01-02 18:30       ` Felipe Contreras
2021-01-04  5:14         ` Daniel Shahaf
2021-03-27 19:28           ` Lawrence Velázquez
2021-04-04  6:38             ` Jun. T
2020-12-31  5:41 ` Felipe Contreras [this message]
2021-03-27 19:37   ` [PATCH 2/3] autoconf: remove deprecated functions Lawrence Velázquez
2021-04-03 15:04     ` Lawrence Velázquez
2020-12-31  5:41 ` [PATCH 3/3] autoconf: prepare for 2.70 Felipe Contreras
2021-03-27 19:38   ` Lawrence Velázquez
2021-04-03 15:44     ` Lawrence Velázquez
2021-04-08 22:44       ` Oliver Kiddle
2021-04-09  4:18         ` Jun T
2021-04-09 20:08           ` Oliver Kiddle
2021-04-09 20:28             ` Peter Stephenson
2021-04-09 23:04               ` Bart Schaefer
2021-04-09 23:19                 ` Mikael Magnusson
2021-04-10  0:37                 ` Jun. T

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201231054131.682544-3-felipe.contreras@gmail.com \
    --to=felipe.contreras@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).