Re: [HACKERS] openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Peter Galbavy <peter(dot)galbavy(at)knowtion(dot)net>, pgsql-ports(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include
Date: 2002-11-06 00:36:20
Message-ID: 8720.1036542980@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-ports

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Peter Galbavy wrote:
>> According to the feedback I have had, e_os.h is no longer a public interface
>> header file in OpenSSL. 'get_last_socket_error' is a macro that seems to
>> expand to errno.

> OK, I am using:
> #$ openssl
> OpenSSL> version
> OpenSSL 0.9.6e 30 Jul 2002

> and ssl compiles fine here. What version are you using, exactly.

I have OpenSSL 0.9.6g here (which is still the current release according
to www.openssl.org). openssl/e_os.h is certainly still there ... but it
does contain the comment

/* <openssl/e_os2.h> contains what we can justify to make visible
* to the outside; this file e_os.h is not part of the exported
* interface. */

which may have prompted the OpenBSD porter to not include it?

Anyway, get_last_socket_error() seems exactly equivalent to our macro
SOCK_ERRNO in libpq/libpq-int.h. AFAICT, the uses of it in our
code are these:

/home/postgres/pgsql/src/backend/libpq/be-secure.c:
errno = get_last_socket_error();
/home/postgres/pgsql/src/backend/libpq/be-secure.c:
errno = get_last_socket_error();
/home/postgres/pgsql/src/interfaces/libpq/fe-secure.c:
SOCK_ERRNO = get_last_socket_error();
/home/postgres/pgsql/src/interfaces/libpq/fe-secure.c:
SOCK_ERRNO = get_last_socket_error();

and I think every one of these is bogus and should be removed.
At best they're no-ops.

If that is the only use of e_os.h stuff then we can stop including
the file ...

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jinqiang Han 2002-11-06 02:05:42 The document
Previous Message Tom Lane 2002-11-06 00:27:00 Re: PL/Perl and Perl 5.8

Browse pgsql-ports by date

  From Date Subject
Next Message Billy G. Allie 2002-11-07 03:57:26 PostgreSQL supported platform report and a patch.
Previous Message Bruce Momjian 2002-11-05 20:41:07 Re: openbsd 3.2, postgresql 7.3beta3 and openssl 'e_os.h' include