Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2004-06-25 12:01:46 UTC
Modified files:
ChangeLog configure configure.in ircd/ircd_crypt_native.c
ircd/umkpasswd.c
Log message:
Get rid of warnings about undefined crypt() and assignment in if().
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.428 ircu2.10/ChangeLog:1.429
--- ircu2.10/ChangeLog:1.428 Wed Jun 23 18:44:01 2004
+++ ircu2.10/ChangeLog Fri Jun 25 05:01:28 2004
@@ -1,3 +1,15 @@
+2004-06-25 Michael Poole <[EMAIL PROTECTED]>
+
+ * 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 <[EMAIL PROTECTED]>
* doc/Authors: Add contributors to ircu2.10.11 and myself.
Index: ircu2.10/configure
diff -u ircu2.10/configure:1.16 ircu2.10/configure:1.17
--- ircu2.10/configure:1.16 Tue May 25 12:58:23 2004
+++ ircu2.10/configure Fri Jun 25 05:01:31 2004
@@ -3881,7 +3881,9 @@
-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
Index: ircu2.10/configure.in
diff -u ircu2.10/configure.in:1.15 ircu2.10/configure.in:1.16
--- ircu2.10/configure.in:1.15 Wed Jun 23 18:44:00 2004
+++ ircu2.10/configure.in Fri Jun 25 05:01:35 2004
@@ -19,7 +19,7 @@
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
-dnl $Id: configure.in,v 1.15 2004/06/24 01:44:00 entrope Exp $
+dnl $Id: configure.in,v 1.16 2004/06/25 12:01:35 entrope Exp $
dnl Make sure we are in the correct directory (someone could have run
dnl 'configure' with a wrong '--srcdir').
@@ -113,7 +113,7 @@
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
Index: ircu2.10/ircd/ircd_crypt_native.c
diff -u ircu2.10/ircd/ircd_crypt_native.c:1.1 ircu2.10/ircd/ircd_crypt_native.c:1.2
--- ircu2.10/ircd/ircd_crypt_native.c:1.1 Mon Jun 14 18:20:36 2004
+++ ircu2.10/ircd/ircd_crypt_native.c Fri Jun 25 05:01:35 2004
@@ -16,19 +16,22 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: ircd_crypt_native.c,v 1.1 2004/06/15 01:20:36 entrope Exp $
+ * $Id: ircd_crypt_native.c,v 1.2 2004/06/25 12:01:35 entrope Exp $
*/
+#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)
Index: ircu2.10/ircd/umkpasswd.c
diff -u ircu2.10/ircd/umkpasswd.c:1.1 ircu2.10/ircd/umkpasswd.c:1.2
--- ircu2.10/ircd/umkpasswd.c:1.1 Mon Jun 14 18:20:35 2004
+++ ircu2.10/ircd/umkpasswd.c Fri Jun 25 05:01:36 2004
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: umkpasswd.c,v 1.1 2004/06/15 01:20:35 entrope Exp $
+ * $Id: umkpasswd.c,v 1.2 2004/06/25 12:01:36 entrope Exp $
*/
#include "config.h"
#include <unistd.h>
@@ -172,7 +172,7 @@
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);
----------------------- End of diff -----------------------