In the Gnulib manual errno constants are written in the following 3 ways: 1. EINVAL 2. @samp{EINVAL} 3. @code{EINVAL}
The first is incorrect, since it blends in with the surrounding text. >From reading the description of @samp and @code in the Texinfo manual [1] [2], @code seems more correct, in my opinion. And it is already more commonly written that way in the Gnulib manual. Fixed with the attached patch. Collin [1] https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040samp.html [2] https://www.gnu.org/software/texinfo/manual/texinfo/html_node/_0040code.html
>From 17357997e9ed29453b0fea484e646dd0cdace14c Mon Sep 17 00:00:00 2001 Message-ID: <17357997e9ed29453b0fea484e646dd0cdace14c.1752710917.git.collin.fu...@gmail.com> From: Collin Funk <collin.fu...@gmail.com> Date: Wed, 16 Jul 2025 16:57:06 -0700 Subject: [PATCH] doc: Use @code around errno constants. * doc/posix-functions/mkfifoat.texi: Use @code for errno constants instead of @samp. * doc/posix-functions/mknodat.texi: Likewise. * doc/posix-functions/setenv.texi: Likewise. * doc/posix-functions/symlinkat.texi: Likewise. * doc/posix-functions/unsetenv.texi: Likewise. * doc/glibc-functions/sethostname.texi: Use @code around errno constants. * doc/posix-functions/chmod.texi: Likewise. * doc/posix-functions/posix_fallocate.texi: Likewise. * doc/posix-functions/ptsname_r.texi: Likewise. --- ChangeLog | 15 +++++++++++++++ doc/glibc-functions/sethostname.texi | 2 +- doc/posix-functions/chmod.texi | 2 +- doc/posix-functions/mkfifoat.texi | 2 +- doc/posix-functions/mknodat.texi | 2 +- doc/posix-functions/posix_fallocate.texi | 2 +- doc/posix-functions/ptsname_r.texi | 2 +- doc/posix-functions/setenv.texi | 2 +- doc/posix-functions/symlinkat.texi | 2 +- doc/posix-functions/unsetenv.texi | 2 +- 10 files changed, 24 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index d2b4e6c14e..79813e051f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,18 @@ +2025-07-16 Collin Funk <collin.fu...@gmail.com> + + doc: Use @code around errno constants. + * doc/posix-functions/mkfifoat.texi: Use @code for errno constants + instead of @samp. + * doc/posix-functions/mknodat.texi: Likewise. + * doc/posix-functions/setenv.texi: Likewise. + * doc/posix-functions/symlinkat.texi: Likewise. + * doc/posix-functions/unsetenv.texi: Likewise. + * doc/glibc-functions/sethostname.texi: Use @code around errno + constants. + * doc/posix-functions/chmod.texi: Likewise. + * doc/posix-functions/posix_fallocate.texi: Likewise. + * doc/posix-functions/ptsname_r.texi: Likewise. + 2025-07-15 Collin Funk <collin.fu...@gmail.com> doc: Mention copy_file_range stub on GNU/Hurd. diff --git a/doc/glibc-functions/sethostname.texi b/doc/glibc-functions/sethostname.texi index e08cfb474f..51d1e3cb8a 100644 --- a/doc/glibc-functions/sethostname.texi +++ b/doc/glibc-functions/sethostname.texi @@ -25,7 +25,7 @@ @node sethostname @item This function is missing on some platforms: Minix 3.1.8, Cygwin 1.7.x, mingw, MSVC 14, Android 5.1. -Note that the Gnulib replacement may fail with ENOSYS on some platforms. +Note that the Gnulib replacement may fail with @code{ENOSYS} on some platforms. @item This function is not declared on some platforms: AIX 7.1, Solaris 10. diff --git a/doc/posix-functions/chmod.texi b/doc/posix-functions/chmod.texi index 482210f3d3..cbc7dc3c3a 100644 --- a/doc/posix-functions/chmod.texi +++ b/doc/posix-functions/chmod.texi @@ -14,7 +14,7 @@ @node chmod and (without the slash) names a non-directory, on some platforms: AIX 7.2. @item -This function fails with a wrong error code (EINVAL instead of ENOTDIR) +This function fails with a wrong error code (@code{EINVAL} instead of @code{ENOTDIR}) when the file name argument ends in a slash and (without the slash) names a non-directory, on some platforms: mingw, MSVC. diff --git a/doc/posix-functions/mkfifoat.texi b/doc/posix-functions/mkfifoat.texi index a7e8b9789e..3e96a1e432 100644 --- a/doc/posix-functions/mkfifoat.texi +++ b/doc/posix-functions/mkfifoat.texi @@ -26,7 +26,7 @@ @node mkfifoat Portability problems not fixed by Gnulib: @itemize @item -The gnulib replacement function always fails with @samp{ENOSYS} on +The gnulib replacement function always fails with @code{ENOSYS} on some platforms: mingw, MSVC 14. @item If the argument exists and is a directory, the gnulib replacement diff --git a/doc/posix-functions/mknodat.texi b/doc/posix-functions/mknodat.texi index e9d3ba2810..ea656b54fe 100644 --- a/doc/posix-functions/mknodat.texi +++ b/doc/posix-functions/mknodat.texi @@ -26,7 +26,7 @@ @node mknodat Portability problems not fixed by Gnulib: @itemize @item -The gnulib replacement function always fails with @samp{ENOSYS} on +The gnulib replacement function always fails with @code{ENOSYS} on some platforms: mingw, MSVC 14. @item diff --git a/doc/posix-functions/posix_fallocate.texi b/doc/posix-functions/posix_fallocate.texi index 09b4e5bd5c..0387d13e03 100644 --- a/doc/posix-functions/posix_fallocate.texi +++ b/doc/posix-functions/posix_fallocate.texi @@ -20,7 +20,7 @@ @node posix_fallocate This function is missing on some platforms: macOS 14, FreeBSD 6.0, NetBSD 5.0, OpenBSD 7.5, Minix 3.1.8, AIX 5.1, HP-UX 11, Solaris 10, Cygwin 1.5.x, mingw, MSVC 14, Android 4.4. @item -POSIX specifies that EINVAL should be returned when the file system doesn't +POSIX specifies that @code{EINVAL} should be returned when the file system doesn't support the allocation operation directly. glibc however emulates the file system allocation with writes where unsupported, and apps have depended on that long term implementation. This is both inefficient, and as of diff --git a/doc/posix-functions/ptsname_r.texi b/doc/posix-functions/ptsname_r.texi index 5237f6a378..68e89bded0 100644 --- a/doc/posix-functions/ptsname_r.texi +++ b/doc/posix-functions/ptsname_r.texi @@ -32,7 +32,7 @@ @node ptsname_r on some platforms: macOS 14, FreeBSD 14.0, Android 4.3. @item -When this function fails with ERANGE, it stores an empty string as result +When this function fails with @code{ERANGE}, it stores an empty string as result on some platforms: NetBSD 10.0, Solaris 11 OmniOS. @end itemize diff --git a/doc/posix-functions/setenv.texi b/doc/posix-functions/setenv.texi index 59d7ebaf0e..07eddd5770 100644 --- a/doc/posix-functions/setenv.texi +++ b/doc/posix-functions/setenv.texi @@ -13,7 +13,7 @@ @node setenv This function is missing on some platforms: HP-UX 11.23, Solaris 9, mingw, MSVC 14. @item -On some platforms, this function does not fail with @samp{EINVAL} when +On some platforms, this function does not fail with @code{EINVAL} when passed an empty string or a string containing @samp{=}: Mac OS X 10.5, FreeBSD 6.0, NetBSD 1.6, OpenBSD 7.5, Cygwin 1.5.x. @item diff --git a/doc/posix-functions/symlinkat.texi b/doc/posix-functions/symlinkat.texi index f9a0281fbd..c3199cdd98 100644 --- a/doc/posix-functions/symlinkat.texi +++ b/doc/posix-functions/symlinkat.texi @@ -26,7 +26,7 @@ @node symlinkat Portability problems not fixed by Gnulib: @itemize @item -This function always fails with @samp{ENOSYS} on platforms that don't +This function always fails with @code{ENOSYS} on platforms that don't support symlinks: mingw, MSVC 14. @end itemize diff --git a/doc/posix-functions/unsetenv.texi b/doc/posix-functions/unsetenv.texi index 0d6d263f76..2699fad5ad 100644 --- a/doc/posix-functions/unsetenv.texi +++ b/doc/posix-functions/unsetenv.texi @@ -17,7 +17,7 @@ @node unsetenv platforms: FreeBSD 6.0, NetBSD 1.6, OpenBSD 3.8. @item -On some platforms, this function does not fail with @samp{EINVAL} when +On some platforms, this function does not fail with @code{EINVAL} when passed an empty string or a string containing @samp{=}: FreeBSD 6.0, NetBSD 1.6, OpenBSD 4.7. @item -- 2.50.1