Re: [BUGS] WIN32 MULTIBYTE

From: "Darko Prenosil" <Darko(dot)Prenosil(at)finteh(dot)hr>
To: "pgsql interfaces" <pgsql-interfaces(at)postgresql(dot)org>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: [BUGS] WIN32 MULTIBYTE
Date: 2001-07-23 17:47:14
Message-ID: 002801c1139f$cdb19660$1700a8c0@darko
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-interfaces pgsql-patches

> "Darko Prenosil" <darko_prenosil(at)yahoo(dot)com> writes:
> > In src/include/miscadmin.h there is declared external function
GetUserName.
>
> > I think that this header should not be imported in libpq at all,
>
> It isn't --- at least I can't see any inclusion path for it in current
> sources.
>
> regards, tom lane

Maybe You can not see it in build for Linux (I did not check),
but in WIN32.MAK file there is section
that looks like this:

!IFDEF MULTIBYTE
"$(INTDIR)\common.obj" : ..\..\backend\utils\mb\common.c
$(CPP) @<<
$(CPP_PROJ) /I "." ..\..\backend\utils\mb\common.c
<<

And there are first few lines from common.c :

/*
* This file contains some public functions
* usable for both the backend and the frontend.
* Tatsuo Ishii
* $Id: common.c,v 1.13 2001/04/16 02:42:01 tgl Exp $
*/
#include "postgres.h"

#ifdef WIN32
#include "win32.h"
#else
#include <unistd.h>
#endif

#include "miscadmin.h"
#include "mb/pg_wchar.h"
#include "utils/builtins.h"
...etc...

When I try to compile without correction I mentioned in previous message I
got this error:

..\..\include\miscadmin.h(206) : error C2373: 'GetUserNameA' : redefinition;
different type modifiers !

I'm shore that this header is imported, but I do not know if it can be
skipped in this way:

/*
* This file contains some public functions
* usable for both the backend and the frontend.
* Tatsuo Ishii
* $Id: common.c,v 1.13 2001/04/16 02:42:01 tgl Exp $
*/
#include "postgres.h"

#ifdef WIN32
#include "win32.h"
#else
#include <unistd.h>
#include "miscadmin.h"
#endif

#include "mb/pg_wchar.h"
#include "utils/builtins.h"
...etc...

I supose that this should not impact some other builds?
Is this part of code used by ODBC driver for example, and this change can
corrupt this build ?
I'm quite new in this, so I do not know those answers.

Darko(dot)Prenosil(at)finteh(dot)hr

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2001-07-23 21:28:48 Re: bug in the money type
Previous Message Felipe Alvarez Harnecker 2001-07-23 16:02:57 Re: date style bug

Browse pgsql-interfaces by date

  From Date Subject
Next Message Ashley Clark 2001-07-23 18:39:31 BYTEA and ODBC driver
Previous Message veronique DROUELLE 2001-07-23 11:52:59 URGENT - PgAdmin

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Padgett 2001-07-23 18:44:51 Patch to allow multiple table locks in "Unison"
Previous Message Tom Lane 2001-07-23 14:41:33 Re: pg_hba.conf caching