1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00

port.c no longer required...individual functions that were in there are

auto-generated via configure

individual functions in individual files
This commit is contained in:
Marc G. Fournier
1997-12-19 02:27:20 +00:00
parent 5379b84eff
commit 3ad815fc2a
4 changed files with 45 additions and 46 deletions

View File

@@ -0,0 +1,20 @@
#include <sys/types.h>
#include <string.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);
}