On Wed, Dec 30, 2009 at 10:44:23AM -0200, Gustavo Sverzut Barbieri wrote:
> > Unfortunately there is no safe way of printing it in C89 (ie windows).
> > The best way is:
> >        printf("... %ld..",(unsigned int)blah);

%ld and unsigned int? You must be joking... Defining PRIdMAX and friends
can be easily automated.

> Given that in many places we use those for logging and logging should
> move to EINA_LOG and some systems do not handle "%s" with NULL (ie:
> Solaris, BSDs...), isn't it better to follow Glib/Gstreamer logging
> and provide our own printf() on these systems, doing clean C99 with
> GNU niceness (%s+NULL) and avoid ugly thing spread in code?

IMO it is still better to fix the programs. Besides, printf with NULL is
checked for on many systems (like the BSDs), the real problem is that
GCC sometimes decides to replace printf with fputs, which doesn't...

Joerg

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to