[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
STRERROR(e) vs AC_STRERROR_R(e,b,l)
- To: openldap-devel@openldap.org
- Subject: STRERROR(e) vs AC_STRERROR_R(e,b,l)
- From: Ryan Tandy <ryan@nardis.ca>
- Date: Mon, 16 Sep 2019 12:07:44 -0700
- Content-disposition: inline
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nardis.ca; s=google; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=vRJwVqumq+lqCdaGxqT3Jtp+/W98z77SGYxmc74dEUY=; b=N2u9AQ1nfGdIZlbIobKyVg8Qlht1U2rwfNUwvJn85ktQ2Bou9uo78dIIiELYniRdus QgtAR07oJZ72dZaGvcYNv54r+ux0NML5ZNCjNbpq/V8lGY2FL0t9YMFsYMiRSpe3bRyE pq93MP8EB9Lva09fDdGVVkz0xPTncguTn3eDE=
- User-agent: Mutt/1.10.1 (2018-07-13)
I'm working on adding debug logging for GnuTLS errors. I'd like to add a
strerror() inside tlsg_getfile() as part of this.
First question: I found STRERROR(e) and AC_STRERROR_R(e,b,l). It looks
like AC_STRERROR_R should be preferred for new code. Is that correct?
Second question: I noticed that STRERROR(e) triggers deprecation
warnings on my system:
.../libraries/libldap/os-ip.c:248: warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
.../libraries/libldap/os-ip.c:248: warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
Is replacing occurrences of STRERROR with AC_STRERROR_R a worthwhile
cleanup? (cf. 62da0b673, ba749eb79, bfd09a16a)
Are there cases where AC_STRERROR_R would be inappropriate? (where the
non-threadsafe strerror() fallback would be totally unacceptable?)
Thanks.