[tz] A small first step in merging NetBSD changes into tzcode
kre at munnari.OZ.AU
Thu Jan 5 07:40:27 UTC 2023
Date: Wed, 4 Jan 2023 23:57:43 -0700
From: Jonathan Leffler <jonathan.leffler at gmail.com>
Message-ID: <CAH+RLGGyO6goHj37DfOEjLeOsiMx_xz2X8fVXh4AZcAzA4=CFg at mail.gmail.com>
| The current edition of POSIX defines error()
It wasn't error(), but perror() (error() is much newer).
| Do you have a source for asserting otherwise?
Actually no... If it wasn't obvious (from all the typos) I sent that
previous message from my phone (apologies for that to everyone - I am
not a great typist, or proof reader, at the best of times, on my phone
I am hopeless - though I did correct more errors than made it through).
I didn't bother checking, and should have delayed my reply until I
could, so my source was just:
| > | NetBSD which used a NetBSD-specific function, and recoded that in
| > | standard POSIX by installing the attached patch into tzdb.
where the change was just replacing perror() (every time it existed, it
seemed) with strerror() and fprintf(stderr, ...). From that I assumed
that Paul was saying that perror() is NetBSD specific, which it obviously
never was, and I said as much...
| > I'd hardly call perror() NetBSD specific, it has been in unix
| > since the dark ages.
but I assumed he had checked, and perror() was one of the more ancient
interfaces gradually being retired from POSIX - not that that means that
any existing implementation would remove it.
That is not true (it remains in the draft for the forthcoming new POSIX
version, with no hint that it might be removed in an even later version)
which means that there is even less reason for the changes that Paul made.
Leave perror() alone (at least for those, very unlikely to happen, so no-one
will ever see the error message anyway, normally) error cases, it keeps the
code smaller and simpler.
More information about the tz