From 7faa3173282f747e2b420dbd38e99ae49f5db3c7 Mon Sep 17 00:00:00 2001 From: Hiroshi Saito Date: Mon, 6 Jul 2009 15:23:02 +0000 Subject: [PATCH] Umm,heaher of unixODBC has the definition problem version of LPCWSTR. So, it adjusts. --- psqlodbc.h | 8 ++------ win_unicode.c | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/psqlodbc.h b/psqlodbc.h index a2be336..b7ebf70 100644 --- a/psqlodbc.h +++ b/psqlodbc.h @@ -5,7 +5,7 @@ * * Comments: See "notice.txt" for copyright and license information. * - * $Id: psqlodbc.h,v 1.130 2009/07/06 14:44:35 h-saito Exp $ + * $Id: psqlodbc.h,v 1.131 2009/07/06 15:23:02 h-saito Exp $ * */ @@ -478,17 +478,13 @@ int initialize_global_cs(void); const pthread_mutexattr_t *getMutexAttr(void); #endif /* POSIX_THREADMUTEX_SUPPORT */ #ifdef UNICODE_SUPPORT -#ifndef LPCWSTR /* windows-style typedef */ -/* sqltypes.h of unixODBC confused by the version. */ -typedef const wchar_t * LPCWSTR; -#endif #define WCLEN sizeof(SQLWCHAR) SQLULEN ucs2strlen(const SQLWCHAR *ucs2str); char *ucs2_to_utf8(const SQLWCHAR *ucs2str, SQLLEN ilen, SQLLEN *olen, BOOL tolower); SQLULEN utf8_to_ucs2_lf0(const char * utf8str, SQLLEN ilen, BOOL lfconv, SQLWCHAR *ucs2str, SQLULEN buflen); SQLULEN utf8_to_ucs2_lf1(const char * utf8str, SQLLEN ilen, BOOL lfconv, SQLWCHAR *ucs2str, SQLULEN buflen); int msgtowstr(const char *, const char *, int, LPWSTR, int); -int wstrtomsg(const char *, LPCWSTR, int, char *, int); +int wstrtomsg(const char *, const LPWSTR, int, char *, int); #define utf8_to_ucs2_lf(utf8str, ilen, lfconv, ucs2str, buflen) utf8_to_ucs2_lf0(utf8str, ilen, lfconv, ucs2str, buflen) #define utf8_to_ucs2(utf8str, ilen, ucs2str, buflen) utf8_to_ucs2_lf0(utf8str, ilen, FALSE, ucs2str, buflen) #endif /* UNICODE_SUPPORT */ diff --git a/win_unicode.c b/win_unicode.c index ed33ff1..f992fd8 100644 --- a/win_unicode.c +++ b/win_unicode.c @@ -335,7 +335,7 @@ mylog(" out=%dchars\n", wlen); return outlen; } -int wstrtomsg(const char *enc, LPCWSTR wstr, int wstrlen, char * outmsg, int buflen) +int wstrtomsg(const char *enc, const LPWSTR wstr, int wstrlen, char * outmsg, int buflen) { int outlen; #ifdef WIN32 -- 2.39.5