Re: Compiling libpq with VisualC

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Compiling libpq with VisualC
Дата
Msg-id 21333.1087682485@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Compiling libpq with VisualC  (Andreas Pflug <pgadmin@pse-consulting.de>)
Ответы Re: Compiling libpq with VisualC  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-patches
Andreas Pflug <pgadmin@pse-consulting.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

В списке pgsql-patches по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: eventlog fix
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: [HACKERS] Cannot initdb in cvs tip