- 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 */
+ /* validate datatypes */
+ if( false != 0 ) Panic( "false", 1 );
+ if( true != 1 ) Panic( "true", 1 );
+ if( sizeof( UINT8 ) != 1 ) Panic( "UINT8", 1 );
+ if( sizeof( UINT16 ) != 2 ) Panic( "UINT16", 1 );
+ if( sizeof( UINT32 ) != 4 ) Panic( "UINT32", 1 );
+
+#ifdef PROTOTYPES
+ /* check functions */
+ if( ! snprintf ) Panic( "snprintf", 2 );
+ if( ! vsnprintf ) Panic( "vsnprintf", 2 );
+ if( ! strlcpy ) Panic( "strlcpy", 2 );
+ if( ! strlcat ) Panic( "strlcat", 2 );
+#endif
+
+ /* ok, no error */
+ return 0;
+} /* portab_check_types */