From 35ad5e65afef56e9c96946fc8f9014217476cdf7 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Sun, 16 Aug 2020 04:49:18 +0100 Subject: [PATCH] sh/name.c: rm ancient binary compat overrides Four libast hash functions/macros (which ksh93 doesn't actually use) were overridden with the following comment: /* * These following are for binary compatibility with the old hash library * They will be removed someday */ This has been there for decades, and I just received word that they cause problems for the dtksh (CDE) developers as dtksh does call hashlook(). src/cmd/ksh93/sh/name.c: - Remove 'hashscope', 'hashfree', 'hashname' and 'hashlook' compatibility overrides. --- src/cmd/ksh93/sh/name.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/src/cmd/ksh93/sh/name.c b/src/cmd/ksh93/sh/name.c index 341b6c228..a11c4959d 100644 --- a/src/cmd/ksh93/sh/name.c +++ b/src/cmd/ksh93/sh/name.c @@ -3619,47 +3619,6 @@ void nv_unref(register Namval_t *np) #endif } -/* - * These following are for binary compatibility with the old hash library - * They will be removed someday - */ - -#if defined(__IMPORT__) && defined(__EXPORT__) -# define extern __EXPORT__ -#endif - -#undef hashscope - -extern Dt_t *hashscope(Dt_t *root) -{ - return(dtvnext(root)); -} - -#undef hashfree - -extern Dt_t *hashfree(Dt_t *root) -{ - Dt_t *dp = dtvnext(root); - dtclose(root); - return(dp); -} - -#undef hashname - -extern char *hashname(void *obj) -{ - Namval_t *np = (Namval_t*)obj; - return(np->nvname); -} - -#undef hashlook - -extern void *hashlook(Dt_t *root, const char *name, int mode,int size) -{ - NOT_USED(size); - return((void*)nv_search(name,root,mode)); -} - char *nv_name(register Namval_t *np) { Shell_t *shp = sh_getinterp();