postgresql/src/include/common/ip.h
Peter Eisentraut 797129e591 Remove IS_AF_UNIX macro
The AF_UNIX macro was being used unprotected by HAVE_UNIX_SOCKETS,
apparently since 2008.  So the redirection through IS_AF_UNIX() is
apparently no longer necessary.  (More generally, all supported
platforms are now HAVE_UNIX_SOCKETS, but even if there were a new
platform in the future, it seems plausible that it would define the
AF_UNIX symbol even without kernel support.)  So remove the
IS_AF_UNIX() macro and make the code a bit more consistent.

Discussion: https://www.postgresql.org/message-id/flat/f2d26815-9832-e333-d52d-72fbc0ade896%40enterprisedb.com
2022-02-15 10:16:34 +01:00

31 lines
942 B
C

/*-------------------------------------------------------------------------
*
* ip.h
* Definitions for IPv6-aware network access.
*
* These definitions are used by both frontend and backend code.
*
* Copyright (c) 2003-2022, PostgreSQL Global Development Group
*
* src/include/common/ip.h
*
*-------------------------------------------------------------------------
*/
#ifndef IP_H
#define IP_H
#include "getaddrinfo.h" /* pgrminclude ignore */
#include "libpq/pqcomm.h" /* pgrminclude ignore */
extern int pg_getaddrinfo_all(const char *hostname, const char *servname,
const struct addrinfo *hintp,
struct addrinfo **result);
extern void pg_freeaddrinfo_all(int hint_ai_family, struct addrinfo *ai);
extern int pg_getnameinfo_all(const struct sockaddr_storage *addr, int salen,
char *node, int nodelen,
char *service, int servicelen,
int flags);
#endif /* IP_H */