From 7c362de3d778b70dff798a33f5b088bdb5d49f68 Mon Sep 17 00:00:00 2001 From: "Kasper F. Brandt" Date: Thu, 12 Feb 2015 21:38:39 +0100 Subject: [PATCH 01/22] Fix wrong flag to rm when deleting intermediates folder. Fixes #243 --- build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sh b/build.sh index f8ce4aa1c83a..8f2f2d84164a 100755 --- a/build.sh +++ b/build.sh @@ -41,7 +41,7 @@ clean() # Cleanup intermediates folder if [ -d "$__IntermediatesDir" ]; then - rm -f "$__IntermediatesDir" + rm -r "$__IntermediatesDir" fi mkdir -p "$__IntermediatesDir" From e06690f4e3b64fcb1be3fa346babb4ae811c6d3d Mon Sep 17 00:00:00 2001 From: shahid-pk Date: Fri, 13 Feb 2015 05:00:11 +0500 Subject: [PATCH 02/22] Correctly locate Clang [Fixes 243] Addressing comments --- build.sh | 3 ++- src/pal/tools/setup-compiler-clang.sh | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index f8ce4aa1c83a..db2de40e1db7 100755 --- a/build.sh +++ b/build.sh @@ -57,7 +57,8 @@ check_prereqs() hash cmake 2>/dev/null || { echo >&2 "Please install cmake before running this script"; exit 1; } # Check for clang - hash clang 2>/dev/null || { echo >&2 "Please install clang before running this script"; exit 1; } + hash clang-3.5 2>/dev/null || hash clang 2>/dev/null || { echo >&2 "Please install clang before running this script"; exit 1; } + } build_coreclr() diff --git a/src/pal/tools/setup-compiler-clang.sh b/src/pal/tools/setup-compiler-clang.sh index 7e33e8c6dcea..15427b797d66 100755 --- a/src/pal/tools/setup-compiler-clang.sh +++ b/src/pal/tools/setup-compiler-clang.sh @@ -3,5 +3,15 @@ # This file sets the environment to be used for building with clang. # -export CC="$(which clang)" -export CXX="$(which clang++)" +if which clang-3.5 > /dev/null 2>&1 + then + export CC="$(which clang-3.5)" + export CXX="$(which clang++-3.5)" +elif which clang > /dev/null 2>&1 + then + export CC="$(which clang)" + export CXX="$(which clang++)" +else + echo "Unable to find Clang Compiler" + exit 1 +fi From cd34607cfe4e30833a9bbce30574ed4db728f96f Mon Sep 17 00:00:00 2001 From: Henry Baba-Weiss Date: Fri, 13 Feb 2015 09:08:05 -0800 Subject: [PATCH 03/22] Add definition of "COMPLUS" to the glossary In the same vein as "COR" and "URT", the terms "COM+"/"COMPLUS" appear frequently throughout the codebase, most notably in config settings (e.g. "COMPLUS_DefaultVersion"). I couldn't find any other explanation for what this means, and since I remember learning about it myself by asking older members of the team, I thought it would be helpful to have this documented for newcomers to the codebase. --- Documentation/glossary.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/glossary.md b/Documentation/glossary.md index 7458d9595794..91c8a1d27cc4 100644 --- a/Documentation/glossary.md +++ b/Documentation/glossary.md @@ -6,6 +6,7 @@ This glossary defines terms, both common and more niche, that are important to u As much as possible, we should link to the most authoritative and recent source of information for a term. That approach should be the most helpful for people who want to learn more about a topic. * CLR: Common Language Runtime +* COMPLUS: An early name for the .NET platform, back when it was envisioned as a successor to the COM platform (hence, "COM+"). Used in various places in the CLR infrastructure, most prominently as a common prefix for the names of internal configuration settings. Note that this is different from the product that eventually ended up being named [COM+](https://msdn.microsoft.com/en-us/library/windows/desktop/ms685978.aspx). * COR: [Common Object Runtime](http://www.danielmoth.com/Blog/mscorlibdll.aspx). The name of .NET before it was named .NET. * DAC: Data Access Component. An abstraction layer over the internal structures in the runtime. * EE: Execution Engine. @@ -14,4 +15,4 @@ As much as possible, we should link to the most authoritative and recent source * SVR: The CLR used to be built as two variants, with one called "mscorsvr.dll", to mean the "server" version. In particular, it contained the server GC implementation, which was intended for multi-threaded apps capable of taking advantage of multiple processors. In the .NET Framework 2 release, the two variants were merged into "mscorwks.dll". The WKS version was the default, however the SVR version remained available. * URT: Universal Runtime. Ancient name for what ended up being .NET, is used in the WinError facility name FACILITY_URT. * VM: Virtual machine. -* WKS: The CLR used to be built as two variants, with one called "mscorwks.dll", to mean the "workstation" version. In particular, it contained the client GC implementation, which was intended for single-threaded apps, independent of how many processors were on the machine. In the .NET Framework 2 release, the two variants were merged into "mscorwks.dll". The WKS version was the default, however the SVR version remained available. \ No newline at end of file +* WKS: The CLR used to be built as two variants, with one called "mscorwks.dll", to mean the "workstation" version. In particular, it contained the client GC implementation, which was intended for single-threaded apps, independent of how many processors were on the machine. In the .NET Framework 2 release, the two variants were merged into "mscorwks.dll". The WKS version was the default, however the SVR version remained available. From faeedee8fa8c9dfb973eee5bebb0c2cd211d4bb9 Mon Sep 17 00:00:00 2001 From: Alex Ghiondea Date: Fri, 13 Feb 2015 10:56:56 -0800 Subject: [PATCH 04/22] Update the CoreCLR nuspec to deploy the files under the aspnetcore5 folder. --- ...icrosoft.DotNet.CoreCLR.Development.nuspec | 40 +++++++++---------- src/.nuget/Microsoft.DotNet.CoreCLR.nuspec | 18 ++++----- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec b/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec index faf2c8e9ca9a..b8306b760b0f 100644 --- a/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec +++ b/src/.nuget/Microsoft.DotNet.CoreCLR.Development.nuspec @@ -2,7 +2,7 @@ Microsoft.DotNet.CoreCLR.Development - 1.0.1-prerelease + 1.0.2-prerelease Microsoft DotNet CoreCLR Runtime For Component Development Microsoft Microsoft @@ -15,25 +15,25 @@ Copyright © Microsoft Corporation - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/src/.nuget/Microsoft.DotNet.CoreCLR.nuspec b/src/.nuget/Microsoft.DotNet.CoreCLR.nuspec index c58e26471df8..a41c89cd9c5e 100644 --- a/src/.nuget/Microsoft.DotNet.CoreCLR.nuspec +++ b/src/.nuget/Microsoft.DotNet.CoreCLR.nuspec @@ -2,7 +2,7 @@ Microsoft.DotNet.CoreCLR - 1.0.0-prerelease + 1.0.2-prerelease Microsoft DotNet CoreCLR Runtime Microsoft Microsoft @@ -15,13 +15,13 @@ Copyright © Microsoft Corporation - - - - - - - - + + + + + + + + From 95d9e32a51d307e98ac8a64c23824a1e2be67781 Mon Sep 17 00:00:00 2001 From: Matt Mitchell Date: Fri, 13 Feb 2015 12:26:31 -0800 Subject: [PATCH 05/22] When building debug, author the development package with an appropriate name --- build.proj | 6 ++- ...ft.DotNet.CoreCLR.Debug.Development.nuspec | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100644 src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec diff --git a/build.proj b/build.proj index e6ad3c5d8823..b1d6dfacaf2b 100644 --- a/build.proj +++ b/build.proj @@ -46,12 +46,14 @@ - + + - + + diff --git a/src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec b/src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec new file mode 100644 index 000000000000..d879548cea28 --- /dev/null +++ b/src/.nuget/Microsoft.DotNet.CoreCLR.Debug.Development.nuspec @@ -0,0 +1,43 @@ + + + + Microsoft.DotNet.CoreCLR.Debug.Development + 1.0.2-prerelease + Microsoft DotNet CoreCLR Runtime For Component Development + Microsoft + Microsoft + http://go.microsoft.com/fwlink/?LinkId=329770 + https://github.com/dotnet/coreclr + http://go.microsoft.com/fwlink/?LinkID=288859 + true + Provides the CoreCLR runtime binaries with debug information and interface headers + Initial release + Copyright © Microsoft Corporation + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 4bbce085beb2053fef4cfe3e75a8086a1b2c8c9d Mon Sep 17 00:00:00 2001 From: Stephen Toub Date: Fri, 13 Feb 2015 15:36:51 -0500 Subject: [PATCH 06/22] Implement CreateSemaphoreExA/W Any managed code that touches the ThreadPool is currently crashing when the ThreadPool tries to initialize. This is due to it creating a semaphore via CreateSemaphoreExA/W in the pal, and those functions not being implemented. This commit just implements those functions by delegating to their non-Ex counterparts. With this change, ThreadPool.QueueUserWorkItem, Task.Run, etc. are able to successfully schedule work and have it executed. --- src/pal/inc/pal.h | 11 ++++++++++ src/pal/src/synchobj/semaphore.cpp | 34 ++++++++++++++++++++++-------- 2 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h index b5ee386516c2..22a4cf21c974 100644 --- a/src/pal/inc/pal.h +++ b/src/pal/inc/pal.h @@ -1489,6 +1489,17 @@ CreateSemaphoreA( IN LONG lMaximumCount, IN LPCSTR lpName); +PALIMPORT +HANDLE +PALAPI +CreateSemaphoreExA( + IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, + IN LONG lInitialCount, + IN LONG lMaximumCount, + IN LPCSTR lpName, + IN /*_Reserved_*/ DWORD dwFlags, + IN DWORD dwDesiredAccess); + PALIMPORT HANDLE PALAPI diff --git a/src/pal/src/synchobj/semaphore.cpp b/src/pal/src/synchobj/semaphore.cpp index 64905ad48452..a5fe3b89ff3c 100644 --- a/src/pal/src/synchobj/semaphore.cpp +++ b/src/pal/src/synchobj/semaphore.cpp @@ -61,7 +61,7 @@ CAllowedObjectTypes aotSempahore(otiSemaphore); CreateSemaphoreExA Note: -lpSemaphoreAttributes currentely ignored: +lpSemaphoreAttributes currently ignored: -- Win32 object security not supported -- handles to semaphore objects are not inheritable @@ -75,11 +75,20 @@ CreateSemaphoreExA( IN LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, IN LONG lInitialCount, IN LONG lMaximumCount, - IN LPCSTR lpName) + IN LPCSTR lpName, + IN /*_Reserved_*/ DWORD dwFlags, + IN DWORD dwDesiredAccess) { - // TODO: Implement this! - ERROR("Needs Implementation!!!"); - return NULL; + // dwFlags is reserved and unused, and dwDesiredAccess is currently + // only ever used as SEMAPHORE_ALL_ACCESS. The other parameters + // all map to CreateSemaphoreA. + _ASSERTE(SEMAPHORE_ALL_ACCESS == dwDesiredAccess); + + return CreateSemaphoreA( + lpSemaphoreAttributes, + lInitialCount, + lMaximumCount, + lpName); } /*++ @@ -87,7 +96,7 @@ CreateSemaphoreExA( CreateSemaphoreA Note: - lpSemaphoreAttributes currentely ignored: + lpSemaphoreAttributes currently ignored: -- Win32 object security not supported -- handles to semaphore objects are not inheritable @@ -190,9 +199,16 @@ CreateSemaphoreExW( IN /*_Reserved_*/ DWORD dwFlags, IN DWORD dwDesiredAccess) { - // TODO: Implement this! - ERROR("Needs Implementation!!!"); - return NULL; + // dwFlags is reserved and unused, and dwDesiredAccess is currently + // only ever used as SEMAPHORE_ALL_ACCESS. The other parameters + // all map to CreateSemaphoreW. + _ASSERTE(SEMAPHORE_ALL_ACCESS == dwDesiredAccess); + + return CreateSemaphoreW( + lpSemaphoreAttributes, + lInitialCount, + lMaximumCount, + lpName); } /*++ From 847021246dc280d9c990288e5e4164e50e9caf66 Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Thu, 12 Feb 2015 21:00:22 -0800 Subject: [PATCH 07/22] Refactor the PAL build configuration to detect at configure time The current PAL has binary check-ins of the config.h for Linux and MAC, long term this is not sustainable. This is a first pass at cleaning this up. Please note, there are some static platform independent defines as I tried to keep consistency with the current outputs of the not-checked-in configure.in. As we clean up the PAL the CMakeLists should be revisited and redundant pieces removed. --- src/pal/src/CMakeLists.txt | 3 + src/pal/src/config.h | 5 - src/pal/src/config.h.in | 667 ++------ src/pal/src/config.h.linux | 531 ------ src/pal/src/config.h.osx | 526 ------ src/pal/src/configure.cmake | 1076 ++++++++++++ src/pal/src/configure.in | 2763 ------------------------------ src/pal/src/exception/signal.cpp | 8 +- src/pal/src/misc/sysinfo.cpp | 26 +- 9 files changed, 1251 insertions(+), 4354 deletions(-) delete mode 100644 src/pal/src/config.h delete mode 100644 src/pal/src/config.h.linux delete mode 100644 src/pal/src/config.h.osx create mode 100644 src/pal/src/configure.cmake delete mode 100644 src/pal/src/configure.in diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt index 52bbd614cc12..dcdfc0d73b9a 100644 --- a/src/pal/src/CMakeLists.txt +++ b/src/pal/src/CMakeLists.txt @@ -1,4 +1,7 @@ cmake_minimum_required(VERSION 2.8.12.2) + +include(configure.cmake) + project(CoreClrPal) set(CMAKE_INCLUDE_CURRENT_DIR ON) diff --git a/src/pal/src/config.h b/src/pal/src/config.h deleted file mode 100644 index 904d85e27f94..000000000000 --- a/src/pal/src/config.h +++ /dev/null @@ -1,5 +0,0 @@ -#if defined(__APPLE__) -#include "config.h.osx" -#else -#include "config.h.linux" -#endif diff --git a/src/pal/src/config.h.in b/src/pal/src/config.h.in index 462072b31c1f..5133756bdf4b 100644 --- a/src/pal/src/config.h.in +++ b/src/pal/src/config.h.in @@ -1,529 +1,172 @@ -/*++ - -Copyright (c) Microsoft Corporation. All rights reserved. - -Module Name: - - include/pal/config.h.in - - process this file with configure to create the PAL's configuration header - ---*/ - #ifndef _PAL_CONFIG_H_INCLUDED #define _PAL_CONFIG_H_INCLUDED 1 -/*++ -_DEBUG : configure option --disable-debug - -This turns off compilation of debug-only code. ---*/ -#undef _DEBUG - -/*++ -_NO_DEBUG_MESSAGES_ : configure option --disable-dbgmsg - -This turns off compilation of TRACE, WARN, ERROR and ENTRY debug messages ---*/ - #define _NO_DEBUG_MESSAGES_ 0 +#cmakedefine01 HAVE_WCHAR_H +#cmakedefine01 HAVE_IEEEFP_H +#cmakedefine01 HAVE_ALLOCA_H +#cmakedefine01 HAVE_STDINT_H +#cmakedefine01 HAVE_NETDB_H +#cmakedefine01 HAVE_INTTYPES_H +#cmakedefine01 HAVE_STROPTS_H +#cmakedefine01 HAVE_SYS_VMPARAM_H +#cmakedefine01 HAVE_MACH_VM_TYPES_H +#cmakedefine01 HAVE_MACH_VM_PARAM_H +#cmakedefine01 HAVE_SYS_PARAM_H +#cmakedefine01 HAVE_SYS_FILIO_H +#cmakedefine01 HAVE_SYS_SOCKIO_H +#cmakedefine01 HAVE_PROCFS_H +#cmakedefine01 HAVE_CRT_EXTERNS_H +#cmakedefine01 HAVE_SYS_TIME_H +#cmakedefine01 HAVE_PTHREAD_NP_H +#cmakedefine01 HAVE_SYS_LWP_H +#cmakedefine01 HAVE_XLOCALE + +#cmakedefine01 HAVE_KQUEUE +#cmakedefine01 HAVE_TOLOWER +#cmakedefine01 HAVE_GETPWUID_R +#cmakedefine01 HAVE_PTHREAD_SUSPEND +#cmakedefine01 HAVE_PTHREAD_SUSPEND_NP +#cmakedefine01 HAVE_PTHREAD_CONTINUE +#cmakedefine01 HAVE_PTHREAD_RESUME_NP +#cmakedefine01 HAVE_PTHREAD_CONTINUE_NP +#cmakedefine01 HAVE_SIGRETURN +#cmakedefine01 HAVE__THREAD_SYS_SIGRETURN +#cmakedefine01 HAVE_SETCONTEXT +#cmakedefine01 HAVE_GETCONTEXT +#cmakedefine01 HAVE_COPYSIGN +#cmakedefine01 HAVE_FSYNC +#cmakedefine01 HAVE_FUTIMES +#cmakedefine01 HAVE_UTIMES +#cmakedefine01 HAVE_SYSCTL +#cmakedefine01 HAVE_SYSCONF +#cmakedefine01 HAVE_STRTOK_R +#cmakedefine01 HAVE_LOCALTIME_R +#cmakedefine01 HAVE_CTIME_R +#cmakedefine01 HAVE_GMTIME_R +#cmakedefine01 HAVE_TIMEGM +#cmakedefine01 HAVE__SNWPRINTF +#cmakedefine01 HAVE_POLL +#cmakedefine01 HAVE_STATFS +#cmakedefine01 HAVE_STATVFS +#cmakedefine01 HAVE_THREAD_SELF +#cmakedefine01 HAVE__LWP_SELF +#cmakedefine01 HAVE_MACH_THREADS +#cmakedefine01 HAVE_MACH_EXCEPTIONS +#cmakedefine01 HAVE_VM_ALLOCATE +#cmakedefine01 HAVE_VM_READ +#cmakedefine01 HAVE_DIRECTIO +#cmakedefine01 HAS_SYSV_SEMAPHORES +#cmakedefine01 HAS_PTHREAD_MUTEXES +#cmakedefine01 HAVE_TTRACE + +#cmakedefine01 HAVE_STAT_TIMESPEC +#cmakedefine01 HAVE_STAT_NSEC +#cmakedefine01 HAVE_SOCKADDR_SA_LEN +#cmakedefine01 HAVE_TM_GMTOFF + +#cmakedefine01 HAVE_BSD_REGS_T +#cmakedefine01 HAVE_PT_REGS +#cmakedefine01 HAVE_GREGSET_T +#cmakedefine01 HAVE_SIGINFO_T +#cmakedefine01 HAVE_UCONTEXT_T +#cmakedefine01 HAVE_IN_ADDR_T +#cmakedefine01 HAVE_SOCKLEN_T +#cmakedefine01 HAVE_SOCKADDR_EXT +#cmakedefine01 HAVE_PTHREAD_RWLOCK_T +#cmakedefine01 HAVE_PRWATCH_T +#cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@ + +#cmakedefine01 HAVE_TZNAME +#cmakedefine01 HAVE_TIMEZONE_VAR +#cmakedefine01 HAVE_YIELD_SYSCALL +#cmakedefine01 HAVE_INFTIM +#cmakedefine01 HAVE_CHAR_BIT +#cmakedefine01 USER_H_DEFINES_DEBUG +#cmakedefine01 HAVE__SC_PHYS_PAGES +#cmakedefine01 HAVE__SC_AVPHYS_PAGES + +#cmakedefine01 REALPATH_SUPPORTS_NONEXISTENT_FILES +#cmakedefine01 SSCANF_CANNOT_HANDLE_MISSING_EXPONENT +#cmakedefine01 SSCANF_SUPPORT_ll +#cmakedefine01 HAVE_LARGE_SNPRINTF_SUPPORT +#cmakedefine01 HAVE_BROKEN_FIFO_SELECT +#cmakedefine01 HAVE_BROKEN_FIFO_KEVENT +#cmakedefine01 HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT +#cmakedefine01 HAS_FTRUNCATE_LENGTH_BUG +#cmakedefine01 HAVE_SCHED_GET_PRIORITY +#cmakedefine01 HAVE_WORKING_GETTIMEOFDAY +#cmakedefine01 HAVE_WORKING_CLOCK_GETTIME +#cmakedefine01 HAVE_CLOCK_MONOTONIC +#cmakedefine01 STATVFS64_PROTOTYPE_BROKEN +#cmakedefine01 HAVE_MMAP_DEV_ZERO +#cmakedefine01 MMAP_IGNORES_HINT +#cmakedefine01 MMAP_ANON_IGNORES_PROTECTION +#cmakedefine01 MMAP_DOESNOT_ALLOW_REMAP +#cmakedefine01 ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS +#cmakedefine01 PTHREAD_CREATE_MODIFIES_ERRNO +#cmakedefine01 SEM_INIT_MODIFIES_ERRNO +#cmakedefine01 HAVE_PROCFS_CTL +#cmakedefine01 SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS +#cmakedefine01 BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST +#cmakedefine01 HAVE_COMPATIBLE_ACOS +#cmakedefine01 HAVE_COMPATIBLE_ASIN +#cmakedefine01 HAVE_COMPATIBLE_POW +#cmakedefine01 HAVE_VALID_NEGATIVE_INF_POW +#cmakedefine01 HAVE_VALID_POSITIVE_INF_POW +#cmakedefine01 HAVE_COMPATIBLE_ATAN2 +#cmakedefine01 HAVE_COMPATIBLE_EXP +#cmakedefine01 HAVE_COMPATIBLE_LOG +#cmakedefine01 HAVE_COMPATIBLE_LOG10 +#cmakedefine01 UNGETC_NOT_RETURN_EOF +#cmakedefine01 HAS_POSIX_SEMAPHORES +#cmakedefine01 GETPWUID_R_SETS_ERRNO +#cmakedefine01 FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL -/*++ -CHECK_TRACE_SPECIFIERS : configure option --enable-tracechecks - -Ask gcc to check the format specifiers used in trace macros. Not on by default, -because gcc will complain about %I64d and %S ---*/ - -#define CHECK_TRACE_SPECIFIERS 0 - -/* Define as 1 if you have wchar.h. */ -#define HAVE_WCHAR_H 0 - -/* Define as 1 if you have ieeefp.h. */ -#define HAVE_IEEEFP_H 0 - -/* Define as 1 if you have alloca.h. */ -#define HAVE_ALLOCA_H 0 - -/* Define as 1 if you have stdint.h. */ -#define HAVE_STDINT_H 0 - -/* Define as 1 if you have netdb.h. */ -#define HAVE_NETDB_H 0 - -/* Define as 1 if you have inttypes.h. */ -#define HAVE_INTTYPES_H 0 - -/* Define as 1 if you have sys/vmparam.h. */ -#define HAVE_SYS_VMPARAM_H 0 - -/* Define as 1 if you have mach/vm_types.h. */ -#define HAVE_MACH_VM_TYPES_H 0 - -/* Define as 1 if you have mach/vm_param.h. */ -#define HAVE_MACH_VM_PARAM_H 0 - -/* Define as 1 if you have sys/param.h. */ -#define HAVE_SYS_PARAM_H 0 - -/* Define as 1 if you have sys/filio.h. */ -#define HAVE_SYS_FILIO_H 0 - -/* Define as 1 if you have sys/sockio.h. */ -#define HAVE_SYS_SOCKIO_H 0 - -/* Define as 1 if you have procfs.h. */ -#define HAVE_PROCFS_H 0 - -/* Define as 1 if you have sys/event.h. */ -#define HAVE_KQUEUE 0 - -// Define as 1 if you are using dylibs and need dlcompat. -#define NEED_DLCOMPAT 0 - -/* Define as 1 if you have crt_externs.h. */ -#define HAVE_CRT_EXTERNS_H 0 - -// Define as 1 if you have sys/time.h. -#define HAVE_SYS_TIME_H 0 - -/* Define as 1 if you have pthread_np.h */ -#define HAVE_PTHREAD_NP_H 0 - -/* Define as 1 if you have sys/lwp.h */ -#define HAVE_SYS_LWP_H 0 - -/* Define as 1 if you have towlower. */ -#define HAVE_TOWLOWER 0 - -/* Define as 1 if struct stat contains st_atimespec, etc. */ -#define HAVE_STAT_TIMESPEC 0 - -/* Define as 1 if struct stat contains st_atimensec, etc. */ -#define HAVE_STAT_NSEC 0 - -/* Define as 1 if struct sockaddr contains sa_len. */ -#define HAVE_SOCKADDR_SA_LEN 0 - -/* Define as 1 if getpwuid_r function exists. */ -#define HAVE_GETPWUID_R 0 - -/* Define as 1 if you have extern char *tzname. */ -#define HAVE_TZNAME 0 - -/* Define as 1 if you have extern long int timezone. */ -#define HAVE_TIMEZONE_VAR 0 - -/* Define as 1 if struct tm has tm_gmtoff. */ -#define HAVE_TM_GMTOFF 0 - -// Define as 1 if the BSD struct reg is supported. -#define HAVE_BSD_REGS_T 0 - -// Define as 1 if ptrace's struct pt_regs is supported. -#define HAVE_PT_REGS 0 - -// Define as 1 if mcontext_t contains a gregset_t. -#define HAVE_GREGSET_T 0 - -// Define as 1 if realpath() does not require that the last path component -// be a file. -#define REALPATH_SUPPORTS_NONEXISTENT_FILES 0 - -// Define as 1 if sscanf supports the "%ll" format. -#define SSCANF_SUPPORT_ll 0 - -// Define as 1 if sscanf has trouble parsing a float from -// something like "12.34e" (e.g. AIX) -#define SSCANF_CANNOT_HANDLE_MISSING_EXPONENT 0 - -// Define as 1 if snprintf works correctly for large values of n. -#define HAVE_LARGE_SNPRINTF_SUPPORT 0 - -/* Define as 1 if select() on a fifo that has not had any data - written to it returns that data is available for reading. */ -#define HAVE_BROKEN_FIFO_SELECT 0 - -/* Define as 1 if kevent() on a fifo returns EV_ERROR. */ -#define HAVE_BROKEN_FIFO_KEVENT 0 - -// Define as 1 if ftruncate correctly returns failure on large lengths. -#define HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT 0 - -// Define as 1 if ftruncate returns failure but extends the file anyway. -#define HAS_FTRUNCATE_LENGTH_BUG 0 - -/* Define as 1 if SYS_yield is a supported syscall. */ -#define HAVE_YIELD_SYSCALL 0 - -// Define as 1 if pthreads are Mach threads. -#define HAVE_MACH_THREADS 0 - -// Define as 1 if pthreads are Solaris threads. -#define HAVE_SOLARIS_THREADS 0 - -// Define as 1 if pthreads has pthread_suspend -#define HAVE_PTHREAD_SUSPEND 0 - -// Define as 1 if pthreads has pthread_suspend_np -#define HAVE_PTHREAD_SUSPEND_NP 0 - -// Define as 1 if pthreads has pthread_continue -#define HAVE_PTHREAD_CONTINUE 0 - -// Define as 1 if pthreads has pthread_resume_np -#define HAVE_PTHREAD_RESUME_NP 0 - -// Define as 1 if pthreads has pthread_continue_np -#define HAVE_PTHREAD_CONTINUE_NP 0 - -// Define as 1 if mkstemp64 is used instead of mkstemp -#define MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP 0 - -// Define as 1 if open64 is used instead of open -#define OPEN64_IS_USED_INSTEAD_OF_OPEN 0 - -// Define as 1 if pthread has thread_self -#define HAVE_THREAD_SELF 0 - -// Define as 1 if pthread has _lwp_self -#define HAVE__LWP_SELF 0 - -// Define as 1 if sched_get_priority_[min|max] is supported -#define HAVE_SCHED_GET_PRIORITY 0 - -// Define as the hardcoded min and max thread priority (for platforms where -// sched_get_priority_[min|max] does not exist #define PAL_THREAD_PRIORITY_MIN 0 #define PAL_THREAD_PRIORITY_MAX 0 -// Define as 1 if pthread_setschedparam requires special privileges -#define SET_SCHEDPARAM_NEEDS_PRIVS 0 - -/* Define as 1 if Mach exceptions are supported. */ -#define HAVE_MACH_EXCEPTIONS 0 - -// Define as 1 if Mach's vm_read and vm_write are supported. -#define HAVE_VM_READ 0 - -/* Define as 1 if sigreturn is supported. */ -#define HAVE_SIGRETURN 0 - -/* Define as 1 if _thread_sys_sigreturn is supported. */ -#define HAVE__THREAD_SYS_SIGRETURN 0 - -// Define as 1 if setcontext is supported. -#define HAVE_SETCONTEXT 0 +#cmakedefine01 HAVE_COREFOUNDATION +#cmakedefine01 HAVE__NSGETENVIRON +#cmakedefine01 DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX +#cmakedefine PAL_PTRACE(cmd, pid, addr, data) @PAL_PTRACE@ +#cmakedefine PAL_PT_ATTACH @PAL_PT_ATTACH@ +#cmakedefine PAL_PT_DETACH @PAL_PT_DETACH@ +#cmakedefine PAL_PT_READ_D @PAL_PT_READ_D@ +#cmakedefine PAL_PT_WRITE_D @PAL_PT_WRITE_D@ +#cmakedefine01 USE_SIGNALS_FOR_THREAD_SUSPENSION +#cmakedefine01 SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING +#cmakedefine01 ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS + +#cmakedefine JA_JP_LOCALE_NAME "@JA_JP_LOCALE_NAME@" +#cmakedefine KO_KR_LOCALE_NAME "@KO_KR_LOCALE_NAME@" +#cmakedefine ZH_TW_LOCALE_NAME "@ZH_TW_LOCALE_NAME@" -// Define as 1 if getcontext is supported. -#define HAVE_GETCONTEXT 0 - -// Define as 1 if copysign is supported. -#define HAVE_COPYSIGN 0 - -// Define as 1 if gethrtime (Solaris/HPUX) is supported. -#define HAVE_GETHRTIME 0 - -// Define as 1 if read_real_time (AIX) is supported. -#define HAVE_READ_REAL_TIME 0 - -// Define as 1 if fsync is supported. -#define HAVE_FSYNC 0 - -// Define as 1 if current platform has a working gettimeofday -#define HAVE_WORKING_GETTIMEOFDAY 0 - -// Define as 1 if current platform has a working clock_gettime -#define HAVE_WORKING_CLOCK_GETTIME 0 - -// Define as 1 if clock_gettime supports CLOCK_MONOTONIC. -#define HAVE_CLOCK_MONOTONIC 0 - -/* Define as 1 if futimes is supported. */ -#define HAVE_FUTIMES 0 - -/* Define as 1 if utimes is supported. */ -#define HAVE_UTIMES 0 - -/* Define as 1 if sysctl is supported. */ -#define HAVE_SYSCTL 0 - -/* Define as 1 if sysconf is supported. */ -#define HAVE_SYSCONF 0 - -/* Define as 1 if strtok_r is supported. */ -#define HAVE_STRTOK_R 0 - -/* Define as 1 if localtime_r is supported. */ -#define HAVE_LOCALTIME_R 0 - -/* Define as 1 if ctime_r is supported. */ -#define HAVE_CTIME_R 0 - -/* Defined as 1 if gmtime_r is supported. */ -#define HAVE_GMTIME_R 0 - -/* Define as 1 if timegm is supported. */ -#define HAVE_TIMEGM 0 - -/* Define as 1 if _snwprintf is supported. */ -#define HAVE__SNWPRINTF 0 - -// Define as 1 if poll is supported. -#define HAVE_POLL 0 - -// Define as 1 if INFTIM is defined. -#define HAVE_INFTIM 0 - -// Define as 1 if CHAR_BIT is defined -#define HAVE_CHAR_BIT 0 - -/* Define as 1 if directio is supported. */ -#define HAVE_DIRECTIO 0 - -/* Define as 1 if use of directio is disabled, - even if HAVE_DIRECTIO is defined. */ +#define CHECK_TRACE_SPECIFIERS 0 +#define CLOSE_BLOCKS_ON_OUTSTANDING_SYSCALLS 0 +#define PROCFS_MEM_NAME "" #define DIRECTIO_DISABLED 0 - -/* Define as 1 if vm_allocate is supported. */ -#define HAVE_VM_ALLOCATE 0 - -/* Define as 1 if statfs is supported. */ -#define HAVE_STATFS 0 - -/* Define as 1 if statvfs is supported. */ -#define HAVE_STATVFS 0 - -/* Define as 1 if statvfs64 prototype is broken. */ -#define STATVFS64_PROTOTYPE_BROKEN 0 - -/* Define as 1 if siginfo_t is supported. */ -#define HAVE_SIGINFO_T 0 - -/* Define as 1 if ucontext_t is supported. */ -#define HAVE_UCONTEXT_T 0 - -/* Defined to sizeof(off_t). */ -#define SIZEOF_OFF_T 0 - -/* Define as 1 if in_addr_t is supported. */ -#define HAVE_IN_ADDR_T 0 - -// Define as 1 if caddr_t is supported. +#define HAS_FTRUNCATE_LENGTH_ISSUE 0 #define HAVE_CADDR_T 0 - -/* Define as 1 if socklen_t is supported. */ -#define HAVE_SOCKLEN_T 0 - -/* Define as 1 if sockaddr_ext is supported. */ -#define HAVE_SOCKADDR_EXT 0 - -/* Define as 1 if pthread_rwlock_t is supported. */ -#define HAVE_PTHREAD_RWLOCK_T 0 - -/* Define as 1 if Core Foundation is supported (Darwin/Mac OS X only). */ -#define HAVE_COREFOUNDATION 0 - -/* Define as 1 if _NSGetEnviron is supported (Darwin/Mac OS X only). */ -#define HAVE__NSGETENVIRON 0 - -/* Define this if debug channel output should be appended to existing files - instead of overwriting */ -#undef _PAL_APPEND_DBG_OUTPUT_ - -/* Define as 1 if mmap() can map a file descriptor for /dev/zero */ -#define HAVE_MMAP_DEV_ZERO 0 - -// Define as 1 if mmap() ignores its hint parameter. -#define MMAP_IGNORES_HINT 0 - -// Define as 1 if mmap() ignores its protection parameter when -// mapping anonymous pages. -#define MMAP_ANON_IGNORES_PROTECTION 0 - -// Define as 1 if mmap() allows remapping previously mapped pages -#define MMAP_DOESNOT_ALLOW_REMAP 0 - -// Define as 1 if there cannot be more than one shared mapping of a file -// region per process at the same time -#define ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS 0 - -// Define as 1 if pthread_create() modifies errno when it succeeds. -#define PTHREAD_CREATE_MODIFIES_ERRNO 0 - -// Define as 1 if sem_init() modifies errno when it succeeds. -#define SEM_INIT_MODIFIES_ERRNO 0 - -// Define as 1 if prwatch_t is supported -#define HAVE_PRWATCH_T 0 - -// Define as 1 if /proc//ctl is supported. -#define HAVE_PROCFS_CTL 0 - -// Define as the name of the memory file in /proc/ -#define PROCFS_MEM_NAME "" - -// Define as 1 if including sys/user.h will result in -// _DEBUG being defined -#define USER_H_DEFINES_DEBUG 0 - -// Define as 1 if close(fd) blocks until there is any outstanding -// syscall using fd (e.g. AIX) -#define CLOSE_BLOCKS_ON_OUTSTANDING_SYSCALLS 0 - -// Define as 1 if sendto returns EHOSTUNREACH when sendto'ing using a -// "to" sockaddr which does not match the socket address family -// (e.g. AIX) -#define SENDTO_RETURNS_UNREACH_ON_WRONG_AF 0 - -// Define as 1 if shutdown fails on connectionless sockets -// (e.g. AIX) -#define SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS 0 - -// Define as 1 if it is possible to broadcast on a socket regardless of SO_BROADCAST -// (e.g. Solaris) -#define BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST 0 - -// Define as 1 if SO_RCVTIMEO and SO_SNDTIMEO are not supported -// or are ignored -#define SO_TIMEO_NOT_SUPPORTED 0 - -// Define as 1 if write of 0 bytes to the console hangs. -#define WRITE_0_BYTES_HANGS_TTY 0 - -// Define as 1 if acos is compatible with Windows. -#define HAVE_COMPATIBLE_ACOS 0 - -// Define as 1 if asin is compatible with Windows. -#define HAVE_COMPATIBLE_ASIN 0 - -// Define as 1 if pow is compatible with Windows. -#define HAVE_COMPATIBLE_POW 0 - -// Define as 1 if pow returns -Inf when given a negative base and a -// large magnitude odd exponent. -#define HAVE_VALID_NEGATIVE_INF_POW 0 - -// Define as 1 if pow returns +Inf when given a negative base and a -// large magnitude even exponent. -#define HAVE_VALID_POSITIVE_INF_POW 0 - -// Define as 1 if atan2 is compatible with Windows. -#define HAVE_COMPATIBLE_ATAN2 0 - -// Define as 1 if exp is compatible with Windows. -#define HAVE_COMPATIBLE_EXP 0 - -// Define as 1 if log is compatible with Windows. -#define HAVE_COMPATIBLE_LOG 0 - -// Define as 1 if log10 is compatible with Windows. -#define HAVE_COMPATIBLE_LOG10 0 - -// Define as 1 if ttrace is supported -#define HAVE_TTRACE 0 - -// Define as 1 if calling dlopen() on a library which is already -// opened returns a different handle -#define RETURNS_NEW_HANDLES_ON_REPEAT_DLOPEN 0 - -// If 1, SetThreadPriority() will not actually modify the pthread priority -// for threads which aren't critical or idle -#define PAL_IGNORE_NORMAL_THREAD_PRIORITY 0 - -// Define as a macro that correctly calls ptrace for the platform, e.g.: -// #define PAL_PTRACE(cmd, pid, addr, data) ptrace((cmd), (pid), (int*)(addr), (data), 0) -// Note that for autconfig substitution to properly occur the argument list -// must not be present in this file -- it should only be in the appropriate -// AC_DEFINE statement -#define PAL_PTRACE ptrace_not_configured_for_this_platform - -// Define as the ptrace cmd value to attach to a process -#define PAL_PT_ATTACH 0 - -// Define as the ptrace cmd value to detach from a process -#define PAL_PT_DETACH 0 - -// Define as the ptrace cmd value to read a word from a process's data space -#define PAL_PT_READ_D 0 - -// Define as the ptrace cmd value to write a word to a process's data space -#define PAL_PT_WRITE_D 0 - -// Define as 1 if ISO locale names needs to be in lowercase +#define HAVE_GETHRTIME 0 #define HAVE_LOWERCASE_ISO_NAME 0 - -// Define as 1 if ISO locale names need an underscore after -// the "ISO" in the name. +#define HAVE_READ_REAL_TIME 0 +#define HAVE_SOLARIS_THREADS 0 #define HAVE_UNDERSCORE_ISO_NAME 0 - -// Define as 1 if we have per-thread locales as defined in xlocale.h -#define HAVE_XLOCALE 0 - -// Define as 1 if ungetc dose not return EOF on write-only file -#define UNGETC_NOT_RETURN_EOF 0 - -// Define as 1 if malloc(0) returns null #define MALLOC_ZERO_RETURNS_NULL 0 - -// Define as 1 if error function for glob takes specific parameters -#define ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 0 - -// Define the ja_JP locale name -#define JA_JP_LOCALE_NAME "" - -// Define the ko_KR locale name -#define KO_KR_LOCALE_NAME "" - -// Define the zh_TW locale name -#define ZH_TW_LOCALE_NAME "" - -// Define as 1 if thread suspension uses signals -#define USE_SIGNALS_FOR_THREAD_SUSPENSION 0 - -// Define as 1 if platform has POSIX semaphores -#define HAS_POSIX_SEMAPHORES 0 - -// Define as 1 if suspending a thread while blocked on a lock can cause a hang -#define DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0 - -// Define as 1 if sigwait cannot take a full sigset as a valid parameter -#define SIGWAIT_FAILS_WHEN_PASSED_FULL_SIGSET 0 - -// Define as 1 if a thread cannot suspend itself using the native suspension function -#define SELF_SUSPEND_FAILS_WITH_NATIVE_SUSPENSION 0 - -// Define as 1 if netdb.h defines MAXHOSTNAMELEN +#define MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP 0 +#define NEED_DLCOMPAT 0 +#define NEED_STACK_PROTECTOR_IMPL 0 #define NETDB_DEFINES_MAXHOSTNAMELEN 0 - -// Define as 1 if sys/param.h defines MAXHOSTNAMELEN -#define SYS_PARAM_DEFINES_MAXHOSTNAMELEN 0 - -// Define as 1 if getpwuid_r sets errno to ERANGE instead of returning ERANGE error -#define GETPWUID_R_SETS_ERRNO 0 - -// Define as 1 in order to use pipes as native support for thread blocking in the -// Synchronization Manager +#define OPEN64_IS_USED_INSTEAD_OF_OPEN 0 +#define PAL_IGNORE_NORMAL_THREAD_PRIORITY 0 +#define SELF_SUSPEND_FAILS_WITH_NATIVE_SUSPENSION 0 +#define SENDTO_RETURNS_UNREACH_ON_WRONG_AF 0 +#define SET_SCHEDPARAM_NEEDS_PRIVS 0 +#define SIGWAIT_FAILS_WHEN_PASSED_FULL_SIGSET 0 #define SYNCHMGR_PIPE_BASED_THREAD_BLOCKING 0 - -// Define as 1 in order to signal conditions from a thread suspension safe area -#define SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1 - -// Define as 1 if C-runtime file functions (e.g. fwrite) use the ferror() -// value set by a previous file operation. -#define FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL 0 - -// Define as 1 if platform has SYSV semaphores -#define HAS_SYSV_SEMAPHORES 0 - -// Define as 1 if platform has pthread mutexes -#define HAS_PTHREAD_MUTEXES 0 - -// Define as 1 if using stack protection, but need implementation -#define NEED_STACK_PROTECTOR_IMPL 1 - -#endif // _PAL_CONFIG_H_INCLUDED - - +#define SYS_PARAM_DEFINES_MAXHOSTNAMELEN 0 +#define WRITE_0_BYTES_HANGS_TTY 0 +#define SO_TIMEO_NOT_SUPPORTED 0 +#endif diff --git a/src/pal/src/config.h.linux b/src/pal/src/config.h.linux deleted file mode 100644 index 90ba8356ed45..000000000000 --- a/src/pal/src/config.h.linux +++ /dev/null @@ -1,531 +0,0 @@ -// -// Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. -// - -/* config.h. Generated from config.h.in by configure. */ -/*++ - - - -Module Name: - - include/pal/config.h.in - - process this file with configure to create the PAL's configuration header - ---*/ - -#ifndef _PAL_CONFIG_H_INCLUDED -#define _PAL_CONFIG_H_INCLUDED 1 - -/*++ -_NO_DEBUG_MESSAGES_ : configure option --disable-dbgmsg - -This turns off compilation of TRACE, WARN, ERROR and ENTRY debug messages ---*/ - -#define _NO_DEBUG_MESSAGES_ 0 - - -/*++ -CHECK_TRACE_SPECIFIERS : configure option --enable-tracechecks - -Ask gcc to check the format specifiers used in trace macros. Not on by default, -because gcc will complain about %I64d and %S ---*/ - -#define CHECK_TRACE_SPECIFIERS 0 - -/* Define as 1 if you have wchar.h. */ -#define HAVE_WCHAR_H 1 - -/* Define as 1 if you have ieeefp.h. */ -#define HAVE_IEEEFP_H 0 - -/* Define as 1 if you have alloca.h. */ -#define HAVE_ALLOCA_H 1 - -/* Define as 1 if you have stdint.h. */ -#define HAVE_STDINT_H 1 - -/* Define as 1 if you have netdb.h. */ -#define HAVE_NETDB_H 1 - -/* Define as 1 if you have inttypes.h. */ -#define HAVE_INTTYPES_H 1 - -/* Define as 1 if you have stropts.h. */ -#define HAVE_STROPTS_H 1 - -/* Define as 1 if you have sys/vmparam.h. */ -#define HAVE_SYS_VMPARAM_H 0 - -/* Define as 1 if you have mach/vm_types.h. */ -#define HAVE_MACH_VM_TYPES_H 0 - -/* Define as 1 if you have mach/vm_param.h. */ -#define HAVE_MACH_VM_PARAM_H 0 - -/* Define as 1 if you have sys/param.h. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define as 1 if you have sys/filio.h. */ -#define HAVE_SYS_FILIO_H 0 - -/* Define as 1 if you have sys/sockio.h. */ -#define HAVE_SYS_SOCKIO_H 0 - -/* Define as 1 if you have procfs.h. */ -#define HAVE_PROCFS_H 0 - -/* Define as 1 if you have sys/event.h. */ -#define HAVE_KQUEUE 0 - -// Define as 1 if you are using dylibs and need dlcompat. -#define NEED_DLCOMPAT 0 - -/* Define as 1 if you have crt_externs.h. */ -#define HAVE_CRT_EXTERNS_H 0 - -// Define as 1 if you have sys/time.h. -#define HAVE_SYS_TIME_H 1 - -/* Define as 1 if you have pthread_np.h */ -#define HAVE_PTHREAD_NP_H 0 - -/* Define as 1 if you have sys/lwp.h */ -#define HAVE_SYS_LWP_H 0 - -/* Define as 1 if you have towlower. */ -#define HAVE_TOWLOWER 0 - -/* Define as 1 if struct stat contains st_atimespec, etc. */ -#define HAVE_STAT_TIMESPEC 0 - -/* Define as 1 if struct stat contains st_atimensec, etc. */ -#define HAVE_STAT_NSEC 0 - -/* Define as 1 if struct sockaddr contains sa_len. */ -#define HAVE_SOCKADDR_SA_LEN 0 - -/* Define as 1 if getpwuid_r function exists. */ -#define HAVE_GETPWUID_R 1 - -/* Define as 1 if you have extern char *tzname. */ -#define HAVE_TZNAME 1 - -/* Define as 1 if you have extern long int timezone. */ -#define HAVE_TIMEZONE_VAR 0 - -/* Define as 1 if struct tm has tm_gmtoff. */ -#define HAVE_TM_GMTOFF 1 - -// Define as 1 if the BSD struct reg is supported. -#define HAVE_BSD_REGS_T 0 - -// Define as 1 if ptrace's struct pt_regs is supported. -#define HAVE_PT_REGS 1 - -// Define as 1 if mcontext_t contains a gregset_t. -#define HAVE_GREGSET_T 1 - -// Define as 1 if realpath() does not require that the last path component -// be a file. -#define REALPATH_SUPPORTS_NONEXISTENT_FILES 0 - -// Define as 1 if sscanf supports the "%ll" format. -#define SSCANF_SUPPORT_ll 0 - -// Define as 1 if sscanf has trouble parsing a float from -// something like "12.34e" (e.g. AIX) -#define SSCANF_CANNOT_HANDLE_MISSING_EXPONENT 0 - -// Define as 1 if snprintf works correctly for large values of n. -#define HAVE_LARGE_SNPRINTF_SUPPORT 1 - -/* Define as 1 if select() on a fifo that has not had any data - written to it returns that data is available for reading. */ -#define HAVE_BROKEN_FIFO_SELECT 0 - -/* Define as 1 if kevent() on a fifo returns EV_ERROR. */ -#define HAVE_BROKEN_FIFO_KEVENT 1 - -// Define as 1 if ftruncate correctly returns failure on large lengths. -#define HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT 0 - -// Define as 1 if ftruncate returns failure but extends the file anyway. -#define HAS_FTRUNCATE_LENGTH_ISSUE 0 - -/* Define as 1 if SYS_yield is a supported syscall. */ -#define HAVE_YIELD_SYSCALL 0 - -// Define as 1 if pthreads are Mach threads. -#define HAVE_MACH_THREADS 0 - -// Define as 1 if pthreads are Solaris threads. -#define HAVE_SOLARIS_THREADS 0 - -// Define as 1 if pthreads has pthread_suspend -#define HAVE_PTHREAD_SUSPEND 0 - -// Define as 1 if pthreads has pthread_suspend_np -#define HAVE_PTHREAD_SUSPEND_NP 0 - -// Define as 1 if pthreads has pthread_continue -#define HAVE_PTHREAD_CONTINUE 0 - -// Define as 1 if pthreads has pthread_resume_np -#define HAVE_PTHREAD_RESUME_NP 0 - -// Define as 1 if pthreads has pthread_continue_np -#define HAVE_PTHREAD_CONTINUE_NP 0 - -// Define as 1 if mkstemp64 is used instead of mkstemp -#define MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP 0 - -// Define as 1 if open64 is used instead of open -#define OPEN64_IS_USED_INSTEAD_OF_OPEN 0 - -// Define as 1 if pthread has thread_self -#define HAVE_THREAD_SELF 0 - -// Define as 1 if pthread has _lwp_self -#define HAVE__LWP_SELF 0 - -// Define as 1 if sched_get_priority_[min|max] is supported -#define HAVE_SCHED_GET_PRIORITY 1 - -// Define as the hardcoded min and max thread priority (for platforms where -// sched_get_priority_[min|max] does not exist -#define PAL_THREAD_PRIORITY_MIN 0 -#define PAL_THREAD_PRIORITY_MAX 0 - -// Define as 1 if pthread_setschedparam requires special privileges -#define SET_SCHEDPARAM_NEEDS_PRIVS 0 - -/* Define as 1 if Mach exceptions are supported. */ -#define HAVE_MACH_EXCEPTIONS 0 - -// Define as 1 if Mach's vm_read and vm_write are supported. -#define HAVE_VM_READ 0 - -/* Define as 1 if sigreturn is supported. */ -#define HAVE_SIGRETURN 0 - -/* Define as 1 if _thread_sys_sigreturn is supported. */ -#define HAVE__THREAD_SYS_SIGRETURN 0 - -// Define as 1 if setcontext is supported. -#define HAVE_SETCONTEXT 1 - -// Define as 1 if getcontext is supported. -#define HAVE_GETCONTEXT 1 - -// Define as 1 if copysign is supported. -#define HAVE_COPYSIGN 1 - -// Define as 1 if gethrtime (Solaris/HPUX) is supported. -#define HAVE_GETHRTIME 0 - -// Define as 1 if read_real_time (AIX) is supported. -#define HAVE_READ_REAL_TIME 0 - -// Define as 1 if fsync is supported. -#define HAVE_FSYNC 1 - -// Define as 1 if current platform has a working gettimeofday -#define HAVE_WORKING_GETTIMEOFDAY 1 - -// Define as 1 if current platform has a working clock_gettime -#define HAVE_WORKING_CLOCK_GETTIME 1 - -// Define as 1 if clock_gettime supports CLOCK_MONOTONIC. -#define HAVE_CLOCK_MONOTONIC 1 - -/* Define as 1 if futimes is supported. */ -#define HAVE_FUTIMES 1 - -/* Define as 1 if utimes is supported. */ -#define HAVE_UTIMES 1 - -/* Define as 1 if sysctl is supported. */ -#define HAVE_SYSCTL 1 - -/* Define as 1 if sysconf is supported. */ -#define HAVE_SYSCONF 1 - -/* Define as 1 if strtok_r is supported. */ -#define HAVE_STRTOK_R 1 - -/* Define as 1 if localtime_r is supported. */ -#define HAVE_LOCALTIME_R 1 - -/* Define as 1 if ctime_r is supported. */ -#define HAVE_CTIME_R 1 - -/* Defined as 1 if gmtime_r is supported. */ -#define HAVE_GMTIME_R 1 - -/* Define as 1 if timegm is supported. */ -#define HAVE_TIMEGM 1 - -/* Define as 1 if _snwprintf is supported. */ -#define HAVE__SNWPRINTF 0 - -// Define as 1 if poll is supported. -#define HAVE_POLL 1 - -// Define as 1 if INFTIM is defined. -#define HAVE_INFTIM 0 - -// Define as 1 if CHAR_BIT is defined -#define HAVE_CHAR_BIT 0 - -/* Define as 1 if directio is supported. */ -#define HAVE_DIRECTIO 0 - -/* Define as 1 if use of directio is disabled, - even if HAVE_DIRECTIO is defined. */ -#define DIRECTIO_DISABLED 0 - -/* Define as 1 if vm_allocate is supported. */ -#define HAVE_VM_ALLOCATE 0 - -/* Define as 1 if statfs is supported. */ -#define HAVE_STATFS 0 - -/* Define as 1 if statvfs is supported. */ -#define HAVE_STATVFS 1 - -/* Define as 1 if statvfs64 prototype is broken. */ -#define STATVFS64_PROTOTYPE_BROKEN 0 - -/* Define as 1 if siginfo_t is supported. */ -#define HAVE_SIGINFO_T 1 - -/* Define as 1 if ucontext_t is supported. */ -#define HAVE_UCONTEXT_T 1 - -/* Defined to sizeof(off_t). */ -#define SIZEOF_OFF_T 8 - -/* Define as 1 if in_addr_t is supported. */ -#define HAVE_IN_ADDR_T 0 - -// Define as 1 if caddr_t is supported. -#define HAVE_CADDR_T 0 - -/* Define as 1 if socklen_t is supported. */ -#define HAVE_SOCKLEN_T 1 - -/* Define as 1 if sockaddr_ext is supported. */ -#define HAVE_SOCKADDR_EXT 0 - -/* Define as 1 if pthread_rwlock_t is supported. */ -#define HAVE_PTHREAD_RWLOCK_T 1 - -/* Define as 1 if Core Foundation is supported (Darwin/Mac OS X only). */ -#define HAVE_COREFOUNDATION 0 - -/* Define as 1 if _NSGetEnviron is supported (Darwin/Mac OS X only). */ -#define HAVE__NSGETENVIRON 0 - -/* Define this if debug channel output should be appended to existing files - instead of overwriting */ -/* #undef _PAL_APPEND_DBG_OUTPUT_ */ - -/* Define as 1 if mmap() can map a file descriptor for /dev/zero */ -#define HAVE_MMAP_DEV_ZERO 1 - -// Define as 1 if mmap() ignores its hint parameter. -#define MMAP_IGNORES_HINT 0 - -// Define as 1 if mmap() ignores its protection parameter when -// mapping anonymous pages. -#define MMAP_ANON_IGNORES_PROTECTION 0 - -// Define as 1 if mmap() allows remapping previously mapped pages -#define MMAP_DOESNOT_ALLOW_REMAP 0 - -// Define as 1 if there cannot be more than one shared mapping of a file -// region per process at the same time -#define ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS 0 - -// Define as 1 if pthread_create() modifies errno when it succeeds. -#define PTHREAD_CREATE_MODIFIES_ERRNO 0 - -// Define as 1 if sem_init() modifies errno when it succeeds. -#define SEM_INIT_MODIFIES_ERRNO 0 - -// Define as 1 if prwatch_t is supported -#define HAVE_PRWATCH_T 0 - -// Define as 1 if /proc//ctl is supported. -#define HAVE_PROCFS_CTL 0 - -// Define as the name of the memory file in /proc/ -#define PROCFS_MEM_NAME "" - -// Define as 1 if including sys/user.h will result in -// _DEBUG being defined -#define USER_H_DEFINES_DEBUG 0 - -// Define as 1 if close(fd) blocks until there is any outstanding -// syscall using fd (e.g. AIX) -#define CLOSE_BLOCKS_ON_OUTSTANDING_SYSCALLS 0 - -// Define as 1 if sendto returns EHOSTUNREACH when sendto'ing using a -// "to" sockaddr which does not match the socket address family -// (e.g. AIX) -#define SENDTO_RETURNS_UNREACH_ON_WRONG_AF 0 - -// Define as 1 if shutdown fails on connectionless sockets -// (e.g. AIX) -#define SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS 1 - -// Define as 1 if it is possible to broadcast on a socket regardless of SO_BROADCAST -// (e.g. Solaris) -#define BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST 0 - -// Define as 1 if SO_RCVTIMEO and SO_SNDTIMEO are not supported -// or are ignored -#define SO_TIMEO_NOT_SUPPORTED 0 - -// Define as 1 if write of 0 bytes to the console hangs. -#define WRITE_0_BYTES_HANGS_TTY 0 - -// Define as 1 if acos is compatible with Windows. -#define HAVE_COMPATIBLE_ACOS 1 - -// Define as 1 if asin is compatible with Windows. -#define HAVE_COMPATIBLE_ASIN 1 - -// Define as 1 if pow is compatible with Windows. -#define HAVE_COMPATIBLE_POW 0 - -// Define as 1 if pow returns -Inf when given a negative base and a -// large magnitude odd exponent. -#define HAVE_VALID_NEGATIVE_INF_POW 1 - -// Define as 1 if pow returns +Inf when given a negative base and a -// large magnitude even exponent. -#define HAVE_VALID_POSITIVE_INF_POW 1 - -// Define as 1 if atan2 is compatible with Windows. -#define HAVE_COMPATIBLE_ATAN2 1 - -// Define as 1 if exp is compatible with Windows. -#define HAVE_COMPATIBLE_EXP 1 - -// Define as 1 if log is compatible with Windows. -#define HAVE_COMPATIBLE_LOG 1 - -// Define as 1 if log10 is compatible with Windows. -#define HAVE_COMPATIBLE_LOG10 1 - -// Define as 1 if ttrace is supported -#define HAVE_TTRACE 0 - -// Define as 1 if calling dlopen() on a library which is already -// opened returns a different handle -#define RETURNS_NEW_HANDLES_ON_REPEAT_DLOPEN 0 - -// If 1, SetThreadPriority() will not actually modify the pthread priority -// for threads which aren't critical or idle -#define PAL_IGNORE_NORMAL_THREAD_PRIORITY 0 - -// Define as a macro that correctly calls ptrace for the platform, e.g.: -// #define PAL_PTRACE(cmd, pid, addr, data) ptrace((cmd), (pid), (void*)(addr), (data), 0) -// Note that for autconfig substitution to properly occur the argument list -// must not be present in this file -- it should only be in the appropriate -// AC_DEFINE statement -#define PAL_PTRACE(cmd, pid, addr, data) ptrace((cmd), (pid), (void*)(addr), (data)) - -// Define as the ptrace cmd value to attach to a process -#define PAL_PT_ATTACH PTRACE_ATTACH - -// Define as the ptrace cmd value to detach from a process -#define PAL_PT_DETACH PTRACE_DETACH - -// Define as the ptrace cmd value to read a word from a process's data space -#define PAL_PT_READ_D PTRACE_PEEKDATA - -// Define as the ptrace cmd value to write a word to a process's data space -#define PAL_PT_WRITE_D PTRACE_POKEDATA - -// Define as 1 if ISO locale names needs to be in lowercase -#define HAVE_LOWERCASE_ISO_NAME 0 - -// Define as 1 if ISO locale names need an underscore after -// the "ISO" in the name. -#define HAVE_UNDERSCORE_ISO_NAME 0 - -// Define as 1 if we have per-thread locales as defined in xlocale.h -#define HAVE_XLOCALE 0 - -// Define as 1 if ungetc dose not return EOF on write-only file -#define UNGETC_NOT_RETURN_EOF 1 - -// Define as 1 if malloc(0) returns null -#define MALLOC_ZERO_RETURNS_NULL 0 - -// Define as 1 if error function for glob takes specific parameters -#define ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1 - -// Define the ja_JP locale name -#define JA_JP_LOCALE_NAME "ja_JP_LOCALE_NOT_FOUND" - -// Define the ko_KR locale name -#define KO_KR_LOCALE_NAME "ko_KR_LOCALE_NOT_FOUND" - -// Define the zh_TW locale name -#define ZH_TW_LOCALE_NAME "zh_TW_LOCALE_NOT_FOUND" - -// Define as 1 if thread suspension uses signals -#define USE_SIGNALS_FOR_THREAD_SUSPENSION 1 - -// Define as 1 if platform has POSIX semaphores -#define HAS_POSIX_SEMAPHORES 1 - -// Define as 1 if suspending a thread while blocked on a lock can cause a hang -#define DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0 - -// Define as 1 if sigwait cannot take a full sigset as a valid parameter -#define SIGWAIT_FAILS_WHEN_PASSED_FULL_SIGSET 0 - -// Define as 1 if a thread cannot suspend itself using the native suspension function -#define SELF_SUSPEND_FAILS_WITH_NATIVE_SUSPENSION 0 - -// Define as 1 if netdb.h defines MAXHOSTNAMELEN -#define NETDB_DEFINES_MAXHOSTNAMELEN 0 - -// Define as 1 if sys/param.h defines MAXHOSTNAMELEN -#define SYS_PARAM_DEFINES_MAXHOSTNAMELEN 0 - -// Define as 1 if getpwuid_r sets errno to ERANGE instead of returning ERANGE error -#define GETPWUID_R_SETS_ERRNO 1 - -// Define as 1 in order to use pipes as native support for thread blocking in the -// Synchronization Manager -#define SYNCHMGR_PIPE_BASED_THREAD_BLOCKING 0 - -// Define as 1 in order to signal conditions from a thread suspension safe area -#define SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1 - -// Define as 1 if C-runtime file functions (e.g. fwrite) use the ferror() -// value set by a previous file operation. -#define FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL 0 - -// Define as 1 if platform has SYSV semaphores -#define HAS_SYSV_SEMAPHORES 1 - -// Define as 1 if platform has pthread mutexes -#define HAS_PTHREAD_MUTEXES 1 - -// Define as 1 if using stack protection, but need implementation -#define NEED_STACK_PROTECTOR_IMPL 0 - -#endif // _PAL_CONFIG_H_INCLUDED - - diff --git a/src/pal/src/config.h.osx b/src/pal/src/config.h.osx deleted file mode 100644 index 3ee1a700483f..000000000000 --- a/src/pal/src/config.h.osx +++ /dev/null @@ -1,526 +0,0 @@ -/* config.h. Generated from config.h.in by configure. */ -/*++ - -Copyright (c) Microsoft Corporation. All rights reserved. - -Module Name: - - include/pal/config.h.in - - process this file with configure to create the PAL's configuration header - ---*/ - -#ifndef _PAL_CONFIG_H_INCLUDED -#define _PAL_CONFIG_H_INCLUDED 1 - -/*++ -_NO_DEBUG_MESSAGES_ : configure option --disable-dbgmsg - -This turns off compilation of TRACE, WARN, ERROR and ENTRY debug messages ---*/ - -#define _NO_DEBUG_MESSAGES_ 0 - - -/*++ -CHECK_TRACE_SPECIFIERS : configure option --enable-tracechecks - -Ask gcc to check the format specifiers used in trace macros. Not on by default, -because gcc will complain about %I64d and %S ---*/ - -#define CHECK_TRACE_SPECIFIERS 0 - -/* Define as 1 if you have wchar.h. */ -#define HAVE_WCHAR_H 1 - -/* Define as 1 if you have ieeefp.h. */ -#define HAVE_IEEEFP_H 0 - -/* Define as 1 if you have alloca.h. */ -#define HAVE_ALLOCA_H 1 - -/* Define as 1 if you have stdint.h. */ -#define HAVE_STDINT_H 1 - -/* Define as 1 if you have netdb.h. */ -#define HAVE_NETDB_H 1 - -/* Define as 1 if you have inttypes.h. */ -#define HAVE_INTTYPES_H 1 - -/* Define as 1 if you have stropts.h. */ -#define HAVE_STROPTS_H 0 - -/* Define as 1 if you have sys/vmparam.h. */ -#define HAVE_SYS_VMPARAM_H 1 - -/* Define as 1 if you have mach/vm_types.h. */ -#define HAVE_MACH_VM_TYPES_H 1 - -/* Define as 1 if you have mach/vm_param.h. */ -#define HAVE_MACH_VM_PARAM_H 1 - -/* Define as 1 if you have sys/param.h. */ -#define HAVE_SYS_PARAM_H 1 - -/* Define as 1 if you have sys/filio.h. */ -#define HAVE_SYS_FILIO_H 1 - -/* Define as 1 if you have sys/sockio.h. */ -#define HAVE_SYS_SOCKIO_H 1 - -/* Define as 1 if you have procfs.h. */ -#define HAVE_PROCFS_H 0 - -/* Define as 1 if you have sys/event.h. */ -#define HAVE_KQUEUE 1 - -// Define as 1 if you are using dylibs and need dlcompat. -#define NEED_DLCOMPAT 0 - -/* Define as 1 if you have crt_externs.h. */ -#define HAVE_CRT_EXTERNS_H 1 - -// Define as 1 if you have sys/time.h. -#define HAVE_SYS_TIME_H 1 - -/* Define as 1 if you have pthread_np.h */ -#define HAVE_PTHREAD_NP_H 0 - -/* Define as 1 if you have sys/lwp.h */ -#define HAVE_SYS_LWP_H 0 - -/* Define as 1 if you have towlower. */ -#define HAVE_TOWLOWER 0 - -/* Define as 1 if struct stat contains st_atimespec, etc. */ -#define HAVE_STAT_TIMESPEC 1 - -/* Define as 1 if struct stat contains st_atimensec, etc. */ -#define HAVE_STAT_NSEC 0 - -/* Define as 1 if struct sockaddr contains sa_len. */ -#define HAVE_SOCKADDR_SA_LEN 1 - -/* Define as 1 if getpwuid_r function exists. */ -#define HAVE_GETPWUID_R 1 - -/* Define as 1 if you have extern char *tzname. */ -#define HAVE_TZNAME 1 - -/* Define as 1 if you have extern long int timezone. */ -#define HAVE_TIMEZONE_VAR 0 - -/* Define as 1 if struct tm has tm_gmtoff. */ -#define HAVE_TM_GMTOFF 1 - -// Define as 1 if the BSD struct reg is supported. -#define HAVE_BSD_REGS_T 0 - -// Define as 1 if ptrace's struct pt_regs is supported. -#define HAVE_PT_REGS 0 - -// Define as 1 if mcontext_t contains a gregset_t. -#define HAVE_GREGSET_T 0 - -// Define as 1 if realpath() does not require that the last path component -// be a file. -#define REALPATH_SUPPORTS_NONEXISTENT_FILES 0 - -// Define as 1 if sscanf supports the "%ll" format. -#define SSCANF_SUPPORT_ll 0 - -// Define as 1 if sscanf has trouble parsing a float from -// something like "12.34e" (e.g. AIX) -#define SSCANF_CANNOT_HANDLE_MISSING_EXPONENT 0 - -// Define as 1 if snprintf works correctly for large values of n. -#define HAVE_LARGE_SNPRINTF_SUPPORT 0 - -/* Define as 1 if select() on a fifo that has not had any data - written to it returns that data is available for reading. */ -#define HAVE_BROKEN_FIFO_SELECT 0 - -/* Define as 1 if kevent() on a fifo returns EV_ERROR. */ -#define HAVE_BROKEN_FIFO_KEVENT 0 - -// Define as 1 if ftruncate correctly returns failure on large lengths. -#define HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT 1 - -// Define as 1 if ftruncate returns failure but extends the file anyway. -#define HAS_FTRUNCATE_LENGTH_BUG 1 - -/* Define as 1 if SYS_yield is a supported syscall. */ -#define HAVE_YIELD_SYSCALL 0 - -// Define as 1 if pthreads are Mach threads. -#define HAVE_MACH_THREADS 1 - -// Define as 1 if pthreads are Solaris threads. -#define HAVE_SOLARIS_THREADS 0 - -// Define as 1 if pthreads has pthread_suspend -#define HAVE_PTHREAD_SUSPEND 0 - -// Define as 1 if pthreads has pthread_suspend_np -#define HAVE_PTHREAD_SUSPEND_NP 0 - -// Define as 1 if pthreads has pthread_continue -#define HAVE_PTHREAD_CONTINUE 0 - -// Define as 1 if pthreads has pthread_resume_np -#define HAVE_PTHREAD_RESUME_NP 0 - -// Define as 1 if pthreads has pthread_continue_np -#define HAVE_PTHREAD_CONTINUE_NP 0 - -// Define as 1 if mkstemp64 is used instead of mkstemp -#define MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP 0 - -// Define as 1 if open64 is used instead of open -#define OPEN64_IS_USED_INSTEAD_OF_OPEN 0 - -// Define as 1 if pthread has thread_self -#define HAVE_THREAD_SELF 0 - -// Define as 1 if pthread has _lwp_self -#define HAVE__LWP_SELF 0 - -// Define as 1 if sched_get_priority_[min|max] is supported -#define HAVE_SCHED_GET_PRIORITY 1 - -// Define as the hardcoded min and max thread priority (for platforms where -// sched_get_priority_[min|max] does not exist -#define PAL_THREAD_PRIORITY_MIN 0 -#define PAL_THREAD_PRIORITY_MAX 0 - -// Define as 1 if pthread_setschedparam requires special privileges -#define SET_SCHEDPARAM_NEEDS_PRIVS 0 - -/* Define as 1 if Mach exceptions are supported. */ -#define HAVE_MACH_EXCEPTIONS 1 - -// Define as 1 if Mach's vm_read and vm_write are supported. -#define HAVE_VM_READ 1 - -/* Define as 1 if sigreturn is supported. */ -#define HAVE_SIGRETURN 0 - -/* Define as 1 if _thread_sys_sigreturn is supported. */ -#define HAVE__THREAD_SYS_SIGRETURN 0 - -// Define as 1 if setcontext is supported. -#define HAVE_SETCONTEXT 1 - -// Define as 1 if getcontext is supported. -#define HAVE_GETCONTEXT 1 - -// Define as 1 if copysign is supported. -#define HAVE_COPYSIGN 1 - -// Define as 1 if gethrtime (Solaris/HPUX) is supported. -#define HAVE_GETHRTIME 0 - -// Define as 1 if read_real_time (AIX) is supported. -#define HAVE_READ_REAL_TIME 0 - -// Define as 1 if fsync is supported. -#define HAVE_FSYNC 1 - -// Define as 1 if current platform has a working gettimeofday -#define HAVE_WORKING_GETTIMEOFDAY 1 - -// Define as 1 if current platform has a working clock_gettime -#define HAVE_WORKING_CLOCK_GETTIME 0 - -// Define as 1 if clock_gettime supports CLOCK_MONOTONIC. -#define HAVE_CLOCK_MONOTONIC 0 - -/* Define as 1 if futimes is supported. */ -#define HAVE_FUTIMES 1 - -/* Define as 1 if utimes is supported. */ -#define HAVE_UTIMES 1 - -/* Define as 1 if sysctl is supported. */ -#define HAVE_SYSCTL 1 - -/* Define as 1 if sysconf is supported. */ -#define HAVE_SYSCONF 0 - -/* Define as 1 if strtok_r is supported. */ -#define HAVE_STRTOK_R 1 - -/* Define as 1 if localtime_r is supported. */ -#define HAVE_LOCALTIME_R 1 - -/* Define as 1 if ctime_r is supported. */ -#define HAVE_CTIME_R 1 - -/* Defined as 1 if gmtime_r is supported. */ -#define HAVE_GMTIME_R 1 - -/* Define as 1 if timegm is supported. */ -#define HAVE_TIMEGM 1 - -/* Define as 1 if _snwprintf is supported. */ -#define HAVE__SNWPRINTF 0 - -// Define as 1 if poll is supported. -#define HAVE_POLL 1 - -// Define as 1 if INFTIM is defined. -#define HAVE_INFTIM 0 - -// Define as 1 if CHAR_BIT is defined -#define HAVE_CHAR_BIT 0 - -/* Define as 1 if directio is supported. */ -#define HAVE_DIRECTIO 0 - -/* Define as 1 if use of directio is disabled, - even if HAVE_DIRECTIO is defined. */ -#define DIRECTIO_DISABLED 0 - -/* Define as 1 if vm_allocate is supported. */ -#define HAVE_VM_ALLOCATE 1 - -/* Define as 1 if statfs is supported. */ -#define HAVE_STATFS 0 - -/* Define as 1 if statvfs is supported. */ -#define HAVE_STATVFS 1 - -/* Define as 1 if statvfs64 prototype is broken. */ -#define STATVFS64_PROTOTYPE_BROKEN 0 - -/* Define as 1 if siginfo_t is supported. */ -#define HAVE_SIGINFO_T 1 - -/* Define as 1 if ucontext_t is supported. */ -#define HAVE_UCONTEXT_T 0 - -/* Defined to sizeof(off_t). */ -#define SIZEOF_OFF_T 8 - -/* Define as 1 if in_addr_t is supported. */ -#define HAVE_IN_ADDR_T 1 - -// Define as 1 if caddr_t is supported. -#define HAVE_CADDR_T 0 - -/* Define as 1 if socklen_t is supported. */ -#define HAVE_SOCKLEN_T 1 - -/* Define as 1 if sockaddr_ext is supported. */ -#define HAVE_SOCKADDR_EXT 0 - -/* Define as 1 if pthread_rwlock_t is supported. */ -#define HAVE_PTHREAD_RWLOCK_T 1 - -/* Define as 1 if Core Foundation is supported (Darwin/Mac OS X only). */ -#define HAVE_COREFOUNDATION 1 - -/* Define as 1 if _NSGetEnviron is supported (Darwin/Mac OS X only). */ -#define HAVE__NSGETENVIRON 1 - -/* Define this if debug channel output should be appended to existing files - instead of overwriting */ -/* #undef _PAL_APPEND_DBG_OUTPUT_ */ - -/* Define as 1 if mmap() can map a file descriptor for /dev/zero */ -#define HAVE_MMAP_DEV_ZERO 0 - -// Define as 1 if mmap() ignores its hint parameter. -#define MMAP_IGNORES_HINT 0 - -// Define as 1 if mmap() ignores its protection parameter when -// mapping anonymous pages. -#define MMAP_ANON_IGNORES_PROTECTION 0 - -// Define as 1 if mmap() allows remapping previously mapped pages -#define MMAP_DOESNOT_ALLOW_REMAP 0 - -// Define as 1 if there cannot be more than one shared mapping of a file -// region per process at the same time -#define ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS 0 - -// Define as 1 if pthread_create() modifies errno when it succeeds. -#define PTHREAD_CREATE_MODIFIES_ERRNO 0 - -// Define as 1 if sem_init() modifies errno when it succeeds. -#define SEM_INIT_MODIFIES_ERRNO 0 - -// Define as 1 if prwatch_t is supported -#define HAVE_PRWATCH_T 0 - -// Define as 1 if /proc//ctl is supported. -#define HAVE_PROCFS_CTL 0 - -// Define as the name of the memory file in /proc/ -#define PROCFS_MEM_NAME "" - -// Define as 1 if including sys/user.h will result in -// _DEBUG being defined -#define USER_H_DEFINES_DEBUG 0 - -// Define as 1 if close(fd) blocks until there is any outstanding -// syscall using fd (e.g. AIX) -#define CLOSE_BLOCKS_ON_OUTSTANDING_SYSCALLS 0 - -// Define as 1 if sendto returns EHOSTUNREACH when sendto'ing using a -// "to" sockaddr which does not match the socket address family -// (e.g. AIX) -#define SENDTO_RETURNS_UNREACH_ON_WRONG_AF 0 - -// Define as 1 if shutdown fails on connectionless sockets -// (e.g. AIX) -#define SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS 1 - -// Define as 1 if it is possible to broadcast on a socket regardless of SO_BROADCAST -// (e.g. Solaris) -#define BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST 0 - -// Define as 1 if SO_RCVTIMEO and SO_SNDTIMEO are not supported -// or are ignored -#define SO_TIMEO_NOT_SUPPORTED 0 - -// Define as 1 if write of 0 bytes to the console hangs. -#define WRITE_0_BYTES_HANGS_TTY 0 - -// Define as 1 if acos is compatible with Windows. -#define HAVE_COMPATIBLE_ACOS 1 - -// Define as 1 if asin is compatible with Windows. -#define HAVE_COMPATIBLE_ASIN 1 - -// Define as 1 if pow is compatible with Windows. -#define HAVE_COMPATIBLE_POW 0 - -// Define as 1 if pow returns -Inf when given a negative base and a -// large magnitude odd exponent. -#define HAVE_VALID_NEGATIVE_INF_POW 1 - -// Define as 1 if pow returns +Inf when given a negative base and a -// large magnitude even exponent. -#define HAVE_VALID_POSITIVE_INF_POW 1 - -// Define as 1 if atan2 is compatible with Windows. -#define HAVE_COMPATIBLE_ATAN2 1 - -// Define as 1 if exp is compatible with Windows. -#define HAVE_COMPATIBLE_EXP 1 - -// Define as 1 if log is compatible with Windows. -#define HAVE_COMPATIBLE_LOG 1 - -// Define as 1 if log10 is compatible with Windows. -#define HAVE_COMPATIBLE_LOG10 1 - -// Define as 1 if ttrace is supported -#define HAVE_TTRACE 0 - -// Define as 1 if calling dlopen() on a library which is already -// opened returns a different handle -#define RETURNS_NEW_HANDLES_ON_REPEAT_DLOPEN 0 - -// If 1, SetThreadPriority() will not actually modify the pthread priority -// for threads which aren't critical or idle -#define PAL_IGNORE_NORMAL_THREAD_PRIORITY 0 - -// Define as a macro that correctly calls ptrace for the platform, e.g.: -// #define PAL_PTRACE(cmd, pid, addr, data) ptrace((cmd), (pid), (int*)(addr), (data), 0) -// Note that for autconfig substitution to properly occur the argument list -// must not be present in this file -- it should only be in the appropriate -// AC_DEFINE statement -#define PAL_PTRACE(cmd, pid, addr, data) ptrace((cmd), (pid), (caddr_t)(addr), (data)) - -// Define as the ptrace cmd value to attach to a process -#define PAL_PT_ATTACH PT_ATTACH - -// Define as the ptrace cmd value to detach from a process -#define PAL_PT_DETACH PT_DETACH - -// Define as the ptrace cmd value to read a word from a process's data space -#define PAL_PT_READ_D PT_READ_D - -// Define as the ptrace cmd value to write a word to a process's data space -#define PAL_PT_WRITE_D PT_WRITE_D - -// Define as 1 if ISO locale names needs to be in lowercase -#define HAVE_LOWERCASE_ISO_NAME 0 - -// Define as 1 if ISO locale names need an underscore after -// the "ISO" in the name. -#define HAVE_UNDERSCORE_ISO_NAME 0 - -// Define as 1 if we have per-thread locales as defined in xlocale.h -#define HAVE_XLOCALE 1 - -// Define as 1 if ungetc dose not return EOF on write-only file -#define UNGETC_NOT_RETURN_EOF 0 - -// Define as 1 if malloc(0) returns null -#define MALLOC_ZERO_RETURNS_NULL 0 - -// Define as 1 if error function for glob takes specific parameters -#define ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1 - -// Define the ja_JP locale name -#define JA_JP_LOCALE_NAME "ja_JP.SJIS" - -// Define the ko_KR locale name -#define KO_KR_LOCALE_NAME "ko_KR.eucKR" - -// Define the zh_TW locale name -#define ZH_TW_LOCALE_NAME "zh_TW.BIG5" - -// Define as 1 if thread suspension uses signals -#define USE_SIGNALS_FOR_THREAD_SUSPENSION 0 - -// Define as 1 if platform has POSIX semaphores -#define HAS_POSIX_SEMAPHORES 0 - -// Define as 1 if suspending a thread while blocked on a lock can cause a hang -#define DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 1 - -// Define as 1 if sigwait cannot take a full sigset as a valid parameter -#define SIGWAIT_FAILS_WHEN_PASSED_FULL_SIGSET 0 - -// Define as 1 if a thread cannot suspend itself using the native suspension function -#define SELF_SUSPEND_FAILS_WITH_NATIVE_SUSPENSION 0 - -// Define as 1 if netdb.h defines MAXHOSTNAMELEN -#define NETDB_DEFINES_MAXHOSTNAMELEN 0 - -// Define as 1 if sys/param.h defines MAXHOSTNAMELEN -#define SYS_PARAM_DEFINES_MAXHOSTNAMELEN 0 - -// Define as 1 if getpwuid_r sets errno to ERANGE instead of returning ERANGE error -#define GETPWUID_R_SETS_ERRNO 0 - -// Define as 1 in order to use pipes as native support for thread blocking in the -// Synchronization Manager -#define SYNCHMGR_PIPE_BASED_THREAD_BLOCKING 0 - -// Define as 1 in order to signal conditions from a thread suspension safe area -#define SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1 - -// Define as 1 if C-runtime file functions (e.g. fwrite) use the ferror() -// value set by a previous file operation. -#define FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL 0 - -// Define as 1 if platform has SYSV semaphores -#define HAS_SYSV_SEMAPHORES 1 - -// Define as 1 if platform has pthread mutexes -#define HAS_PTHREAD_MUTEXES 1 - -// Define as 1 if using stack protection, but need implementation -#define NEED_STACK_PROTECTOR_IMPL 1 - -#endif // _PAL_CONFIG_H_INCLUDED - - diff --git a/src/pal/src/configure.cmake b/src/pal/src/configure.cmake new file mode 100644 index 000000000000..2723f4cd2fbf --- /dev/null +++ b/src/pal/src/configure.cmake @@ -0,0 +1,1076 @@ +include(CheckCXXSourceCompiles) +include(CheckCXXSourceRuns) +include(CheckCXXSymbolExists) +include(CheckFunctionExists) +include(CheckIncludeFiles) +include(CheckStructHasMember) +include(CheckTypeSize) + +check_include_files(wchar.h HAVE_WCHAR_H) +check_include_files(ieeefp.h HAVE_IEEEFP_H) +check_include_files(alloca.h HAVE_ALLOCA_H) +check_include_files(stdint.h HAVE_STDINT_H) +check_include_files(netdb.h HAVE_NETDB_H) +check_include_files(inttypes.h HAVE_INTTYPES_H) +check_include_files(stropts.h HAVE_STROPTS_H) +check_include_files(sys/vmparam.h HAVE_SYS_VMPARAM_H) +check_include_files(mach/vm_types.h HAVE_MACH_VM_TYPES_H) +check_include_files(mach/vm_param.h HAVE_MACH_VM_PARAM_H) +check_include_files(sys/param.h HAVE_SYS_PARAM_H) +check_include_files(sys/filio.h HAVE_SYS_FILIO_H) +check_include_files(sys/sockio.h HAVE_SYS_SOCKIO_H) +check_include_files(procfs.h HAVE_PROCFS_H) +check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H) +check_include_files(sys/time.h HAVE_SYS_TIME_H) +check_include_files(pthread_np.h HAVE_PTHREAD_NP_H) +check_include_files(sys/lwp.h HAVE_SYS_LWP_H) +check_include_files(xlocale.h HAVE_XLOCALE) + +check_function_exists(kqueue HAVE_KQUEUE) +check_function_exists(tolower HAVE_TOLOWER) +check_function_exists(getpwuid_r HAVE_GETPWUID_R) +check_function_exists(pthread_suspend HAVE_PTHREAD_SUSPEND) +check_function_exists(pthread_suspend_np HAVE_PTHREAD_SUSPEND_NP) +check_function_exists(pthread_continue HAVE_PTHREAD_CONTINUE) +check_function_exists(pthread_resume_np HAVE_PTHREAD_RESUME_NP) +check_function_exists(pthread_continue_np HAVE_PTHREAD_CONTINUE_NP) +check_function_exists(sigreturn HAVE_SIGRETURN) +check_function_exists(_thread_sys_sigreturn HAVE__THREAD_SYS_SIGRETURN) +check_function_exists(setcontext HAVE_SETCONTEXT) +check_function_exists(getcontext HAVE_GETCONTEXT) +check_function_exists(copysign HAVE_COPYSIGN) +check_function_exists(fsync HAVE_FSYNC) +check_function_exists(futimes HAVE_FUTIMES) +check_function_exists(utimes HAVE_UTIMES) +check_function_exists(sysctl HAVE_SYSCTL) +check_function_exists(sysconf HAVE_SYSCONF) +check_function_exists(strtok_r HAVE_STRTOK_R) +check_function_exists(localtime_r HAVE_LOCALTIME_R) +check_function_exists(ctime_r HAVE_CTIME_R) +check_function_exists(gmtime_r HAVE_GMTIME_R) +check_function_exists(timegm HAVE_TIMEGM) +check_function_exists(_snwprintf HAVE__SNWPRINTF) +check_function_exists(poll HAVE_POLL) +check_function_exists(statfs HAVE_STATFS) +check_function_exists(statvfs HAVE_STATVFS) +check_function_exists(thread_self HAVE_THREAD_SELF) +check_function_exists(_lwp_self HAVE__LWP_SELF) +check_function_exists(pthread_mach_thread_np HAVE_MACH_THREADS) +check_function_exists(thread_set_exception_ports HAVE_MACH_EXCEPTIONS) +check_function_exists(vm_allocate HAVE_VM_ALLOCATE) +check_function_exists(vm_read HAVE_VM_READ) +check_function_exists(directio HAVE_DIRECTIO) +check_function_exists(semget HAS_SYSV_SEMAPHORES) +check_function_exists(pthread_mutex_init HAS_PTHREAD_MUTEXES) +check_function_exists(ttrace HAVE_TTRACE) + +set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE") +check_struct_has_member ("struct stat" st_atimespec "sys/types.h;sys/stat.h" HAVE_STAT_TIMESPEC) +check_struct_has_member ("struct stat" st_atimensec "sys/types.h;sys/stat.h" HAVE_STAT_NSEC) +check_struct_has_member ("struct sockaddr" sa_len "sys/types.h;sys/socket.h" HAVE_SOCKADDR_SA_LEN) +check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF) +check_struct_has_member ("ucontext_t" uc_mcontext.gregs[0] ucontext.h HAVE_GREGSET_T) + +set(CMAKE_EXTRA_INCLUDE_FILES machine/reg.h) +check_type_size("struct regs" BSD_REGS_T) +set(CMAKE_EXTRA_INCLUDE_FILES) +set(CMAKE_EXTRA_INCLUDE_FILES asm/ptrace.h) +check_type_size("struct pt_regs" PT_REGS) +set(CMAKE_EXTRA_INCLUDE_FILES) +set(CMAKE_EXTRA_INCLUDE_FILES signal.h) +check_type_size(siginfo_t SIGINFO_T) +set(CMAKE_EXTRA_INCLUDE_FILES) +set(CMAKE_EXTRA_INCLUDE_FILES ucontext.h) +check_type_size(ucontext_t UCONTEXT_T) +set(CMAKE_EXTRA_INCLUDE_FILES) +set(CMAKE_EXTRA_INCLUDE_FILES netinet/in.h sys/types.h) +check_type_size(in_addr_t IN_ADDR_T) +set(CMAKE_EXTRA_INCLUDE_FILES) +set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) +check_type_size(socklen_t SOCKLEN_T) +check_type_size(sockaddr_ext SOCKADDR_EXT) +set(CMAKE_EXTRA_INCLUDE_FILES) +set(CMAKE_EXTRA_INCLUDE_FILES pthread.h) +check_type_size(pthread_rwlock_t PTHREAD_RWLOCK_T) +set(CMAKE_EXTRA_INCLUDE_FILES) +set(CMAKE_EXTRA_INCLUDE_FILE procfs.h) +check_type_size(prwatch_t PRWATCH_T) +set(CMAKE_EXTRA_INCLUDE_FILE) +check_type_size(off_t SIZEOF_OFF_T) +set(CMAKE_REQUIRED_DEFINITIONS) + +check_cxx_symbol_exists(tzname "time.h" HAVE_TZNAME) +check_cxx_symbol_exists(timezone "time.h" HAVE_TIMEZONE_VAR) +check_cxx_symbol_exists(SYS_yield sys/syscall.h HAVE_YIELD_SYSCALL) +check_cxx_symbol_exists(INFTIM poll.h HAVE_INFTIM) +check_cxx_symbol_exists(CHAR_BIT sys/limits.h HAVE_CHAR_BIT) +check_cxx_symbol_exists(_DEBUG sys/user.h USER_H_DEFINES_DEBUG) +check_cxx_symbol_exists(_SC_PHYS_PAGES unistd.h HAVE__SC_PHYS_PAGES) +check_cxx_symbol_exists(_SC_AVPHYS_PAGES unistd.h HAVE__SC_AVPHYS_PAGES) + +check_cxx_source_runs(" +#include +#include + +int main(void) { + char *path; +#ifdef PATH_MAX + char resolvedPath[PATH_MAX]; +#elif defined(MAXPATHLEN) + char resolvedPath[MAXPATHLEN]; +#else + char resolvedPath[1024]; +#endif + path = realpath(\"a_nonexistent_file\", resolvedPath); + if (path == NULL) { + exit(1); + } + exit(0); +}" REALPATH_SUPPORTS_NONEXISTENT_FILES) +check_cxx_source_runs(" +#include +#include +int main(void) +{ + long long n = 0; + sscanf(\"5000000000\", \"%qu\", &n); + exit (n != 5000000000); + }" SSCANF_SUPPORT_ll) +check_cxx_source_runs(" +#include +#include + +int main() +{ + int ret; + float f = 0; + char * strin = \"12.34e\"; + + ret = sscanf (strin, \"%e\", &f); + if (ret <= 0) + exit (0); + exit(1); +}" SSCANF_CANNOT_HANDLE_MISSING_EXPONENT) +check_cxx_source_runs(" +#include +#include + +int main(void) { + char buf[256] = { 0 }; + snprintf(buf, 0x7fffffff, \"%#x\", 0x12345678); + if (buf[0] == 0x0) { + exit(1); + } + exit(0); +}" HAVE_LARGE_SNPRINTF_SUPPORT) +check_cxx_source_runs(" +#include +#include +#include +#include +#include +#include +#include +#include + +int main(void) { + int fd, numFDs; + fd_set readFDs, writeFDs, exceptFDs; + struct timeval time = { 0 }; + char * filename = NULL; + + filename = (char *)malloc(L_tmpnam * sizeof(char)); /* ok to leak this at exit */ + if (NULL == filename) { + exit(0); + } + + /* On some platforms (e.g. HP-UX) the multithreading c-runtime does not + support the tmpnam(NULL) semantics, and it returns NULL. Therefore + we need to use the tmpnam(pbuffer) version. + */ + if (NULL == tmpnam(filename)) { + exit(0); + } + if (mkfifo(filename, S_IRWXU) != 0) { + if (unlink(filename) != 0) { + exit(0); + } + if (mkfifo(filename, S_IRWXU) != 0) { + exit(0); + } + } + fd = open(filename, O_RDWR | O_NONBLOCK); + if (fd == -1) { + exit(0); + } + + FD_ZERO(&readFDs); + FD_ZERO(&writeFDs); + FD_ZERO(&exceptFDs); + FD_SET(fd, &readFDs); + numFDs = select(fd + 1, &readFDs, &writeFDs, &exceptFDs, &time); + + close(fd); + unlink(filename); + + /* numFDs is zero if select() works correctly */ + exit(numFD==0); +}" HAVE_BROKEN_FIFO_SELECT) +check_cxx_source_runs(" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +int main(void) +{ + int ikq; + int iRet; + int fd; + struct kevent ke, keChangeList; + struct timespec ts = { 0, 0 }; + + char * filename = NULL; + + filename = (char *)malloc(L_tmpnam * sizeof(char)); /* ok to leak this at exit */ + if (NULL == filename) + { + exit(1); + } + + /* On some platforms (e.g. HP-UX) the multithreading c-runtime does not + support the tmpnam(NULL) semantics, and it returns NULL. Therefore + we need to use the tmpnam(pbuffer) version. + */ + if (NULL == tmpnam(filename)) { + exit(0); + } + if (mkfifo(filename, S_IRWXU) != 0) { + if (unlink(filename) != 0) { + exit(0); + } + if (mkfifo(filename, S_IRWXU) != 0) { + exit(0); + } + } + fd = open(filename, O_RDWR | O_NONBLOCK); + if (fd == -1) { + exit(0); + } + + EV_SET(&keChangeList, fd, EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, NULL); + ikq = kqueue(); + iRet = kevent(ikq, &keChangeList, 1, &ke, 1, &ts); + + close(fd); + unlink(filename); + + /* iRet is zero is kevent() works correctly */ + return(iRet==0); +}" HAVE_BROKEN_FIFO_KEVENT) +check_cxx_source_runs(" +#include +#include +#include +#include + +/* INT64_MAX */ +#define OFFSET 9223372036854775807 + +int main(void) { + int fd; + off_t result; + char filename[1024]; + + strcpy(filename, \"/tmp/ftruncate_testXXXXXX\"); + fd = mkstemp(filename); + if (fd == -1) { + exit(1); + } + + result = ftruncate(fd, OFFSET); + unlink(filename); + close(fd); + + if (result != -1) { + exit(1); + } + exit(0); +}" HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT) +check_cxx_source_runs(" +#include +#include +#include +#include +#include +#include + +int main(void) +{ + int fd; + struct stat sStat; + int has_bug = 0; + + fd = open(\"/tmp/ftruncate_test2\", O_CREAT | O_EXCL | O_RDWR, 0777); + if (fd != -1) + { + if (ftruncate(fd, 0x7fffffffffffffffULL) == -1) + { + if (fstat(fd, &sStat) != -1) + has_bug = sStat.st_size != 0; + } + + unlink(\"/tmp/ftruncate_test2\"); + close(fd); + } + + exit(has_bug ? 0 : 1); +}" HAS_FTRUNCATE_LENGTH_BUG) +set(CMAKE_REQUIRED_LIBRARIES pthread) +check_cxx_source_runs(" +#include +#include +#include +#include + +int main(void) +{ + int policy; + struct sched_param schedParam; + int max_priority; + int min_priority; + + if (0 != pthread_getschedparam(pthread_self(), &policy, &schedParam)) + { + exit(1); + } + + max_priority = sched_get_priority_max(policy); + min_priority = sched_get_priority_min(policy); + + exit(-1 == max_priority || -1 == min_priority); +}" HAVE_SCHED_GET_PRIORITY) +set(CMAKE_REQUIRED_LIBRARIES) +check_cxx_source_runs(" +#include +#include +#include + +int main() +{ + int ret; + struct timeval tv; + ret = gettimeofday(&tv, NULL); + + exit(ret); +}" HAVE_WORKING_GETTIMEOFDAY) +check_cxx_source_runs(" +#include +#include +#include + +int main() +{ + int ret; + struct timespec ts; + ret = clock_gettime(CLOCK_REALTIME, &ts); + + exit(ret); +}" HAVE_WORKING_CLOCK_GETTIME) +check_cxx_source_runs(" +#include +#include +#include + +int main() +{ + int ret; + struct timespec ts; + ret = clock_gettime(CLOCK_MONOTONIC, &ts); + + exit(ret); +}" HAVE_CLOCK_MONOTONIC) +check_cxx_source_runs(" +#include +#include +#include +#include + +int main(void) { + int devzero; + void *retval; + + devzero = open(\"/dev/zero\", O_RDWR); + if (-1 == devzero) { + exit(1); + } + retval = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, devzero, 0); + if (retval == (void *)-1) { + exit(1); + } + exit(0); +}" HAVE_MMAP_DEV_ZERO) +check_cxx_source_runs(" +#include +#include +#include +#include +#include + +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif + +int main(void) { + void *hint, *ptr; + int pagesize; + int fd; + + pagesize = getpagesize(); + fd = open(\"/etc/passwd\", O_RDONLY); + if (fd == -1) { + exit(0); + } + ptr = mmap(NULL, pagesize, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0); + if (ptr == MAP_FAILED) { + exit(0); + } + hint = mmap(NULL, pagesize, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0); + if (hint == MAP_FAILED) { + exit(0); + } + if (munmap(ptr, pagesize) != 0) { + exit(0); + } + if (munmap(hint, pagesize) != 0) { + exit(0); + } + ptr = mmap(hint, pagesize, PROT_NONE, MAP_FIXED | MAP_PRIVATE, fd, 0); + if (ptr == MAP_FAILED || ptr != hint) { + exit(0); + } + exit(1); +}" MMAP_IGNORES_HINT) +check_cxx_source_runs(" +#include +#include +#include +#include +#include + +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif + +void *handle_signal(int signal) { + /* If we reach this, we've crashed due to mmap honoring + PROT_NONE. */ + _exit(1); +} + +int main(void) { + int *ptr; + struct sigaction action; + + ptr = (int *) mmap(NULL, getpagesize(), PROT_NONE, + MAP_ANON | MAP_PRIVATE, -1, 0); + if (ptr == (int *) MAP_FAILED) { + exit(0); + } + action.sa_handler = &handle_signal; + action.sa_flags = 0; + sigemptyset(&action.sa_mask); + if (sigaction(SIGBUS, &action, NULL) != 0) { + exit(0); + } + if (sigaction(SIGSEGV, &action, NULL) != 0) { + exit(0); + } + /* This will drop us into the signal handler if PROT_NONE + is honored. */ + *ptr = 123; + exit(0); +}" MMAP_ANON_IGNORES_PROTECTION) +check_cxx_source_runs(" +#include +#include +#include +#include + +#ifndef MAP_ANON +#define MAP_ANON MAP_ANONYMOUS +#endif + +int main() +{ + int iRet = 1; + void * pAddr = MAP_FAILED; + int MemSize = 1024; + + MemSize = getpagesize(); + pAddr = mmap(0x0, MemSize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); + if (pAddr == MAP_FAILED) + exit(0); + + pAddr = mmap(pAddr, MemSize, PROT_WRITE | PROT_READ, MAP_FIXED | MAP_PRIVATE | MAP_ANON, -1, 0); + if (pAddr == MAP_FAILED) + iRet = 0; + + munmap(pAddr, MemSize); // don't care of this + exit (iRet); +}" MMAP_DOESNOT_ALLOW_REMAP) +check_cxx_source_runs(" +#include +#include +#include +#include +#include +#include + +#define MEM_SIZE 1024 + +int main(void) +{ + char * fname; + int fd; + int ret; + void * pAddr0, * pAddr1; + + fname = (char *)malloc(MEM_SIZE); + if (!fname) + exit(1); + strcpy(fname, \"/tmp/name/multiplemaptestXXXXXX\"); + + fd = mkstemp(fname); + if (fd < 0) + exit(1); + + ret = write (fd, (void *)fname, MEM_SIZE); + if (ret < 0) + exit(1); + + pAddr0 = mmap(0, MEM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + pAddr1 = mmap(0, MEM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); + + /* In theory we should look for (pAddr1 == MAP_FAILED) && (pAddr1 != MAP_FAILED) + but in case the first test also failed, i.e. we failed to run the test, + let's assume that the system might not allow multiple shared mapping of the + same file region in the same process. The code enabled in this case is + only a fall-back code path. In case the double mmap actually works, virtually + nothing will change and the normal code path will be executed */ + if (pAddr1 == MAP_FAILED) + ret = 1; + else + ret = 0; + + if (pAddr0) + munmap (pAddr0, MEM_SIZE); + if (pAddr1) + munmap (pAddr1, MEM_SIZE); + close(fd); + unlink(fname); + free(fname); + + exit(ret != 1); +}" ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS) +set(CMAKE_REQUIRED_LIBRARIES pthread) +check_cxx_source_runs(" +#include +#include +#include + +void *start_routine(void *param) { return NULL; } + +int main() { + int result; + pthread_t tid; + + errno = 0; + result = pthread_create(&tid, NULL, start_routine, NULL); + if (result != 0) { + exit(1); + } + if (errno != 0) { + exit(0); + } + exit(1); +}" PTHREAD_CREATE_MODIFIES_ERRNO) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES pthread) +check_cxx_source_runs(" +#include +#include +#include + +int main() { + int result; + sem_t sema; + + errno = 50; + result = sem_init(&sema, 0, 0); + if (result != 0) + { + exit(1); + } + if (errno != 50) + { + exit(0); + } + exit(1); +}" SEM_INIT_MODIFIES_ERRNO) +set(CMAKE_REQUIRED_LIBRARIES) +check_cxx_source_runs(" +#include +#include +#include +#include + +int main(void) { + int fd; +#ifdef PATH_MAX + char path[PATH_MAX]; +#elif defined(MAXPATHLEN) + char path[MAXPATHLEN]; +#else + char path[1024]; +#endif + + sprintf(path, \"/proc/%u/$1\", getpid()); + fd = open(path, $2); + if (fd == -1) { + exit(1); + } + exit(0); +}" HAVE_PROCFS_CTL) +check_cxx_source_runs(" +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + int ret = 0; + int s; + struct sockaddr_in targetAddr; + char buff[10]; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (-1 == s) + { + exit (1); + } + + memset (&targetAddr, 0, sizeof(targetAddr)); + targetAddr.sin_family = AF_INET; + targetAddr.sin_addr.s_addr = htonl(inet_addr(\"127.0.0.1\")); + targetAddr.sin_port = htons(11000); + + ret = shutdown(s,2); + if ((ret < 0) && (errno == ENOTCONN)) + ret = 0; + else + ret = 1; + + close(s); + exit(ret); +}" SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS) +check_cxx_source_runs(" +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + int ret = 0; + int ival = 0; + int s; + struct sockaddr_in targetAddr; + char chr; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (-1 == s) + { + exit (1); + } + + /* Make sure SO_BROADCAST it is off (it should be by default) */ + ret = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&ival, sizeof(int)); + if (-1 == ret) + { + exit (1); + } + + memset (&targetAddr, 0, sizeof(targetAddr)); + targetAddr.sin_family = AF_INET; + targetAddr.sin_addr.s_addr = htonl(inet_addr(\"255.255.255.255\")); + targetAddr.sin_port = htons(11000); + + ret = sendto(s, &chr, 1, 0, (struct sockaddr *)&targetAddr, sizeof(targetAddr)); + if ((ret < 0) && (errno == EACCES)) + ret = 1; + else + ret = 0; + + close(s); + exit(ret); +}" BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(void) { + if (!isnan(acos(10))) { + exit(1); + } + exit(0); +}" HAVE_COMPATIBLE_ACOS) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(void) { + if (!isnan(asin(10))) { + exit(1); + } + exit(0); +}" HAVE_COMPATIBLE_ASIN) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(void) { + double infinity = 1.0 / 0.0; + if (!isnan(pow(1.0, infinity))) { + exit(1); + } + if (pow(0.0, -1) != infinity) { + exit(1); + } + exit(0); +}" HAVE_COMPATIBLE_POW) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(int argc, char **argv) { + double result; + + result = pow(-3.2e-10, -5e14 + 1); + if (result != -1.0 / 0.0) { + exit(1); + } + exit(0); +}" HAVE_VALID_NEGATIVE_INF_POW) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(int argc, char **argv) { + double result; + + result = pow(-3.5, 3e100); + if (result != 1.0 / 0.0) { + exit(1); + } + exit(0); +}" HAVE_VALID_POSITIVE_INF_POW) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(void) { + double pi = 3.14159265358979323846; + double result; + + result = atan2(0.0, -0.0); + if (fabs(pi - result) > 0.0000001) { + exit(1); + } + + result = atan2(-0.0, -0.0); + if (fabs(-pi - result) > 0.0000001) { + exit(1); + } + + result = atan2 (-0.0, 0.0); + if (result != 0.0 || copysign (1.0, result) > 0) { + exit(1); + } + + result = atan2 (0.0, 0.0); + if (result != 0.0 || copysign (1.0, result) < 0) { + exit(1); + } + + exit (0); +}" HAVE_COMPATIBLE_ATAN2) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(void) { + double d = exp(1.0), e = M_E; + + /* Used memcmp rather than == to test that the doubles are equal to + prevent gcc's optimizer from using its 80 bit internal long + doubles. If you use ==, then on BSD you get a false negative since + exp(1.0) == M_E to 64 bits, but not 80. + */ + + if (memcmp (&d, &e, sizeof (double)) == 0) { + exit(0); + } + exit(1); +}" HAVE_COMPATIBLE_EXP) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(void) { + if (!isnan(log(-10000))) { + exit(1); + } + exit(0); +}" HAVE_COMPATIBLE_LOG) +set(CMAKE_REQUIRED_LIBRARIES) +set(CMAKE_REQUIRED_LIBRARIES m) +check_cxx_source_runs(" +#include +#include + +int main(void) { + if (!isnan(log10(-10000))) { + exit(1); + } + exit(0); +}" HAVE_COMPATIBLE_LOG10) +set(CMAKE_REQUIRED_LIBRARIES) +check_cxx_source_runs(" +#include +#include + +int main(void) +{ + char* szFileName; + FILE* pFile = NULL; + int ret = 0; + + szFileName = tempnam(\".\", \"tmp\"); + + /* open the file write-only */ + pFile = fopen(szFileName, \"a\"); + if (pFile == NULL) + { + exit(1); + } + if (ungetc('A', pFile) != EOF) + { + ret = 1; + } + unlink(szFileName); + exit(ret); +}" UNGETC_NOT_RETURN_EOF) +check_cxx_source_runs(" +#include + +int main(void) +{ + void *p; + + p = malloc(0); + + if (p == NULL) + { + exit(0); + } + + exit(1); +}" MALLOC_ZERO_RETURNS_NULL) +set(CMAKE_REQUIRED_LIBRARIES pthread) +check_cxx_source_runs(" +#include +#include +#include + +int main() { + sem_t sema; + if (sem_init(&sema, 0, 0) == -1){ + exit(1); + } + exit(0); +}" HAS_POSIX_SEMAPHORES) +set(CMAKE_REQUIRED_LIBRARIES) +check_cxx_source_runs(" +#include +#include +#include +#include +#include + +int main(void) +{ + struct passwd sPasswd; + struct passwd *pPasswd; + char buf[1]; + int bufLen = sizeof(buf)/sizeof(buf[0]); + int euid = geteuid(); + int ret = 0; + + errno = 0; // clear errno + ret = getpwuid_r(euid, &sPasswd, buf, bufLen, &pPasswd); + if (0 != ret) + { + if (ERANGE == errno) + { + return 0; + } + } + + return 1; // assume errno is NOT set for all other cases +}" GETPWUID_R_SETS_ERRNO) +check_cxx_source_runs(" +#include +#include + +int main() +{ + FILE *fp = NULL; + char *fileName = \"/dev/zero\"; + char buf[10]; + + /* + * Open the file in append mode and try to read some text. + * And, make sure ferror() is set. + */ + fp = fopen (fileName, \"a\"); + if ( (NULL == fp) || + (fread (buf, sizeof(buf), 1, fp) > 0) || + (!ferror(fp)) + ) + { + return 0; + } + + /* + * Now that ferror() is set, try to close the file. + * If we get an error, we can conclude that this + * fgets() depended on the previous ferror(). + */ + if ( fclose(fp) != 0 ) + { + return 0; + } + + return 1; +}" FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL) +check_cxx_source_runs(" +#include +#include +#include +#include +#include +#include +#include +#include + +int main() +{ + int ret = 0; + int ival = 0; + int s; + struct sockaddr_in targetAddr; + char chr; + + s = socket(AF_INET, SOCK_DGRAM, 0); + if (-1 == s) + { + exit (1); + } + + /* Make sure SO_BROADCAST it is off (it should be by default) */ + ret = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&ival, sizeof(int)); + if (-1 == ret) + { + exit (1); + } + + memset (&targetAddr, 0, sizeof(targetAddr)); + targetAddr.sin_family = AF_INET; + targetAddr.sin_addr.s_addr = htonl(inet_addr(\"255.255.255.255\")); + targetAddr.sin_port = htons(11000); + + ret = sendto(s, &chr, 1, 0, (struct sockaddr *)&targetAddr, sizeof(targetAddr)); + if ((ret < 0) && (errno == EACCES)) + ret = 1; + else + ret = 0; + + close(s); + exit(ret); +}" BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST) + + + +if(CMAKE_SYSTEM_NAME STREQUAL Darwin) + set(HAVE_COREFOUNDATION 1) + set(HAVE__NSGETENVIRON 1) + set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 1) + set(PAL_PTRACE "ptrace((cmd), (pid), (caddr_t)(addr), (data))") + set(PAL_PT_ATTACH PT_ATTACH) + set(PAL_PT_DETACH PT_DETACH) + set(PAL_PT_READ_D PT_READ_D) + set(PAL_PT_WRITE_D PT_WRITE_D) + set(USE_SIGNALS_FOR_THREAD_SUSPENSION 0) + set(SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1) + set(JA_JP_LOCALE_NAME ja_JP.SJIS) + set(KO_KR_LOCALE_NAME ko_KR.eucKR) + set(ZH_TW_LOCALE_NAME zh_TG.BIG5) + set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1) +else() + set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0) + set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))") + set(PAL_PT_ATTACH PTRACE_ATTACH) + set(PAL_PT_DETACH PTRACE_DETACH) + set(PAL_PT_READ_D PTRACE_PEEKDATA) + set(PAL_PT_WRITE_D PTRACE_POKEDATA) + set(USE_SIGNALS_FOR_THREAD_SUSPENSION 1) + set(SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING 1) + set(JA_JP_LOCALE_NAME ja_JP_LOCALE_NOT_FOUND) + set(KO_KR_LOCALE_NAME ko_KR_LOCALE_NOT_FOUND) + set(ZH_TW_LOCALE_NAME zh_TW_LOCALE_NOT_FOUND) + set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1) +endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) + diff --git a/src/pal/src/configure.in b/src/pal/src/configure.in deleted file mode 100644 index 35a1f7de95b4..000000000000 --- a/src/pal/src/configure.in +++ /dev/null @@ -1,2763 +0,0 @@ -dnl /*++ -dnl Copyright (c) Microsoft Corporation. All rights reserved. -dnl -dnl Module Name : configure.in -dnl -dnl process this file with autoconf to create a configure script -dnl -dnl --*/ - -AC_INIT(include/pal/palinternal.h) -rm -f config.status - -if test ! "$BUILD_ALT_DIR" -then - echo "Environment not set. Run '. env.sh' before building the PAL." - exit -fi - -AC_CONFIG_HEADER(config.h:../../config.h.in) - -dnl configure options go here. - -AC_ARG_ENABLE(debug, -[ --disable-debug compile out all debug-only code], -[if test "$enableval" = "no"; then DEBUG_ENABLED="no"; fi]) - -AC_ARG_ENABLE(dbgmsg, -[ --disable-dbgmsg compile out all debugging messages], -[if test "$enableval" = "no"; then DEBUG_MSGS="no"; fi]) - -AC_ARG_ENABLE(appendtraces, -[ --enable-appendtraces append debug traces to existing file \ -instead of overwriting], -[if test "$enableval" = "yes"; then DBG_APPEND="yes"; else DBG_APPEND="no"; fi]) - -AC_ARG_ENABLE(tracechecks, -[ --enable-tracechecks check format specifiers in trace macros (gcc only)], -,enable_tracechecks=no) - -AC_ARG_WITH(vac, -[ --with-vac use visual age compiler instead of gcc], -USE_VAC_CC=1) - -dnl define more options here - -AC_SUBST(OPTIONS) - - -AC_MSG_CHECKING(platform name) -platform_name=`uname -s` -if test X"$platform_name" = "X"; then - platform_name=Unknown -fi -AC_MSG_RESULT($platform_name) - -AC_MSG_CHECKING(architecture) -if test `uname -s` = Darwin; then - if test "$_BUILDARCH" = rotor_x86; then - ARCH_DIR=i386 - elif test "$_BUILDARCH" = rotor_amd64; then - ARCH_DIR=i386 - else - ARCH_DIR=$_BUILDARCH - fi -else - ARCH_DIR=`(/usr/bin/uname -p | sed -e s/powerpc/ppc/ -e s/i.86/i386/) 2>/dev/null` - if test X"$ARCH_DIR" = "X"; then - if test "$platform_name" = "HP-UX"; then - if test `uname -m` = "ia64"; then - ARCH_DIR="hpia64" - else - ARCH_DIR=`(/usr/bin/uname -s | sed -e s/HP-UX/parisc/) 2>/dev/null || echo unknown` - fi - fi - fi - if test "$ARCH_DIR" = "ppc"; then - if test "$platform_name" = "AIX"; then - ARCH_DIR="aixppc" - fi - fi -fi -dnl Special hack to create the directory that will be needed -> normaly this is done by preconfig, but in this case -dnl the preconfig doesn't know the directory name -mkdir -p ../../arch/$ARCH_DIR/obj$BUILD_ALT_DIR/$_BUILDARCH -AC_MSG_RESULT($ARCH_DIR) -AC_SUBST(ARCH_DIR) - - -if test "$DEBUG_ENABLED" = "no" -then - AC_DEFINE(_NO_DEBUG_MESSAGES_) -else - AC_DEFINE(_DEBUG) - if test "$DEBUG_MSGS" = "no" - then - AC_DEFINE(_NO_DEBUG_MESSAGES_) - fi -fi - -if test "$DBG_APPEND" = "yes" -then - AC_DEFINE(_PAL_APPEND_DBG_OUTPUT_) -fi - -if test "$enable_tracechecks" = "yes" -then - AC_DEFINE(CHECK_TRACE_SPECIFIERS,1) -else - AC_DEFINE(CHECK_TRACE_SPECIFIERS,0) -fi - -dnl Default compiler flags. Honor any set in the environment, but -dnl also turn all warnings on, create position-independent code, -dnl enable exceptions, and disallow common symbols between -dnl compilation units because the linker won't allow them on some -dnl systems. -dnl Note that this has to go before AC_C_BIGENDIAN because that will set -dnl default CFLAGS values if CFLAGS isn't already set. Since we don't -dnl always want the -g -O2 that autoconf uses by default, we have to -dnl set CFLAGS before AC_C_BIGENDIAN. -dnl All code whose makefiles we build with configure is LP64 compatible (i.e. -dnl does not assume long is always 32-bits) -if test "$USE_VAC_CC" = "1"; -then - CC=xlc_r - CXX=xlC_r - dnl these flags are necessary for PAL shared library but not useful for a normal C program - EXTRA_EXPORT_FLAGS="-L/usr/lib -L/usr/vacpp/lib -L/usr/vac/lib -G -bM:SRE -bnoentry -qalloca" - CFLAGS="-L/usr/lib -L/usr/vacpp/lib $CFLAGS -qeh -qlanglvl=extc99 -qlanglvl=extended -DLP64COMPATIBLE" - CFLAGS="$CFLAGS -qflag=w:w -D__STDC_VERSION__=199901L -qcpluscmt -D_VAC_" -else - EXTRA_EXPORT_FLAGS= - CFLAGS="$CFLAGS $ALL_WARNINGS_FLAG -fexceptions -fno-common -DLP64COMPATIBLE" -fi -AC_SUBST(EXTRA_EXPORT_FLAGS) - -dnl Define BIGENDIAN if the current system is big-endian. -dnl The presence of this macro causes autoconf 2.13 to print a warning -dnl about cross-compiling. The warning is a non-issue and can't be -dnl disabled without modifying autoconf. -AC_C_BIGENDIAN -if test "$ac_cv_c_bigendian" = yes; then - BIGENDIAN="-DBIGENDIAN" - CFLAGS="$CFLAGS $BIGENDIAN" -else - dnl For completeness - BIGENDIAN="" -fi - -dnl Determine -fstack-protector support. -# ------------------------------- -# Recent versions of GCC support -fstack-protector (Xcode 3.0) -# and recent versions of Mac OS X have implementations (10.5). -# Check for both availabilities. - -AC_DEFUN([AC_PROG_CC_STACK_PROTECTOR], -[AC_CACHE_CHECK([if $CC supports -fstack-protector], - ac_cv_prog_cc_stack_protector, -[ac_save_CFLAGS=$CFLAGS -ac_cv_prog_cc_stack_protector=no -if test "$GCC" = yes; then - CFLAGS="$ac_save_CFLAGS -fstack-protector" - _AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_cc_stack_protector=yes -break]) -fi - -CFLAGS=$ac_save_CFLAGS -]) -]) # AC_PROG_CC_STACK_PROTECTOR -AC_PROG_CC_STACK_PROTECTOR - -AC_DEFUN([AC_PROG_SYS_STACK_PROTECTOR], -[AC_CACHE_CHECK([if system has implementation for -fstack-protector], - ac_cv_prog_sys_stack_protector, -[ac_save_CFLAGS=$CFLAGS -ac_cv_prog_sys_stack_protector=no -if test "$GCC" = yes; then - # use the "all" variant to ensure that we actually have a function that uses it. - CFLAGS="$ac_save_CFLAGS -fstack-protector-all" - _AC_LINK_IFELSE([AC_LANG_PROGRAM()], - [ac_cv_prog_sys_stack_protector=yes -break]) -fi - -CFLAGS=$ac_save_CFLAGS -]) - -if test "$ac_cv_prog_cc_stack_protector" = yes && test "$ac_cv_prog_sys_stack_protector" = no; then - AC_DEFINE(NEED_STACK_PROTECTOR_IMPL) -fi -]) # AC_PROG_SYS_STACK_PROTECTOR -AC_PROG_SYS_STACK_PROTECTOR -#AC_SUBST(NEED_STACK_PROTECTOR_IMPL) - - -dnl Defalt linker flags. Honor any set in the environment, but -dnl also enable exceptions. -if test "$USE_VAC_CC" = "1"; then - LDFLAGS="$LDFLAGS -qeh" -else - LDFLAGS="$LDFLAGS -fexceptions" -fi - -dnl Allow us to have tests which require the math library. -LIBS="$LIBS -lm" - -dnl If we're on Solaris, we also need to set __EXTENSIONS__ to be -dnl able to see prototypes for APIs that are not in ANSI C. -dnl Also, set _POSIX_C_SOURCE=199506L so we see modern POSIX prototypes -dnl for various POSIX APIs rather then the pre-POSIX Solaris -dnl prototypes for the same APIs and set _LARGEFILE64_SOURCE and -dnl _FILE_OFFSET_BITS=64 so we use 64-bit data types and functions for -dnl file APIs. Finally, we require v9 instructions, so we build only -dnl for that CPU. -AC_MSG_CHECKING(whether __EXTENSIONS__ and _POSIX_C_SOURCE are required) -if test "$platform_name" = "SunOS"; then - CFLAGS="$CFLAGS -D__EXTENSIONS__ -D_POSIX_C_SOURCE=199506L" - CFLAGS="$CFLAGS -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64" - if test `uname -p` = "sparc"; then - CFLAGS="$CFLAGS -Wa,-Av9" - fi - dnl mkstemp is redefined as mkstemp64 in stdlib.h. - AC_DEFINE(MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP) - dnl open is redefined as open64 in fcntl.h - AC_DEFINE(OPEN64_IS_USED_INSTEAD_OF_OPEN) - AC_MSG_RESULT(yes) -elif test "$platform_name" = "HP-UX"; then - dnl _XOPEN_SOURCE_EXTENDED is needed to get modern prototypes for some - dnl functions -- in particular, the use of socklen_t instead of int - dnl in a lot of the socket functions - CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199506L -D_HPUX_ -D_XOPEN_SOURCE_EXTENDED" - if test "$_BIT64" = "1"; then - CFLAGS="$CFLAGS -mlp64 -DBIT64 -D_WIN64" - LDFLAGS="$LDFLAGS -mlp64 " - fi - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl If we're on MacOS, we need to generate unwind tables for non-call instructions -if test "$platform_name" = "Darwin"; then - CFLAGS="$CFLAGS -fnon-call-exceptions" -fi - -dnl Same On FreeBSD if using gcc 3.3.3 -if test "$platform_name" = "FreeBSD"; then - if test "$ROTOR_TOOLSET_VERSION" \> "3.0.0 "; then - CFLAGS="$CFLAGS -fnon-call-exceptions" - fi -fi - -dnl On 32-bit Solaris, we always use sjlj-exceptions -dnl but 64-bit Solaris GCC doesn't support -fsjlj-exceptions -if test "$platform_name" = "SunOS"; then - if test "$_BIT64" != "1"; then - CFLAGS="$CFLAGS -fsjlj-exceptions" - fi -fi - -dnl Add architecture-specific optimization flags -if test "$ARCH_DIR" = "i386"; then - OPTFLAGS="-momit-leaf-frame-pointer" -fi - -dnl Decide whether to enable debugging. -if test X"$CORECLR_BUILD" = "X1"; then - dnl We always emit debugging information when building CoreCLR (we'll strip production binaries). - dnl Specify -ggdb here explicitly to get dwarf debug info (the default is still the less useful - dnl stabs format). - CFLAGS="$CFLAGS -ggdb3" -else - if test "$NTDEBUG" != "ntsdnodbg"; then - CFLAGS="$CFLAGS -ggdb3" - fi -fi - -dnl If we are checked (c) or free (f), or retail (r), turn on optimizations. -dnl If we are building debug (d), turn optimizations off. -if test "$BUILD_ALT_DIR" = "d"; then - if test "$USE_VAC_CC" = "1"; then - CFLAGS="$CFLAGS -O0 -qnoipa -qdbxextra" - else - CFLAGS="$CFLAGS -O0 -finline" - fi - if test "$ac_cv_prog_cc_stack_protector" = yes; then - STACK_PROTECTOR_FLAGS=-fstack-protector-all - fi -fi -if test "$BUILD_ALT_DIR" = "c"; then - if test "$USE_VAC_CC" = "1"; then - CFLAGS="$CFLAGS -O2 -qnoipa -qunroll -qdbxextra -qmaxmem=-1 -qstrict" - else - CFLAGS="$CFLAGS -O2 $OPTFLAGS" - fi - if test "$ac_cv_prog_cc_stack_protector" = yes; then - STACK_PROTECTOR_FLAGS=-fstack-protector-all - fi -fi -if test "$BUILD_ALT_DIR" = "f"; then - if test "$USE_VAC_CC" = "1"; then - CFLAGS="$CFLAGS -O2 -qnoipa -Q -qunroll -qmaxmem=-1 -qstrict" - else - CFLAGS="$CFLAGS -O2 $OPTFLAGS" - fi - if test "$ac_cv_prog_cc_stack_protector" = yes; then - STACK_PROTECTOR_FLAGS=-fstack-protector - fi -fi -if test "$BUILD_ALT_DIR" = "r"; then - if test "$USE_VAC_CC" = "1"; then - CFLAGS="$CFLAGS -O2 -qnoipa -Q -qunroll -qmaxmem=-1 -qstrict" - else - CFLAGS="$CFLAGS -O2 $OPTFLAGS" - fi - if test "$ac_cv_prog_cc_stack_protector" = yes; then - STACK_PROTECTOR_FLAGS=-fstack-protector - fi -fi -if test "$BUILD_ALT_DIR" = "m"; then - CFLAGS="$CFLAGS -O2 $OPTFLAGS" - if test "$ac_cv_prog_cc_stack_protector" = yes; then - STACK_PROTECTOR_FLAGS=-fstack-protector - fi -fi -AC_SUBST(STACK_PROTECTOR_FLAGS) - -if test "${PAL_LIB_PERF}" = "_perf" ; then -CFLAGS="$CFLAGS -DPAL_PERF" -fi - -dnl We still have some changes to make to CFLAGS. Save the current -dnl set of flags till later. -CFLAGS_NO_PIC="$CFLAGS" -AC_SUBST(CFLAGS_NO_PIC) -if test "$USE_VAC_CC" = "1"; then - CFLAGS="$CFLAGS -DPIC -DPLATFORM_UNIX" -else - CFLAGS="$CFLAGS -fPIC -DPIC -DPLATFORM_UNIX" -fi - -if test X"$CORIOLIS_BUILD" = "X1"; then - CFLAGS="$CFLAGS -DCORIOLIS" -fi -if test X"$CORECLR_BUILD" = "X1"; then - CFLAGS="$CFLAGS -fstack-check -DCORECLR" -else - CFLAGS="$CFLAGS -DENABLE_DOWNLEVEL_FOR_NLS" -fi - -CFLAGS="$CFLAGS -DFEATURE_PAL_INLINABLE_TLS" -if test X"$FEATURE_DTRACE" = "X1"; then - CFLAGS="$CFLAGS -DFEATURE_DTRACE" -fi - -ac_saved_cflags=$CFLAGS - -dnl Checks for programs go here. -AC_PROG_CC -AC_PROG_CPP -AC_PROG_CXX -AC_PROG_INSTALL - -dnl command to do partial linking (join multiple .o files in a single .o file) -if test "$_BIT64" = "1" && test "$platform_name" = "SunOS"; then - LDPARTIAL="/usr/local64/bin/ld -r" -else - LDPARTIAL="ld -r" -fi -AC_SUBST(LDPARTIAL) - -dnl Define linker prefix command for purify -AC_SUBST(PURIFY_CMD) - -dnl gcc -M lets the preprocessor generate a list of dependencies. we want -dnl to use this for "make depend", but we need to do something else if -dnl $CC isn't gcc. So we need a test to detect availability of gcc -M -MDTOOL=mdtool_gcc -dnl MDTOOL=mdtool_dummy -AC_SUBST(MDTOOL) - -dnl Checks for libraries go here. - -dnl On FreeBSD, the option -pthread must be passed to gcc in order to link with -dnl libc_r (thread-safe version of libc, which also includes pthread functions). -dnl It's unclear how to check for the validity of -pthread because it isn't a -dnl library flag, so we'll just check for the presence of pthread_self in -dnl libc_r instead. -if test "$USE_VAC_CC" = "1"; then - PTHREAD_OPTIONS= -else - AC_CHECK_LIB(c_r, pthread_self, has_pthread_flag=yes, has_pthread_flag=no) - - if test $has_pthread_flag = yes; then - PTHREAD_OPTIONS="-pthread" - else - PTHREAD_OPTIONS= - fi -fi -AC_SUBST(PTHREAD_OPTIONS) - -dnl Autoconf doesn't have any way to validate flags to the linker. This is a -dnl bit of a hack, but it's probably better to do this than to switch on the -dnl result of uname. -dnl This doesn't work in Autoconf 2.5, which passes $LIBS to the compiler -dnl when it does AC_TRY_LINK_FUNC. -AC_MSG_CHECKING(for linker support for -soname) -saved_libs=$LIBS -LIBS="$LIBS -soname libfoo.so" -AC_TRY_LINK_FUNC(malloc, has_soname=yes, has_soname=no) -LIBS=$saved_libs -if test $has_soname = yes; then - AC_MSG_RESULT(yes) - CC_SONAME="-Wl,-soname,\$(MODULE_NAME)" -else - AC_MSG_RESULT(no) - CC_SONAME= -fi -dnl We'll substitute CC_SONAME below, after we have a chance to set it on -dnl Autoconf 2.5.2 platforms. - -dnl Figure out what our C runtime library is. At the same time, we can -dnl determine the flags that we need to pass to the compiler to get the -dnl linker to produce a shared library, and also set the extension for -dnl the library. Also, since this section notices if we're on Mac OS X, -dnl set a flag that tells us that we can use CoreFoundation, and another -dnl which determines whether we should use dlcompat. - -DLCOMPAT_DIR= -DLCOMPAT_OBJ= -DLCOMPAT_INC= -ASMFLAGS= -ASM_WITH_CPP_FLAGS="-x assembler-with-cpp" - -dnl gcc -M generates make-friendly dependencies; -dnl -MM ignores system includes (#include ) -MDTOOL_CFLAGS="-MM" - -dnl We need LIBS w/o the pthread libraries for pthread checks performed -dnl later on -no_pthread_libs="$LIBS" - -dnl On some platforms (e.g., AIX) libc_r contains an entry for sigreturn -dnl even though that function does not actually exist. On those platforms -dnl the following shoudl be set to "yes" -ac_bad_sigreturn_in_libc_r=no - -dnl consolidate platform-dependent (rather than feature-dependent) stuff -dnl here. -if test "$platform_name" = "AIX"; then - if test "$USE_VAC_CC" = "1"; then - ASM_WITH_CPP_FLAGS= - MDTOOL_CFLAGS="-M" - C_RUNTIME=c_r - SHARED_LIB="-L/usr/lib -L/usr/vacpp/lib -L/usr/vac/lib -G -bM:SRE -bnoentry" - else - C_RUNTIME=c - SHARED_LIB=-shared - fi - - SHARED_LIB_EXTENSION=.a - FRAMEWORKS= - dnl __STDC__=2 is necessary to prevent the AIX headers from defining - dnl a random sigsetjmp macro, which would cause endless redefinition - dnl warnings - dnl _LARGE_THREADS increases the maximum number of threads in - dnl pthread.h to 32767 - if test "$USE_VAC_CC" = "1"; then - CFLAGS="$ac_saved_cflags -qchars=signed -qenum=4 -D_LARGE_THREADS" - else - CFLAGS="$ac_saved_cflags -fsigned-char -Wno-format -D__STDC__=2 -D_LARGE_THREADS" - fi - - dnl AIX has libpthreads. - LIBS="$LIBS -lpthreads" - - if test "$USE_VAC_CC" = "1"; then - EXTRA_LIBS="-lC_r -lpthreads" - else - EXTRA_LIBS="-lpthreads" - fi - - ASMFLAGS="-Wa,-mppc" - ac_bad_sigreturn_in_libc_r=yes - AC_DEFINE(PAL_PTRACE(cmd, pid, addr, data), ptrace((cmd), (pid), (int*)(addr), (data), NULL)) - AC_DEFINE(PAL_PT_ATTACH, PT_ATTACH) - AC_DEFINE(PAL_PT_DETACH, PT_DETACH) - AC_DEFINE(PAL_PT_READ_D, PT_READ_D) - AC_DEFINE(PAL_PT_WRITE_D, PT_WRITE_D) - AC_DEFINE(RETURNS_NEW_HANDLES_ON_REPEAT_DLOPEN) - AC_DEFINE(WRITE_0_BYTES_HANGS_TTY) - dnl close(fd) blocks if there is any outstanding syscall on fd - AC_DEFINE(CLOSE_BLOCKS_ON_OUTSTANDING_SYSCALLS) - dnl a sendto with a To not matching the socket family returns EHOSTUNREACH - AC_DEFINE(SENDTO_RETURNS_UNREACH_ON_WRONG_AF) - AC_DEFINE(USER_H_DEFINES_DEBUG) - AC_DEFINE(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX) - AC_DEFINE(SIGWAIT_FAILS_WHEN_PASSED_FULL_SIGSET) - AC_MSG_RESULT(AIX) -elif test "$platform_name" = "HP-UX"; then - C_RUNTIME=c - FRAMEWORKS= - CFLAGS="$ac_saved_cflags -fno-strict-aliasing" - LIBS="$LIBS -lpthread -lrt" - EXTRA_LIBS="-lpthread -lrt" - SHARED_LIB_EXTENSION=.sl - dnl SO_RCVTIMEO and SO_SNDTIMEO are not supported by get/setsockopt - AC_DEFINE(SO_TIMEO_NOT_SUPPORTED) - if test `uname -m` = "ia64"; then - SHARED_LIB="-shared" - LDFLAGS="$LDFLAGS -L/usr/local/lib/hpux64/ -L/usr/lib/hpux64/ /usr/lib/hpux64/libunwind.so" - LIBS="$LIBS -lxnet" - EXTRA_LIBS="$EXTRA_LIBS -lxnet" - AC_MSG_RESULT(HPUX-Itanium) - else - SHARED_LIB="-Wl,-b -nostartfiles" - AC_MSG_RESULT(HPUX - PA-RISC) - fi - dnl PRIV_RTSCHED / PRIV_RTPRIO are required to call pthread_setschedparam on HPUX - AC_DEFINE(SET_SCHEDPARAM_NEEDS_PRIVS) -elif test "$platform_name" = "FreeBSD"; then - C_RUNTIME=c_r - SHARED_LIB=-shared - SHARED_LIB_EXTENSION=.so - FRAMEWORKS= - CFLAGS=$ac_saved_cflags - EXTRA_LIBS= - AC_DEFINE(PAL_PTRACE(cmd, pid, addr, data), ptrace((cmd), (pid), (caddr_t)(addr), (data))) - AC_DEFINE(PAL_PT_ATTACH, PT_ATTACH) - AC_DEFINE(PAL_PT_DETACH, PT_DETACH) - AC_DEFINE(PAL_PT_READ_D, PT_READ_D) - AC_DEFINE(PAL_PT_WRITE_D, PT_WRITE_D) - dnl For FreeBSD 4.x, we run all threads at the same priority - dnl except for TIME_CRITICAL and IDLE (see bug 235413). - dnl This should not be needed with the FreeBSD 5.x ULE scheduler - AC_DEFINE(PAL_IGNORE_NORMAL_THREAD_PRIORITY, 1) - dnl SO_RCVTIMEO and SO_SNDTIMEO are ignored by FreeBSD 4.9 and 5.2 - AC_DEFINE(SO_TIMEO_NOT_SUPPORTED) - dnl On BSD 5.2, we are capable of using signals for thread suspension. - dnl AC_DEFINE(USE_SIGNALS_FOR_THREAD_SUSPENSION) - AC_DEFINE(SELF_SUSPEND_FAILS_WITH_NATIVE_SUSPENSION) - dnl When using native suspension on BSD, we must protect against - dnl being suspended while blocked on a mutex. - AC_DEFINE(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX) - AC_DEFINE(SYS_PARAM_DEFINES_MAXHOSTNAMELEN) - AC_MSG_RESULT(FREEBSD) -elif test "$platform_name" = "Darwin"; then - dnl libSystem is Darwin's C runtime. - C_RUNTIME=System - SHARED_LIB="-dynamiclib -single_module" - SHARED_LIB_EXTENSION=.dylib - FRAMEWORKS="-framework CoreFoundation -framework Security -framework Kerberos -framework CoreServices" - AC_DEFINE(HAVE_COREFOUNDATION) - AC_CHECK_LIB(System, _NSGetEnviron, AC_DEFINE(HAVE__NSGETENVIRON)) - CFLAGS=$ac_saved_cflags - if test "$_BUILDARCH" = rotor_x86; then - CC="$CC -arch i386" - CXX="$CXX -arch i386" - elif test "$_BUILDARCH" = rotor_amd64; then - CC="$CC -arch x86_64" - CXX="$CXX -arch x86_64" - CFLAGS="$CFLAGS -DBIT64 -D_WIN64 -D_AMD64_" - elif test "$_BUILDARCH" = ppc; then - CC="$CC -arch ppc" - CXX="$CXX -arch ppc" - elif test "$_BUILDARCH" = ppc64; then - CC="$CC -arch ppc64" - CXX="$CXX -arch ppc64" - CFLAGS="$CFLAGS -DBIT64 -D_WIN64" - fi - CFLAGS="$CFLAGS -no-cpp-precomp $SDKINCLUDE" - CXXFLAGS="-fvisibility-inlines-hidden" - EXTRA_LIBS="-sub_library libSystem -lssl -lcrypto" - CC_SONAME="-install_name \$(MODULE_NAME)" - AC_DEFINE(PAL_PTRACE(cmd, pid, addr, data), ptrace((cmd), (pid), (caddr_t)(addr), (data))) - AC_DEFINE(PAL_PT_ATTACH, PT_ATTACH) - AC_DEFINE(PAL_PT_DETACH, PT_DETACH) - AC_DEFINE(PAL_PT_READ_D, PT_READ_D) - AC_DEFINE(PAL_PT_WRITE_D, PT_WRITE_D) - AC_DEFINE(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX) - AC_MSG_RESULT(MACOSX) -elif test "$platform_name" = "SunOS"; then - C_RUNTIME=c - SHARED_LIB=-shared - SHARED_LIB_EXTENSION=.so - FRAMEWORKS= - dnl 64-bit Solaris changes - if test "$_BIT64" = "1"; then - CFLAGS="$ac_saved_cflags -DBIT64 -D_WIN64" - CC=/usr/local64/bin/gcc - CXX=/usr/local64/bin/g++ - else - CFLAGS=$ac_saved_cflags - fi - LIBS="$LIBS -lrt -lsocket -lthread" - EXTRA_LIBS="-lrt -lsocket -lthread" - AC_DEFINE(PAL_PTRACE(cmd, pid, addr, data), ptrace((cmd), (pid), (int)(addr), (data))) - AC_DEFINE(PAL_PT_ATTACH, PTRACE_ATTACH) - AC_DEFINE(PAL_PT_DETACH, PTRACE_DETACH) - AC_DEFINE(PAL_PT_READ_D, PTRACE_PEEKDATA) - AC_DEFINE(PAL_PT_WRITE_D, PTRACE_POKEDATA) - dnl use of directio is currently disabled - AC_DEFINE(DIRECTIO_DISABLED) - dnl SO_RCVTIMEO and SO_SNDTIMEO are not supported by get/setsockopt - AC_DEFINE(SO_TIMEO_NOT_SUPPORTED) - AC_DEFINE(NETDB_DEFINES_MAXHOSTNAMELEN) - AC_MSG_RESULT(SOLARIS) -else - AC_MSG_ERROR(Unknown Platform!) -fi - -AC_SUBST(CC_SONAME) - -AC_SUBST(C_RUNTIME) -AC_SUBST(SHARED_LIB) -AC_SUBST(SHARED_LIB_EXTENSION) -AC_SUBST(FRAMEWORKS) -AC_SUBST(DLCOMPAT_DIR) - -AC_SUBST(DLCOMPAT_OBJ) - -AC_SUBST(DLCOMPAT_INC) - -AC_SUBST(CFLAGS) -AC_SUBST(EXTRA_LIBS) -AC_SUBST(ASMFLAGS) -AC_SUBST(ASM_WITH_CPP_FLAGS) -AC_SUBST(MDTOOL_CFLAGS) - -dnl Checks for header files go here. -AC_HEADER_STDC -AC_CHECK_HEADERS(wchar.h ieeefp.h alloca.h stdint.h inttypes.h) -AC_CHECK_HEADERS(stropts.h sys/vmparam.h sys/filio.h sys/sockio.h) -AC_CHECK_HEADERS(crt_externs.h sys/time.h pthread_np.h) -AC_CHECK_HEADERS(sys/lwp.h procfs.h sys/semaphore.h) -AC_CHECK_HEADERS(sys/param.h netdb.h mach/vm_types.h mach/vm_param.h) - -dnl Checking for availability of kqueue/kevent -dnl Note: we are not just checking for sys/event.h, since this header name -dnl is generic enough that it could be reused for other purposes on systems -dnl that don't have kqueue/kevent support -AC_MSG_CHECKING(for availability of kqueue/kevent) -define([kqueue_testcode], [ - #include - #include - #include - #include - - int main() - { - int ikq; - int iRet; - struct kevent ke, keChangeList; - struct timespec ts = { 0, 0 }; - - EV_SET(&keChangeList, stdin, EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, 0); - ikq = kqueue(); - iRet = kevent(ikq, &keChangeList, 1, &ke, 1, &ts); - - return 0; - } -]) -AC_LINK_IFELSE([kqueue_testcode], have_kqueue=yes, have_kqueue=no) -if test $have_kqueue = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_KQUEUE,1) -else - AC_MSG_RESULT(no) - AC_DEFINE(HAVE_KQUEUE,0) -fi - -dnl Checks for typedefs, structures, and compiler characteristics go here. -dnl Check if pthread_rwlock_t exists. -AC_MSG_CHECKING(for pthread_rwlock_t) -AC_EGREP_CPP(pthread_rwlock_t, [ - #define _GNU_SOURCE 1 - #include - int main(void) { exit(0); } -], ac_has_pthread_rwlock_t=yes, ac_has_pthread_rwlock_t=no) -if test $ac_has_pthread_rwlock_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PTHREAD_RWLOCK_T) -else - AC_MSG_RESULT(no) -fi - -dnl Check if in_addr_t exists. -AC_MSG_CHECKING(for in_addr_t) -AC_EGREP_CPP(in_addr_t, [ - #include - int main(void) { exit(0); } -], ac_has_in_addr_t=yes, ac_has_in_addr_t=no) -if test $ac_has_in_addr_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_IN_ADDR_T) -else - AC_MSG_RESULT(no) -fi - -dnl Check if socklen_t exists. -AC_MSG_CHECKING(for socklen_t) -AC_EGREP_CPP(socklen_t, [ - #include - int main(void) { exit(0); } -], ac_has_socklen_t=yes, ac_has_socklen_t=no) -if test $ac_has_socklen_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOCKLEN_T) -else - AC_MSG_RESULT(no) -fi - -dnl Check if struct sockaddr_ext exists -AC_MSG_CHECKING(for struct sockaddr_ext) -AC_TRY_COMPILE([#include ], - [struct sockaddr_ext sa;], - ac_has_sockaddr_ext=yes, ac_has_sockaddr_ext=no) -if test $ac_has_sockaddr_ext = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOCKADDR_EXT) -else - AC_MSG_RESULT(no) -fi - -dnl Check if siginfo_t exists. -AC_MSG_CHECKING(for siginfo_t) -AC_EGREP_CPP(siginfo_t, [ - #include - int main(void) { exit(0); } -], ac_has_siginfo_t=yes, ac_has_siginfo_t=no) -if test $ac_has_siginfo_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SIGINFO_T) -else - AC_MSG_RESULT(no) -fi - -dnl Check if ucontext_t exists -AC_MSG_CHECKING(for ucontext_t) -AC_EGREP_CPP(ucontext_t, [ - #include - int main(void) { exit(0); } -], ac_has_ucontext_t=yes, ac_has_ucontext_t=no) -if test $ac_has_ucontext_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_UCONTEXT_T) -else - AC_MSG_RESULT(no) -fi - -dnl Check if prwatch_t exists -AC_MSG_CHECKING(for prwatch_t) -AC_EGREP_CPP(prwatch_t, [ - #undef _LARGEFILE64_SOURCE - #undef _FILE_OFFSET_BITS - #include - int main(void) { exit(0); } -], ac_has_prwatch_t=yes, ac_has_prwatch_t=no) -if test $ac_has_prwatch_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PRWATCH_T) -else - AC_MSG_RESULT(no) -fi - - -dnl Check the size of off_t. If it's 32 bits or less, we'll -dnl avoid right-shifting off_t values by 32 in some places. -AC_CHECK_SIZEOF(off_t) - -dnl Check if the stat structure supports time in nsecs. -dnl This could be in one of two ways: either the structure has a field -dnl called 'st_atimespec', or a field called 'st_atimensec'. -AC_MSG_CHECKING(for timespec fields in struct stat) -AC_TRY_COMPILE([#include -#include ], [struct stat s; s.st_atimespec;], -ac_stat_struct_timespec=yes, ac_stat_struct_timespec=no) -if test $ac_stat_struct_timespec = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STAT_TIMESPEC) -else - AC_MSG_RESULT(no) - AC_MSG_CHECKING(for nsec fields in struct stat) - AC_TRY_COMPILE([#include - #include ], [struct stat s; s.st_atimensec;], - ac_stat_struct_nsec=yes, ac_stat_struct_nsec=no) - - if test $ac_stat_struct_nsec = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_STAT_NSEC) - else - AC_MSG_RESULT(no) - fi -fi - -dnl Check if struct sockaddr has an sa_len field. -AC_MSG_CHECKING(for sa_len field in struct sockaddr) -AC_TRY_COMPILE([#include - #include ], [struct sockaddr s; s.sa_len;], - ac_struct_sockaddr_sa_len=yes, ac_struct_sockaddr_sa_len=no) -if test $ac_struct_sockaddr_sa_len = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_SOCKADDR_SA_LEN) -else - AC_MSG_RESULT(no) -fi - -dnl Check whether getpwuid_r exists. -AC_MSG_CHECKING(whether getpwuid_r exists) -AC_TRY_LINK([#include - #include ], [getpwuid_r(0, 0, 0, 0, 0);], - ac_getpwuid_r_exists=yes, ac_getpwuid_r_exists=no) -if test $ac_getpwuid_r_exists = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GETPWUID_R) -else - AC_MSG_RESULT(no) -fi - -dnl Check whether getpwuid_r returns ERANGE or sets errno to ERANGE -AC_MSG_CHECKING(whether getpwuid_r sets errno) -define([getpwuid_r_testcode], [ - #include - #include - #include - #include - - int main(void) - { - struct passwd sPasswd; - struct passwd *pPasswd; - char buf[[1]]; - int bufLen = sizeof(buf)/sizeof(buf[[0]]); - int euid = geteuid(); - int ret = 0; - - errno = 0; // clear errno - ret = getpwuid_r(euid, &sPasswd, buf, bufLen, &pPasswd); - if (0 != ret) - { - if (ERANGE == errno) - { - return 0; - } - } - - return 1; // assume errno is NOT set for all other cases - } -]) - -if test $ac_getpwuid_r_exists = no; then - ac_getpwuid_r_sets_errno=no -else - AC_LINK_IFELSE([getpwuid_r_testcode],,[AC_MSG_ERROR([Failed to compile and link code for testing getpwuid_r])]) - AC_RUN_IFELSE([getpwuid_r_testcode], ac_getpwuid_r_sets_errno=yes, ac_getpwuid_r_sets_errno=no, ac_getpwuid_r_sets_errno=no) -fi - -if test $ac_getpwuid_r_sets_errno = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(GETPWUID_R_SETS_ERRNO) -else - AC_MSG_RESULT(no) -fi - -dnl Check whether a CRT file operation (such as fwrite) depends on the error value set -dnl by a previous file operation. -AC_MSG_CHECKING(whether C runtime file operations depend on the existing file error status) -define([file_ops_check_previous_ferror_code], [ - #include - - int main() - { - FILE *fp = NULL; - char *fileName = "/dev/zero"; - char buf[[10]]; - - /* - * Open the file in append mode and try to read some text. - * And, make sure ferror() is set. - */ - fp = fopen (fileName, "a"); - if ( (NULL == fp) || - (fread (buf, sizeof(buf), 1, fp) > 0) || - (!ferror(fp)) - ) - { - return 1; - } - - /* - * Now that ferror() is set, try to close the file. - * If we get an error, we can conclude that this - * fgets() depended on the previous ferror(). - */ - if ( fclose(fp) != 0 ) - { - return 1; - } - - return 0; - } -]) - -AC_LINK_IFELSE([file_ops_check_previous_ferror_code],,[AC_MSG_ERROR([Failed to compile and link code for testing file operations])]) -AC_RUN_IFELSE([file_ops_check_previous_ferror_code], ac_file_ops_check_previous_ferror=no, ac_file_ops_check_previous_ferror=yes, ac_file_ops_check_previous_ferror=yes) - -if test $ac_file_ops_check_previous_ferror = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL) -else - AC_MSG_RESULT(no) -fi - -dnl Check if realpath requires that the last path component exist. -AC_MSG_CHECKING(whether realpath requires that the last path component exist) -AC_TRY_RUN([ - #include - #include - - int main(void) { - char *path; -#ifdef PATH_MAX - char resolvedPath[PATH_MAX]; -#elif defined(MAXPATHLEN) - char resolvedPath[MAXPATHLEN]; -#else - char resolvedPath[1024]; -#endif - path = realpath("a_nonexistent_file", resolvedPath); - if (path == NULL) { - exit(1); - } - exit(0); - } - ], - ac_realpath_last_must_exist=no, ac_realpath_last_must_exist=yes, - ac_realpath_last_must_exist=no) -if test $ac_realpath_last_must_exist = yes; then - AC_MSG_RESULT(yes) -else - AC_DEFINE(REALPATH_SUPPORTS_NONEXISTENT_FILES) - AC_MSG_RESULT(no) -fi - -dnl Check to see if the BSD struct reg is supported. -AC_MSG_CHECKING(whether the BSD struct reg is supported) -AC_TRY_COMPILE([#include ], [struct reg regs;], -ac_regs_struct_t=yes, ac_regs_struct_t=no) -if test $ac_regs_struct_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_BSD_REGS_T) -else - AC_MSG_RESULT(no) -fi - -dnl Check for the existence of struct pt_regs (ptrace registers). -AC_MSG_CHECKING(for struct pt_regs) -AC_TRY_COMPILE([#include ], [struct pt_regs registers;], - has_pt_regs=yes, has_pt_regs=no) -if test $has_pt_regs = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_PT_REGS) -else - AC_MSG_RESULT(no) -fi - -dnl Check to see if mcontext_t has named registers. -if test $ac_has_ucontext_t = yes; then - AC_MSG_CHECKING(whether mcontext_t contains a gregset_t) - AC_TRY_COMPILE([#include ], - [ucontext_t context; context.uc_mcontext.gregs[0] = 0;], - has_gregset_t=yes, has_gregset_t=no) - if test $has_gregset_t = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GREGSET_T) - else - AC_MSG_RESULT(no) - fi -fi - -dnl Check whether or not it is safe to free NULL -dnl This test is just a screening for old non-C99 compilers. -dnl Even if free(NULL) is not safely supported, this test does -dnl not necessarily detect it, since the behavior in such a case -dnl would be undefined -AC_MSG_CHECKING(whether or not it is safe to free NULL) -AC_RUN_IFELSE([ -#include -#ifndef NULL -#define NULL ((void*)0) -#endif - -int main() -{ - int i; - char **pp; - - pp = (char **)malloc(10 * sizeof(char *)); - if (pp) - { - for (i=0;i<10;i++) - { - *(pp+i) = (char*)malloc(i*i+1); - free(NULL); - } - } - free(NULL); - if (pp) - { - for (i=0;i<10;i++) - { - free(*(pp+i)); - free(NULL); - } - } - free(pp); - exit(0); -}; -], free_null_supported=yes, free_null_supported=no, free_null_supported=dontknow) -if test $free_null_supported = yes; then - AC_MSG_RESULT(yes) -else - if test $free_null_supported = no; then - AC_MSG_RESULT(no) - AC_MSG_ERROR(This platform does not seem to safely support calling free on a NULL pointer: can't continue) - else - AC_MSG_RESULT(WARNING: cross-compiling not supported) - fi -fi - -dnl This check is done because FreeBSD's sscanf doesn't seem to support -dnl the "%ll" (long long) prefix but has "%q" instead. -AC_MSG_CHECKING(supported behavior of sscanf(%ll)) -AC_TRY_RUN([ - #include - int main(void) - { - long long n = 0; - sscanf("5000000000", "%qu", &n); - exit (n == 5000000000); - } - ], - ac_sscanf_support_ll=yes, ac_sscanf_support_ll=no, - ac_sscanf_support_ll=no) -if test $ac_sscanf_support_ll = yes; then - AC_DEFINE(SSCANF_SUPPORT_ll) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl Checking whether sscanf is able to parse a float from "12.34e" -AC_MSG_CHECKING(whether sscanf is able to parse a float from "12.34e") -define([sscanf_float_e_limitation_testcode], [ -#include - -int main() -{ - int ret; - float f = 0; - char * strin = "12.34e"; - - ret = sscanf (strin, "%e", &f); - if (ret <= 0) - exit (1); - exit(0); -}; -]) -AC_LINK_IFELSE([sscanf_float_e_limitation_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([sscanf_float_e_limitation_testcode], has_sscanf_float_e_limitation=no, has_sscanf_float_e_limitation=yes, has_sscanf_float_e_limitation=dontknow) -if test $has_sscanf_float_e_limitation = yes; then - AC_MSG_RESULT(no) - AC_DEFINE(SSCANF_CANNOT_HANDLE_MISSING_EXPONENT,1) -else - if test $has_sscanf_float_e_limitation = no; then - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(WARNING: cross-compiling not supported) - fi -fi - -dnl snprintf has trouble when printing "%#x" with large values -dnl of 'n' on some systems. -AC_MSG_CHECKING(whether snprintf supports large values of n) -AC_TRY_RUN([ - #include - - int main(void) { - char buf[256] = { 0 }; - snprintf(buf, 0x7fffffff, "%#x", 0x12345678); - if (buf[0] == '\0') { - exit(1); - } - exit(0); - } -], has_large_snprintf=yes, has_large_snprintf=no, has_large_snprintf=yes) -if test $has_large_snprintf = yes; then - AC_DEFINE(HAVE_LARGE_SNPRINTF_SUPPORT) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl Checking whether select() on an open fifo that hasn't been -dnl written to returns that it has data available. -AC_MSG_CHECKING(for broken select() behavior with fifos) -define([broken_select_testcode], [ - #include - #include - #include - #include - #include - #include - #include - #include - - int main(void) { - int fd, numFDs; - fd_set readFDs, writeFDs, exceptFDs; - struct timeval time = { 0 }; - char * filename = NULL; - - filename = (char *)malloc(L_tmpnam * sizeof(char)); /* ok to leak this at exit */ - if (NULL == filename) { - exit(1); - } - - /* On some platforms (e.g. HP-UX) the multithreading c-runtime does not - support the tmpnam(NULL) semantics, and it returns NULL. Therefore - we need to use the tmpnam(pbuffer) version. - */ - if (NULL == tmpnam(filename)) { - exit(1); - } - if (mkfifo(filename, S_IRWXU) != 0) { - if (unlink(filename) != 0) { - exit(1); - } - if (mkfifo(filename, S_IRWXU) != 0) { - exit(1); - } - } - fd = open(filename, O_RDWR | O_NONBLOCK); - if (fd == -1) { - exit(1); - } - - FD_ZERO(&readFDs); - FD_ZERO(&writeFDs); - FD_ZERO(&exceptFDs); - FD_SET(fd, &readFDs); - numFDs = select(fd + 1, &readFDs, &writeFDs, &exceptFDs, &time); - - close(fd); - unlink(filename); - - /* numFDs is zero if select() works correctly */ - exit(numFDs); - } -]) -AC_LINK_IFELSE([broken_select_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([broken_select_testcode], has_broken_fifo_select=no, has_broken_fifo_select=yes, has_broken_fifo_select=dontknow) -case $has_broken_fifo_select in - yes) AC_DEFINE(HAVE_BROKEN_FIFO_SELECT) - AC_MSG_RESULT(yes) - ;; - no) AC_MSG_RESULT(no) - ;; - *) AC_MSG_RESULT(WARNING: cross-compiling not supported) - ;; -esac - -dnl Checking whether kevent() on a fifo returns EV_ERROR. -AC_MSG_CHECKING(for broken kevent() behavior with fifos) -define([broken_kevent_testcode], [ - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - - int main(void) - { - int ikq; - int iRet; - int fd; - struct kevent ke, keChangeList; - struct timespec ts = { 0, 0 }; - - char * filename = NULL; - - filename = (char *)malloc(L_tmpnam * sizeof(char)); /* ok to leak this at exit */ - if (NULL == filename) - { - exit(1); - } - - /* On some platforms (e.g. HP-UX) the multithreading c-runtime does not - support the tmpnam(NULL) semantics, and it returns NULL. Therefore - we need to use the tmpnam(pbuffer) version. - */ - if (NULL == tmpnam(filename)) { - exit(1); - } - if (mkfifo(filename, S_IRWXU) != 0) { - if (unlink(filename) != 0) { - exit(1); - } - if (mkfifo(filename, S_IRWXU) != 0) { - exit(1); - } - } - fd = open(filename, O_RDWR | O_NONBLOCK); - if (fd == -1) { - exit(1); - } - - EV_SET(&keChangeList, fd, EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, NULL); - ikq = kqueue(); - iRet = kevent(ikq, &keChangeList, 1, &ke, 1, &ts); - - close(fd); - unlink(filename); - - /* iRet is zero is kevent() works correctly */ - exit(iRet); - } -]) -AC_LINK_IFELSE([broken_kevent_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([broken_kevent_testcode], has_broken_fifo_kevent=no, has_broken_fifo_kevent=yes, has_broken_fifo_kevent=dontknow) -case $has_broken_fifo_kevent in - yes) AC_DEFINE(HAVE_BROKEN_FIFO_KEVENT) - AC_MSG_RESULT(yes) - ;; - no) AC_MSG_RESULT(no) - ;; - *) AC_MSG_RESULT(WARNING: cross-compiling not supported) - ;; -esac - -if test $ac_cv_sizeof_off_t -gt 4; then - dnl Check whether ftruncate'ing a zero-byte file to a very large length - dnl fails as expected. Mac OS X's ftruncate returns success in that - dnl case, even though it actually fails. - AC_MSG_CHECKING(whether ftruncate correctly fails for very large lengths) - AC_TRY_RUN([ - #include - #include - #include - #include - - /* INT64_MAX */ - #define OFFSET 9223372036854775807 - - int main(void) { - int fd; - off_t result; - char filename[1024]; - - strcpy(filename, "ftruncate_test"); - fd = mkstemp(filename); - if (fd == -1) { - exit(1); - } - - result = ftruncate(fd, OFFSET); - unlink(filename); - close(fd); - - if (result != -1) { - exit(1); - } - exit(0); - } - ], has_ftruncate_large_length_support=yes, - has_ftruncate_large_length_support=no, - has_ftruncate_large_length_support=no) - if test $has_ftruncate_large_length_support = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT) - else - AC_MSG_RESULT(no) - fi -fi - -dnl A different Mac OS X issue causes ftruncate to return failure for a request -dnl that exceeds the amount of disk space available while in fact the file has -dnl been extended to fill the remaining space. -dnl Note that it's important to call unlink() before close() in the test below -dnl to avoid actually creating a huge file if the issue exists. -AC_MSG_CHECKING(whether ftruncate incorrectly deals with requests larger than available space) -AC_TRY_RUN([ - #include - #include - #include - #include - #include - - int main(void) - { - int fd; - struct stat sStat; - int has_bug = 0; - - fd = open("ftruncate_test2", O_CREAT | O_EXCL | O_RDWR, 0777); - if (fd != -1) - { - if (ftruncate(fd, 0x7fffffffffffffffULL) == -1) - { - if (fstat(fd, &sStat) != -1) - has_bug = sStat.st_size != 0; - } - - unlink("ftruncate_test2"); - close(fd); - } - - exit(has_bug ? 0 : 1); - } - ], has_ftruncate_length_bug=yes, - has_ftruncate_length_bug=no, - has_ftruncate_length_bug=no) -if test $has_ftruncate_length_bug = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAS_FTRUNCATE_LENGTH_BUG) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(for yield system call) -AC_TRY_COMPILE([#include ], [int foo = SYS_yield;], - ac_has_sys_yield=yes, ac_has_sys_yield=no) -if test $ac_has_sys_yield = yes; then - AC_DEFINE(HAVE_YIELD_SYSCALL) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl Checks for library functions go here. -AC_CHECK_FUNCS(gmtime_r timegm _snwprintf _snprintf) -AC_CHECK_FUNCS(futimes sysctl sysconf directio vm_allocate) -AC_CHECK_FUNCS(setcontext getcontext copysign) -AC_CHECK_FUNCS(gethrtime read_real_time) -AC_CHECK_FUNCS(fsync) - -AC_MSG_CHECKING(for gettimeofday) -dnl -dnl Not using AC CHECK FUNC for gettimeofday because of unreliability of the -dnl configure check for this function on some platform (hp-ux), and because -dnl some platform may implement a non functional gettimeofday that always -dnl returns error -dnl -define([gettimeofday_testcode], [ - #include - #include - #include - - int main() - { - int ret; - struct timeval tv; - ret = gettimeofday(&tv, NULL); - - exit(ret); - } -]) -AC_RUN_IFELSE([gettimeofday_testcode], has_working_gettimeofday=yes, has_working_gettimeofday=no, has_working_gettimeofday=dontknow) -if test $has_working_gettimeofday = yes; then - AC_DEFINE(HAVE_WORKING_GETTIMEOFDAY, 1) - AC_MSG_RESULT(yes) -elif test $has_working_gettimeofday = no; then - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(WARNING: cross-compiling not supported) -fi - -AC_MSG_CHECKING(for clock_gettime) -dnl -dnl Not using AC CHECK FUNC for clock_gettime because of unreliability of the -dnl configure check for this function on some platform (hp-ux), and because -dnl some platform may implement a non functional clock_gettime that always -dnl returns error -dnl -define([clock_gettime_testcode], [ - #include - #include - #include - - int main() - { - int ret; - struct timespec ts; - ret = clock_gettime(CLOCK_REALTIME, &ts); - - exit(ret); - } -]) -AC_RUN_IFELSE([clock_gettime_testcode], has_working_clock_gettime=yes, has_working_clock_gettime=no, has_working_clock_gettime=dontknow) -if test $has_working_clock_gettime = yes; then - AC_DEFINE(HAVE_WORKING_CLOCK_GETTIME, 1) - AC_MSG_RESULT(yes) -elif test $has_working_clock_gettime = no; then - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(WARNING: cross-compiling not supported) -fi - -AC_MSG_CHECKING(for CLOCK_MONOTONIC) -if test $has_working_clock_gettime = yes; then - define([clock_monotonic_testcode], [ - #include - #include - #include - - int main() - { - int ret; - struct timespec ts; - ret = clock_gettime(CLOCK_MONOTONIC, &ts); - - exit(ret); - } - ]) - AC_RUN_IFELSE([clock_monotonic_testcode], has_clock_monotonic=yes, has_clock_monotonic=no, has_clock_monotonic=dontknow) - if test $has_clock_monotonic = yes; then - AC_DEFINE(HAVE_CLOCK_MONOTONIC, 1) - AC_MSG_RESULT(yes) - elif test $has_clock_monotonic = no; then - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(WARNING: cross-compiling not supported) - fi -else - AC_MSG_RESULT(no) -fi - -dnl Since autoconf 2.57 has problem checking utimes function on HPUX -dnl using AC_CHECK_FUNC, we use AC_TRY_LINK to check utimes function -dnl if AC_CHECK_FUNC cannot find it. -AC_CHECK_FUNC(utimes, ac_has_utimes=yes, ac_has_utimes=no) -if test $ac_has_utimes = yes; then - AC_DEFINE(HAVE_UTIMES) -else - AC_MSG_CHECKING(utimes using ac_try_link) - AC_TRY_LINK([#include ], [utimes("foo", 0);], - ac_has_utimes=yes, ac_has_utimes=no) - if test $ac_has_utimes = yes; then - AC_DEFINE(HAVE_UTIMES) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi -fi - -AC_MSG_CHECKING(for POLLRDNORM) -AC_TRY_COMPILE([#include ], [int foo = (int) POLLRDNORM;], - ac_has_pollrdnorm=yes, ac_has_pollrdnorm=no) -if test $ac_has_pollrdnorm = yes; then - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_CHECK_FUNC(poll, ac_has_poll=yes, ac_has_poll=no) -if test $ac_has_poll = yes -a $ac_has_pollrdnorm = yes; then - POLL_DIR= - POLL_OBJ= - AC_DEFINE(HAVE_POLL) - dnl Check for INFTIM. - AC_MSG_CHECKING(for INFTIM) - if test "$platform_name" = "SunOS"; then - AC_TRY_COMPILE([#include ], [int foo = (int) INFTIM;], - ac_has_inftim=yes, ac_has_inftim=no) - else - AC_TRY_COMPILE([#include ], [int foo = (int) INFTIM;], - ac_has_inftim=yes, ac_has_inftim=no) - fi - if test $ac_has_inftim = yes; then - AC_DEFINE(HAVE_INFTIM) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi -else - POLL_DIR=poll - POLL_OBJ="pollobjs.o" -fi -AC_SUBST(POLL_DIR) -AC_SUBST(POLL_OBJ) - -AC_MSG_CHECKING(for CHAR_BIT) -AC_TRY_COMPILE([#include ], [int i = CHAR_BIT;], - ac_has_char_bits=yes, ac_has_char_bits=no) -if test $ac_has_char_bits = yes; then - AC_DEFINE(HAVE_CHAR_BIT) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_CHECK_FUNC(strtok_r, AC_DEFINE(HAVE_STRTOK_R)) -if test $ac_cv_func_strtok_r != yes; then - AC_MSG_ERROR(strtok_r is required) -fi - -AC_CHECK_FUNC(localtime_r, AC_DEFINE(HAVE_LOCALTIME_R)) -if test $ac_cv_func_localtime_r != yes; then - AC_MSG_CHECKING(localtime_r using ac_try_link) - AC_TRY_LINK([#include ], [struct tm timer; localtime_r(0, &timer);], - ac_cv_func_localtime_r=yes, ac_cv_func_localtime_r=no) - if test $ac_cv_func_localtime_r = yes; then - AC_DEFINE(HAVE_LOCALTIME_R) - AC_MSG_RESULT(yes) - else - AC_MSG_ERROR(localtime_r is required) - fi -fi - -AC_CHECK_FUNC(ctime_r, AC_DEFINE(HAVE_CTIME_R)) -if test $ac_cv_func_ctime_r != yes; then - AC_MSG_CHECKING(ctime_r using ac_try_link) - AC_TRY_LINK([#include ], [struct tm timer; ctime_r(0, &timer);], - ac_cv_func_ctime_r=yes, ac_cv_func_ctime_r=no) - if test $ac_cv_func_ctime_r = yes; then - AC_DEFINE(HAVE_CTIME_R) - AC_MSG_RESULT(yes) - else - AC_MSG_ERROR(ctime_r is required) - fi -fi - -dnl Solaris uses statvfs instead of statfs. It still has statfs -dnl but it's deprecated, so we prefer statvfs if it's available. -dnl We also check if the statvfs64() prototype takes a statvfs64 -dnl struct since it does not on Solaris. -AC_CHECK_FUNC(statvfs, AC_DEFINE(HAVE_STATVFS)) -if test $ac_cv_func_statvfs != yes; then - AC_CHECK_FUNC(statfs, AC_DEFINE(HAVE_STATFS)) - if test $ac_cv_func_statfs != yes; then - AC_MSG_ERROR(Either statfs or statvfs is required) - fi -else - AC_MSG_CHECKING(whether statvfs64 prototype is broken) - saved_cflags="$CFLAGS" - CFLAGS="-Werror -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 $CFLAGS" - define([statvfs64_testcode], [ - #include - #include - - int main(void) { - char NameBuffer[[64]]; - struct statvfs infoBuffer; - statvfs(NameBuffer, &infoBuffer); - return 0; - } - ]) - AC_COMPILE_IFELSE([statvfs64_testcode],,) - warn_str=`/usr/bin/tail -20 config.log | grep "statvfs64' from incompatible pointer"` - if test "$warn_str" = ""; then - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(yes) - AC_DEFINE(STATVFS64_PROTOTYPE_BROKEN) - fi - CFLAGS="$saved_cflags" -fi - -dnl Check for thread self calls -AC_CHECK_FUNCS(thread_self _lwp_self) - -dnl We need to figure out how to suspend and resume threads. -dnl First, check if we have Mach threads -AC_CHECK_FUNC(pthread_mach_thread_np, ac_has_mach_threads=yes, - ac_has_mach_threads=no) -if test $ac_has_mach_threads = yes; then - AC_DEFINE(HAVE_MACH_THREADS) -else - dnl Perhaps we have Solaris threads. Try thr_suspend and thr_continue. - AC_CHECK_FUNC(thr_suspend, ac_has_thr_suspend=yes, ac_has_thr_suspend=no) - AC_CHECK_FUNC(thr_continue, ac_has_thr_continue=yes, ac_has_thr_continue=no) - if test $ac_has_thr_suspend = yes -a $ac_has_thr_continue = yes; then - AC_DEFINE(HAVE_SOLARIS_THREADS) - else - dnl freebsd has pthread_resume_np and pthread_suspend_np in libc_r - dnl make sure that the pthread library is not in LIBS - saved_libs="$LIBS" - LIBS="$no_pthread_libs" - AC_CHECK_LIB(c_r, pthread_resume_np, ac_pthread_resume_np=yes, ac_pthread_resume_np=no) - if test $ac_pthread_resume_np = yes; then - AC_DEFINE(HAVE_PTHREAD_RESUME_NP) - fi - AC_CHECK_LIB(c_r, pthread_suspend_np, ac_pthread_suspend_np=yes, ac_pthread_suspend_np=no) - if test $ac_pthread_suspend_np = yes; then - AC_DEFINE(HAVE_PTHREAD_SUSPEND_NP) - fi - LIBS="$saved_libs" - dnl check the following pthread functions for AIX and HPUX - AC_CHECK_FUNCS(pthread_suspend_np pthread_resume pthread_continue_np) - if test "$platform_name" = "AIX"; then - dnl On AIX pthread_continue and pthread_suspend are not functional, so don't test for them - AC_CHECK_FUNCS(pthread_resume_np) - elif test "$platform_name" = "HP-UX"; then - dnl pthread_resume_np on HPUX has an extra flag parameter, so don't test for it - AC_CHECK_FUNCS(pthread_suspend pthread_continue) - else - AC_CHECK_FUNCS(pthread_suspend pthread_continue pthread_resume_np) - fi - fi -fi - -dnl Check to see if the system can return the thread priority boundaries -dnl For these tests we need to pass PTHREAD_OPTIONS to the compiler -dnl To do that we'll save CFLAG and restore afterwards -saved_cflags="$CFLAGS" -CFLAGS="$CFLAGS $PTHREAD_OPTIONS" -AC_MSG_CHECKING([for sched_get_priority_[min|max] functionality]) -AC_TRY_RUN([ -#include -#include - -int main(void) -{ - int policy; - struct sched_param schedParam; - int max_priority; - int min_priority; - - if (0 != pthread_getschedparam(pthread_self(), &policy, &schedParam)) - { - exit(1); - } - - max_priority = sched_get_priority_max(policy); - min_priority = sched_get_priority_min(policy); - - exit(-1 == max_priority || -1 == min_priority); -} - ], ac_has_sched_get_priorty=yes, ac_has_sched_get_priorty=no, - ac_has_sched_get_priorty=no) -if test $ac_has_sched_get_priorty = yes; then - AC_DEFINE(HAVE_SCHED_GET_PRIORITY) - AC_MSG_RESULT(yes) -else - if test "$platform_name" = "AIX"; then - AC_DEFINE(PAL_THREAD_PRIORITY_MAX, 127) - AC_DEFINE(PAL_THREAD_PRIORITY_MIN, 1) - AC_MSG_RESULT(no; using AIX values of 1-127) - else - AC_MSG_RESULT(no; don't know proper values for this platform) - fi -fi -CFLAGS="$saved_cflags" - -dnl Check for pthread_mutex_init. If it exists, we presume we also -dnl have pthread condition variables. These allow us to implement an -dnl alternative to posix or SYSV semaphores on platforms where we're -dnl not going to use signals (i.e. those with Mach exceptions). -AC_CHECK_FUNC(pthread_mutex_init, ac_has_pthread_mutexes=yes, - ac_has_pthread_mutexes=no) -if test $ac_has_pthread_mutexes = yes; then - AC_DEFINE(HAS_PTHREAD_MUTEXES) -fi - -dnl Check for semget. If it exists we can use SYSV semaphores. -AC_CHECK_FUNC(semget, ac_has_semget=yes, ac_has_semget=no) -if test $ac_has_semget = yes; then - AC_DEFINE(HAS_SYSV_SEMAPHORES) -fi - -dnl Check for thread_set_exception_ports. If it exists, we have Mach -dnl exceptions, and we'll use those in place of our signal handlers. -AC_CHECK_FUNC(thread_set_exception_ports, ac_has_mach_exceptions=yes, - ac_has_mach_exceptions=no) -if test $ac_has_mach_exceptions = yes; then - AC_DEFINE(HAVE_MACH_EXCEPTIONS) -fi - -dnl Check for vm_read_overwrite. If it exists, we have Mach VM -dnl read/write functions, and we'll use those in place of ptrace. -AC_CHECK_FUNC(vm_read_overwrite, ac_has_vm_read_overwrite=yes, - ac_has_vm_read_overwrite=no) -if test $ac_has_vm_read_overwrite = yes; then - AC_DEFINE(HAVE_VM_READ) -fi - -if test $ac_bad_sigreturn_in_libc_r = no; then - dnl Check for sigreturn in libc_r. If it's there, we can call it. If not, - dnl check for _thread_sys_sigreturn. FreeBSD 4.4 doesn't alias - dnl _thread_sys_sigreturn to sigreturn in libc_r. - AC_CHECK_LIB(c_r, sigreturn, ac_has_sigreturn=yes, ac_has_sigreturn=no, $PTHREAD_OPTIONS) - if test $ac_has_sigreturn = yes; then - AC_DEFINE(HAVE_SIGRETURN) - else - dnl Check for _thread_sys_sigreturn now. - AC_CHECK_LIB(c_r, _thread_sys_sigreturn, ac_has_thread_sys_sigreturn=yes, - ac_has_thread_sys_sigreturn=no, -pthread) - if test $ac_has_thread_sys_sigreturn = yes; then - AC_DEFINE(HAVE__THREAD_SYS_SIGRETURN) - fi - fi -fi - -dnl Determine whether tzname is supported. tzname is not the -dnl preferred means of reading time zone names on Unix, but -dnl its (at times incorrect) distinction between standard and -dnl daylight saving times is required for the PAL. -AC_MSG_CHECKING(for tzname global variable) -AC_TRY_LINK([#include ], [char *c = tzname[0];], -ac_tzname_var=yes, ac_tzname_var=no) -if test $ac_tzname_var = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TZNAME) -else - AC_MSG_RESULT(no) -fi - -dnl Figure out where to get the offset of this timezone. -dnl Many SysV systems have an extern timezone, while BSD -dnl systems typically have a tm_gmtoff field in struct tm. -dnl We prefer the BSD version, but we can use the SysV one -dnl if necessary. -dnl The SysV solution is insufficient for cases in which a -dnl timezone's GMT offset is dependent on the current date, -dnl as is the case for countries whose time zone has varied -dnl over the years. -AC_MSG_CHECKING(for tm_gmtoff field in struct tm) -AC_TRY_COMPILE([#include ], [struct tm t; t.tm_gmtoff;], -ac_tm_struct_gmtoff=yes, ac_tm_struct_gmtoff=no) -if test $ac_tm_struct_gmtoff = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TM_GMTOFF) -else - AC_MSG_RESULT(no) - AC_MSG_CHECKING(for timezone global variable) - AC_TRY_LINK([#include ], [extern long int timezone;], - ac_timezone_var=yes, ac_timezone_var=no) - if test $ac_timezone_var = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_TIMEZONE_VAR) - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(Either tm_gmtoff in struct tm or extern timezone is required) - fi -fi - -dnl Checking whether mmap() can shared-map from /dev/zero -AC_MSG_CHECKING(for mmap(MAP_SHARED) of /dev/zero) -AC_TRY_RUN([ - #include - #include - #include - #include - - int main(void) { - int devzero; - void *retval; - - devzero = open("/dev/zero", O_RDWR); - if (-1 == devzero) { - exit(1); - } - retval = mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED, devzero, 0); - if (retval == (void *)-1) { - exit(1); - } - exit(0); - } -], has_mmap_dev_zero=yes, has_mmap_dev_zero=no, - has_mmap_dev_zero=no) -if test $has_mmap_dev_zero = yes; then - AC_DEFINE(HAVE_MMAP_DEV_ZERO) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl Checking whether mmap uses its hint parameter -AC_MSG_CHECKING(whether mmap uses its hint parameter) -AC_TRY_RUN([ - #include - #include - #include - #include - #include - - #ifndef MAP_ANON - #define MAP_ANON MAP_ANONYMOUS - #endif - - int main(void) { - void *hint, *ptr; - int pagesize; - int fd; - - pagesize = getpagesize(); - fd = open("/etc/passwd", O_RDONLY); - if (fd == -1) { - exit(1); - } - ptr = mmap(NULL, pagesize, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0); - if (ptr == MAP_FAILED) { - exit(1); - } - hint = mmap(NULL, pagesize, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0); - if (hint == MAP_FAILED) { - exit(1); - } - if (munmap(ptr, pagesize) != 0) { - exit(1); - } - if (munmap(hint, pagesize) != 0) { - exit(1); - } - ptr = mmap(hint, pagesize, PROT_NONE, MAP_PRIVATE, fd, 0); - if (ptr == MAP_FAILED || ptr != hint) { - exit(1); - } - exit(0); - } -], mmap_ignores_hint=no, mmap_ignores_hint=yes, mmap_ignores_hint=yes) -if test $mmap_ignores_hint = yes; then - AC_DEFINE(MMAP_IGNORES_HINT) - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(yes) - dnl Check whether mmap ignores its protection parameter when mapping - dnl anonymous pages. - AC_MSG_CHECKING(whether mmap ignores PROT_NONE when mapping anonymously) - AC_TRY_RUN([ - #include - #include - #include - #include - #include - - #ifndef MAP_ANON - #define MAP_ANON MAP_ANONYMOUS - #endif - - int handle_signal(int signal) { - /* If we reach this, we've crashed due to mmap honoring - PROT_NONE. */ - _exit(1); - } - - int main(void) { - int *ptr; - struct sigaction action; - - ptr = (int *) mmap(NULL, getpagesize(), PROT_NONE, - MAP_ANON | MAP_PRIVATE, -1, 0); - if (ptr == (int *) MAP_FAILED) { - exit(0); - } - action.sa_handler = &handle_signal; - action.sa_flags = 0; - sigemptyset(&action.sa_mask); - if (sigaction(SIGBUS, &action, NULL) != 0) { - exit(0); - } - if (sigaction(SIGSEGV, &action, NULL) != 0) { - exit(0); - } - /* This will drop us into the signal handler if PROT_NONE - is honored. */ - *ptr = 123; - exit(0); - } - ], has_mmap_protections=no, has_mmap_protections=yes, - has_mmap_protections=no) - if test $has_mmap_protections = yes; then - AC_MSG_RESULT(no) - else - AC_DEFINE(MMAP_ANON_IGNORES_PROTECTION) - AC_MSG_RESULT(yes) - fi -fi - -dnl Checking whether it is legal to call mmap(MAP_FIXED) on an already mapped region -AC_MSG_CHECKING(whether it is legal to call mmap(MAP_FIXED) on an already mapped region) -define([mmap_remap_testcode], [ - #include - #include - #include - #include - - #ifndef MAP_ANON - #define MAP_ANON MAP_ANONYMOUS - #endif - - int main() - { - int iRet = 0; - void * pAddr = MAP_FAILED; - int MemSize = 1024; - - MemSize = getpagesize(); - pAddr = mmap(0x0, MemSize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); - if (pAddr == MAP_FAILED) - exit(1); - - pAddr = mmap(pAddr, MemSize, PROT_WRITE | PROT_READ, MAP_FIXED | MAP_PRIVATE | MAP_ANON, -1, 0); - if (pAddr == MAP_FAILED) - iRet = 1; - - munmap(pAddr, MemSize); // don't care of this - exit (iRet); - } -]) -AC_LINK_IFELSE([mmap_remap_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([mmap_remap_testcode], mmap_allows_remap=yes, mmap_allows_remap=no, mmap_allows_remap=dontknow) -if test $mmap_allows_remap = yes; then - AC_MSG_RESULT(yes) -else - if test $mmap_allows_remap = no; then - AC_DEFINE(MMAP_DOESNOT_ALLOW_REMAP,1) - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(WARNING: cross-compiling not supported) - fi -fi - -dnl Checking whether a file region may be shared-mapped twice in the same process -AC_MSG_CHECKING(whether a file region may be shared-mapped twice in the same process) -define([mmap_multiple_shared_mappings_testcode], [ -#include -#include -#include -#include -#include -#include - -#define MEM_SIZE 1024 - -int main(void) -{ - char * fname; - int fd; - int ret; - void * pAddr0, * pAddr1; - - fname = (char *)malloc(MEM_SIZE); - if (!fname) - exit(1); - strcpy(fname, "multiplemaptestXXXXXX"); - - fd = mkstemp(fname); - if (fd < 0) - exit(1); - - ret = write (fd, (void *)fname, MEM_SIZE); - if (ret < 0) - exit(1); - - pAddr0 = mmap(0, MEM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); - pAddr1 = mmap(0, MEM_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); - - /* In theory we should look for (pAddr1 == MAP_FAILED) && (pAddr1 != MAP_FAILED) - but in case the first test also failed, i.e. we failed to run the test, - let's assume that the system might not allow multiple shared mapping of the - same file region in the same process. The code enabled in this case is - only a fall-back code path. In case the double mmap actually works, virtually - nothing will change and the normal code path will be executed */ - if (pAddr1 == MAP_FAILED) - ret = 1; - else - ret = 0; - - if (pAddr0) - munmap (pAddr0, MEM_SIZE); - if (pAddr1) - munmap (pAddr1, MEM_SIZE); - close(fd); - unlink(fname); - free(fname); - - exit(ret); -} -]) -AC_LINK_IFELSE([mmap_multiple_shared_mappings_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([mmap_multiple_shared_mappings_testcode], mmap_allows_multiple_shared_mappings=yes, mmap_allows_multiple_shared_mappings=no, mmap_allows_multiple_shared_mappings=dontknow) -if test $mmap_allows_multiple_shared_mappings = yes; then - AC_MSG_RESULT(yes) -else - if test $mmap_allows_multiple_shared_mappings = no; then - AC_DEFINE(ONE_SHARED_MAPPING_PER_FILEREGION_PER_PROCESS,1) - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(WARNING: cross-compiling not supported) - fi -fi - -dnl Checking whether shutdown fails on connectionless sockets -AC_MSG_CHECKING(whether shutdown fails on connectionless sockets) -define([shutdown_testcode], [ -#include -#include -#include -#include -#include -#include -#include -#include - -int main() -{ - int ret = 0; - int s; - struct sockaddr_in targetAddr; - char buff[10]; - - s = socket(AF_INET, SOCK_DGRAM, 0); - if (-1 == s) - { - exit (1); - } - - memset (&targetAddr, 0, sizeof(targetAddr)); - targetAddr.sin_family = AF_INET; - targetAddr.sin_addr.s_addr = htonl(inet_addr("127.0.0.1")); - targetAddr.sin_port = htons(11000); - - ret = shutdown(s,2); - if ((ret < 0) && (errno == ENOTCONN)) - ret = 0; - else - ret = 1; - - close(s); - exit(ret); -} -]) -SHUTDOWNTEST_OLDCFLAGS=$CFLAGS -if test "$platform_name" = "SunOS"; then - CFLAGS="$CFLAGS -lsocket -lnsl" -fi -AC_LINK_IFELSE([shutdown_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([shutdown_testcode], shutdown_fails_on_connectionless_sockets=yes, shutdown_fails_on_connectionless_sockets=no, shutdown_fails_on_connectionless_sockets=dontknow) -if test $shutdown_fails_on_connectionless_sockets = yes; then - AC_DEFINE(SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS,1) - AC_MSG_RESULT(yes) -else - if test $shutdown_fails_on_connectionless_sockets = no; then - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(WARNING: cross-compiling not supported) - fi -fi -CFLAGS=$SHUTDOWNTEST_OLDCFLAGS - -dnl Checking whether it is possible to broadcast on a socket without SO_BROADCAST -AC_MSG_CHECKING(whether it is possible to broadcast on a socket without SO_BROADCAST) -define([broadcast_testcode], [ -#include -#include -#include -#include -#include -#include -#include -#include - -int main() -{ - int ret = 0; - int ival = 0; - int s; - struct sockaddr_in targetAddr; - char chr; - - s = socket(AF_INET, SOCK_DGRAM, 0); - if (-1 == s) - { - exit (1); - } - - /* Make sure SO_BROADCAST it is off (it should be by default) */ - ret = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&ival, sizeof(int)); - if (-1 == ret) - { - exit (1); - } - - memset (&targetAddr, 0, sizeof(targetAddr)); - targetAddr.sin_family = AF_INET; - targetAddr.sin_addr.s_addr = htonl(inet_addr("255.255.255.255")); - targetAddr.sin_port = htons(11000); - - ret = sendto(s, &chr, 1, 0, (struct sockaddr *)&targetAddr, sizeof(targetAddr)); - if ((ret < 0) && (errno == EACCES)) - ret = 1; - else - ret = 0; - - close(s); - exit(ret); -} -]) -BROADCASTTEST_OLDCFLAGS=$CFLAGS -if test "$platform_name" = "SunOS"; then - CFLAGS="$CFLAGS -lsocket -lnsl" -fi -AC_COMPILE_IFELSE([broadcast_testcode],,[AC_MSG_ERROR([Failed to just compile test code])]) -AC_LINK_IFELSE([broadcast_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([broadcast_testcode], broadcast_without_so_broadcast=yes, broadcast_without_so_broadcast=no, broadcast_without_so_broadcast=dontknow) -if test $broadcast_without_so_broadcast = yes; then - AC_DEFINE(BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST,1) - AC_MSG_RESULT(yes) -else - if test $broadcast_without_so_broadcast = no; then - AC_MSG_RESULT(no) - else - AC_MSG_RESULT(WARNING: cross-compiling not supported) - fi -fi -CFLAGS=$BROADCASTTEST_OLDCFLAGS - -POSIXSEMTEST_OLDCFLAGS=$CFLAGS -CFLAGS="$CFLAGS $PTHREAD_OPTIONS" -AC_MSG_CHECKING(whether posix semaphores are implemented) -define([posix_semaphores_testcode], [ - #include - #include - #include - - int main() { - sem_t sema; - if (sem_init(&sema, 0, 0) == -1){ - exit(1); - } - exit(0); - } -]) -AC_LINK_IFELSE([posix_semaphores_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([posix_semaphores_testcode], posix_semaphores_are_implemented=yes, posix_semaphores_are_implemented=no, posix_semaphores_are_implemented=dontknow) -if test $posix_semaphores_are_implemented = yes; then - AC_DEFINE(HAS_POSIX_SEMAPHORES) - AC_MSG_RESULT(yes) -elif test $posix_semaphores_are_implemented = no; then - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(WARNING: cross-compiling not supported) -fi - -dnl Checking whether sem_init modifies errno on success -AC_MSG_CHECKING(whether sem_init modifies errno on success) -define([sem_init_modifies_errno_testcode], [ -#include -#include -#include - -int main() { - int result; - sem_t sema; - - errno = 50; - result = sem_init(&sema, 0, 0); - if (result != 0) - { - exit(0); - } - if (errno != 50) - { - exit(1); - } - exit(0); -} -]) -AC_LINK_IFELSE([sem_init_modifies_errno_testcode],,[AC_MSG_ERROR([Failed to compile and link test code])]) -AC_RUN_IFELSE([sem_init_modifies_errno_testcode], sem_init_modifies_errno=no, sem_init_modifies_errno=yes, sem_init_modifies_errno=dontknow) -if test $sem_init_modifies_errno = yes; then - AC_DEFINE(SEM_INIT_MODIFIES_ERRNO) - AC_MSG_RESULT(yes) -elif test $sem_init_modifies_errno = no; then - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(WARNING: cross-compiling not supported) -fi -CFLAGS=$POSIXSEMTEST_OLDCFLAGS - - -AC_MSG_CHECKING(whether pthread_create modifies errno on success) -AC_TRY_RUN([ -#include -#include -#include - -void *start_routine(void *param) { return NULL; } - -int main() { - int result; - pthread_t tid; - - errno = 0; - result = pthread_create(&tid, NULL, start_routine, NULL); - if (result != 0) { - exit(0); - } - if (errno != 0) { - exit(1); - } - exit(0); -} -], pthread_create_modifies_errno=no, pthread_create_modifies_errno=yes, - pthread_create_modifies_errno=no) -if test $pthread_create_modifies_errno = yes; then - AC_DEFINE(PTHREAD_CREATE_MODIFIES_ERRNO) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl Define a new macro to check for the existence of a file under /proc/ -dnl The first argument is the name of the file to check for (e.g., ctl) -dnl The second argument is the mode to use to open the file (e.g., O_WRONLY) -define([check_procfs_file], [[ - #include - #include - #include - #include - - int main(void) { - int fd; - #ifdef PATH_MAX - char path[PATH_MAX]; - #elif defined(MAXPATHLEN) - char path[MAXPATHLEN]; - #else - char path[1024]; - #endif - - sprintf(path, "/proc/%u/$1", getpid()); - fd = open(path, $2); - if (fd == -1) { - exit(1); - } - exit(0); - } -]]) - -AC_MSG_CHECKING(whether /proc//ctl is supported) -AC_TRY_RUN(check_procfs_file([ctl], [O_WRONLY]), - has_procfs_ctl=yes, has_procfs_ctl=no, has_procfs_ctl=no) -if test $has_procfs_ctl = yes; then - AC_DEFINE(HAVE_PROCFS_CTL) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -if test $has_procfs_ctl = yes; then - AC_MSG_CHECKING(if memory is accessed through /proc//as) - AC_TRY_RUN(check_procfs_file([as], [O_RDONLY]), - has_procfs_as=yes, has_procfs_as=no, has_procfs_as=no) - if test $has_procfs_as = yes; then - AC_DEFINE(PROCFS_MEM_NAME,["as"]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - AC_MSG_CHECKING(if memory is accessed through /proc//mem) - AC_TRY_RUN(check_procfs_file([mem], [O_RDONLY]), - has_procfs_mem=yes, has_procfs_mem=no, has_procfs_mem=no) - if test $has_procfs_mem = yes; then - AC_DEFINE(PROCFS_MEM_NAME,["mem"]) - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - fi - fi -elif test $ac_has_vm_read_overwrite = no; then - dnl Check for ttrace. If it exists we'll use it in preference to ptrace, - dnl which is not supported on HP-UX/IA64. - AC_CHECK_FUNC(ttrace, ac_has_ttrace=yes, ac_has_ttrace=no) - if test $ac_has_ttrace = yes; then - AC_DEFINE(HAVE_TTRACE) - fi -fi - -AC_MSG_CHECKING(whether exp of 1.0 is exactly e) -AC_TRY_RUN([ -#include -#include - -int main(void) { - double d = exp(1.0), e = M_E; - - /* Used memcmp rather than == to test that the doubles are equal to - prevent gcc's optimizer from using its 80 bit internal long - doubles. If you use ==, then on BSD you get a false negative since - exp(1.0) == M_E to 64 bits, but not 80. - */ - - if (memcmp (&d, &e, sizeof (double)) == 0) { - exit(0); - } - exit(1); -} -], has_compatible_exp=yes, has_compatible_exp=no, has_compatible_exp=yes) -if test $has_compatible_exp = yes; then - AC_DEFINE(HAVE_COMPATIBLE_EXP) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether acos returns NaN on invalid input) -AC_TRY_RUN([ -#include -#include - -int main(void) { - if (!isnan(acos(10))) { - exit(1); - } - exit(0); -} -], has_compatible_acos=yes, has_compatible_acos=no, has_compatible_acos=yes) -if test $has_compatible_acos = yes; then - AC_DEFINE(HAVE_COMPATIBLE_ACOS) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether asin returns NaN on invalid input) -AC_TRY_RUN([ -#include -#include - -int main(void) { - if (!isnan(asin(10))) { - exit(1); - } - exit(0); -} -], has_compatible_asin=yes, has_compatible_asin=no, has_compatible_asin=yes) -if test $has_compatible_asin = yes; then - AC_DEFINE(HAVE_COMPATIBLE_ASIN) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether pow returns expected results for edge cases) -AC_TRY_RUN([ -#include -#include - -int main(void) { - double infinity = 1.0 / 0.0; - if (!isnan(pow(1.0, infinity))) { - exit(1); - } - if (pow(0.0, -1) != infinity) { - exit(1); - } - exit(0); -} -], has_compatible_pow=yes, has_compatible_pow=no, has_compatible_pow=yes) -if test $has_compatible_pow = yes; then - AC_DEFINE(HAVE_COMPATIBLE_POW) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether pow correctly handles x**y for negative x and large magnitude odd y) -AC_TRY_RUN([ -#include -#include - -int main(int argc, char **argv) { - double result; - - result = pow(-3.2e-10, -5e14 + 1); - if (result != -1.0 / 0.0) { - exit(1); - } - exit(0); -} -], has_valid_negative_inf_pow=yes, has_valid_negative_inf_pow=no) -if test $has_valid_negative_inf_pow = yes; then - AC_DEFINE(HAVE_VALID_NEGATIVE_INF_POW) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether pow correctly handles x**y for negative x and large magnitude even y) -AC_TRY_RUN([ -#include -#include - -int main(int argc, char **argv) { - double result; - - result = pow(-3.5, 3e100); - if (result != 1.0 / 0.0) { - exit(1); - } - exit(0); -} -], has_valid_positive_inf_pow=yes, has_valid_positive_inf_pow=no) -if test $has_valid_positive_inf_pow = yes; then - AC_DEFINE(HAVE_VALID_POSITIVE_INF_POW) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(atan2 boundary conditions are same as on windows) -AC_TRY_RUN([ -#include -#include - -int main(void) { - double pi = 3.14159265358979323846; - double result; - - result = atan2(0.0, -0.0); - if (fabs(pi - result) > 0.0000001) { - exit(1); - } - - result = atan2(-0.0, -0.0); - if (fabs(-pi - result) > 0.0000001) { - exit(1); - } - - result = atan2 (-0.0, 0.0); - if (result != 0.0 || copysign (1.0, result) > 0) { - exit(1); - } - - result = atan2 (0.0, 0.0); - if (result != 0.0 || copysign (1.0, result) < 0) { - exit(1); - } - - exit (0); -} -], has_compatible_atan2=yes, has_compatible_atan2=no, - has_compatible_atan2=yes) -if test $has_compatible_atan2 = yes; then - AC_DEFINE(HAVE_COMPATIBLE_ATAN2) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether log returns NaN when x is negative) -AC_TRY_RUN([ -#include -#include - -int main(void) { - if (!isnan(log(-10000))) { - exit(1); - } - exit(0); -} -], has_compatible_log=yes, has_compatible_log=no, has_compatible_log=yes) -if test $has_compatible_log = yes; then - AC_DEFINE(HAVE_COMPATIBLE_LOG) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether log10 returns NaN when x is negative) -AC_TRY_RUN([ -#include -#include - -int main(void) { - if (!isnan(log10(-10000))) { - exit(1); - } - exit(0); -} -], has_compatible_log10=yes, has_compatible_log10=no, - has_compatible_log10=yes) -if test $has_compatible_log10 = yes; then - AC_DEFINE(HAVE_COMPATIBLE_LOG10) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether ungetc does not return EOF on write-only file) -AC_TRY_RUN([ -#include - -int main(void) -{ - char* szFileName; - FILE* pFile = NULL; - int ret = 0; - - szFileName = tempnam(".", "tmp"); - - /* open the file write-only */ - pFile = fopen(szFileName, "a"); - if (pFile == NULL) - { - exit(1); - } - if (ungetc('A', pFile) != EOF) - { - ret = 1; - } - unlink(szFileName); - exit(ret); -} -], ungetc_not_return_eof=no, ungetc_not_return_eof=yes, - ungetc_not_return_eof=no) -if test $ungetc_not_return_eof = yes; then - AC_DEFINE(UNGETC_NOT_RETURN_EOF) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -AC_MSG_CHECKING(whether malloc(0) returns NULL) -AC_TRY_RUN([ -#include - -int main(void) -{ - void *p; - - p = malloc(0); - - if (p == NULL) - { - exit(0); - } - - exit(1); -} -], malloc_zero_returns_null=yes, malloc_zero_returns_null=no, - malloc_zero_returns_null=yes) -if test $malloc_zero_returns_null = yes; then - AC_DEFINE(MALLOC_ZERO_RETURNS_NULL) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl We need to use C++ for this compilation test since C will compile the code -dnl successfully on all platforms. With C++, however, compile fails if glob -dnl does not expect an error function to take a const char * and an int. -AC_MSG_CHECKING(whether error function for glob() needs specific parameters) -AC_LANG_SAVE -AC_LANG_CPLUSPLUS -AC_TRY_COMPILE([ -#include - -int errFunc(const char *sz, int n) -{ - return 0; -} -], [ - glob_t g; - glob("*.c", GLOB_DOOFFS, errFunc, &g); -], -error_func_for_glob_has_fixed_params=yes, error_func_for_glob_has_fixed_params=no) -AC_LANG_RESTORE -if test $error_func_for_glob_has_fixed_params = yes; then - AC_DEFINE(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS) - AC_MSG_RESULT(yes) -else - AC_MSG_RESULT(no) -fi - -dnl Define a new macro to check locale name -dnl The first argument of this macro is the locale name to be checked. -define([check_locale_name], [ - #include - - int main(void) { - char *locale; - - locale = setlocale(LC_CTYPE, "$1"); - /* locale is NULL if the locale is not supported. */ - exit(locale == NULL); - } -]) - -dnl Check the the name of ISO locale. -dnl The known acceptable format are: -dnl FreeBSD 4.4: en_US.ISO_8859-1 -dnl FreeBSD 4.5 or later: en_US.ISO_8859-1 or en_US.ISO8859-1 -dnl MacOSX, Solaris, AIX: en_US.ISO8859-1 -dnl HPUX: en_US.iso88591 -AC_MSG_CHECKING(for the name of ISO locale) -AC_TRY_RUN(check_locale_name([en_US.ISO8859-1]), - ac_has_standard_iso_name=yes, ac_has_standard_iso_name=no, - ac_has_standard_iso_name=no) -if test $ac_has_standard_iso_name = yes; then - AC_MSG_RESULT(en_US.ISO8859-1) -else - AC_TRY_RUN(check_locale_name([en_US.iso88591]), - ac_has_lowercase_iso_name=yes, ac_has_lowercase_iso_name=no, - ac_has_lowercase_iso_name=no) - if test $ac_has_lowercase_iso_name = yes; then - AC_DEFINE(HAVE_LOWERCASE_ISO_NAME) - AC_MSG_RESULT(en_US.iso88591) - else - AC_TRY_RUN(check_locale_name([en_US.ISO_8859-1]), - ac_has_underscore_iso_name=yes, ac_has_underscore_iso_name=no, - ac_has_underscore_iso_name=no) - if test $ac_has_underscore_iso_name = yes; then - AC_DEFINE(HAVE_UNDERSCORE_ISO_NAME) - AC_MSG_RESULT(en_US.ISO_8859-1) - else - AC_MSG_RESULT(cannot find en_US.ISO8859-1 locale) - fi - fi -fi - -AC_MSG_CHECKING(for the name of the Shift-JIS locale) -AC_TRY_RUN(check_locale_name([ja_JP.SJIS]), - ac_has_shift_jis=yes, ac_has_shift_jis=no, ac_has_shift_jis=no) -if test $ac_has_shift_jis = yes; then - AC_DEFINE(JA_JP_LOCALE_NAME,["ja_JP.SJIS"]) - AC_MSG_RESULT(ja_JP.SJIS) -else - AC_TRY_RUN(check_locale_name([ja_JP.PCK]), - ac_has_ja_jp_pck=yes, ac_has_ja_jp_pck=no, ac_has_ja_jp_pck=no) - if test $ac_has_ja_jp_pck = yes; then - AC_DEFINE(JA_JP_LOCALE_NAME,["ja_JP.PCK"]) - AC_MSG_RESULT(ja_JP.PCK) - else - AC_DEFINE(JA_JP_LOCALE_NAME,["ja_JP_LOCALE_NOT_FOUND"]) - AC_MSG_RESULT(cannot find ja_JP locale) - fi -fi - -AC_MSG_CHECKING(for the name of the ko_KR locale) -AC_TRY_RUN(check_locale_name([ko_KR.eucKR]), - ac_has_ko_euc_kr=yes, ac_has_ko_euc_kr=no, ac_has_ko_euc_kr=no) -if test $ac_has_ko_euc_kr = yes; then - AC_DEFINE(KO_KR_LOCALE_NAME,["ko_KR.eucKR"]) - AC_MSG_RESULT(ko_KR.eucKR) -else - AC_TRY_RUN(check_locale_name([ko_KR.EUC]), - ac_has_ko_euc=yes, ac_has_ko_euc=no, ac_has_ko_euc=no) - if test $ac_has_ko_euc = yes; then - AC_DEFINE(KO_KR_LOCALE_NAME,["ko_KR.EUC"]) - AC_MSG_RESULT(ko_KR.EUC) - else - AC_TRY_RUN(check_locale_name([ko_KR.IBM-eucKR]), - ac_has_ko_ibm_euc_kr=yes, ac_has_ko_ibm_euc_kr=no, ac_has_ko_ibm_euc_kr=no) - if test $ac_has_ko_ibm_euc_kr = yes; then - AC_DEFINE(KO_KR_LOCALE_NAME,["ko_KR.IBM-eucKR"]) - AC_MSG_RESULT(ko_KR.IBM-eucKR) - else - AC_DEFINE(KO_KR_LOCALE_NAME,["ko_KR_LOCALE_NOT_FOUND"]) - AC_MSG_RESULT(cannot find ko_KR locale) - fi - fi -fi - -AC_MSG_CHECKING(for the name of the Big 5 locale) -AC_TRY_RUN(check_locale_name([zh_TW.BIG5]), - ac_has_caps_big5=yes, ac_has_caps_big5=no, ac_has_caps_big5=no) -if test $ac_has_caps_big5 = yes; then - AC_DEFINE(ZH_TW_LOCALE_NAME,["zh_TW.BIG5"]) - AC_MSG_RESULT(zh_TW.BIG5) -else - AC_TRY_RUN(check_locale_name([zh_TW.big5]), - ac_has_lowercase_big5=yes, ac_has_lowercase_big5=no, ac_has_lowercase_big5=no) - if test $ac_has_lowercase_big5 = yes; then - AC_DEFINE(ZH_TW_LOCALE_NAME,["zh_TW.big5"]) - AC_MSG_RESULT(zh_TW.big5) - else - AC_TRY_RUN(check_locale_name([zh_TW.Big5]), - ac_has_titlecase_big5=yes, ac_has_titlecase_big5=no, ac_has_titlecase_big5=no) - if test $ac_has_titlecase_big5 = yes; then - AC_DEFINE(ZH_TW_LOCALE_NAME,["zh_TW.Big5"]) - AC_MSG_RESULT(zh_TW.Big5) - else - AC_TRY_RUN(check_locale_name([Zh_TW.big5]), - ac_has_titlecase_zh=yes, ac_has_titlecase_zh=no, ac_has_titlecase_zh=no) - if test $ac_has_titlecase_zh = yes; then - AC_DEFINE(ZH_TW_LOCALE_NAME,["Zh_TW.big5"]) - AC_MSG_RESULT(Zh_TW.big5) - else - AC_DEFINE(ZH_TW_LOCALE_NAME,["zh_TW_LOCALE_NOT_FOUND"]) - AC_MSG_RESULT(cannot find zh_TW locale) - fi - fi - fi -fi - -AC_MSG_CHECKING(for per-thread locale support) -AC_TRY_COMPILE([#include ], - [locale_t loc = newlocale(LC_CTYPE_MASK, NULL, NULL);], - ac_has_xlocale=yes, ac_has_xlocale=no) -if test $ac_has_xlocale = yes; then - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_XLOCALE) -else - AC_MSG_RESULT(no) -fi - - -dnl !!!! The absolute paths in the AC_OUTPUT must stay there, if you use relative paths instead (like ../..) the files will be generated at the right -dnl place, but they will contain wrong values for some variables (especially TOP_SRC_DIR). The only way to work this around I was able to find -dnl is by using the absolute paths. The only disadvantage of this is, that during the configure run it will output error emssages that it can't -dnl go to some subdirectories (it will try to add this absolute path to the current directory path), but that's no problem since -dnl even these messages all works fine. - -AC_OUTPUT([ -makefile:../../makefile.in -makefile.common:../../makefile.common.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/arch/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../arch/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/arch/$ARCH_DIR/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../arch/$ARCH_DIR/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/cruntime/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../cruntime/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/crypt/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../crypt/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/debug/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../debug/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/exception/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../exception/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/file/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../file/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/handlemgr/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../handlemgr/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/loader/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../loader/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/locale/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../locale/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/map/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../map/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/memory/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../memory/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/misc/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../misc/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/init/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../init/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/poll/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../poll/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/safecrt/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../safecrt/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/shfolder/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../shfolder/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/shmemory/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../shmemory/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/socket/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../socket/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/sync/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../sync/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/thread/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../thread/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/objmgr/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../objmgr/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/synchmgr/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../synchmgr/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/synchobj/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../synchobj/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/examples/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../examples/makefile.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/build_tools/obj${BUILD_ALT_DIR}/${_BUILDARCH}/mdtool_gcc:../../build_tools/mdtool_gcc.in -$ROTOR_DIR/pal/$PAL_UNIX_DIR/build_tools/obj${BUILD_ALT_DIR}/${_BUILDARCH}/makefile:../../build_tools/makefile.in ]) - -dnl mdtool_gcc is a shell script; it needs to be executable. -AC_OUTPUT_COMMANDS([ chmod +x $ROTOR_DIR/pal/$PAL_UNIX_DIR/build_tools/obj${BUILD_ALT_DIR}/${_BUILDARCH}/mdtool_gcc ]) - -dnl put the path of all output files to config.output_files -dnl for checkconfig.pl to read. -echo $ac_config_headers > config.output_files -echo $ac_config_files >> config.output_files - -echo -echo "Configure finished. Do 'make depend && make' to compile the PAL." -echo diff --git a/src/pal/src/exception/signal.cpp b/src/pal/src/exception/signal.cpp index 2d40068540fe..03ffcc44451c 100644 --- a/src/pal/src/exception/signal.cpp +++ b/src/pal/src/exception/signal.cpp @@ -556,12 +556,12 @@ static void common_signal_handler(PEXCEPTION_POINTERS pointers, int code, CONTEXTToNativeContext(&context, ucontext, CONTEXT_CONTROL | CONTEXT_INTEGER); -#if HAVE_SIGRETURN - sigreturn(ucontext); +#if HAVE_SETCONTEXT + setcontext(ucontext); #elif HAVE__THREAD_SYS_SIGRETURN _thread_sys_sigreturn(ucontext); -#elif HAVE_SETCONTEXT - setcontext(ucontext); +#elif HAVE_SIGRETURN + sigreturn(ucontext); #else #error Missing a sigreturn equivalent on this platform! #endif diff --git a/src/pal/src/misc/sysinfo.cpp b/src/pal/src/misc/sysinfo.cpp index 6de02108cc41..a7f47735a122 100644 --- a/src/pal/src/misc/sysinfo.cpp +++ b/src/pal/src/misc/sysinfo.cpp @@ -1,6 +1,6 @@ // // Copyright (c) Microsoft. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. // /*++ @@ -83,16 +83,16 @@ SET_DEFAULT_DEBUG_CHANNEL(MISC); GetSystemInfo -The GetSystemInfo function returns information about the current system. +The GetSystemInfo function returns information about the current system. Parameters -lpSystemInfo - [out] Pointer to a SYSTEM_INFO structure that receives the information. +lpSystemInfo + [out] Pointer to a SYSTEM_INFO structure that receives the information. Return Values -This function does not return a value. +This function does not return a value. Note: fields returned by this function are: @@ -108,12 +108,12 @@ GetSystemInfo( { int nrcpus = 0; long pagesize; - + PERF_ENTRY(GetSystemInfo); ENTRY("GetSystemInfo (lpSystemInfo=%p)\n", lpSystemInfo); - + pagesize = getpagesize(); - + lpSystemInfo->wProcessorArchitecture_PAL_Undefined = 0; lpSystemInfo->wReserved_PAL_Undefined = 0; lpSystemInfo->dwPageSize = pagesize; @@ -207,7 +207,7 @@ GlobalMemoryStatusEx( PERF_ENTRY(GlobalMemoryStatusEx); ENTRY("GlobalMemoryStatusEx (lpBuffer=%p)\n", lpBuffer); - + lpBuffer->dwMemoryLoad = 0; lpBuffer->ullTotalPhys = 0; lpBuffer->ullAvailPhys = 0; @@ -220,7 +220,7 @@ GlobalMemoryStatusEx( BOOL fRetVal = FALSE; // Get the physical memory size -#if HAVE_SYSCONF +#if HAVE_SYSCONF && HAVE__SC_PHYS_PAGES int64_t physical_memory; // Get the Physical memory size @@ -249,14 +249,14 @@ GlobalMemoryStatusEx( #elif // HAVE_SYSINFO // TODO: implement getting memory details via sysinfo. On Linux, it provides swap file details that // we can use to fill in the xxxPageFile members. - + #endif // HAVE_SYSCONF // Get the physical memory in use - from it, we can get the physical memory available. // We do this only when we have the total physical memory available. if (lpBuffer->ullTotalPhys > 0) { -#if HAVE_SYSCONF +#if HAVE_SYSCONF && HAVE__SC_AVPHYS_PAGES lpBuffer->ullAvailPhys = sysconf(_SC_AVPHYS_PAGES) * sysconf(_SC_PAGE_SIZE); INT64 used_memory = lpBuffer->ullTotalPhys - lpBuffer->ullAvailPhys; lpBuffer->dwMemoryLoad = (DWORD)((used_memory * 100) / lpBuffer->ullTotalPhys); @@ -282,7 +282,7 @@ GlobalMemoryStatusEx( // TODO: figure out a way to get the real values for the total / available virtual lpBuffer->ullTotalVirtual = lpBuffer->ullTotalPhys; lpBuffer->ullAvailVirtual = lpBuffer->ullAvailPhys; - + LOGEXIT("GlobalMemoryStatusEx returns %d\n", fRetVal); PERF_EXIT(GlobalMemoryStatusEx); From cdbd0286f8663db4942f3c945e935facc0d53f46 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 13 Feb 2015 14:14:10 -0800 Subject: [PATCH 08/22] Simplify platform ifdefs Simplify platform ifdefs like #if defined(_WIN64) || defined(_TARGET_ARM_) to #if !defined(_TARGET_X86_) based on @BruceForstall suggestion --- src/debug/daccess/dacdbiimplstackwalk.cpp | 10 +--- src/debug/daccess/fntableaccess.h | 4 +- src/debug/ee/debugger.cpp | 2 - src/debug/ee/debugger.h | 2 +- src/debug/ee/frameinfo.cpp | 5 +- src/inc/clrnt.h | 8 +--- src/inc/corcompile.h | 4 +- src/inc/dbggcinfodecoder.h | 2 +- src/inc/eetwain.h | 2 +- src/inc/gcinfodecoder.h | 2 +- src/inc/jithelpers.h | 14 ++---- src/inc/mdilhelpers.h | 8 ++-- src/inc/regdisp.h | 14 ++---- src/inc/switches.h | 4 +- src/vm/codeman.cpp | 2 +- src/vm/eedbginterface.h | 2 - src/vm/frames.h | 2 +- src/vm/proftoeeinterfaceimpl.cpp | 58 ----------------------- src/vm/stackwalk.cpp | 46 +++++++++--------- src/vm/stackwalk.h | 4 +- src/vm/threads.cpp | 8 ++-- src/zap/common.h | 4 +- 22 files changed, 60 insertions(+), 147 deletions(-) diff --git a/src/debug/daccess/dacdbiimplstackwalk.cpp b/src/debug/daccess/dacdbiimplstackwalk.cpp index 1fd3202842c3..8c59ef7fffa4 100644 --- a/src/debug/daccess/dacdbiimplstackwalk.cpp +++ b/src/debug/daccess/dacdbiimplstackwalk.cpp @@ -1175,15 +1175,9 @@ void DacDbiInterfaceImpl::UpdateContextFromRegDisp(REGDISPLAY * pRegDisp, { *pContext = *pRegDisp->pContext; } - -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else *pContext = *pRegDisp->pCurrentContext; - -#else // !_TARGET_X86_ && !_WIN64 - _ASSERTE(!"DDII::UpdateContextFromRegDisplay() - NYI on this platform\n"); - ThrowHR(E_NOTIMPL); - -#endif // !_TARGET_X86_ && !_WIN64 +#endif } //--------------------------------------------------------------------------------------- diff --git a/src/debug/daccess/fntableaccess.h b/src/debug/daccess/fntableaccess.h index 674aed8fac44..16954d0b4e5d 100644 --- a/src/debug/daccess/fntableaccess.h +++ b/src/debug/daccess/fntableaccess.h @@ -143,10 +143,10 @@ class CheckDuplicatedStructLayouts CHECK_OFFSET(HeapList, mapBase); CHECK_OFFSET(HeapList, pHdrMap); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) CHECK_OFFSET(RealCodeHeader, nUnwindInfos); CHECK_OFFSET(RealCodeHeader, unwindInfos); -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ #ifdef DEBUGSUPPORT_STUBS_HAVE_UNWIND_INFO CHECK_OFFSET(StubUnwindInfoHeader, pNext); diff --git a/src/debug/ee/debugger.cpp b/src/debug/ee/debugger.cpp index 7ccf26f9e84c..358246aac341 100644 --- a/src/debug/ee/debugger.cpp +++ b/src/debug/ee/debugger.cpp @@ -3956,12 +3956,10 @@ HRESULT Debugger::SetIP( bool fCanSetIPOnly, Thread *thread,Module *module, DeleteInteropSafe(rgVal2); } -#if defined(_TARGET_X86_) || defined(_WIN64) || defined(_TARGET_ARM_) if (pEHRT != NULL) { delete pEHRT; } -#endif // _TARGET_X86_ || _WIN64 LOG((LF_CORDB, LL_INFO1000, "D::SIP:Returning 0x%x\n", hr)); return hrAdvise; diff --git a/src/debug/ee/debugger.h b/src/debug/ee/debugger.h index 29585de31d1b..41ff93d16f46 100644 --- a/src/debug/ee/debugger.h +++ b/src/debug/ee/debugger.h @@ -3825,7 +3825,7 @@ class IPCHostSecurityAttributeHolder // Returns true if the specified IL offset has a special meaning (eg. prolog, etc.) bool DbgIsSpecialILOffset(DWORD offset); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) void FixupDispatcherContext(T_DISPATCHER_CONTEXT* pDispatcherContext, T_CONTEXT* pContext, T_CONTEXT* pOriginalContext, PEXCEPTION_ROUTINE pUnwindPersonalityRoutine = NULL); #endif diff --git a/src/debug/ee/frameinfo.cpp b/src/debug/ee/frameinfo.cpp index 810682d1380f..d4dc6838e49f 100644 --- a/src/debug/ee/frameinfo.cpp +++ b/src/debug/ee/frameinfo.cpp @@ -2128,7 +2128,7 @@ StackWalkAction DebuggerWalkStack(Thread *thread, data.regDisplay.ControlPC = context->Eip; data.regDisplay.PCTAddr = (TADDR)&(context->Eip); -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else // // @TODO: this should be the code for all platforms now that it uses FillRegDisplay, // which encapsulates the platform variances. This could all be avoided if we used @@ -2139,9 +2139,6 @@ StackWalkAction DebuggerWalkStack(Thread *thread, FillRegDisplay(&data.regDisplay, context); ::SetSP(data.regDisplay.pCallerContext, 0); -#else - PORTABILITY_ASSERT("DebuggerWalkStack needs extended register information on this platform."); - #endif } diff --git a/src/inc/clrnt.h b/src/inc/clrnt.h index e477b524dc66..ed52e04a5351 100644 --- a/src/inc/clrnt.h +++ b/src/inc/clrnt.h @@ -752,11 +752,7 @@ typedef VM_COUNTERS *PVM_COUNTERS; #endif // !defined(FEATURE_PAL) -// -// WIN64 -// - -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) typedef enum _FUNCTION_TABLE_TYPE { RF_SORTED, @@ -786,7 +782,7 @@ typedef struct _DYNAMIC_FUNCTION_TABLE { ULONG EntryCount; } DYNAMIC_FUNCTION_TABLE, *PDYNAMIC_FUNCTION_TABLE; -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ // // AMD64 diff --git a/src/inc/corcompile.h b/src/inc/corcompile.h index 2e59a5882334..693cf31edf7e 100644 --- a/src/inc/corcompile.h +++ b/src/inc/corcompile.h @@ -23,11 +23,11 @@ #error FEATURE_PREJIT is required for this file #endif // FEATURE_PREJIT -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #ifndef WIN64EXCEPTIONS #define WIN64EXCEPTIONS #endif -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ #include #include diff --git a/src/inc/dbggcinfodecoder.h b/src/inc/dbggcinfodecoder.h index f618ca336f33..b87f9e6a9f23 100644 --- a/src/inc/dbggcinfodecoder.h +++ b/src/inc/dbggcinfodecoder.h @@ -62,7 +62,7 @@ typedef void (*GCEnumCallback)( ); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #define USE_GC_INFO_DECODER #endif diff --git a/src/inc/eetwain.h b/src/inc/eetwain.h index 1eab126734ad..b88af6fba207 100644 --- a/src/inc/eetwain.h +++ b/src/inc/eetwain.h @@ -32,7 +32,7 @@ #include "stackwalktypes.h" #include "bitvector.h" -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #define USE_GC_INFO_DECODER #endif diff --git a/src/inc/gcinfodecoder.h b/src/inc/gcinfodecoder.h index 122b3396bba6..628bb355c39f 100644 --- a/src/inc/gcinfodecoder.h +++ b/src/inc/gcinfodecoder.h @@ -133,7 +133,7 @@ enum ICodeManagerFlags #endif // !_strike_h -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #define USE_GC_INFO_DECODER #endif diff --git a/src/inc/jithelpers.h b/src/inc/jithelpers.h index 92e2bafdc1cd..686004499cfd 100644 --- a/src/inc/jithelpers.h +++ b/src/inc/jithelpers.h @@ -229,7 +229,7 @@ JITHELPER1(CORINFO_HELP_GETGENERICS_GCSTATIC_BASE, JIT_GetGenericsGCStaticBase,CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) JITHELPER1(CORINFO_HELP_GETGENERICS_NONGCSTATIC_BASE, JIT_GetGenericsNonGCStaticBase,CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) -#if defined(_TARGET_X86_) +#ifdef _TARGET_X86_ DYNAMICJITHELPER1(CORINFO_HELP_GETSHARED_GCSTATIC_BASE, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) DYNAMICJITHELPER1(CORINFO_HELP_GETSHARED_NONGCSTATIC_BASE, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) DYNAMICJITHELPER1(CORINFO_HELP_GETSHARED_GCSTATIC_BASE_NOCTOR, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_UNDEF) @@ -278,16 +278,12 @@ DYNAMICJITHELPER1(CORINFO_HELP_INIT_PINVOKE_FRAME, NULL, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_INIT_PINVOKE_FRAME) #endif -#if defined(_WIN64) || defined(_TARGET_ARM_) - - JITHELPER1(CORINFO_HELP_MEMSET, JIT_MemSet, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMSET) - JITHELPER1(CORINFO_HELP_MEMCPY, JIT_MemCpy, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMCPY) - -#else // _WIN64 || _TARGET_ARM_ - +#ifdef _TARGET_X86_ JITHELPER1(CORINFO_HELP_MEMSET, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB, MDIL_HELP_MEMSET) JITHELPER1(CORINFO_HELP_MEMCPY, NULL, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB, MDIL_HELP_MEMCPY) - +#else + JITHELPER1(CORINFO_HELP_MEMSET, JIT_MemSet, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMSET) + JITHELPER1(CORINFO_HELP_MEMCPY, JIT_MemCpy, CORINFO_HELP_SIG_REG_ONLY, MDIL_HELP_MEMCPY) #endif // Generics diff --git a/src/inc/mdilhelpers.h b/src/inc/mdilhelpers.h index 4318926e7d1a..a6c5cfc1edb6 100644 --- a/src/inc/mdilhelpers.h +++ b/src/inc/mdilhelpers.h @@ -176,12 +176,12 @@ MDILHELPER(MDIL_HELP_CHECK_PINVOKE_DOMAIN, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB) #endif -#if defined(_WIN64) || defined(_TARGET_ARM_) - MDILHELPER(MDIL_HELP_MEMSET, CORINFO_HELP_SIG_REG_ONLY) - MDILHELPER(MDIL_HELP_MEMCPY, CORINFO_HELP_SIG_REG_ONLY) -#else +#ifdef _TARGET_X86_ MDILHELPER(MDIL_HELP_MEMSET, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB) MDILHELPER(MDIL_HELP_MEMCPY, CORINFO_HELP_SIG_CANNOT_USE_ALIGN_STUB) +#else + MDILHELPER(MDIL_HELP_MEMSET, CORINFO_HELP_SIG_REG_ONLY) + MDILHELPER(MDIL_HELP_MEMCPY, CORINFO_HELP_SIG_REG_ONLY) #endif MDILHELPER(MDIL_HELP_RUNTIMEHANDLE_METHOD, CORINFO_HELP_SIG_REG_ONLY) diff --git a/src/inc/regdisp.h b/src/inc/regdisp.h index 9da1abed973b..601137ddf92f 100644 --- a/src/inc/regdisp.h +++ b/src/inc/regdisp.h @@ -489,14 +489,12 @@ inline void CopyRegDisplay(const PREGDISPLAY pInRD, PREGDISPLAY pOutRD, T_CONTEX if (pInRD->pEdx != NULL) {pOutCtx->Edx = *pInRD->pEdx;} else {pInRD->pEdx = NULL;} pOutCtx->Esp = pInRD->Esp; pOutCtx->Eip = pInRD->ControlPC; -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else *pOutCtx = *(pInRD->pCurrentContext); if (pInRD->IsCallerContextValid) { pOutCallerCtx = pInRD->pCallerContext; } -#else - PORTABILITY_ASSERT("@NYI Platform - CopyRegDisplay (Threads.cpp)"); #endif if (pOutRD) @@ -575,15 +573,9 @@ inline void UpdateContextFromRegDisp(PREGDISPLAY pRegDisp, PT_CONTEXT pContext) pContext->Edx = *pRegDisp->pEdx; pContext->Esp = pRegDisp->Esp; pContext->Eip = pRegDisp->ControlPC; - -#elif defined(_WIN64) || defined(_TARGET_ARM_) +#else *pContext = *pRegDisp->pCurrentContext; - -#else // !_TARGET_X86_ && !_WIN64 && !_TARGET_ARM_ - _ASSERTE(!"DDII::UpdateContextFromRegDisplay() - NYI on this platform\n"); - ThrowHR(E_NOTIMPL); - -#endif // !_TARGET_X86_ && !_WIN64 && !_TARGET_ARM_ +#endif } diff --git a/src/inc/switches.h b/src/inc/switches.h index 12cd6278c00e..b298b5563b94 100644 --- a/src/inc/switches.h +++ b/src/inc/switches.h @@ -149,7 +149,7 @@ #endif -#if defined(_DEBUG) && (defined(_TARGET_X86_) || defined(_WIN64) || defined(_TARGET_ARM_)) +#ifdef _DEBUG //hurray DAC makes everything more fun - you can't have defines that control whether //or not data members are visible which differ between DAC and non-DAC builds. @@ -168,7 +168,7 @@ #define PROF_TEST_ONLY_FORCE_OBJECT_ALLOCATED #endif // PROFILING_SUPPORTED -#endif // defined(_DEBUG) && (defined(_TARGET_X86_) || defined(_WIN64)) +#endif // _DEBUG diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp index d68e45b0af9e..fed3f09ccf94 100644 --- a/src/vm/codeman.cpp +++ b/src/vm/codeman.cpp @@ -2186,7 +2186,7 @@ CodeHeader* EEJitManager::allocCode(MethodDesc* pMD, size_t blockSize, CorJitAll alignment = max(alignment, 16); } -#if !defined(_WIN64) && !defined(_TARGET_ARM_) +#if defined(_TARGET_X86_) // when not optimizing for code size, 8-byte align the method entry point, so that // the JIT can in turn 8-byte align the loop entry headers. // diff --git a/src/vm/eedbginterface.h b/src/vm/eedbginterface.h index a39b7db6fc27..f300a0f665aa 100644 --- a/src/vm/eedbginterface.h +++ b/src/vm/eedbginterface.h @@ -328,7 +328,6 @@ class EEDebugInterface virtual void DebuggerModifyingLogSwitch (int iNewLevel, const WCHAR *pLogSwitchName) = 0; -#if defined(_TARGET_X86_) || defined(_WIN64) || defined(_TARGET_ARM_) virtual HRESULT SetIPFromSrcToDst(Thread *pThread, SLOT addrStart, DWORD offFrom, @@ -338,7 +337,6 @@ class EEDebugInterface PT_CONTEXT pCtx, void *pDji, EHRangeTree *pEHRT) = 0; -#endif // _TARGET_X86_ || _WIN64 || _TARGET_ARM_ virtual void SetDebugState(Thread *pThread, CorDebugThreadState state) = 0; diff --git a/src/vm/frames.h b/src/vm/frames.h index 885c65c84e7b..05a7a175f630 100644 --- a/src/vm/frames.h +++ b/src/vm/frames.h @@ -251,7 +251,7 @@ FRAME_TYPE_NAME(ExternalMethodFrame) #ifdef FEATURE_READYTORUN FRAME_TYPE_NAME(DynamicHelperFrame) #endif -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) FRAME_TYPE_NAME(StubHelperFrame) #endif FRAME_TYPE_NAME(GCFrame) diff --git a/src/vm/proftoeeinterfaceimpl.cpp b/src/vm/proftoeeinterfaceimpl.cpp index 9d2469f23691..088c231a1136 100644 --- a/src/vm/proftoeeinterfaceimpl.cpp +++ b/src/vm/proftoeeinterfaceimpl.cpp @@ -9379,64 +9379,6 @@ FCIMPL2(void, ProfilingFCallHelper::FC_RemotingServerSendingReply, GUID *pId, CL } FCIMPLEND -// -// Define wrapper functions for rotor. -// -// NOTE: These do not currently implement correctly passing the platform -// specific handle. The Rotor people need to implement these correctly if -// they care to support getting arguments, return value, and generic information. -// -#if !defined(_TARGET_X86_) && !defined(_WIN64) && !defined(_TARGET_ARM_) && defined(PROFILING_SUPPORTED) - -FCIMPL1(EXTERN_C void, ProfileEnterWrapper, FunctionIDOrClientID functionIDOrClientID) -{ - FCALL_CONTRACT; - - // - // Create some empty buffer space for the platformSpecificHandle - // - BYTE buffer[60] = {0}; - - PORTABILITY_ASSERT("ProfileEnterWrapper not implemented"); - REMOVE_STACK_GUARD_FOR_PROFILER_CALL; - ProfileEnter(functionIDOrClientID.clientID, &buffer); -} -FCIMPLEND - -FCIMPL1(EXTERN_C void, ProfileLeaveWrapper, FunctionIDOrClientID functionIDOrClientID) -{ - FCALL_CONTRACT; - - // - // Create some empty buffer space for the platformSpecificHandle - // - BYTE buffer[60] = {0}; - - PORTABILITY_ASSERT("ProfileLeaveWrapper not implemented"); - - REMOVE_STACK_GUARD_FOR_PROFILER_CALL; - ProfileLeave(functionIDOrClientID.clientID, &buffer); -} -FCIMPLEND - -FCIMPL1(EXTERN_C void, ProfileTailcallWrapper, FunctionIDOrClientID functionIDOrClientID) -{ - FCALL_CONTRACT; - - // - // Create some empty buffer space for the platformSpecificHandle - // - BYTE buffer[60] = {0}; - - PORTABILITY_ASSERT("ProfileTailcallWrapper not implemented"); - - REMOVE_STACK_GUARD_FOR_PROFILER_CALL; - ProfileTailcall(functionIDOrClientID.clientID, &buffer); -} -FCIMPLEND - -#endif - //******************************************************************************************* // These do a lot of work for us, setting up Frames, gathering arg info and resolving generics. diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp index eb12aea75057..4afbeb7ee112 100644 --- a/src/vm/stackwalk.cpp +++ b/src/vm/stackwalk.cpp @@ -1136,9 +1136,9 @@ void StackFrameIterator::CommonCtor(Thread * pThread, PTR_Frame pFrame, ULONG32 m_fDidFuncletReportGCReferences = true; #endif // WIN64EXCEPTIONS -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) m_pvResumableFrameTargetSP = NULL; -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif } // StackFrameIterator::CommonCtor() //--------------------------------------------------------------------------------------- @@ -1183,10 +1183,10 @@ BOOL StackFrameIterator::Init(Thread * pThread, _ASSERTE(CanThisThreadCallIntoHost() || (flags & LIGHTUNWIND) == 0); #endif // DACCESS_COMPILE -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) _ASSERTE(!(flags & POPFRAMES)); _ASSERTE(pRegDisp->pCurrentContext); -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ BEGIN_FORBID_TYPELOAD(); @@ -1342,7 +1342,7 @@ BOOL StackFrameIterator::ResetRegDisp(PREGDISPLAY pRegDisp, { TADDR curSP = GetRegdisplaySP(m_crawl.pRD); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) if (m_crawl.IsFrameless()) { // On 64-bit and ARM, we stop at the explicit frames contained in a managed stack frame @@ -1350,7 +1350,7 @@ BOOL StackFrameIterator::ResetRegDisp(PREGDISPLAY pRegDisp, EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, NULL); curSP = GetSP(m_crawl.pRD->pCallerContext); } -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ #if defined(_TARGET_X86_) // special processing on x86; see below for more information @@ -2217,7 +2217,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) if (m_frameState == SFITER_SKIPPED_FRAME_FUNCTION) { -#if (defined(_WIN64) || defined(_TARGET_ARM_)) && defined(_DEBUG) +#if !defined(_TARGET_X86_) && defined(_DEBUG) // make sure we're not skipping a different transition if (m_crawl.pFrame->NeedsUpdateRegDisplay()) { @@ -2235,7 +2235,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) CONSISTENCY_CHECK(GetControlPC(m_crawl.pRD) == m_crawl.pFrame->GetReturnAddress()); } } -#endif // (defined(_WIN64) || defined(_TARGET_ARM_)) && defined(_DEBUG) +#endif // !defined(_TARGET_X86_) && defined(_DEBUG) #if defined(STACKWALKER_MAY_POP_FRAMES) if (m_flags & POPFRAMES) @@ -2290,7 +2290,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) { goto Cleanup; } -#elif (defined(_WIN64) || defined(_TARGET_ARM_)) +#else // _TARGET_X86_ // On WIN64 and ARM, we are done handling the skipped explicit frame at this point. So move on to the // managed stack frame. m_crawl.isFrameless = true; @@ -2300,16 +2300,16 @@ StackWalkAction StackFrameIterator::NextRaw(void) PreProcessingForManagedFrames(); goto Cleanup; -#endif // (defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // _TARGET_X86_ } } else if (m_frameState == SFITER_FRAMELESS_METHOD) { // Now find out if we need to leave monitors -#if !defined(_WIN64) && !defined(_TARGET_ARM_) +#ifdef _TARGET_X86_ // - // WIN64 and ARM has the JIT generate try/finallys to leave monitors + // x86 has the JIT generate try/finallys to leave monitors // #if defined(STACKWALKER_MAY_POP_FRAMES) if (m_flags & POPFRAMES) @@ -2354,7 +2354,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) END_GCX_ASSERT_COOP; } #endif // STACKWALKER_MAY_POP_FRAMES -#endif // !defined(_WIN64) && !defined(_TARGET_ARM_) +#endif // _TARGET_X86_ #if !defined(ELIMINATE_FEF) // FaultingExceptionFrame is special case where it gets @@ -2542,7 +2542,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) { m_crawl.pFrame->UpdateRegDisplay(m_crawl.pRD); -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) CONSISTENCY_CHECK(NULL == m_pvResumableFrameTargetSP); if (m_crawl.isFirst) @@ -2570,7 +2570,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, m_crawl.GetStackwalkCacheEntry()); m_pvResumableFrameTargetSP = (LPVOID)GetSP(m_crawl.pRD->pCallerContext); } -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ // We are transitioning from unmanaged code to managed code... lets do some validation of our @@ -2870,15 +2870,15 @@ void StackFrameIterator::ProcessCurrentFrame(void) // Cache values which may be updated by CheckForSkippedFrames() m_cachedCodeInfo = m_crawl.codeInfo; -#if defined(_WIN64) || defined(_TARGET_ARM_) - // On WIN64 and ARM, we want to process the skipped explicit frames before the managed stack frame +#if !defined(_TARGET_X86_) + // On non-X86, we want to process the skipped explicit frames before the managed stack frame // containing them. if (CheckForSkippedFrames()) { _ASSERTE(m_frameState == SFITER_SKIPPED_FRAME_FUNCTION); } else -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ { PreProcessingForManagedFrames(); _ASSERTE(m_frameState == SFITER_FRAMELESS_METHOD); @@ -2925,9 +2925,9 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void) // Can the caller handle skipped frames; fHandleSkippedFrames = (m_flags & HANDLESKIPPEDFRAMES); -#if !(defined(_WIN64) || defined(_TARGET_ARM_)) +#if !defined(_TARGET_X86_) pvReferenceSP = GetRegdisplaySP(m_crawl.pRD); -#else // (defined(_WIN64) || defined(_TARGET_ARM_)) +#else // !_TARGET_X86_ // Order the Frames relative to the caller SP of the methods // this makes it so that any Frame that is in a managed call // frame will be reported before its containing method. @@ -2935,7 +2935,7 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void) // This should always succeed! If it doesn't, it's a bug somewhere else! EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, m_crawl.GetStackwalkCacheEntry(), &m_cachedCodeInfo); pvReferenceSP = GetSP(m_crawl.pRD->pCallerContext); -#endif // !(defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // !_TARGET_X86_ if ( !( (m_crawl.pFrame != FRAME_TOP) && (dac_cast(m_crawl.pFrame) < pvReferenceSP) ) @@ -3021,7 +3021,7 @@ void StackFrameIterator::PreProcessingForManagedFrames(void) WRAPPER_NO_CONTRACT; SUPPORTS_DAC; -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) if (m_pvResumableFrameTargetSP) { // We expect that if we saw a resumable frame, the next managed @@ -3035,7 +3035,7 @@ void StackFrameIterator::PreProcessingForManagedFrames(void) m_pvResumableFrameTargetSP = NULL; m_crawl.isFirst = true; } -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ #if !defined(DACCESS_COMPILE) m_pCachedGSCookie = (GSCookie*)m_crawl.GetCodeManager()->GetGSCookieAddr( diff --git a/src/vm/stackwalk.h b/src/vm/stackwalk.h index fb45082596e1..c1731b8c27e0 100644 --- a/src/vm/stackwalk.h +++ b/src/vm/stackwalk.h @@ -687,9 +687,9 @@ class StackFrameIterator bool m_fDidFuncletReportGCReferences; #endif // WIN64EXCEPTIONS -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) LPVOID m_pvResumableFrameTargetSP; -#endif // defined(_WIN64) || defined(_TARGET_ARM_) +#endif // !_TARGET_X86_ }; void SetUpRegdisplayForStackWalk(Thread * pThread, T_CONTEXT * pContext, REGDISPLAY * pRegdisplay); diff --git a/src/vm/threads.cpp b/src/vm/threads.cpp index 4c3c60bb6a91..0d21e1579a5a 100644 --- a/src/vm/threads.cpp +++ b/src/vm/threads.cpp @@ -8180,16 +8180,16 @@ void Thread::FillRegDisplay(const PREGDISPLAY pRD, PT_CONTEXT pctx) ::FillRegDisplay(pRD, pctx); -#if defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#if defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) CONSISTENCY_CHECK(!pRD->_pThread || pRD->_pThread == this); pRD->_pThread = this; CheckRegDisplaySP(pRD); -#endif // defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) } -#if defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#if defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) void CheckRegDisplaySP (REGDISPLAY *pRD) { @@ -8200,7 +8200,7 @@ void CheckRegDisplaySP (REGDISPLAY *pRD) } } -#endif // defined(DEBUG_REGDISPLAY) && (defined(_WIN64) || defined(_TARGET_ARM_)) +#endif // defined(DEBUG_REGDISPLAY) && !defined(_TARGET_X86_) // Trip Functions // ============== diff --git a/src/zap/common.h b/src/zap/common.h index a4d91935bf35..6c1063bbd351 100644 --- a/src/zap/common.h +++ b/src/zap/common.h @@ -22,11 +22,11 @@ #include #include -#if defined(_WIN64) || defined(_TARGET_ARM_) +#if !defined(_TARGET_X86_) #ifndef WIN64EXCEPTIONS #define WIN64EXCEPTIONS #endif -#endif // _WIN64 || _TARGET_ARM_ +#endif // !_TARGET_X86_ #include "utilcode.h" #include "corjit.h" From df667ed8520c824abcb951d1e78882e0fd288118 Mon Sep 17 00:00:00 2001 From: Eugene Zemtsov Date: Fri, 13 Feb 2015 15:40:00 -0800 Subject: [PATCH 09/22] Improve workaround description and limit it to just MS compiler [tfs-changeset: 1415470] --- src/debug/di/process.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/debug/di/process.cpp b/src/debug/di/process.cpp index 7f243a86aa09..fcf9d8ff35cd 100644 --- a/src/debug/di/process.cpp +++ b/src/debug/di/process.cpp @@ -9742,9 +9742,10 @@ void CordbProcess::MarshalManagedEvent(DebuggerIPCEvent * pManagedEvent) // The event still needs to be Marshaled before being used. (see code:CordbProcess::MarshalManagedEvent) // //--------------------------------------------------------------------------------------- -#ifdef _TARGET_ARM_ -// This is a temporary workaround for an ARM specific C++ compiler bug. -// It should be removed once the bug is fixed. +#if defined(_MSC_VER) && defined(_TARGET_ARM_) +// This is a temporary workaround for an ARM specific MS C++ compiler bug (internal LKG build 18.1). +// Branch < if (ptrRemoteManagedEvent == NULL) > was always taken and the function always returned false. +// TODO: It should be removed once the bug is fixed. #pragma optimize("", off) #endif bool CordbProcess::CopyManagedEventFromTarget( @@ -9793,7 +9794,7 @@ bool CordbProcess::CopyManagedEventFromTarget( return true; } -#ifdef _TARGET_ARM_ +#if defined(_MSC_VER) && defined(_TARGET_ARM_) #pragma optimize("", on) #endif From 84998bcb464781b59534215cecbe9c59f9609c66 Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Fri, 13 Feb 2015 15:48:22 -0800 Subject: [PATCH 10/22] Correct the return values for the ungetc check --- src/pal/src/configure.cmake | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pal/src/configure.cmake b/src/pal/src/configure.cmake index 2723f4cd2fbf..2c3451056970 100644 --- a/src/pal/src/configure.cmake +++ b/src/pal/src/configure.cmake @@ -879,12 +879,13 @@ set(CMAKE_REQUIRED_LIBRARIES) check_cxx_source_runs(" #include #include +#include int main(void) { char* szFileName; FILE* pFile = NULL; - int ret = 0; + int ret = 1; szFileName = tempnam(\".\", \"tmp\"); @@ -892,11 +893,11 @@ int main(void) pFile = fopen(szFileName, \"a\"); if (pFile == NULL) { - exit(1); + exit(0); } if (ungetc('A', pFile) != EOF) { - ret = 1; + ret = 0; } unlink(szFileName); exit(ret); From 8f6132cb96fff8535e4adab1494eef8cca8a27c6 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 13 Feb 2015 18:18:27 -0800 Subject: [PATCH 11/22] Fixed comments, replaced references to Evanesco with ARM --- src/vm/exceptionhandling.cpp | 6 +++--- src/vm/gcenv.cpp | 2 +- src/vm/stackwalk.cpp | 14 +++++++------- src/vm/threads.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/vm/exceptionhandling.cpp b/src/vm/exceptionhandling.cpp index 1666f5e60379..2c9d3298d6fc 100644 --- a/src/vm/exceptionhandling.cpp +++ b/src/vm/exceptionhandling.cpp @@ -189,7 +189,7 @@ StackWalkAction UpdateObjectRefInResumeContextCallback(CrawlFrame* pCF, LPVOID p // // It is possible that a managed frame may execute a PInvoke after performing a stackalloc: // - // 1) The Evanesco JIT will always inline the PInvoke in the managed frame, whether or not the frame + // 1) The ARM JIT will always inline the PInvoke in the managed frame, whether or not the frame // contains EH. As a result, the ICF will live in the same frame which performs stackalloc. // // 2) JIT64 will only inline the PInvoke in the managed frame if the frame *does not* contain EH. If it does, @@ -197,11 +197,11 @@ StackWalkAction UpdateObjectRefInResumeContextCallback(CrawlFrame* pCF, LPVOID p // from the one (ILStub) that contains the ICF. // // Thus, for the scenario where the catch handler lives in the frame that performed stackalloc, in case of - // Evanesco JIT, the SP returned by the OS will be the SP *after* the stackalloc has happened. However, + // ARM JIT, the SP returned by the OS will be the SP *after* the stackalloc has happened. However, // the stackwalker will invoke this callback with the CrawlFrameSP that was initialized at the time ICF was setup, i.e., // it will be the SP after the prolog has executed (refer to InlinedCallFrame::UpdateRegDisplay). // - // Thus, checking only the SP will not work for this scenario when using the Evanesco JIT. + // Thus, checking only the SP will not work for this scenario when using the ARM JIT. // // To address this case, the callback data also contains the frame pointer (FP) passed by the OS. This will // be the value that is saved in the "CalleeSavedFP" field of the InlinedCallFrame during ICF diff --git a/src/vm/gcenv.cpp b/src/vm/gcenv.cpp index ceba57cb592d..a342533f98f4 100644 --- a/src/vm/gcenv.cpp +++ b/src/vm/gcenv.cpp @@ -180,7 +180,7 @@ StackWalkAction GcStackCrawlCallBack(CrawlFrame* pCF, VOID* pData) bool fReportGCReferences = true; #if defined(WIN64EXCEPTIONS) - // On Win64 and ARM, we may have unwound this crawlFrame and thus, shouldn't report the invalid + // We may have unwound this crawlFrame and thus, shouldn't report the invalid // references it may contain. fReportGCReferences = pCF->ShouldCrawlframeReportGCReferences(); #endif // defined(WIN64EXCEPTIONS) diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp index 4afbeb7ee112..2fc8f047c9b2 100644 --- a/src/vm/stackwalk.cpp +++ b/src/vm/stackwalk.cpp @@ -1673,15 +1673,15 @@ StackWalkAction StackFrameIterator::Filter(void) // When enumerating GC references for "liveness" reporting, depending upon the architecture, // the reponsibility of who reports what varies: // - // 1) On x86, Evanesco (ARM) and X64 (via RyuJIT) the funclet reports all references belonging to itself and its parent method. + // 1) On x86, ARM and X64 (via RyuJIT) the funclet reports all references belonging to itself and its parent method. // // 2) X64 (via JIT64) has the reporting distributed between the funclets and the parent method. // If some reference(s) get double reported, JIT64 can handle that by playing conservative. // - // 3) On Evanesco, the reporting is done by funclets (if present). Otherwise, the primary method + // 3) On ARM, the reporting is done by funclets (if present). Otherwise, the primary method // does it. // - // On x64 and Evanesco, the GCStackCrawlCallback is invoked with a new flag indicating that + // On x64 and ARM, the GCStackCrawlCallback is invoked with a new flag indicating that // the stackwalk is being done for GC reporting purposes - this flag is GC_FUNCLET_REFERENCE_REPORTING. // The presence of this flag influences how stackwalker will enumerate frames, which frames will // result in the callback being invoked, etc. The idea is that we want to report only the @@ -1689,7 +1689,7 @@ StackWalkAction StackFrameIterator::Filter(void) // double report (even though JIT64 does it today), reporting of dead frames, and makes the // design of reference reporting more consistent (and easier to understand) across architectures. // - // NOTE: This flag is applicable only to X64 and Evanesco (ARM). + // NOTE: This flag is applicable only to X64 and ARM. // // The algorithm is as follows (at a conceptual level): // @@ -1708,7 +1708,7 @@ StackWalkAction StackFrameIterator::Filter(void) // 2) If another frame enumerated, goto (1). Otherwise, stackwalk is complete. // // Note: When a flag is passed to the callback indicating that the funclet for a parent frame has already - // reported the references, RyuJIT (Evanesco) will simply do nothing and return from the callback. + // reported the references, RyuJIT (ARM) will simply do nothing and return from the callback. // JIT64, on the other hand, will ignore the flag and perform reporting (again), like it does today. // // Note: For non-filter funcelts there is a small window during unwind where we have conceptually unwound past a @@ -2291,7 +2291,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) goto Cleanup; } #else // _TARGET_X86_ - // On WIN64 and ARM, we are done handling the skipped explicit frame at this point. So move on to the + // We are done handling the skipped explicit frame at this point. So move on to the // managed stack frame. m_crawl.isFrameless = true; m_crawl.codeInfo = m_cachedCodeInfo; @@ -2309,7 +2309,7 @@ StackWalkAction StackFrameIterator::NextRaw(void) #ifdef _TARGET_X86_ // - // x86 has the JIT generate try/finallys to leave monitors + // For non-x86 platforms, the JIT generates try/finally to leave monitors; for x86, the VM handles the monitor // #if defined(STACKWALKER_MAY_POP_FRAMES) if (m_flags & POPFRAMES) diff --git a/src/vm/threads.h b/src/vm/threads.h index 355051d84f2b..de4e7e791123 100644 --- a/src/vm/threads.h +++ b/src/vm/threads.h @@ -3544,7 +3544,7 @@ class Thread: public IUnknown #define NOTIFY_ON_INITIAL_NATIVE_CONTEXT 0x4000 // Indicates that we are enumerating GC references and should follow appropriate - // callback rules for parent methods vs funclets. Only supported on X64 and Evanesco. + // callback rules for parent methods vs funclets. Only supported on X64 and ARM. // // Refer to StackFrameIterator::Filter for detailed comments on this flag. #define GC_FUNCLET_REFERENCE_REPORTING 0x8000 From 9375d9833b128b87e98b0bf8fb6b333f04ab0331 Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Fri, 13 Feb 2015 22:01:19 -0800 Subject: [PATCH 12/22] di can be built, but still cannot be linked. --- src/debug/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/debug/CMakeLists.txt b/src/debug/CMakeLists.txt index 89e8a75564d9..15444d598693 100644 --- a/src/debug/CMakeLists.txt +++ b/src/debug/CMakeLists.txt @@ -2,9 +2,7 @@ add_subdirectory(daccess) add_subdirectory(dbgutil) add_subdirectory(ildbsymlib) add_subdirectory(ee) -if(NOT CLR_CMAKE_PLATFORM_DARWIN) - add_subdirectory(di) -endif(NOT CLR_CMAKE_PLATFORM_DARWIN) +add_subdirectory(di) if(WIN32) add_subdirectory(shim) endif(WIN32) From c71795886df0484e1ba35b8572abf6bb60ceafe6 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 13 Feb 2015 23:10:22 -0800 Subject: [PATCH 13/22] Fix x86 build break [tfs-changeset: 1415626] --- src/vm/stackwalk.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vm/stackwalk.cpp b/src/vm/stackwalk.cpp index 2fc8f047c9b2..13c41c341183 100644 --- a/src/vm/stackwalk.cpp +++ b/src/vm/stackwalk.cpp @@ -2925,9 +2925,9 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void) // Can the caller handle skipped frames; fHandleSkippedFrames = (m_flags & HANDLESKIPPEDFRAMES); -#if !defined(_TARGET_X86_) +#if defined(_TARGET_X86_) pvReferenceSP = GetRegdisplaySP(m_crawl.pRD); -#else // !_TARGET_X86_ +#else // _TARGET_X86_ // Order the Frames relative to the caller SP of the methods // this makes it so that any Frame that is in a managed call // frame will be reported before its containing method. @@ -2935,7 +2935,7 @@ BOOL StackFrameIterator::CheckForSkippedFrames(void) // This should always succeed! If it doesn't, it's a bug somewhere else! EECodeManager::EnsureCallerContextIsValid(m_crawl.pRD, m_crawl.GetStackwalkCacheEntry(), &m_cachedCodeInfo); pvReferenceSP = GetSP(m_crawl.pRD->pCallerContext); -#endif // !_TARGET_X86_ +#endif // _TARGET_X86_ if ( !( (m_crawl.pFrame != FRAME_TOP) && (dac_cast(m_crawl.pFrame) < pvReferenceSP) ) From 41d0a346072e3d762f42c76d5f076485fa270ea7 Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Sat, 14 Feb 2015 13:07:35 -0800 Subject: [PATCH 14/22] Clean up pal configure stage This commit removes a bunch of dead checks in the configure stage, as well as fixing inconsistencies in HAVE_FTRUNCATE_LENGTH_ISSUE/HAVE_FTRUNCATE_LENGTH_BUG off_t in file.cpp was declared after the goto, making it a protected scope, so it needed to be moved up. --- src/pal/src/config.h.in | 29 +------ src/pal/src/configure.cmake | 152 +--------------------------------- src/pal/src/file/file.cpp | 3 +- src/pal/src/misc/identity.cpp | 6 -- 4 files changed, 4 insertions(+), 186 deletions(-) diff --git a/src/pal/src/config.h.in b/src/pal/src/config.h.in index 5133756bdf4b..639c78027551 100644 --- a/src/pal/src/config.h.in +++ b/src/pal/src/config.h.in @@ -3,28 +3,18 @@ #define _NO_DEBUG_MESSAGES_ 0 -#cmakedefine01 HAVE_WCHAR_H #cmakedefine01 HAVE_IEEEFP_H #cmakedefine01 HAVE_ALLOCA_H -#cmakedefine01 HAVE_STDINT_H -#cmakedefine01 HAVE_NETDB_H -#cmakedefine01 HAVE_INTTYPES_H -#cmakedefine01 HAVE_STROPTS_H #cmakedefine01 HAVE_SYS_VMPARAM_H #cmakedefine01 HAVE_MACH_VM_TYPES_H #cmakedefine01 HAVE_MACH_VM_PARAM_H -#cmakedefine01 HAVE_SYS_PARAM_H -#cmakedefine01 HAVE_SYS_FILIO_H -#cmakedefine01 HAVE_SYS_SOCKIO_H #cmakedefine01 HAVE_PROCFS_H #cmakedefine01 HAVE_CRT_EXTERNS_H #cmakedefine01 HAVE_SYS_TIME_H #cmakedefine01 HAVE_PTHREAD_NP_H #cmakedefine01 HAVE_SYS_LWP_H -#cmakedefine01 HAVE_XLOCALE #cmakedefine01 HAVE_KQUEUE -#cmakedefine01 HAVE_TOLOWER #cmakedefine01 HAVE_GETPWUID_R #cmakedefine01 HAVE_PTHREAD_SUSPEND #cmakedefine01 HAVE_PTHREAD_SUSPEND_NP @@ -41,14 +31,11 @@ #cmakedefine01 HAVE_UTIMES #cmakedefine01 HAVE_SYSCTL #cmakedefine01 HAVE_SYSCONF -#cmakedefine01 HAVE_STRTOK_R #cmakedefine01 HAVE_LOCALTIME_R -#cmakedefine01 HAVE_CTIME_R #cmakedefine01 HAVE_GMTIME_R #cmakedefine01 HAVE_TIMEGM #cmakedefine01 HAVE__SNWPRINTF #cmakedefine01 HAVE_POLL -#cmakedefine01 HAVE_STATFS #cmakedefine01 HAVE_STATVFS #cmakedefine01 HAVE_THREAD_SELF #cmakedefine01 HAVE__LWP_SELF @@ -63,7 +50,6 @@ #cmakedefine01 HAVE_STAT_TIMESPEC #cmakedefine01 HAVE_STAT_NSEC -#cmakedefine01 HAVE_SOCKADDR_SA_LEN #cmakedefine01 HAVE_TM_GMTOFF #cmakedefine01 HAVE_BSD_REGS_T @@ -71,9 +57,6 @@ #cmakedefine01 HAVE_GREGSET_T #cmakedefine01 HAVE_SIGINFO_T #cmakedefine01 HAVE_UCONTEXT_T -#cmakedefine01 HAVE_IN_ADDR_T -#cmakedefine01 HAVE_SOCKLEN_T -#cmakedefine01 HAVE_SOCKADDR_EXT #cmakedefine01 HAVE_PTHREAD_RWLOCK_T #cmakedefine01 HAVE_PRWATCH_T #cmakedefine SIZEOF_OFF_T @SIZEOF_OFF_T@ @@ -94,7 +77,7 @@ #cmakedefine01 HAVE_BROKEN_FIFO_SELECT #cmakedefine01 HAVE_BROKEN_FIFO_KEVENT #cmakedefine01 HAVE_FTRUNCATE_LARGE_LENGTH_SUPPORT -#cmakedefine01 HAS_FTRUNCATE_LENGTH_BUG +#cmakedefine01 HAS_FTRUNCATE_LENGTH_ISSUE #cmakedefine01 HAVE_SCHED_GET_PRIORITY #cmakedefine01 HAVE_WORKING_GETTIMEOFDAY #cmakedefine01 HAVE_WORKING_CLOCK_GETTIME @@ -108,8 +91,6 @@ #cmakedefine01 PTHREAD_CREATE_MODIFIES_ERRNO #cmakedefine01 SEM_INIT_MODIFIES_ERRNO #cmakedefine01 HAVE_PROCFS_CTL -#cmakedefine01 SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS -#cmakedefine01 BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST #cmakedefine01 HAVE_COMPATIBLE_ACOS #cmakedefine01 HAVE_COMPATIBLE_ASIN #cmakedefine01 HAVE_COMPATIBLE_POW @@ -144,11 +125,8 @@ #cmakedefine ZH_TW_LOCALE_NAME "@ZH_TW_LOCALE_NAME@" #define CHECK_TRACE_SPECIFIERS 0 -#define CLOSE_BLOCKS_ON_OUTSTANDING_SYSCALLS 0 #define PROCFS_MEM_NAME "" #define DIRECTIO_DISABLED 0 -#define HAS_FTRUNCATE_LENGTH_ISSUE 0 -#define HAVE_CADDR_T 0 #define HAVE_GETHRTIME 0 #define HAVE_LOWERCASE_ISO_NAME 0 #define HAVE_READ_REAL_TIME 0 @@ -157,16 +135,11 @@ #define MALLOC_ZERO_RETURNS_NULL 0 #define MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP 0 #define NEED_DLCOMPAT 0 -#define NEED_STACK_PROTECTOR_IMPL 0 -#define NETDB_DEFINES_MAXHOSTNAMELEN 0 #define OPEN64_IS_USED_INSTEAD_OF_OPEN 0 #define PAL_IGNORE_NORMAL_THREAD_PRIORITY 0 #define SELF_SUSPEND_FAILS_WITH_NATIVE_SUSPENSION 0 -#define SENDTO_RETURNS_UNREACH_ON_WRONG_AF 0 #define SET_SCHEDPARAM_NEEDS_PRIVS 0 #define SIGWAIT_FAILS_WHEN_PASSED_FULL_SIGSET 0 #define SYNCHMGR_PIPE_BASED_THREAD_BLOCKING 0 -#define SYS_PARAM_DEFINES_MAXHOSTNAMELEN 0 #define WRITE_0_BYTES_HANGS_TTY 0 -#define SO_TIMEO_NOT_SUPPORTED 0 #endif diff --git a/src/pal/src/configure.cmake b/src/pal/src/configure.cmake index 2c3451056970..88113fff5c16 100644 --- a/src/pal/src/configure.cmake +++ b/src/pal/src/configure.cmake @@ -6,28 +6,18 @@ include(CheckIncludeFiles) include(CheckStructHasMember) include(CheckTypeSize) -check_include_files(wchar.h HAVE_WCHAR_H) check_include_files(ieeefp.h HAVE_IEEEFP_H) check_include_files(alloca.h HAVE_ALLOCA_H) -check_include_files(stdint.h HAVE_STDINT_H) -check_include_files(netdb.h HAVE_NETDB_H) -check_include_files(inttypes.h HAVE_INTTYPES_H) -check_include_files(stropts.h HAVE_STROPTS_H) check_include_files(sys/vmparam.h HAVE_SYS_VMPARAM_H) check_include_files(mach/vm_types.h HAVE_MACH_VM_TYPES_H) check_include_files(mach/vm_param.h HAVE_MACH_VM_PARAM_H) -check_include_files(sys/param.h HAVE_SYS_PARAM_H) -check_include_files(sys/filio.h HAVE_SYS_FILIO_H) -check_include_files(sys/sockio.h HAVE_SYS_SOCKIO_H) check_include_files(procfs.h HAVE_PROCFS_H) check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H) check_include_files(sys/time.h HAVE_SYS_TIME_H) check_include_files(pthread_np.h HAVE_PTHREAD_NP_H) check_include_files(sys/lwp.h HAVE_SYS_LWP_H) -check_include_files(xlocale.h HAVE_XLOCALE) check_function_exists(kqueue HAVE_KQUEUE) -check_function_exists(tolower HAVE_TOLOWER) check_function_exists(getpwuid_r HAVE_GETPWUID_R) check_function_exists(pthread_suspend HAVE_PTHREAD_SUSPEND) check_function_exists(pthread_suspend_np HAVE_PTHREAD_SUSPEND_NP) @@ -44,14 +34,11 @@ check_function_exists(futimes HAVE_FUTIMES) check_function_exists(utimes HAVE_UTIMES) check_function_exists(sysctl HAVE_SYSCTL) check_function_exists(sysconf HAVE_SYSCONF) -check_function_exists(strtok_r HAVE_STRTOK_R) check_function_exists(localtime_r HAVE_LOCALTIME_R) -check_function_exists(ctime_r HAVE_CTIME_R) check_function_exists(gmtime_r HAVE_GMTIME_R) check_function_exists(timegm HAVE_TIMEGM) check_function_exists(_snwprintf HAVE__SNWPRINTF) check_function_exists(poll HAVE_POLL) -check_function_exists(statfs HAVE_STATFS) check_function_exists(statvfs HAVE_STATVFS) check_function_exists(thread_self HAVE_THREAD_SELF) check_function_exists(_lwp_self HAVE__LWP_SELF) @@ -67,7 +54,6 @@ check_function_exists(ttrace HAVE_TTRACE) set(CMAKE_REQUIRED_DEFINITIONS "-D_DEFAULT_SOURCE") check_struct_has_member ("struct stat" st_atimespec "sys/types.h;sys/stat.h" HAVE_STAT_TIMESPEC) check_struct_has_member ("struct stat" st_atimensec "sys/types.h;sys/stat.h" HAVE_STAT_NSEC) -check_struct_has_member ("struct sockaddr" sa_len "sys/types.h;sys/socket.h" HAVE_SOCKADDR_SA_LEN) check_struct_has_member ("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF) check_struct_has_member ("ucontext_t" uc_mcontext.gregs[0] ucontext.h HAVE_GREGSET_T) @@ -83,13 +69,6 @@ set(CMAKE_EXTRA_INCLUDE_FILES) set(CMAKE_EXTRA_INCLUDE_FILES ucontext.h) check_type_size(ucontext_t UCONTEXT_T) set(CMAKE_EXTRA_INCLUDE_FILES) -set(CMAKE_EXTRA_INCLUDE_FILES netinet/in.h sys/types.h) -check_type_size(in_addr_t IN_ADDR_T) -set(CMAKE_EXTRA_INCLUDE_FILES) -set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) -check_type_size(socklen_t SOCKLEN_T) -check_type_size(sockaddr_ext SOCKADDR_EXT) -set(CMAKE_EXTRA_INCLUDE_FILES) set(CMAKE_EXTRA_INCLUDE_FILES pthread.h) check_type_size(pthread_rwlock_t PTHREAD_RWLOCK_T) set(CMAKE_EXTRA_INCLUDE_FILES) @@ -331,7 +310,7 @@ int main(void) } exit(has_bug ? 0 : 1); -}" HAS_FTRUNCATE_LENGTH_BUG) +}" HAS_FTRUNCATE_LENGTH_ISSUE) set(CMAKE_REQUIRED_LIBRARIES pthread) check_cxx_source_runs(" #include @@ -648,88 +627,6 @@ int main(void) { } exit(0); }" HAVE_PROCFS_CTL) -check_cxx_source_runs(" -#include -#include -#include -#include -#include -#include -#include -#include - -int main() -{ - int ret = 0; - int s; - struct sockaddr_in targetAddr; - char buff[10]; - - s = socket(AF_INET, SOCK_DGRAM, 0); - if (-1 == s) - { - exit (1); - } - - memset (&targetAddr, 0, sizeof(targetAddr)); - targetAddr.sin_family = AF_INET; - targetAddr.sin_addr.s_addr = htonl(inet_addr(\"127.0.0.1\")); - targetAddr.sin_port = htons(11000); - - ret = shutdown(s,2); - if ((ret < 0) && (errno == ENOTCONN)) - ret = 0; - else - ret = 1; - - close(s); - exit(ret); -}" SHUTDOWN_FAILS_ON_CONNECTIONLESS_SOCKETS) -check_cxx_source_runs(" -#include -#include -#include -#include -#include -#include -#include -#include - -int main() -{ - int ret = 0; - int ival = 0; - int s; - struct sockaddr_in targetAddr; - char chr; - - s = socket(AF_INET, SOCK_DGRAM, 0); - if (-1 == s) - { - exit (1); - } - - /* Make sure SO_BROADCAST it is off (it should be by default) */ - ret = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&ival, sizeof(int)); - if (-1 == ret) - { - exit (1); - } - - memset (&targetAddr, 0, sizeof(targetAddr)); - targetAddr.sin_family = AF_INET; - targetAddr.sin_addr.s_addr = htonl(inet_addr(\"255.255.255.255\")); - targetAddr.sin_port = htons(11000); - - ret = sendto(s, &chr, 1, 0, (struct sockaddr *)&targetAddr, sizeof(targetAddr)); - if ((ret < 0) && (errno == EACCES)) - ret = 1; - else - ret = 0; - - close(s); - exit(ret); -}" BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST) set(CMAKE_REQUIRED_LIBRARIES m) check_cxx_source_runs(" #include @@ -995,53 +892,6 @@ int main() return 1; }" FILE_OPS_CHECK_FERROR_OF_PREVIOUS_CALL) -check_cxx_source_runs(" -#include -#include -#include -#include -#include -#include -#include -#include - -int main() -{ - int ret = 0; - int ival = 0; - int s; - struct sockaddr_in targetAddr; - char chr; - - s = socket(AF_INET, SOCK_DGRAM, 0); - if (-1 == s) - { - exit (1); - } - - /* Make sure SO_BROADCAST it is off (it should be by default) */ - ret = setsockopt(s, SOL_SOCKET, SO_BROADCAST, (char *)&ival, sizeof(int)); - if (-1 == ret) - { - exit (1); - } - - memset (&targetAddr, 0, sizeof(targetAddr)); - targetAddr.sin_family = AF_INET; - targetAddr.sin_addr.s_addr = htonl(inet_addr(\"255.255.255.255\")); - targetAddr.sin_port = htons(11000); - - ret = sendto(s, &chr, 1, 0, (struct sockaddr *)&targetAddr, sizeof(targetAddr)); - if ((ret < 0) && (errno == EACCES)) - ret = 1; - else - ret = 0; - - close(s); - exit(ret); -}" BROADCAST_ALLOWED_WITHOUT_SO_BROADCAST) - - if(CMAKE_SYSTEM_NAME STREQUAL Darwin) set(HAVE_COREFOUNDATION 1) diff --git a/src/pal/src/file/file.cpp b/src/pal/src/file/file.cpp index 93aa1415e9f1..c6ce2f25171f 100644 --- a/src/pal/src/file/file.cpp +++ b/src/pal/src/file/file.cpp @@ -2505,6 +2505,7 @@ CorUnix::InternalSetEndOfFile( // extend the file to consume the remainder of free space. // struct statfs sFileSystemStats; + off_t cbFreeSpace; if (fstatfs(pLocalData->unix_fd, &sFileSystemStats) != 0) { ERROR("fstatfs failed\n"); @@ -2513,7 +2514,7 @@ CorUnix::InternalSetEndOfFile( } // Free space is free blocks times the size of each block in bytes. - off_t cbFreeSpace = (off_t)sFileSystemStats.f_bavail * (off_t)sFileSystemStats.f_bsize; + cbFreeSpace = (off_t)sFileSystemStats.f_bavail * (off_t)sFileSystemStats.f_bsize; if (curr > cbFreeSpace) { diff --git a/src/pal/src/misc/identity.cpp b/src/pal/src/misc/identity.cpp index 74f18300507a..245484a7e710 100644 --- a/src/pal/src/misc/identity.cpp +++ b/src/pal/src/misc/identity.cpp @@ -32,12 +32,6 @@ Implementation of GetComputerNameW and GetUserNameW functions. #include #include -#if HAVE_NETDB_H && NETDB_DEFINES_MAXHOSTNAMELEN -#include -#elif HAVE_SYS_PARAM_H && SYS_PARAM_DEFINES_MAXHOSTNAMELEN -#include -#endif - #if HAVE_SYSCONF && defined(_SC_GETPW_R_SIZE_MAX) #include // for INT_MAX #endif From 8ce843a247a3034700ba010dd184b4bee2d08c0a Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Sat, 14 Feb 2015 13:10:15 -0800 Subject: [PATCH 15/22] Remove solaris support --- src/pal/src/config.h.in | 3 --- src/pal/src/file/file.cpp | 23 ----------------------- src/pal/src/thread/process.cpp | 9 ++------- src/pal/src/thread/thread.cpp | 4 ++-- src/pal/src/thread/threadsusp.cpp | 6 ------ 5 files changed, 4 insertions(+), 41 deletions(-) diff --git a/src/pal/src/config.h.in b/src/pal/src/config.h.in index 639c78027551..57af6b55c950 100644 --- a/src/pal/src/config.h.in +++ b/src/pal/src/config.h.in @@ -43,7 +43,6 @@ #cmakedefine01 HAVE_MACH_EXCEPTIONS #cmakedefine01 HAVE_VM_ALLOCATE #cmakedefine01 HAVE_VM_READ -#cmakedefine01 HAVE_DIRECTIO #cmakedefine01 HAS_SYSV_SEMAPHORES #cmakedefine01 HAS_PTHREAD_MUTEXES #cmakedefine01 HAVE_TTRACE @@ -126,11 +125,9 @@ #define CHECK_TRACE_SPECIFIERS 0 #define PROCFS_MEM_NAME "" -#define DIRECTIO_DISABLED 0 #define HAVE_GETHRTIME 0 #define HAVE_LOWERCASE_ISO_NAME 0 #define HAVE_READ_REAL_TIME 0 -#define HAVE_SOLARIS_THREADS 0 #define HAVE_UNDERSCORE_ISO_NAME 0 #define MALLOC_ZERO_RETURNS_NULL 0 #define MKSTEMP64_IS_USED_INSTEAD_OF_MKSTEMP 0 diff --git a/src/pal/src/file/file.cpp b/src/pal/src/file/file.cpp index c6ce2f25171f..3327a56bc091 100644 --- a/src/pal/src/file/file.cpp +++ b/src/pal/src/file/file.cpp @@ -743,29 +743,6 @@ CorUnix::InternalCreateFile( palError = ERROR_INTERNAL_ERROR; goto done; } -#elif HAVE_DIRECTIO -#if !DIRECTIO_DISABLED - /* Use of directio is currently disabled on Solaris because - this feature doesn't seem to be stable enough on this platform: - - directio works on ufs and nfs file systems, but it fails on tmpfs; - - on nfs it is not possible to mmap a file if direct I/O is enabled on it; - - directio is a per-file persistent suggestion and there is no a real way - to probe it, other than turning it on or off; - - the performance impact of blindly turning off directio for each mmap - is roughly 15%; - - directio is documented on recent official docs (April 2003) to cause data - corruption, system hangs, or panics when used concurrently with mmap - on clusters. - As result on Solaris we currently ignore FILE_FLAG_NO_BUFFERING - */ - if (directio(filed, DIRECTIO_ON) == -1) - { - ASSERT("Can't set DIRECTIO_ON; directio() failed. errno is %d (%s)\n", - errno, strerror(errno)); - palError = ERROR_INTERNAL_ERROR; - goto done; - } -#endif // !DIRECTIO_DISABLED #else #error Insufficient support for uncached I/O on this platform #endif diff --git a/src/pal/src/thread/process.cpp b/src/pal/src/thread/process.cpp index 6a2ee9ad8cee..12899c01597d 100644 --- a/src/pal/src/thread/process.cpp +++ b/src/pal/src/thread/process.cpp @@ -857,12 +857,7 @@ CorUnix::InternalCreateProcess( /* fork the new process */ -#if HAVE_SOLARIS_THREADS - /* On Solaris, we use fork1 so that only the calling thread (LWP) is duplicated */ - processId = fork1(); -#else processId = fork(); -#endif if (processId == -1) { @@ -1558,14 +1553,14 @@ PAL_GetCPUBusyTime( if (nCurrentTime > nLastRecordedCurrentTime) { nCpuTotalTime = (nCurrentTime - nLastRecordedCurrentTime); -#if HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ +#if HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ // For systems that run multiple threads of a process on multiple processors, // the accumulated userTime and kernelTime of this process may exceed // the elapsed time. In this case, the cpuTotalTime needs to be adjusted // according to number of processors so that the cpu utilization // will not be greater than 100. nCpuTotalTime *= dwNumberOfProcessors; -#endif // HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ +#endif // HAVE_THREAD_SELF || HAVE__LWP_SELF || HAVE_VM_READ } if (nUserTime >= nLastRecordedUserTime && diff --git a/src/pal/src/thread/thread.cpp b/src/pal/src/thread/thread.cpp index 0da49e3f2330..50776e5ad374 100644 --- a/src/pal/src/thread/thread.cpp +++ b/src/pal/src/thread/thread.cpp @@ -650,11 +650,11 @@ CorUnix::InternalCreateThread( TRACE("using the system default thread stack size of %d\n", pthreadStackSize); } -#if HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF +#if HAVE_THREAD_SELF || HAVE__LWP_SELF /* Create new threads as "bound", so each pthread is permanently bound to an LWP. Get/SetThreadContext() depend on this 1:1 mapping. */ pthread_attr_setscope(&pthreadAttr, PTHREAD_SCOPE_SYSTEM); -#endif // HAVE_SOLARIS_THREADS || HAVE_THREAD_SELF || HAVE__LWP_SELF +#endif // HAVE_THREAD_SELF || HAVE__LWP_SELF // // We never call pthread_join, so create the new thread as detached diff --git a/src/pal/src/thread/threadsusp.cpp b/src/pal/src/thread/threadsusp.cpp index 4b356efcdd16..a7ec0194ba23 100644 --- a/src/pal/src/thread/threadsusp.cpp +++ b/src/pal/src/thread/threadsusp.cpp @@ -35,8 +35,6 @@ Revision History: #if HAVE_PTHREAD_NP_H #include #endif -#elif HAVE_SOLARIS_THREADS -#include #elif HAVE_MACH_THREADS #include #include "sys/types.h" @@ -1766,8 +1764,6 @@ CThreadSuspensionInfo::THREADHandleSuspendNative(CPalThread *pthrTarget) #if HAVE_PTHREAD_SUSPEND dwPthreadRet = pthread_suspend((pthread_t)pthrTarget->GetThreadId()); -#elif HAVE_SOLARIS_THREADS - dwPthreadRet = thr_suspend((thread_t)pthrTarget->GetThreadId()); #elif HAVE_MACH_THREADS dwPthreadRet = thread_suspend(pthread_mach_thread_np((pthread_t)pthrTarget->GetThreadId())); #elif HAVE_PTHREAD_SUSPEND_NP @@ -1844,8 +1840,6 @@ CThreadSuspensionInfo::THREADHandleResumeNative(CPalThread *pthrTarget) { #if HAVE_PTHREAD_CONTINUE dwPthreadRet = pthread_continue((pthread_t)pthrTarget->GetThreadId()); -#elif HAVE_SOLARIS_THREADS - dwPthreadRet = thr_continue((thread_t)pthrTarget->GetThreadId()); #elif HAVE_MACH_THREADS dwPthreadRet = thread_resume(pthread_mach_thread_np((pthread_t)pthrTarget->GetThreadId())); #elif HAVE_PTHREAD_CONTINUE_NP From b95f46a6fbd62856aa7106bc1664ba4d063f08b5 Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Sat, 14 Feb 2015 13:12:03 -0800 Subject: [PATCH 16/22] Remove PowerPC --- src/pal/src/exception/seh-unwind.cpp | 60 ++++------------------------ src/pal/src/init/pal.cpp | 16 -------- 2 files changed, 7 insertions(+), 69 deletions(-) diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp index c6baa16ad839..5cab008220dd 100644 --- a/src/pal/src/exception/seh-unwind.cpp +++ b/src/pal/src/exception/seh-unwind.cpp @@ -73,19 +73,7 @@ struct __cxa_exception static void UnwindContextToWinContext(_Unwind_Context *fromContext, CONTEXT *toContext) { -#if defined(_PPC_) - // TODO: what about FPR14-FPR31, V20-V31, VRSAVE, CR2-CR4? - // Technically, these are all callee-saved, but the DWARF unwind info - // does not seem to track them. - toContext->Gpr1 = (ULONG) _Unwind_GetCFA(fromContext); - toContext->Gpr11 = (ULONG) _Unwind_GetGR(fromContext, 0x46); - for (int i = 13; i <= 31; i++) - { - (&toContext->Gpr0)[i] = (ULONG) _Unwind_GetGR(fromContext, i); - } - toContext->Lr = (ULONG) _Unwind_GetGR(fromContext, 0x41); - toContext->Iar = (ULONG) _Unwind_GetIP(fromContext); -#elif defined(_X86_) +#if defined(_X86_) toContext->Ebx = (ULONG) _Unwind_GetGR(fromContext, 3); toContext->Ebp = (ULONG) _Unwind_GetGR(fromContext, 4); toContext->Esp = (ULONG) _Unwind_GetCFA(fromContext); @@ -161,9 +149,7 @@ static BOOL VirtualUnwind(CONTEXT *context, int nFramesToUnwind) { VirtualUnwindParam param; param.nFramesToUnwind = nFramesToUnwind; -#if defined(_PPC_) - param.cfa = (void *) context->Gpr1; -#elif defined(_X86_) +#if defined(_X86_) param.cfa = (void *) context->Esp; #elif defined(_AMD64_) param.cfa = (void *) context->Rsp; @@ -194,15 +180,6 @@ void DisplayContext(_Unwind_Context *context) fprintf(stderr, " cfa=0x%p", _Unwind_GetCFA(context)); #if defined(_X86_) // TODO: display more registers -#elif defined(_PPC_) - fprintf(stderr, " ra =0x%p", _Unwind_GetGR(context, 0x41)); - fprintf(stderr, " r11=0x%p\n", _Unwind_GetGR(context, 0x46)); - for (int i = 13; i < 32; i++) - { - fprintf(stderr, " r%02d=0x%p", i, _Unwind_GetGR(context, i)); - if ((i - 13) % 4 == 3) - fprintf(stderr, "\n"); - } #endif fprintf(stderr, "\n"); } @@ -491,9 +468,7 @@ static void RtlpRaiseException(EXCEPTION_RECORD *ExceptionRecord) // The frame we're looking at now is either RaiseException or PAL_TryExcept. // If it's RaiseException, we have to unwind one level further to get the // actual context user code could be resumed at. -#if defined(_PPC_) - void *pc = (void *) ContextRecord.Iar; -#elif defined(_X86_) +#if defined(_X86_) void *pc = (void *) ContextRecord.Eip; #elif defined(_AMD64_) void *pc = (void *) ContextRecord.Rip; @@ -503,9 +478,7 @@ static void RtlpRaiseException(EXCEPTION_RECORD *ExceptionRecord) if ((SIZE_T) pc - (SIZE_T) RaiseException < (SIZE_T) pc - (SIZE_T) PAL_TryExcept) { VirtualUnwind(&ContextRecord, 1); -#if defined(_PPC_) - pc = (void *) ContextRecord.Iar; -#elif defined(_X86_) +#if defined(_X86_) pc = (void *) ContextRecord.Eip; #elif defined(_AMD64_) pc = (void *) ContextRecord.Rip; @@ -833,10 +806,7 @@ _Unwind_Reason_Code PAL_SEHPersonalityRoutine( // Obtain the filter and parameter from the original frame. PFN_PAL_EXCEPTION_FILTER pfnFilter; void *pvParam; -#if defined(_PPC_) - pfnFilter = (PFN_PAL_EXCEPTION_FILTER) _Unwind_GetGR(context, 28); - pvParam = _Unwind_GetGR(context, 29); -#elif defined(_X86_) +#if defined(_X86_) pfnFilter = ((PFN_PAL_EXCEPTION_FILTER *) _Unwind_GetGR(context, 4))[3]; // [ebp+12] pvParam = ((void **) _Unwind_GetGR(context, 4))[4]; // [ebp+16] #elif defined(_AMD64_) @@ -915,10 +885,7 @@ _Unwind_Reason_Code PAL_SEHPersonalityRoutine( // platform, wich unwinds the stack also to run destructors for // objects allocated on the stack. By behaving in the same way, // we can deal with C++ exceptions colliding with SEH unwinds. -#if defined(_PPC_) - _Unwind_SetGR(context, 3, (void *) actions); - _Unwind_SetGR(context, 4, exceptionObject); -#elif defined(_X86_) +#if defined(_X86_) void **args = (void **) _Unwind_GetCFA(context); args[0] = (void *) actions; args[1] = exceptionObject; @@ -1051,9 +1018,7 @@ _Unwind_Reason_Code PAL_SEHFilterPersonalityRoutine( // Retrieve the dispatcher context of the outer _Unwind_RaiseException. PAL_DISPATCHER_CONTEXT *outerDispatcherContext; -#if defined(_PPC_) - outerDispatcherContext = (PAL_DISPATCHER_CONTEXT *) _Unwind_GetGR(context, 29); -#elif defined(_X86_) +#if defined(_X86_) outerDispatcherContext = (PAL_DISPATCHER_CONTEXT *) ((void **) _Unwind_GetGR(context, 4))[3]; // [ebp+12] #elif defined(_AMD64_) // Filter address is stored at RSP+8 @@ -1102,14 +1067,3 @@ _Unwind_Reason_Code PAL_SEHFilterPersonalityRoutine( return _URC_CONTINUE_UNWIND; } } - -#ifdef _PPC_ -// This function does not do anything. It ist just here to be called by -// PAL_TRY, so we can avoid the body of PAL_TRY being translated by the -// compiler into a leaf function (i.e., one that does not set up its -// own frame), because on a hardware fault in a leaf function, we would -// get a stack that would not be unwindable. -EXTERN_C VOID PALAPI PAL_DummyCall() -{ -} -#endif // _PPC_ diff --git a/src/pal/src/init/pal.cpp b/src/pal/src/init/pal.cpp index 80086df92f46..511848003cc4 100644 --- a/src/pal/src/init/pal.cpp +++ b/src/pal/src/init/pal.cpp @@ -193,22 +193,6 @@ PAL_Initialize( fFirstTimeInit = true; -#if defined(__ppc__) - { - int mib[2]; - size_t len; - - /* Determine the processor's cache line size, for - FlushInstructionCache */ - mib[0] = CTL_HW; - mib[1] = HW_CACHELINE; - len = sizeof(CacheLineSize); - if (sysctl(mib, 2, &CacheLineSize, &len, NULL, 0) == -1) { - goto done; - } - } -#endif //__ppc__ - // Initialize the TLS lookaside cache if (FALSE == TLSInitialize()) { From 25b3e7fbba611a03f0cc998ff8dc48fd12252a98 Mon Sep 17 00:00:00 2001 From: Rich Lander Date: Sat, 14 Feb 2015 21:46:48 -0800 Subject: [PATCH 17/22] Add authors to code guide --- Documentation/clr-code-guide.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Documentation/clr-code-guide.md b/Documentation/clr-code-guide.md index 1684bea33a08..589b93a65c40 100644 --- a/Documentation/clr-code-guide.md +++ b/Documentation/clr-code-guide.md @@ -1,5 +1,12 @@ -What Every CLR Developer Must Know Before Writing Code -=== +What Every CLR Developer Must Know Before Writing Code +=== + +Written in 2006, by: + +- Rick Byers ([@RByers](https://github.com/RByers)) +- Jan Kotas ([@jkotas](https://github.com/jkotas)) +- Mike Stall ([@mikestall](https://github.com/mikestall)) +- Rudi Martin ([@Rudi-Martin](https://github.com/Rudi-Martin)) # Why you must read this document From 86f9501147fafe2808e062e35a894425b6b4e236 Mon Sep 17 00:00:00 2001 From: Jonathon Rossi Date: Mon, 16 Feb 2015 15:17:17 +1000 Subject: [PATCH 18/22] Fixed syntax error in example code in mscorlib.md --- Documentation/mscorlib.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/mscorlib.md b/Documentation/mscorlib.md index c3e72de0970b..23c0853b4981 100644 --- a/Documentation/mscorlib.md +++ b/Documentation/mscorlib.md @@ -85,7 +85,7 @@ Do not replicate the comments into your actual QCall implementation. This is for // All QCalls should have the following DllImport and // SuppressUnmanagedCodeSecurity attributes [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)] - SuppressUnmanagedCodeSecurity] + [SuppressUnmanagedCodeSecurity] // QCalls should always be static extern. private static extern bool Bar(int flags, string inString, StringHandleOnStack retString); From c07d6ce97e08c44f3d4422dedcc8bcacfe78730e Mon Sep 17 00:00:00 2001 From: dotnet-bot Date: Sun, 15 Feb 2015 22:14:13 -0800 Subject: [PATCH 19/22] Add type loader doc --- .../images/type-system-dependencies.png | Bin 0 -> 28616 bytes Documentation/images/typeloader-fig1.png | Bin 0 -> 16940 bytes Documentation/images/typeloader-fig2.png | Bin 0 -> 7093 bytes Documentation/images/typeloader-fig3.png | Bin 0 -> 15030 bytes Documentation/images/typeloader-fig4.png | Bin 0 -> 17294 bytes Documentation/index.md | 1 + Documentation/type-loader.md | 317 ++++++++++++++++++ 7 files changed, 318 insertions(+) create mode 100644 Documentation/images/type-system-dependencies.png create mode 100644 Documentation/images/typeloader-fig1.png create mode 100644 Documentation/images/typeloader-fig2.png create mode 100644 Documentation/images/typeloader-fig3.png create mode 100644 Documentation/images/typeloader-fig4.png create mode 100644 Documentation/type-loader.md diff --git a/Documentation/images/type-system-dependencies.png b/Documentation/images/type-system-dependencies.png new file mode 100644 index 0000000000000000000000000000000000000000..b0cea6038e3f021d1c96b5587ab21113282c1e2e GIT binary patch literal 28616 zcmW)nbyU-D8^$-fq`SKrqeHs8QJPWGNQczuZe)OTiZs$lBS?2iry~Uf35j>V_m7>k z@7d12vFEv-`~FdZUH|~@;D0aR$otQ>0Kj{5RRviCe~YtxM;O&e zK*_vFEfCUKew-TdSCwap8VW;d2Z`{s;%RRU)0(Qef|}yH_-Oc5E3wHL|ML9%<%1t%_VGuqw>nx?g}u)=^**lR!tV@TfhAc3K79DlGH`RU?D|sw z@=&i11JTgXc-;PMaTZRtVVQ@xtYGP=m{%KE9Z0|Ykv`*g!5KD<%pbY@bg<#fI>yl1 zK7s^V5L`0!w^IFzqa#^TfX0#qnQuP_1ESG$(Rte5Z@n3Qxukp1^>LJ!7nFW^^fLbx zj@oiL&fB|f=rg$WlB~Yig5*tay=}|J#%8wbF7kep`I+4uRBe$l3#r~A>4peO2mp23 zu9dboNN0ZWhTf}-5viiC*E*BHQ^!OrTH5yB>X{91?6h?8eIBHp6^v%F=YRG$!-Zs7 zXnEmPh`1GgsYAVXltL!GXrQ;Qkdu0cqh^YWhsUvoJa~8QZlDrXUKsK)s)qR>SQ%#A z_U}XijFYD*Y%UWjw8xZLzKJr?XKkdXw5R8$#iUWD7th9c?Zz=%L(|D5F9_{~P>MFj zS!G}tFLP=X3}0S)+=KaN2#HlKA>1*}$}m|~O~A)NVbDq4xUy^b_O?pQk*RQ=M2Iz%x?%X!uMgEz!O4MshCrSxRC$xB< zGb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q1Rv>@W5|4}>kL9xGEM30XzA6Zx zRsxxSu1hvoVRYBeD{Y{V`9$`GVUuBe^!7t(Qqj+~A8FA)&3N>| zDkt1WR9s4GJ-8(;1Gvz9++!aFCM5A1e92f`D&NN2R2SN@Ach}fZzx00+h8% z3>Jao%y9}4E|vC4m40xA)dNlFiT_N!ulO4-55Yn09rbO$-8|!*!$N|FlfB6YZ_9T$ z$}5GEn@g+rf;IAvVs|r?evDkNT!;Ubz5tGsS?~D5V2VEuK(YpF%2Sz|nD7D_i_Lc{ z$J0OGzkhFUZ+Gz9q0MjsYqlNq=#Kvs%3F9oIB~%Ym@oVO;~$a0?#t|{1e;=1l?w9A zQXN6{{8^Lh=jY5uuPfVT)e^-l)EceUTpx_QZ}2%RNgo&)VQtDb8W$bPBc z$Up6Sdob{RclM5U0=_Pb6$#zx=A*ut2~fmZk*(yuo>__qCCV1~#j)ar0>}Q$*)2GZ z^utgER#x~sk-ij32;D$Ac2WP+KaGuzMSi=S8U4#FFei?!l2JEv=^e7XExpQW_0q{2 zq^qN^gIITac7ukgCqTILU(fog$@0zh7Y`2(L{1jL$--QkmEuaBoU7ekaneWVFqqN6 z5k8~;A1C!g3%Y_z2Jfg7u=oint9GHNDzJEdU2ll40iD1Noc;!~&@WwmeVc~7c@|ip z4Ja#6T0CQI@oG0Lsz-0(kH|4ad#ngC($f#OV!r@e3{VlidiBHIY#-W!qQh6hGag96 zMj$at1#besnBjRa;=nWGy@7I{_0`>tY&e;0I6*6&{&qNR&DaC6vtv@4X)rl>Gf4W+ zi~AA4dAh&jC*cFMx?De*Av(Rzk??I}z_aTW=wc z#YFcn=rf>xJ2^lEe}V$?zPtavdlAd_VDf1hKPfG7d(g@i6I)u~zz}fa1pJo>z>FXe l(9(bZ?+E|5YuPfVjH2>|MT}{T5#U*f!eiA(g|a5E{||>RSquOG literal 0 HcmV?d00001 diff --git a/Documentation/images/typeloader-fig2.png b/Documentation/images/typeloader-fig2.png new file mode 100644 index 0000000000000000000000000000000000000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d00001 diff --git a/Documentation/images/typeloader-fig4.png b/Documentation/images/typeloader-fig4.png new file mode 100644 index 0000000000000000000000000000000000000000..3bdbce28f0d98ab0a2c299fd8efb5a83f8591264 GIT binary patch literal 17294 zcmc({cUV(d*FKCg4wez@iUv?o88Lto5hBfwfCLeN(4|I@8VDU?2bD5{1knH@BGOCf zRi#7-B=pb%Y6t;hqI5$2b^^}K^E~sG-&d~h4=)cpXYaH3I{U1(?t9(mJi3a|*t~J? zMgakV&6<}lToVvjI|KgRTE7;wuu6`#ga0fH4=6T z2)sXme!Bt8gtSIL;07EVK!pSZZZp6^4g~y)1_wytKYy32k5FIo`BmWkfr%pQe38mS z#+5)efslY*GM-%{Af&bMxK_N(>joSQ@*a&827}&aa2s;XFiHRs}@^lY-xbqvb3suSk=FMI;9K*TDiE=vU11 zerF&GYmvf}0hdKWk}e65?!=3XtZ{E&e*@k;aX@u{_}(>8p>rEX4)6{%N-wYbZ%*@5 zdm~h%CwZH3h7vq^TgmYkaH%a?mqqxawO(9p%z+GZ{}A7z5hj2WRF!BI{91f$X@RM} zJjcq86b09MwEUGQfn8`zSURNYIdNX9bv9TcXm*@Idc(SG52v8ttVNs@x~oZjDqhO9 zGDaMk;J0Ic;5_{O{ioxY^C#ASz2{ZjLrG9)I?Bn)S}diHaFuQio1t9WBu{I*xOqx! zZEsR0#d?YrAjs-Z82Rdy@BI~~Mrq=vnMWSb56h&q+dh0CUxUt3$F-G^y;K9uEs=Rw z+yet?oxu|m6C@JJ1tI%i~OeOMS%0v)`%{@QlXG8%Vwv zNo$U5p!)74m6VljN{O`$WjN`LVVCCz5}f3hzldOw&l^p@#p*6WE(l}iCP$W*f@moL z3$tVF-lD0qW2onp*4n z*9#+6B_*keakEj3J$Z47%GS~4*yW{^gdmgt_23ee?~@N%o}%LC2rggDq)6}^qz$dk z^yT_tL-7mt`L(i3p;D;v)cFh~7J2;zIwQr=E;8G`%*B##Ep`* zy$bmo#3{jEy!(S^J!9jrGDIL z<)HGOX_gO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Ez(pc%>B*BPF;$H({%-Y` zAbMWLtYoO7w8LK}@+OVvCYHz0Q*?##sPe7=bEeuc*Rmy!-?Xp8f_3F2^`rTivs|xb zl>z(WBvs+!Ozo}QY11O0-jUe9&$eD@gzJCpPhtUB^m{+L=fyq|w2?f?GJ2}KMA!65 zFVO(vkz07udj{&{y`}8snx>c~6V0p~TxfKA-JmYQU^z^=n6}$h8|!R4;|>_C-W_bQ zT~iCH8KKt#Df;GxED{i!c{{<4d+NT-x$MExtkVbjp*dylH*iBA zbOZ>G;`a1y7N+asmY`1z44B?-)TXz6%+`dcZH@&n<>Hbx1GgIP-boYQ_GEQzAhB@L zd&(tfPgU5xE7sR>oRBC(WNQ@yB(0D_%?eWXgqQSqT{`D&uj8-gHselnyE#8X z9|6+kY=HX*Cio;Gc<+m53SLMD!0bNQb!YfwVu%{=9rd40zk{u=KM6Jk@Ld7`I{x?7 zg#XAr!}iaCI_xS+joE7KGtLD|7 z<9lS@;R@TyLzw(Pu?EDRm8^|dw*3>F>do*x`y!@|5pJ$L_ z73EJ`};LoUeQ>;-5bx!T+7t6_jTG)_*X2${V~9gr}I9nGM3m z_9v87RAknE&Anu^@&yPmD6rh$dw_B&u*T1e{pW~y=(33F3B#zuYHkTQQ$X_~;zHKB H8+ZRNUBah8 literal 0 HcmV?d00001 diff --git a/Documentation/index.md b/Documentation/index.md index 8b9ecc909096..107a771e07a4 100644 --- a/Documentation/index.md +++ b/Documentation/index.md @@ -7,6 +7,7 @@ This repo includes several documents that explain both high-level and low-level - [Introduction to the Common Language Runtime](intro-to-clr.md) - [Mscorlib and Calling Into the Runtime](mscorlib.md) +- [Type Loader](type-loader.md) - [Stack Walking](stackwalking.md) - [Book of the Runtime FAQ](botr-faq.md) diff --git a/Documentation/type-loader.md b/Documentation/type-loader.md new file mode 100644 index 000000000000..9b108975fd34 --- /dev/null +++ b/Documentation/type-loader.md @@ -0,0 +1,317 @@ +Type Loader Design +=== + +Author: Ladi Prosek - 2007 + +# Introduction + +In a class-based object oriented system, types are templates +describing the data that individual instances will contain, and the +functionality that they will provide. It is not possible to create an +object without first defining its type1. Two objects are said to +be of the same type if they are instances of the same type. The fact +that they define the exact same set of members does not make them +related in any way. + +The previous paragraph could as well describe a typical C++ +system. One additional feature essential to CLR is the availability of +full runtime type information. In order to "manage" the managed code +and provide type safe environment, the runtime must know the type of +any object at any time. Such a type information must be readily +available without extensive computation because the type identity +queries are expected to be rather frequent (e.g. any type-cast +involves querying the type identity of the object to verify that the +cast is safe and can be done). + +This performance requirement rules out any dictionary look up +approaches and leaves us with the following high-level architecture. + +![Figure 1](images/typeloader-fig1.png) + +Figure 1 The abstract high-level object design + +Apart from the actual instance data, each object contains a type id +which is simply a pointer to the structure that represents the +type. This concept is similar to C++ v-table pointers, but the +structure, which we call TYPE now and will define it more precisely +later, contains more than just a v-table. For instance, it has to +contain information about the hierarchy so that "is-a" subsumption +questions can be answered. + +1 The C# 3.0 feature called "anonymous types" lets you define an +object without explicit reference to a type - simply by directly +listing its fields. Don't let this fool you, there is in fact a type +created behind the scenes for you by the compiler. + +## 1.1 Related Reading + +[1] Martin Abadi, Luca Cardelli, A Theory of Objects, ISBN +978-0387947754 + +[2] Andrew Kennedy ([@andrewjkennedy](https://github.com/andrewjkennedy)), Don Syme ([@dsyme](https://github.com/dsyme)), [Design and Implementation of Generics +for the .NET Common Language +Runtime][generics-design] + +[generics-design]: http://research.microsoft.com/apps/pubs/default.aspx?id=64031 + +[3] [ECMA Standard for the Common Language Infrastructure (CLI)](http://www.ecma-international.org/publications/standards/Ecma-335.htm) + +## 1.2 Design Goals + +The ultimate purpose of the type loader (sometimes referred to as the +class loader, which is strictly speaking not correct, because classes +constitute just a subset of types - namely reference types - and the +loader loads value types as well) is to build data structures +representing the type which it is asked to load. These are the +properties that the loader should have: + +- Fast type lookup ([module, token] => handle and [assembly, name] => handle). +- Optimized memory layout to achieve good working set size, cache hit rate, and JITted code performance. +- Type safety - malformed types are not loaded and a TypeLoadException is thrown. +- Concurrency - scales well in multi-threaded environments. + +# 2 Type Loader Architecture + +There is a relatively small number of entry-points to the loader. Although the signature of each individual entry-point is slightly different, they all have the similar semantics. They take a type/member designation in the form of a metadata **token** or a **name** string, a scope for the token (a **module** or an **assembly** ), and some additional information like flags. They return the loaded entity in the form of a **handle**. + +There are usually many calls to the type loader during JITting. Consider: + + object CreateClass() + { + return new MyClass(); + } + +In the IL, MyClass is referred to using a metadata token. In order to generate a call to the **JIT\_New** helper which takes care of the actual instantiation, the JIT will ask the type loader to load the type and return a handle to it. This handle will be then directly embedded in the JITted code as an immediate value. The fact that types and members are usually resolved and loaded at JIT time and not at run-time also explains the sometimes confusing behavior easily hit with code like this: + + object CreateClass() + { + try { + return new MyClass(); + } catch (TypeLoadException) { + return null; + } + } + +If **MyClass** fails to load, for example because it's supposed to be defined in another assembly and it was accidentally removed in the newest build, then this code will still throw **TypeLoadException**. The reason that the catch block did not catch it is that it never ran! The exception occurred during JITting and would only be catchable in the method that called **CreateClass** and caused it to be JITted. In addition, it may not be always obvious at which point the JITting is triggered due to inlining, so users should not expect and rely on deterministic behavior. + +## Key Data Structures + +The most universal type designation in the CLR is the **TypeHandle**. It's an abstract entity which encapsulates a pointer to either a **MethodTable** (representing "ordinary" types like **System.Object** or **List** ) or a **TypeDesc** (representing byrefs, pointers, function pointers, arrays, and generic variables). It constitutes the identity of a type in that two handles are equal if and only if they represent the same type. To save space, the fact that a **TypeHandle** contains a **TypeDesc** is indicated by setting the second lowest bit of the pointer to 1 (i.e. (ptr | 2)) instead of using additional flags2. **TypeDesc** is "abstract" and has the following inheritance hierarchy. + +![Figure 2](images/typeloader-fig2.png) + +Figure 2 The TypeDesc hierarchy + +**TypeDesc** + +Abstract type descriptor. The concrete descriptor type is determined by flags. + +**TypeVarTypeDesc** + +Represents a type variable, i.e. the **T** in **List** or in **Array.Sort** (see the part about generics below). Type variables are never shared between multiple types or methods so each variable has its one and only owner. + +**FnPtrTypeDesc** + +Represents a function pointer, essentially a variable-length list of type handles referring to the return type and parameters. It's not that common to see this descriptor because function pointers are not supported by C#. However, managed C++ uses them. + +**ParamTypeDesc** + +This descriptor represents a byref and pointer types. Byrefs are the results of the **ref** and **out** C# keywords applied to method parameters3 whereas pointer types are unmanaged pointers to data used in unsafe C# and managed C++. + +**ArrayTypeDesc** + +Represents array types. It is derived from **ParamTypeDesc** because arrays are also parameterized by a single parameter (the type of their element). This is opposed to generic instantiations whose number of parameters is variable. + +**MethodTable** + +This is by far the central data structure of the runtime. It represents any type which does not fall into one of the categories above (this includes primitive types, and generic types, both "open" and "closed"). It contains everything about the type that needs to be looked up quickly, such as its parent type, implemented interfaces, and the v-table. + +**EEClass** + +**MethodTable** data are split into "hot" and "cold" structures to improve working set and cache utilization. **MethodTable** itself is meant to only store "hot" data that are needed in program steady state. **EEClass** stores "cold" data that are typically only needed by type loading, JITing or reflection. Each **MethodTable** points to one **EEClass**. + +Moreover, **EEClasse**s are shared by generic types. Multiple generic type **MethodTable**s can point to single **EEClass**. This sharing adds additional constrains on data that can be stored on **EEClass**. + +**MethodDesc** + +It is no surprise that this structure describes a method. It actually comes in a few flavors which have their corresponding **MethodDesc** subtypes but most of them really are out of the scope of this document. Suffice it to say that there is one subtype called **InstantiatedMethodDesc** which plays an important role for generics. For more information please see [**Method Descriptor Design**](method-descriptor.md). + +**FieldDesc** + +Analogous to **MethodDesc** , this structure describes a field. Except for certain COM interop scenarios, the EE does not care about properties and events at all because they boil down to methods and fields at the end of the day, and it's just compilers and reflection who generate and understand them in order to provide that syntactic sugar kind of experience. + +2 This is useful for debugging. If the value of a **TypeHandle** +ends with 2, 6, A, or E, then it's not a **MethodTable** and the extra +bit has to be cleared in order to successfully inspect the +**TypeDesc**. + +3 Note that the difference between **ref** and **out** is just in a +parameter attribute. As far as the type system is concerned, they are +both the same type. + +## 2.1 Load Levels + +When the type loader is asked to load a specified type, identified for example by a typedef/typeref/typespec **token** and a **Module** , it does not do all the work atomically at once. The loading is done in phases instead. The reason for this is that the type usually depends on other types and requiring it to be fully loaded before it can be referred to by other types would result in infinite recursion and deadlocks. Consider: + + classA : C> + { } + + classB : C> + { } + + classC + { } + +These are valid types and apparently **A** depends on **B** and **B** depends on **A**. + +The loader initially creates the structure(s) representing the type and initializes them with data that can be obtained without loading other types. When this "no-dependencies" work is done, the structure(s) can be referred from other places, usually by sticking pointers to them into another structures. After that the loader progresses in incremental steps and fills the structure(s) with more and more information until it finally arrives at a fully loaded type. In the above example, the base types of **A** and **B** will be approximated by something that does not include the other type, and substituted by the real thing later. + +The exact half-loaded state is described by the so-called load level, starting with CLASS\_LOAD\_BEGIN, ending with CLASS\_LOADED, and having a couple of intermediate levels in between. There are rich and useful comments about individual load levels in the [classloadlevel.h](https://github.com/dotnet/coreclr/blob/master/src/vm/classloadlevel.h) source file. Notice that although types can be saved in NGEN images, the representing structures cannot be simply mapped or blitted into memory and used without additional work called "restoring". The fact that a type came from an NGEN image and needs to be restored is also captured by its load level. + +See [Design and Implementation of Generics +for the .NET Common Language +Runtime][generics-design] for more detailed explanation of load levels. + +## 2.2 Generics + +In the generics-free world, everything is nice and everyone is happy because every ordinary (not represented by a **TypeDesc**) type has one **MethodTable** pointing to its associated **EEClass** which in turn points back to the **MethodTable**. All instances of the type contain a pointer to the **MethodTable** as their first field at offset 0, i.e. at the address seen as the reference value. To conserve space, **MethodDescs** representing methods declared by the type are organized in a linked list of chunks pointed to by the **EEClass**4. + +![Figure 3](images/typeloader-fig3.png) + +Figure 3 Non-generic type with non-generic methods + +4 Of course, when managed code runs, it does not call methods by +looking them up in the chunks. Calling a method is a very "hot" +operation and normally needs to access only information in the +**MethodTable**. + +### 2.2.1 Terminology + +**Generic Parameter** + +A placeholder to be substituted by another type; the **T** in the declaration of **List**. Sometimes called formal type parameter. A generic parameter has a name and optional generic constraints. + +**Generic Argument** + +A type being substituted for a generic parameter; the **int** in **List**. Note that a generic parameter can also be used as an argument. Consider: + + List GetList() + { + return new List(); + } + +The method has one generic parameter **T** which is used as a generic argument for the generic list class. + +**Generic Constraint** + +An optional requirement placed by generic parameters on its potential generic arguments. Types that do not have the required properties may not be substituted for the generic parameter and it is enforced by the type loader. There are three kinds of generic constraints: + +1. Special constraints + - Reference type constraint - the generic argument must be a reference type (as opposed to a value type). The `class` keyword is used in C# to express this constraint. + + public class A where T : class + + - Value type constraint - the generic argument must be a value type different from `System.Nullable`. C# uses the `struct` keyword. + + public class A where T : struct + + - Default constructor constraint - the generic argument must have a public parameterless constructor. This is expressed by `new()` in C#. + + public class A where T : new() + +2. Base type constraints - the generic argument must be derived from +(or directly be of) the given non-interface type. It obviously makes +sense to use only zero or one reference type as a base types +constraint. + + public class A where T : EventArgs + +3. Implemented interface constraints - the generic argument must +implement (or directly be of) the given interface type. Zero or more +interfaces can be given. + + public class A where T : ICloneable, IComparable + +The above constraints are combined with an implicit AND, i.e. a +generic parameter can be constrained to be derived from a given type, +implement several interfaces, and have the default constructor. All +generic parameters of the declaring type can be used to express the +constraints, introducing interdependencies among the parameters. For +example: + + public class A + where S : T + where T : IList { + void f(V v) where V : S {} + } + +**Instantiation** + +The list of generic arguments that were substituted for generic +parameters of a generic type or method. Each loaded generic type and +method has its instantiation. + +**Typical Instantiation** + +An instantiation consisting purely of the type's or method's own type +parameters and in the same order in which the parameters are +declared. There exists exactly one typical instantiation for each +generic type and method. Usually when one talks about an open generic +type, they have the typical instantiation in mind. Example: + + public class A {} + +The C# `typeof(A<,,>)` compiles to ldtoken A\'3 which makes the +runtime load **A`3** instantiated at **S** , **T** , **U**. + +**Canonical Instantiation** + +An instantiation where all generic arguments are +**System.\_\_Canon**. **System.\_\_Canon** is an internal type defined +in **mscorlib** and its task is just to be well-known and different +from any other type which may be used as a generic +argument. Types/methods with canonical instantiation are used as +representatives of all instantiations and carry information shared by +all instantiations. Since **System.\_\_Canon** can obviously not +satisfy any constraints that the respective generic parameter may have +on it, constraint checking is special-cased with respect to +**System.\_\_Canon** and ignores these violations. + +### 2.2.2 Sharing + +With the advent of generics, the number of types loaded by the runtime +tends to be higher. Although generic types with different +instantiations (for example **List<string>** and **List<object>**) +are different types each with its own **MethodTable** , it turns out +that there is a considerable amount of information that they can +share. This sharing has a positive impact on the memory footprint and +consequently also performance. + +![Figure 4](images/typeloader-fig4.png) + +Figure 4 Generic type with non-generic methods - shared EEClass + +Currently all instantiations containing reference types share the same +**EEClass** and its **MethodDescs**. This is feasible because all +references are of the same size - 4 or 8 bytes - and hence the layout +of all these types is the same. The figure illustrates this for +**List<object>** and **List<string>**. The canonical **MethodTable** +was created automatically before the first reference type +instantiation was loaded and contains data which is hot but not +instantiation specific like non-virtual slots or +**RemotableMethodInfo**. Instantiations containing only value types +are not shared and every such instantiated type gets its own unshared +**EEClass**. + +**MethodTables** representing generic types loaded so far are cached +in a hash table owned by their loader module5. This hash table is +consulted before a new instantiation is constructed, making sure +that there will never be two or more **MethodTable** instances +representing the same type. + +See [Design and Implementation of Generics +for the .NET Common Language +Runtime][generics-design] for more information about generic sharing. + +5 Things get a bit more complicated for types loaded from NGEN +images. From 8c7786415008b91aae54942e67437b6e09649666 Mon Sep 17 00:00:00 2001 From: Rich Lander Date: Sun, 15 Feb 2015 22:31:39 -0800 Subject: [PATCH 20/22] Update ECMA links to 6 ed --- Documentation/index.md | 2 +- Documentation/intro-to-clr.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/index.md b/Documentation/index.md index 8b9ecc909096..d689e0184d9c 100644 --- a/Documentation/index.md +++ b/Documentation/index.md @@ -23,7 +23,7 @@ This repo includes several documents that explain both high-level and low-level - [MSDN Entry for the CLR](http://msdn.microsoft.com/en-us/library/8bs2ecf4(VS.71).aspx) - [Wikipedia Entry for the CLR](http://en.wikipedia.org/wiki/Common_Language_Runtime) -- [ECMA Standard for the Common Language Infrastructure (CLI)](http://msdn.microsoft.com/en-us/netframework/aa569283.aspx) +- [ECMA Standard for the Common Language Infrastructure (CLI)](http://www.ecma-international.org/publications/standards/Ecma-335.htm) - [Partition I Concepts and Architecture](http://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20I.pdf) - [Partition II Meta Data Definition and Semantics](http://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20II.pdf) - [Partition III CIL Instruction Set](http://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20III.pdf) diff --git a/Documentation/intro-to-clr.md b/Documentation/intro-to-clr.md index 4818b835e557..757aa19b1634 100644 --- a/Documentation/intro-to-clr.md +++ b/Documentation/intro-to-clr.md @@ -251,13 +251,13 @@ Phew! The runtime does a lot! It has taken many pages just to describe _some_ o - [MSDN Entry for the CLR][clr] - [Wikipedia Entry for the CLR](http://en.wikipedia.org/wiki/Common_Language_Runtime) -- [ECMA Standard for the Common Language Infrastructure (CLI)](http://msdn.microsoft.com/en-us/netframework/aa569283.aspx) +- [ECMA Standard for the Common Language Infrastructure (CLI)][ecma-spec] - [Partition I Concepts and Architecture](http://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20I.pdf) - [Partition II Meta Data Definition and Semantics](http://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20II.pdf) - [Partition III CIL Instruction Set][cil-spec] - [.NET Framework Design Guidelines](http://msdn.microsoft.com/en-us/library/ms229042.aspx) -[ecma-spec]: http://msdn.microsoft.com/en-us/netframework/aa569283.aspx +[ecma-spec]: http://www.ecma-international.org/publications/standards/Ecma-335.htm [clr]: http://msdn.microsoft.com/en-us/library/8bs2ecf4(VS.71).aspx [cil-spec]: http://download.microsoft.com/download/7/3/3/733AD403-90B2-4064-A81E-01035A7FE13C/MS%20Partition%20III.pdf [fx-design-guidelines]: http://msdn.microsoft.com/en-us/library/ms229042.aspx From 551c97656c6a5a08c22ff614e81423170ab08ee5 Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Mon, 16 Feb 2015 18:02:17 -0800 Subject: [PATCH 21/22] Refactor linux libunwind to work on osx libunwind on linux exposes the unw_context_t directly as a ucontext_t, but on OSX its an opaque data structure. Additionally UNW_REG_SP is read/write on OSX, but read-only on Linux. As such we need to diverge the libunwind code a bit depending on what flavor we are running on. There is one OSXTODO around the context pointers, since we do not have unw_get_save_loc on OSX. --- src/pal/src/CMakeLists.txt | 10 +++--- src/pal/src/config.h.linux | 2 ++ src/pal/src/config.h.osx | 2 ++ src/pal/src/exception/seh-unwind.cpp | 53 +++++++++++++++++++++++----- src/pal/src/file/file.cpp | 3 +- src/vm/amd64/calldescrworkeramd64.S | 36 +++++++++---------- src/vm/amd64/unixasmmacros.inc | 6 ++-- 7 files changed, 76 insertions(+), 36 deletions(-) diff --git a/src/pal/src/CMakeLists.txt b/src/pal/src/CMakeLists.txt index 6be874de0d84..78a322f854e7 100644 --- a/src/pal/src/CMakeLists.txt +++ b/src/pal/src/CMakeLists.txt @@ -144,16 +144,12 @@ add_library(CoreClrPal ${PLATFORM_SOURCES} ) -target_link_libraries(CoreClrPal - dl - m - unwind -) - if(CMAKE_SYSTEM_NAME STREQUAL Linux) target_link_libraries(CoreClrPal pthread rt + dl + unwind ) endif(CMAKE_SYSTEM_NAME STREQUAL Linux) @@ -161,10 +157,12 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin) find_library(COREFOUNDATION CoreFoundation) find_library(CORESERVICES CoreServices) find_library(SECURITY Security) + find_library(SYSTEM System) target_link_libraries(CoreClrPal ${COREFOUNDATION} ${CORESERVICES} ${SECURITY} + ${SYSTEM} ) endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) diff --git a/src/pal/src/config.h.linux b/src/pal/src/config.h.linux index 90ba8356ed45..b59540a4d858 100644 --- a/src/pal/src/config.h.linux +++ b/src/pal/src/config.h.linux @@ -526,6 +526,8 @@ because gcc will complain about %I64d and %S // Define as 1 if using stack protection, but need implementation #define NEED_STACK_PROTECTOR_IMPL 0 +#define UNWIND_CONTEXT_IS_UCONTEXT_T 1 + #endif // _PAL_CONFIG_H_INCLUDED diff --git a/src/pal/src/config.h.osx b/src/pal/src/config.h.osx index 3ee1a700483f..d9bb49fc4bc1 100644 --- a/src/pal/src/config.h.osx +++ b/src/pal/src/config.h.osx @@ -521,6 +521,8 @@ because gcc will complain about %I64d and %S // Define as 1 if using stack protection, but need implementation #define NEED_STACK_PROTECTOR_IMPL 1 +#define UNWIND_CONTEXT_IS_UCONTEXT_T 0 + #endif // _PAL_CONFIG_H_INCLUDED diff --git a/src/pal/src/exception/seh-unwind.cpp b/src/pal/src/exception/seh-unwind.cpp index 9e54c97ba80a..24ae3c550f17 100644 --- a/src/pal/src/exception/seh-unwind.cpp +++ b/src/pal/src/exception/seh-unwind.cpp @@ -1,5 +1,6 @@ // // Copyright (c) Microsoft. All rights reserved. +// Copyright (c) Geoff Norton. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // @@ -73,6 +74,7 @@ struct __cxa_exception // Virtual Unwinding //---------------------------------------------------------------------- +#if UNWIND_CONTEXT_IS_UCONTEXT_T static void WinContextToUnwindContext(CONTEXT *winContext, unw_context_t *unwContext) { #if defined(_AMD64_) @@ -88,18 +90,35 @@ static void WinContextToUnwindContext(CONTEXT *winContext, unw_context_t *unwCon #error unsupported architecture #endif } +#else +static void WinContextToUnwindCursor(CONTEXT *winContext, unw_cursor_t *cursor) +{ +#if defined(_AMD64_) + unw_set_reg(cursor, UNW_REG_IP, winContext->Rip); + unw_set_reg(cursor, UNW_REG_SP, winContext->Rsp); + unw_set_reg(cursor, UNW_X86_64_RBP, winContext->Rbp); + unw_set_reg(cursor, UNW_X86_64_RBX, winContext->Rbx); + unw_set_reg(cursor, UNW_X86_64_R12, winContext->R12); + unw_set_reg(cursor, UNW_X86_64_R13, winContext->R13); + unw_set_reg(cursor, UNW_X86_64_R14, winContext->R14); + unw_set_reg(cursor, UNW_X86_64_R15, winContext->R15); +#else +#error unsupported architecture +#endif +} +#endif static void UnwindContextToWinContext(unw_cursor_t *cursor, CONTEXT *winContext) { #if defined(_AMD64_) - unw_get_reg(cursor, UNW_X86_64_RIP, &winContext->Rip); - unw_get_reg(cursor, UNW_X86_64_RSP, &winContext->Rsp); - unw_get_reg(cursor, UNW_X86_64_RBP, &winContext->Rbp); - unw_get_reg(cursor, UNW_X86_64_RBX, &winContext->Rbx); - unw_get_reg(cursor, UNW_X86_64_R12, &winContext->R12); - unw_get_reg(cursor, UNW_X86_64_R13, &winContext->R13); - unw_get_reg(cursor, UNW_X86_64_R14, &winContext->R14); - unw_get_reg(cursor, UNW_X86_64_R15, &winContext->R15); + unw_get_reg(cursor, UNW_REG_IP, (unw_word_t *) &winContext->Rip); + unw_get_reg(cursor, UNW_REG_SP, (unw_word_t *) &winContext->Rsp); + unw_get_reg(cursor, UNW_X86_64_RBP, (unw_word_t *) &winContext->Rbp); + unw_get_reg(cursor, UNW_X86_64_RBX, (unw_word_t *) &winContext->Rbx); + unw_get_reg(cursor, UNW_X86_64_R12, (unw_word_t *) &winContext->R12); + unw_get_reg(cursor, UNW_X86_64_R13, (unw_word_t *) &winContext->R13); + unw_get_reg(cursor, UNW_X86_64_R14, (unw_word_t *) &winContext->R14); + unw_get_reg(cursor, UNW_X86_64_R15, (unw_word_t *) &winContext->R15); #else #error unsupported architecture #endif @@ -107,12 +126,16 @@ static void UnwindContextToWinContext(unw_cursor_t *cursor, CONTEXT *winContext) static void GetContextPointer(unw_cursor_t *cursor, int reg, PDWORD64 *contextPointer) { +#if defined(__APPLE__) + //OSXTODO +#else unw_save_loc_t saveLoc; unw_get_save_loc(cursor, reg, &saveLoc); if (saveLoc.type == UNW_SLT_MEMORY) { *contextPointer = (PDWORD64)saveLoc.u.addr; } +#endif } static void GetContextPointers(unw_cursor_t *cursor, KNONVOLATILE_CONTEXT_POINTERS *contextPointers) @@ -135,8 +158,15 @@ BOOL VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPoint unw_context_t unwContext; unw_cursor_t cursor; - // Set the unwind context to the specified windows context +#if UNWIND_CONTEXT_IS_UCONTEXT_T WinContextToUnwindContext(context, &unwContext); +#else + st = unw_getcontext(&unwContext); + if (st < 0) + { + return FALSE; + } +#endif st = unw_init_local(&cursor, &unwContext); if (st < 0) @@ -144,6 +174,11 @@ BOOL VirtualUnwind(CONTEXT *context, KNONVOLATILE_CONTEXT_POINTERS *contextPoint return FALSE; } +#if !UNWIND_CONTEXT_IS_UCONTEXT_T + // Set the unwind context to the specified windows context + WinContextToUnwindCursor(context, &cursor); +#endif + st = unw_step(&cursor); if (st < 0) { diff --git a/src/pal/src/file/file.cpp b/src/pal/src/file/file.cpp index 93aa1415e9f1..c6ce2f25171f 100644 --- a/src/pal/src/file/file.cpp +++ b/src/pal/src/file/file.cpp @@ -2505,6 +2505,7 @@ CorUnix::InternalSetEndOfFile( // extend the file to consume the remainder of free space. // struct statfs sFileSystemStats; + off_t cbFreeSpace; if (fstatfs(pLocalData->unix_fd, &sFileSystemStats) != 0) { ERROR("fstatfs failed\n"); @@ -2513,7 +2514,7 @@ CorUnix::InternalSetEndOfFile( } // Free space is free blocks times the size of each block in bytes. - off_t cbFreeSpace = (off_t)sFileSystemStats.f_bavail * (off_t)sFileSystemStats.f_bsize; + cbFreeSpace = (off_t)sFileSystemStats.f_bavail * (off_t)sFileSystemStats.f_bsize; if (curr > cbFreeSpace) { diff --git a/src/vm/amd64/calldescrworkeramd64.S b/src/vm/amd64/calldescrworkeramd64.S index 7b108dc402c8..4d69311baeba 100644 --- a/src/vm/amd64/calldescrworkeramd64.S +++ b/src/vm/amd64/calldescrworkeramd64.S @@ -57,22 +57,22 @@ NESTED_ENTRY CallDescrWorkerInternal, _TEXT, CallDescrWorkerUnwindFrameChainHand mov ecx, dword ptr [rbx + CallDescrData__numStackSlots] and ecx, ecx - jz .LNoStackArguments + jz LOCAL_LABEL(NoStackArguments) test ecx, 1 - jz .LStackAligned + jz LOCAL_LABEL(StackAligned) push rax -.LStackAligned: +LOCAL_LABEL(StackAligned): mov rsi, [rbx + CallDescrData__pSrc] // set source argument list address lea rsi, [rsi + 8 * rcx] -.LStackCopyLoop: // copy the arguments to stack top-down to carefully probe for sufficient stack space +LOCAL_LABEL(StackCopyLoop): // copy the arguments to stack top-down to carefully probe for sufficient stack space sub rsi, 8 push qword ptr [rsi] dec ecx - jnz .LStackCopyLoop -.LNoStackArguments: + jnz LOCAL_LABEL(StackCopyLoop) +LOCAL_LABEL(NoStackArguments): // All argument registers are loaded regardless of the actual number // of arguments. @@ -89,7 +89,7 @@ NESTED_ENTRY CallDescrWorkerInternal, _TEXT, CallDescrWorkerUnwindFrameChainHand mov rax, [rbx + CallDescrData__pFloatArgumentRegisters] and rax, rax - jz .LNoFloatArguments + jz LOCAL_LABEL(NoFloatArguments) movsd xmm0, [rax + 0] movsd xmm1, [rax + 16] movsd xmm2, [rax + 32] @@ -98,26 +98,26 @@ NESTED_ENTRY CallDescrWorkerInternal, _TEXT, CallDescrWorkerUnwindFrameChainHand movsd xmm5, [rax + 80] movsd xmm6, [rax + 96] movsd xmm7, [rax + 112] -.LNoFloatArguments: +LOCAL_LABEL(NoFloatArguments): call qword ptr [rbx + CallDescrData__pTarget] // call target function // Save FP return value mov ecx, dword ptr [rbx + CallDescrData__fpReturnSize] test ecx, ecx - jz .LReturnsInt + jz LOCAL_LABEL(ReturnsInt) cmp ecx, 4 - je .LReturnsFloat + je LOCAL_LABEL(ReturnsFloat) cmp ecx, 8 - je .LReturnsDouble + je LOCAL_LABEL(ReturnsDouble) // unexpected - jmp .LEpilog + jmp LOCAL_LABEL(Epilog) -.LReturnsInt: +LOCAL_LABEL(ReturnsInt): mov [rbx+CallDescrData__returnValue], rax -.LEpilog: +LOCAL_LABEL(Epilog): lea rsp, 0[rbp] // deallocate argument list .cfi_def_cfa_register rsp pop rbp // restore nonvolatile register @@ -126,13 +126,13 @@ NESTED_ENTRY CallDescrWorkerInternal, _TEXT, CallDescrWorkerUnwindFrameChainHand .cfi_adjust_cfa_offset -8 // ret -.LReturnsFloat: +LOCAL_LABEL(ReturnsFloat): movss real4 ptr [rbx+CallDescrData__returnValue], xmm0 - jmp .LEpilog + jmp LOCAL_LABEL(Epilog) -.LReturnsDouble: +LOCAL_LABEL(ReturnsDouble): movsd real8 ptr [rbx+CallDescrData__returnValue], xmm0 - jmp .LEpilog + jmp LOCAL_LABEL(Epilog) NESTED_END CallDescrWorkerInternal, _TEXT diff --git a/src/vm/amd64/unixasmmacros.inc b/src/vm/amd64/unixasmmacros.inc index 0c6e1f0991c6..8c666f9a96e9 100644 --- a/src/vm/amd64/unixasmmacros.inc +++ b/src/vm/amd64/unixasmmacros.inc @@ -26,8 +26,10 @@ #if defined(__APPLE__) #define C_FUNC(name) _##name +#define LOCAL_LABEL(name) L##name #else #define C_FUNC(name) name +#define LOCAL_LABEL(name) .L##name #endif #if defined(__APPLE__) @@ -47,8 +49,8 @@ C_FUNC(\Name): .text #else .type \Name, %function - .cfi_startproc #endif + .cfi_startproc C_FUNC(\Name): .endm @@ -56,9 +58,9 @@ C_FUNC(\Name): C_FUNC(\Name\()_End): .global C_FUNC(\Name\()_End) #if !defined(__APPLE__) - .cfi_endproc .size \Name, .-\Name #endif + .cfi_endproc .endm .macro LEAF_END Name, Section From adea4521d7de3551627dcfb8e112ff4efae37594 Mon Sep 17 00:00:00 2001 From: Geoff Norton Date: Tue, 17 Feb 2015 13:02:44 -0800 Subject: [PATCH 22/22] Move the UNWIND_CONTEXT_IS_UCONTEXT_T check into cmake as well --- src/pal/src/config.h.in | 1 + src/pal/src/configure.cmake | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/pal/src/config.h.in b/src/pal/src/config.h.in index 57af6b55c950..94b4442c087c 100644 --- a/src/pal/src/config.h.in +++ b/src/pal/src/config.h.in @@ -118,6 +118,7 @@ #cmakedefine01 USE_SIGNALS_FOR_THREAD_SUSPENSION #cmakedefine01 SYNCHMGR_SUSPENSION_SAFE_CONDITION_SIGNALING #cmakedefine01 ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS +#cmakedefine01 UNWIND_CONTEXT_IS_UCONTEXT_T #cmakedefine JA_JP_LOCALE_NAME "@JA_JP_LOCALE_NAME@" #cmakedefine KO_KR_LOCALE_NAME "@KO_KR_LOCALE_NAME@" diff --git a/src/pal/src/configure.cmake b/src/pal/src/configure.cmake index 88113fff5c16..c0687eae32dc 100644 --- a/src/pal/src/configure.cmake +++ b/src/pal/src/configure.cmake @@ -908,6 +908,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL Darwin) set(KO_KR_LOCALE_NAME ko_KR.eucKR) set(ZH_TW_LOCALE_NAME zh_TG.BIG5) set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1) + set(UNWIND_CONTEXT_IS_UCONTEXT_T 0) else() set(DEADLOCK_WHEN_THREAD_IS_SUSPENDED_WHILE_BLOCKED_ON_MUTEX 0) set(PAL_PTRACE "ptrace((cmd), (pid), (void*)(addr), (data))") @@ -921,6 +922,7 @@ else() set(KO_KR_LOCALE_NAME ko_KR_LOCALE_NOT_FOUND) set(ZH_TW_LOCALE_NAME zh_TW_LOCALE_NOT_FOUND) set(ERROR_FUNC_FOR_GLOB_HAS_FIXED_PARAMS 1) + set(UNWIND_CONTEXT_IS_UCONTEXT_T 1) endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)