read_ret_type include fix
korbb@egcs.cygnus.com
korbb@egcs.cygnus.com
Wed Jun 23 11:38:00 GMT 1999
Hi Philippe,
It looks like I commented it out when I was backing out
fixes from the SVR4 "fixinc.svr4" file. Below is a proposed
diff. I have added a selection clause because the "select"
is done internally without forking off another process.
I would like you to consider the select clause and propose
any improvements. The requirement is:
1. It must be positive for all "stdio.h" header files that
require this fix.
It is desireable to:
2. Be negative as often as possible whenever the fix is not
required to avoid new process overhead
It is nice if:
3. The selection expression is as simple as possible to both
process and uderstand by people. :-)
That in mind, here is the proposed patch:
Index: inclhack.def
===================================================================
RCS file: /cvs/egcs/egcs/gcc/fixinc/inclhack.def,v
retrieving revision 1.29
diff -u -r1.29 inclhack.def
@@ -1235,15 +1235,14 @@
/*
* Fix return type of fread and fwrite on sysV68
*/
-#ifdef LATER
fix = {
hackname = read_ret_type;
files = stdio.h;
+ select = "extern int\t.*, fread\\(\\), fwrite\\(\\)";
sed = "s/^\\(extern int\tfclose(), fflush()\\), "
"\\(fread(), fwrite()\\)\\(.*\\)$"
"/extern unsigned int\t\\2;\\\n\\1\\3/";
};
-#endif
/*
More information about the Gcc-patches
mailing list