[Freeswitch-svn] [commit] r7087 - freeswitch/trunk/libs/sqlite/src
Freeswitch SVN
mikej at freeswitch.org
Fri Jan 4 22:35:15 EST 2008
Author: mikej
Date: Fri Jan 4 22:35:15 2008
New Revision: 7087
Modified:
freeswitch/trunk/libs/sqlite/src/sqliteInt.h
freeswitch/trunk/libs/sqlite/src/util.c
Log:
use strndup replacement on msvc
Modified: freeswitch/trunk/libs/sqlite/src/sqliteInt.h
==============================================================================
--- freeswitch/trunk/libs/sqlite/src/sqliteInt.h (original)
+++ freeswitch/trunk/libs/sqlite/src/sqliteInt.h Fri Jan 4 22:35:15 2008
@@ -287,7 +287,11 @@
#define sqliteMallocRaw(x) malloc(x)//sqlite3MallocRaw(x,1)
#define sqliteRealloc(x,y) realloc(x, y)//sqlite3Realloc(x,y)
#define sqliteStrDup(x) strdup(x)//sqlite3StrDup(x)
+#ifdef _MSC_VER
+#define sqliteStrNDup(x,y) sqlite3StrNDup(x,y)
+#else
#define sqliteStrNDup(x,y) strndup(x, y)//sqlite3StrNDup(x,y)
+#endif
#define sqliteReallocOrFree(x,y) sqlite3ReallocOrFree(x,y)
#endif
Modified: freeswitch/trunk/libs/sqlite/src/util.c
==============================================================================
--- freeswitch/trunk/libs/sqlite/src/util.c (original)
+++ freeswitch/trunk/libs/sqlite/src/util.c Fri Jan 4 22:35:15 2008
@@ -729,7 +729,7 @@
char *sqlite3StrNDup(const char *z, int n){
char *zNew;
if( z==0 ) return 0;
- zNew = sqlite3MallocRaw(n+1, 1);
+ zNew = sqliteMallocRaw(n+1, 1);
if( zNew ){
memcpy(zNew, z, n);
zNew[n] = 0;
More information about the Freeswitch-svn
mailing list