PostgreSQL X/Open Socket / BSD Socket Issue on HP-UX

From: MUHAMMAD ASIF <anaeem(dot)it(at)hotmail(dot)com>
To: <pgsql-hackers(at)postgresql(dot)org>
Subject: PostgreSQL X/Open Socket / BSD Socket Issue on HP-UX
Date: 2011-09-20 21:24:19
Message-ID: BAY164-W440954A04E2EB2AD342FFBFF0A0@phx.gbl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hi,
I faced similar issue as discussed in "http://postgresql.1045698.n5.nabble.com/Fwd-DBD-Pg-on-HP-UX-11-31-64bit-td3305163.html".
(man xopen_networking - http://docstore.mik.ua/manuals/hp-ux/en/B2355-60130/xopen_networking.7.html) ... There are two ways to obtain X/Open Sockets functionality:     * Method A is in compliance with X/Open compilation specification.    * Method B slightly deviates from X/Open compilation specification. However, Method B allows a program to include both objects compiled to X/Open Sockets specification and objects compiled to BSD Sockets specification. ...
PostgreSQL support X/Open Sockets. Apache web server (2.2.15, /opt/hpws22/apache) and Perl (5.8.8, /opt/perl_64) are BSD Socket applications that are default with the OS. I tried Method B (It provides wrapper _xpg_ socket functions that allows using X/Open socket objects and BSD socket objects in the same binary) to build PostgreSQL 9.1 code, I LD_PRELOAD the generated libpq binary, without any other change both perl and apache work fine with postgresql now,and it is easy to implement too. We just need to build the source code with "-D_XOPEN_SOURCE=600 -D_HPUX_ALT_XOPEN_SOCKET_API" and link binary with libc. PFA patch. Thanks.
Best Regards,Muhammad Asif Naeem

Attachment Content-Type Size
hp-ux_socket.patch application/octet-stream 1.1 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2011-09-20 21:32:03 Re: Is there really no interest in SQL Standard?
Previous Message Nulik Nol 2011-09-20 21:00:33 Re: CUDA Sorting