where can i get the c library source code

  • Thread starter Prashanth Badabagni
  • Start date
P

Prashanth Badabagni

Hi ,
can any one please help me to get the source code of the c library
( stdio.h , stdlib.h ....) ....

Thanks in advance
Prashanth ( Man who saw the end of war )
 
A

Artie Gold

Prashanth said:
Hi ,
can any one please help me to get the source code of the c library
( stdio.h , stdlib.h ....) ....

Thanks in advance
Prashanth ( Man who saw the end of war )

There is no such thing as *the C library*; there are, however, several
implementations.

If you work with an open source platform, there's no problem -- just
Google for it.

If you don't, you'll have to contact your vendor (and likely pay a
considerable fee).

The other thing is that the `stdio.h and stdlib.h' are *headers*
containing principally declarations of library functions, not their
implementations.

HTH,
--ag
 
W

Walter Roberson

: can any one please help me to get the source code of the c library
:( stdio.h , stdlib.h ....) ....

gcc, glibc, linux, openbsd, freebsd...
 
J

Jens Marder

In VisualC6 lib sources ARE included.
I have the "Enterprise" edition.
Don't know, if sources are also included for
cheaper versions (probably not).
 
I

infobahn

Jens said:
In VisualC6 lib sources ARE included.

Ha! Have you /looked/ at them?

Next time you have a moment, check out the source for, say, printf.
Here's the version that accompanied the v5 release (with much elision
of whitespace):

int __cdecl printf (
const char *format,
...
)
/** stdout 'PRINT', 'F'ormatted */
{
va_list arglist;
int buffing;
int retval;
va_start(arglist, format);
_ASSERTE(format != NULL);
_lock_str2(1, stdout);
buffing = _stbuf(stdout);
retval = _output(stdout,format,arglist);
_ftbuf(buffing, stdout);
_unlock_str2(1, stdout);
return(retval);
}

*Very* helpful to those of you planning on writing your own printf
mods, isn't it?
 
J

James McIninch

<posted & mailed>

There's hundreds of implementations, including a variety of open-source ones
you can download from the Internet (the GNU C library is especially widely
used).

If you want access to the source code for a proprietary implementation (like
Microsoft's), you need to contact the company an negotiate terms,
non-disclosure agreements, etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top