Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Where do man pages about libc come from if they do not come from glibc?

Where do the man pages about libc come frome?

They cannot come from glibc because they slightly differ from glibc’s API.

One example is the man page for mmap. It describes a flag MAP_UNINITIALIZED.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

But this flag doesn’t exist in glibc. Glibc doesn’t want to support this flag because they say it’s kernel only. If you grep glibc source you can also see they never define this macro anywhere.

So where do the man pages about libc come from if they do not come from glibc?

>Solution :

At least on my manpage for mmap(2) it says at the top: "Linux Programmer’s Manual".

If you wan’t to know where a man page (or program etc.) resides call whereis:

$ whereis mmap
mmap: /usr/share/man/man2/mmap.2.gz /usr/share/man/man3/mmap.3posix.gz

If you need to known, where this file comes from, assuming you have installed it with apt, try apt-file:

$ apt-file search mmap.2.gz
manpages-de-dev: /usr/share/man/de/man2/mmap.2.gz
manpages-dev: /usr/share/man/man2/mmap.2.gz
manpages-fr-dev: /usr/share/man/fr/man2/mmap.2.gz
manpages-ja-dev: /usr/share/man/ja/man2/mmap.2.gz
manpages-nl-dev: /usr/share/man/nl/man2/mmap.2.gz
manpages-ru-dev: /usr/share/man/ru/man2/mmap.2.gz

You can then show you the metadata of a package with apt status:

$ apt show manpages-dev
Package: manpages-dev
Version: 5.10-1
Priority: optional
Section: doc
Source: manpages
Maintainer: Dr. Tobias Quathamer <toddy@debian.org>
Installed-Size: 4,037 kB
Depends: manpages
Suggests: man-browser
Breaks: libattr1-dev (<< 1:2.4.47-3), libbsd-dev (<< 0.8.4-1), manpages (<< 5.09-2)
Replaces: libattr1-dev (<< 1:2.4.47-3), libbsd-dev (<< 0.8.4-1)
Homepage: https://www.kernel.org/doc/man-pages/
Tag: devel::doc, made-of::man, role::documentation
Download-Size: 2,309 kB
APT-Manual-Installed: no
APT-Sources: http://deb.debian.org/debian bullseye/main amd64 Packages
Description: Manual pages about using GNU/Linux for development
 These man pages describe the Linux programming interface, including
 these two sections:
  2 = Linux system calls.
  3 = Library calls (note that a more comprehensive source of information
      may be found in the glibc-doc and glibc-doc-reference packages).

This leads you to the URL: https://www.kernel.org/doc/man-pages/.
The actual repository is: https://git.kernel.org/pub/scm/docs/man-pages/

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading