windows: Remove HAVE_MINIDUMP_TYPE test
authorAndres Freund <[email protected]>
Sun, 7 Aug 2022 16:36:01 +0000 (09:36 -0700)
committerAndres Freund <[email protected]>
Sun, 7 Aug 2022 16:36:01 +0000 (09:36 -0700)
We've relied on it being present for msvc for ages...

Reviewed-By: Thomas Munro <[email protected]>
Discussion: https://postgr.es/m/20220807012914[email protected]

configure
configure.ac
src/Makefile.global.in
src/backend/main/main.c
src/backend/port/win32/Makefile
src/include/pg_config.h.in
src/tools/msvc/Solution.pm

index cdd7a94160ac1cb0f64f01271a3117a974ac851c..8e7d4bd3ed8010dbe8196527ac9f10f00093cec0 100755 (executable)
--- a/configure
+++ b/configure
@@ -648,7 +648,6 @@ MSGFMT
 PG_CRC32C_OBJS
 CFLAGS_ARMV8_CRC32C
 CFLAGS_SSE42
-have_win32_dbghelp
 LIBOBJS
 ZSTD
 LZ4
@@ -16897,32 +16896,7 @@ esac
  ;;
 esac
 
-  ac_fn_c_check_type "$LINENO" "MINIDUMP_TYPE" "ac_cv_type_MINIDUMP_TYPE" "
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <string.h>
-#include <dbghelp.h>
-"
-if test "x$ac_cv_type_MINIDUMP_TYPE" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_MINIDUMP_TYPE 1
-_ACEOF
-
-pgac_minidump_type=yes
-else
-  pgac_minidump_type=no
 fi
-
-fi
-if test x"$pgac_minidump_type" = x"yes" ; then
-  have_win32_dbghelp=yes
-
-else
-  have_win32_dbghelp=no
-
-fi
-
 # Cygwin needs only a bit of that
 if test "$PORTNAME" = "cygwin"; then
   case " $LIBOBJS " in
index c3accc91a1987e82645380d63617ba7e5d9e0ea6..1b6c963cb119328dd45656b41508361a29acaca2 100644 (file)
@@ -1937,18 +1937,7 @@ if test "$PORTNAME" = "win32"; then
   AC_LIBOBJ(win32security)
   AC_LIBOBJ(win32setlocale)
   AC_LIBOBJ(win32stat)
-  AC_CHECK_TYPES(MINIDUMP_TYPE, [pgac_minidump_type=yes], [pgac_minidump_type=no], [
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <string.h>
-#include <dbghelp.h>])
-fi
-if test x"$pgac_minidump_type" = x"yes" ; then
-  AC_SUBST(have_win32_dbghelp,yes)
-else
-  AC_SUBST(have_win32_dbghelp,no)
 fi
-
 # Cygwin needs only a bit of that
 if test "$PORTNAME" = "cygwin"; then
   AC_LIBOBJ(dirmod)
index 14fdd4ef7b1f732a721b2d8d64486ccf2f52339a..0625b60c4348031e08003f0219b4269f82d9fdea 100644 (file)
@@ -547,9 +547,6 @@ host_cpu = @host_cpu@
 # Backend stack size limit has to be hard-wired on Windows (it's in bytes)
 WIN32_STACK_RLIMIT=4194304
 
-# Set if we have a working win32 crashdump header
-have_win32_dbghelp = @have_win32_dbghelp@
-
 DLSUFFIX = @DLSUFFIX@
 
 # Pull in platform-specific magic
index bb782fa1ec68603f6f29d41fdffa1c32dc9fa6e7..5a964a0db67aaead4077c5f0e9ef1e6b73dd36c2 100644 (file)
@@ -63,7 +63,7 @@ main(int argc, char *argv[])
     * If supported on the current platform, set up a handler to be called if
     * the backend/postmaster crashes with a fatal signal or exception.
     */
-#if defined(WIN32) && defined(HAVE_MINIDUMP_TYPE)
+#if defined(WIN32)
    pgwin32_install_crashdump_handler();
 #endif
 
index 90126f634ac6a1822858d3fbaab95d0752402cdd..61e0369d621a7efa58815d207a5c70e3398d886e 100644 (file)
@@ -13,11 +13,9 @@ top_builddir = ../../../..
 include $(top_builddir)/src/Makefile.global
 
 OBJS = \
+   crashdump.o \
    signal.o \
    socket.o \
    timer.o
-ifeq ($(have_win32_dbghelp), yes)
-OBJS += crashdump.o
-endif
 
 include $(top_srcdir)/src/backend/common.mk
index 1007b84fca1b6c89a79e03160dd066c14a10a358..fc5ad5fd658ca6a92538119ca313b04c63b341cb 100644 (file)
 /* Define to 1 if you have the `memset_s' function. */
 #undef HAVE_MEMSET_S
 
-/* Define to 1 if the system has the type `MINIDUMP_TYPE'. */
-#undef HAVE_MINIDUMP_TYPE
-
 /* Define to 1 if you have the `mkdtemp' function. */
 #undef HAVE_MKDTEMP
 
index ed03524e46c399a93819150db36505ae1138770d..383b8a7c629bca2c8d10e9973cbdb44723c1c807 100644 (file)
@@ -305,7 +305,6 @@ sub GenerateFiles
        HAVE_MBSTOWCS_L             => 1,
        HAVE_MEMORY_H               => 1,
        HAVE_MEMSET_S               => undef,
-       HAVE_MINIDUMP_TYPE          => 1,
        HAVE_MKDTEMP                => undef,
        HAVE_NETINET_TCP_H          => undef,
        HAVE_NET_IF_H               => undef,