]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: remove use of RETSIGTYPE
authorMichael Forney <mforney@mforney.org>
Wed, 7 Apr 2021 09:37:15 +0000 (02:37 -0700)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 7 Apr 2021 14:01:05 +0000 (16:01 +0200)
This was previously defined by the obsolete AC_TYPE_SIGNAL macro,
which was removed in 2682e5f5. The deprecation text says

> Your code may safely assume C89 semantics that RETSIGTYPE is void.

So, remove it and just use void instead.

Closes #6861

19 files changed:
CMake/CurlTests.c
CMake/Platforms/WindowsCache.cmake
CMakeLists.txt
lib/Makefile.netware
lib/config-amigaos.h
lib/config-dos.h
lib/config-mac.h
lib/config-os400.h
lib/config-plan9.h
lib/config-riscos.h
lib/config-tpf.h
lib/config-vxworks.h
lib/config-win32.h
lib/config-win32ce.h
lib/curl_config.h.cmake
lib/curl_setup_once.h
lib/hostip.c
packages/vms/config_h.com
tests/server/util.c

index 949910d5e4159cbd57c52744f0df2711f2293dcb..2fcce1bb3833f3570bb2209ead25f06aa8900e36 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -214,24 +214,6 @@ if (sizeof (bool *) )
 #include <float.h>
 int main() { return 0; }
 #endif
-#ifdef RETSIGTYPE_TEST
-#include <sys/types.h>
-#include <signal.h>
-#ifdef signal
-# undef signal
-#endif
-#ifdef __cplusplus
-extern "C" void (*signal (int, void (*)(int)))(int);
-#else
-void (*signal ()) ();
-#endif
-
-int
-main ()
-{
-  return 0;
-}
-#endif
 #ifdef HAVE_INET_NTOA_R_DECL
 #include <arpa/inet.h>
 
index e1839991770681d8a769211385033a8dfaa84397..33c735a225f0b2e9b1d05fdbfe0db5f66164e89a 100644 (file)
@@ -132,7 +132,6 @@ if(NOT UNIX)
       set(HAVE_GETADDRINFO 0)
     endif()
     set(STDC_HEADERS 1)
-    set(RETSIGTYPE_TEST 1)
 
     set(HAVE_SIGACTION 0)
     set(HAVE_MACRO_SIGSETJMP 0)
index f75815af2d7b634ecdc4ab159cc23ad73cacdf3d..3a20028bad8a03365cfbea7b94dd02156654da1a 100644 (file)
@@ -1108,7 +1108,6 @@ foreach(CURL_TEST
     HAVE_IN_ADDR_T
     HAVE_BOOL_T
     STDC_HEADERS
-    RETSIGTYPE_TEST
     HAVE_INET_NTOA_R_DECL
     HAVE_INET_NTOA_R_DECL_REENTRANT
     HAVE_GETADDRINFO
@@ -1209,12 +1208,6 @@ if(HAVE_FIONBIO OR
   set(HAVE_DISABLED_NONBLOCKING)
 endif()
 
-if(RETSIGTYPE_TEST)
-  set(RETSIGTYPE void)
-else()
-  set(RETSIGTYPE int)
-endif()
-
 if(CMAKE_COMPILER_IS_GNUCC AND APPLE)
   include(CheckCCompilerFlag)
   check_c_compiler_flag(-Wno-long-double HAVE_C_FLAG_Wno_long_double)
index 10b77f8ffbd5467915821d68f3a73575539040a4..863bde0224bfac9190905447980f5090e0275044 100644 (file)
@@ -5,8 +5,8 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 2004 - 2015, Guenter Knauf
-# Copyright (C) 2001 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 2004 - 2015, 2021, Guenter Knauf
+# Copyright (C) 2001 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -599,7 +599,6 @@ endif
        @echo $(DL)#define HAVE_UTIME 1$(DL) >> $@
        @echo $(DL)#define HAVE_UTIME_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_WRITEV 1$(DL) >> $@
-       @echo $(DL)#define RETSIGTYPE void$(DL) >> $@
        @echo $(DL)#define SIZEOF_INT 4$(DL) >> $@
        @echo $(DL)#define SIZEOF_SHORT 2$(DL) >> $@
        @echo $(DL)#define SIZEOF_STRUCT_IN_ADDR 4$(DL) >> $@
index 3c9d76ef3db989cd6c21bc4ec54e34f4f740e2d1..381bf302c9fbb60c51e1d84589ba5b2e3461de75 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
 #define PACKAGE_VERSION "-"
 #define CURL_CA_BUNDLE "s:curl-ca-bundle.crt"
 
-#define RETSIGTYPE void
 #define SELECT_TYPE_ARG1 int
 #define SELECT_TYPE_ARG234 (fd_set *)
 #define SELECT_TYPE_ARG5 (struct timeval *)
index 50816ac7562564d8dd5240e55dc10792af43f051..0fb98e385d5c1f13cd86353d4d4f659230a52c7f 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -84,7 +84,6 @@
 
 #define NEED_MALLOC_H          1
 
-#define RETSIGTYPE             void
 #define SIZEOF_INT             4
 #define SIZEOF_LONG            4
 #define SIZEOF_LONG_DOUBLE     16
index 4e610562f64489e4cf7427f46b94e86525408916..163686ec941f3fc3fda9c09be92ff368bb4a7816 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -81,8 +81,6 @@
 #define HAVE_IOCTL              1
 #define HAVE_IOCTL_FIONBIO      1
 
-#define RETSIGTYPE void
-
 #define SIZEOF_INT              4
 #define SIZEOF_SHORT            2
 #define SIZEOF_SIZE_T           4
index 67fbc41d8bbb54dd0d47dd65fb0d46f4b4d72d95..b5a9823fd1f6b243a6245812150ab41a6751c04c 100644 (file)
 /* Name of package */
 #undef PACKAGE
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* The size of `int', as computed by sizeof. */
 #define SIZEOF_INT              4
 
index fc19c5f036fd09dadf6372b066b803c56f5835c7..ecfc27372244d47920268495037f42d49d807368 100644 (file)
@@ -40,8 +40,6 @@
 #define RANDOM_FILE "/dev/random"
 #define VERSION "0.0.0" /* TODO */
 
-#define RETSIGTYPE void
-
 #define STDC_HEADERS 1
 
 #ifdef _BITS64
index 43b1deb6d25c334ba1004392a1a5e348eece5b00..2dc3c663113baf1a62750cb421a073c5a1914773 100644 (file)
 /* Name of package */
 #undef PACKAGE
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* The size of `int', as computed by sizeof. */
 #define SIZEOF_INT 4
 
index 4f8a07e9bc76f651a46171d7a356ac225a3f0004..3fdb8924c5d7db3d98ee043e5e6b0cd2b5416c06 100644 (file)
 /* a suitable file to read random data from */
 /* #undef RANDOM_FILE */
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* Define to the type of arg 1 for `select'. */
 #define SELECT_TYPE_ARG1 int
 
index f8119528537a56f245e8e4eb3564fc55b029411e..c4925bb22313667416c49d01b901e00a985f7e36 100644 (file)
 /* Define to the function return type for recv. */
 #define RECV_TYPE_RETV int
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* Define to the type qualifier of arg 5 for select. */
 #define SELECT_QUAL_ARG5
 
index 0817ec5b1230cf70b4da133e9581084576858189..2e060f95c741d5379efc9c5192dda40086b67cc3 100644 (file)
 /* Define if in_addr_t is not an available 'typedefed' type. */
 #define in_addr_t unsigned long
 
-/* Define to the return type of signal handlers (int or void). */
-#define RETSIGTYPE void
-
 /* Define if ssize_t is not an available 'typedefed' type. */
 #ifndef _SSIZE_T_DEFINED
 #  if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
index 7f59fd562ba8bddb33f897c908023441f96734f2..fb29e088f67c52283e7dfdbe4fe3b3936ca82adb 100644 (file)
 /* Define this if in_addr_t is not an available 'typedefed' type */
 #define in_addr_t unsigned long
 
-/* Define as the return type of signal handlers (int or void).  */
-#define RETSIGTYPE void
-
 /* Define ssize_t if it is not an available 'typedefed' type */
 #if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
 #elif defined(_WIN64)
index fc1857ebb12fb7336b1e1600555bb88e4c23459e..d64c89ce34713dea340acbeb946ba1059ed9cfd6 100644 (file)
 /* Define to the function return type for recv. */
 #cmakedefine RECV_TYPE_RETV ${RECV_TYPE_RETV}
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#cmakedefine RETSIGTYPE ${RETSIGTYPE}
-
 /* Define to the type qualifier of arg 5 for select. */
 #cmakedefine SELECT_QUAL_ARG5 ${SELECT_QUAL_ARG5}
 
index ef60bc7ae78380f1d58ee4d0e01a6fa296d3c5bf..adf1e11f8d32d990c703286745b28c625a1eaa54 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -350,15 +350,6 @@ typedef int sig_atomic_t;
 #endif
 
 
-/*
- * Default return type for signal handlers.
- */
-
-#ifndef RETSIGTYPE
-#define RETSIGTYPE void
-#endif
-
-
 /*
  * Macro used to include code only in debug builds.
  */
index 34fb7db65e42bf314361efc23a4b5a65a20bd54a..05c09f6835fc8435442d3af8646d5eec5985016c 100644 (file)
@@ -631,7 +631,7 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
  * within a signal handler which is nonportable and could lead to problems.
  */
 static
-RETSIGTYPE alarmfunc(int sig)
+void alarmfunc(int sig)
 {
   /* this is for "-ansi -Wall -pedantic" to stop complaining!   (rabe) */
   (void)sig;
index 6973eacf17f70c4b95c19b7b04cf0d41bbbefb29..af97eb11839cde6cb8c3fbef01fe080e0f7bee6f 100644 (file)
@@ -28,7 +28,7 @@ $!
 $! This procedure may not guess the options correctly for all architectures,
 $! and is a work in progress.
 $!
-$! Copyright 2011 - 2020, John Malmberg
+$! Copyright 2011 - 2021, John Malmberg
 $!
 $! Permission to use, copy, modify, and/or distribute this software for any
 $! purpose with or without fee is hereby granted, provided that the above
@@ -1855,16 +1855,6 @@ $            write tf "#endif"
 $          goto cfgh_in_loop1
 $      endif
 $!
-$!     Process RETSIGTYPE directive
-$!----------------------------------
-$      if key2 .eqs. "RETSIGTYPE"
-$      then
-$          write tf "#ifndef RETSIGTYPE"
-$          write tf "#define RETSIGTYPE void"
-$          write tf "#endif"
-$          goto cfgh_in_loop1
-$      endif
-$!
 $!     Process STDC_HEADERS (SAMBA!)
 $!---------------------------
 $      if key2 .eqs. "STDC_HEADERS"
index bfd133cecc7603b2d405f229615d90c7d3d92304..c4f16e45129203b1b1c876e64f7175d1aea26c0e 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -543,7 +543,7 @@ long timediff(struct timeval newer, struct timeval older)
 
 /* vars used to keep around previous signal handlers */
 
-typedef RETSIGTYPE (*SIGHANDLER_T)(int);
+typedef void (*SIGHANDLER_T)(int);
 
 #ifdef SIGHUP
 static SIGHANDLER_T old_sighup_handler  = SIG_ERR;
@@ -591,7 +591,7 @@ HANDLE exit_event = NULL;
  * The first time this is called it will set got_exit_signal to one and
  * store in exit_signal the signal that triggered its execution.
  */
-static RETSIGTYPE exit_signal_handler(int signum)
+static void exit_signal_handler(int signum)
 {
   int old_errno = errno;
   logmsg("exit_signal_handler: %d", signum);