From 2e5e2bc048019c2e5058870835113e6f3302c4ca Mon Sep 17 00:00:00 2001 From: John van Groningen Date: Thu, 25 Nov 2010 13:41:14 +0000 Subject: if close_file succeeds yield 1 on IA32 and AMD64 instead of -1 --- ufileIO2.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ufileIO2.c b/ufileIO2.c index 31c111c..91e488e 100644 --- a/ufileIO2.c +++ b/ufileIO2.c @@ -64,6 +64,12 @@ struct clean_string { #endif }; +#ifdef I486 +# define CLEAN_TRUE 1 +#else +# define CLEAN_TRUE (-1) +#endif + static struct file file_table [MAX_N_FILES]; #ifdef LINUX @@ -393,7 +399,7 @@ int close_file (long fn) if (ferror (stdin) || ferror (stdout)) return 0; } - return -1; + return CLEAN_TRUE; } else { struct file *f; int result; @@ -403,7 +409,7 @@ int close_file (long fn) if (f->file==NULL) IO_error ("FClose: File not open"); - result=-1; + result=CLEAN_TRUE; if (fclose (f->file)!=0) result=0; -- cgit v1.2.3