#
CHECK_SYMBOL_EXISTS(CreateHardLinkA "windows.h" HAVE_CREATEHARDLINKA)
CHECK_SYMBOL_EXISTS(CreateHardLinkW "windows.h" HAVE_CREATEHARDLINKW)
+CHECK_SYMBOL_EXISTS(_CrtSetReportMode "crtdbg.h" HAVE__CrtSetReportMode)
CHECK_FUNCTION_EXISTS_GLIBC(chflags HAVE_CHFLAGS)
CHECK_FUNCTION_EXISTS_GLIBC(chown HAVE_CHOWN)
CHECK_FUNCTION_EXISTS_GLIBC(chroot HAVE_CHROOT)
/* Define to 1 if you have the <windows.h> header file. */
#cmakedefine HAVE_WINDOWS_H 1
+/* Define to 1 if you have _CrtSetReportMode in <crtdbg.h> */
+#cmakedefine HAVE__CrtSetReportMode 1
+
/* Define to 1 if you have the `wmemcmp' function. */
#cmakedefine HAVE_WMEMCMP 1
* a symptom that some capability is missing from libarchive itself.
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
-#if !defined(__GNUC__)
-#include <crtdbg.h>
-#endif
#include <io.h>
#include <windows.h>
#ifndef F_OK
#define int64_t __int64
#endif
+#if defined(HAVE__CrtSetReportMode)
+# include <crtdbg.h>
+#endif
+
#if defined(_WIN32) && !defined(__CYGWIN__)
void *GetFunctionKernel32(const char *name)
{
(void)argc; /* UNUSED */
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__GNUC__)
+#if defined(HAVE__CrtSetReportMode)
/* To stop to run the default invalid parameter handler. */
_set_invalid_parameter_handler(invalid_parameter_handler);
/* Disable annoying assertion message box. */
* a symptom that some capability is missing from libarchive itself.
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
-#if !defined(__GNUC__)
-#include <crtdbg.h>
-#endif
#include <io.h>
#include <windows.h>
#ifndef F_OK
#define int64_t __int64
#endif
+#if defined(HAVE__CrtSetReportMode)
+# include <crtdbg.h>
+#endif
+
#if defined(_WIN32) && !defined(__CYGWIN__)
void *GetFunctionKernel32(const char *name)
{
(void)argc; /* UNUSED */
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__GNUC__)
+#if defined(HAVE__CrtSetReportMode)
/* To stop to run the default invalid parameter handler. */
_set_invalid_parameter_handler(invalid_parameter_handler);
/* Disable annoying assertion message box. */
* a symptom that some capability is missing from libarchive itself.
*/
#if defined(_WIN32) && !defined(__CYGWIN__)
-#if !defined(__GNUC__)
-#include <crtdbg.h>
-#endif
#include <io.h>
#include <windows.h>
#ifndef F_OK
#define int64_t __int64
#endif
+#if defined(HAVE__CrtSetReportMode)
+# include <crtdbg.h>
+#endif
+
#if defined(_WIN32) && !defined(__CYGWIN__)
void *GetFunctionKernel32(const char *name)
{
(void)argc; /* UNUSED */
-#if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__GNUC__)
+#if defined(HAVE__CrtSetReportMode)
/* To stop to run the default invalid parameter handler. */
_set_invalid_parameter_handler(invalid_parameter_handler);
/* Disable annoying assertion message box. */