Author: jonpryor
Date: 2005-12-01 14:34:09 -0500 (Thu, 01 Dec 2005)
New Revision: 53787
Modified:
trunk/mono/ChangeLog
trunk/mono/configure.in
trunk/mono/support/ChangeLog
trunk/mono/support/Makefile.am
trunk/mono/support/stdlib.c
Log:
* configure.in: Check for setkey(3) in -lcrypt and define CRYPT_LIBS
accordingly.
* support/Makefile.am: Use $(CRYPT_LIB), not -lcrypt, as not all
platforms
support -lcrypt.
* support/stdlib.c: Wrap Mono_Posix_Syscall_setkey() within
HAVE_SETKEY,
not PLATFORM_WIN32
Modified: trunk/mono/ChangeLog
===================================================================
--- trunk/mono/ChangeLog 2005-12-01 19:09:56 UTC (rev 53786)
+++ trunk/mono/ChangeLog 2005-12-01 19:34:09 UTC (rev 53787)
@@ -1,3 +1,8 @@
+2005-12-01 Jonathan Pryor <[EMAIL PROTECTED]>
+
+ * configure.in: Check for setkey(3) in -lcrypt and define CRYPT_LIBS
+ accordingly.
+
2005-12-01 Mike Kestner <[EMAIL PROTECTED]>
* scripts/mono-find-provides.in: support policy assemblies.
Modified: trunk/mono/configure.in
===================================================================
--- trunk/mono/configure.in 2005-12-01 19:09:56 UTC (rev 53786)
+++ trunk/mono/configure.in 2005-12-01 19:34:09 UTC (rev 53787)
@@ -1186,6 +1186,13 @@
dnl **********************************
dnl *** Checks for MonoPosixHelper ***
dnl **********************************
+ AC_CHECK_FUNC(setkey, ,
+ AC_CHECK_LIB(crypt, setkey, [
+ AC_DEFINE(HAVE_SETKEY, 1, [Define if setkey(3) is
available])
+ CRYPT_LIBS="-lcrypt"
+ ])
+ )
+ AC_SUBST(CRYPT_LIBS)
AC_CHECK_HEADERS(checklist.h)
AC_CHECK_HEADERS(fstab.h)
AC_CHECK_HEADERS(attr/xattr.h)
Modified: trunk/mono/support/ChangeLog
===================================================================
--- trunk/mono/support/ChangeLog 2005-12-01 19:09:56 UTC (rev 53786)
+++ trunk/mono/support/ChangeLog 2005-12-01 19:34:09 UTC (rev 53787)
@@ -1,3 +1,10 @@
+2005-12-01 Jonathan Pryor <[EMAIL PROTECTED]>
+
+ * Makefile.am: Use $(CRYPT_LIB), not -lcrypt, as not all platforms
+ support -lcrypt.
+ * stdlib.c: Wrap Mono_Posix_Syscall_setkey() within HAVE_SETKEY, not
+ PLATFORM_WIN32
+
2005-12-01 Daniel Drake <[EMAIL PROTECTED]>
* Makefile.am: Link against libcrypt, needed for setkey(3) as referenced
Modified: trunk/mono/support/Makefile.am
===================================================================
--- trunk/mono/support/Makefile.am 2005-12-01 19:09:56 UTC (rev 53786)
+++ trunk/mono/support/Makefile.am 2005-12-01 19:34:09 UTC (rev 53787)
@@ -54,8 +54,7 @@
MPH_LIBS =
else
MPH_SOURCE = $(MPH_C_SOURCE) $(MPH_UNIX_SOURCE)
-# -lcrypt needed for setkey(3)
-MPH_LIBS = $(GLIB_LIBS)
+MPH_LIBS = $(GLIB_LIBS) $(CRYPT_LIBS)
endif
if HAVE_ZLIB
Modified: trunk/mono/support/stdlib.c
===================================================================
--- trunk/mono/support/stdlib.c 2005-12-01 19:09:56 UTC (rev 53786)
+++ trunk/mono/support/stdlib.c 2005-12-01 19:34:09 UTC (rev 53787)
@@ -64,7 +64,7 @@
return realloc (ptr, (size_t) size);
}
-#ifndef PLATFORM_WIN32
+#ifdef HAVE_SETKEY
int
Mono_Posix_Syscall_setkey (const char* key)
{
@@ -72,7 +72,7 @@
setkey (key);
return errno == 0 ? 0 : -1;
}
-#endif /* ndef PLATFORM_WIN32 */
+#endif /* ndef HAVE_SETKEY */
G_END_DECLS
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches