From d3efbc344158ca1eec0b7fbc19d5642ca6b74727 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Wed, 13 Jan 2021 11:10:21 +0700 Subject: [PATCH] Remove HAS_GETHOSTID. (#218) This is only true on DOS now. It was previously true on older unsupported platforms, but they are gone now. --- inc/version.h | 2 -- src/initsout.c | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/inc/version.h b/inc/version.h index 1c7ea5e..a26b231 100644 --- a/inc/version.h +++ b/inc/version.h @@ -208,7 +208,6 @@ error Must specify RELEASE to build Medley. /* Set up defaults */ #define NOETHER 1 #define UNALIGNED_FETCH_OK -#define HAS_GETHOSTID #define UNSIGNED unsigned long #define INT long @@ -264,7 +263,6 @@ typedef unsigned char u_char; typedef unsigned long u_int; typedef unsigned short u_short; #undef UNALIGNED_FETCH_OK -#undef HAS_GETHOSTID #define USHORT unsigned #else #define USHORT unsigned short diff --git a/src/initsout.c b/src/initsout.c index 707bdb8..0750f4d 100644 --- a/src/initsout.c +++ b/src/initsout.c @@ -139,10 +139,10 @@ void init_ifpage(int sysout_size) { *LASTVMEMFILEPAGE_word = InterfacePage->dllastvmempage; #endif /* BIGVM */ -/* unfortunately, Lisp only looks at a 16 bit serial number */ -#ifdef HAS_GETHOSTID + /* unfortunately, Lisp only looks at a 16 bit serial number */ +#ifndef DOS InterfacePage->serialnumber = 0xffff & gethostid(); -#endif /* HAS_GETHOSTID */ +#endif /* DOS */ /* get user name and stuff into vmem; this is the VMEM buffer; This is a BCPL string -- it starts with a length count. C strings