From 46c3dc199178603e1746919f0767f0b0715ecce3 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sun, 12 Jul 2020 15:59:25 -0700 Subject: [PATCH 1/2] Cleanup choice of valloc/malloc based on OS Although vmalloc() is deprecated in new code, it exists on a number of OSs. modified: src/ldsout.c --- src/ldsout.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/ldsout.c b/src/ldsout.c index e5e21c4..4c8b720 100644 --- a/src/ldsout.c +++ b/src/ldsout.c @@ -58,16 +58,10 @@ extern int errno; is going to expand or not */ int Storage_expanded; /* T or NIL */ -/* RISCOS, OSF1 and MACOSX don't have valloc, and malloc works OK there. */ -#if defined(LINUX) -/* has valloc() */ -#else -#if defined(SYSVONLY) || defined(OSF1) || defined(MACOSX) +/* RISCOS and OSF1 don't have valloc, and malloc works OK there. */ +#if defined(SYSVONLY) || defined(OSF1) || defined(RISCOS) #define valloc malloc -#else -char *valloc(); -#endif /* SYSVONLY || OSF1 || MACOSX */ -#endif /* not LINUX */ +#endif /* SYSVONLY || OSF1 || RISCOS */ /************************************************************************/ /* */ From 6aa938d453d450fe7d55a09e4e51cd966475c83a Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sun, 12 Jul 2020 16:04:11 -0700 Subject: [PATCH 2/2] Relocate MAXNAMLEN definition to proper home in locfile.h Remove selection of SYSVONLY for macOS and FreeBSD compilation (they are BSD flavor) modified: inc/locfile.h modified: inc/version.h --- inc/locfile.h | 1 + inc/version.h | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/inc/locfile.h b/inc/locfile.h index 916df74..296c42d 100755 --- a/inc/locfile.h +++ b/inc/locfile.h @@ -703,5 +703,6 @@ extern int errno; #define DIRSEPSTR "/" #define DIRSEP '/' #define UNIXDIRSEP '/' +#define MAXNAMLEN NAME_MAX #endif diff --git a/inc/version.h b/inc/version.h index 0561783..dfd0efc 100755 --- a/inc/version.h +++ b/inc/version.h @@ -388,9 +388,6 @@ typedef signed char s_char; /* #define sv_handler sa_handler */ /* #define sv_mask sa_mask */ /* #define sv_flags sa_flags */ - -#define MAXNAMLEN NAME_MAX - #endif /* LINUX */ @@ -409,11 +406,6 @@ typedef signed char s_char; #define REGISTER typedef signed char s_char; - -#define MAXNAMLEN NAME_MAX - -#define SYSVONLY 1 - #endif /* MACOSX || FREEBSD */