1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Implement getpeereid() as a src/port compatibility function.

This unifies a bunch of ugly #ifdef's in one place.  Per discussion,
we only need this where HAVE_UNIX_SOCKETS, so no need to cover Windows.

Marko Kreen, some adjustment by Tom Lane
This commit is contained in:
Tom Lane
2011-06-02 13:05:01 -04:00
parent 0c99d41ec8
commit 3980f7fc6e
6 changed files with 110 additions and 158 deletions

View File

@@ -395,6 +395,10 @@ extern void srand48(long seed);
extern int getopt(int nargc, char *const * nargv, const char *ostr);
#endif
#ifndef HAVE_GETPEEREID
extern int getpeereid(int sock, uid_t *uid, gid_t *gid);
#endif
#ifndef HAVE_ISINF
extern int isinf(double x);
#endif