Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| SHA1 Hash: | 84bc7a7536f2b08f037bb80c5542db773b246c74 |
|---|---|
| Date: | 2009-01-07 11:07:47 |
| User: | stephan |
| Comment: | added a define for _ISOC99_SOURCE so snprintf() gets picked up |
Tags And Properties
- branch=trunk inherited from [f1bea87b3b]
- sym-trunk inherited from [f1bea87b3b]
Changes
[hide diffs]Changes to whprintf.c
@@ -18,10 +18,14 @@
See below for several WHPRINTF_OMIT_xxx macros which can be set to
remove certain features/extensions.
************************************************************************/
+#if !defined(_ISOC99_SOURCE)
+#define _ISOC99_SOURCE 1 /* needed for snprintf() */
+#endif
+
#include <stdio.h> /* FILE */
#include <string.h> /* strlen() */
#include <stdlib.h> /* free/malloc() */
#include <ctype.h>
@@ -635,10 +639,11 @@
for(i=n=0; (ch=escarg[i])!=0; i++){
if( ch==q ) n++;
}
needQuote = !isnull && xtype==etSQLESCAPE2;
n += i + 1 + needQuote*2;
+ // FIXME: use a static buffer here instead of malloc()! Shame on you!
bufpt = (char *)malloc( n );
if( ! bufpt ) return -1;
j = 0;
if( needQuote ) bufpt[j++] = q;
for(i=0; (ch=escarg[i])!=0; i++){