OSDN Git Service

Fix portability issues in new src/port/inet_net_ntop.c file.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Nov 2010 22:59:10 +0000 (17:59 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 26 Nov 2010 23:00:26 +0000 (18:00 -0500)
commit3840bc0847aa1b635127ff4a55b5257c9ebc79b8
tree12db0ffd71514000dee38f90dcd8cc12657c0a32
parent55109313f96fb5c7d671fe8954b6f7fc0cca9631
Fix portability issues in new src/port/inet_net_ntop.c file.

1. Don't #include postgres.h in a frontend build.

2. Don't assume that the backend's symbol PGSQL_AF_INET6 has anything to do
with the constant that will be used by system library functions (because,
in point of fact, it usually doesn't).  Fortunately, PGSQL_AF_INET is equal
to AF_INET, so we can just cater for both sets of values in one case
construct without fear of conflict.
src/port/inet_net_ntop.c