/* * include files for C library of the host. Currently only tested * with glibc 2.31. */ #define _XOPEN_SOURCE 600 #include #include #include #include #include int putstring( char *s ) { printf( "%s", s ); return 0; } int putint( int i ) { printf( "%d", i ); return i; } int putnl( void ) { return puts( "" ); } char *itoa( int v, char *s, int base ) { switch( base ) { case 10: sprintf( s, "%d", v ); return s; case 16: sprintf( s, "%x", v ); return s; default: return NULL; } }