summaryrefslogtreecommitdiff
path: root/pjlib
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2009-11-10 04:30:46 +0000
committerBenny Prijono <bennylp@teluu.com>2009-11-10 04:30:46 +0000
commit36e57709b519648f8a29ad13b9709b6c96b5d6ca (patch)
tree2449fbf4570ec3c0c223509054dc339a1c3d9b73 /pjlib
parentc019e89de8322549b99856e0c7c243780d44d6e9 (diff)
Fixed ticket #989: Issues with Windows Unicode build (thanks Michele Cicciotti for the patch)
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3002 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib')
-rw-r--r--pjlib/include/pj/compat/os_win32.h7
-rw-r--r--pjlib/src/pj/ip_helper_win32.c10
2 files changed, 11 insertions, 6 deletions
diff --git a/pjlib/include/pj/compat/os_win32.h b/pjlib/include/pj/compat/os_win32.h
index c0abf445..8cb00c27 100644
--- a/pjlib/include/pj/compat/os_win32.h
+++ b/pjlib/include/pj/compat/os_win32.h
@@ -111,7 +111,12 @@
#ifndef PJ_OS_HAS_CHECK_STACK
# define PJ_OS_HAS_CHECK_STACK 1
#endif
-#define PJ_NATIVE_STRING_IS_UNICODE 0
+
+#ifdef UNICODE
+# define PJ_NATIVE_STRING_IS_UNICODE 1
+#else
+# define PJ_NATIVE_STRING_IS_UNICODE 0
+#endif
#define PJ_ATOMIC_VALUE_TYPE long
diff --git a/pjlib/src/pj/ip_helper_win32.c b/pjlib/src/pj/ip_helper_win32.c
index abd10541..d931e3d5 100644
--- a/pjlib/src/pj/ip_helper_win32.c
+++ b/pjlib/src/pj/ip_helper_win32.c
@@ -77,7 +77,7 @@ static void unload_iphlp_module(void)
#endif
}
-static FARPROC GetIpHlpApiProc(pj_char_t *lpProcName)
+static FARPROC GetIpHlpApiProc(char *lpProcName)
{
if(NULL == s_hDLL) {
s_hDLL = LoadLibrary(PJ_T("IpHlpApi"));
@@ -98,7 +98,7 @@ static DWORD MyGetIpAddrTable(PMIB_IPADDRTABLE pIpAddrTable,
{
if(NULL == s_pfnGetIpAddrTable) {
s_pfnGetIpAddrTable = (PFN_GetIpAddrTable)
- GetIpHlpApiProc(PJ_T("GetIpAddrTable"));
+ GetIpHlpApiProc("GetIpAddrTable");
}
if(NULL != s_pfnGetIpAddrTable) {
@@ -117,7 +117,7 @@ static DWORD MyGetAdapterAddresses(ULONG Family,
{
if(NULL == s_pfnGetAdapterAddresses) {
s_pfnGetAdapterAddresses = (PFN_GetAdapterAddresses)
- GetIpHlpApiProc(PJ_T("GetAdapterAddresses"));
+ GetIpHlpApiProc("GetAdapterAddresses");
}
if(NULL != s_pfnGetAdapterAddresses) {
@@ -134,7 +134,7 @@ static DWORD MyGetIfEntry(MIB_IFROW *pIfRow)
{
if(NULL == s_pfnGetIfEntry) {
s_pfnGetIfEntry = (PFN_GetIfEntry)
- GetIpHlpApiProc(PJ_T("GetIfEntry"));
+ GetIpHlpApiProc("GetIfEntry");
}
if(NULL != s_pfnGetIfEntry) {
@@ -152,7 +152,7 @@ static DWORD MyGetIpForwardTable(PMIB_IPFORWARDTABLE pIpForwardTable,
{
if(NULL == s_pfnGetIpForwardTable) {
s_pfnGetIpForwardTable = (PFN_GetIpForwardTable)
- GetIpHlpApiProc(PJ_T("GetIpForwardTable"));
+ GetIpHlpApiProc("GetIpForwardTable");
}
if(NULL != s_pfnGetIpForwardTable) {