diff --git a/src/cmd/ksh93/features/rlimits b/src/cmd/ksh93/features/rlimits index 23bf8e5a7..45ae222ce 100644 --- a/src/cmd/ksh93/features/rlimits +++ b/src/cmd/ksh93/features/rlimits @@ -1,25 +1,11 @@ hdr,sys resource,vlimit sys/time.h -lib getrlimit,getrlimit64,ulimit,vlimit -typ rlim_t,rlim64_t sys/types.h sys/time.h sys/resource.h +lib getrlimit,ulimit,vlimit +typ rlim_t sys/types.h sys/time.h sys/resource.h cat{ #if _sys_resource # include -# if _lib_getrlimit64 && _typ_rlim64_t -# undef getrlimit -# define getrlimit getrlimit64 -# undef setrlimit -# define setrlimit setrlimit64 -# undef rlimit -# define rlimit rlimit64 -# undef rlim_t -# define rlim_t rlim64_t -# ifdef RLIM64_INFINITY -# undef RLIM_INFINITY -# define RLIM_INFINITY RLIM64_INFINITY -# endif -# endif #endif }end diff --git a/src/cmd/ksh93/sh/subshell.c b/src/cmd/ksh93/sh/subshell.c index 4d0b3db84..33a487b19 100644 --- a/src/cmd/ksh93/sh/subshell.c +++ b/src/cmd/ksh93/sh/subshell.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1982-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 * @@ -26,10 +26,6 @@ * */ -#ifdef __linux__ -#define _GNU_SOURCE /* needed for O_PATH */ -#endif - #include "defs.h" #include #include "io.h" diff --git a/src/cmd/ksh93/tests/builtins.sh b/src/cmd/ksh93/tests/builtins.sh index d9757e155..78a9b4a47 100755 --- a/src/cmd/ksh93/tests/builtins.sh +++ b/src/cmd/ksh93/tests/builtins.sh @@ -2,7 +2,7 @@ # # # This software is part of the ast package # # Copyright (c) 1982-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 # @@ -31,7 +31,7 @@ if builtin getconf 2> /dev/null; then # The -l option should convert all variable names to lowercase. # https://github.com/att/ast/issues/1171 - got=$(getconf -lq | LC_ALL=C sed -n '/[A-Z].*=/p') + got=$(getconf -lq | LC_ALL=C sed -n -e 's/=.*//' -e '/[A-Z]/p') [[ -n $got ]] && err_exit "'getconf -l' doesn't convert all variable names to lowercase" \ "(got $(printf %q "$got"))" diff --git a/src/lib/libast/features/standards b/src/lib/libast/features/standards index bcc2b167c..6f3b000cf 100644 --- a/src/lib/libast/features/standards +++ b/src/lib/libast/features/standards @@ -4,7 +4,10 @@ set stdio # Flag systems that omit necessary definitions such as u_long # when _POSIX_SOURCE or _XOPEN_SOURCE are defined. # Affected: Mac OS X, UnixWare. +# Do not emit a #define for this test, just remember it for the next tests in this file. +set nodefine typ u_long +set define # # The following tests try to define the features/standards macros that expose @@ -82,10 +85,9 @@ elif tst note{ Darwin (macOS, Mac OS X) }end compile{ elif tst note{ SunOS (Solaris, illumos) }end compile{ /* * On Solaris/illumos, we ignore the standards(5) manual completely because - * defining any standards macro, and even defining __EXTENSIONS__ (!), will - * disable functionality that libast depends on. Instead we define unofficial - * _XPG* macros that enable up-to-date declarations and functionality in - * Solaris system headers. + * defining recommended standards macros will disable functionality that + * libast depends on. Instead we define unofficial _XPG* macros that enable + * up-to-date declarations and functionality in Solaris system headers. * (Note that we must also avoid passing any -std=... flag to the compiler, * because that will disable essential functionality as well.) */ @@ -333,17 +335,3 @@ else tst note{ __EXTENSIONS__ works }end compile{ #endif } endif - -if tst -D_ISOC99_SOURCE -lm note{ _ISOC99_SOURCE plays nice }end link{ - #include - #include - #include - #include - #include - int main() { return signbit(-0.0); } - }end { - #ifndef _ISOC99_SOURCE - #define _ISOC99_SOURCE 1 - #endif - } -endif diff --git a/src/lib/libdll/dllnext.c b/src/lib/libdll/dllnext.c index 5f89d4370..e365d7d49 100644 --- a/src/lib/libdll/dllnext.c +++ b/src/lib/libdll/dllnext.c @@ -2,7 +2,7 @@ * * * This software is part of the ast package * * Copyright (c) 1997-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 * @@ -23,13 +23,6 @@ * AT&T Research */ -#ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 -#endif -#ifndef __EXTENSIONS__ -#define __EXTENSIONS__ 1 -#endif - #include #include