- Anpassungen an pre-ANSI-Compiler.
This commit is contained in:
parent
1934257636
commit
ba258e65a0
@ -9,7 +9,7 @@
|
|||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
||||||
*
|
*
|
||||||
* $Id: ngircd.c,v 1.45 2002/05/18 12:20:02 alex Exp $
|
* $Id: ngircd.c,v 1.46 2002/05/27 13:00:50 alex Exp $
|
||||||
*
|
*
|
||||||
* ngircd.c: Hier beginnt alles ;-)
|
* ngircd.c: Hier beginnt alles ;-)
|
||||||
*/
|
*/
|
||||||
@ -29,29 +29,32 @@
|
|||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include "channel.h"
|
#include "resolve.h"
|
||||||
#include "client.h"
|
|
||||||
#include "conf.h"
|
|
||||||
#include "conn.h"
|
#include "conn.h"
|
||||||
|
#include "client.h"
|
||||||
|
#include "channel.h"
|
||||||
|
#include "conf.h"
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "irc.h"
|
#include "lists.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
|
#include "irc.h"
|
||||||
|
|
||||||
#include "exp.h"
|
#include "exp.h"
|
||||||
#include "ngircd.h"
|
#include "ngircd.h"
|
||||||
|
|
||||||
|
|
||||||
LOCAL VOID Initialize_Signal_Handler( VOID );
|
LOCAL VOID Initialize_Signal_Handler PARAMS(( VOID ));
|
||||||
LOCAL VOID Signal_Handler( INT Signal );
|
LOCAL VOID Signal_Handler PARAMS(( INT Signal ));
|
||||||
|
|
||||||
LOCAL VOID Initialize_Listen_Ports( VOID );
|
LOCAL VOID Initialize_Listen_Ports PARAMS(( VOID ));
|
||||||
|
|
||||||
LOCAL VOID Show_Version( VOID );
|
LOCAL VOID Show_Version PARAMS(( VOID ));
|
||||||
LOCAL VOID Show_Help( VOID );
|
LOCAL VOID Show_Help PARAMS(( VOID ));
|
||||||
|
|
||||||
|
|
||||||
GLOBAL int main( int argc, const char *argv[] )
|
GLOBAL int
|
||||||
|
main( int argc, const char *argv[] )
|
||||||
{
|
{
|
||||||
BOOLEAN ok, configtest = FALSE;
|
BOOLEAN ok, configtest = FALSE;
|
||||||
INT32 pid, n;
|
INT32 pid, n;
|
||||||
@ -177,8 +180,8 @@ GLOBAL int main( int argc, const char *argv[] )
|
|||||||
|
|
||||||
if( ! ok )
|
if( ! ok )
|
||||||
{
|
{
|
||||||
printf( PACKAGE": invalid option \"-%c\"!\n", argv[i][n] );
|
printf( "%s: invalid option \"-%c\"!\n", PACKAGE, argv[i][n] );
|
||||||
puts( "Try \""PACKAGE" --help\" for more information." );
|
printf( "Try \"%s --help\" for more information.\n", PACKAGE );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -186,8 +189,8 @@ GLOBAL int main( int argc, const char *argv[] )
|
|||||||
}
|
}
|
||||||
if( ! ok )
|
if( ! ok )
|
||||||
{
|
{
|
||||||
printf( PACKAGE": invalid option \"%s\"!\n", argv[i] );
|
printf( "%s: invalid option \"%s\"!\n", PACKAGE, argv[i] );
|
||||||
puts( "Try \""PACKAGE" --help\" for more information." );
|
printf( "Try \"%s --help\" for more information.\n", PACKAGE );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -230,7 +233,7 @@ GLOBAL int main( int argc, const char *argv[] )
|
|||||||
if( pid < 0 )
|
if( pid < 0 )
|
||||||
{
|
{
|
||||||
/* Fehler */
|
/* Fehler */
|
||||||
printf( PACKAGE": Can't fork: %s!\nFatal error, exiting now ...", strerror( errno ));
|
printf( "%s: Can't fork: %s!\nFatal error, exiting now ...\n", PACKAGE, strerror( errno ));
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,7 +250,9 @@ GLOBAL int main( int argc, const char *argv[] )
|
|||||||
|
|
||||||
/* Module initialisieren */
|
/* Module initialisieren */
|
||||||
Log_Init( );
|
Log_Init( );
|
||||||
|
Resolve_Init( );
|
||||||
Conf_Init( );
|
Conf_Init( );
|
||||||
|
Lists_Init( );
|
||||||
Channel_Init( );
|
Channel_Init( );
|
||||||
Client_Init( );
|
Client_Init( );
|
||||||
Conn_Init( );
|
Conn_Init( );
|
||||||
@ -288,7 +293,7 @@ GLOBAL int main( int argc, const char *argv[] )
|
|||||||
Conn_Exit( );
|
Conn_Exit( );
|
||||||
Client_Exit( );
|
Client_Exit( );
|
||||||
Channel_Exit( );
|
Channel_Exit( );
|
||||||
Conf_Exit( );
|
Lists_Exit( );
|
||||||
Log_Exit( );
|
Log_Exit( );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,16 +301,18 @@ GLOBAL int main( int argc, const char *argv[] )
|
|||||||
} /* main */
|
} /* main */
|
||||||
|
|
||||||
|
|
||||||
GLOBAL CHAR *NGIRCd_Version( VOID )
|
GLOBAL CHAR *
|
||||||
|
NGIRCd_Version( VOID )
|
||||||
{
|
{
|
||||||
STATIC CHAR version[126];
|
STATIC CHAR version[126];
|
||||||
|
|
||||||
sprintf( version, PACKAGE" version "VERSION"-%s", NGIRCd_VersionAddition( ));
|
sprintf( version, "%s version %s-%s", PACKAGE, VERSION, NGIRCd_VersionAddition( ));
|
||||||
return version;
|
return version;
|
||||||
} /* NGIRCd_Version */
|
} /* NGIRCd_Version */
|
||||||
|
|
||||||
|
|
||||||
GLOBAL CHAR *NGIRCd_VersionAddition( VOID )
|
GLOBAL CHAR *
|
||||||
|
NGIRCd_VersionAddition( VOID )
|
||||||
{
|
{
|
||||||
STATIC CHAR txt[64];
|
STATIC CHAR txt[64];
|
||||||
|
|
||||||
@ -339,7 +346,8 @@ GLOBAL CHAR *NGIRCd_VersionAddition( VOID )
|
|||||||
} /* NGIRCd_VersionAddition */
|
} /* NGIRCd_VersionAddition */
|
||||||
|
|
||||||
|
|
||||||
LOCAL VOID Initialize_Signal_Handler( VOID )
|
LOCAL VOID
|
||||||
|
Initialize_Signal_Handler( VOID )
|
||||||
{
|
{
|
||||||
/* Signal-Handler initialisieren: einige Signale
|
/* Signal-Handler initialisieren: einige Signale
|
||||||
* werden ignoriert, andere speziell behandelt. */
|
* werden ignoriert, andere speziell behandelt. */
|
||||||
@ -385,7 +393,8 @@ LOCAL VOID Initialize_Signal_Handler( VOID )
|
|||||||
} /* Initialize_Signal_Handler */
|
} /* Initialize_Signal_Handler */
|
||||||
|
|
||||||
|
|
||||||
LOCAL VOID Signal_Handler( INT Signal )
|
LOCAL VOID
|
||||||
|
Signal_Handler( INT Signal )
|
||||||
{
|
{
|
||||||
/* Signal-Handler. Dieser wird aufgerufen, wenn eines der Signale eintrifft,
|
/* Signal-Handler. Dieser wird aufgerufen, wenn eines der Signale eintrifft,
|
||||||
* fuer das wir uns registriert haben (vgl. Initialize_Signal_Handler). Die
|
* fuer das wir uns registriert haben (vgl. Initialize_Signal_Handler). Die
|
||||||
@ -418,7 +427,8 @@ LOCAL VOID Signal_Handler( INT Signal )
|
|||||||
} /* Signal_Handler */
|
} /* Signal_Handler */
|
||||||
|
|
||||||
|
|
||||||
LOCAL VOID Initialize_Listen_Ports( VOID )
|
LOCAL VOID
|
||||||
|
Initialize_Listen_Ports( VOID )
|
||||||
{
|
{
|
||||||
/* Ports, auf denen der Server Verbindungen entgegennehmen
|
/* Ports, auf denen der Server Verbindungen entgegennehmen
|
||||||
* soll, initialisieren */
|
* soll, initialisieren */
|
||||||
@ -435,13 +445,14 @@ LOCAL VOID Initialize_Listen_Ports( VOID )
|
|||||||
if( created < 1 )
|
if( created < 1 )
|
||||||
{
|
{
|
||||||
Log( LOG_ALERT, "Server isn't listening on a single port!" );
|
Log( LOG_ALERT, "Server isn't listening on a single port!" );
|
||||||
Log( LOG_ALERT, PACKAGE" exiting due to fatal errors!" );
|
Log( LOG_ALERT, "%s exiting due to fatal errors!", PACKAGE );
|
||||||
exit( 1 );
|
exit( 1 );
|
||||||
}
|
}
|
||||||
} /* Initialize_Listen_Ports */
|
} /* Initialize_Listen_Ports */
|
||||||
|
|
||||||
|
|
||||||
LOCAL VOID Show_Version( VOID )
|
LOCAL VOID
|
||||||
|
Show_Version( VOID )
|
||||||
{
|
{
|
||||||
puts( NGIRCd_Version( ));
|
puts( NGIRCd_Version( ));
|
||||||
puts( "Copyright (c)2001,2002 by Alexander Barton (<alex@barton.de>)." );
|
puts( "Copyright (c)2001,2002 by Alexander Barton (<alex@barton.de>)." );
|
||||||
@ -451,7 +462,8 @@ LOCAL VOID Show_Version( VOID )
|
|||||||
} /* Show_Version */
|
} /* Show_Version */
|
||||||
|
|
||||||
|
|
||||||
LOCAL VOID Show_Help( VOID )
|
LOCAL VOID
|
||||||
|
Show_Help( VOID )
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
puts( " -d, --debug log extra debug messages" );
|
puts( " -d, --debug log extra debug messages" );
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* 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"
|
* portab.h: "Portabilitaets-Definitionen"
|
||||||
*/
|
*/
|
||||||
@ -22,6 +22,18 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
|
|
||||||
|
/* Compiler Features */
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef PARAMS
|
||||||
|
# if PROTOTYPES
|
||||||
|
# define PARAMS(args) args
|
||||||
|
# else
|
||||||
|
# define PARAMS(args) ()
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Keywords */
|
/* Keywords */
|
||||||
|
|
||||||
#define EXTERN extern
|
#define EXTERN extern
|
||||||
@ -32,6 +44,12 @@
|
|||||||
|
|
||||||
/* Datatentypen */
|
/* Datatentypen */
|
||||||
|
|
||||||
|
#ifndef PROTOTYPES
|
||||||
|
# ifndef signed
|
||||||
|
# define signed
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef void VOID;
|
typedef void VOID;
|
||||||
typedef void POINTER;
|
typedef void POINTER;
|
||||||
|
|
||||||
@ -57,7 +75,11 @@ typedef UINT8 BOOLEAN;
|
|||||||
#define FALSE (BOOLEAN)0
|
#define FALSE (BOOLEAN)0
|
||||||
|
|
||||||
#undef NULL
|
#undef NULL
|
||||||
#define NULL (VOID *)0
|
#ifdef PROTOTYPES
|
||||||
|
# define NULL (VOID *)0
|
||||||
|
#else
|
||||||
|
# define NULL 0L
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef GLOBAL
|
#undef GLOBAL
|
||||||
#define GLOBAL
|
#define GLOBAL
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* 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
|
* portabtest.c: Testprogramm fuer portab.h
|
||||||
*/
|
*/
|
||||||
@ -23,10 +23,11 @@
|
|||||||
#include "exp.h"
|
#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;
|
INT ret = 0;
|
||||||
|
|
||||||
@ -44,7 +45,8 @@ GLOBAL INT main( VOID )
|
|||||||
} /* main */
|
} /* main */
|
||||||
|
|
||||||
|
|
||||||
LOCAL BOOLEAN portab_check_types( VOID )
|
LOCAL BOOLEAN
|
||||||
|
portab_check_types( VOID )
|
||||||
{
|
{
|
||||||
if( FALSE != 0 ) return 0;
|
if( FALSE != 0 ) return 0;
|
||||||
if( TRUE != 1 ) return 0;
|
if( TRUE != 1 ) return 0;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
* Naehere Informationen entnehmen Sie bitter der Datei COPYING. Eine Liste
|
||||||
* der an ngIRCd beteiligten Autoren finden Sie in der Datei AUTHORS.
|
* 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()
|
* vsnprintf.c: u.a. Ersatz fuer vsnprintf()
|
||||||
*/
|
*/
|
||||||
@ -98,7 +98,7 @@
|
|||||||
/* only include stdio.h if we are not re-defining snprintf or vsnprintf */
|
/* only include stdio.h if we are not re-defining snprintf or vsnprintf */
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
/* make the compiler happy with an empty file */
|
/* make the compiler happy with an empty file */
|
||||||
void dummy_snprintf(void) {}
|
void dummy_snprintf PARAMS(( void )) { }
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef HAVE_LONG_DOUBLE
|
#ifdef HAVE_LONG_DOUBLE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user