2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Add back _REENTRANT define on HP-UX to expose strtok_r on some versions.

We may need to define it on other systems too.
This commit is contained in:
Todd C. Miller
2015-06-19 12:35:51 -06:00
parent e2328479dd
commit 09b07fe21a
3 changed files with 15 additions and 13 deletions

View File

@@ -1267,6 +1267,11 @@
# undef _XOPEN_SOURCE_EXTENDED
#endif
/* Enable reentrant versions of the standard C API (obsolete). */
#ifndef _REENTRANT
# undef _REENTRANT
#endif
/* Enable "safer" versions of the standard C API (ISO C11). */
#ifndef __STDC_WANT_LIB_EXT1__
# undef __STDC_WANT_LIB_EXT1__

15
configure vendored
View File

@@ -14966,18 +14966,7 @@ $as_echo "$sudo_cv_var_daportable" >&6; }
# order of libs in 9.X is important. -lc_r must be last
SUDOERS_LIBS="${SUDOERS_LIBS} -ldce -lM -lc_r"
LIBS="${LIBS} -ldce -lM -lc_r"
case "${CPPFLAGS}" in
*"-D_REENTRANT"|*"-D_REENTRANT ")
;;
*)
if test X"${CPPFLAGS}" = X""; then
CPPFLAGS="-D_REENTRANT"
else
CPPFLAGS="${CPPFLAGS} -D_REENTRANT"
fi
;;
esac
$as_echo "#define _REENTRANT 1" >>confdefs.h
case "${CPPFLAGS}" in
@@ -23530,6 +23519,8 @@ if test "x$ac_cv_lib_pthread_main" = xyes; then :
SUDO_LIBS="${SUDO_LIBS} -lpthread"
fi
$as_echo "#define _REENTRANT 1" >>confdefs.h
;;
esac

View File

@@ -1836,7 +1836,7 @@ case "$host" in
# order of libs in 9.X is important. -lc_r must be last
SUDOERS_LIBS="${SUDOERS_LIBS} -ldce -lM -lc_r"
LIBS="${LIBS} -ldce -lM -lc_r"
SUDO_APPEND_CPPFLAGS(-D_REENTRANT)
AC_DEFINE(_REENTRANT)
SUDO_APPEND_CPPFLAGS(-I/usr/include/reentrant)
fi
;;
@@ -3814,6 +3814,7 @@ fi
case "$host_os" in
hpux*)
AC_CHECK_LIB(pthread, main, [SUDO_LIBS="${SUDO_LIBS} -lpthread"])
AC_DEFINE(_REENTRANT)
;;
esac
@@ -4373,6 +4374,11 @@ AH_BOTTOM([/* BSD compatibility on some SVR4 systems. */
# undef _XOPEN_SOURCE_EXTENDED
#endif
/* Enable reentrant versions of the standard C API (obsolete). */
#ifndef _REENTRANT
# undef _REENTRANT
#endif
/* Enable "safer" versions of the standard C API (ISO C11). */
#ifndef __STDC_WANT_LIB_EXT1__
# undef __STDC_WANT_LIB_EXT1__