We may need to define it on other systems too.
# 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__
# 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
SUDO_LIBS="${SUDO_LIBS} -lpthread"
fi
+ $as_echo "#define _REENTRANT 1" >>confdefs.h
+
;;
esac
# 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
;;
case "$host_os" in
hpux*)
AC_CHECK_LIB(pthread, main, [SUDO_LIBS="${SUDO_LIBS} -lpthread"])
+ AC_DEFINE(_REENTRANT)
;;
esac
# 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__