bug-mdk
[Top][All Lists]
Advanced

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

Re: [bug-mdk] Re: mdk-1.0 and snprintf()


From: Jose Antonio Ortega Ruiz
Subject: Re: [bug-mdk] Re: mdk-1.0 and snprintf()
Date: 09 Apr 2002 16:34:47 -0400
User-agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/21.1

hi nelson,

i think your solution below will indeed work, but i've thouhgt of a
cleaner one: i can replace snprintf() by g_snprintf(), from glib: it
is supposed to be portable to systems not providing the non-standard
one (in fact, i should have been using g_snprintf from the
beginning... sloppy coding on my side :( ).

what do you think? could you please check that this function is indeed
supported in your architecture?

thanks a lot for your feedback!

best regards,
jao



"Nelson H. F. Beebe" <address@hidden> writes:

> As a followup to my previous note about the use of the nonstandard
> snprintf() function in mdk-1.0, I just found that the rsync
> distribution from, e.g.,
> 
>       ftp://rsync.samba.org/pub/rsync/rsync-2.5.5.tar.gz
> 
> contains an implementation of snprintf(), whose comment header begins
> 
> /*
>  * Copyright Patrick Powell 1995
>  * This code is based on code written by Patrick Powell (address@hidden)
>  * It may be used for any purpose as long as this notice remains intact
>  * on all source code distributions
>  */
> 
> As an experiment, I copied that file into the mdk-1.0/lib directory,
> added it to the library with
> 
>       make snprintf.o
>       ar r libreplace.a snprintf.o
>       ranlib libreplace.a
> 
> then in the top-level directory, overrode the long LIBS setting by
> inserting a reference to libreplace.a at the start:
> 
>       make LIBS='-L/local/build/mdk-1.0/lib -lreplace -lhistory \
>               -lreadline -lncurses  -L/usr/local/lib -lguile -lm \
>               -L/usr/local/lib -lgmodule -lglib -L/usr/local/lib \
>               -L/usr/local/lib -lgtk -lgdk -lgmodule -lglib -lintl \
>               -lXext -lXext -lX11 -ldnet_stub -lm' check
> 
> All of the validation tests then passed.
> 
> It should thus be a simple matter in future mdk releases to
> incorporate this implementation of snprintf().
> 
> -------------------------------------------------------------------------------
> - Nelson H. F. Beebe                    Tel: +1 801 581 5254                  
> -
> - Center for Scientific Computing       FAX: +1 801 585 1640, +1 801 581 4148 
> -
> - University of Utah                    Internet e-mail: address@hidden  -
> - Department of Mathematics, 110 LCB        address@hidden  address@hidden -
> - 155 S 1400 E RM 233                       address@hidden                    
> -
> - Salt Lake City, UT 84112-0090, USA    URL: http://www.math.utah.edu/~beebe  
> -
> -------------------------------------------------------------------------------
> 
> _______________________________________________
> bug-mdk mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-mdk
> 

-- 
Keep me away from the wisdom which does not cry, the philosophy which does
not laugh and the greatness which does not bow before children.
                       -Kahlil Gibran, mystic, poet and artist (1883-1931)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]