2 * ngIRCd -- The Next Generation IRC Daemon
3 * Copyright (c)2001,2002 by Alexander Barton (alex@barton.de)
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 * Please read the file COPYING, README and AUTHORS for more information.
11 * test program for portab.h and friends ;-)
17 static char UNUSED id[] = "$Id: portabtest.c,v 1.13 2005/07/31 20:13:11 alex Exp $";
28 static void Panic PARAMS (( char *Reason, int Code ));
34 /* validate datatypes */
35 if( false != 0 ) Panic( "false", 1 );
36 if( true != 1 ) Panic( "true", 1 );
37 if( sizeof( UINT8 ) != 1 ) Panic( "UINT8", 1 );
38 if( sizeof( UINT16 ) != 2 ) Panic( "UINT16", 1 );
39 if( sizeof( UINT32 ) != 4 ) Panic( "UINT32", 1 );
43 if( ! snprintf ) Panic( "snprintf", 2 );
44 if( ! vsnprintf ) Panic( "vsnprintf", 2 );
45 if( ! strlcpy ) Panic( "strlcpy", 2 );
46 if( ! strlcat ) Panic( "strlcat", 2 );
51 } /* portab_check_types */
55 Panic( char *Reason, int Code )
57 /* Oops, something failed!? */
58 fprintf( stderr, "Oops, test for %s failed!?", Reason );