From owner-svn-ports-all@freebsd.org Mon Aug 5 13:28:05 2019 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E04D6C39B8; Mon, 5 Aug 2019 13:28:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 462JVY6GvSz4fd8; Mon, 5 Aug 2019 13:28:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EDD71C664; Mon, 5 Aug 2019 13:28:05 +0000 (UTC) (envelope-from cy@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x75DS5oR041616; Mon, 5 Aug 2019 13:28:05 GMT (envelope-from cy@FreeBSD.org) Received: (from cy@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x75DS5uC041611; Mon, 5 Aug 2019 13:28:05 GMT (envelope-from cy@FreeBSD.org) Message-Id: <201908051328.x75DS5uC041611@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cy set sender to cy@FreeBSD.org using -f From: Cy Schubert Date: Mon, 5 Aug 2019 13:28:05 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org Subject: svn commit: r508167 - in branches/2019Q3/shells/ksh93: . files X-SVN-Group: ports-branches X-SVN-Commit-Author: cy X-SVN-Commit-Paths: in branches/2019Q3/shells/ksh93: . files X-SVN-Commit-Revision: 508167 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Aug 2019 13:28:05 -0000 Author: cy Date: Mon Aug 5 13:28:04 2019 New Revision: 508167 URL: https://svnweb.freebsd.org/changeset/ports/508167 Log: MFH: r508117 Fix build with GCC-based architectures. PR: 239644 Submitted by: pkubaj@ Approved by: portmgr (joneum@) Added: branches/2019Q3/shells/ksh93/files/patch-scripts__libast____prereq.sh - copied unchanged from r508117, head/shells/ksh93/files/patch-scripts__libast____prereq.sh branches/2019Q3/shells/ksh93/files/patch-scripts__sort____symbols.py - copied unchanged from r508117, head/shells/ksh93/files/patch-scripts__sort____symbols.py branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__comp__conf.sh - copied unchanged from r508117, head/shells/ksh93/files/patch-src__lib__libast__comp__conf.sh branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__comp__conf.tab - copied unchanged from r508117, head/shells/ksh93/files/patch-src__lib__libast__comp__conf.tab branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__comp__conftab.c - copied unchanged from r508117, head/shells/ksh93/files/patch-src__lib__libast__comp__conftab.c branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__comp__conftab.c.in - copied unchanged from r508117, head/shells/ksh93/files/patch-src__lib__libast__comp__conftab.c.in branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__comp__conftab.h.in - copied unchanged from r508117, head/shells/ksh93/files/patch-src__lib__libast__comp__conftab.h.in branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__include__conftab.h - copied unchanged from r508117, head/shells/ksh93/files/patch-src__lib__libast__include__conftab.h branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__meson.build - copied unchanged from r508117, head/shells/ksh93/files/patch-src__lib__libast__meson.build Modified: branches/2019Q3/shells/ksh93/Makefile Directory Properties: branches/2019Q3/ (props changed) Modified: branches/2019Q3/shells/ksh93/Makefile ============================================================================== --- branches/2019Q3/shells/ksh93/Makefile Mon Aug 5 13:22:33 2019 (r508166) +++ branches/2019Q3/shells/ksh93/Makefile Mon Aug 5 13:28:04 2019 (r508167) @@ -3,6 +3,7 @@ PORTNAME= ksh93 DISTVERSION=2020.0.0-alpha1 PORTEPOCH= 1 +PORTREVISION= 2 CATEGORIES= shells MAINTAINER= cy@freebsd.org Copied: branches/2019Q3/shells/ksh93/files/patch-scripts__libast____prereq.sh (from r508117, head/shells/ksh93/files/patch-scripts__libast____prereq.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q3/shells/ksh93/files/patch-scripts__libast____prereq.sh Mon Aug 5 13:28:04 2019 (r508167, copy of r508117, head/shells/ksh93/files/patch-scripts__libast____prereq.sh) @@ -0,0 +1,33 @@ +--- files/patch-scripts_libast__prereq.sh.orig 2019-08-04 16:51:09 UTC ++++ files/patch-scripts_libast__prereq.sh +@@ -0,0 +1,30 @@ ++--- scripts/libast_prereq.sh.orig 2019-08-04 11:56:35 UTC +++++ scripts/libast_prereq.sh ++@@ -10,7 +10,6 @@ ++ # ++ set -e ++ bin_dir="$MESON_SOURCE_ROOT/bin" ++-comp_dir="$MESON_SOURCE_ROOT/src/lib/libast/comp" ++ PATH=$bin_dir:$PATH ++ INC_DIRS="" ++ INC_DIRS="$INC_DIRS -I$MESON_BUILD_ROOT" ++@@ -24,19 +23,6 @@ then ++ fi ++ ++ cd "$MESON_BUILD_ROOT" ++- ++-if cc --version | grep -q "GCC" ++-then ++- gcc_major_version=$(cc -dumpversion | cut -d. -f1) ++- if [ "$gcc_major_version" -ge 9 ] ++- then ++- extra_flags="-fno-diagnostics-show-line-numbers" ++- fi ++-fi ++- ++-# Generate the conftab.[ch] source files. ++-# shellcheck disable=SC2086 ++-"$comp_dir/conf.sh" $CC -std=gnu99 -D_BLD_DLL $INC_DIRS $extra_flags ++ ++ # Generate header files whose content depends on the current platform. ++ "$MESON_SOURCE_ROOT/scripts/siglist.sh" > features/siglist.h Copied: branches/2019Q3/shells/ksh93/files/patch-scripts__sort____symbols.py (from r508117, head/shells/ksh93/files/patch-scripts__sort____symbols.py) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q3/shells/ksh93/files/patch-scripts__sort____symbols.py Mon Aug 5 13:28:04 2019 (r508167, copy of r508117, head/shells/ksh93/files/patch-scripts__sort____symbols.py) @@ -0,0 +1,37 @@ +--- files/patch-scripts_sort__symbols.py.orig 2019-08-04 16:51:09 UTC ++++ files/patch-scripts_sort__symbols.py +@@ -0,0 +1,34 @@ ++--- scripts/sort_symbols.py.orig 2019-04-16 20:04:19 UTC +++++ scripts/sort_symbols.py ++@@ -1,31 +0,0 @@ ++-# This replaces the following pipeline in the original .../libast/comp.conf.sh ++-# script. We're now using a python program not for efficiency but because we ++-# need to sort the strings from longest to shortest to work around a bug with ++-# the macOS `fgrep -x -v` behavior. ++-# ++-# sed "s/[^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789][^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*/${snl}/g" $tmp.e | ++-# grep '^[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz][_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*$' | ++-# sort -u > $tmp.n ++-# ++-from __future__ import print_function # in case we're being run by python2 ++-import re ++-import sys ++- ++- ++-def sort_key(k): ++- return (len(k), k) ++- ++- ++-# Capture all the lines consisting solely of single tokens that are valid ++-# C symbols. ++-lines = [] ++-for line in sys.stdin: ++- m = re.match(r'^\s*(\w+),$', line) ++- if m: ++- lines.append(m.group(1)) ++- ++-# Sort by line length then lexicographically for lines of the same length. ++-lines.sort(key=sort_key, reverse=True) ++- ++-for line in lines: ++- print(line) Copied: branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__comp__conf.sh (from r508117, head/shells/ksh93/files/patch-src__lib__libast__comp__conf.sh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ branches/2019Q3/shells/ksh93/files/patch-src__lib__libast__comp__conf.sh Mon Aug 5 13:28:04 2019 (r508167, copy of r508117, head/shells/ksh93/files/patch-src__lib__libast__comp__conf.sh) @@ -0,0 +1,1346 @@ +--- files/patch-src_lib_libast_comp_conf.sh.orig 2019-08-04 16:51:09 UTC ++++ files/patch-src_lib_libast_comp_conf.sh +@@ -0,0 +1,1343 @@ ++--- src/lib/libast/comp/conf.sh.orig 2019-04-16 20:04:19 UTC +++++ src/lib/libast/comp/conf.sh ++@@ -1,1340 +0,0 @@ ++-#!/bin/sh ++-######################################################################## ++-# # ++-# This software is part of the ast package # ++-# Copyright (c) 1985-2013 AT&T Intellectual Property # ++-# and is licensed under the # ++-# Eclipse Public License, Version 1.0 # ++-# by AT&T Intellectual Property # ++-# # ++-# A copy of the License is available at # ++-# http://www.eclipse.org/org/documents/epl-v10.html # ++-# (with md5 checksum b35adb5213ca9657e911e9befb180842) # ++-# # ++-# Information and Software Systems Research # ++-# AT&T Research # ++-# Florham Park NJ # ++-# # ++-# Glenn Fowler # ++-# David Korn # ++-# Phong Vo # ++-# # ++-######################################################################## ++-# ++-# @(#)conf.sh (AT&T Research) 2011-08-26 ++-# ++-# This script generates these files from the table file: ++-# ++-# conflim.h supplemental limits.h definitions ++-# conftab.h readonly string table definitions ++-# conftab.c readonly string table data ++-# ++-# You may think it should be simpler but you shall be confused anyway. ++-# ++-export LC_ALL=C ++- ++-command=`basename $0` ++-source_dir="$MESON_SOURCE_ROOT/src/lib/libast/comp" ++-target_dir="$MESON_BUILD_ROOT/src/lib/libast/comp" ++-table=$source_dir/conf.tab ++-test $# -gt 0 || { echo missing expected compiler args >&2; exit 1; } ++-cc=$* ++- ++-PATH="$MESON_SOURCE_ROOT/scripts:$PATH" ++- ++-# The use of `mktemp -dt` isn't ideal as it has slightly different meaning on BSD and GNU. But for ++-# our purposes that doesn't matter. It simply means the temp file name will contain the X's on a BSD ++-# system. See https://github.com/att/ast/issues/939 ++-tmpdir=$(mktemp -dt ksh.XXXXXX) ++-tmp=$tmpdir/conf ++-cd $tmpdir || exit ++-trap "rm -rf $tmpdir" EXIT ++- ++-# We need to create the Meson build directory that will contain the ++-# dynamically generated source files. ++-test -d "$target_dir" || mkdir -p "$target_dir" ++- ++-# We don't bother doing this test before creating the temp dir because we ++-# don't expect this to ever fail unless the project source has been damaged. ++-if test ! -f $table ++-then ++- echo "$command: cannot read: $table" >&2 ++- exit 1 ++-fi ++- ++-# Setting the compiler's error-limit to zero (or a number much larger than the usual default of 20) ++-# is important to the proper functioning of the `defined()` function below. The default limit can, ++-# through pure chance, cause the inner loop of that function to terminate prematurely when it ++-# decides it isn't making forward progress in eliminating symbol errors. This also makes that ++-# process much more efficient. Unfortunately we can't just assume the compiler supports this so ++-# only use the flag if it does. Otherwise hope for the best with the default error limit. ++-cat > $tmp.c < ++-#include ++-#include ++-' ++- ++-tail=' ++-#include ++-#include ++-' ++- ++-headers= ++-ifs=${IFS} ++-tab=' ' # this should be the only place a literal tab appears in this script ++-nl=' ++-' ++-sym=[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]* ++- ++-# determine the intmax_t printf format ++- ++-cat > $tmp.c < $tmp.c <&2 ++- exec < $table ++- while : ++- do ++- IFS="" ++- read line ++- eof=$? ++- IFS=$ifs ++- case $eof in ++- 0) ;; ++- *) break ;; ++- esac ++- case $line in ++- ""|\#*) ;; ++- *) set x $line ++- shift; name=$1 ++- shift; standard=$1 ++- shift; call=$1 ++- shift; section=$1 ++- shift; flags=$1 ++- alternates= ++- define= ++- values= ++- script= ++- headers= ++- while : ++- do shift ++- case $# in ++- 0) break ;; ++- esac ++- case $1 in ++- ":") shift ++- eval script='$'script_$1 ++- break ++- ;; ++- *"{") case $1 in ++- "sh{") script="# $name" ;; ++- *) script= ;; ++- esac ++- shift ++- args="$*" ++- IFS="" ++- while read line ++- do case $line in ++- "}") break ;; ++- esac ++- script="$script$nl$line" ++- done ++- IFS=$ifs ++- break ++- ;; ++- *.h) # These conf.tab entries are now ignored. ++- # We no longer build or use iffe to detect whether ++- # a given header is available. Too, not doing this ++- # appears to have no material effect on the build. ++- ;; ++- *) values="$values $1" ++- case $1 in ++- $sym) echo "$1" >> $tmp.v ;; ++- esac ++- ;; ++- esac ++- done ++- case " $standards " in ++- *" $standard "*) ++- ;; ++- *) standards="$standards $standard" ++- ;; ++- esac ++- case $name:$flags in ++- *:*S*) ;; ++- VERSION)flags="${flags}S" ;; ++- esac ++- case $name in ++- *VERSION*)key=${standard}${section} ;; ++- *) key= ;; ++- esac ++- case $key in ++- ''|*_) key=${key}${name} ;; ++- *) key=${key}_${name} ;; ++- esac ++- eval sys='$'CONF_call_${key} ++- case $sys in ++- ?*) call=$sys ;; ++- esac ++- case $call in ++- SI) sys=CS ;; ++- *) sys=$call ;; ++- esac ++- key=${sys}_${key} ++- keys="$keys$nl$key" ++- eval CONF_name_${key}='$'name ++- eval CONF_standard_${key}='$'standard ++- eval CONF_call_${key}='$'call ++- eval CONF_section_${key}='$'section ++- eval CONF_flags_${key}='$'flags ++- eval CONF_define_${key}='$'define ++- eval CONF_values_${key}='$'values ++- eval CONF_script_${key}='$'script ++- eval CONF_args_${key}='$'args ++- eval CONF_headers_${key}='$'headers ++- eval CONF_keys_${name}=\"'$'CONF_keys_${name} '$'key\" ++- ;; ++- esac ++- done ++- ;; ++-esac ++- ++-# ==================== ++-# Check for native getconf(1). ++-# ++-CONF_getconf= ++-CONF_getconf_a= ++-for d in /usr/bin /bin /usr/sbin /sbin ++-do if test -x $d/getconf ++- then case `$d/getconf --?-version 2>&1` in ++- *"AT&T"*"Research"*) ++- : presumably an implementation also configured from conf.tab ++- ;; ++- *) CONF_getconf=$d/getconf ++- if $CONF_getconf -a >/dev/null 2>&1 ++- then CONF_getconf_a=-a ++- fi ++- ;; ++- esac ++- break ++- fi ++-done ++-export CONF_getconf CONF_getconf_a ++- ++-echo "$command: check ${CONF_getconf:+$CONF_getconf(1),}confstr(2),pathconf(2),sysconf(2),sysinfo(2) configuration names" >&2 ++- ++-{ ++- echo " ++-${head} ++-#include ++- ++-int i = 0;" > $tmp.c ++- $cc -E $tmp.c ++-} | ++-sed -e '/^#[^0123456789]*1[ '"$tab"']*".*".*/!d' \ ++- -e 's/^#[^0123456789]*1[ '"$tab"']*"\(.*\)".*/\1/' | ++-sort -u > $tmp.f ++- ++-{ ++- sed -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]/ /g' \ ++- -e 's/[ '"$tab"'][ '"$tab"']*/\n/g' \ ++- `cat $tmp.f` 2>/dev/null | ++- egrep '^(SI|_(CS|PC|SC|SI))_.' ++- case $CONF_getconf_a in ++- ?*) $CONF_getconf $CONF_getconf_a | sed 's,[=: ].*,,' ++- ;; ++- *) case $CONF_getconf in ++- ?*) for v in `strings $CONF_getconf | grep '^[ABCDEFGHIJKLMNOPQRSTUVWXYZ_][ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*$'` ++- do if $CONF_getconf $v >/dev/null ++- then echo $v ++- fi ++- done ++- ;; ++- esac ++- ;; ++- esac 2>/dev/null ++-} | ++-egrep -v '^_[ABCDEFGHIJKLMNOPQRSTUVWXYZ]+_(COUNT|LAST|N|STR)$' | ++-sort -u > $tmp.g ++-{ ++- grep '^_' $tmp.g ++- grep '^[^_]' $tmp.g ++-} > $tmp.t ++-mv $tmp.t $tmp.g ++- ++-HOST=`"$MESON_SOURCE_ROOT/bin/hosttype" | sed -e 's,[0123456789.].*,,' | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ` ++-case $HOST in ++-'') HOST=SYSTEM ;; ++-esac ++- ++-exec < $tmp.g ++-while read line ++-do flags=F ++- section= ++- underscore= ++- define=$line ++- IFS=_ ++- set $line ++- IFS=$ifs ++- case $1 in ++- '') case $# in ++- 0) continue ;; ++- esac ++- shift ++- ;; ++- esac ++- case $1 in ++- CS|PC|SC|SI) ++- call=$1 ++- shift ++- standard=$1 ++- ;; ++- *) flags=${flags}R ++- standard=$1 ++- while : ++- do case $# in ++- 0) continue 2 ;; ++- esac ++- shift ++- case $1 in ++- CS|PC|SC|SI) ++- call=$1 ++- shift ++- break ++- ;; ++- O|o|OLD|old) ++- continue 2 ++- ;; ++- esac ++- standard=${standard}_$1 ++- done ++- ;; ++- esac ++- case $1 in ++- SET) continue ;; ++- esac ++- case $standard in ++- _*) standard=`echo $standard | sed 's,^_*,,'` ;; ++- esac ++- case " $standards " in ++- *" $standard "*) ++- ;; ++- *) case $standard in ++- [0123456789]*) ++- section=$standard ++- standard=POSIX ++- ;; ++- *[0123456789]) ++- eval `echo $standard | sed 's,\(.*\)\([0123456789]*\),standard=\1 section=\2,'` ++- ;; ++- esac ++- ;; ++- esac ++- case $flags in ++- *R*) case $call in ++- SI) ;; ++- *) underscore=U ;; ++- esac ++- ;; ++- *) case " $standards " in ++- " C ") shift ++- ;; ++- *" $standard "*) ++- case $call in ++- SI) ;; ++- *) flags=${flags}P ++- underscore=U ++- ;; ++- esac ++- shift ++- ;; ++- *) standard= ++- ;; ++- esac ++- ;; ++- esac ++- case $standard in ++- '') standard=$HOST ++- case $call in ++- SI) ;; ++- *) underscore=U ;; ++- esac ++- case $call in ++- CS|PC|SC) ++- case $define in ++- _${call}_*) ++- standard=POSIX ++- ;; ++- esac ++- ;; ++- esac ++- ;; ++- esac ++- part=$section ++- case $section in ++- '') section=1 ++- case $standard in ++- POSIX|XOPEN) part=$section ;; ++- esac ++- ;; ++- esac ++- name= ++- while : ++- do case $# in ++- 0) break ;; ++- esac ++- case $name in ++- '') name=$1 ;; ++- *) name=${name}_$1 ;; ++- esac ++- shift ++- done ++- case $name in ++- '') ;; ++- HOSTTYPE|LIBPATH|LIBPREFIX|LIBSUFFIX|PATH_ATTRIBUTES|PATH_RESOLVE|UNIVERSE) ++- ;; ++- *) values= ++- script= ++- args= ++- headers= ++- case $name in ++- V[123456789]_*|V[123456789][0123456789]_*) underscore=VW ;; ++- esac ++- case $call in ++- CS|SI) key=CS ;; ++- *) key=$call ;; ++- esac ++- case $name in ++- *VERSION*)key=${key}_${standard}${part} ;; ++- esac ++- key=${key}_${name} ++- eval x='$'CONF_keys_$name ++- case $x in ++- '') eval x='$'CONF_name_$key ++- case $x in ++- '') case $call in ++- SI) flags=O$flags ;; ++- esac ++- case $underscore in ++- ?*) flags=${flags}${underscore} ;; ++- esac ++- old=QQ ++- case $name in ++- *VERSION*)old=${old}_${standard}${part} ;; ++- esac ++- old=${old}_${name} ++- eval x='$'CONF_name_$old ++- case $x in ++- ?*) eval CONF_name_$old= ++- eval flags='$'flags'$'CONF_flags_$old ++- eval values='$'CONF_values_$old ++- eval script='$'CONF_script_$old ++- eval args='$'CONF_args_$old ++- eval headers='$'CONF_headers_$old ++- ;; ++- esac ++- keys="$keys$nl$key" ++- eval CONF_name_${key}='$'name ++- eval CONF_standard_${key}='$'standard ++- eval CONF_call_${key}='$'call ++- eval CONF_section_${key}='$'section ++- eval CONF_flags_${key}=d'$'flags ++- eval CONF_define_${key}='$'define ++- eval CONF_values_${key}='$'values ++- eval CONF_script_${key}='$'script ++- eval CONF_args_${key}='$'args ++- eval CONF_headers_${key}='$'headers ++- ;; ++- *) eval x='$'CONF_define_$key ++- case $x in ++- ?*) case $call in ++- CS) eval x='$'CONF_call_$key ++- case $x in ++- SI) ;; ++- *) define= ;; ++- esac ++- ;; ++- *) define= ++- ;; ++- esac ++- ;; ++- esac ++- case $define in ++- ?*) eval CONF_define_${key}='$'define ++- eval CONF_call_${key}='$'call ++- eval x='$'CONF_call_${key} ++- case $x in ++- QQ) ;; ++- *) case $flags in ++- *R*) flags=R ;; ++- *) flags= ;; ++- esac ++- ;; ++- esac ++- case $call in ++- SI) flags=O$flags ;; ++- esac ++- eval CONF_flags_${key}=d'$'flags'$'CONF_flags_${key} ++- ;; ++- esac ++- old=QQ ++- case $name in ++- *VERSION*)old=${old}_${standard}${part} ;; ++- esac ++- old=${old}_${name} ++- eval CONF_name_$old= ++- esac ++- ;; ++- *) for key in $x ++- do eval x='$'CONF_call_${key} ++- case $x in ++- XX) eval CONF_call_${key}=QQ ++- eval CONF_flags_${key}=S'$'CONF_flags_${key} ++- ;; ++- esac ++- done ++- esac ++- ;; ++- esac ++-done ++- ++-# sort keys by name ++- ++-keys=`for key in $keys ++-do eval echo '$'CONF_name_$key '$'key ++-done | sort -u | sed 's,.* ,,'` ++- ++-# mark the dups CONF_PREFIXED ++- ++-prev_key= ++-prev_name= ++-for key in $keys ++-do eval name=\"'$'CONF_name_$key\" ++- case $name in ++- '') continue ++- ;; ++- $prev_name) ++- eval p='$'CONF_flags_${prev_key} ++- eval c='$'CONF_flags_${key} ++- case $p:$c in ++- *L*:*L*);; ++- *L*:*) c=L${c} ;; ++- *:*L*) p=L${p} ;; ++- *) p=P$p c=P$c ;; ++- esac ++- eval CONF_flags_${prev_key}=$p ++- eval CONF_flags_${key}=$c ++- ;; ++- esac ++- prev_name=$name ++- prev_key=$key ++-done ++- ++-# collect all the macros/enums ++- ++-for key in $keys ++-do eval name=\"'$'CONF_name_$key\" ++- case $name in ++- '') continue ;; ++- $keep_name) ;; ++- *) continue ;; ++- esac ++- eval call=\"'$'CONF_call_$key\" ++- case $call in ++- $keep_call) ;; ++- *) continue ;; ++- esac ++- eval standard=\"'$'CONF_standard_$key\" ++- eval section=\"'$'CONF_section_$key\" ++- eval flags=\"'$'CONF_flags_$key\" ++- eval define=\"'$'CONF_define_$key\" ++- eval values=\"'$'CONF_values_$key\" ++- eval script=\"'$'CONF_script_$key\" ++- eval args=\"'$'CONF_args_$key\" ++- eval headers=\"'$'CONF_headers_$key\" ++- conf_name=$name ++- case $call in ++- QQ) call=XX ++- for c in SC PC CS ++- do case $flags in ++- *S*) case $section in ++- 1) eval x='$'CONF_call_${c}_${standard}_${name} ;; ++- *) eval x='$'CONF_call_${c}_${standard}${section}_${name} ;; ++- esac ++- ;; ++- *) eval x='$'CONF_call_${c}_${name} ++- ;; ++- esac ++- case $x in ++- ?*) call=$x ++- break ++- ;; ++- esac ++- done ++- case $call in ++- XX) for c in SC PC CS ++- do echo "_${c}_${name}" ++- case $flags in ++- *S*) case $section in ++- 1) echo "_${c}_${standard}_${name}" ;; ++- *) echo "_${c}_${standard}${section}_${name}" ;; ++- esac ++- ;; ++- esac ++- done ++- ;; ++- esac ++- ;; ++- esac ++- case $call in ++- CS|PC|SC|SI|XX) ++- ;; ++- *) echo "$command: $name: $call: invalid call" >&2 ++- exit 1 ++- ;; ++- esac ++- case $flags in ++- *[ABEGHIJQTYZabcefghijklmnopqrstuvwxyz_123456789]*) ++- echo "$command: $name: $flags: invalid flag(s)" >&2 ++- exit 1 ++- ;; ++- esac ++- case $section in ++- [01]) ;; ++- *) case $flags in ++- *N*) ;; ++- *) name=${section}_${name} ;; ++- esac ++- standard=${standard}${section} ++- ;; ++- esac ++- case $call in ++- XX) ;; ++- *) case $flags in ++- *d*) conf_op=${define} ;; ++- *O*) conf_op=${call}_${name} ;; ++- *R*) conf_op=_${standard}_${call}_${name} ;; ++- *S*) conf_op=_${call}_${standard}_${name} ;; ++- *) conf_op=_${call}_${name} ;; ++- esac ++- echo "${conf_op}" ++- ;; ++- esac ++- case $standard:$flags in ++- C:*) ;; ++- *:*L*) echo "${conf_name}" ++- echo "_${standard}_${conf_name}" ++- ;; ++- *:*M*) case $section in ++- 1) echo "_${standard}_${conf_name}" ;; ++- *) echo "_${standard}${section}_${conf_name}" ;; ++- esac ++- ;; ++- esac ++-done > $tmp.q ++-sort -u < $tmp.q > $tmp.t ++-mv $tmp.t $tmp.q ++-sort -u < $tmp.v > $tmp.t ++-mv $tmp.t $tmp.v ++- ++-# test all the macros in a few batches (some compilers have an error limit) ++- ++-defined() # list-file ++-{ ++- : > $tmp.p ++- while : ++- do { ++- cat < ++-#include ++-#include ++-${headers} ++-${tail} ++-#undef conf ++-unsigned int conf[] = { ++-! ++- sed 's/$/,/' $1 ++- echo "};" ++- } > $tmp.c ++- if $cc $error_limit -c $tmp.c > $tmp.e 2>&1 ++- then ++- break # no compiler error implies all the symbols are valid ++- fi ++- python.sh sort_symbols.py < $tmp.e > $tmp.n ++- cmp -s $tmp.n $tmp.p && break ++- fgrep -x -v -f $tmp.n $1 > $tmp.y ++- mv $tmp.y $1 ++- mv $tmp.n $tmp.p ++- done ++- { ++- cat < ++-#include ++-#include ++-${headers} ++-${tail} ++-#undef conf ++-! ++- sed 's/.*/conf "&" = &/' $1 ++- } > $tmp.c ++- $cc -E $error_limit $tmp.c 2>/dev/null | ++- sed -e '/conf[ '"$tab"']*".*"[ '"$tab"']*=[ '"$tab"']*/!d' \ ++- -e '/[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789][ '"$tab"']*(/!d' -e 's/.*"\(.*\)".*/\1/' > $tmp.n ++- if test -s $tmp.n ++- then fgrep -x -v -f $tmp.n $1 > $tmp.y ++- mv $tmp.y $1 ++- fi ++-} ++- ++-echo "$command: check macros/enums as static initializers" >&2 ++- ++-defined $tmp.q ++-defined $tmp.v ++- ++-# mark the constant macros/enums ++- ++-exec < $tmp.q ++-while read line ++-do eval CONF_const_${line}=1 ++-done ++- ++-exec < $tmp.v ++-while read line ++-do eval CONF_const_${line}=1 ++-done ++- ++-# mark the string literal values ++- ++-{ ++- cat < ++-#include ++-#include ++-${headers} ++-${tail} ++-#undef conf ++-! ++- sed 's/.*/conf "&" = &/' $tmp.q ++-} > $tmp.c ++-$cc -E $tmp.c | ++-sed -e '/conf[ '"$tab"']*".*"[ '"$tab"']*=[ '"$tab"']*"/!d' -e 's/.*"\([^"]*\)".*/\1/' > $tmp.e ++-exec < $tmp.e ++-while read line ++-do eval CONF_string_${line}=1 ++-done ++- ++-# Walk through the table. ++- ++-name_max=1 ++-export tmp name standard call cc ++- ++-exec > $tmp.t ++-for key in $keys ++-do eval name=\"'$'CONF_name_$key\" ++- case $name in ++- '') continue ;; ++- $keep_name) ;; ++- *) continue ;; ++- esac ++- eval call=\"'$'CONF_call_$key\" ++- case $call in ++- $keep_call) ;; ++- *) continue ;; ++- esac ++- eval standard=\"'$'CONF_standard_$key\" ++- eval section=\"'$'CONF_section_$key\" ++- eval flags=\"'$'CONF_flags_$key\" ++- eval define=\"'$'CONF_define_$key\" ++- eval values=\"'$'CONF_values_$key\" ++- eval script=\"'$'CONF_script_$key\" ++- eval args=\"'$'CONF_args_$key\" ++- eval headers=\"'$'CONF_headers_$key\" ++- conf_name=$name ++- case $call in ++- QQ) call=XX ++- for c in SC PC CS ++- do case $flags in ++- *S*) case $section in ++- 1) eval x='$'CONF_call_${c}_${standard}_${name} ;; ++- *) eval x='$'CONF_call_${c}_${standard}${section}_${name} ;; ++- esac ++- ;; ++- *) eval x='$'CONF_call_${c}_${name} ++- ;; ++- esac ++- case $x in ++- ?*) call=$x ++- break ++- ;; ++- esac ++- done ++- case $call in ++- XX) for c in SC PC CS ++- do case $flags in ++- *S*) case $section in ++- 1) eval x='$'CONF_const__${c}_${standard}_${name} ;; ++- *) eval x='$'CONF_const__${c}_${standard}${section}_${name} ;; ++- esac ++- ;; ++- *) eval x='$'CONF_const__${c}_${name} ++- ;; ++- esac ++- case $x in ++- 1) call=$c ++- break ++- ;; ++- esac ++- done ++- ;; ++- esac ++- case $call in ++- XX) case $standard in ++- C) standard=POSIX ;; ++- esac ++- case $flags in ++- *L*) flags=lFU ;; ++- *) flags=FU ;; ++- esac ++- ;; ++- esac ++- ;; ++- esac ++- case " $standards " in ++- *" $standard "*) ++- ;; ++- *) standards="$standards $standard" ++- ;; ++- esac ++- conf_standard=CONF_${standard} ++- case $call in ++- CS) conf_call=CONF_confstr ++- ;; ++- PC) conf_call=CONF_pathconf ++- ;; ++- SC) conf_call=CONF_sysconf ++- ;; ++- SI) conf_call=CONF_sysinfo ++- ;; ++- XX) conf_call=CONF_nop ++- ;; ++- esac ++- conf_op=-1 ++- for s in _${call}_${standard}${section}_${name} _${call}_${standard}_${name} _${call}_${section}_${name} _${call}_${name} ${call}_${name} ++- do eval x='$'CONF_const_${s} ++- case $x in ++- 1) conf_op=${s} ++- break *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***