delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | kendall.sfbr.org: jeffw set sender to jeffw AT darwin DOT sfbr DOT org using -f |
Date: | Thu, 27 Feb 2003 09:57:59 -0600 |
From: | JT Williams <jeffw AT darwin DOT sfbr DOT org> |
To: | djgpp-workers AT delorie DOT com |
Subject: | Re: perror |
Message-ID: | <20030227155759.GA3540@kendall.sfbr.org> |
Mail-Followup-To: | djgpp-workers AT delorie DOT com |
References: | <20030227150458 DOT GA3476 AT kendall DOT sfbr DOT org> <1046360051 DOT 30750 DOT 3 DOT camel AT leeloo> |
Mime-Version: | 1.0 |
In-Reply-To: | <1046360051.30750.3.camel@leeloo> |
User-Agent: | Mutt/1.4i |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Second version of perror.c patch: --- perror.orig 1994-12-10 21:52:02.000000000 -0600 +++ perror.c 2003-02-27 09:52:48.223807000 -0600 @@ -6,5 +6,7 @@ void perror(const char *s) { - fprintf(stderr, "%s: %s\n", s, strerror(errno)); + if ((s && *s) || (strcmp(s, "") == 0)) + fprintf(stderr, "%s: ", s); + fprintf(stderr, "%s\n", strerror(errno)); }
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |