mirror of
https://github.com/postgres/postgres.git
synced 2025-12-10 14:22:35 +03:00
The attached patch fixes a number of issues related to compiling the
client utilities (libpq.dll and psql.exe) for win32 (missing defines, adjustments to includes, pedantic casting, non-existent functions) per: http://developer.postgresql.org/docs/postgres/install-win32.html. It compiles cleanly under Windows 2000 using Visual Studio .net. Also compiles clean and passes all regression tests (regular and contrib) under Linux. In addition to a review by the usual suspects, it would be very desirable for someone well versed in the peculiarities of win32 to take a look. Joe Conway
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.4 2002/08/27 20:16:48 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/mbprint.c,v 1.5 2002/10/03 17:09:42 momjian Exp $
|
||||
*/
|
||||
|
||||
#include "postgres_fe.h"
|
||||
@@ -202,7 +202,7 @@ mb_utf_wcswidth(unsigned char *pwcs, size_t len)
|
||||
for (; *pwcs && len > 0; pwcs += l)
|
||||
{
|
||||
l = pg_utf_mblen(pwcs);
|
||||
if ((len < l) || ((w = ucs_wcwidth(utf2ucs(pwcs))) < 0))
|
||||
if ((len < (size_t) l) || ((w = ucs_wcwidth(utf2ucs(pwcs))) < 0))
|
||||
return width;
|
||||
len -= l;
|
||||
width += w;
|
||||
|
||||
Reference in New Issue
Block a user