]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Get rid of the unused HAVE_SIG_ATOMIC_T et. al.
authorDan Fandrich <dan@coneharvesters.com>
Mon, 28 Jun 2021 15:30:32 +0000 (08:30 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Fri, 23 Jul 2021 19:40:42 +0000 (12:40 -0700)
It was added in 2006 but I see no evidence it was ever used.

15 files changed:
CMake/OtherTests.cmake
acinclude.m4
configure.ac
lib/Makefile.netware
lib/config-amigaos.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

index 466b5674a5bfa23844fc409f0f386629601fb1bd..7f369938f91f21af6068efc7540ad4a85c37d60c 100644 (file)
@@ -220,28 +220,6 @@ int main(void) {
   return 0;
 }" HAVE_STRUCT_TIMEVAL)
 
-set(HAVE_SIG_ATOMIC_T 1)
-set(CMAKE_REQUIRED_FLAGS)
-if(HAVE_SIGNAL_H)
-  set(CMAKE_REQUIRED_FLAGS "-DHAVE_SIGNAL_H")
-  set(CMAKE_EXTRA_INCLUDE_FILES "signal.h")
-endif()
-check_type_size("sig_atomic_t" SIZEOF_SIG_ATOMIC_T)
-if(HAVE_SIZEOF_SIG_ATOMIC_T)
-  check_c_source_compiles("
-    #ifdef HAVE_SIGNAL_H
-    #  include <signal.h>
-    #endif
-    int main(void) {
-      static volatile sig_atomic_t dummy = 0;
-      (void)dummy;
-      return 0;
-    }" HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
-  if(NOT HAVE_SIG_ATOMIC_T_NOT_VOLATILE)
-    set(HAVE_SIG_ATOMIC_T_VOLATILE 1)
-  endif()
-endif()
-
 if(HAVE_WINDOWS_H)
   set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
 else()
index 23c06d678af2ceda047fdd29bebb7546ad372941..277902daca7c80470fb51364562618f10a1b8f83 100644 (file)
@@ -1458,50 +1458,6 @@ AC_DEFUN([CURL_CHECK_STRUCT_TIMEVAL], [
 ])
 
 
-dnl TYPE_SIG_ATOMIC_T
-dnl -------------------------------------------------
-dnl Check if the sig_atomic_t type is available, and
-dnl verify if it is already defined as volatile.
-
-AC_DEFUN([TYPE_SIG_ATOMIC_T], [
-  AC_CHECK_HEADERS(signal.h)
-  AC_CHECK_TYPE([sig_atomic_t],[
-    AC_DEFINE(HAVE_SIG_ATOMIC_T, 1,
-      [Define to 1 if sig_atomic_t is an available typedef.])
-  ], ,[
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-  ])
-  case "$ac_cv_type_sig_atomic_t" in
-    yes)
-      #
-      AC_MSG_CHECKING([if sig_atomic_t is already defined as volatile])
-      AC_LINK_IFELSE([
-        AC_LANG_PROGRAM([[
-#ifdef HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-        ]],[[
-          static volatile sig_atomic_t dummy = 0;
-        ]])
-      ],[
-        AC_MSG_RESULT([no])
-        curl_cv_sig_atomic_t_volatile="no"
-      ],[
-        AC_MSG_RESULT([yes])
-        curl_cv_sig_atomic_t_volatile="yes"
-      ])
-      #
-      if test "$curl_cv_sig_atomic_t_volatile" = "yes"; then
-        AC_DEFINE(HAVE_SIG_ATOMIC_T_VOLATILE, 1,
-          [Define to 1 if sig_atomic_t is already defined as volatile.])
-      fi
-      ;;
-  esac
-])
-
-
 dnl TYPE_IN_ADDR_T
 dnl -------------------------------------------------
 dnl Check for in_addr_t: it is used to receive the return code of inet_addr()
index 8a8856df4f88b7a071a59c7f5a0700c55188e289..ec360bcc51c26cad9dd81c93f18179eab11981a2 100644 (file)
@@ -3205,8 +3205,6 @@ TYPE_IN_ADDR_T
 
 TYPE_SOCKADDR_STORAGE
 
-TYPE_SIG_ATOMIC_T
-
 CURL_CHECK_FUNC_SELECT
 
 CURL_CHECK_FUNC_RECV
index cf7904aa72ade2f5d2b51d57fc2934392e3020d6..92752128dab25da8a13fa7d9679e8b42750a579f 100644 (file)
@@ -580,7 +580,6 @@ endif
        @echo $(DL)#define HAVE_SETLOCALE 1$(DL) >> $@
        @echo $(DL)#define HAVE_SIGNAL 1$(DL) >> $@
        @echo $(DL)#define HAVE_SIGNAL_H 1$(DL) >> $@
-       @echo $(DL)#define HAVE_SIG_ATOMIC_T 1$(DL) >> $@
        @echo $(DL)#define HAVE_SOCKET 1$(DL) >> $@
        @echo $(DL)#define HAVE_STDLIB_H 1$(DL) >> $@
        @echo $(DL)#define HAVE_STRDUP 1$(DL) >> $@
index 0bbf4c41df5da6092bbfde421bd31f5b7983886f..842cbc247b178f80ccbfbe3c3a4edcef01a22d30 100644 (file)
@@ -55,7 +55,6 @@
 #define HAVE_SETJMP_H 1
 #define HAVE_SIGNAL 1
 #define HAVE_SIGNAL_H 1
-#define HAVE_SIG_ATOMIC_T 1
 #define HAVE_SOCKET 1
 #define HAVE_STRCASECMP 1
 #define HAVE_STRDUP 1
index c8833e30068906b751dd447ef0e851ff9cdddf92..22d32d480d9aa36a814f32ac8b8f736585450dfd 100644 (file)
@@ -67,7 +67,6 @@
 
 #define HAVE_SIGACTION          1
 #define HAVE_SIGNAL_H           1
-#define HAVE_SIG_ATOMIC_T       1
 
 #ifdef MACOS_SSL_SUPPORT
 #  define USE_OPENSSL           1
index cff9c3e6243100bb6c8af5ada8c0f90efa42c007..47b09465a1f268ce43645ccae9b7203b6999503b 100644 (file)
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H
 
-/* Define if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T
-
-/* Define if sig_atomic_t is already defined as volatile. */
-#undef HAVE_SIG_ATOMIC_T_VOLATILE
-
 /* Define if you have the `socket' function. */
 #define HAVE_SOCKET
 
index 9b98a6e249c32bc846ea49a9ac12c4c6ecdce9a7..dbe9b82af6eb99ddda7fe8a597c21a47638b489a 100644 (file)
 #define HAVE_SIGNAL 1
 #define HAVE_SIGNAL_H 1
 #define HAVE_SIGSETJMP 1
-#define HAVE_SIG_ATOMIC_T 1
 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
 #define HAVE_SOCKET 1
 #define HAVE_SSL_GET_SHUTDOWN 1
index 0535137befbb9848f237a7b2762bcfebaf313191..6c6ff45ead2f60139754bc3e1158f5562ce6455c 100644 (file)
 /* Define if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H
 
-/* Define if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T
-
-/* Define if sig_atomic_t is already defined as volatile. */
-#undef HAVE_SIG_ATOMIC_T_VOLATILE
-
 /* Define if you have the `socket' function. */
 #define HAVE_SOCKET
 
index ab29bfccc29ca09d037dbdf262a2830d891e8802..0562ec91e701f4917b6b845b351282ba9e88ed7b 100644 (file)
 /* Define to 1 if you have the <signal.h> header file. */
 #define HAVE_SIGNAL_H 1
 
-/* Define to 1 if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T 1
-
-/* Define to 1 if sig_atomic_t is already defined as volatile. */
-/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
-
 /* If you have sigsetjmp */
 /* #undef HAVE_SIGSETJMP */
 
index 22d2b964a4fcda07a3be78a87ac6c15113e5034c..042e67ee97f2af07c9b3ecf62a9520caaf60226c 100644 (file)
 /* Define to 1 if you have the sigsetjmp function or macro. */
 /* #undef HAVE_SIGSETJMP */
 
-/* Define to 1 if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T 1
-
-/* Define to 1 if sig_atomic_t is already defined as volatile. */
-/* #undef HAVE_SIG_ATOMIC_T_VOLATILE */
-
 /* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
 
index 244e5ae72376967634b1fbae2ca299b85f731c81..b6a6ced599db2dee3aad9d73a0b074ce40f8f7ce 100644 (file)
 /*                        OTHER HEADER INFO                         */
 /* ---------------------------------------------------------------- */
 
-/* Define if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T 1
-
 /* Define if you have the ANSI C header files. */
 #define STDC_HEADERS 1
 
index f3f02e720a11b4db3e91568e365e62bccbf62206..2c3ed4f0e3f364d93515d0e0ef18b361aadba8eb 100644 (file)
 /*                        OTHER HEADER INFO                         */
 /* ---------------------------------------------------------------- */
 
-/* Define if sig_atomic_t is an available typedef. */
-#define HAVE_SIG_ATOMIC_T 1
-
 /* Define if you have the ANSI C header files.  */
 #define STDC_HEADERS 1
 
index fa4f19c74ffa32b974ef18748552a21dc4f03763..89e11e18a64e7a355db6d0aeab45420512749bcc 100644 (file)
 /* Define to 1 if you have the sigsetjmp function or macro. */
 #cmakedefine HAVE_SIGSETJMP 1
 
-/* Define to 1 if sig_atomic_t is an available typedef. */
-#cmakedefine HAVE_SIG_ATOMIC_T 1
-
-/* Define to 1 if sig_atomic_t is already defined as volatile. */
-#cmakedefine HAVE_SIG_ATOMIC_T_VOLATILE 1
-
 /* Define to 1 if struct sockaddr_in6 has the sin6_scope_id member */
 #cmakedefine HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
 
index 22d0a063effd0a1a6725d9fc46bc58e746b79735..38018d23c7a4aaea0ce737af8121b08c7212391b 100644 (file)
@@ -323,26 +323,6 @@ struct timeval {
 
 #include "curl_ctype.h"
 
-/*
- * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
- */
-
-#ifndef HAVE_SIG_ATOMIC_T
-typedef int sig_atomic_t;
-#define HAVE_SIG_ATOMIC_T
-#endif
-
-
-/*
- * Convenience SIG_ATOMIC_T definition
- */
-
-#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
-#define SIG_ATOMIC_T static sig_atomic_t
-#else
-#define SIG_ATOMIC_T static volatile sig_atomic_t
-#endif
-
 
 /*
  * Macro used to include code only in debug builds.