This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

diag_printf("%016llx\n", ll)


In .../packages/infra/current/src/diag.cxx we have the
following comment.

/* The prototype for diag_printf in diag.h is defined using K&R syntax  
*/
/* to allow us to use a variable number of arguments in the call without
*/
/* using ellipses, which would require use of varargs stuff. If we ever 
*/
/* need to support arguments that are not simple words, we may need to  
*/
/* use varargs.                                                         
*/
/* For the actual implementation, a normal ANSI C prototype is          
*/
/*
acceptable.                                                           
*/

Well, printing of 64 bit integers is indeed broken.

Is the avoidence of varargs still a concern, or can I just
convert diag_vprintf to use varargs?

Other possibilities include;
- an ifdefed version of diag_vprintf that uses varargs
  if CYGDBG_INFRA_DIAG_PRINTF_USE_VARARG is defined

- use cyg_uint64 to hold the args in diag_printf instead of
CYG_ADDRWORD.

Comments?

-- 
Chris Morrow	YottaYotta Inc. email: cmorrow@yottayotta.com
phone: (780) 989 6814 web:	http:  //www.yottayotta.com


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