On Oct 4, 2007, at 3:21 AM, Bruno Haible wrote:
Hello Benoit,I was looking for a portable replacement of `trunc' for systems where it is not be available. I saw that gnulib had that (http:// www.gnu.org/software/gnulib/manual/html_node/trunc.html)Well, there is a misunderstanding here. That doc says that 1) gnulib has no module supporting this function,2) all known portability problems are in the "not fixed by gnulib" category.
Sorry but the doc is very misleading then. Here is what happened to me: I went to the gnulib manual to find whether it has a replacement for `trunc'. I ended up on the page above by simply search for "trunc" in the index page. That page is located in the section "Function Substitutes" which starts by stating "This chapter describes which functions [..] are substituted by Gnulib". The fact that it said "Gnulib module: —" sounded weird to me, but I found that since this was a single and simple function, it could be that there is no need to make a whole module around it. The "Portability problems not fixed by Gnulib:" simply told me that the replacement function wasn't working on the architectures listed but since I don't target these for the time being, it didn't disturb me.
If the function is not available, why is it there in the first place? If the intent of the doc is to list all functions with possible portability issues (sic!), why not write something more explicit such as "Gnulib module: @emph{not available}."?
invoked path/to/gnulib-tool --import trunc. It did what it was meant to do but there was still no trace of `trunc' in my source treeNow wonder...But since trunc() is a particularly easy function to implement, I implementedthis now. Also updating the doc.
I'll give it a try, thanks. -- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
PGP.sig
Description: This is a digitally signed message part