1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

tie up standards macros loose ends (re: 289dd46c)

src/lib/libast/features/standards:
- Do not emit #defines for the typ u_long test which is only used
  as a heuristic in subsequent tests in this file. (Note that 'set'
  can set and unset any iffe command-line --option at runtime.)
- Remove definition of _ISOC99_SOURCE macro. This is another old
  GNU thing; feature_test_macros(7) says invoking the compiler with
  the option -std=c99 has the same effect. But modern GCC has C11
  with GNU extensions as the default, which is fine. If a
  particular standard is desired, pass a -std=... flag in $CC.

src/cmd/ksh93/features/rlimits:
- Remove overlooked Linux *64* types/functions hackery.
  After defining standards macros it caused a build failure
  on at least one version of Void Linux (but not 5.15.14_1).
  Thanks to @JohnoKing for the report.

src/cmd/ksh93/sh/subshell.c,
src/lib/libdll/dllnext.c:
- Remove now-redundant local definitions of _GNU_SOURCE and
  __EXTENSIONS__ macros.

src/cmd/ksh93/tests/builtins.sh:
- Fix broken sed invocation (re: 41829efa).
This commit is contained in:
Martijn Dekker 2022-01-20 04:20:17 +00:00
parent 41829efa06
commit 2c4b05b4f8
5 changed files with 12 additions and 49 deletions

View file

@ -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 <sys/resource.h>
# 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

View file

@ -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 <ls.h>
#include "io.h"

View file

@ -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"))"