| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #774
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 3 - Moderate, e.g. unable to compile the software |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | always export fl_snprintf and fl_vsnprintf |
Version: | 1.1-current |
Created By: | a.rburgers.quicknet |
Assigned To: | mike |
Fix Version: | 1.1-current (SVN: v4262) |
Update Notification: | |
Trouble Report Files:
No files
Trouble Report Comments:
|
#1 | a.rburgers.quicknet 11:55 Mar 27, 2005 |
| - always export fl_snprintf and fl_vsnprintf.
On tru64, the fltk configure scripts thinks we have the snprintf family of functions: fl_snprint and fl_vsnprintf are not exported.
The flphoto configure script thinks we don't have the snprintf family and tries to call fl_snprintf, leading to unsatisfied references. This patch eliminates this kind of problems.
Index: vsnprintf.c =================================================================== --- vsnprintf.c (revision 4195) +++ vsnprintf.c (working copy) @@ -48,9 +48,11 @@ extern "C" { #endif -#if !HAVE_VSNPRINTF int fl_vsnprintf(char* str, size_t size, const char* fmt, va_list ap) { +#if HAVE_VSNPRINTF + return fl_vsnprintf(str, size, fmt, ap); +#else const char* e = str+size-1; char* p = str; char copy[20]; @@ -112,23 +114,18 @@ *p = 0; if (*fmt) return -1; return p-str; +#endif } -#endif - -#if !HAVE_SNPRINTF - int fl_snprintf(char* str, size_t size, const char* fmt, ...) { int ret; va_list ap; va_start(ap, fmt); - ret = vsnprintf(str, size, fmt, ap); + ret = fl_vsnprintf(str, size, fmt, ap); va_end(ap); return ret; } -#endif - #ifdef __cplusplus } #endif Index: flstring.h =================================================================== --- flstring.h (revision 4195) +++ flstring.h (working copy) @@ -69,13 +69,13 @@ char *strdup(const char*); # endif +FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...); # if !HAVE_SNPRINTF -FL_EXPORT extern int fl_snprintf(char *, size_t, const char *, ...); # define snprintf fl_snprintf # endif /* !HAVE_SNPRINTF */ +FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); # if !HAVE_VSNPRINTF -FL_EXPORT extern int fl_vsnprintf(char *, size_t, const char *, va_list ap); # define vsnprintf fl_vsnprintf # endif /* !HAVE_VSNPRINTF */
| |
|
#2 | mike 15:14 Apr 10, 2005 |
| Fixed in Subversion repository.
| |
[ Return to Bugs & Features ]
|
| |