summary refs log tree commit diff
path: root/src/portab/portabtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/portab/portabtest.c')
-rw-r--r--src/portab/portabtest.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/portab/portabtest.c b/src/portab/portabtest.c
new file mode 100644
index 00000000..29ea7f60
--- /dev/null
+++ b/src/portab/portabtest.c
@@ -0,0 +1,61 @@
+/*
+ * ngIRCd -- The Next Generation IRC Daemon
+ * Copyright (c)2001,2002 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 ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
+ *
+ * $Id: portabtest.c,v 1.1 2002/03/12 14:36:44 alex Exp $
+ *
+ * portabtest.c: Testprogramm fuer portab.h
+ */
+
+
+#include "portab.h"
+
+#include "imp.h"
+#include <stdio.h>
+
+#include "exp.h"
+
+
+LOCAL BOOLEAN portab_check_types( VOID );
+
+
+GLOBAL INT main( VOID )
+{
+	INT ret = 0;
+
+	printf( "- datatypes: ");
+	if( ! portab_check_types( ))
+	{
+		puts( "FAILED!" );
+		ret = 1;
+	}
+	else puts( "ok." );
+
+	puts( "- system type: "P_OSNAME"/"P_ARCHNAME );
+
+	return ret;
+} /* main */
+
+
+LOCAL BOOLEAN portab_check_types( VOID )
+{
+	if( FALSE != 0 ) return 0;
+	if( TRUE != 1 ) return 0;
+	if( sizeof( INT8 ) != 1 ) return 0;
+	if( sizeof( UINT8 ) != 1 ) return 0;
+	if( sizeof( INT16 ) != 2 ) return 0;
+	if( sizeof( UINT16 ) != 2 ) return 0;
+	if( sizeof( INT32 ) != 4 ) return 0;
+	if( sizeof( UINT32 ) != 4 ) return 0;
+	return 1;
+} /* portab_check_types */
+
+
+/* -eof- */