Am Samstag 19 August 2006 17:28 schrieb Steve Greenland: > On 18-Aug-06, 16:48 (CDT), Hendrik Sattler <[EMAIL PROTECTED]> wrote: > > No, %m is, according to printf(2) manpage: > > m (Glibc extension.) Print output of strerror(errno). No argument > > is required. > > > > So why isn't > > printf("%s\n",strerror(errno)); > > used instead of > > printf("%m\n"); > > ? > > Not like a problem in Debian GNU/* but you should tell upstream about > > questionable coding style and portability. > > The "%m" idiom is pretty widespread, actually, and not only a Glibc > extension. But the "strerror(errno)" form is definitely superior for > portability.
And there is always perror() which is something like: printf("%s%s%s\n",(s?s:""),(s?": ":""),strerror(errno)); So, using something like: perror(__FUNCTION__); of perror(NULL); is probably a good idea. HS -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]