[Pcsclite-cvs-commit] CVS PCSC

CVS User rousseau ludovic.rousseau@free.fr
Tue, 07 Sep 2004 02:38:21 -0600


Update of /cvsroot/pcsclite/PCSC
In directory haydn:/tmp/cvs-serv29952

Modified Files:
	configure.in 
Log Message:
check if strlcpy/strlcat are provided by the OS (OpenBSD and some
others)


--- /cvsroot/pcsclite/PCSC/configure.in	2004/09/01 18:41:08	1.62
+++ /cvsroot/pcsclite/PCSC/configure.in	2004/09/07 08:38:20	1.63
@@ -107,7 +107,17 @@
 AC_FUNC_ERROR_AT_LINE
 AC_FUNC_STAT
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS(daemon flock getopt_long nanosleep strerror strncpy vsnprintf)
+AC_CHECK_FUNCS(daemon flock getopt_long nanosleep strerror vsnprintf)
+
+dnl strlcpy, strlcat from OpenBSD
+AC_CHECK_FUNC(strlcpy,
+	need_strlcpy=false; AC_DEFINE(HAVE_STRLCPY, 1, [have strlcpy])
+	, need_strlcpy=true)
+AM_CONDITIONAL(NEED_STRLCPY, test x$need_strlcpy=xtrue)
+AC_CHECK_FUNC(strlcat,
+	need_strlcat=false; AC_DEFINE(HAVE_STRLCAT, 1, [have strlcat])
+	, need_strlcat=true)
+AM_CONDITIONAL(NEED_STRLCAT, test x$need_strlcat=xtrue)
 
 dnl C Compiler features
 AC_C_INLINE
@@ -331,6 +341,9 @@
   extended_apdu="#undef PCSCLITE_ENHANCED_MESSAGING"
 fi
 
+AC_MSG_RESULT([use internal strlcpy          : $need_strlcpy])
+AC_MSG_RESULT([use internal strlcat          : $need_strlcat])
+
 dnl warning about pthread
 if test x${threadsafe} = xtrue ; then
   AC_DEFINE(USE_THREAD_SAFETY, 1, [enable client side thread safety.])