All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH v5 3/6] libc.7: Revise content
Date: Sun, 15 Jan 2023 16:01:46 +0100	[thread overview]
Message-ID: <9055aa36-67c1-c756-e241-bf9e12e9780f@gmail.com> (raw)
In-Reply-To: <20230115054343.we7tmhl3offylz24@illithid>


[-- Attachment #1.1: Type: text/plain, Size: 3451 bytes --]

Hi Branden,

On 1/15/23 06:43, G. Branden Robinson wrote:
> * Define the term "standard C library".
> * Say who's responsible for standardizing it.
> * Practically all C _libraries_ use libc, too.
> * Move material describing structure glibc from intro(3) to here and
>    recast in more detail.
> * Update example filespec for libc.so.6.
> 
> Signed-off-by: G. Branden Robinson <g.branden.robinson@gmail.com>
> ---
>   man7/libc.7 | 34 ++++++++++++++++++++++++++--------
>   1 file changed, 26 insertions(+), 8 deletions(-)
> 
> diff --git a/man7/libc.7 b/man7/libc.7
> index c6180075c..09d21e7f5 100644
> --- a/man7/libc.7
> +++ b/man7/libc.7
> @@ -8,13 +8,18 @@
>   libc \- overview of standard C libraries on Linux
>   .SH DESCRIPTION
>   The term \(lqlibc\(rq is commonly used as a shorthand for
> -the \(lqstandard C library\(rq
> -a library of standard functions that can be used by all C programs
> -(and sometimes by programs in other languages).
> -Because of some history
> -(see below),
> -use of the term \(lqlibc\(rq
> -to refer to the standard C library is somewhat ambiguous on Linux.
> +the
> +.IR "standard C library" ,
> +a collection of functions,
> +data types,
> +constants,
> +and global variables \" like errno
> +defined by ISO/IEC JTC1/\:SC22/\:WG14 and POSIX.1
> +(the Austin Group)

I'd just call it ISO C and POSIX.1, and defer to standards(7) for more details 
about the Austing group, WG14, and company.

> +and used by practically all programs and libraries written in C.

And actually, non-C too, unless you write static binaries :)

> +.I libc
> +refers to any library that implements a significant portion of the
> +published standard interface.
>   .SS glibc
>   The standard libc most popularly used with the Linux kernel is
>   .UR http://www.gnu.org\:/software\:/libc/
> @@ -33,13 +38,26 @@ primarily in section 3 of the manual.
>   glibc also offers a manual of its own in Texinfo format,
>   browsable at the command line with
>   .RI \(lq "info libc" \(rq.
> +.PP
> +glibc is organized into three

Why precise about glibc?  A programmer should only care about the standard for 
these, right?  If POSIX specifies some organization, programmers should normally 
link against the library that POSIX specifies.  If POSIX says foo(3) is in 
libfoo.so, but glibc puts it in libbar.so, I will only document what POSIX says 
(of course glibc will make the magic so that a POSIX-conformant program would work).

This reminds me that I had a pending task: make sure that LIBRARY contents are 
right according to POSIX.

> +.I dynamic shared objects
> +(DSOs):
> +.I libc
> +itself,
> +.I libm
> +for mathematical functions,
> +and
> +.I librt
> +for real-time extensions
> +(historically POSIX.1b).

Is it?  I thought there were more libraries.  I'm thinking about libpthread, and 
maybe some others.

>   Version 1.0 of glibc was released in September 1992.
>   (There were earlier 0.x releases.)
>   The next major release of glibc was 2.0
>   at the beginning of 1997.
>   .PP
>   The file
> -.I /lib/libc.so.6
> +.IR /lib/libc.so.6 ,
> +.IR /lib/x86_64\-linux\-gnu/libc.so.6 ,

How about adding a FILES section?

Cheers,

Alex

>   or similar
>   is normally a symbolic link to the glibc library.
>   Execute it to display information about the version installed on your

-- 
<http://www.alejandro-colomar.es/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2023-01-15 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-15  5:43 [PATCH v5 3/6] libc.7: Revise content G. Branden Robinson
2023-01-15 15:01 ` Alejandro Colomar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9055aa36-67c1-c756-e241-bf9e12e9780f@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=g.branden.robinson@gmail.com \
    --cc=linux-man@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.