mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Remove more UWIN symbols (re: 0ea97b9d) and EMX support
This removes support for the (AFAIK, completely unavailable) UWIN preprocessor, which used directives that nothing else understands, hidden behind the following macros: __STDPP__ __STDPP__directive __STDPP__hide This mailing list post from 2001 says that __STDPP__ is UWIN: https://lists.gnu.org/archive/html/bug-groff/2001-04/msg00030.html This also removes code hidden by the __EMX__ symbol. EMX (Eberhard Mattes eXtender) was a programming environment and POSIX interface for MS-DOS and OS/2. The last release was in 1998. https://en.wikipedia.org/wiki/EMX_%28programming_environment%29
This commit is contained in:
parent
d9a85caf22
commit
4c0df0e617
32 changed files with 21 additions and 333 deletions
|
@ -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=
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <error.h>
|
||||
|
@ -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
|
||||
|
|
|
@ -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 <ast.h>
|
||||
|
||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||
__STDPP__directive pragma pp:nohide strstr
|
||||
#else
|
||||
#undef strstr
|
||||
#endif
|
||||
|
||||
#if _lib_strstr
|
||||
|
||||
|
|
|
@ -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 <ast.h>
|
||||
|
||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||
__STDPP__directive pragma pp:nohide swab
|
||||
#else
|
||||
#undef swab
|
||||
#endif
|
||||
|
||||
#if _lib_swab
|
||||
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#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__
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <errno.h>
|
||||
|
@ -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 <ast_param.h>
|
||||
|
||||
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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 <ndir.h>
|
||||
|
||||
#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 <sys/dir.h>
|
||||
|
||||
#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
|
||||
|
|
|
@ -41,9 +41,6 @@ macro{
|
|||
#ifndef major
|
||||
#include <sys/sysmacros.h>
|
||||
#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 <<!
|
||||
#ifndef major
|
||||
|
|
|
@ -31,12 +31,8 @@
|
|||
* NOTE: two's complement binary integral representation assumed
|
||||
*/
|
||||
|
||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||
__STDPP__directive pragma pp:hide getpagesize getdtablesize
|
||||
#else
|
||||
#define getpagesize ______getpagesize
|
||||
#define getdtablesize ______getdtablesize
|
||||
#endif
|
||||
|
||||
/*
|
||||
* we'd like as many symbols as possible defined
|
||||
|
@ -74,12 +70,8 @@ __STDPP__directive pragma pp:hide getpagesize getdtablesize
|
|||
|
||||
#include "FEATURE/param"
|
||||
|
||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||
__STDPP__directive pragma pp:nohide getpagesize getdtablesize
|
||||
#else
|
||||
#undef getpagesize
|
||||
#undef getdtablesize
|
||||
#endif
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
@ -48,11 +48,9 @@ tst note{ check for Win32 .exe botches }end output{
|
|||
fix++,printf("#define _win32_botch_copy 1\n");
|
||||
if (_getpagesize() != 64 * 1024)
|
||||
fix++,printf("#define _win32_botch_getpagesize 1\n");
|
||||
#if !__EMX__
|
||||
if (_link("foo", "bar") || _access("bar.exe", X_OK))
|
||||
fix++,printf("#define _win32_botch_link 1\n");
|
||||
else
|
||||
#endif
|
||||
cp("foo.exe", "bar.exe");
|
||||
if ((fd = _open("foo", O_RDONLY)) < 0)
|
||||
fix++,printf("#define _win32_botch_open 1\n");
|
||||
|
|
|
@ -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 #
|
||||
|
@ -38,19 +38,11 @@ int xxx;" > $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 <signal.h>
|
||||
#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"
|
||||
|
|
|
@ -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*);
|
||||
|
|
|
@ -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 <ast_wait.h>
|
||||
|
||||
#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 <sys/wait.h>
|
||||
#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
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <ls.h>
|
||||
|
@ -56,15 +52,11 @@ __STDPP__directive pragma pp:hide getuniverse readlink setuniverse symlink unive
|
|||
#include <sys/universe.h>
|
||||
#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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 <interix/interix.h>
|
||||
|
||||
|
@ -106,7 +83,3 @@ pathnative(const char* path, char* buf, size_t siz)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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 <interix/interix.h>
|
||||
|
||||
|
@ -108,7 +85,3 @@ pathposix(const char* path, char* buf, size_t siz)
|
|||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 <sys/ioctl.h>
|
||||
#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*);
|
||||
|
||||
|
|
|
@ -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 <stdio.h>
|
||||
#if _hdr_mntent
|
||||
|
@ -474,12 +470,8 @@ __STDPP__directive pragma pp:hide endmntent getmntent
|
|||
#include <sys/mntent.h>
|
||||
#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*);
|
||||
|
|
|
@ -20,19 +20,11 @@
|
|||
* Phong Vo <kpv@research.att.com> *
|
||||
* *
|
||||
***********************************************************************/
|
||||
#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);
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <cdt.h>
|
||||
#include <grp.h>
|
||||
|
||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||
__STDPP__directive pragma pp:nohide getgrgid
|
||||
#else
|
||||
#undef getgrgid
|
||||
#endif
|
||||
|
||||
extern struct group* getgrgid(gid_t);
|
||||
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <cdt.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||
__STDPP__directive pragma pp:nohide getpwuid
|
||||
#else
|
||||
#undef getpwuid
|
||||
#endif
|
||||
|
||||
extern struct passwd* getpwuid(uid_t);
|
||||
|
||||
|
|
|
@ -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 <ast.h>
|
||||
|
||||
#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
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <cdt.h>
|
||||
#include <pwd.h>
|
||||
#include <grp.h>
|
||||
|
||||
#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*);
|
||||
|
|
|
@ -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 <ast.h>
|
||||
#include <cdt.h>
|
||||
#include <pwd.h>
|
||||
|
||||
#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);
|
||||
|
|
|
@ -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 <utime.h>
|
||||
#endif
|
||||
|
||||
#if defined(__STDPP__directive) && defined(__STDPP__hide)
|
||||
__STDPP__directive pragma pp:nohide utime
|
||||
#else
|
||||
#undef utime
|
||||
#endif
|
||||
|
||||
#if _lib_utime
|
||||
#if _hdr_utime
|
||||
|
|
|
@ -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 <cmd.h>
|
||||
#include <cdt.h>
|
||||
|
@ -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 */
|
||||
{
|
||||
|
|
|
@ -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 <cmd.h>
|
||||
#include <ls.h>
|
||||
|
@ -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);
|
||||
|
||||
|
|
|
@ -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 <cmd.h>
|
||||
#include <ctype.h>
|
||||
|
@ -91,14 +87,10 @@ __STDPP__directive pragma pp:hide getdomainname gethostid gethostname sethostnam
|
|||
# include <sys/utsname.h>
|
||||
#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;
|
||||
#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<<OPT_STANDARD)-1)
|
||||
|
||||
#ifndef MACHINE
|
||||
#if defined(__STDPP__)
|
||||
#define MACHINE #(getprd architecture)
|
||||
#else
|
||||
#define MACHINE ""
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef HOSTTYPE
|
||||
#define HOSTTYPE "unknown"
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue