Re: pgsql: Code review for recent libpq changes. - Mailing list pgsql-committers

From Bruce Momjian
Subject Re: pgsql: Code review for recent libpq changes.
Date
Msg-id 200412030158.iB31wbg13973@candle.pha.pa.us
Whole thread Raw
In response to Re: pgsql: Code review for recent libpq changes.  (Michael Fuhr <mike@fuhr.org>)
Responses Re: pgsql: Code review for recent libpq changes.
List pgsql-committers
OK, fixed.  Patch attached.  Thanks.

---------------------------------------------------------------------------

Michael Fuhr wrote:
> On Thu, Dec 02, 2004 at 11:20:24PM +0000, Tom Lane wrote:
>
> > Code review for recent libpq changes.  Be more careful about error
> > handling in SIGPIPE processing; avoid unnecessary pollution of application
> > link-symbol namespace; spell 'pointer to function' in the conventional
> > way.
>
> Build failure on FreeBSD 4.10-STABLE:
>
> fe-secure.c: In function `pqsecure_write':
> fe-secure.c:433: `got_epipe' undeclared (first use in this function)
>
> got_epipe is declared in an #ifdef ENABLE_THREAD_SAFETY block but
> then used outside of such a block.
>
> --
> Michael Fuhr
> http://www.fuhr.org/~mfuhr/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: interfaces/libpq/fe-secure.c
===================================================================
RCS file: /cvsroot/pgsql/src/interfaces/libpq/fe-secure.c,v
retrieving revision 1.59
diff -c -c -r1.59 fe-secure.c
*** interfaces/libpq/fe-secure.c    2 Dec 2004 23:20:21 -0000    1.59
--- interfaces/libpq/fe-secure.c    3 Dec 2004 01:57:42 -0000
***************
*** 429,436 ****
--- 429,438 ----

                      if (n == -1)
                      {
+ #ifdef ENABLE_THREAD_SAFETY
                          if (SOCK_ERRNO == EPIPE)
                              got_epipe = true;
+ #endif
                          printfPQExpBuffer(&conn->errorMessage,
                                  libpq_gettext("SSL SYSCALL error: %s\n"),
                          SOCK_STRERROR(SOCK_ERRNO, sebuf, sizeof(sebuf)));

pgsql-committers by date:

Previous
From: momjian@svr1.postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Fix compile breakage from SIGPIPE fix for threading.
Next
From: momjian@svr1.postgresql.org (Bruce Momjian)
Date:
Subject: pgsql: Add: > * Fix priority ordering of read and write light-weight