stdlib.c?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
rup1033
Posts: 11
Joined: Thu May 26, 2005 11:00 pm

stdlib.c?

Post 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.
User avatar
carbonBased
Member
Member
Posts: 389
Joined: Sat Nov 20, 2004 12:00 am
Location: Wellesley, Ontario, Canada
Contact:

Re: stdlib.c?

Post 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
rup1033
Posts: 11
Joined: Thu May 26, 2005 11:00 pm

Re: stdlib.c?

Post 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 ^^
Post Reply