From 185e597749c8fdf7f47117ecb4333a75a927037b Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Mon, 24 May 2021 08:00:00 +0000 Subject: [PATCH] config.guess: simplify exit status workaround on alphaev67-dec-osf5.1 Commit 29865ea8a5622cdd80b7a69a0afa78004b4cd311 introduced an exit trap reset before exiting to avoid a spurious non-zero exit status on alphaev67-dec-osf5.1. Simplify that code a bit by moving the exit trap reset around. * config.guess (alpha:OSF1:*:*): Reset exit trap earlier. * doc/config.guess.1: Regenerate. --- config.guess | 9 ++++----- doc/config.guess.1 | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/config.guess b/config.guess index cc7a810..971491c 100755 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2021-04-21' +timestamp='2021-05-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -300,6 +300,8 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') @@ -351,10 +353,7 @@ case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; diff --git a/doc/config.guess.1 b/doc/config.guess.1 index 5efc9df..cfb0d95 100644 --- a/doc/config.guess.1 +++ b/doc/config.guess.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.16. -.TH CONFIG.GUESS "1" "April 2021" "GNU config.guess (2021-04-21)" "User Commands" +.TH CONFIG.GUESS "1" "May 2021" "GNU config.guess (2021-05-24)" "User Commands" .SH NAME config.guess \- guess the build system triplet .SH SYNOPSIS