about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2001-12-12 01:58:52 +0000
committerAlexander Barton <alex@barton.de>2001-12-12 01:58:52 +0000
commita4832131bb8e41a631b4f3b568d396f852841674 (patch)
treee23e8d61060c848860291ef3b9d05eb03dd387ca
parentcdb247c6667b25d8e6c7a8f006deb2b617f4b9a7 (diff)
downloadngircd-a4832131bb8e41a631b4f3b568d396f852841674.tar.gz
ngircd-a4832131bb8e41a631b4f3b568d396f852841674.zip
- Test auf socklen_t verbessert.
-rw-r--r--acconfig.h24
-rw-r--r--configure.in18
-rw-r--r--src/ngircd/global.h14
-rw-r--r--src/ngircd/ngircd.c9
4 files changed, 56 insertions, 9 deletions
diff --git a/acconfig.h b/acconfig.h
new file mode 100644
index 00000000..6b10a540
--- /dev/null
+++ b/acconfig.h
@@ -0,0 +1,24 @@
+/*
+ * ngIRCd -- The Next Generation IRC Daemon
+ * Copyright (c)2001 by Alexander Barton (alex@barton.de)
+ *
+ * Dieses Programm ist freie Software. Sie koennen es unter den Bedingungen
+ * der GNU General Public License (GPL), wie von der Free Software Foundation
+ * herausgegeben, weitergeben und/oder modifizieren, entweder unter Version 2
+ * der Lizenz oder (wenn Sie es wuenschen) jeder spaeteren Version.
+ * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
+ * der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
+ *
+ * $Id: acconfig.h,v 1.1 2001/12/12 01:58:52 alex Exp $
+ *
+ * $Log: acconfig.h,v $
+ * Revision 1.1  2001/12/12 01:58:52  alex
+ * - Test auf socklen_t verbessert.
+ *
+ */
+
+
+#undef HAVE_socklen_t
+
+
+/* -eof- */
diff --git a/configure.in b/configure.in
index a84198ec..bd05338a 100644
--- a/configure.in
+++ b/configure.in
@@ -9,9 +9,12 @@
 # Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
 # der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
 #
-# $Id: configure.in,v 1.2 2001/12/11 22:04:21 alex Exp $
+# $Id: configure.in,v 1.3 2001/12/12 01:58:53 alex Exp $
 #
 # $Log: configure.in,v $
+# Revision 1.3  2001/12/12 01:58:53  alex
+# - Test auf socklen_t verbessert.
+#
 # Revision 1.2  2001/12/11 22:04:21  alex
 # - Test auf stdint.h (HAVE_STDINT_H) hinzugefuegt.
 #
@@ -55,6 +58,19 @@ AC_CHECK_HEADERS([stdint.h])
 
 # -- Datentypen --
 
+AC_MSG_CHECKING(whether socklen_t exists)
+AC_TRY_COMPILE([
+	#include <sys/socket.h>
+	#include <sys/types.h>
+	],[
+	socklen_t a, b;
+	a = 2; b = 4; a += b;
+	],[
+	AC_DEFINE(HAVE_socklen_t) AC_MSG_RESULT(yes)
+	],[
+	AC_MSG_RESULT(no)
+])
+
 # -- Funktionen --
 
 AC_CHECK_FUNCS([socket],,[required functions missing!])
diff --git a/src/ngircd/global.h b/src/ngircd/global.h
index 5bb490f0..3834eb60 100644
--- a/src/ngircd/global.h
+++ b/src/ngircd/global.h
@@ -9,22 +9,30 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: global.h,v 1.1 2001/12/11 21:53:04 alex Exp $
+ * $Id: global.h,v 1.2 2001/12/12 01:58:53 alex Exp $
  *
  * global.h: Globaler Header, wir in jedes(!) Modul eingebunden.
  *
  * $Log: global.h,v $
- * Revision 1.1  2001/12/11 21:53:04  alex
- * Initial revision
+ * Revision 1.2  2001/12/12 01:58:53  alex
+ * - Test auf socklen_t verbessert.
  *
+ * Revision 1.1.1.1  2001/12/11 21:53:04  alex
+ * Imported sources to CVS.
  */
 
 
 #ifndef __global_h__
 #define __global_h__
 
+
 #include "config.h"
 
+#ifndef HAVE_socklen_t
+#define socklen_t int			/* u.a. fuer Mac OS X */
+#endif
+
+
 #endif
 
 
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index 67242a49..d9585720 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -9,11 +9,14 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an comBase beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: ngircd.c,v 1.3 2001/12/12 01:40:39 alex Exp $
+ * $Id: ngircd.c,v 1.4 2001/12/12 01:58:53 alex Exp $
  *
  * ngircd.c: Hier beginnt alles ;-)
  *
  * $Log: ngircd.c,v $
+ * Revision 1.4  2001/12/12 01:58:53  alex
+ * - Test auf socklen_t verbessert.
+ *
  * Revision 1.3  2001/12/12 01:40:39  alex
  * - ein paar mehr Kommentare; Variablennamen verstaendlicher gemacht.
  * - fehlenden Header <arpa/inet.h> ergaenz.
@@ -24,15 +27,11 @@
  *
  * Revision 1.1.1.1  2001/12/11 21:53:04  alex
  * Imported sources to CVS.
- *
  */
 
 
 #define PORTAB_CHECK_TYPES		/* Prueffunktion einbinden, s.u. */
 
-#ifndef socklen_t
-#define socklen_t int			/* u.a. fuer Mac OS X */
-#endif
 
 #include <portab.h>
 #include "global.h"