repo: ngircd
action: commit
revision: 
path_from: 
revision_from: 7049b60af48382ce5f4623d32c5fca6d0c9f4fc5:
path_to: 
revision_to: 
git.thebackupbox.net
ngircd
git clone git://git.thebackupbox.net/ngircd
commit 7049b60af48382ce5f4623d32c5fca6d0c9f4fc5
Author: Alexander Barton 
Date:   Tue Mar 12 15:19:12 2002 +0000

    - der System-Typ wird nun wieder korrekt ermittelt und verwendet.

diff --git a/configure.in b/configure.in
index b77c4676bec1a973b5dcd2df5b8e03ead9c6a956..
index ..7e7b1be553577091489bc1a2d6b21b3cf7a5e6a5 100644
--- a/configure.in
+++ b/configure.in
@@ -9,7 +9,7 @@
 # Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
 # der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
 #
-# $Id: configure.in,v 1.36 2002/03/12 14:37:51 alex Exp $
+# $Id: configure.in,v 1.37 2002/03/12 15:19:12 alex Exp $
 #

 # -- Initialisierung --
@@ -28,6 +28,10 @@ AH_TEMPLATE([SNIFFER], [Define if IRC sniffer should be enabled])
 AH_TEMPLATE([STRICT_RFC], [Define if ngIRCd should behave strict RFC compliant])
 AH_TEMPLATE([USE_SYSLOG], [Define if syslog should be used for logging])

+AH_TEMPLATE([TARGET_OS], [Target operating system name])
+AH_TEMPLATE([TARGET_VENDOR], [Target system vendor])
+AH_TEMPLATE([TARGET_CPU], [Target CPU name])
+
 # -- C Compiler --

 AC_PROG_CC
@@ -136,7 +140,13 @@ if test "$x_debug_on" = "yes"; then
 	AC_MSG_RESULT([enabling additional debug output])
 fi

-# -- Variablen II --
+# -- Definitionen --
+
+AC_DEFINE_UNQUOTED(TARGET_CPU, "$target_cpu" )
+AC_DEFINE_UNQUOTED(TARGET_VENDOR, "$target_vendor" )
+AC_DEFINE_UNQUOTED(TARGET_OS, "$target_os" )
+
+# -- Variablen --

 if test "$GCC" = "yes"; then
 	CFLAGS="-Wall $CFLAGS"
diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h
index bcd799ca2ab9c9be3badf66e3abd7896cf3fbf0e..
index ..ea4b7ec26f09e0af7adbd00efb7ca072dd44c96b 100644
--- a/src/ngircd/messages.h
+++ b/src/ngircd/messages.h
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: messages.h,v 1.35 2002/03/12 14:37:52 alex Exp $
+ * $Id: messages.h,v 1.36 2002/03/12 15:19:12 alex Exp $
  *
  * irc.h: IRC-Befehle (Header)
  */
@@ -23,7 +23,7 @@
 #define RPL_WELCOME_MSG			RPL_WELCOME" %s :Welcome to the Internet Relay Network %s"

 #define RPL_YOURHOST			"002"
-#define RPL_YOURHOST_MSG		RPL_YOURHOST" %s :Your host is %s, running ngircd "VERSION"-"P_OSNAME"/"P_ARCHNAME
+#define RPL_YOURHOST_MSG		RPL_YOURHOST" %s :Your host is %s, running ngircd "VERSION"-"TARGET_OS"/"TARGET_CPU

 #define RPL_CREATED			"003"
 #define RPL_CREATED_MSG			RPL_CREATED" %s :This server was started %s"
diff --git a/src/ngircd/ngircd.c b/src/ngircd/ngircd.c
index b78bed3aff06648d1db6f066699006edcd613d51..
index ..6c544164e7bc2afe9de515cfb13fadee01583284 100644
--- a/src/ngircd/ngircd.c
+++ b/src/ngircd/ngircd.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: ngircd.c,v 1.32 2002/03/12 14:37:52 alex Exp $
+ * $Id: ngircd.c,v 1.33 2002/03/12 15:19:12 alex Exp $
  *
  * ngircd.c: Hier beginnt alles ;-)
  */
@@ -271,7 +271,7 @@ GLOBAL CHAR *NGIRCd_VersionAddition( VOID )
 #endif

 	if( txt[0] ) strcat( txt, "-" );
-	strcat( txt, P_OSNAME"/"P_ARCHNAME );
+	strcat( txt, TARGET_OS"/"TARGET_CPU );

 	return txt;
 } /* NGIRCd_VersionAddition */
diff --git a/src/portab/portab.h b/src/portab/portab.h
index 8522441b3ccdfba1c6493ae7c72a2c0b47cb887b..
index ..779b9a3b6e2d12401bf0ba43dc4e29a2ac2a95b2 100644
--- a/src/portab/portab.h
+++ b/src/portab/portab.h
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: portab.h,v 1.1 2002/03/12 14:36:44 alex Exp $
+ * $Id: portab.h,v 1.2 2002/03/12 15:19:12 alex Exp $
  *
  * portab.h: "Portabilitaets-Definitionen"
  */
@@ -80,8 +80,17 @@ typedef UINT8 BOOLEAN;

 /* Konstanten */

-#define P_OSNAME "unknown"
-#define P_ARCHNAME "unknown"
+#ifndef TARGET_OS
+#define TARGET_OS "unknown"
+#endif
+
+#ifndef TARGET_CPU
+#define TARGET_CPU "unknown"
+#endif
+
+#ifndef TARGET_VENDOR
+#define TARGET_VENDOR "unknown"
+#endif


 #endif
diff --git a/src/portab/portabtest.c b/src/portab/portabtest.c
index 29ea7f60a52bdfc6cf37edca5eee45cd7b185630..
index ..8c3c44b4a09b0fe80500e104f6b244efe6a50051 100644
--- a/src/portab/portabtest.c
+++ b/src/portab/portabtest.c
@@ -9,7 +9,7 @@
  * Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
  * der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
  *
- * $Id: portabtest.c,v 1.1 2002/03/12 14:36:44 alex Exp $
+ * $Id: portabtest.c,v 1.2 2002/03/12 15:19:12 alex Exp $
  *
  * portabtest.c: Testprogramm fuer portab.h
  */
@@ -38,7 +38,7 @@ GLOBAL INT main( VOID )
 	}
 	else puts( "ok." );

-	puts( "- system type: "P_OSNAME"/"P_ARCHNAME );
+	puts( "- system type: "TARGET_OS"/"TARGET_CPU );

 	return ret;
 } /* main */

-----END OF PAGE-----