![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Sep 2004
Posts: 29
Rep Power: 0
![]() |
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. |
|
|
|
|
|
#2 |
|
Professional Programmer
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3
![]() |
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. |
|
|
|
|
|
#3 |
|
Programming Guru
![]() Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,261
Rep Power: 5
![]() |
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? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Source Code from Schildt's Book | tbohon | C | 7 | Nov 2nd, 2006 6:53 PM |
| Problem Associated with Vector Source code | buggytoast | Java | 3 | Apr 2nd, 2006 6:41 AM |
| Image processing:Stentiford and Holt Thinning Source code in C or C++ | ladyscarlet99 | C | 0 | Sep 9th, 2005 2:20 AM |
| Text editor source code... | paperboy | C++ | 2 | Mar 9th, 2005 3:08 PM |