Hi Hrvoje :) * Hrvoje Niksic <[EMAIL PROTECTED]> dixit: > Using #ifdefs to switch between %d/%lld/%j *is* completely portable, > but it requires three translations for each message. The translators > would feast on my flesh, howling at the moonlight.
Sure ;)) Anyway, it will happen in just a couple of places. I mean, it's not like triplicating the number of messages... > Hmm. How about preprocessing the formats before passing them to > printf? That will help with the translation, obviously, but as I said above, if the number of affected messages is short... > > That's the better I can get, because when I wrote portable code, by > > portable I understand 'according to standards'. For me that means, > > in that order: SuSv3, POSIX, C99, C89, stop. No pre-ANSI and no > > brain damaged compilers. > I understand your position -- it's perfectly valid, especially when > you have the privilege of working on a system that supports all > those standards well. But many people don't, and Wget (along with > most GNU software of the era) was written to work for them as well. Of course. Moreover, my software is not used for as many users as wget is. In fact, wget is the standard for URL retrieving under UNIX (together with curl). It really worths the effort making fully portable and runnable in as many systems as possible. I like portability, and in fact I try my best to write my software portably, and that include, for example, tweaking a bit with types, not assuming anything, etc... but that doesn't include bad-behaviour systems: weird libc's, systems where off_t should be 64 but due to some lazy programmer it's 32 by mistake, etc... In other words, I adhere to standards (even old ones if necessary), but I don't go out from them for supporting weird systems (pre-ANSI, for example). I have that vision of portability mainly because non standard systems have been biting me until I started to use Linux (1995 or so...). > For me, portability is not about adhering to standards, > it's about making programs work in a wide range of environments, > some of which differ from yours. I think that standards are good, so my opinion. But I'm with you: this is not applicable for wget. You are so kind for supporting such a variety of systems. I wouldn't support them, but fortunately for wget users, I'm not the maintainer :)) I must confess that lately my vision of portability have been reduced to 'can compile under Linux or at least under a SuSv3 or POSIX system'. Please note that this is not arbitrary: just like you want wget to be able to run in a wide range of environment, I don't like to punish performance or power of my software just to make it run in a system I don't feel like supporting. Anyway, I'm not radical with this: each piece of software must be dealt with in its unique way. Just in case you need, I have the entire ANSI C 99 standard, even with the rationale, so if you don't have it and want to know something, please feel free to ask. I'll try to help as much as I can. > Thanks for your suggestions. Thanks to you for considering and for wget, really. It saves me a lot of effort and time when dowloading Linux distros :))) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/