Reputation:
I'm looking for the whole source code of all the C standard libraries. That said, I'm looking for the source code of stdio.h, stdlib.h, string.h, math.h, etc... I would like to see how they were created. I think that it depends from platform to platform, but Linux or Windows one will be welcomed.
Upvotes: 33
Views: 37363
Reputation: 38158
If you want the actual implementations, as everyone else has assumed you don't, many Linux distributions currently use glibc to implement the C standard library. Common alternatives include musl libc, diet libc, uClibc-ng, and Bionic
Upvotes: 29
Reputation: 15
Sorry for your problem. Most of the responses you are getting are unnecessarily self complicated for nothing. Its quite obvious what you want: The source codes for all the functions contained in the standard C library; And whose lumps include (of course) stdio.h, conio.h among others. Well, you can get them around and as one zip file right here:
https://github.com/wuzhouhui/c_standard_lib
Good luck. Love C.
Upvotes: -1
Reputation: 95751
PJ Plauger wrote a book about the standard C library. Includes references from the (now dated) standard, and source code.
Upvotes: 12
Reputation: 35600
Microsoft Visual Studio generally has the system headers under <InstallDir>\VC\include
, and the source, if installed, is under <InstallDir>\VC\crt\src
.
Upvotes: 5
Reputation: 4763
Whether its installed with an IDE or you have installed explicitly, you have to look in the directory "Include
" in respective location.
Ex: I use MinGW. So, I would go to
c:/MinGW/include
to find those header files. Similarly, for an IDE (say Dev-cpp), you need to go to c:/dev-cpp/include.
Upvotes: -3