Re: [PATCH] Clean up errno.h includes.

"Kevin J. McCarthy" <[email protected]> Mon, 25 May 2026 10:24:03 +0800
Newsgroups gmane.mail.mutt.devel
Message-ID <ahOywqJs4Se0bukX@qinghai>
On Sat, May 23, 2026 at 08:43:23PM +0800, Kevin J. McCarthy wrote:
>With the creation of mutt_errno_dbg(), a lot of direct errno handling
>is now moved inside the macro.
>
>Remove the include header from other parts of the code that are not
>directly referencing errno anymore.
>
>Move the "#include <errno.h>" inside the lib.h header, where the macro
>is defined, conditionally based on #ifdef DEBUG.  That way callers of
>the macro don't have to think about including the header.
>
>Fix three muttdbg() calls in mutt_socket.c that were referencing
>strerror(errno) to instead call mutt_errno_dbg().

I've pushed this up, with the last paragraph's changes broken into an 
initial commit.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmoTssMACgkQre92hIAx
a9qURhAA5q5YVYLq5mcLiDWlh/tiE4wwYQ3pOv2hXbC8zmp5gJ4orZ7PIjQFRddK
LJQ59yPdXxs3A2PqMhX/m4OehAKOX6ZEbFKB610jSHW0Q0nyS0/G66GU1tDLLYE2
Rm4OXsTuLPdr4KS+60KmdF08GglNLPt5cFvcAIQdoSVlx8cOFID0seVmRJ/o+mw5
RF24lU+h6cc1Zj5Xn8YIEqdJFXW4zhzOQYJG1VXr5FnsVv4NXa/EQ4ze7hoqKoOQ
u+hzN5ef057Jztnhrcs16sZXiHIFgtEyRHblE/tedfaQMypmDXiBztODKnHh6ZXQ
Uv0zx3q92BNkGuLBiYIbz6xQGZjGXmdS8C8smiIigj/UdA5N6vu6JHBJkjXuZLyy
RSJgz87rrowbltNZ3f+ncmjNBmhwqdfJFdqHsh4tkWvgLUNkPGrZO7Le4jHnsJRF
JAw+Vi252JjFphfCZHEeEy1ATtjHvJCc/FojsntRgwrAZbXjhABWjyKpGwukYLJB
1GCRk0a0l5HQ5YMrLJaX+/IFG9j/2jTqo4Ds7JUYvrY7MYQH4pCrBav8yrCUAXlt
OEapvfpJOsUZuC4SI4gijsuk7rrJmR+OmdkJDj1hDdhf08adr5n+ib0/u4cHPwq0
imIua1xU93i+dGCbccIfU7tx5b7w9BqbzpTqqz3TYKvmCmdNnsY=
=42s7
-----END PGP SIGNATURE-----