Skip to content

Force libuuid usage for IBM i (os400). #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion build/apr_hints.m4
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,15 @@ dnl # Not a problem in 10.20. Otherwise, who knows?
AC_DEFINE(HAVE_ZOS_PTHREADS, 1, [Define for z/OS pthread API nuances])
APR_ADDTO(CPPFLAGS, [-U_NO_PROTO -DSIGPROCMASK_SETS_THREAD_MASK -DTCP_NODELAY=1])
;;
*-ibm-as400)
*-ibm-as400 | *-ibm-os400)
APR_SETIFNULL(apr_lock_method, [USE_SYSVSEM_SERIALIZE])
APR_SETIFNULL(apr_process_lock_is_global, [yes])
APR_SETIFNULL(apr_gethostbyname_is_thread_safe, [yes])
APR_SETIFNULL(apr_gethostbyaddr_is_thread_safe, [yes])
APR_SETIFNULL(apr_getservbyname_is_thread_safe, [yes])
APR_ADDTO(CFLAGS, [-D_THREAD_SAFE -D_LINUX_SOURCE_COMPAT -pthread])
APR_SETVAR(SHELL, [/qopensys/bin/sh])
APR_SETVAR(CONFIG_SHELL, [/qopensys/bin/sh])
;;
*mingw*)
APR_ADDTO(INTERNAL_CPPFLAGS, -DBINPATH=$apr_builddir/test/.libs)
Expand Down
19 changes: 15 additions & 4 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ case $host in
USE_SHMEM_SHMGET)
fi
;;
*aix* )
*aix*|*os400 )
# AIX cannot lseek() shared memory, and we always truncate/lseek together
APR_DECISION_OVERRIDE(USE_SHMEM_SHMGET)
;;
Expand Down Expand Up @@ -2912,19 +2912,30 @@ dnl ----------------------------- Checking for UUID Support
AC_MSG_NOTICE([])
AC_MSG_NOTICE([Checking for OS UUID Support...])

AC_CHECK_HEADERS(uuid.h uuid/uuid.h sys/uuid.h, break)
if [[[ "$host" != *os400 ]]]; then
AC_CHECK_HEADERS(uuid.h uuid/uuid.h sys/uuid.h, break)
else
AC_CHECK_HEADERS(uuid/uuid.h, break)
fi

apr_revert_save_LIBS=$LIBS

# Prefer the flavor(s) that live in libc;
AC_SEARCH_LIBS(uuid_create, uuid)
AC_SEARCH_LIBS(uuid_generate, uuid)
if [[[ "$host" == *os400 ]]]; then
ac_cv_search_uuid_create="no"
fi
if test "$ac_cv_search_uuid_create" = "none required" -o \
"$ac_cv_search_uuid_generate" = "none required"; then
LIBS=$apr_revert_save_LIBS
fi

AC_CHECK_FUNCS(uuid_create uuid_generate)
if [[[ "$host" != *os400 ]]]; then
AC_CHECK_FUNCS(uuid_create uuid_generate)
else
AC_CHECK_FUNCS(uuid_generate)
ac_cv_func_uuid_create="no"
fi

AC_CACHE_CHECK([for os uuid usability], [apr_cv_osuuid], [
# Ensure this test closely mirrors misc/unix/rand.c!
Expand Down