about summary refs log tree commit diff
path: root/src/portab
diff options
context:
space:
mode:
Diffstat (limited to 'src/portab')
-rw-r--r--src/portab/portab.h26
-rw-r--r--src/portab/portabtest.c10
-rw-r--r--src/portab/vsnprintf.c4
3 files changed, 32 insertions, 8 deletions
diff --git a/src/portab/portab.h b/src/portab/portab.h
index 3de168e3..53345bb7 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.5 2002/05/19 10:49:23 alex Exp $
+ * $Id: portab.h,v 1.6 2002/05/27 13:01:58 alex Exp $
  *
  * portab.h: "Portabilitaets-Definitionen"
  */
@@ -22,6 +22,18 @@
 #include "config.h"
 
 
+/* Compiler Features */
+
+
+#ifndef PARAMS
+# if PROTOTYPES
+#  define PARAMS(args) args
+# else
+#  define PARAMS(args) ()
+# endif
+#endif
+
+
 /* Keywords */
 
 #define EXTERN extern
@@ -32,6 +44,12 @@
 
 /* Datatentypen */
 
+#ifndef PROTOTYPES
+# ifndef signed
+#  define signed
+# endif
+#endif
+
 typedef void VOID;
 typedef void POINTER;
 
@@ -57,7 +75,11 @@ typedef UINT8 BOOLEAN;
 #define FALSE (BOOLEAN)0
 
 #undef NULL
-#define NULL (VOID *)0
+#ifdef PROTOTYPES
+# define NULL (VOID *)0
+#else
+# define NULL 0L
+#endif
 
 #undef GLOBAL
 #define GLOBAL
diff --git a/src/portab/portabtest.c b/src/portab/portabtest.c
index a802f87b..14cbc008 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.3 2002/03/12 21:47:40 alex Exp $
+ * $Id: portabtest.c,v 1.4 2002/05/27 13:01:40 alex Exp $
  *
  * portabtest.c: Testprogramm fuer portab.h
  */
@@ -23,10 +23,11 @@
 #include "exp.h"
 
 
-LOCAL BOOLEAN portab_check_types( VOID );
+LOCAL BOOLEAN portab_check_types PARAMS(( VOID ));
 
 
-GLOBAL INT main( VOID )
+GLOBAL int
+main( VOID )
 {
 	INT ret = 0;
 
@@ -44,7 +45,8 @@ GLOBAL INT main( VOID )
 } /* main */
 
 
-LOCAL BOOLEAN portab_check_types( VOID )
+LOCAL BOOLEAN
+portab_check_types( VOID )
 {
 	if( FALSE != 0 ) return 0;
 	if( TRUE != 1 ) return 0;
diff --git a/src/portab/vsnprintf.c b/src/portab/vsnprintf.c
index b949b9c6..8cd7b784 100644
--- a/src/portab/vsnprintf.c
+++ b/src/portab/vsnprintf.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: vsnprintf.c,v 1.2 2002/05/19 10:44:52 alex Exp $
+ * $Id: vsnprintf.c,v 1.3 2002/05/27 13:01:04 alex Exp $
  *
  * vsnprintf.c: u.a. Ersatz fuer vsnprintf()
  */
@@ -98,7 +98,7 @@
 /* only include stdio.h if we are not re-defining snprintf or vsnprintf */
 #include <stdio.h>
 /* make the compiler happy with an empty file */
-void dummy_snprintf(void) {} 
+void dummy_snprintf PARAMS(( void )) { }
 #else
 
 #ifdef HAVE_LONG_DOUBLE