pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Darko Prenosil <Darko.Prenosil@finteh.hr>
To: pgsql interfaces <pgsql-interfaces@postgresql.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: [BUGS] WIN32 MULTIBYTE
Date: Mon, 23 Jul 2001 19:47:14 +0200
Message-ID: <002801c1139f$cdb19660$1700a8c0@darko> (raw)
References: <200107211602.f6LG2kU15578@candle.pha.pa.us>
	<000701c1121f$3908f8e0$1700a8c0@darko>
	<14935.995898612@sss.pgh.pa.us>

> "Darko Prenosil" <darko_prenosil@yahoo.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.Prenosil@finteh.hr





view thread (4+ messages)  latest in thread

Message-ID: <002801c1139f$cdb19660$1700a8c0@darko>
Permalink:  ../002801c1139f$cdb19660$1700a8c0@darko/
Also on:    postgresql.org/message-id/002801c1139f$cdb19660$1700a8c0@darko

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: Darko.Prenosil@finteh.hr, tgl@sss.pgh.pa.us
  Subject: Re: [BUGS] WIN32 MULTIBYTE
  In-Reply-To: <002801c1139f$cdb19660$1700a8c0@darko>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox