blob: a802f87bfe4e366efa63e244812c4c3f073f6709 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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.3 2002/03/12 21:47:40 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: "TARGET_CPU"/"TARGET_VENDOR"/"TARGET_OS );
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- */
|