Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-interfacespgsql-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

pgsql-bugs by date

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

pgsql-interfaces by date

Next:From: Ashley ClarkDate: 2001-07-23 18:39:31
Subject: BYTEA and ODBC driver
Previous:From: veronique DROUELLEDate: 2001-07-23 11:52:59
Subject: URGENT - PgAdmin

pgsql-patches by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group