+2004-06-25 Michael Poole <mdpoole@troilus.org>
+
+ * configure.in: Check for crypt.h as well.
+
+ * configure: Regenerate.
+
+ * ircd/ircd_crypt_native.c: Move XOPEN defines earlier so they
+ affect the first includes of system headers. Include crypt.h if
+ it is available.
+
+ * ircd/umkpasswd.c: Quash a gcc warning.
+
2004-06-23 Michael Poole <mdpoole@troilus.org>
* doc/Authors: Add contributors to ircu2.10.11 and myself.
-for ac_header in poll.h sys/devpoll.h sys/epoll.h sys/event.h
+
+
+for ac_header in crypt.h inttypes.h poll.h sys/devpoll.h sys/epoll.h sys/event.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
if eval "test \"\${$as_ac_Header+set}\" = set"; then
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(inttypes.h poll.h sys/devpoll.h sys/epoll.h sys/event.h)
+AC_CHECK_HEADERS(crypt.h inttypes.h poll.h sys/devpoll.h sys/epoll.h sys/event.h)
dnl Checks for typedefs, structures, and compiler characteristics
dnl AC_C_CONST
*
* $Id$
*/
+#define _XOPEN_SOURCE
+#define _XOPEN_VERSION 4
+
#include "config.h"
#include "ircd_crypt.h"
#include "ircd_crypt_native.h"
#include "s_debug.h"
#include "ircd_alloc.h"
-#define _XOPEN_SOURCE
-#define _XOPEN_VERSION 4
-
#include <assert.h>
#include <unistd.h>
+#ifdef HAVE_CRYPT_H
+#include <crypt.h>
+#endif
/* well this bit is (kinda) intact :) -- hikari */
const char* ircd_crypt_native(const char* key, const char* salt)
if (NULL == (file = fopen(tmp, "r")))
exit(0);
MD5Name(MD5Init)(&context);
- while (len = fread (buffer, 1, 1024, file))
+ while ((len = fread (buffer, 1, 1024, file)))
MD5Name(MD5Update)(&context, buffer, len);
MD5Name(MD5Final)(digest, &context);
fclose(file);