aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoratkawa7 <atkawa7@yahoo.com>2017-08-29 12:15:35 -0700
committeratkawa7 <atkawa7@yahoo.com>2017-08-29 12:15:35 -0700
commitadb8142329ad7cd53d21c311e414bf458bb46cd1 (patch)
treef534e69804e733fef03209019ab24b8d9c1aca5f
parent1362342f556087204eccd73fe39f5492090a3687 (diff)
downloadvcpkg-adb8142329ad7cd53d21c311e414bf458bb46cd1.tar.gz
vcpkg-adb8142329ad7cd53d21c311e414bf458bb46cd1.zip
[pthreads] Fix macros
-rw-r--r--ports/pthreads/CMakeLists.txt4
-rw-r--r--ports/pthreads/portfile.cmake3
2 files changed, 4 insertions, 3 deletions
diff --git a/ports/pthreads/CMakeLists.txt b/ports/pthreads/CMakeLists.txt
index d6eed5310..7ae6bcc34 100644
--- a/ports/pthreads/CMakeLists.txt
+++ b/ports/pthreads/CMakeLists.txt
@@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.9.0)
project(pthreads)
set(PTHREAD_PUBLIC_HEADERS pthread.h sched.h semaphore.h)
-set(PTHREAD_PRIVATE_HEADERS config.h implement.h need_errno.h)
set(PTHREAD_SHARED_SOURCES
autostatic.c
@@ -171,7 +170,7 @@ set(PTHREAD_STATIC_SOURCES
option(PTW32_ARCH "x32")
-add_definitions(-DPTW32_ARCH=${PTW32_ARCH} -DDPTW32_RC_MSC -DHAVE_PTW32_CONFIG_H -D_TIMESPEC_DEFINED)
+add_definitions(-DPTW32_ARCH=${PTW32_ARCH} -DPTW32_RC_MSC -DHAVE_PTW32_CONFIG_H -D_TIMESPEC_DEFINED)
if(BUILD_SHARED_LIBS)
set(PTHREAD_SOURCES ${PTHREAD_SHARED_SOURCES})
@@ -188,6 +187,7 @@ if(PTHREADS_BUILD_CPP)
elseif(PTHREADS_BUILD_SEH)
set(PTHREADS_EXCEPTION_SCHEME SE)
add_definitions(/__CLEANUP_SEH)
+else()
set(PTHREADS_EXCEPTION_SCHEME C)
endif()
diff --git a/ports/pthreads/portfile.cmake b/ports/pthreads/portfile.cmake
index 813554a87..cabf8a39b 100644
--- a/ports/pthreads/portfile.cmake
+++ b/ports/pthreads/portfile.cmake
@@ -23,7 +23,8 @@ vcpkg_copy_pdbs()
file(GLOB HEADERS "${CURRENT_PACKAGES_DIR}/include/*.h")
foreach(HEADER ${HEADERS})
file(READ "${HEADER}" _contents)
- string(REPLACE "!defined(_TIMESPEC_DEFINED)" "0" _contents "${_contents}")
+ string(REPLACE "defined(_TIMESPEC_DEFINED)" "1" _contents "${_contents}")
+ string(REPLACE "defined(PTW32_RC_MSC)" "1" _contents "${_contents}")
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
string(REPLACE "!defined(PTW32_STATIC_LIB)" "0" _contents "${_contents}")
endif()