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

+check_exists_define01(pthread_rwlock_init HAVE_PTHREAD_RWLOCK_INIT)
+check_exists_define01(pthread_yield HAVE_PTHREAD_YIELD)
+check_exists_define01(putenv HAVE_PUTENV)
+check_exists_define01(readdir64_r HAVE_READDIR64_R) #TODO: configure doesn't find
+check_exists_define01(sched_yield HAVE_SCHED_YIELD) #TODO: configure doesn't find
+check_exists_define01(semctl HAVE_SEMCTL)
+check_exists_define01(semget HAVE_SEMGET)
+check_exists_define01(sem_close HAVE_SEM_CLOSE)

+  set(uint64_literal "#define APR_UINT64_C(val) UINT64_C(val)")
+endif()
+#####
+set01(bigendian WORDS_BIGENDIAN) # APR_IS_BIGENDIAN
+#####
+set(apr_thread_func) # APR_THREAD_FUNC # TODO: handle case where it should be set to __stdcall
+###
+if(${CMAKE_SYSTEM_NAME} STREQUAL SOME_PLATFORM) # TODO: handle other cases
+  # where SOME_PLATFORM matches results from CMakeDetermineSystem.cmake:
