| [ Return to Bugs & Features | Roadmap 1.3 | SVN ⇄ GIT ]
STR #3099
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 2 - Low, e.g. a documentation error or undocumented side-effect |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | OS support |
Summary: | [patch] Don't duplicate system vsnprintf |
Version: | 1.3-current |
Created By: | cand |
Assigned To: | cand |
Fix Version: | 1.3-current (SVN: v10229) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | cand 06:43 Jun 30, 2014 |
| There's no point duplicating printf code if the system can supply it. Saves 2kb of size. | |
|
#2 | greg.ercolano 07:40 Jul 15, 2014 |
| Let's be careful when adding this.
Even though the OS might have vsnprintf(), the implementation might be bad.
One of the reasons I believe it was added (back in 2005) is because the Windows implementation of snprintf() for many VS releases (we still support) is "bad", i.e. not C99 compliant. (In fltk.coredev, search for 'snprintf()' and see the comments in 2009 which more precisely shows the issue, missing NULL truncations, and complications with mingw)
Perhaps the attached patch can be applied if limited to non-windows builds. | |
|
#3 | cand 08:46 Jul 15, 2014 |
| v2 posted with additional linux guards. | |
|
#4 | cand 05:02 Aug 21, 2014 |
| Fixed in Subversion repository. | |
[ Return to Bugs & Features ]
|
| |