mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-23 02:50:08 +03:00
build: Don't check for pthread.h
The Autotools build still checks for pthread.h (and zlib.h and lzma.h) but the result isn't needed in config.h.
This commit is contained in:
parent
cc03c069f5
commit
e1291059af
@ -293,12 +293,6 @@ add_library(LibXml2::LibXml2 ALIAS LibXml2)
|
||||
|
||||
target_compile_definitions(LibXml2 PRIVATE SYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}")
|
||||
|
||||
if(LIBXML2_WITH_THREADS)
|
||||
if(NOT WIN32)
|
||||
check_include_files(pthread.h HAVE_PTHREAD_H)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(
|
||||
LibXml2
|
||||
PUBLIC
|
||||
|
@ -21,9 +21,6 @@
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#cmakedefine HAVE_POLL_H 1
|
||||
|
||||
/* Define to 1 if you have the <pthread.h> header file. */
|
||||
#cmakedefine HAVE_PTHREAD_H 1
|
||||
|
||||
/* Have shl_load based dso */
|
||||
#cmakedefine HAVE_SHLLOAD 1
|
||||
|
||||
|
@ -711,9 +711,7 @@ else
|
||||
WITH_THREADS="1"
|
||||
if test "$ac_cv_search_pthread_create" != "none required"; then
|
||||
THREAD_LIBS=$ac_cv_search_pthread_create
|
||||
fi
|
||||
AC_DEFINE([HAVE_PTHREAD_H], [],
|
||||
[Define if <pthread.h> is there])]))
|
||||
fi]))
|
||||
LIBS=$_libs
|
||||
;;
|
||||
esac
|
||||
|
@ -310,7 +310,6 @@ endif
|
||||
### threads
|
||||
if want_threads
|
||||
threads_dep = dependency('threads')
|
||||
config_h.set10(sys_windows ? 'HAVE_WIN32_THREADS' : 'HAVE_PTHREAD_H', true)
|
||||
xml_deps += threads_dep
|
||||
else
|
||||
threads_dep = dependency('', required: false)
|
||||
|
11
runtest.c
11
runtest.c
@ -4420,7 +4420,7 @@ testThread(void)
|
||||
return (res);
|
||||
}
|
||||
|
||||
#elif defined HAVE_PTHREAD_H
|
||||
#else
|
||||
#include <pthread.h>
|
||||
|
||||
static pthread_t tid[MAX_ARGC];
|
||||
@ -4469,15 +4469,6 @@ testThread(void)
|
||||
}
|
||||
return (res);
|
||||
}
|
||||
|
||||
#else
|
||||
static int
|
||||
testThread(void)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Specific platform thread support not detected\n");
|
||||
return (-1);
|
||||
}
|
||||
#endif
|
||||
static int
|
||||
threadsTest(const char *filename ATTRIBUTE_UNUSED,
|
||||
|
@ -59,8 +59,6 @@ CFLAGS = $(CFLAGS) -tWR
|
||||
!endif
|
||||
!if "$(WITH_THREADS)" == "ctls"
|
||||
CFLAGS = $(CFLAGS) "-DXML_THREAD_LOCAL=__declspec(thread)"
|
||||
!else if "$(WITH_THREADS)" == "posix"
|
||||
CFLAGS = $(CFLAGS) -DHAVE_PTHREAD_H
|
||||
!endif
|
||||
|
||||
# The linker and its options.
|
||||
|
@ -42,9 +42,6 @@ CFLAGS += -I$(XML_SRCDIR) -I$(XML_SRCDIR)/include -I$(INCPREFIX) $(INCLUDE)
|
||||
ifeq ($(WITH_THREADS),ctls)
|
||||
CFLAGS += "-DXML_THREAD_LOCAL=__declspec(thread)"
|
||||
endif
|
||||
ifeq ($(WITH_THREADS),posix)
|
||||
CFLAGS += -DHAVE_PTHREAD_H
|
||||
endif
|
||||
|
||||
# The linker and its options.
|
||||
LD = gcc.exe
|
||||
|
@ -44,8 +44,6 @@ CFLAGS = /nologo /D "_WINDOWS" /D "_MBCS" /D "NOLIBTOOL" /W3 /wd4244 /wd4267 $(C
|
||||
CFLAGS = $(CFLAGS) /I$(XML_SRCDIR) /I$(XML_SRCDIR)\include /I$(INCPREFIX)
|
||||
!if "$(WITH_THREADS)" == "ctls"
|
||||
CFLAGS = $(CFLAGS) /D "XML_THREAD_LOCAL=__declspec(thread)"
|
||||
!else if "$(WITH_THREADS)" == "posix"
|
||||
CFLAGS = $(CFLAGS) /D "HAVE_PTHREAD_H"
|
||||
!endif
|
||||
CFLAGS = $(CFLAGS) /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user