[ACCEPTED]-libc source location - for download or online viewing?-glibc

Accepted answer
Score: 27

Most linuxes use a libc version named glibc.

The 25 LXR (online cross-reference system) for 24 glibc is e.g. here http://koala.cs.pub.ro/lxr/glibc/ for 2.9 version (link is broken). I must 23 say that something may be not lxr'ed because 22 some sources are generated in the build 21 process, for example - as i can remember 20 - wrappers around a system calls.

Pthreads 19 are in nptl/ folder. Right link to libc sources 18 is http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.bz2 (or change 2.14 to your version)

Update: After 17 closing of koala's lxr, there are:

  1. Metager with glibc: http://code.metager.de/source/xref/gnu/glibc/ (Served 16 with Sun's OpenGrok, which was originally 15 used to generate online x-ref for Solaris/OpenSolaris)

  2. Google 14 code search (I know that it was closed; but 13 I also know it's other version which is 12 up): http://code.google.com/codesearch and try to search something glibc-specific

UPD (march 2013) They killed codesearch 11 again:

404. That’s an error.

The requested URL /codesearch was 10 not found on this server. That’s all we 9 know.

UPD 2017

  1. Metager with glibc: http://code.metager.de/source/xref/gnu/glibc/

  2. There is online git by glibc 8 authors: https://sourceware.org/git/?p=glibc.git (tree is browserable at https://sourceware.org/git/?p=glibc.git;a=tree)

  3. Glibc 7 git is mirrored to github (which has some 6 searching functions) https://github.com/bminor/glibc Buildroot 2018.05 5 notably uses this mirror.

  4. There is search like google's codesearch 4 in all debian packages: https://codesearch.debian.net/. It can search 3 in glibc sources by "package:glibc 2 request" request and also have file 1 browser: http://sources.debian.net/src/glibc/

Score: 10

Info on the glibc repository: http://sourceware.org/glibc/wiki/GlibcGit

Clone it to 6 get your own copy and search it however 5 you like:

git clone git://sourceware.org/git/glibc.git

I load it up in an IDE project 4 (using whatever preferred IDE) and the code 3 navigation works quite well to let me find 2 what I'm interested in.

Browse the source 1 online http://sourceware.org/git/?p=glibc.git

Score: 6

If you're on a Debian-derived system, you 6 can use apt-get source libc6. This will unpack a eglibc-2.12.1 directory 5 (version number might differ, of course) in 4 your current working directory, and the 3 pthreads support are in the nptl/ directory below 2 that. linuxthreads/ is for the older threading style, in 1 case you're an archaeologist.

Score: 2

More Related questions