This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: egcs-980315, gen*.c system.h and fatal() using stdarg/varargs


 > From: Jeffrey A Law <law@cygnus.com>
 > 
 >   In message <199803251901.OAA02514@caip.rutgers.edu>you write:
 >   > 	Getting gcc to cleanly link with libiberty and ironing out all
 >   > the related issues is IMHO a non-trivial task.  It would require someone
 >   > taking ownership to see it through.  When this last came up, I don't
 >   > think there were any takers.  I could be mis-remembering the
 >   > conversation though...  Best check the archive. 
 > 
 > I doubt it would be as bad as you think.  Most other tools already
 > link in libiberty -- gcc is the exception, not the rule.
 > 
 > I think we tabled it until we were further along with some of the
 > warnings/system.h stuff.  Now may be the time to deal with it.
 > jeff

	Well, linking with libiberty would provide the following
module to replace vfprintf():

 > #include <stdio.h>
 > #include <varargs.h>
 > #include <ansidecl.h>
 > #undef vfprintf
 >  
 > int
 > vfprintf (file, format, ap)
 >      FILE *file;
 >      const char *format;
 >      va_list ap;
 > {
 >    return _doprnt (format, ap, file);
 > }


	Note, this is less functional than what I propose since my
solution also accounts for _doprnt not being present.  I still think
the patch I posted is the best alternative, especially since the
current gcc source uses many variants of what I consolidated into one
file.

	If Robert wants to champion libiberty, I support that as an
eventual goal.  However I can't imagine it being as easy as adding a 15
line macro to system.h.  Therefore it should be a considered seperate
issue tangential to the problem I am trying to solve. 

		--Kaveh
--
Kaveh R. Ghazi			Project Manager / Custom Development
ghazi@caip.rutgers.edu		Icon CMT Corp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]