diff --git a/src/cmd/INIT/C+probe b/src/cmd/INIT/C+probe index f42774233..16077241d 100644 --- a/src/cmd/INIT/C+probe +++ b/src/cmd/INIT/C+probe @@ -66,7 +66,7 @@ then tmpdir=$TMPDIR else tmpdir=/tmp fi tmpdir=$tmpdir/probe$$ -undef="define defined elif else endif error if ifdef ifndef include line pragma undef __STDC__ __STDPP__ __ARGC__ __BASE__ __BASE_FILE__ __DATE__ __FILE__ __FUNCTION__ __INCLUDE_LEVEL__ __LINE__ __PATH__ __TIME__ __TIMESTAMP__ __VERSION__" +undef="define defined elif else endif error if ifdef ifndef include line pragma undef __STDC__ __ARGC__ __BASE__ __BASE_FILE__ __DATE__ __FILE__ __FUNCTION__ __INCLUDE_LEVEL__ __LINE__ __PATH__ __TIME__ __TIMESTAMP__ __VERSION__" version_flags= version_stamp= version_string= diff --git a/src/cmd/INIT/iffe.sh b/src/cmd/INIT/iffe.sh index fd1681747..394caec76 100644 --- a/src/cmd/INIT/iffe.sh +++ b/src/cmd/INIT/iffe.sh @@ -3579,10 +3579,7 @@ $inc [abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]:[\\/]*|[\\/]*) success case $o in - lcl) echo "#if defined(__STDPP__directive)" - echo "__STDPP__directive pragma pp:hosted" - echo "#endif" - echo "#include <$i> /* the native <$f.h> */" + lcl) echo "#include <$i> /* the native <$f.h> */" echo "#undef $m" usr="$usr$nl#define $m 1" echo "#define $m 1" diff --git a/src/lib/libast/comp/omitted.c b/src/lib/libast/comp/omitted.c index ea27bcf4f..b298bbcf4 100644 --- a/src/lib/libast/comp/omitted.c +++ b/src/lib/libast/comp/omitted.c @@ -3,12 +3,8 @@ * workarounds to bring the native interface close to POSIX and X/Open */ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide utime utimes -#else #define utime ______utime #define utimes ______utimes -#endif #include #include @@ -33,12 +29,8 @@ __STDPP__directive pragma pp:hide utime utimes #endif #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide utime utimes -#else #undef utime #undef utimes -#endif #ifndef MAX_PATH #define MAX_PATH PATH_MAX diff --git a/src/lib/libast/comp/strstr.c b/src/lib/libast/comp/strstr.c index 7f7de66e6..79fbcaa86 100644 --- a/src/lib/libast/comp/strstr.c +++ b/src/lib/libast/comp/strstr.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -21,19 +21,11 @@ * * ***********************************************************************/ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide strstr -#else #define strstr ______strstr -#endif #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide strstr -#else #undef strstr -#endif #if _lib_strstr diff --git a/src/lib/libast/comp/swab.c b/src/lib/libast/comp/swab.c index 4056d25e9..7ae3c564d 100644 --- a/src/lib/libast/comp/swab.c +++ b/src/lib/libast/comp/swab.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -24,19 +24,11 @@ * swab implementation */ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide swab -#else #define swab ______swab -#endif #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide swab -#else #undef swab -#endif #if _lib_swab diff --git a/src/lib/libast/comp/tempnam.c b/src/lib/libast/comp/tempnam.c index bfb09a49e..b2ad11f70 100644 --- a/src/lib/libast/comp/tempnam.c +++ b/src/lib/libast/comp/tempnam.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -29,23 +29,15 @@ #ifdef tempnam #define _def_tempnam 1 #else -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide tempnam -#else #define tempnam ______tempnam #endif -#endif #include #include #if !_def_tempnam -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide tempnam -#else #undef tempnam #endif -#endif #if defined(__EXPORT__) #define extern __EXPORT__ diff --git a/src/lib/libast/dir/dirlib.h b/src/lib/libast/dir/dirlib.h index b41f00943..51ba452aa 100644 --- a/src/lib/libast/dir/dirlib.h +++ b/src/lib/libast/dir/dirlib.h @@ -30,14 +30,10 @@ #ifndef _DIRLIB_H #define _DIRLIB_H -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getdents getdirentries -#else #undef getdents #define getdents ______getdents #undef getdirentries #define getdirentries ______getdirentries -#endif #include #include @@ -69,9 +65,6 @@ __STDPP__directive pragma pp:hide getdents getdirentries #define dirent DIRdirent -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide DIR closedir opendir readdir seekdir telldir -#else #undef DIR #define DIR ______DIR #undef closedir @@ -84,7 +77,6 @@ __STDPP__directive pragma pp:hide DIR closedir opendir readdir seekdir telldir #define seekdir ______seekdir #undef telldir #define telldir ______telldir -#endif #include @@ -104,16 +96,12 @@ __STDPP__directive pragma pp:hide DIR closedir opendir readdir seekdir telldir #endif #undef dirent -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide DIR closedir opendir readdir seekdir telldir -#else #undef DIR #undef closedir #undef opendir #undef readdir #undef seekdir #undef telldir -#endif #define _DIR_PRIVATE_ \ int dd_loc; /* offset in block */ \ @@ -140,12 +128,8 @@ __STDPP__directive pragma pp:nohide DIR closedir opendir readdir seekdir telldir #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getdents getdirentries -#else #undef getdents #undef getdirentries -#endif #ifndef errno extern int errno; diff --git a/src/lib/libast/features/common b/src/lib/libast/features/common index 7a016a8aa..b87a7793d 100644 --- a/src/lib/libast/features/common +++ b/src/lib/libast/features/common @@ -60,7 +60,8 @@ cat{ #endif /* Windows variants and veneers */ - #if !defined(_WINIX) && (__CYGWIN__ || __EMX__) + /* (as of 2022-07-21, only Cygwin) */ + #if !defined(_WINIX) && __CYGWIN__ # define _WINIX 1 #endif diff --git a/src/lib/libast/features/dirent b/src/lib/libast/features/dirent index 4644ab3b8..347a062fa 100644 --- a/src/lib/libast/features/dirent +++ b/src/lib/libast/features/dirent @@ -69,27 +69,19 @@ elif ( _hdr_ndir ) { #ifndef _DIRENT_H #define _DIRENT_H - #if defined(__STDPP__directive) && defined(__STDPP__hide) - __STDPP__directive pragma pp:hide closedir opendir readdir seekdir telldir - #else #define closedir ______closedir #define opendir ______opendir #define readdir ______readdir #define seekdir ______seekdir #define telldir ______telldir - #endif #include - #if defined(__STDPP__directive) && defined(__STDPP__hide) - __STDPP__directive pragma pp:nohide closedir opendir readdir seekdir telldir - #else #undef closedir #undef opendir #undef readdir #undef seekdir #undef telldir - #endif #ifndef dirent #define dirent direct @@ -120,27 +112,19 @@ elif ( _sys_dir ) { #ifndef _DIRENT_H #define _DIRENT_H - #if defined(__STDPP__directive) && defined(__STDPP__hide) - __STDPP__directive pragma pp:hide closedir opendir readdir seekdir telldir - #else #define closedir ______closedir #define opendir ______opendir #define readdir ______readdir #define seekdir ______seekdir #define telldir ______telldir - #endif #include - #if defined(__STDPP__directive) && defined(__STDPP__hide) - __STDPP__directive pragma pp:nohide closedir opendir readdir seekdir telldir - #else #undef closedir #undef opendir #undef readdir #undef seekdir #undef telldir - #endif #ifndef dirent #define dirent direct diff --git a/src/lib/libast/features/fs b/src/lib/libast/features/fs index 18b11225b..6e79b170b 100644 --- a/src/lib/libast/features/fs +++ b/src/lib/libast/features/fs @@ -41,9 +41,6 @@ macro{ #ifndef major #include #endif - <<"#if defined(__STDPP__directive) && defined(__STDPP__initial)">> - <<"__STDPP__directive pragma pp:initial">> - <<"#endif">> <<"#ifndef major">> #ifdef major <<"#define major(x)">> major((x)) @@ -78,9 +75,6 @@ macro{ #endif <<"#endif">> #endif - <<"#if defined(__STDPP__directive) && defined(__STDPP__initial)">> - <<"__STDPP__directive pragma pp:noinitial">> - <<"#endif">> }end fail{ cat < $tmp.c $cc -c $tmp.c >/dev/null 2>$tmp.e echo "#define sig_info _sig_info_ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide kill killpg -#else #define kill ______kill #define killpg ______killpg -#endif #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide kill killpg -#else #undef kill #undef killpg -#endif #ifndef sigmask #define sigmask(s) (1<<((s)-1)) #endif" diff --git a/src/lib/libast/features/stdio b/src/lib/libast/features/stdio index 11a277455..50dce6fa0 100644 --- a/src/lib/libast/features/stdio +++ b/src/lib/libast/features/stdio @@ -195,9 +195,6 @@ output{ } }end macro{ - <<"#if defined(__STDPP__directive) && defined(__STDPP__initial)">> - <<"__STDPP__directive pragma pp:initial">> - <<"#endif">> <<"#ifndef P_tmpdir">> #ifndef P_tmpdir #define P_tmpdir "/var/tmp/" @@ -216,9 +213,6 @@ macro{ #endif <<"#define L_tmpnam">> L_tmpnam <<"#endif">> - <<"#if defined(__STDPP__directive) && defined(__STDPP__initial)">> - <<"__STDPP__directive pragma pp:noinitial">> - <<"#endif">> }end cat{ extern char* ctermid(char*); diff --git a/src/lib/libast/include/wait.h b/src/lib/libast/include/wait.h index 4f2d89d43..b02615137 100644 --- a/src/lib/libast/include/wait.h +++ b/src/lib/libast/include/wait.h @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -31,20 +31,12 @@ #include #if _sys_wait -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide wait waitpid -#else #define wait ______wait #define waitpid ______waitpid -#endif #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide wait waitpid -#else #undef wait #undef waitpid #endif -#endif #ifndef WNOHANG #define WNOHANG 1 diff --git a/src/lib/libast/misc/univlib.h b/src/lib/libast/misc/univlib.h index 4f4390659..5d1282cd4 100644 --- a/src/lib/libast/misc/univlib.h +++ b/src/lib/libast/misc/univlib.h @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2011 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -36,15 +36,11 @@ #ifndef _UNIVLIB_H #define _UNIVLIB_H -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getuniverse readlink setuniverse symlink universe -#else #define getuniverse ______getuniverse #define readlink ______readlink #define setuniverse ______setuniverse #define symlink ______symlink #define universe ______universe -#endif #include #include @@ -56,15 +52,11 @@ __STDPP__directive pragma pp:hide getuniverse readlink setuniverse symlink unive #include #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getuniverse readlink setuniverse symlink universe -#else #undef getuniverse #undef readlink #undef setuniverse #undef symlink #undef universe -#endif #if _cmd_universe #ifdef NUMUNIV diff --git a/src/lib/libast/path/pathicase.c b/src/lib/libast/path/pathicase.c index 632fe5e76..725f9d1ad 100644 --- a/src/lib/libast/path/pathicase.c +++ b/src/lib/libast/path/pathicase.c @@ -40,11 +40,7 @@ int pathicase(const char *path) { -#ifdef _PC_PATH_ATTRIBUTES - /* AT&T mystery system (AST UWIN?) */ - char *a = astconf("PATH_ATTRIBUTES", path, (char*)0); - return a ? strchr(a,'c') != 0 : -1; -#elif _lib_pathconf && defined(_PC_CASE_SENSITIVE) +#if _lib_pathconf && defined(_PC_CASE_SENSITIVE) /* macOS; QNX 7.0+ */ long r = pathconf(path, _PC_CASE_SENSITIVE); return r < 0L ? -1 : r == 0L; diff --git a/src/lib/libast/path/pathnative.c b/src/lib/libast/path/pathnative.c index f4ec55f62..f02cc9eea 100644 --- a/src/lib/libast/path/pathnative.c +++ b/src/lib/libast/path/pathnative.c @@ -55,30 +55,7 @@ pathnative(const char* path, char* buf, size_t siz) return strlen(buf); } -#else - -#if __EMX__ - -size_t -pathnative(const char* path, char* buf, size_t siz) -{ - char* s; - size_t n; - - if (!_fullpath(buf, path, siz)) - { - for (s = buf; *s; s++) - if (*s == '/') - *s = '\\'; - } - else if ((n = strlen(path)) < siz && buf) - memcpy(buf, path, n + 1); - return n; -} - -#else - -#if __INTERIX +#elif __INTERIX #include @@ -106,7 +83,3 @@ pathnative(const char* path, char* buf, size_t siz) } #endif - -#endif - -#endif diff --git a/src/lib/libast/path/pathposix.c b/src/lib/libast/path/pathposix.c index d0ea10ab6..a3c584382 100644 --- a/src/lib/libast/path/pathposix.c +++ b/src/lib/libast/path/pathposix.c @@ -55,30 +55,7 @@ pathposix(const char* path, char* buf, size_t siz) return strlen(buf); } -#else - -#if __EMX__ && 0 /* show me the docs */ - -size_t -pathposix(const char* path, char* buf, size_t siz) -{ - char* s; - size_t n; - - if (!_posixpath(buf, path, siz)) - { - for (s = buf; *s; s++) - if (*s == '/') - *s = '\\'; - } - else if ((n = strlen(path)) < siz && buf) - memcpy(buf, path, n + 1); - return n; -} - -#else - -#if __INTERIX +#elif __INTERIX #include @@ -108,7 +85,3 @@ pathposix(const char* path, char* buf, size_t siz) } #endif - -#endif - -#endif diff --git a/src/lib/libast/port/astconf.c b/src/lib/libast/port/astconf.c index 0a9055519..bb6bb8af6 100644 --- a/src/lib/libast/port/astconf.c +++ b/src/lib/libast/port/astconf.c @@ -654,32 +654,7 @@ format(register Feature_t* fp, const char* path, const char* value, unsigned int break; case OP_path_attributes: -#ifdef _PC_PATH_ATTRIBUTES - { - register char* s; - register char* e; - intmax_t v; - - /* - * _PC_PATH_ATTRIBUTES is a bitmap for 'a' to 'z' - */ - - if ((v = pathconf(path, _PC_PATH_ATTRIBUTES)) == -1L) - return 0; - s = fp->value; - e = s + sizeof(fp->value) - 1; - for (n = 'a'; n <= 'z'; n++) - if (v & (1 << (n - 'a'))) - { - *s++ = n; - if (s >= e) - break; - } - *s = 0; - } -#else fp->value = pathicase(path) > 0 ? "c" : null; -#endif break; case OP_path_resolve: diff --git a/src/lib/libast/port/astwinsize.c b/src/lib/libast/port/astwinsize.c index 8812ce4a6..808435f1c 100644 --- a/src/lib/libast/port/astwinsize.c +++ b/src/lib/libast/port/astwinsize.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2012 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -33,12 +33,8 @@ #include #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide ioctl sleep -#else #define ioctl ______ioctl #define sleep ______sleep -#endif #if defined(TIOCGWINSZ) #if _sys_stream && _sys_ptem @@ -59,12 +55,8 @@ __STDPP__directive pragma pp:hide ioctl sleep #endif #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide ioctl sleep -#else #undef ioctl #undef sleep -#endif static int ttctl(int, int, void*); diff --git a/src/lib/libast/port/mnt.c b/src/lib/libast/port/mnt.c index 606a0ff88..351e08e79 100644 --- a/src/lib/libast/port/mnt.c +++ b/src/lib/libast/port/mnt.c @@ -460,12 +460,8 @@ mntclose(void* handle) #if _lib_getmntent && ( _hdr_mntent || _sys_mntent && !_sys_mnttab ) -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide endmntent getmntent -#else #define endmntent ______endmntent #define getmntent ______getmntent -#endif #include #if _hdr_mntent @@ -474,12 +470,8 @@ __STDPP__directive pragma pp:hide endmntent getmntent #include #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide endmntent getmntent -#else #undef endmntent #undef getmntent -#endif extern int endmntent(FILE*); extern struct mntent* getmntent(FILE*); diff --git a/src/lib/libast/sfio/sfsetbuf.c b/src/lib/libast/sfio/sfsetbuf.c index f91faafbf..69281566b 100644 --- a/src/lib/libast/sfio/sfsetbuf.c +++ b/src/lib/libast/sfio/sfsetbuf.c @@ -20,19 +20,11 @@ * Phong Vo * * * ***********************************************************************/ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getpagesize -#else #define getpagesize ______getpagesize -#endif #include "sfhdr.h" -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getpagesize -#else #undef getpagesize -#endif #if _lib_getpagesize extern int getpagesize(void); diff --git a/src/lib/libast/string/fmtgid.c b/src/lib/libast/string/fmtgid.c index 3124283b7..813c1329c 100644 --- a/src/lib/libast/string/fmtgid.c +++ b/src/lib/libast/string/fmtgid.c @@ -27,21 +27,13 @@ * cached GID number -> group name */ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getgrgid -#else #define getgrgid ______getgrgid -#endif #include #include #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getgrgid -#else #undef getgrgid -#endif extern struct group* getgrgid(gid_t); diff --git a/src/lib/libast/string/fmtuid.c b/src/lib/libast/string/fmtuid.c index 45819d3e3..03763d1e6 100644 --- a/src/lib/libast/string/fmtuid.c +++ b/src/lib/libast/string/fmtuid.c @@ -27,21 +27,13 @@ * UID number -> user name */ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getpwuid -#else #define getpwuid ______getpwuid -#endif #include #include #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getpwuid -#else #undef getpwuid -#endif extern struct passwd* getpwuid(uid_t); diff --git a/src/lib/libast/string/strdup.c b/src/lib/libast/string/strdup.c index bede27573..934be404c 100644 --- a/src/lib/libast/string/strdup.c +++ b/src/lib/libast/string/strdup.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2012 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -25,22 +25,14 @@ #define VMDEBUG 0 #if defined(_MSVCRT_H) -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide strdup -#else #define strdup ______strdup #endif -#endif #include #if defined(_MSVCRT_H) -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide strdup -#else #undef strdup #endif -#endif /* * return a copy of s using malloc diff --git a/src/lib/libast/string/strgid.c b/src/lib/libast/string/strgid.c index ba36571fb..756a3db21 100644 --- a/src/lib/libast/string/strgid.c +++ b/src/lib/libast/string/strgid.c @@ -27,26 +27,18 @@ * group name -> GID number */ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getgrgid getgrnam getpwnam -#else #define getgrgid ______getgrgid #define getgrnam ______getgrnam #define getpwnam ______getpwnam -#endif #include #include #include #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getgrgid getgrnam getpwnam -#else #undef getgrgid #undef getgrnam #undef getpwnam -#endif extern struct group* getgrgid(gid_t); extern struct group* getgrnam(const char*); diff --git a/src/lib/libast/string/struid.c b/src/lib/libast/string/struid.c index 453f32c5c..65fc96ea6 100644 --- a/src/lib/libast/string/struid.c +++ b/src/lib/libast/string/struid.c @@ -27,23 +27,15 @@ * user name -> UID */ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getpwnam getpwuid -#else #define getpwnam ______getpwnam #define getpwuid ______getpwuid -#endif #include #include #include -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getpwnam getpwuid -#else #undef getpwnam #undef getpwuid -#endif extern struct passwd* getpwnam(const char*); extern struct passwd* getpwuid(uid_t); diff --git a/src/lib/libast/tm/tvtouch.c b/src/lib/libast/tm/tvtouch.c index fa135e792..3e225181d 100644 --- a/src/lib/libast/tm/tvtouch.c +++ b/src/lib/libast/tm/tvtouch.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1985-2013 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -27,11 +27,7 @@ * Tv_t conversion support */ -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide utime -#else #define utime ______utime -#endif #ifndef _ATFILE_SOURCE #define _ATFILE_SOURCE 1 @@ -49,11 +45,7 @@ __STDPP__directive pragma pp:hide utime #include #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide utime -#else #undef utime -#endif #if _lib_utime #if _hdr_utime diff --git a/src/lib/libcmd/chgrp.c b/src/lib/libcmd/chgrp.c index 14bb850fa..bac528c32 100644 --- a/src/lib/libcmd/chgrp.c +++ b/src/lib/libcmd/chgrp.c @@ -97,11 +97,7 @@ static const char usage_3[] = "[+SEE ALSO?\bchmod\b(1), \bchown\b(2), \btw\b(1), \bgetconf\b(1), \bls\b(1)]" ; -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide lchown -#else #define lchown ______lchown -#endif #include #include @@ -111,11 +107,7 @@ __STDPP__directive pragma pp:hide lchown #include "FEATURE/symlink" -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide lchown -#else #undef lchown -#endif typedef struct Key_s /* UID/GID key */ { diff --git a/src/lib/libcmd/chmod.c b/src/lib/libcmd/chmod.c index 56990703c..4fa6b465d 100644 --- a/src/lib/libcmd/chmod.c +++ b/src/lib/libcmd/chmod.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1992-2012 AT&T Intellectual Property * -* Copyright (c) 2020-2021 Contributors to ksh 93u+m * +* Copyright (c) 2020-2022 Contributors to ksh 93u+m * * and is licensed under the * * Eclipse Public License, Version 1.0 * * by AT&T Intellectual Property * @@ -127,11 +127,7 @@ static const char usage[] = ; -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide lchmod -#else #define lchmod ______lchmod -#endif #include #include @@ -139,11 +135,7 @@ __STDPP__directive pragma pp:hide lchmod #include "FEATURE/symlink" -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide lchmod -#else #undef lchmod -#endif extern int lchmod(const char*, mode_t); diff --git a/src/lib/libcmd/uname.c b/src/lib/libcmd/uname.c index 888e95f40..44ba02671 100644 --- a/src/lib/libcmd/uname.c +++ b/src/lib/libcmd/uname.c @@ -69,14 +69,10 @@ static const char usage[] = " \bsysconf\b(3), \bsysinfo\b(2)]" ; -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:hide getdomainname gethostid gethostname sethostname -#else #define getdomainname ______getdomainname #define gethostid ______gethostid #define gethostname ______gethostname #define sethostname ______sethostname -#endif #include #include @@ -91,14 +87,10 @@ __STDPP__directive pragma pp:hide getdomainname gethostid gethostname sethostnam # include #endif -#if defined(__STDPP__directive) && defined(__STDPP__hide) -__STDPP__directive pragma pp:nohide getdomainname gethostid gethostname sethostname -#else #undef getdomainname #undef gethostid #undef gethostname #undef sethostname -#endif #if _lib_getdomainname extern int getdomainname(char*, size_t); @@ -121,18 +113,6 @@ static const char hosttype[] = HOSTTYPE; #if !_lib_uname || !_sys_utsname -#if defined(__STDPP__) -#define SYSNAME #(getprd machine) -#define RELEASE #(getprd release) -#define VERSION #(getprd version) -#define MACHINE #(getprd architecture) -#else -#define SYSNAME "" -#define RELEASE "" -#define VERSION "" -#define MACHINE "" -#endif - struct utsname { char* sysname; @@ -174,14 +154,13 @@ uname(register struct utsname* ut) #ifdef HOSTTYPE if (!(ut->sysname = sys)) #endif - if (!*(ut->sysname = SYSNAME)) - ut->sysname = ut->nodename; + ut->sysname = ut->nodename; #ifdef HOSTTYPE if (!(ut->machine = arch)) #endif - ut->machine = MACHINE; - ut->release = RELEASE; - ut->version = VERSION; + ut->machine = ""; + ut->release = ""; + ut->version = ""; return 0; } @@ -215,14 +194,6 @@ uname(register struct utsname* ut) #define OPT_total (1L<<30) #define OPT_standard ((1<