use _snprintf instead of switch_snprintf on windows for now.. snprintf seems to be having issues handling anything that uses the #define'd format strings for time t and 64 bit ints on windows.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4621 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
beea6225c1
commit
8d0a8690c2
|
@ -131,10 +131,6 @@ SWITCH_DECLARE(const char *) switch_dso_error(switch_dso_handle_t *dso, char *bu
|
|||
* @{
|
||||
*/
|
||||
|
||||
#ifndef snprintf
|
||||
#define snprintf switch_snprintf
|
||||
#endif
|
||||
|
||||
SWITCH_DECLARE(int) switch_snprintf(char *buf, switch_size_t len, const char *format, ...);
|
||||
|
||||
SWITCH_DECLARE(int) switch_vasprintf(char **buf, const char *format, va_list ap);
|
||||
|
|
|
@ -101,6 +101,10 @@ typedef int gid_t;
|
|||
#include <io.h>
|
||||
#define strcasecmp(s1, s2) stricmp(s1, s2)
|
||||
#define strncasecmp(s1, s2, n) strnicmp(s1, s2, n)
|
||||
#ifndef snprintf
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#else
|
||||
/* packed attribute */
|
||||
#ifndef PACKED
|
||||
|
@ -199,31 +203,31 @@ typedef intptr_t switch_ssize_t;
|
|||
#ifdef WIN32
|
||||
|
||||
#ifdef WIN64
|
||||
#define SWITCH_SSIZE_T_FMT "%I64d"
|
||||
#define SWITCH_SIZE_T_FMT "%I64d"
|
||||
#define SWITCH_SSIZE_T_FMT "I64d"
|
||||
#define SWITCH_SIZE_T_FMT "I64d"
|
||||
#else
|
||||
#define SWITCH_SSIZE_T_FMT "%d"
|
||||
#define SWITCH_SIZE_T_FMT "%d"
|
||||
#define SWITCH_SSIZE_T_FMT "d"
|
||||
#define SWITCH_SIZE_T_FMT "d"
|
||||
#endif
|
||||
|
||||
#define SWITCH_INT64_T_FMT "%I64d"
|
||||
#define SWITCH_UINT64_T_FMT "%I64u"
|
||||
#define SWITCH_INT64_T_FMT "I64d"
|
||||
#define SWITCH_UINT64_T_FMT "I64u"
|
||||
|
||||
#else
|
||||
#ifndef SWITCH_SSIZE_T_FMT
|
||||
#define SWITCH_SSIZE_T_FMT (sizeof (switch_ssize_t) == sizeof (long) ? "%ld" : sizeof (switch_ssize_t) == sizeof (int) ? "%d" : "%lld")
|
||||
#define SWITCH_SSIZE_T_FMT (sizeof (switch_ssize_t) == sizeof (long) ? "ld" : sizeof (switch_ssize_t) == sizeof (int) ? "d" : "lld")
|
||||
#endif
|
||||
|
||||
#ifndef SWITCH_SIZE_T_FMT
|
||||
#define SWITCH_SIZE_T_FMT (sizeof (switch_size_t) == sizeof (long) ? "%lu" : sizeof (switch_size_t) == sizeof (int) ? "%u" : "%llu")
|
||||
#define SWITCH_SIZE_T_FMT (sizeof (switch_size_t) == sizeof (long) ? "lu" : sizeof (switch_size_t) == sizeof (int) ? "u" : "llu")
|
||||
#endif
|
||||
|
||||
#ifndef SWITCH_INT64_T_FMT
|
||||
#define SWITCH_INT64_T_FMT (sizeof (long) == 8 ? "%ld" : "%lld")
|
||||
#define SWITCH_INT64_T_FMT (sizeof (long) == 8 ? "ld" : "lld")
|
||||
#endif
|
||||
|
||||
#ifndef SWITCH_UINT64_T_FMT
|
||||
#define SWITCH_UINT64_T_FMT (sizeof (long) == 8 ? "%lu" : "%llu")
|
||||
#define SWITCH_UINT64_T_FMT (sizeof (long) == 8 ? "lu" : "llu")
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue