X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Flib%2Fi386%2Fv3-xed-compat.c;h=6ce5f107ba64f93cdfd71e13739f3d8de6bffd1a;hb=0246f0904a4800dbe1e8e23332d49b468a58f751;hp=2c6638132826e79cf371d29255ee4d44a7cac1e9;hpb=d34450b1e6fe3c2e1295c268c1722c669ba8d545;p=palacios.git diff --git a/palacios/lib/i386/v3-xed-compat.c b/palacios/lib/i386/v3-xed-compat.c index 2c66381..6ce5f10 100644 --- a/palacios/lib/i386/v3-xed-compat.c +++ b/palacios/lib/i386/v3-xed-compat.c @@ -4,33 +4,41 @@ /* Standard I/O predefined streams */ static FILE _streams = {0, 0, 0, 0, 0, NULL, NULL, 0, 0}; +#ifdef V3_CONFIG_BUILT_IN_STDIN FILE *stdin = (&_streams); +#endif + +#ifdef V3_CONFIG_BUILT_IN_STDOUT FILE *stdout = (&_streams); +#endif + +#ifdef V3_CONFIG_BUILT_IN_STDERR FILE *stderr = (&_streams); +#endif -int fprintf(FILE *file, char *fmt, ...) -{ +#ifdef V3_CONFIG_BUILT_IN_FPRINTF +int fprintf(FILE *file, char *fmt, ...) { // PrintDebug("In fprintf!!\n"); - return 0; } +#endif -int printf(char *fmt, ...) -{ +#ifdef V3_CONFIG_BUILT_IN_PRINTF +int printf(char *fmt, ...) { // PrintDebug("In fprintf!!\n"); - return 0; - } +#endif -int fflush(FILE *stream) -{ +#ifdef V3_CONFIG_BUILT_IN_FFLUSH +int fflush(FILE *stream) { //PrintDebug("In fflush!!\n"); - return 0; } +#endif +#ifdef V3_CONFIG_BUILT_IN_ABORT void abort(void) { //PrintDebug("Abort!!\n"); @@ -38,7 +46,6 @@ void abort(void) //__asm__ __volatile__("trap"); //__builtin_unreached(); - - while(1); - + while(1); } +#endif