FLTK logo

STR #3099

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]
 

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:

Receive EMails Don't Receive EMails

Trouble Report Files:


Name/Time/Date Filename/Size  
 
#1 cand
06:43 Jun 30, 2014
fltk-vsnprintf.diff
1k
 
 
#2 cand
08:45 Jul 15, 2014
fltk-vsnprintf_v2.diff
1k
 
     

Trouble Report Comments:


Name/Time/Date Text  
 
#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 ]

 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.