diff options
author | Benny Prijono <bennylp@teluu.com> | 2006-03-10 12:57:12 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2006-03-10 12:57:12 +0000 |
commit | 0873e0d2170db76241bf5afe812acead0d531b8e (patch) | |
tree | bc50b6a1fe32c5b0ae24d1c188f166ea82c278f8 /pjlib/include/pj/compat/string.h | |
parent | 9034bec3635469ec1041e783ac2343c22b64c04c (diff) |
Fixed compilation and run warnings/errors with MSVC 2005
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@315 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/include/pj/compat/string.h')
-rw-r--r-- | pjlib/include/pj/compat/string.h | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/pjlib/include/pj/compat/string.h b/pjlib/include/pj/compat/string.h index 63cfdc51..6e70430f 100644 --- a/pjlib/include/pj/compat/string.h +++ b/pjlib/include/pj/compat/string.h @@ -26,7 +26,7 @@ #if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H != 0 -# include <string.h> +# include <string.h> #else PJ_DECL(int) strcasecmp(const char *s1, const char *s2); @@ -35,30 +35,28 @@ #endif #if defined(_MSC_VER) -# define strcasecmp stricmp -# if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 +# include <stdio.h> +# define strcasecmp _stricmp # define strncasecmp _strnicmp -# else -# define strncasecmp strnicmp -# endif -# define snprintf _snprintf -# define snwprintf _snwprintf -# define wcsicmp _wcsicmp -# define wcsnicmp _wcsnicmp +# define snprintf _snprintf +# define vsnprintf _vsnprintf +# define snwprintf _snwprintf +# define wcsicmp _wcsicmp +# define wcsnicmp _wcsnicmp #else -# define stricmp strcasecmp -# define strnicmp strncasecmp +# define stricmp strcasecmp +# define strnicmp strncasecmp -# if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 -# error "Implement Unicode string functions" -# endif +# if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 +# error "Implement Unicode string functions" +# endif #endif - #define pj_ansi_strcmp strcmp #define pj_ansi_strncmp strncmp #define pj_ansi_strlen strlen #define pj_ansi_strcpy strcpy +#define pj_ansi_strncpy strncpy #define pj_ansi_strcat strcat #define pj_ansi_strstr strstr #define pj_ansi_strchr strchr @@ -68,11 +66,14 @@ #define pj_ansi_strnicmp strncasecmp #define pj_ansi_sprintf sprintf #define pj_ansi_snprintf snprintf +#define pj_ansi_vsprintf vsprintf +#define pj_ansi_vsnprintf vsnprintf #define pj_unicode_strcmp wcscmp #define pj_unicode_strncmp wcsncmp #define pj_unicode_strlen wcslen #define pj_unicode_strcpy wcscpy +#define pj_unicode_strncpy wcsncpy #define pj_unicode_strcat wcscat #define pj_unicode_strstr wcsstr #define pj_unicode_strchr wcschr @@ -82,13 +83,15 @@ #define pj_unicode_strnicmp wcsnicmp #define pj_unicode_sprintf swprintf #define pj_unicode_snprintf snwprintf - +#define pj_unicode_vsprintf vswprintf +#define pj_unicode_vsnprintf vsnwprintf #if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 # define pj_native_strcmp pj_unicode_strcmp # define pj_native_strncmp pj_unicode_strncmp # define pj_native_strlen pj_unicode_strlen # define pj_native_strcpy pj_unicode_strcpy +# define pj_native_strncpy pj_unicode_strncpy # define pj_native_strcat pj_unicode_strcat # define pj_native_strstr pj_unicode_strstr # define pj_native_strchr pj_unicode_strchr @@ -98,11 +101,14 @@ # define pj_native_strnicmp pj_unicode_strnicmp # define pj_native_sprintf pj_unicode_sprintf # define pj_native_snprintf pj_unicode_snprintf +# define pj_native_vsprintf pj_unicode_vsprintf +# define pj_native_vsnprintf pj_unicode_vsnprintf #else # define pj_native_strcmp pj_ansi_strcmp # define pj_native_strncmp pj_ansi_strncmp # define pj_native_strlen pj_ansi_strlen # define pj_native_strcpy pj_ansi_strcpy +# define pj_native_strncpy pj_ansi_strncpy # define pj_native_strcat pj_ansi_strcat # define pj_native_strstr pj_ansi_strstr # define pj_native_strchr pj_ansi_strchr @@ -112,6 +118,8 @@ # define pj_native_strnicmp pj_ansi_strnicmp # define pj_native_sprintf pj_ansi_sprintf # define pj_native_snprintf pj_ansi_snprintf +# define pj_native_vsprintf pj_ansi_vsprintf +# define pj_native_vsnprintf pj_ansi_vsnprintf #endif |