 +add_definitions(-DHAVE_CONFIG_H)
 +if(UNIX)
 +  add_definitions(-DCMAKE_UNIX)
++endif()
++if(${CMAKE_SYSTEM_NAME} STREQUAL SunOS)
++  string(REGEX REPLACE "([0-9]+)\\.([0-9]+)" "\\2" SOL_VER ${CMAKE_SYSTEM_VERSION})
++  add_definitions(-DSOLARIS2=${SOL_VER})
 +endif()
 diff --git a/include/apr_general.h b/include/apr_general.h
 index c7389ec..0b32945 100644

 
 IF(APR_BUILD_TESTAPR)
   ENABLE_TESTING()
@@ -303,8 +407,12 @@ IF(APR_BUILD_TESTAPR)
   ENDIF()
 
   ADD_EXECUTABLE(testapp test/testapp.c)

+else()
+  set(int_value unknown)
+endif()
+set(voidp_size ${SIZEOF_VOIDP}) # APR_SIZEOF_VOIDP
+if(SIZEOF_INT EQUAL 8)
+  set(int64_literal "#define APR_INT64_C(val) (val)")
+  set(uint64_literal "#define APR_UINT64_C(val) (val##U)")
