From d50e8f1bcea298d26617589272d3a0c37a8be101 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Thu, 23 Jan 2014 17:53:27 +0100 Subject: [PATCH] Document gethostid(3) and sethostid(3) as obsolete. --- doc/obsolete-stuff | 9 +++++++++ libc/include/unistd.h | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/obsolete-stuff b/doc/obsolete-stuff index 8d88bd14..0c04e74c 100644 --- a/doc/obsolete-stuff +++ b/doc/obsolete-stuff @@ -93,6 +93,15 @@ named host, but don't care much about the low-level details. If you use these modern networking interfaces, then your program can use without modification IPv4, IPv6, or whatever new protocol is used in the future. +gethostid, sethostid +-------------------- + +These functions are built on the assumption that 32-bits are enough such that +each computer has an unique identity. It isn't. These functions are usually +implemented by using the IPv4 address, which already creates conflicts because +multiple systems can have the same LAN address. The functions are silly and any +use of them probably is silly too. + getpgrp ------- diff --git a/libc/include/unistd.h b/libc/include/unistd.h index 76f3ed2a..b1ba6443 100644 --- a/libc/include/unistd.h +++ b/libc/include/unistd.h @@ -311,7 +311,6 @@ int fdatasync(int); int fexecve(int, char* const [], char* const []); long fpathconf(int, int); int getgroups(int, gid_t []); -long gethostid(void); pid_t getpgrp(void); pid_t getsid(pid_t);