- writev (fileno (stderr), iob, iov - iob);
-#else
- if (invo_name && *invo_name)
- fprintf (stderr, "%s: ", invo_name);
- vfprintf (stderr, fmt, ap);
-
- if (what) {
- char *s;
-
- if (*what)
- fprintf (stderr, " %s: ", what);
- if ((s = strerror(eindex)))
- fprintf (stderr, "%s", s);
- else
- fprintf (stderr, "Error %d", eindex);
+ if (writev (fileno (stderr), iob, iov - iob) < 0) {
+ snprintf(buffer, sizeof buffer, "%s: write stderr failed: %d\n",
+ invo_name && *invo_name ? invo_name : "nmh", errno);
+ if (write(2, buffer, strlen(buffer)) == -1) {
+ /* Ignore. if-statement needed to shut up compiler. */
+ }