Ignore:
Timestamp:
Mar 10, 2006 12:57:12 PM (18 years ago)
Author:
bennylp
Message:

Fixed compilation and run warnings/errors with MSVC 2005

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/compat/string.h

    r206 r315  
    2727 
    2828#if defined(PJ_HAS_STRING_H) && PJ_HAS_STRING_H != 0 
    29 include <string.h> 
     29 include <string.h> 
    3030#else 
    3131 
     
    3636 
    3737#if defined(_MSC_VER) 
    38 define strcasecmp    stricmp 
    39 if defined(PJ_WIN32_WINCE) && PJ_WIN32_WINCE!=0 
     38 include <stdio.h> 
     39 define strcasecmp   _stricmp 
    4040#   define strncasecmp  _strnicmp 
    41 #  else 
    42 #   define strncasecmp  strnicmp 
    43 #  endif 
    44 #  define snprintf      _snprintf 
    45 #  define snwprintf     _snwprintf 
    46 #  define wcsicmp       _wcsicmp 
    47 #  define wcsnicmp      _wcsnicmp 
     41#   define snprintf     _snprintf 
     42#   define vsnprintf    _vsnprintf 
     43#   define snwprintf    _snwprintf 
     44#   define wcsicmp      _wcsicmp 
     45#   define wcsnicmp     _wcsnicmp 
    4846#else 
    49 define stricmp       strcasecmp 
    50 define strnicmp      strncasecmp 
     47 define stricmp      strcasecmp 
     48 define strnicmp     strncasecmp 
    5149 
    52 if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 
    53 #     error "Implement Unicode string functions" 
    54 endif 
     50 if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 
     51#       error "Implement Unicode string functions" 
     52 endif 
    5553#endif 
    56  
    5754 
    5855#define pj_ansi_strcmp          strcmp 
     
    6057#define pj_ansi_strlen          strlen 
    6158#define pj_ansi_strcpy          strcpy 
     59#define pj_ansi_strncpy         strncpy 
    6260#define pj_ansi_strcat          strcat 
    6361#define pj_ansi_strstr          strstr 
     
    6967#define pj_ansi_sprintf         sprintf 
    7068#define pj_ansi_snprintf        snprintf 
     69#define pj_ansi_vsprintf        vsprintf 
     70#define pj_ansi_vsnprintf       vsnprintf 
    7171 
    7272#define pj_unicode_strcmp       wcscmp 
     
    7474#define pj_unicode_strlen       wcslen 
    7575#define pj_unicode_strcpy       wcscpy 
     76#define pj_unicode_strncpy      wcsncpy 
    7677#define pj_unicode_strcat       wcscat 
    7778#define pj_unicode_strstr       wcsstr 
     
    8384#define pj_unicode_sprintf      swprintf 
    8485#define pj_unicode_snprintf     snwprintf 
    85  
     86#define pj_unicode_vsprintf     vswprintf 
     87#define pj_unicode_vsnprintf    vsnwprintf 
    8688 
    8789#if defined(PJ_NATIVE_STRING_IS_UNICODE) && PJ_NATIVE_STRING_IS_UNICODE!=0 
     
    9092#   define pj_native_strlen         pj_unicode_strlen 
    9193#   define pj_native_strcpy         pj_unicode_strcpy 
     94#   define pj_native_strncpy        pj_unicode_strncpy 
    9295#   define pj_native_strcat         pj_unicode_strcat 
    9396#   define pj_native_strstr         pj_unicode_strstr 
     
    99102#   define pj_native_sprintf        pj_unicode_sprintf 
    100103#   define pj_native_snprintf       pj_unicode_snprintf 
     104#   define pj_native_vsprintf       pj_unicode_vsprintf 
     105#   define pj_native_vsnprintf      pj_unicode_vsnprintf 
    101106#else 
    102107#   define pj_native_strcmp         pj_ansi_strcmp 
     
    104109#   define pj_native_strlen         pj_ansi_strlen 
    105110#   define pj_native_strcpy         pj_ansi_strcpy 
     111#   define pj_native_strncpy        pj_ansi_strncpy 
    106112#   define pj_native_strcat         pj_ansi_strcat 
    107113#   define pj_native_strstr         pj_ansi_strstr 
     
    113119#   define pj_native_sprintf        pj_ansi_sprintf 
    114120#   define pj_native_snprintf       pj_ansi_snprintf 
     121#   define pj_native_vsprintf       pj_ansi_vsprintf 
     122#   define pj_native_vsnprintf      pj_ansi_vsnprintf 
    115123#endif 
    116124 
Note: See TracChangeset for help on using the changeset viewer.