Commit f293b73d authored by Brad King's avatar Brad King

libarchive: Define _XOPEN_SOURCE=500 on HP-UX

The HP-UX <wchar.h> header provides 'mbstate_t' in C89/C90 mode only if
_XOPEN_SOURCE is defined to exactly 500.  Type 'mbstate_t' was
introduced in C89/C90 Normative Amendment 1, aka C94/C95, adding support
international character sets.  It is part of C99 but not C89/C90.
parent 6781a099
......@@ -75,6 +75,10 @@ IF(WIN32)
SET(_WIN32_WINNT ${WINVER})
ENDIF(WIN32)
IF("${CMAKE_C_PLATFORM_ID}" MATCHES "^(HP-UX)$")
ADD_DEFINITIONS(-D_XOPEN_SOURCE=500) # Ask wchar.h for mbstate_t
ENDIF()
#
INCLUDE(CheckCSourceCompiles)
INCLUDE(CheckCSourceRuns)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment