Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sprintf



Thanks Stephen. This worked! I thought I would get a name clash, but of
course that is what the pre in pre-processor means :-).

>What's wrong with
>
>#if GCC_ON_SUN
>#include <stdarg.h>
>int replacement_for_broken_Sun_sprintf(char *buf,const char *fmt,...){
>    va_list argptr;
>    va_start(argptr,fmt);
>    int sz=vsprintf(buf,fmt,argptr);
>    va_end(argptr);
>    return sz;
>}
>#define sprintf replacement_for_broken_Sun_sprintf
>#endif
>

-----------------------------------------------------------------
a word from the sponsor will appear below
-----------------------------------------------------------------
The TLUG mailing list is proudly sponsored by TWICS - Japan's First
Public-Access Internet System.  Now offering 20,000 yen/year flat
rate Internet access with no time charges.  Full line of corporate
Internet and intranet products are available.   info@example.com
Tel: 03-3351-5977   Fax: 03-3353-6096


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links