Re: Compiling libpq with VisualC

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Compiling libpq with VisualC
Date: 2004-06-19 22:01:25
Message-ID: 21333.1087682485@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Andreas Pflug <pgadmin(at)pse-consulting(dot)de> writes:
> <sys/time.h> in libpq-be.h isn't present on win32 vc6. Apparently, it
> isn't used in Linux either; libpq will compile without it.

It's there to declare struct timeval, and I'm fairly certain that diking
it out of the header would break things on some platforms. Where does
Windows define struct timeval?

> +#ifndef WIN32
> #include <sys/time.h>
> +#endif

Could we please use HAVE_SYS_TIME_H, rather than creating an unnecessary
platform specificity?

> #ifndef ELOG_H
> #define ELOG_H

> +#ifdef ERROR
> +#undef ERROR /* possible conflict in win32 */
> +#endif
> +
> /* Error level codes */

This seems likely to break anything expecting the Win32 definition
of ERROR. Can we look at not including elog.h in frontend builds,
instead? I can't think of any reason for frontend code to need it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gaetano Mendola 2004-06-19 22:03:59 Re: Minor DROP TABLESPACE issue
Previous Message Andreas Pflug 2004-06-19 20:10:10 Re: Compiling libpq with VisualC

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Dave Page 2004-06-19 22:04:38 Re: Cannot initdb in cvs tip
Previous Message Andreas Pflug 2004-06-19 20:10:10 Re: Compiling libpq with VisualC

Browse pgsql-patches by date

  From Date Subject
Next Message Dave Page 2004-06-19 22:04:38 Re: Cannot initdb in cvs tip
Previous Message Dave Page 2004-06-19 21:57:03 Re: eventlog fix