Re: libpq.dll & psql.exe on Win32

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mikhail Terekhov <terekhov(at)emc(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: libpq.dll & psql.exe on Win32
Date: 2001-08-23 00:55:56
Message-ID: 27902.998528156@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mikhail Terekhov <terekhov(at)emc(dot)com> writes:
> There are two problems when compiling libpq.dll and psql.exe
> on Windows. I'm not sure it is the best way to fix them
> (see patch below.) Comments?

The first should probably be conditional on HAVE_UNIX_SOCKETS,
not on WIN32. The second change looks okay to me.

regards, tom lane

> Index: bin/psql/prompt.c
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/psql/prompt.c,v
> retrieving revision 1.19
> diff -C3 -r1.19 prompt.c
> *** bin/psql/prompt.c 2001/05/06 17:21:11 1.19
> --- bin/psql/prompt.c 2001/08/22 18:27:26
> ***************
> *** 129,134 ****
> --- 129,135 ----
> if (*p == 'm')
> buf[strcspn(buf, ".")] = '\0';
> }
> + #ifndef WIN32
> /* UNIX socket */
> else
> {
> ***************
> *** 139,144 ****
> --- 140,146 ----
> else
> snprintf(buf, MAX_PROMPT_SIZE, "[local:%s]", host);
> }
> + #endif
> }
> break;
> /* DB server port number */
> Index: include/libpq/hba.h
> ===================================================================
> RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/libpq/hba.h,v
> retrieving revision 1.24
> diff -C3 -r1.24 hba.h
> *** include/libpq/hba.h 2001/08/16 16:24:16 1.24
> --- include/libpq/hba.h 2001/08/22 18:27:26
> ***************
> *** 11,17 ****
> --- 11,19 ----
> #ifndef HBA_H
> #define HBA_H

> + #ifndef WIN32
> #include <netinet/in.h>
> + #endif

> #define CONF_FILE "pg_hba.conf"
> /* Name of the config file */

> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?

> http://www.postgresql.org/search.mpl

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-08-23 01:22:08 Re: libpq.dll & psql.exe on Win32
Previous Message Tatsuo Ishii 2001-08-23 00:55:06 Re: encoding names