![]() |
GCC sprintf Source Code
I'm trying to track down the source code for the sprintf funtion in the GNU GCC source files.
sprintf is the only funtion from the standard libraries I'm using and currently for certification purposes on the project I'm on, we cannot use outside libraries unless they are also certified. Since we do not want to deal with getting the entire GCC libraries certified for this project I just want to pull the sprintf function out of the source, simplify it to exactly what we need and just use that. Could anyone possibly point me in the direction of where to find the function in the GCC source? We're using GCC version 3.4.4 and I've got the source downloaded from the gcc.gnu.org website, but I can't find the source for sprintf anywhere. Thanks a ton. |
You need to download the source for the GNU C library, and its common name is glib. So you have to figure out which version of glib you want to use then download the source. I don't know glib's license but I am pretty sure you can't copy from it directly into your project and then release it without adapting its license. There is also a good chance that sprintf it's self uses many other standard library functions (like isspace()).
Good luck. |
If you have the full gcc distribution, the source for the C library (glib or libc) is one of the subdirectories that comes for the ride.
I'm curious about your certification approach. Most projects that are serious enough to require certification of library functions also require certification of the compiler itself. What sort of justification is there for certifying a library function without certifying the compiler in your project? |
| All times are GMT -5. The time now is 10:11 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC