Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C library source code [closed]

Tags:

c

I want to find the C libraries' source code to find out more about the functions used.Is GCC the only resource I can count on?I couldn't use the doxygen html version of the GCC libraries,to tell the truth it seems complex to me,for example I couldn't find the printf function's source code(Was I looking in the wrong place?). Thanks in advance.

like image 701
kaiseroskilo Avatar asked Mar 06 '11 23:03

kaiseroskilo


People also ask

Is C closed source?

The C language is not a piece of software but a defined standard, so one wouldn't say that it's open-source, but rather that it's an open standard. There are a gazillion different compilers for C however, and many of those are indeed open-source.

Where is C source code?

You need to get the source code of the associated C library, probably glibc or eglibc in your case. In the /usr/include/ folder, only the headers of the libc are present, along with some linux kernel headers in the linux/ subfolder.

Where is the C library stored?

The C standard library itself is stored in '/usr/lib/libc.

What does the C library contain?

The C standard library provides macros, type definitions and functions for tasks such as string handling, mathematical computations, input/output processing, memory management, and several other operating system services.


2 Answers

OTOH, in addition to glibc:

  • uclibc
  • dietlibc
  • BSD libc
like image 141
Erik Avatar answered Sep 26 '22 10:09

Erik


Reading the source code is one thing. Reading a good book that includes source code is another thing entirely. And I'm not sure you can do better than The Standard C Library, by PJ Plauger. It's 20 years old, but for me it's still a page-turner.

Man, I feel old.

like image 25
Mike Sherrill 'Cat Recall' Avatar answered Sep 23 '22 10:09

Mike Sherrill 'Cat Recall'