Page 1 of 1

stdlib.c?

Posted: Mon Jun 06, 2005 11:00 pm
by rup1033
where can i get the actual stdlib.c everywehre has descriptions of the .h file but never any .c file why is this, as i want to make a slightly stripped down stdlib.c and keep the functionality the same. Did a search on my linux box which has mostly everything you can think of on it and no stdlib.c on the thing.

Re: stdlib.c?

Posted: Mon Jun 06, 2005 11:00 pm
by carbonBased
That's because there is no one stdlib.c

stdlib.h is a standard ANSI c header file... what implements the functions in this header is going to be different for each libc implementation (and, coincidentally, is rarely actually stdlib.c).

Since the header (more-or-less) defines the functionality this should be all you really need. A good book on the C langauge (like "The C Language" by K&R) can outline some of the nuances.

Or, if you absolutely need code, look for the BSD libc library... it's used to be documented online through a doxygen style hyperlinked online viewer. I haven't seen those websites anymore, but I'd hope they still exist. It's definitly a good resource.

--Jeff

Re: stdlib.c?

Posted: Wed Jun 22, 2005 11:00 pm
by rup1033
I realized that when i downloaded the source for glibc a while back , i just havent had time to post on the forum here.
Thank you for your reply ^^