Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 29th, 2006, 10:49 AM   #1
JawaKing00
Newbie
 
Join Date: Sep 2004
Posts: 29
Rep Power: 0 JawaKing00 is on a distinguished road
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.
JawaKing00 is offline   Reply With Quote
Old Nov 29th, 2006, 11:15 AM   #2
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
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.
Game_Ender is offline   Reply With Quote
Old Nov 30th, 2006, 4:53 AM   #3
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,261
Rep Power: 5 grumpy will become famous soon enough
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?
grumpy is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:38 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC