mirror of
https://github.com/osmarks/ngircd.git
synced 2024-12-13 10:20:28 +00:00
portabtest: Code cleanup
This commit is contained in:
parent
9230f2fff1
commit
d913323ca9
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* ngIRCd -- The Next Generation IRC Daemon
|
* ngIRCd -- The Next Generation IRC Daemon
|
||||||
* Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
|
* Copyright (c)2001-2013 Alexander Barton (alex@barton.de) and Contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -24,33 +24,39 @@
|
|||||||
|
|
||||||
#include "exp.h"
|
#include "exp.h"
|
||||||
|
|
||||||
|
|
||||||
static void Panic PARAMS (( char *Reason, int Code ));
|
static void Panic PARAMS (( char *Reason, int Code ));
|
||||||
|
|
||||||
|
|
||||||
GLOBAL int
|
GLOBAL int
|
||||||
main(void)
|
main(void)
|
||||||
{
|
{
|
||||||
/* validate datatypes */
|
/* validate datatypes */
|
||||||
if( false != 0 ) Panic( "false", 1 );
|
if (false != 0)
|
||||||
if( true != 1 ) Panic( "true", 1 );
|
Panic("false", 1);
|
||||||
if( sizeof( UINT8 ) != 1 ) Panic( "UINT8", 1 );
|
if (true != 1)
|
||||||
if( sizeof( UINT16 ) != 2 ) Panic( "UINT16", 1 );
|
Panic("true", 1);
|
||||||
if( sizeof( UINT32 ) != 4 ) Panic( "UINT32", 1 );
|
if (sizeof(UINT8) != 1)
|
||||||
|
Panic("UINT8", 1);
|
||||||
|
if (sizeof(UINT16) != 2)
|
||||||
|
Panic("UINT16", 1);
|
||||||
|
if (sizeof(UINT32) != 4)
|
||||||
|
Panic("UINT32", 1);
|
||||||
|
|
||||||
#ifdef PROTOTYPES
|
#ifdef PROTOTYPES
|
||||||
/* check functions */
|
/* check functions */
|
||||||
if( ! snprintf ) Panic( "snprintf", 2 );
|
if (!snprintf)
|
||||||
if( ! vsnprintf ) Panic( "vsnprintf", 2 );
|
Panic("snprintf", 2);
|
||||||
if( ! strlcpy ) Panic( "strlcpy", 2 );
|
if (!vsnprintf)
|
||||||
if( ! strlcat ) Panic( "strlcat", 2 );
|
Panic("vsnprintf", 2);
|
||||||
|
if (!strlcpy)
|
||||||
|
Panic("strlcpy", 2);
|
||||||
|
if (!strlcat)
|
||||||
|
Panic("strlcat", 2);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ok, no error */
|
/* ok, no error */
|
||||||
return 0;
|
return 0;
|
||||||
} /* portab_check_types */
|
} /* portab_check_types */
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
Panic(char *Reason, int Code)
|
Panic(char *Reason, int Code)
|
||||||
{
|
{
|
||||||
@ -59,5 +65,4 @@ Panic( char *Reason, int Code )
|
|||||||
exit(Code);
|
exit(Code);
|
||||||
} /* Panic */
|
} /* Panic */
|
||||||
|
|
||||||
|
|
||||||
/* -eof- */
|
/* -eof- */
|
||||||
|
Loading…
Reference in New Issue
Block a user