stdlib.c?
stdlib.c?
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.
- carbonBased
- Member

- Posts: 389
- Joined: Sat Nov 20, 2004 12:00 am
- Location: Wellesley, Ontario, Canada
- Contact:
Re: stdlib.c?
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
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?
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 ^^
Thank you for your reply ^^