diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-24 12:13:57 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-01-24 12:13:57 -0500 |
commit | 9222cd84b0f227287f65df395d52dc7973a62d29 (patch) | |
tree | 3bd4c25ebb5d8375f515c8adf93639cd90cd4994 | |
parent | f2789ab84ea0f731d97006c3ea91c656415c0fe5 (diff) | |
download | postgresql-9222cd84b0f227287f65df395d52dc7973a62d29.tar.gz postgresql-9222cd84b0f227287f65df395d52dc7973a62d29.zip |
Remove no-longer-referenced src/port/gethostname.c.
This file hasn't been part of any build since 2005, and even before that
wasn't used unless you configured --with-krb4 (and had a machine without
gethostname(2), obviously). What's more, we haven't actually called
gethostname anywhere since then, either (except in thread_test.c, whose
testing of this function is probably pointless). So we don't need it.
-rw-r--r-- | src/port/gethostname.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/port/gethostname.c b/src/port/gethostname.c deleted file mode 100644 index 51bdfc88be9..00000000000 --- a/src/port/gethostname.c +++ /dev/null @@ -1,33 +0,0 @@ -/*------------------------------------------------------------------------- - * - * gethostname.c - * gethostname using uname - * - * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group - * Portions Copyright (c) 1994, Regents of the University of California - * - * IDENTIFICATION - * src/port/gethostname.c - * - *------------------------------------------------------------------------- - */ - -#include "c.h" - -#include <sys/utsname.h> - -int -gethostname(char *name, int namelen) -{ - static struct utsname mname; - static int called = 0; - - if (!called) - { - called++; - uname(&mname); - } - strncpy(name, mname.nodename, (SYS_NMLN < namelen ? SYS_NMLN : namelen)); - - return 0; -} |