From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Andreas Pflug <pgadmin(at)pse-consulting(dot)de> |
Cc: | pgsql-patches(at)postgresql(dot)org |
Subject: | Re: win32/MSVC fix for libpq |
Date: | 2005-06-19 13:11:56 |
Message-ID: | 200506191311.j5JDBur00843@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
OK, applied. I had to use \# in:
echo \#define SYSCONFDIR "" > pg_config_paths.h
so that bcc wouldn't consider the # to be a comment, but it seems MSVC
doesn't have that issue, and in fact has a problem with it.
I modified the psql/win32.mak too to remove the \# and use just #.
---------------------------------------------------------------------------
Andreas Pflug wrote:
> The attached fix reenables libpq compilation with MSVC6.
>
> Regards,
> Andreas
> Index: fe-connect.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v
> retrieving revision 1.311
> diff -u -r1.311 fe-connect.c
> --- fe-connect.c 12 Jun 2005 00:07:07 -0000 1.311
> +++ fe-connect.c 19 Jun 2005 09:47:18 -0000
> @@ -3104,6 +3104,8 @@
> if (stat(pgpassfile, &stat_buf) == -1)
> return NULL;
>
> +#ifndef WIN32
> +
> if (!S_ISREG(stat_buf.st_mode))
> {
> fprintf(stderr,
> @@ -3113,7 +3115,6 @@
> return NULL;
> }
>
> -#ifndef WIN32
> /* If password file is insecure, alert the user and ignore it. */
> if (stat_buf.st_mode & (S_IRWXG | S_IRWXO))
> {
>
> Index: win32.mak
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/win32.mak,v
> retrieving revision 1.34
> diff -u -r1.34 win32.mak
> --- win32.mak 29 Apr 2005 13:42:21 -0000 1.34
> +++ win32.mak 19 Jun 2005 10:19:06 -0000
> @@ -115,7 +115,7 @@
> copy pthread.h.win32 pthread.h
>
> pg_config_paths.h: win32.mak
> - echo \#define SYSCONFDIR "" > pg_config_paths.h
> + echo #define SYSCONFDIR "" > pg_config_paths.h
>
> "$(OUTDIR)" :
> if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
> @@ -215,5 +215,8 @@
> $(CPP_PROJ) /I"." ..\..\backend\utils\mb\encnames.c
> <<
>
> +.c{$(CPP_OBJS)}.obj:
> + $(CPP) $(CPP_PROJ) $<
> +
> .c.obj:
> $(CPP) $(CPP_PROJ) $<
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 8: explain analyze is your friend
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-06-19 16:49:23 | Re: Python setof patch |
Previous Message | Andreas Pflug | 2005-06-19 12:29:46 | win32/MSVC fix for libpq |