From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Dec 2018 09:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 33847@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15455585174140 (code B ref -1); Sun, 23 Dec 2018 09:49:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Dec 2018 09:48:37 +0000 Received: from localhost ([127.0.0.1]:60548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb0NB-00014i-49 for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54316) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb0N8-00014U-An for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gb0N2-0002pY-EP for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:29 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:36229) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gb0N2-0002pS-BQ for submit@debbugs.gnu.org; Sun, 23 Dec 2018 04:48:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gb0N1-0002Ui-KD for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:48:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gb0My-0002ni-Dy for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:48:27 -0500 Received: from dev.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:44149 helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gb0My-0002f4-8A for bug-gnu-emacs@gnu.org; Sun, 23 Dec 2018 04:48:24 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id F390F335C6F; Sun, 23 Dec 2018 09:48:19 +0000 (UTC) From: Ulrich Mueller Date: Sun, 23 Dec 2018 10:48:16 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.3 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) The master branch was recently updated to place the server socket in XDG_RUNTIME_DIR, with a fallback to the previous TMPDIR location. This will make emacsclient fail when the server has been started from an environment where XDG_RUNTIME_DIR is not set. For example, if emacs --daemon is started on a Gentoo system via OpenRC's start-stop-daemon, then emacs will create the socket in ${TMPDIR}/emacs${UID}/, but emacsclient (in the user's X session) will search for it in ${XDG_RUNTIME_DIR}/emacs/: $ emacsclient -c emacsclient: can't find socket; have you started the server? emacsclient: To start the server in Emacs, type "M-x server-start". emacsclient: No socket or alternate editor. Please use: --socket-name --server-file (or environment variable EMACS_SERVER_FILE) --alternate-editor (or environment variable ALTERNATE_EDITOR) (The reason is of course that start-stop-daemon does not set the XDG_* variables. However, I don't see how it could do that in any reasonable way. Presumably it would have to happen via PAM and ConsoleKit, but the latter doesn't have a display at that point.) Suggested solutions: - Create the socket in a dir that is more readily available, for example somewhere under ${HOME}/emacs.d/, or - Have emacsclient fall back to TMPDIR as well when no socket is found under XDG_RUNTIME_DIR. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Dec 2018 16:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154558202718054 (code B ref 33847); Sun, 23 Dec 2018 16:21:02 +0000 Received: (at 33847) by debbugs.gnu.org; 23 Dec 2018 16:20:27 +0000 Received: from localhost ([127.0.0.1]:33930 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb6UM-0004h7-M6 for submit@debbugs.gnu.org; Sun, 23 Dec 2018 11:20:26 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:57712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gb6UL-0004gs-3u for 33847@debbugs.gnu.org; Sun, 23 Dec 2018 11:20:25 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 17FEE335C36; Sun, 23 Dec 2018 16:20:17 +0000 (UTC) From: Ulrich Mueller References: Date: Sun, 23 Dec 2018 17:20:10 +0100 In-Reply-To: (Ulrich Mueller's message of "Sun, 23 Dec 2018 10:48:16 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) The specification of XDG_RUNTIME_DIR at https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables says this: | $XDG_RUNTIME_DIR defines the base directory relative to which | user-specific non-essential runtime files and other file objects | (such as sockets, named pipes, ...) should be stored. [...] | The lifetime of the directory MUST be bound to the user being logged | in. It MUST be created when the user first logs in and if the user | fully logs out the directory MUST be removed. [...] | Files in the directory MUST not survive reboot or a full | logout/login cycle. It explicitly says that the directory does not persist between login sessions, whereas - at least in my understanding - an Emacs running as a daemon is supposed to survive logout, so that the user can reconnect to it later. (For example, I use that feature for persistent ERC sessions.) So, I would conclude that XDG_RUNTIME_DIR is not an appropriate location for the socket of a daemon process. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket References: In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Dec 2018 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ulrich Mueller Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154577176411532 (code B ref 33847); Tue, 25 Dec 2018 21:03:02 +0000 Received: (at 33847) by debbugs.gnu.org; 25 Dec 2018 21:02:44 +0000 Received: from localhost ([127.0.0.1]:36466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbtqe-0002zw-Hv for submit@debbugs.gnu.org; Tue, 25 Dec 2018 16:02:44 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbtqc-0002zf-DE for 33847@debbugs.gnu.org; Tue, 25 Dec 2018 16:02:42 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 7480F160D3F; Tue, 25 Dec 2018 13:02:35 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id tsNS_RiUwGG9; Tue, 25 Dec 2018 13:02:34 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BC014160D43; Tue, 25 Dec 2018 13:02:34 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id jZiq0Tn8x8MM; Tue, 25 Dec 2018 13:02:34 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 95B90160922; Tue, 25 Dec 2018 13:02:34 -0800 (PST) From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> Date: Tue, 25 Dec 2018 13:02:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Suggested solutions: > - Create the socket in a dir that is more readily available, for example > somewhere under ${HOME}/emacs.d/ Unfortunately that won't work well in general, as $HOME/emacs.d might not exist, or it might be on a network file system where a host-specific file would be inappropriate. > - Have emacsclient fall back to TMPDIR as well when no socket is found > under XDG_RUNTIME_DIR This would run afoul of the security issues that led to the use of XDG_RUNTIME_DIR in the first place. Instead, I suggest unsetting XDG_RUNTIME_DIR if you wish to start an Emacs client or server that is independent of your session and are on a host that is secured well enough so that the security issues are of no concern. Alternatively, you can use --socket-name when starting emacsclient. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Dec 2018 23:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154578059325633 (code B ref 33847); Tue, 25 Dec 2018 23:30:02 +0000 Received: (at 33847) by debbugs.gnu.org; 25 Dec 2018 23:29:53 +0000 Received: from localhost ([127.0.0.1]:36502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbw93-0006fN-3f for submit@debbugs.gnu.org; Tue, 25 Dec 2018 18:29:53 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:40604) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbw90-0006f7-7J for 33847@debbugs.gnu.org; Tue, 25 Dec 2018 18:29:50 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 64E61335C3D; Tue, 25 Dec 2018 23:29:43 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> Date: Wed, 26 Dec 2018 00:29:39 +0100 In-Reply-To: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> (Paul Eggert's message of "Tue, 25 Dec 2018 13:02:34 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Tue, 25 Dec 2018, Paul Eggert wrote: > Instead, I suggest unsetting XDG_RUNTIME_DIR if you wish to start an > Emacs client or server that is independent of your session and are on > a host that is secured well enough so that the security issues are of > no concern. Alternatively, you can use --socket-name when starting > emacsclient. IMHO that's not an acceptable solution. emacsclient should just work in the default configuration, without requiring the user to jump through hoops, and an Emacs daemon should persist between sessions (otherwise "daemon" would be a misnomer). Or is that use case really so uncommon? Also, if there is a security problem, how would it disappear by moving the socket to XDG_RUNTIME_DIR? Note that other tools like "screen" also place their sockets in a subdir of /tmp. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Dec 2018 00:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ulrich Mueller Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154578385930751 (code B ref 33847); Wed, 26 Dec 2018 00:25:02 +0000 Received: (at 33847) by debbugs.gnu.org; 26 Dec 2018 00:24:19 +0000 Received: from localhost ([127.0.0.1]:36515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbwzj-0007zu-3A for submit@debbugs.gnu.org; Tue, 25 Dec 2018 19:24:19 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbwzh-0007ze-CE for 33847@debbugs.gnu.org; Tue, 25 Dec 2018 19:24:17 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BFF19160AD6; Tue, 25 Dec 2018 16:24:11 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Orn_U93Kbxx2; Tue, 25 Dec 2018 16:24:11 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 02C96160D59; Tue, 25 Dec 2018 16:24:11 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FJgKHqGt6WVb; Tue, 25 Dec 2018 16:24:10 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id D0EA0160A77; Tue, 25 Dec 2018 16:24:10 -0800 (PST) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> Date: Tue, 25 Dec 2018 16:24:10 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ulrich Mueller wrote: > IMHO that's not an acceptable solution. emacsclient should just work in > the default configuration, without requiring the user to jump through > hoops, and an Emacs daemon should persist between sessions (otherwise > "daemon" would be a misnomer). Or is that use case really so uncommon? We have a conflict here between "just work" and security. There are multiple workarounds for the problem that you mention; if none of them are convenient enough perhaps you can suggest a more-convenient one. The default should be secure, though. > if there is a security problem, how would it disappear by moving > the socket to XDG_RUNTIME_DIR? Note that other tools like "screen" also > place their sockets in a subdir of /tmp. XDG_RUNTIME_DIR is guaranteed to be a directory owned by the user and readable and writable by nobody else. /tmp/emacsUID does not have that property. Tools like 'screen' that predate XDG_RUNTIME_DIR traditionally suffered from similar security problems. On my Fedora 29 platform, 'screen' works around the problem by being setgid 'screen' and putting files under /run/screen/S-eggert, where /run/screen is mode drwxrwxr-x with owner 'root' and group 'screen'. The exact location of the /run/screen directory is platform-specific; I guess that it typically used to be /tmp/screens but got moved due to security concerns. The 'screen' workaround does not appear to apply to Emacs, since Emacs is programmable and if Emacs were made setgid its users could easily modify Emacs's behavior to manipulate the contents of any such /run/emacs directory in any way they pleased. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Dec 2018 02:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154579128310893 (code B ref 33847); Wed, 26 Dec 2018 02:29:01 +0000 Received: (at 33847) by debbugs.gnu.org; 26 Dec 2018 02:28:03 +0000 Received: from localhost ([127.0.0.1]:36537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbyvS-0002pd-Kn for submit@debbugs.gnu.org; Tue, 25 Dec 2018 21:28:02 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:54946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gbyvQ-0002p8-Qf for 33847@debbugs.gnu.org; Tue, 25 Dec 2018 21:28:01 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 04E95335C39; Wed, 26 Dec 2018 02:27:53 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> Date: Wed, 26 Dec 2018 03:27:50 +0100 In-Reply-To: <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> (Paul Eggert's message of "Tue, 25 Dec 2018 16:24:10 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Wed, 26 Dec 2018, Paul Eggert wrote: >> IMHO that's not an acceptable solution. emacsclient should just work in >> the default configuration, without requiring the user to jump through >> hoops, and an Emacs daemon should persist between sessions (otherwise >> "daemon" would be a misnomer). Or is that use case really so uncommon? > We have a conflict here between "just work" and security. There are > multiple workarounds for the problem that you mention; if none of them > are convenient enough perhaps you can suggest a more-convenient one. IMHO, unsetting a standard variable like XDG_RUNTIME_DIR (as you've suggested above) in the user's session isn't really an option. And a wrapper script around emacsclient would be just awkward. Plus, as it is currently implemented, there isn't even a unique way to override the socket's location. I notice that emacsclient will now honour the EMACS_SOCKET_NAME variable, but then again, server.el doesn't use it. So if we would want to override the socket's location at the distro level (e.g., place it in /run/emacs/${USER}/), how could we do that? Having to add configuration to both site-start.el and to the user's environment seems less than optimal. > The default should be secure, though. If it is a security issue, then why isn't the fix in the emacs-26 branch as well? Also, why is there still a fallback to TMPDIR, if that's considered insecure? >> if there is a security problem, how would it disappear by moving >> the socket to XDG_RUNTIME_DIR? Note that other tools like "screen" also >> place their sockets in a subdir of /tmp. > XDG_RUNTIME_DIR is guaranteed to be a directory owned by the user and > readable and writable by nobody else. /tmp/emacsUID does not have that > property. XDG_RUNTIME_DIR is simply not suitable for the purpose, because (by its specification) it will disappear when the login session ends, leading to an Emacs daemon process that has no socket and can no longer be connected to. Of course, unless one assumes that the daemon will not persist the login session, but what would be the point of starting Emacs as a daemon then? > The 'screen' workaround does not appear to apply to Emacs, since Emacs > is programmable and if Emacs were made setgid its users could easily > modify Emacs's behavior to manipulate the contents of any such > /run/emacs directory in any way they pleased. No need for Emacs itself to be setgid, because the directory could be created by calling an auxiliary setgid program (similar to update-game-score). From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Dec 2018 07:00:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ulrich Mueller Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.15458075587103 (code B ref 33847); Wed, 26 Dec 2018 07:00:03 +0000 Received: (at 33847) by debbugs.gnu.org; 26 Dec 2018 06:59:18 +0000 Received: from localhost ([127.0.0.1]:36562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gc39y-0001qV-Di for submit@debbugs.gnu.org; Wed, 26 Dec 2018 01:59:18 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gc39w-0001qD-7c for 33847@debbugs.gnu.org; Wed, 26 Dec 2018 01:59:17 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 32FD6160D3D; Tue, 25 Dec 2018 22:59:10 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8QAjWoOv7tou; Tue, 25 Dec 2018 22:59:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 53556160D3E; Tue, 25 Dec 2018 22:59:09 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id kfua2X9vR0vx; Tue, 25 Dec 2018 22:59:09 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 2E6D1160D10; Tue, 25 Dec 2018 22:59:09 -0800 (PST) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <476852d0-9cd6-a6ae-a11d-bb4d761323da@cs.ucla.edu> Date: Tue, 25 Dec 2018 22:59:08 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ulrich Mueller wrote: > IMHO, unsetting a standard variable like XDG_RUNTIME_DIR (as you've > suggested above) in the user's session isn't really an option. You're right, unsetting it for an entire session would mean that you want all programs (not just Emacs) to not use XDG_RUNTIME_DIR, and that sounds too drastic. I don't recall suggesting that. > And a > wrapper script around emacsclient would be just awkward. It's not *that* awkward, and it may be acceptable if the situation you describe is unusual enough. > Plus, as it is currently implemented, there isn't even a unique way to > override the socket's location. I notice that emacsclient will now > honour the EMACS_SOCKET_NAME variable, but then again, server.el doesn't > use it. Although I'm not a big fan of environment variables, it might make sense for server.el to look at EMACS_SOCKET_NAME, for consistency with emacsclient. > So if we would want to override the socket's location at the > distro level (e.g., place it in /run/emacs/${USER}/), how could we do > that? There's no mechanism in Emacs to do that now. It would be OK to add one, I expect. > If it is a security issue, then why isn't the fix in the emacs-26 branch > as well? emacs-26 at this point is meant for fixing regressions, and the problem in question is not a regression. Anyway, this change was too risky for the emacs-26 branch. > Also, why is there still a fallback to TMPDIR, if that's > considered insecure? On a system that doesn't set XDG_RUNTIME_DIR it was the best we could easily do. If we can come up with something better for those systems, that would be good. For systems with XDG_RUNTIME_DIR it would probably be better to not reinvent this particular wheel. That is, for users who prefer Emacs to run only when they are logged in, XDG_RUNTIME_DIR seems to be the way to go. For users who prefer Emacs to always be running, even when they are not logged in, we should use some other mechanism. > XDG_RUNTIME_DIR is simply not suitable for the purpose, because (by its > specification) it will disappear when the login session ends, I think the idea is that XDG_RUNTIME_DIR disappears when all login sessions end, so it might survive the current session. >> The 'screen' workaround does not appear to apply to Emacs, since Emacs >> is programmable and if Emacs were made setgid its users could easily >> modify Emacs's behavior to manipulate the contents of any such >> /run/emacs directory in any way they pleased. > > No need for Emacs itself to be setgid, because the directory could > be created by calling an auxiliary setgid program (similar to > update-game-score). That might work, as a solution for people who want Emacs to keep running even when they entirely log out. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Dec 2018 15:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154583726631504 (code B ref 33847); Wed, 26 Dec 2018 15:15:01 +0000 Received: (at 33847) by debbugs.gnu.org; 26 Dec 2018 15:14:26 +0000 Received: from localhost ([127.0.0.1]:37865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcAt8-0008C4-IX for submit@debbugs.gnu.org; Wed, 26 Dec 2018 10:14:26 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:55390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcAt7-0008Bq-2G for 33847@debbugs.gnu.org; Wed, 26 Dec 2018 10:14:25 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 0E704335C30; Wed, 26 Dec 2018 15:14:17 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <476852d0-9cd6-a6ae-a11d-bb4d761323da@cs.ucla.edu> Date: Wed, 26 Dec 2018 16:14:14 +0100 In-Reply-To: <476852d0-9cd6-a6ae-a11d-bb4d761323da@cs.ucla.edu> (Paul Eggert's message of "Tue, 25 Dec 2018 22:59:08 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Wed, 26 Dec 2018, Paul Eggert wrote: > Ulrich Mueller wrote: >> XDG_RUNTIME_DIR is simply not suitable for the purpose, because (by its >> specification) it will disappear when the login session ends, > I think the idea is that XDG_RUNTIME_DIR disappears when all login > sessions end, so it might survive the current session. I still don't see why XDG_RUNTIME_DIR would be more secure than using a directory in TMPDIR. server.el seems to take all necessary precautions to ensure that the directory is safe: server-ensure-safe-dir is a compiled Lisp function in =E2=80=98server.el= =E2=80=99. (server-ensure-safe-dir DIR) Make sure DIR is a directory with no race-condition issues. Creates the directory if necessary and makes sure: - there=E2=80=99s no symlink involved - it=E2=80=99s owned by us - it=E2=80=99s not readable/writable by anybody else. In addition, emacsclient checks for the ownership of the socket before connecting to it. >> No need for Emacs itself to be setgid, because the directory could >> be created by calling an auxiliary setgid program (similar to >> update-game-score). > That might work, as a solution for people who want Emacs to keep > running even when they entirely log out. It would also be rather complicated, and require creation of an emacs group. Using a directory where the user has write access is easier. AFAICS, the three candidates for that are TMPDIR, HOME, and XDG_RUNTIME_DIR. Emacs 26 uses ${TMPDIR}/emacs${UID}/ or ${HOME}/.emacs.d/server/ depending on the server-use-tcp flag. Emacs 27 will use one of these two or ${XDG_RUNTIME_DIR} as a default (depending on the environment). IMHO this is approaching the point where things become unpredictable and hard to understand for the user. (And making it more customizable won't make it simpler, I fear.) If TMPDIR really is insecure (see above), can't the socket be placed in ${HOME}/.emacs.d/ which is already used in the TCP case? The socket could be named server-, in order to avoid issues with NFS mounted directories. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 26 Dec 2018 18:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ulrich Mueller Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154584914926044 (code B ref 33847); Wed, 26 Dec 2018 18:33:02 +0000 Received: (at 33847) by debbugs.gnu.org; 26 Dec 2018 18:32:29 +0000 Received: from localhost ([127.0.0.1]:37939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcDym-0006m0-W3 for submit@debbugs.gnu.org; Wed, 26 Dec 2018 13:32:29 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53176) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcDyk-0006lm-Dt for 33847@debbugs.gnu.org; Wed, 26 Dec 2018 13:32:27 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E2A47160D71; Wed, 26 Dec 2018 10:32:20 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id srieUTwdcnhX; Wed, 26 Dec 2018 10:32:19 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D557B160D74; Wed, 26 Dec 2018 10:32:19 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bYWTrJBEgPSZ; Wed, 26 Dec 2018 10:32:19 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AC9401609D6; Wed, 26 Dec 2018 10:32:19 -0800 (PST) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <476852d0-9cd6-a6ae-a11d-bb4d761323da@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Wed, 26 Dec 2018 10:32:19 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ulrich Mueller wrote: > server.el seems to take all necessary precautions > to ensure that the directory is safe: > (server-ensure-safe-dir DIR) >=20 > Make sure DIR is a directory with no race-condition issues. > Creates the directory if necessary and makes sure: > - there=E2=80=99s no symlink involved > - it=E2=80=99s owned by us > - it=E2=80=99s not readable/writable by anybody else. The problem on the server side isn't in server-ensure-safe-dir, it's that= =20 something could happen between the time that server-ensure-safe-dir check= s that=20 DIR is safe, and the time that DIR is actually used. > In addition, emacsclient checks for the ownership of the socket before > connecting to it. Sure, but that doesn't mean it's the right socket. We discussed this last= month;=20 please see the thread containing: https://lists.gnu.org/archive/html/emacs-devel/2018-11/msg00051.html >>> No need for Emacs itself to be setgid, because the directory could >>> be created by calling an auxiliary setgid program (similar to >>> update-game-score). >=20 >> That might work, as a solution for people who want Emacs to keep >> running even when they entirely log out. >=20 > It would also be rather complicated, and require creation of an emacs > group. True. I also would prefer a better solution than that. > Emacs 26 uses ${TMPDIR}/emacs${UID}/ or ${HOME}/.emacs.d/server/ > depending on the server-use-tcp flag. Emacs 27 will use one of these > two or ${XDG_RUNTIME_DIR} as a default (depending on the environment). > IMHO this is approaching the point where things become unpredictable > and hard to understand for the user. (And making it more customizable > won't make it simpler, I fear.) True, it has gotten more complicated. If we could simplify it without reo= pening=20 the security holes that would be a good thing. > can't the socket be placed > in ${HOME}/.emacs.d/ which is already used in the TCP case? The socket > could be named server-, in order to avoid issues with NFS > mounted directories. That would cause problems when Emacs crashes or the system reboots, since= the=20 directory wouldn't be cleaned up automatically. So although we could add = this as=20 an option, I'm a bit leery of making it the default. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Richard Stallman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Dec 2018 03:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: ulm@gentoo.org, 33847@debbugs.gnu.org Reply-To: rms@gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154588196714099 (code B ref 33847); Thu, 27 Dec 2018 03:40:01 +0000 Received: (at 33847) by debbugs.gnu.org; 27 Dec 2018 03:39:27 +0000 Received: from localhost ([127.0.0.1]:38105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcMW2-0003fG-Q4 for submit@debbugs.gnu.org; Wed, 26 Dec 2018 22:39:27 -0500 Received: from eggs.gnu.org ([208.118.235.92]:38117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcMVw-0003ex-Lo for 33847@debbugs.gnu.org; Wed, 26 Dec 2018 22:39:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gcMVl-0001Fd-VO for 33847@debbugs.gnu.org; Wed, 26 Dec 2018 22:39:11 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gcMVI-0008Tk-Ac; Wed, 26 Dec 2018 22:38:36 -0500 Received: from rms by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1gcMVI-0003Yd-60; Wed, 26 Dec 2018 22:38:36 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman In-Reply-To: <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> (message from Paul Eggert on Tue, 25 Dec 2018 16:24:10 -0800) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> Message-Id: Date: Wed, 26 Dec 2018 22:38:36 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > Tools like 'screen' that predate XDG_RUNTIME_DIR traditionally suffered from > similar security problems. On my Fedora 29 platform, 'screen' works around the > problem by being setgid 'screen' and putting files under /run/screen/S-eggert, > where /run/screen is mode drwxrwxr-x with owner 'root' and group 'screen'. The > exact location of the /run/screen directory is platform-specific; I guess that > it typically used to be /tmp/screens but got moved due to security concerns. Is it possible to arrange for each user to have a directory under /run/emacs which is owned by that user and doesn't give access to anyone else? Maybe we could release a simple setuid program to create that directory. -- Dr Richard Stallman President, Free Software Foundation (https://gnu.org, https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Dec 2018 16:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: rms@gnu.org Cc: ulm@gentoo.org, 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154592896919191 (code B ref 33847); Thu, 27 Dec 2018 16:43:01 +0000 Received: (at 33847) by debbugs.gnu.org; 27 Dec 2018 16:42:49 +0000 Received: from localhost ([127.0.0.1]:39484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcYkD-0004zT-CV for submit@debbugs.gnu.org; Thu, 27 Dec 2018 11:42:49 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:36910) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcYkB-0004zH-4v for 33847@debbugs.gnu.org; Thu, 27 Dec 2018 11:42:47 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id E9800160922; Thu, 27 Dec 2018 08:42:40 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id z4aIm849zNcG; Thu, 27 Dec 2018 08:42:40 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3B875160D0F; Thu, 27 Dec 2018 08:42:40 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id AgsROTnKsAWi; Thu, 27 Dec 2018 08:42:40 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 146CA16059D; Thu, 27 Dec 2018 08:42:40 -0800 (PST) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Thu, 27 Dec 2018 08:42:39 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Richard Stallman wrote: > Is it possible to arrange for each user to have a directory under /run/emacs > which is owned by that user and doesn't give access to anyone else? > > Maybe we could release a simple setuid program to create that directory. Although I think that would work, as Ulrich wrote in Bug#33847#26 it has an operational problem: it requires the creation and installation of either a setuid program (which will raise eyebrows) or the creation of a new 'emacs' group and installation of a setgid 'emacs' program (which will raise fewer eyebrows but is still a hassle). Adding either requirement would be a hassle for builders and installers (e.g., how do you test the new Emacs before installing it if you don't have rights to create a setuid program in the build directory?). So we are looking for a better solution if possible. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 27 Dec 2018 17:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: ulm@gentoo.org Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154593080222074 (code B ref 33847); Thu, 27 Dec 2018 17:14:01 +0000 Received: (at 33847) by debbugs.gnu.org; 27 Dec 2018 17:13:22 +0000 Received: from localhost ([127.0.0.1]:39506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcZDm-0005jy-GJ for submit@debbugs.gnu.org; Thu, 27 Dec 2018 12:13:22 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:41298) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcZDl-0005jj-K2 for 33847@debbugs.gnu.org; Thu, 27 Dec 2018 12:13:22 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 6C606160D6A; Thu, 27 Dec 2018 09:13:15 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 25PAGGbFJ6la; Thu, 27 Dec 2018 09:13:14 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3808F160D8E; Thu, 27 Dec 2018 09:13:14 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id Bnw5cjwhI9Xj; Thu, 27 Dec 2018 09:13:14 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 159A0160A6F; Thu, 27 Dec 2018 09:13:14 -0800 (PST) From: Paul Eggert References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> Organization: UCLA Computer Science Department Message-ID: <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> Date: Thu, 27 Dec 2018 09:13:13 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ulrich, have you tried starting your Emacs server as a lingering service? Lingering seems to be designed for the sort of thing you want to do. Look for "enable-linger" in . From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Dec 2018 06:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154597796214383 (code B ref 33847); Fri, 28 Dec 2018 06:20:02 +0000 Received: (at 33847) by debbugs.gnu.org; 28 Dec 2018 06:19:22 +0000 Received: from localhost ([127.0.0.1]:39672 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gclUP-0003jv-Pf for submit@debbugs.gnu.org; Fri, 28 Dec 2018 01:19:21 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:44930) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gclUN-0003jd-3r for 33847@debbugs.gnu.org; Fri, 28 Dec 2018 01:19:20 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id CF455335C5D; Fri, 28 Dec 2018 06:19:11 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> Date: Fri, 28 Dec 2018 07:19:07 +0100 In-Reply-To: <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> (Paul Eggert's message of "Thu, 27 Dec 2018 09:13:13 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Thu, 27 Dec 2018, Paul Eggert wrote: > Ulrich, have you tried starting your Emacs server as a lingering > service? Lingering seems to be designed for the sort of thing you want > to do. Look for "enable-linger" in > . That would require systemd, so it is not a solution that can be universally used. Especially it is GNU/Linux specific. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Dec 2018 06:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ulrich Mueller Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154597892016107 (code B ref 33847); Fri, 28 Dec 2018 06:36:01 +0000 Received: (at 33847) by debbugs.gnu.org; 28 Dec 2018 06:35:20 +0000 Received: from localhost ([127.0.0.1]:39675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcljs-0004Bi-7Y for submit@debbugs.gnu.org; Fri, 28 Dec 2018 01:35:20 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55270) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gcljq-0004BW-VE for 33847@debbugs.gnu.org; Fri, 28 Dec 2018 01:35:19 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5FC76160D7B; Thu, 27 Dec 2018 22:35:13 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id f61UBOQZfYTZ; Thu, 27 Dec 2018 22:35:12 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 76555160DFD; Thu, 27 Dec 2018 22:35:12 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 1eO7QY_1eiYD; Thu, 27 Dec 2018 22:35:12 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 52C0F160A6F; Thu, 27 Dec 2018 22:35:12 -0800 (PST) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Thu, 27 Dec 2018 22:35:12 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ulrich Mueller wrote: >> Ulrich, have you tried starting your Emacs server as a lingering >> service? Lingering seems to be designed for the sort of thing you want >> to do. Look for "enable-linger" in >> . > That would require systemd, so it is not a solution that can be > universally used. Especially it is GNU/Linux specific. We don't need to attack the problem in general, only the problem on platforms that have XDG_RUNTIME_DIR. What sort of platforms have XDG_RUNTIME_DIR but do not use systemd, and how does one start a user-specific server on such platforms? From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Dec 2018 06:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154597908716347 (code B ref 33847); Fri, 28 Dec 2018 06:39:02 +0000 Received: (at 33847) by debbugs.gnu.org; 28 Dec 2018 06:38:07 +0000 Received: from localhost ([127.0.0.1]:39678 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gclmY-0004Fb-MN for submit@debbugs.gnu.org; Fri, 28 Dec 2018 01:38:06 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:46084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gclmT-0004F4-Vj for 33847@debbugs.gnu.org; Fri, 28 Dec 2018 01:38:02 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 3D075335C3D; Fri, 28 Dec 2018 06:37:55 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <476852d0-9cd6-a6ae-a11d-bb4d761323da@cs.ucla.edu> Date: Fri, 28 Dec 2018 07:37:52 +0100 In-Reply-To: (Paul Eggert's message of "Wed, 26 Dec 2018 10:32:19 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Wed, 26 Dec 2018, Paul Eggert wrote: >> can't the socket be placed in ${HOME}/.emacs.d/ which is already used >> in the TCP case? The socket could be named server-, in >> order to avoid issues with NFS mounted directories. > That would cause problems when Emacs crashes or the system reboots, > since the directory wouldn't be cleaned up automatically. So although > we could add this as an option, I'm a bit leery of making it the > default. The only problem I see is that it would leave a stale socket file behind, when Emacs is not properly terminated. That file would be deleted/replaced the next time an Emacs server is started. I guess in the typical use case we are talking about a single inode. If the home directory is NFS mounted it may be one inode per machine. I think that's a small price to pay, for a solution that would be both very simple, would be available on all systems, and won't suffer from security issues. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Dec 2018 06:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154597991817567 (code B ref 33847); Fri, 28 Dec 2018 06:52:01 +0000 Received: (at 33847) by debbugs.gnu.org; 28 Dec 2018 06:51:58 +0000 Received: from localhost ([127.0.0.1]:39682 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gclzy-0004ZH-15 for submit@debbugs.gnu.org; Fri, 28 Dec 2018 01:51:58 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:46812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gclzw-0004Z4-Tq for 33847@debbugs.gnu.org; Fri, 28 Dec 2018 01:51:57 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id F2A29335C5D; Fri, 28 Dec 2018 06:51:49 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> Date: Fri, 28 Dec 2018 07:51:46 +0100 In-Reply-To: (Paul Eggert's message of "Thu, 27 Dec 2018 22:35:12 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Fri, 28 Dec 2018, Paul Eggert wrote: > We don't need to attack the problem in general, only the problem on > platforms that have XDG_RUNTIME_DIR. What sort of platforms have > XDG_RUNTIME_DIR but do not use systemd, and how does one start a > user-specific server on such platforms? See my original report, OpenRC and start-stop-daemon. So you're saying that on systems that don't have XDG_RUNTIME_DIR, placing the socket under TMPDIR is fine? Because I don't understand that argument. If TMPDIR has security problem, then it shouldn't be used anywhere. If it hasn't, then why can't we keep the current (Emacs 26) solution? From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Dec 2018 06:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ulrich Mueller Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154615230919020 (code B ref 33847); Sun, 30 Dec 2018 06:46:02 +0000 Received: (at 33847) by debbugs.gnu.org; 30 Dec 2018 06:45:09 +0000 Received: from localhost ([127.0.0.1]:41791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdUqT-0004wP-DT for submit@debbugs.gnu.org; Sun, 30 Dec 2018 01:45:09 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50644) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdUqQ-0004pI-Gw for 33847@debbugs.gnu.org; Sun, 30 Dec 2018 01:45:07 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 508D8160DFF; Sat, 29 Dec 2018 22:45:00 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id L2PEvhoG7GlL; Sat, 29 Dec 2018 22:44:59 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 94705160E16; Sat, 29 Dec 2018 22:44:59 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id l7j0uYec8QxO; Sat, 29 Dec 2018 22:44:59 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6AD8F160DFF; Sat, 29 Dec 2018 22:44:59 -0800 (PST) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sat, 29 Dec 2018 22:44:59 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ulrich Mueller wrote: > So you're saying that on systems that don't have XDG_RUNTIME_DIR, > placing the socket under TMPDIR is fine? Because I don't understand > that argument. If TMPDIR has security problem, then it shouldn't be > used anywhere. If it hasn't, then why can't we keep the current > (Emacs 26) solution? Because we're not absolutists. On older systems that do not have adequate provisions for security, Emacs does the best it can: that's better than not doing anything, and people who run older, less-secure systems are likely to not care all that much about security anyway so this is OK. On newer systems that are more secure, though, Emacs can be more secure. This is not anything new. In the bad old days when /tmp wasn't sticky, Emacs was less secure with temporary files, just like everyone else was. That didn't mean that Emacs should never have used temporary files. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Dec 2018 06:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Ulrich Mueller Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154615248226498 (code B ref 33847); Sun, 30 Dec 2018 06:48:02 +0000 Received: (at 33847) by debbugs.gnu.org; 30 Dec 2018 06:48:02 +0000 Received: from localhost ([127.0.0.1]:41798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdUtF-0006tF-Dr for submit@debbugs.gnu.org; Sun, 30 Dec 2018 01:48:01 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gdUtD-0006sz-HD for 33847@debbugs.gnu.org; Sun, 30 Dec 2018 01:47:59 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2B326160E00; Sat, 29 Dec 2018 22:47:54 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Xb4ZtC3vkM8Y; Sat, 29 Dec 2018 22:47:53 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 30CC0160E1A; Sat, 29 Dec 2018 22:47:53 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id e06S3jkt7ZHU; Sat, 29 Dec 2018 22:47:53 -0800 (PST) Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0ADEC160DFF; Sat, 29 Dec 2018 22:47:53 -0800 (PST) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <476852d0-9cd6-a6ae-a11d-bb4d761323da@cs.ucla.edu> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <396c1845-b3a1-d0d1-7491-3cef02405f15@cs.ucla.edu> Date: Sat, 29 Dec 2018 22:47:52 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Ulrich Mueller wrote: > The only problem I see is that it would leave a stale socket file > behind, when Emacs is not properly terminated. That file would be > deleted/replaced the next time an Emacs server is started. > > I guess in the typical use case we are talking about a single inode. > If the home directory is NFS mounted it may be one inode per machine. > I think that's a small price to pay, for a solution that would be both > very simple, would be available on all systems, and won't suffer from > security issues. If we're talking NFS, we will indeed have security issues, not to mention problems with deleting or replacing files. I can't count the number of times I've seen messages like "NFS server not responding still trying". The TCP case is already documented as being undesirable, and this is partly due to security concerns. We shouldn't inflict its problems on the more-usual local case. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Jan 2019 18:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Paul Eggert Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154800719132736 (code B ref 33847); Sun, 20 Jan 2019 18:00:02 +0000 Received: (at 33847) by debbugs.gnu.org; 20 Jan 2019 17:59:51 +0000 Received: from localhost ([127.0.0.1]:39162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glHNv-0008Vw-JL for submit@debbugs.gnu.org; Sun, 20 Jan 2019 12:59:51 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:36976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1glHNt-0008Vf-DM for 33847@debbugs.gnu.org; Sun, 20 Jan 2019 12:59:50 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 3C882335D06; Sun, 20 Jan 2019 17:59:42 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> Date: Sun, 20 Jan 2019 18:59:39 +0100 In-Reply-To: (Paul Eggert's message of "Sat, 29 Dec 2018 22:44:59 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Sun, 30 Dec 2018, Paul Eggert wrote: > Because we're not absolutists. On older systems that do not have > adequate provisions for security, Emacs does the best it can: that's > better than not doing anything, and people who run older, less-secure > systems are likely to not care all that much about security anyway so > this is OK. On newer systems that are more secure, though, Emacs can > be more secure. Since there doesn't seem to be any progress here, please find below the patch that I am using since some time. >From f8d87a0a89b91c120935bd5be802604b2c749767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Sun, 20 Jan 2019 18:48:45 +0100 Subject: [PATCH] Add a fallback for the socket location in emacsclient (bug#33847) * lib-src/emacsclient.c (set_local_socket): Fall back to TMPDIR if the socket is not found under XDG_RUNTIME_DIR. --- lib-src/emacsclient.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index f476840898..27b945133e 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1356,6 +1356,7 @@ set_local_socket (char const *server_name) enum { socknamesize = sizeof server.un.sun_path }; int tmpdirlen = -1; int socknamelen = -1; + int sock_status = -1; uid_t uid = geteuid (); if (strchr (server_name, '/') @@ -1366,9 +1367,15 @@ set_local_socket (char const *server_name) /* socket_name is a file name component. */ char const *xdg_runtime_dir = egetenv ("XDG_RUNTIME_DIR"); if (xdg_runtime_dir) - socknamelen = snprintf (sockname, socknamesize, "%s/emacs/%s", - xdg_runtime_dir, server_name); - else + { + socknamelen = snprintf (sockname, socknamesize, "%s/emacs/%s", + xdg_runtime_dir, server_name); + /* Check if sockname is valid and if the socket exists. */ + if (0 <= socknamelen && socknamelen < socknamesize) + sock_status = socket_status (sockname, uid); + } + + if (sock_status) { char const *tmpdir = egetenv ("TMPDIR"); if (tmpdir) @@ -1399,7 +1406,9 @@ set_local_socket (char const *server_name) } /* See if the socket exists, and if it's owned by us. */ - int sock_status = socket_status (sockname, uid); + if (sock_status) + sock_status = socket_status (sockname, uid); + if (sock_status) { /* Failing that, see if LOGNAME or USER exist and differ from -- 2.19.1 From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Feb 2019 08:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.154978788732491 (code B ref 33847); Sun, 10 Feb 2019 08:39:02 +0000 Received: (at 33847) by debbugs.gnu.org; 10 Feb 2019 08:38:07 +0000 Received: from localhost ([127.0.0.1]:41748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gskco-0008Rz-QM for submit@debbugs.gnu.org; Sun, 10 Feb 2019 03:38:07 -0500 Received: from smtp.gentoo.org ([140.211.166.183]:55388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gskcn-0008RM-2e for 33847@debbugs.gnu.org; Sun, 10 Feb 2019 03:38:05 -0500 Received: from a1i15 (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id 3456E335D4B; Sun, 10 Feb 2019 08:37:58 +0000 (UTC) From: Ulrich Mueller References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> Date: Sun, 10 Feb 2019 09:37:46 +0100 In-Reply-To: (Ulrich Mueller's message of "Sun, 20 Jan 2019 18:59:39 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Sun, 20 Jan 2019, Ulrich Mueller wrote: > Since there doesn't seem to be any progress here, please find below > the patch that I am using since some time. Does the absence of any reply (neither here nor on emacs-devel) mean that it is o.k. to push this? From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Feb 2019 09:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 33847@debbugs.gnu.org, ulm@gentoo.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org, Ulrich Mueller , 33847@debbugs.gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15497921356725 (code B ref -1); Sun, 10 Feb 2019 09:49:02 +0000 Received: (at submit) by debbugs.gnu.org; 10 Feb 2019 09:48:55 +0000 Received: from localhost ([127.0.0.1]:41769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsljL-0001kP-3Q for submit@debbugs.gnu.org; Sun, 10 Feb 2019 04:48:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57582) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gsljJ-0001k0-BF for submit@debbugs.gnu.org; Sun, 10 Feb 2019 04:48:53 -0500 Received: from lists.gnu.org ([209.51.188.17]:52542) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gslj9-0006O3-LR for submit@debbugs.gnu.org; Sun, 10 Feb 2019 04:48:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43729) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gslj8-00010b-VU for bug-gnu-emacs@gnu.org; Sun, 10 Feb 2019 04:48:43 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED,BAYES_50 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37122) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gslj3-0006Lp-Bw; Sun, 10 Feb 2019 04:48:38 -0500 Received: from [176.12.220.197] (port=51992 helo=[10.164.23.58]) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1gslj1-0006ot-Ob; Sun, 10 Feb 2019 04:48:37 -0500 Date: Sun, 10 Feb 2019 11:48:33 +0200 User-Agent: K-9 Mail for Android In-Reply-To: References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Eli Zaretskii Message-ID: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) On February 10, 2019 10:37:46 AM GMT+02:00, Ulrich Mueller wrote: > >>>>> On Sun, 20 Jan 2019, Ulrich Mueller wrote: >=20 > > Since there doesn't seem to be any progress here, please find below > > the patch that I am using since some time=2E >=20 > Does the absence of any reply (neither here nor on emacs-devel) mean > that it is o=2Ek=2E to push this? Sorry, no=2E It means you should wait for an explicit agreement to your p= roposed patch, and perhaps ping Paul to review it=2E Especially since Paul= objected to the idea on which your patch is based=2E I apologize for our slow turnaround times wrt this issue=2E From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket References: In-Reply-To: Resent-From: Teika Kazura Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2019 01:42:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.155632929124570 (code B ref 33847); Sat, 27 Apr 2019 01:42:03 +0000 Received: (at 33847) by debbugs.gnu.org; 27 Apr 2019 01:41:31 +0000 Received: from localhost ([127.0.0.1]:33988 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKCLK-0006OE-Qv for submit@debbugs.gnu.org; Fri, 26 Apr 2019 21:41:31 -0400 Received: from mout.gmx.net ([212.227.17.21]:36821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKCLH-0006O0-RO for 33847@debbugs.gnu.org; Fri, 26 Apr 2019 21:41:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1556329280; bh=0JaX+eWdz7GXwRVDebDwetzM8KOktYFETp47s2S5VRM=; h=X-UI-Sender-Class:Date:To:Subject:From; b=M82SjEiF5JTr8O6PbyyhkjClw8kTZYtr+FiXl7T39a0g3m5a95EhZS5SB4I2CW0x4 cuOetDzawcFLZi3+RDX1pTW7EtalS45t3LYxa3kR1ber40KkX+7BsrutU609tjB+kL uhVY/Z+hJNvxqEVa2oQEU73WMxSd5D10eCkmgpuk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost ([153.211.215.249]) by mail.gmx.com (mrgmx103 [212.227.17.174]) with ESMTPSA (Nemesis) id 0MY75A-1hFocx1Trk-00UrQg; Sat, 27 Apr 2019 03:41:19 +0200 Date: Sat, 27 Apr 2019 10:41:08 +0900 (JST) Message-Id: <20190427.104108.1785875872853657593.teika@gmx.com> From: Teika Kazura Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:QTDAXAumU/wOWs4+Ws4Zf/ym7RgK1jDDkNjNIyyAmCM7tZsc7PF iRDO+JUVhuvVUqL/8qY5utWRF9cVUg/d/q1BqxeySdl9IVX9DaaRnXXCojtNtuvrQVPG8oS waYsC7ELVJjfxAtizbODNGnIhS6T4cLwfleZozR7INxGOek/f3vx1Lri9ifmwRtw+3Amoeh zXuhXJwsx9xvQp8LT4NUQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:AwebaQ6FFnc=:4AvAqhe+ZL4Ygo7e5FaiIK pIlI835df5ZXPtbflNLhOq/fDVfGu5AcYSMzngb7g/KsTB5Ds/M41mS+KrOVOJu00AjB/3OD3 OLT2jmFKCl3aBPk3Grj2jWSjpr+rZDzMaayJxqwkzf4xuaW6IIiKMcED47Qwfx2gSvNHVNPCx WH3VFdQjpgLUk/cdk9EEdXuHZWaafBiOydvN2xjpSa+UgJZEsUwuvmqJfLDzNKqtF41LrDC/0 L8oweY5jJfgDD2WVjTtrM4gWGk3ftkdIJby/0Wsmx9pOgNOyB3QTzaoBsSE0PDF55y1bo6XLs 11KQdRGnZMQrnzVICBujpuCy7mSZeixQlasXE6Ha3mzRc4R7GeM34fH/1LadT9RMPeknRIhFW +I4kCCKNiHk5zT0UDvrUxfbsrSgqa2kYAUouQeHv/gqL9JVkYkZMp2YcARNVOpQUsxP6lRFBq K6sAjRSTOlQrutrEf25P63rkKtIdXtZ+4ZEqCAOgn/JNsgpwTCMEavHIojQCD6vm36i7cms7/ 7HJ5N2JNraH1zjylFDMycCuOn0M6ATtWd4Gc6BeQHkWxpA37trWRhh/03cxXqp326ga4QDsLB zUf6nAE+xNHQtfk6yg/kyVzXJ4yxccYe444AH0UmFzy30G0bcCDlpE+pbSU+tngtzYl3ANR3K j3HijFZkyPSe5hRjcGMsnSZckyMVl0RdtjoVteTMWePHZPvnv7O0RG3bxUJdmk51sV2K5zwCU cQhqc0rQvMyo4y7sCtcHm1QP0a0OuJmRp2f8ux3AdxnU4HxMWaOTrizI53UG+lhfzbZs/o8KO gTfJLyu7jRduMz+QskIxpXmJcTdO4Xa+8Q21/jGjdk7z01+poRCt9TSypbkXA+wGFDcYnoaP1 oejt59VOG3JG+moQL0l325FqGDrgoQ1vxD+r4JKTUw2iAo+RWP26W+O2J66kzp X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Whatever the solution, please describe the behavior in man (1) emacsclient. Even TMPDIR is *not* written. Please, avoid the unseeable! # Hi, Ulrich, thanks for your long time Gentoo emacs development. :) Thank you very much Paul, Eli, and last but not least, RMS. (Wow) Best wishes. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Apr 2019 07:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Teika Kazura Cc: 33847@debbugs.gnu.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.155635180427094 (code B ref 33847); Sat, 27 Apr 2019 07:57:01 +0000 Received: (at 33847) by debbugs.gnu.org; 27 Apr 2019 07:56:44 +0000 Received: from localhost ([127.0.0.1]:34228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKICS-00072w-CS for submit@debbugs.gnu.org; Sat, 27 Apr 2019 03:56:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54097) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hKICR-00072k-14 for 33847@debbugs.gnu.org; Sat, 27 Apr 2019 03:56:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hKICL-0004qP-ND; Sat, 27 Apr 2019 03:56:37 -0400 Received: from [176.228.60.248] (port=2718 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hKICL-0007Ah-3Y; Sat, 27 Apr 2019 03:56:37 -0400 Date: Sat, 27 Apr 2019 10:56:22 +0300 Message-Id: <83bm0rx4nt.fsf@gnu.org> From: Eli Zaretskii In-reply-to: <20190427.104108.1785875872853657593.teika@gmx.com> (message from Teika Kazura on Sat, 27 Apr 2019 10:41:08 +0900 (JST)) References: <20190427.104108.1785875872853657593.teika@gmx.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sat, 27 Apr 2019 10:41:08 +0900 (JST) > From: Teika Kazura > > Whatever the solution, please describe the behavior in man (1) emacsclient. Even TMPDIR is *not* written. Please, avoid the unseeable! Our main documentation is the Emacs User manual, not the man pages. I suggest to look in the manual when you need to know what emacsclient does. Of course, I don't object to extending the man page as well. > # Hi, Ulrich, thanks for your long time Gentoo emacs development. :) > > Thank you very much Paul, Eli, and last but not least, RMS. (Wow) Best wishes. You are welcome. From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 13 08:15:09 2020 Received: (at control) by debbugs.gnu.org; 13 Aug 2020 12:15:09 +0000 Received: from localhost ([127.0.0.1]:47338 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6C8T-0006iP-4H for submit@debbugs.gnu.org; Thu, 13 Aug 2020 08:15:09 -0400 Received: from mail-yb1-f171.google.com ([209.85.219.171]:40374) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k6C8R-0006hW-Un for control@debbugs.gnu.org; Thu, 13 Aug 2020 08:15:08 -0400 Received: by mail-yb1-f171.google.com with SMTP id q3so3179846ybp.7 for ; Thu, 13 Aug 2020 05:15:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=8x4OcTTpQP8RFnYM3nNHYzNBFX9So+MJNTULR1JqHis=; b=O0Lbo/VYoK/2LnaFLrGY+3/DQibmR9aBdiCsbuV58J4x+37v+AuwUiRorJ71g/WOee ux+QVdqLc772Zb4M0whqYi+CJ7bY/CUVRHmybnFzs68F7kNxy7Pnk9qRDf/+VDrvuxZH 1ck1y/SLyj7lelUg6qOKNuGPwRgwhyRaUHkvNUiseVvo2SbU27AlJ5hUW7ZX7gfPM36c h9//66czGbT0dTZF7SizRv2+WtlBsFeu08TAzuCVRaAxQHdR5YnLUzeYtv4tRWPjy/zC xhowO/vVgZ9lp4CRyfxe7RXMml+JDdZI6YRztHyuPgAwUYefCjWKaFgiEhZ/h/UqHWR/ sBDg== X-Gm-Message-State: AOAM530DFKjGybjxFs6k2e8AqNHxeZBebUpcosgF9UDskS/7REzBqK4O A/yD8Vt/E0dFMDELNBd5ZO1czvRThgKrz3I5sFVobmNUSnY= X-Google-Smtp-Source: ABdhPJyyjQGJrGJ+lHLNN36oTDFfT/mMIZFKQZb/Yhctw5okyUnO8Q2qzIAM5tgPOS2csdiSFjC0wjQx5P2nTeek7n4= X-Received: by 2002:a25:4609:: with SMTP id t9mr5838268yba.231.1597320902383; Thu, 13 Aug 2020 05:15:02 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 13 Aug 2020 05:15:01 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Thu, 13 Aug 2020 05:15:01 -0700 Message-ID: Subject: To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: tags 33847 + patch thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.219.171 listed in wl.mailspike.net] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.219.171 listed in list.dnswl.org] 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) tags 33847 + patch thanks From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 19 Aug 2020 11:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33847@debbugs.gnu.org, Paul Eggert , ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.15978351364029 (code B ref 33847); Wed, 19 Aug 2020 11:06:01 +0000 Received: (at 33847) by debbugs.gnu.org; 19 Aug 2020 11:05:36 +0000 Received: from localhost ([127.0.0.1]:38146 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8LuR-00012v-Mz for submit@debbugs.gnu.org; Wed, 19 Aug 2020 07:05:35 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k8LuP-00012d-GG for 33847@debbugs.gnu.org; Wed, 19 Aug 2020 07:05:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OHbxomFpQk8xqP2JQ11u7pR+ARipZcFn7WFAEe/RNx8=; b=pgOhOE21idLcswPPHhcVI2Jz8f nLzIUJhwb6rlDHEbsejisBNrM3pd+FPrn4KE+E1IsfuIL0xVPZnd58vzPqC0n//Rxe9pzD9ppILvP w42LcdVsRENUiJsjt18vlGwjfpTytXPLS+UptD2yc3OE46ZT0GPrEMD74kk53yfWAlfk=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k8Lu1-0003tY-7Y; Wed, 19 Aug 2020 13:05:19 +0200 From: Lars Ingebrigtsen References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> X-Now-Playing: AR Kane's _Lollita_ Date: Wed, 19 Aug 2020 13:05:07 +0200 In-Reply-To: (Eli Zaretskii's message of "Sun, 10 Feb 2019 11:48:33 +0200") Message-ID: <87eeo27v6k.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> > Since there doesn't seem to be any progress here, please find below >> > the patch that I am using since some time. >> >> Does the absence of any reply (neither here nor on emacs-devel) mean >> t [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Eli Zaretskii writes: >> > Since there doesn't seem to be any progress here, please find below >> > the patch that I am using since some time. >> >> Does the absence of any reply (neither here nor on emacs-devel) mean >> that it is o.k. to push this? > > Sorry, no. It means you should wait for an explicit agreement to your > proposed patch, and perhaps ping Paul to review it. Especially since > Paul objected to the idea on which your patch is based. > > I apologize for our slow turnaround times wrt this issue. This was a year and a half ago, and other users have also reported problem here (which, if I understand things correctly, this patch fixes). I've just skimmed the thread, but the patch seems to me like a reasonable thing to add to make these use cases work again. Paul? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Aug 2020 21:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen , Eli Zaretskii Cc: Teika Kazura , 33847@debbugs.gnu.org, Ulrich Mueller Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159804533228417 (code B ref 33847); Fri, 21 Aug 2020 21:29:01 +0000 Received: (at 33847) by debbugs.gnu.org; 21 Aug 2020 21:28:52 +0000 Received: from localhost ([127.0.0.1]:48406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9Eag-0007OG-Nb for submit@debbugs.gnu.org; Fri, 21 Aug 2020 17:28:52 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:37594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9Eac-0007O0-Kw for 33847@debbugs.gnu.org; Fri, 21 Aug 2020 17:28:49 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id BBB88160084; Fri, 21 Aug 2020 14:28:40 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id qS8K1vv_avr6; Fri, 21 Aug 2020 14:28:37 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D2A8E1600C6; Fri, 21 Aug 2020 14:28:37 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id UJ3Sx6RtLde6; Fri, 21 Aug 2020 14:28:37 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E98FC160084; Fri, 21 Aug 2020 14:28:36 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoUEJZWDM0blNTaUhsbUxDKwpLYUhMZUNMRjVaSTJ2S20zSEVlQ1R0bE9n N3haRU9OZ3d6TCtmZEtvK0Q2U29DOFJSeEpLczhhM3NWZkk0dDZDCm5yUXp2SmJCbjZneGRn Q3U1aTI5SjFRQ1lyQ1l2cWwyVXlGUEFLK2RvOTkvMWpPWFQ0bTI4MzZqMXdBUkFRQUIKdENC UVlYVnNJRVZuWjJWeWRDQThaV2RuWlhKMFFHTnpMblZqYkdFdVpXUjFQb2tDUGdRVEFRSUFL QVVDVElCeQpaQUliQXdVSkVzd0RBQVlMQ1FnSEF3SUdGUWdDQ1FvTEJCWUNBd0VDSGdFQ0Y0 QUFDZ2tRN1pmcERtS3FmalJSCkd3LytJajAzZGhZZllsL2dYVlJpdXpWMWdHcmJIayt0bmZy SS9DN2ZBZW9GelE1dFZnVmluU2hhUGtabzBIVFAKZjE4eDZJREVkQWlPOE1xbzF5cDBDdEht ekdNQ0o1MG80R3JnZmpscjZnLyt2dEVPS2JobGVzek4yWHBKdnB3TQoyUWdHdm4vbGFUTFV1 OFBIOWFSV1RzN3FKSlpLS0tBYjRzeFljOTJGZWhQdTZGT0QwZERpeWhsREFxNGxPVjJtCmRC cHpRYmlvam9aelFMTVF3anBnQ1RLMjU3MmVLOUVPRVF5U1VUaFhyU0l6NkFTZW5wNE5ZVEZI czl0dUpRdlgKazlnWkRkUFNsM2JwKzQ3ZEd4bHhFV0xwQklNN3pJT053NGtzNGF6Z1Q4bnZE WnhBNUlaSHR2cUJsSkxCT2JZWQowTGU2MVdwMHkzVGxCRGgycWRLOGVZTDQyNlc0c2NFTVN1 aWc1Z2I4T0F0UWlCVzZrMnNHVXh4ZWl2OG92V3U4CllBWmdLSmZ1b1dJK3VSbk1FZGRydVk4 SnNvTTU0S2FLdlppa2tLczJiZzFuZHRMVnpIcEo2cUZaQzdRVmplSFUKaDYvQm1ndmRqV1Ba WUZUdE4rS0E5Q1dYM0dRS0tnTjN1dTk4OHl6bkQ3TG5COThUNEVVSDFIQS9HbmZCcU1WMQpn cHpUdlBjNHFWUWluQ21Ja0VGcDgzemwrRzVmQ2pKSjNXN2l2ekNuWW80S2hLTHBGVW05N29r VEtSMkxXM3haCnpFVzRjTFNXTzM4N01USzNDekRPeDVxZTZzNGE5MVp1Wk0vai9UUWRUTERh cU5uODNrQTRIcTQ4VUhYWXhjSWgKK05kOGsvM3c2bEZ1b0swd3JPRml5d2pMeCswdXI1am1t YmVjQkdIYzF4ZGhBRkc1QWcwRVRJQnlaQUVRQUthRgo2NzhUOXd5SDR3alRyVjFQejNjREVv U25WLzBaVXJPVDM3cDFkY0d5ai9JWHExeDY3MEhSVmFoQW1rMHNacFljCjI1UEY5RDVHUFlI RldsTmp1UFU5NnJEbmRYQjNoZWRtQlJoTGRDNGJBWGpJNERWK2JtZFZlK3EvSU1ubFpSYVYK bG05RWlNQ1ZBUjZ3MTNzUmV1N3FYa1c5cjNSd1kyQXpYc2twL3RBZTRCUktyMVptYnZpMm5i blE2ZXBFQzQycgpSYngwQjFFaGpiSVFaNUpIR2syNGlQVDdMZEJnbk5tb3M1d1lqendObGtN UUQ1VDBZZHpoazdKK1V4d0E1bTQ2Cm1PaFJEQzJyRlYvQTBnbTVUTHk4RFhqdi9Fc2M0Z1lu WWFpNlNRcW5VRVZoNUx1VjhZQ0pCbmlqcytUaXc3MXgKMWljbW42eEdJNDVFdWdKT2dlYyty THlwWWdwVnA0eDBISTVUODhxQlJZQ2t4SDNLZzhRbytFV05BOUE0TFJROQpEWDhuam9uYTBn ZjBzMDN0b2NLOGtCTjY2VW9xcVB0SEJuYzRlTWdCeW1DZmxLMTJlS2ZkMllZeG55ZzljWmF6 CldBNVZzbHZUeHBtNzZoYmc1b2lBRUgvVmcvOE14SHlBblBoZnJnd3lQcm1KRWNWQmFmZHNw Sm5ZUXhCWU5jbzIKTEZQSWhsT3ZXaDhyNGF0K3MrTTNMYjI2b1VUY3psZ2RXMVNmM1NEQTc3 Qk1SbkYwRlF5RSs3QXpWNzlNQk40eQpraXFhZXpReHRhRjFGeS90dmtoZmZTbzh1K2R3RzBF Z0poK3RlMzhnVGNJU1ZyMEdJUHBsTHo2WWhqcmJIclBSCkYxQ041VXVMOURCR2p4dU4zNVJM TlZFZnRhNlJVRmxSNk5jdFRqdnJBQkVCQUFHSkFpVUVHQUVDQUE4RkFreUEKY21RQ0d3d0ZD UkxNQXdBQUNna1E3WmZwRG1LcWZqU3JIQS8rS3pBS3ZUeFJoQTlNV05MeEl5SjdTNXVKMTZn cwpUM29DalpyQktHRWhLTU9HWDRPMEdBNlZPRXJ5TzdRUkNDWWFoM294U0czOElBbk5laXdK WGdVOUJ6a2s4NVVHCmJQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: Date: Fri, 21 Aug 2020 14:28:36 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87eeo27v6k.fsf@gnus.org> Content-Type: multipart/mixed; boundary="------------B4492B69FE93BEFD072D593D" Content-Language: en-US X-Spam-Score: -4.4 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.4 (-----) This is a multi-part message in MIME format. --------------B4492B69FE93BEFD072D593D Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 8/19/20 4:05 AM, Lars Ingebrigtsen wrote: > I've just skimmed the thread, but the patch seems to me like a > reasonable thing to add to make these use cases work again. Although that patch would makes the use cases work again, it does so at the expense of security in XDG environments, because it opens holes allowing symlink attacks. You log in in an XDG environment, you don't run Emacs server, you run emacsclient - and the attacker's symlink in /tmp (or whatever) causes emacsclient to send garbage to some other socket of yours that may not be prepared for the garbage. I spent quite a bit of time looking into this and came up with the attached proposed patch which should make the use cases work again without opening security holes. This patch fixes some other bugs that I noticed while I was in the area. These use cases continue to be dubious security-wise (for other programs as well as for Emacs), but if they're popular then this patch should help people avoid shooting themselves in the foot quite so often. --------------B4492B69FE93BEFD072D593D Content-Type: text/plain; charset=UTF-8; name="0001-Redo-emacsclient-socket-symlink-attack-checking.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="0001-Redo-emacsclient-socket-symlink-attack-checking.txt" RnJvbSBhOWNmYTk3YzA5OTlkZDQ1YjVkOWU3MjdkZDY1MzJmODU2NTQ4MmI3IE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBGcmksIDIxIEF1ZyAyMDIwIDE0OjE2OjEzIC0wNzAwClN1YmplY3Q6IFtQQVRD SF0gUmVkbyBlbWFjc2NsaWVudCBzb2NrZXQgc3ltbGluay1hdHRhY2sgY2hlY2tpbmcKTUlN RS1WZXJzaW9uOiAxLjAKQ29udGVudC1UeXBlOiB0ZXh0L3BsYWluOyBjaGFyc2V0PVVURi04 CkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IDhiaXQKClRoaXMgYWRkcmVzc2VzIEJ1ZyMz Mzg0Nywgd2hpY2ggY29tcGxhaW5lZCBhYm91dCBlbWFjc2NsaWVudCBpbiBhCnNhZmVyIFhE RyBlbnZpcm9ubWVudCBub3QgY29ubmVjdGluZyB0byBhbiBFbWFjcyBzZXJ2ZXIgcnVubmlu ZyBpbgphIGxlc3Mtc2FmZSBlbnZpcm9tZW50IG91dHNpZGUgWERHLiAgVGhlIHBhdGNoIGZp eGVzIGEKbG9uZ3N0YW5kaW5nIGlzc3VlIHdpdGggZW1hY3NjbGllbnQgcGVybWlzc2lvbiBj aGVja2luZy4KSXTigJlzIGluZWZmZWN0aXZlIHRvIGxvb2sgYXQgdGhlIHBlcm1pc3Npb24g b2YgdGhlIHNvY2tldCBmaWxlCml0c2VsZjsgb24gc29tZSBwbGF0Zm9ybXMsIHRoZXNlIHBl cm1pc3Npb25zIGFyZSBpZ25vcmVkIGFueXdheS4KV2hhdCBtYXR0ZXJzIGFyZSB0aGUgcGVy bWlzc2lvbnMgb24gdGhlIHBhcmVudCBkaXJlY3Rvcnkgb2YgdGhlCnNvY2tldCBmaWxlLCBh cyB0aGVzZSBhcmUgd2hhdCBtYWtlIHN5bWxpbmsgYXR0YWNrcyBwb3NzaWJsZS4KQ2hhbmdl IHRoZSBwZXJtaXNzaW9ucyBjaGVjayBhY2NvcmRpbmdseSwgYW5kIGFsc28gcmVmdXNlIHRv CmZvbGxvdyBzeW1saW5rcyB0byB0aGF0IHBhcmVudCBkaXJlY3RvcnkuICBUaGVzZSBjaGFu Z2VzIG1ha2UgaXQKT0sgZm9yIGVtYWNzY2xpZW50IHRvIGZhbGwgYmFjayBmcm9tIFhER19S VU5USU1FX0RJUiB0byB0aGUKdHJhZGl0aW9uYWxseSBsZXNzLXNhZmUgL3RtcC9lbWFjc05O Tk4gZGlyZWN0b3JpZXMsIHNpbmNlIC90bXAgaXMKdW5pdmVyc2FsbHkgc3RpY2t5IG5vd2Fk YXlzLgoqIGFkbWluL21lcmdlLWdudWxpYiAoR05VTElCX01PRFVMRVMpOiBBZGQgZmlsZS1o YXMtYWNsLgoqIGxpYi9maWxlLWhhcy1hY2wuYzogTmV3IGZpbGUsIGNvcGllZCBmcm9tIEdu dWxpYi4KKiBsaWIvZ251bGliLm1rLmluLCBtNC9nbnVsaWItY29tcC5tNDogUmVnZW5lcmF0 ZS4KKiBsaWItc3JjL2VtYWNzY2xpZW50LmM6IEluY2x1ZGUgYWNsLmgsIGZvciBmaWxlX2hh c19hY2wuCihPX1BBVEgpOiBEZWZhdWx0IHRvIE9fU0VBUkNILCB3aGljaCBpcyBnb29kIGVu b3VnaCBoZXJlLgoodW5pb24gbG9jYWxfc29ja2FkZHIpOiBOZXcgdHlwZS4KKHNvY2tldF9z dGF0dXMpOiBSZW1vdmUsIHJlcGxhY2luZyB3aXRoIC4uLgooY29ubmVjdF9zb2NrZXQpOiBO ZXcgZnVuY3Rpb24uICBBbGwgY2FsbGVycyBjaGFuZ2VkLgpUaGlzIGZ1bmN0aW9uIGNoZWNr cyBmb3Igb3duZXJzaGlwIGFuZCBwZXJtaXNzaW9ucyBpc3N1ZXMgd2l0aCB0aGUKcGFyZW50 IGRpcmVjdG9yeSBvZiB0aGUgc29ja2V0IGZpbGUsIGluc3RlYWQgb2YgY2hlY2tpbmcgdGhl Cm93bmVyIG9mIHRoZSBzb2NrZXQgKHdoaWNoIGRvZXMgbm90IGhlbHAgc2VjdXJpdHkpLgoo c29ja25hbWVzaXplKTogTW92ZSB0byBmaWxlIHNjb3BlLgoobG9jYWxfc29ja25hbWUpOiBO ZXcgYXJnIFMuICBObyBuZWVkIHRvIHBhc3Mgc29ja25hbWVzaXplLgpVSUQgYXJnIGlzIG5v dyB1aWRfdC4gIEFsbCBjYWxsZXJzIGNoYW5nZWQuICBHZXQgZmlsZSBkZXNjcmlwdG9yCm9m IHBhcmVudCBkaXJlY3Rvcnkgb2Ygc29ja2V0LCB0byBmb2lsIHNvbWUgc3ltbGluayBhdHRh Y2tzLgpEbyBub3QgZm9sbG93IHN5bWxpbmtzIHRvIHRoYXQgZGlyZWN0b3J5Lgooc2V0X2xv Y2FsX3NvY2tldCk6IENyZWF0ZSB0aGUgc29ja2V0IGhlcmUgaW5zdGVhZCBvZiBvbgplYWNo IGF0dGVtcHQgdG8gY29ubmVjdCBpdC4gIEZhbGwgYmFjayBmcm9tIFhER19SVU5USU1FX0RJ Ugp0byAvdG1wIG9ubHkgaWYgdGhlIGZvcm1lciBmYWlscyBkdWUgdG8gRU5PRU5ULiAgQWRq dXN0CnBlcm1pc3Npb24tZmFpbHVyZSBkaWFnbm9zdGljIHRvIG1hdGNoIGNoYW5nZWQgYmVo YXZpb3IuCi0tLQogYWRtaW4vbWVyZ2UtZ251bGliICAgIHwgICAyICstCiBsaWItc3JjL2Vt YWNzY2xpZW50LmMgfCAyMjQgKysrKysrKysrKysrLS0tLS0tLQogbGliL2ZpbGUtaGFzLWFj bC5jICAgIHwgNTEwICsrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysr KwogbGliL2dudWxpYi5tay5pbiAgICAgIHwgIDExICsKIG00L2dudWxpYi1jb21wLm00ICAg ICB8ICAgMyArCiA1IGZpbGVzIGNoYW5nZWQsIDY3MCBpbnNlcnRpb25zKCspLCA4MCBkZWxl dGlvbnMoLSkKIGNyZWF0ZSBtb2RlIDEwMDY0NCBsaWIvZmlsZS1oYXMtYWNsLmMKCmRpZmYg LS1naXQgYS9hZG1pbi9tZXJnZS1nbnVsaWIgYi9hZG1pbi9tZXJnZS1nbnVsaWIKaW5kZXgg M2YzMjUzNmE2Mi4uYTQ5YzkxYzkxMCAxMDA3NTUKLS0tIGEvYWRtaW4vbWVyZ2UtZ251bGli CisrKyBiL2FkbWluL21lcmdlLWdudWxpYgpAQCAtMzMsNyArMzMsNyBAQCBHTlVMSUJfTU9E VUxFUz0KICAgY3J5cHRvL21kNS1idWZmZXIgY3J5cHRvL3NoYTEtYnVmZmVyIGNyeXB0by9z aGEyNTYtYnVmZmVyIGNyeXB0by9zaGE1MTItYnVmZmVyCiAgIGQtdHlwZSBkaWZmc2VxIGRv dWJsZS1zbGFzaC1yb290IGR0b2FzdHIgZHRvdGltZXNwZWMgZHVwMgogICBlbnZpcm9uIGV4 ZWNpbmZvIGV4cGxpY2l0X2J6ZXJvIGZhY2Nlc3NhdAotICBmY2htb2RhdCBmY250bCBmY250 bC1oIGZkb3BlbmRpcgorICBmY2htb2RhdCBmY250bCBmY250bC1oIGZkb3BlbmRpciBmaWxl LWhhcy1hY2wKICAgZmlsZW1vZGUgZmlsZW5hbWUgZmlsZXZlcmNtcCBmbGV4bWVtYmVyIGZw aWVlZSBmc3RhdGF0IGZzdXNhZ2UgZnN5bmMgZnV0aW1lbnMKICAgZ2V0bG9hZGF2ZyBnZXRv cHQtZ251IGdldHJhbmRvbSBnZXR0aW1lIGdldHRpbWVvZmRheSBnaXRsb2ctdG8tY2hhbmdl bG9nCiAgIGllZWU3NTQtaCBpZ25vcmUtdmFsdWUgaW50cHJvcHMgbGFyZ2VmaWxlIGxpYmdt cCBsc3RhdApkaWZmIC0tZ2l0IGEvbGliLXNyYy9lbWFjc2NsaWVudC5jIGIvbGliLXNyYy9l bWFjc2NsaWVudC5jCmluZGV4IDg3MWZhN2E4ZDMuLjE1MTRkNmRhZDMgMTAwNjQ0Ci0tLSBh L2xpYi1zcmMvZW1hY3NjbGllbnQuYworKysgYi9saWItc3JjL2VtYWNzY2xpZW50LmMKQEAg LTgwLDYgKzgwLDcgQEAgQ29weXJpZ2h0IChDKSAxOTg2LTE5ODcsIDE5OTQsIDE5OTktMjAy MCBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4KICNpbmNsdWRlIDxzeXMvc3RhdC5o PgogI2luY2x1ZGUgPHVuaXN0ZC5oPgogCisjaW5jbHVkZSA8YWNsLmg+CiAjaW5jbHVkZSA8 ZmlsZW5hbWUuaD4KICNpbmNsdWRlIDxpbnRwcm9wcy5oPgogI2luY2x1ZGUgPG1pbi1tYXgu aD4KQEAgLTkxLDYgKzkyLDEwIEBAIENvcHlyaWdodCAoQykgMTk4Ni0xOTg3LCAxOTk0LCAx OTk5LTIwMjAgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuCiAjIHByYWdtYSBHQ0Mg ZGlhZ25vc3RpYyBpZ25vcmVkICItV2Zvcm1hdC10cnVuY2F0aW9uPTIiCiAjZW5kaWYKIAor I2lmbmRlZiBPX1BBVEgKKyMgZGVmaW5lIE9fUEFUSCBPX1NFQVJDSAorI2VuZGlmCisKIAwK IC8qIE5hbWUgdXNlZCB0byBpbnZva2UgdGhpcyBwcm9ncmFtLiAgKi8KIHN0YXRpYyBjaGFy IGNvbnN0ICpwcm9nbmFtZTsKQEAgLTExNDMsMjQgKzExNDgsNzQgQEAgcHJvY2Vzc19ncm91 cGluZyAodm9pZCkKIAogI2lmZGVmIFNPQ0tFVFNfSU5fRklMRV9TWVNURU0KIAotLyogUmV0 dXJuIHRoZSBmaWxlIHN0YXR1cyBvZiBOQU1FLCBvcmRpbmFyaWx5IGEgc29ja2V0LgotICAg SXQgc2hvdWxkIGJlIG93bmVkIGJ5IFVJRC4gIFJldHVybiBvbmUgb2YgdGhlIGZvbGxvd2lu ZzoKLSAgPjAgLSAnc3RhdCcgZmFpbGVkIHdpdGggdGhpcyBlcnJubyB2YWx1ZQotICAtMSAt IGlzbid0IG93bmVkIGJ5IHVzCi0gICAwIC0gc3VjY2Vzczogbm9uZSBvZiB0aGUgYWJvdmUg Ki8KKy8qIEEgbG9jYWwgc29ja2V0IGFkZHJlc3MuICBUaGUgdW5pb24gYXZvaWRzIHRoZSBu ZWVkIHRvIGNhc3QuICAqLwordW5pb24gbG9jYWxfc29ja2FkZHIKK3sKKyAgc3RydWN0IHNv Y2thZGRyX3VuIHVuOworICBzdHJ1Y3Qgc29ja2FkZHIgc2E7Cit9OworCisvKiBSZWxhdGl2 ZSB0byB0aGUgZGlyZWN0b3J5IERJUkZELCBjb25uZWN0IHRoZSBzb2NrZXQgZmlsZSBuYW1l ZCBBRERSCisgICB0byB0aGUgc29ja2V0IFMuICBSZXR1cm4gMCBpZiBzdWNjZXNzZnVsLCAt MSBpZiBESVJGRCBpcyBub3QKKyAgIEFUX0ZEQ1dEIGFuZCBESVJGRCdzIHBlcm1pc3Npb25z IHdvdWxkIGFsbG93IGEgc3ltbGluayBhdHRhY2ssIGFuCisgICBlcnJubyBvdGhlcndpc2Uu ICAqLwogCiBzdGF0aWMgaW50Ci1zb2NrZXRfc3RhdHVzIChjb25zdCBjaGFyICpuYW1lLCB1 aWRfdCB1aWQpCitjb25uZWN0X3NvY2tldCAoaW50IGRpcmZkLCBjaGFyIGNvbnN0ICphZGRy LCBpbnQgcywgdWlkX3QgdWlkKQogewotICBzdHJ1Y3Qgc3RhdCBzdGF0YmZyOworICBpbnQg c29ja19zdGF0dXMgPSAwOwogCi0gIGlmIChzdGF0IChuYW1lLCAmc3RhdGJmcikgIT0gMCkK LSAgICByZXR1cm4gZXJybm87CisgIHVuaW9uIGxvY2FsX3NvY2thZGRyIHNlcnZlcjsKKyAg aWYgKHNpemVvZiBzZXJ2ZXIudW4uc3VuX3BhdGggPD0gc3RybGVuIChhZGRyKSkKKyAgICBy ZXR1cm4gRU5BTUVUT09MT05HOworICBzZXJ2ZXIudW4uc3VuX2ZhbWlseSA9IEFGX1VOSVg7 CisgIHN0cmNweSAoc2VydmVyLnVuLnN1bl9wYXRoLCBhZGRyKTsKIAotICBpZiAoc3RhdGJm ci5zdF91aWQgIT0gdWlkKQotICAgIHJldHVybiAtMTsKKyAgLyogSWYgLTEsIFdERkQgaXMg bm90IHNldCB5ZXQuICBJZiBub25uZWdhdGl2ZSwgV0RGRCBpcyBhIGZpbGUKKyAgICAgZGVz Y3JpcHRvciBmb3IgdGhlIGluaXRpYWwgd29ya2luZyBkaXJlY3RvcnkuICBPdGhlcndpc2Ug LTEgLSBXREZEIGlzCisgICAgIHRoZSBlcnJvciBudW1iZXIgZm9yIHRoZSBpbml0aWFsIHdv cmtpbmcgZGlyZWN0b3J5LiAgKi8KKyAgc3RhdGljIGludCB3ZGZkID0gLTE7CiAKLSAgcmV0 dXJuIDA7CisgIGlmIChkaXJmZCAhPSBBVF9GRENXRCkKKyAgICB7CisgICAgICAvKiBGYWls IGlmIERJUkZEJ3MgcGVybWlzc2lvbnMgYXJlIGJvZ3VzLiAgKi8KKyAgICAgIHN0cnVjdCBz dGF0IHN0OworICAgICAgaWYgKGZzdGF0IChkaXJmZCwgJnN0KSAhPSAwKQorCXJldHVybiBl cnJubzsKKyAgICAgIGlmIChzdC5zdF91aWQgIT0gdWlkIHx8IChzdC5zdF9tb2RlICYgKFNf SVdHUlAgfCBTX0lXT1RIKSkpCisJcmV0dXJuIC0xOworCisgICAgICBpZiAod2RmZCA9PSAt MSkKKwl7CisJICAvKiBTYXZlIHRoZSBpbml0aWFsIHdvcmtpbmcgZGlyZWN0b3J5LiAgKi8K KwkgIHdkZmQgPSBvcGVuICgiLiIsIE9fUEFUSCB8IE9fQ0xPRVhFQyk7CisJICBpZiAod2Rm ZCA8IDApCisJICAgIHdkZmQgPSAtMSAtIGVycm5vOworCX0KKyAgICAgIGlmICh3ZGZkIDwg MCkKKwlyZXR1cm4gLTEgLSB3ZGZkOworICAgICAgaWYgKGZjaGRpciAoZGlyZmQpICE9IDAp CisJcmV0dXJuIGVycm5vOworCisgICAgICAvKiBGYWlsIGlmIERJUkZEIGhhcyBhbiBBQ0ws IHdoaWNoIG1lYW5zIGl0cyBwZXJtaXNzaW9ucyBhcmUKKwkgYWxtb3N0IHN1cmVseSBib2d1 cy4gICovCisgICAgICBpbnQgaGFzX2FjbCA9IGZpbGVfaGFzX2FjbCAoIi4iLCAmc3QpOwor ICAgICAgaWYgKGhhc19hY2wpCisJc29ja19zdGF0dXMgPSBoYXNfYWNsIDwgMCA/IGVycm5v IDogLTE7CisgICAgfQorCisgIGlmICghc29ja19zdGF0dXMpCisgICAgc29ja19zdGF0dXMg PSBjb25uZWN0IChzLCAmc2VydmVyLnNhLCBzaXplb2Ygc2VydmVyLnVuKSA9PSAwID8gMCA6 IGVycm5vOworCisgIC8qIEZhaWwgaW1tZWRpYXRlbHkgaWYgd2UgY2Fubm90IGNoYW5nZSBi YWNrIHRvIHRoZSBpbml0aWFsIHdvcmtpbmcKKyAgICAgZGlyZWN0b3J5LCBhcyB0aGF0IGNh biBtZXNzIHVwIHRoZSByZXN0IG9mIGV4ZWN1dGlvbi4gICovCisgIGlmIChkaXJmZCAhPSBB VF9GRENXRCAmJiBmY2hkaXIgKHdkZmQpICE9IDApCisgICAgeworICAgICAgbWVzc2FnZSAo dHJ1ZSwgIiVzOiAuOiAlc1xuIiwgcHJvZ25hbWUsIHN0cmVycm9yIChlcnJubykpOworICAg ICAgZXhpdCAoRVhJVF9GQUlMVVJFKTsKKyAgICB9CisKKyAgcmV0dXJuIHNvY2tfc3RhdHVz OwogfQogCiAMCkBAIC0xMzM3LDMyICsxMzkyLDQ5IEBAIGFjdF9vbl9zaWduYWxzIChIU09D S0VUIGVtYWNzX3NvY2tldCkKICAgICB9CiB9CiAKLS8qIENyZWF0ZSBpbiBTT0NLTkFNRSAo b2Ygc2l6ZSBTT0NLTkFNRVNJWkUpIGEgbmFtZSBmb3IgYSBsb2NhbCBzb2NrZXQuCi0gICBU aGUgZmlyc3QgVE1QRElSTEVOIGJ5dGVzIG9mIFNPQ0tOQU1FIGFyZSBhbHJlYWR5IGluaXRp YWxpemVkIHRvIGJlCi0gICB0aGUgbmFtZSBvZiBhIHRlbXBvcmFyeSBkaXJlY3RvcnkuICBV c2UgVUlEIGFuZCBTRVJWRVJfTkFNRSB0bwotICAgY29uY29jdCB0aGUgbmFtZS4gIFJldHVy biB0aGUgdG90YWwgbGVuZ3RoIG9mIHRoZSBuYW1lIGlmIHN1Y2Nlc3NmdWwsCi0gICAtMSBp ZiBpdCBkb2VzIG5vdCBmaXQgKGFuZCBzdG9yZSBhIHRydW5jYXRlZCBuYW1lIGluIHRoYXQg Y2FzZSkuCi0gICBGYWlsIGlmIFRNUERJUkxFTiBpcyBvdXQgb2YgcmFuZ2UuICAqLworZW51 bSB7IHNvY2tuYW1lc2l6ZSA9IHNpemVvZiAoKHN0cnVjdCBzb2NrYWRkcl91biAqKSBOVUxM KS0+c3VuX3BhdGggfTsKKworLyogR2l2ZW4gYSBsb2NhbCBzb2NrZXQgUywgY3JlYXRlIGlu ICpTT0NLTkFNRSBhIG5hbWUgZm9yIGEgbG9jYWwgc29ja2V0CisgICBhbmQgY29ubmVjdCB0 byB0aGF0IHNvY2tldC4gIFRoZSBmaXJzdCBUTVBESVJMRU4gYnl0ZXMgb2YgKlNPQ0tOQU1F IGFyZQorICAgYWxyZWFkeSBpbml0aWFsaXplZCB0byBiZSB0aGUgbmFtZSBvZiBhIHRlbXBv cmFyeSBkaXJlY3RvcnkuCisgICBVc2UgVUlEIGFuZCBTRVJWRVJfTkFNRSB0byBjb25jb2N0 IHRoZSBuYW1lLiAgUmV0dXJuIDAgaWYKKyAgIHN1Y2Nlc3NmdWwsIC0xIGlmIHRoZSBzb2Nr ZXQncyBwYXJlbnQgZGlyZWN0b3J5IGlzIG5vdCBzYWZlLCBhbmQgYW4KKyAgIGVycm5vIGlm IHRoZXJlIGlzIHNvbWUgb3RoZXIgcHJvYmxlbS4gICovCiAKIHN0YXRpYyBpbnQKLWxvY2Fs X3NvY2tuYW1lIChjaGFyICpzb2NrbmFtZSwgaW50IHNvY2tuYW1lc2l6ZSwgaW50IHRtcGRp cmxlbiwKLQkJdWludG1heF90IHVpZCwgY2hhciBjb25zdCAqc2VydmVyX25hbWUpCitsb2Nh bF9zb2NrbmFtZSAoaW50IHMsIGNoYXIgc29ja25hbWVbc29ja25hbWVzaXplXSwgaW50IHRt cGRpcmxlbiwKKwkJdWlkX3QgdWlkLCBjaGFyIGNvbnN0ICpzZXJ2ZXJfbmFtZSkKIHsKICAg LyogSWYgISAoMCA8PSBUTVBESVJMRU4gJiYgVE1QRElSTEVOIDwgU09DS05BTUVTSVpFKSB0 aGUgdHJ1bmNhdGVkCiAgICAgIHRlbXBvcmFyeSBkaXJlY3RvcnkgbmFtZSBpcyBhbHJlYWR5 IGluIFNPQ0tOQU1FLCBzbyBub3RoaW5nIG1vcmUKICAgICAgbmVlZCBiZSBzdG9yZWQuICAq LwotICBpZiAoMCA8PSB0bXBkaXJsZW4pCi0gICAgewotICAgICAgaW50IHJlbWFpbmluZyA9 IHNvY2tuYW1lc2l6ZSAtIHRtcGRpcmxlbjsKLSAgICAgIGlmICgwIDwgcmVtYWluaW5nKQot CXsKLQkgIGludCBzdWZmaXhsZW4gPSBzbnByaW50ZiAoJnNvY2tuYW1lW3RtcGRpcmxlbl0s IHJlbWFpbmluZywKLQkJCQkgICAgIi9lbWFjcyUiUFJJdU1BWCIvJXMiLCB1aWQsIHNlcnZl cl9uYW1lKTsKLQkgIGlmICgwIDw9IHN1ZmZpeGxlbiAmJiBzdWZmaXhsZW4gPCByZW1haW5p bmcpCi0JICAgIHJldHVybiB0bXBkaXJsZW4gKyBzdWZmaXhsZW47Ci0JfQotICAgIH0KLSAg cmV0dXJuIC0xOworICBpZiAoISAoMCA8PSB0bXBkaXJsZW4gJiYgdG1wZGlybGVuIDwgc29j a25hbWVzaXplKSkKKyAgICByZXR1cm4gRU5BTUVUT09MT05HOworCisgIC8qIFB1dCB0aGUg ZnVsbCBhZGRyZXNzIG5hbWUgaW50byB0aGUgYnVmZmVyLCBzaW5jZSB0aGUgY2FsbGVyIG1p Z2h0CisgICAgIG5lZWQgaXQgZm9yIGRpYWdub3N0aWNzLiAgQnV0IGRvbid0IG92ZXJydW4g dGhlIGJ1ZmZlci4gICovCisgIHVpbnRtYXhfdCB1aWRtYXggPSB1aWQ7CisgIGludCBlbWFj c2RpcmxlbjsKKyAgaW50IHN1ZmZpeGxlbiA9IHNucHJpbnRmIChzb2NrbmFtZSArIHRtcGRp cmxlbiwgc29ja25hbWVzaXplIC0gdG1wZGlybGVuLAorCQkJICAgICIvZW1hY3MlIlBSSXVN QVgiJW4vJXMiLCB1aWRtYXgsICZlbWFjc2RpcmxlbiwKKwkJCSAgICBzZXJ2ZXJfbmFtZSk7 CisgIGlmICghICgwIDw9IHN1ZmZpeGxlbiAmJiBzdWZmaXhsZW4gPCBzb2NrbmFtZXNpemUg LSB0bXBkaXJsZW4pKQorICAgIHJldHVybiBFTkFNRVRPT0xPTkc7CisKKyAgLyogTWFrZSBz dXJlIHRoZSBhZGRyZXNzJ3MgcGFyZW50IGRpcmVjdG9yeSBpcyBub3QgYSBzeW1saW5rIGFu ZCBpcworICAgICB0aGlzIHVzZXIncyBkaXJlY3RvcnkgYW5kIGRvZXMgbm90IGxldCBvdGhl cnMgd3JpdGUgdG8gaXQ7IHRoaXMKKyAgICAgZmVuZHMgb2ZmIHNvbWUgc3ltbGluayBhdHRh Y2tzLiAgVG8gYXZvaWQgcmFjZXMsIGtlZXAgdGhlIHBhcmVudAorICAgICBkaXJlY3Rvcnkg b3BlbiB3aGlsZSBjaGVja2luZy4gICovCisgIGNoYXIgKmVtYWNzZGlyZW5kID0gc29ja25h bWUgKyB0bXBkaXJsZW4gKyBlbWFjc2RpcmxlbjsKKyAgKmVtYWNzZGlyZW5kID0gJ1wwJzsK KyAgaW50IGRpciA9IG9wZW5hdCAoQVRfRkRDV0QsIHNvY2tuYW1lLAorCQkgICAgT19QQVRI IHwgT19ESVJFQ1RPUlkgfCBPX05PRk9MTE9XIHwgT19DTE9FWEVDKTsKKyAgKmVtYWNzZGly ZW5kID0gJy8nOworICBpZiAoZGlyIDwgMCkKKyAgICByZXR1cm4gZXJybm87CisgIGludCBz b2NrX3N0YXR1cyA9IGNvbm5lY3Rfc29ja2V0IChkaXIsIHNlcnZlcl9uYW1lLCBzLCB1aWQp OworICBjbG9zZSAoZGlyKTsKKyAgcmV0dXJuIHNvY2tfc3RhdHVzOwogfQogCiAvKiBDcmVh dGUgYSBsb2NhbCBzb2NrZXQgZm9yIFNFUlZFUl9OQU1FIGFuZCBjb25uZWN0IGl0IHRvIEVt YWNzLiAgSWYKQEAgLTEzNzMsMjggKzE0NDUsNDMgQEAgbG9jYWxfc29ja25hbWUgKGNoYXIg KnNvY2tuYW1lLCBpbnQgc29ja25hbWVzaXplLCBpbnQgdG1wZGlybGVuLAogc3RhdGljIEhT T0NLRVQKIHNldF9sb2NhbF9zb2NrZXQgKGNoYXIgY29uc3QgKnNlcnZlcl9uYW1lKQogewot ICB1bmlvbiB7Ci0gICAgc3RydWN0IHNvY2thZGRyX3VuIHVuOwotICAgIHN0cnVjdCBzb2Nr YWRkciBzYTsKLSAgfSBzZXJ2ZXIgPSB7eyAuc3VuX2ZhbWlseSA9IEFGX1VOSVggfX07Cisg IHVuaW9uIGxvY2FsX3NvY2thZGRyIHNlcnZlcjsKKyAgaW50IHNvY2tfc3RhdHVzOwogICBj aGFyICpzb2NrbmFtZSA9IHNlcnZlci51bi5zdW5fcGF0aDsKLSAgZW51bSB7IHNvY2tuYW1l c2l6ZSA9IHNpemVvZiBzZXJ2ZXIudW4uc3VuX3BhdGggfTsKICAgaW50IHRtcGRpcmxlbiA9 IC0xOwogICBpbnQgc29ja25hbWVsZW4gPSAtMTsKICAgdWlkX3QgdWlkID0gZ2V0ZXVpZCAo KTsKICAgYm9vbCB0bXBkaXJfdXNlZCA9IGZhbHNlOworICBpbnQgcyA9IGNsb2V4ZWNfc29j a2V0IChBRl9VTklYLCBTT0NLX1NUUkVBTSwgMCk7CisgIGlmIChzIDwgMCkKKyAgICB7Cisg ICAgICBtZXNzYWdlICh0cnVlLCAiJXM6IGNhbid0IGNyZWF0ZSBzb2NrZXQ6ICVzXG4iLAor CSAgICAgICBwcm9nbmFtZSwgc3RyZXJyb3IgKGVycm5vKSk7CisgICAgICBmYWlsICgpOwor ICAgIH0KIAogICBpZiAoc3RyY2hyIChzZXJ2ZXJfbmFtZSwgJy8nKQogICAgICAgfHwgKElT U0xBU0ggKCdcXCcpICYmIHN0cmNociAoc2VydmVyX25hbWUsICdcXCcpKSkKLSAgICBzb2Nr bmFtZWxlbiA9IHNucHJpbnRmIChzb2NrbmFtZSwgc29ja25hbWVzaXplLCAiJXMiLCBzZXJ2 ZXJfbmFtZSk7CisgICAgeworICAgICAgc29ja25hbWVsZW4gPSBzbnByaW50ZiAoc29ja25h bWUsIHNvY2tuYW1lc2l6ZSwgIiVzIiwgc2VydmVyX25hbWUpOworICAgICAgc29ja19zdGF0 dXMgPSAoMCA8PSBzb2NrbmFtZWxlbiAmJiBzb2NrbmFtZWxlbiA8IHNvY2tuYW1lc2l6ZQor CQkgICAgID8gY29ubmVjdF9zb2NrZXQgKEFUX0ZEQ1dELCBzb2NrbmFtZSwgcywgMCkKKwkJ ICAgICA6IEVOQU1FVE9PTE9ORyk7CisgICAgfQogICBlbHNlCiAgICAgewogICAgICAgLyog c29ja2V0X25hbWUgaXMgYSBmaWxlIG5hbWUgY29tcG9uZW50LiAgKi8KKyAgICAgIHNvY2tf c3RhdHVzID0gRU5PRU5UOwogICAgICAgY2hhciBjb25zdCAqeGRnX3J1bnRpbWVfZGlyID0g ZWdldGVudiAoIlhER19SVU5USU1FX0RJUiIpOwogICAgICAgaWYgKHhkZ19ydW50aW1lX2Rp cikKLQlzb2NrbmFtZWxlbiA9IHNucHJpbnRmIChzb2NrbmFtZSwgc29ja25hbWVzaXplLCAi JXMvZW1hY3MvJXMiLAotCQkJCXhkZ19ydW50aW1lX2Rpciwgc2VydmVyX25hbWUpOwotICAg ICAgZWxzZQorCXsKKwkgIHNvY2tuYW1lbGVuID0gc25wcmludGYgKHNvY2tuYW1lLCBzb2Nr bmFtZXNpemUsICIlcy9lbWFjcy8lcyIsCisJCQkJICB4ZGdfcnVudGltZV9kaXIsIHNlcnZl cl9uYW1lKTsKKwkgIHNvY2tfc3RhdHVzID0gKDAgPD0gc29ja25hbWVsZW4gJiYgc29ja25h bWVsZW4gPCBzb2NrbmFtZXNpemUKKwkJCSA/IGNvbm5lY3Rfc29ja2V0IChBVF9GRENXRCwg c29ja25hbWUsIHMsIDApCisJCQkgOiBFTkFNRVRPT0xPTkcpOworCX0KKyAgICAgIGlmIChz b2NrX3N0YXR1cyA9PSBFTk9FTlQpCiAJewogCSAgY2hhciBjb25zdCAqdG1wZGlyID0gZWdl dGVudiAoIlRNUERJUiIpOwogCSAgaWYgKHRtcGRpcikKQEAgLTE0MTMsMjMgKzE1MDAsMjQg QEAgc2V0X2xvY2FsX3NvY2tldCAoY2hhciBjb25zdCAqc2VydmVyX25hbWUpCiAJICAgICAg aWYgKHRtcGRpcmxlbiA8IDApCiAJCXRtcGRpcmxlbiA9IHNucHJpbnRmIChzb2NrbmFtZSwg c29ja25hbWVzaXplLCAiL3RtcCIpOwogCSAgICB9Ci0JICBzb2NrbmFtZWxlbiA9IGxvY2Fs X3NvY2tuYW1lIChzb2NrbmFtZSwgc29ja25hbWVzaXplLCB0bXBkaXJsZW4sCisJICBzb2Nr X3N0YXR1cyA9IGxvY2FsX3NvY2tuYW1lIChzLCBzb2NrbmFtZSwgdG1wZGlybGVuLAogCQkJ CQl1aWQsIHNlcnZlcl9uYW1lKTsKIAkgIHRtcGRpcl91c2VkID0gdHJ1ZTsKIAl9CiAgICAg fQogCi0gIGlmICghICgwIDw9IHNvY2tuYW1lbGVuICYmIHNvY2tuYW1lbGVuIDwgc29ja25h bWVzaXplKSkKKyAgaWYgKHNvY2tfc3RhdHVzID09IDApCisgICAgcmV0dXJuIHM7CisKKyAg aWYgKHNvY2tfc3RhdHVzID09IEVOQU1FVE9PTE9ORykKICAgICB7CiAgICAgICBtZXNzYWdl ICh0cnVlLCAiJXM6IHNvY2tldC1uYW1lICVzLi4uIHRvbyBsb25nXG4iLCBwcm9nbmFtZSwg c29ja25hbWUpOwogICAgICAgZmFpbCAoKTsKICAgICB9CiAKLSAgLyogU2VlIGlmIHRoZSBz b2NrZXQgZXhpc3RzLCBhbmQgaWYgaXQncyBvd25lZCBieSB1cy4gKi8KLSAgaW50IHNvY2tf c3RhdHVzID0gc29ja2V0X3N0YXR1cyAoc29ja25hbWUsIHVpZCk7Ci0gIGlmIChzb2NrX3N0 YXR1cykKKyAgaWYgKHRtcGRpcl91c2VkKQogICAgIHsKLSAgICAgIC8qIEZhaWxpbmcgdGhh dCwgc2VlIGlmIExPR05BTUUgb3IgVVNFUiBleGlzdCBhbmQgZGlmZmVyIGZyb20KKyAgICAg IC8qIFNlZSB3aGV0aGVyIExPR05BTUUgb3IgVVNFUiBleGlzdCBhbmQgZGlmZmVyIGZyb20K IAkgb3VyIGV1aWQuICBJZiBzbywgbG9vayBmb3IgYSBzb2NrZXQgYmFzZWQgb24gdGhlIFVJ RAogCSBhc3NvY2lhdGVkIHdpdGggdGhlIG5hbWUuICBUaGlzIGlzIHJlbWluaXNjZW50IG9m IHRoZSBsb2dpYwogCSB0aGF0IGluaXRfZWRpdGZucyB1c2VzIHRvIHNldCB0aGUgZ2xvYmFs IFZ1c2VyX2Z1bGxfbmFtZS4gICovCkBAIC0xNDQ2LDQ4ICsxNTM0LDI2IEBAIHNldF9sb2Nh bF9zb2NrZXQgKGNoYXIgY29uc3QgKnNlcnZlcl9uYW1lKQogCSAgaWYgKHB3ICYmIHB3LT5w d191aWQgIT0gdWlkKQogCSAgICB7CiAJICAgICAgLyogV2UncmUgcnVubmluZyB1bmRlciBz dSwgYXBwYXJlbnRseS4gKi8KLQkgICAgICBzb2NrbmFtZWxlbiA9IGxvY2FsX3NvY2tuYW1l IChzb2NrbmFtZSwgc29ja25hbWVzaXplLCB0bXBkaXJsZW4sCisJICAgICAgc29ja19zdGF0 dXMgPSBsb2NhbF9zb2NrbmFtZSAocywgc29ja25hbWUsIHRtcGRpcmxlbiwKIAkJCQkJICAg IHB3LT5wd191aWQsIHNlcnZlcl9uYW1lKTsKLQkgICAgICBpZiAoc29ja25hbWVsZW4gPCAw KQorCSAgICAgIGlmIChzb2NrX3N0YXR1cyA9PSAwKQorCQlyZXR1cm4gczsKKwkgICAgICBp ZiAoc29ja19zdGF0dXMgPT0gRU5BTUVUT09MT05HKQogCQl7CiAJCSAgbWVzc2FnZSAodHJ1 ZSwgIiVzOiBzb2NrZXQtbmFtZSAlcy4uLiB0b28gbG9uZ1xuIiwKIAkJCSAgIHByb2duYW1l LCBzb2NrbmFtZSk7CiAJCSAgZXhpdCAoRVhJVF9GQUlMVVJFKTsKIAkJfQotCi0JICAgICAg c29ja19zdGF0dXMgPSBzb2NrZXRfc3RhdHVzIChzb2NrbmFtZSwgdWlkKTsKIAkgICAgfQog CX0KICAgICB9CiAKLSAgaWYgKHNvY2tfc3RhdHVzID09IDApCi0gICAgewotICAgICAgSFNP Q0tFVCBzID0gY2xvZXhlY19zb2NrZXQgKEFGX1VOSVgsIFNPQ0tfU1RSRUFNLCAwKTsKLSAg ICAgIGlmIChzIDwgMCkKLQl7Ci0JICBtZXNzYWdlICh0cnVlLCAiJXM6IHNvY2tldDogJXNc biIsIHByb2duYW1lLCBzdHJlcnJvciAoZXJybm8pKTsKLQkgIHJldHVybiBJTlZBTElEX1NP Q0tFVDsKLQl9Ci0gICAgICBpZiAoY29ubmVjdCAocywgJnNlcnZlci5zYSwgc2l6ZW9mIHNl cnZlci51bikgIT0gMCkKLQl7Ci0JICBtZXNzYWdlICh0cnVlLCAiJXM6IGNvbm5lY3Q6ICVz XG4iLCBwcm9nbmFtZSwgc3RyZXJyb3IgKGVycm5vKSk7Ci0JICBDTE9TRV9TT0NLRVQgKHMp OwotCSAgcmV0dXJuIElOVkFMSURfU09DS0VUOwotCX0KLQotICAgICAgc3RydWN0IHN0YXQg Y29ubmVjdF9zdGF0OwotICAgICAgaWYgKGZzdGF0IChzLCAmY29ubmVjdF9zdGF0KSAhPSAw KQotCXNvY2tfc3RhdHVzID0gZXJybm87Ci0gICAgICBlbHNlIGlmIChjb25uZWN0X3N0YXQu c3RfdWlkID09IHVpZCkKLQlyZXR1cm4gczsKLSAgICAgIGVsc2UKLQlzb2NrX3N0YXR1cyA9 IC0xOwotCi0gICAgICBDTE9TRV9TT0NLRVQgKHMpOwotICAgIH0KKyAgY2xvc2UgKHMpOwog Ci0gIGlmIChzb2NrX3N0YXR1cyA8IDApCi0gICAgbWVzc2FnZSAodHJ1ZSwgIiVzOiBJbnZh bGlkIHNvY2tldCBvd25lclxuIiwgcHJvZ25hbWUpOworICBpZiAoc29ja19zdGF0dXMgPT0g LTEpCisgICAgbWVzc2FnZSAodHJ1ZSwKKwkgICAgICIlczogSW52YWxpZCBwZXJtaXNzaW9u cyBvbiBwYXJlbnQgZGlyZWN0b3J5IG9mIHNvY2tldDogJXNcbiIsCisJICAgICBwcm9nbmFt ZSwgc29ja25hbWUpOwogICBlbHNlIGlmIChzb2NrX3N0YXR1cyA9PSBFTk9FTlQpCiAgICAg ewogICAgICAgaWYgKHRtcGRpcl91c2VkKQpAQCAtMTUxNyw3ICsxNTgzLDcgQEAgc2V0X2xv Y2FsX3NvY2tldCAoY2hhciBjb25zdCAqc2VydmVyX25hbWUpCiAJfQogICAgIH0KICAgZWxz ZQotICAgIG1lc3NhZ2UgKHRydWUsICIlczogY2FuJ3Qgc3RhdCAlczogJXNcbiIsCisgICAg bWVzc2FnZSAodHJ1ZSwgIiVzOiBjYW4ndCBjb25uZWN0IHRvICVzOiAlc1xuIiwKIAkgICAg IHByb2duYW1lLCBzb2NrbmFtZSwgc3RyZXJyb3IgKHNvY2tfc3RhdHVzKSk7CiAKICAgcmV0 dXJuIElOVkFMSURfU09DS0VUOwpkaWZmIC0tZ2l0IGEvbGliL2ZpbGUtaGFzLWFjbC5jIGIv bGliL2ZpbGUtaGFzLWFjbC5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAw MDAuLmM2NjdhZTlkMjQKLS0tIC9kZXYvbnVsbAorKysgYi9saWIvZmlsZS1oYXMtYWNsLmMK QEAgLTAsMCArMSw1MTAgQEAKKy8qIFRlc3Qgd2hldGhlciBhIGZpbGUgaGFzIGEgbm9udHJp dmlhbCBBQ0wuICAtKi0gY29kaW5nOiB1dGYtOCAtKi0KKworICAgQ29weXJpZ2h0IChDKSAy MDAyLTIwMDMsIDIwMDUtMjAyMCBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24sIEluYy4KKwor ICAgVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU6IHlvdSBjYW4gcmVkaXN0cmlidXRl IGl0IGFuZC9vciBtb2RpZnkKKyAgIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdl bmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5CisgICB0aGUgRnJlZSBTb2Z0 d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAzIG9mIHRoZSBMaWNlbnNlLCBvcgor ICAgKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KKworICAgVGhpcyBwcm9n cmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWws CisgICBidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGll ZCB3YXJyYW50eSBvZgorICAgTUVSQ0hBTlRBQklMSVRZIG9yIEZJVE5FU1MgRk9SIEEgUEFS VElDVUxBUiBQVVJQT1NFLiAgU2VlIHRoZQorICAgR05VIEdlbmVyYWwgUHVibGljIExpY2Vu c2UgZm9yIG1vcmUgZGV0YWlscy4KKworICAgWW91IHNob3VsZCBoYXZlIHJlY2VpdmVkIGEg Y29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKKyAgIGFsb25nIHdpdGgg dGhpcyBwcm9ncmFtLiAgSWYgbm90LCBzZWUgPGh0dHBzOi8vd3d3LmdudS5vcmcvbGljZW5z ZXMvPi4KKworICAgV3JpdHRlbiBieSBQYXVsIEVnZ2VydCwgQW5kcmVhcyBHcsO8bmJhY2hl ciwgYW5kIEJydW5vIEhhaWJsZS4gICovCisKKy8qIFdpdGhvdXQgdGhpcyBwcmFnbWEsIGdj YyA0LjcuMCAyMDEyMDEyNiBtYXkgc3VnZ2VzdCB0aGF0IHRoZQorICAgZmlsZV9oYXNfYWNs IGZ1bmN0aW9uIG1pZ2h0IGJlIGNhbmRpZGF0ZSBmb3IgYXR0cmlidXRlICdjb25zdCcgICov CisjaWYgKF9fR05VQ19fID09IDQgJiYgNiA8PSBfX0dOVUNfTUlOT1JfXykgfHwgNCA8IF9f R05VQ19fCisjIHByYWdtYSBHQ0MgZGlhZ25vc3RpYyBpZ25vcmVkICItV3N1Z2dlc3QtYXR0 cmlidXRlPWNvbnN0IgorI2VuZGlmCisKKyNpbmNsdWRlIDxjb25maWcuaD4KKworI2luY2x1 ZGUgImFjbC5oIgorCisjaW5jbHVkZSAiYWNsLWludGVybmFsLmgiCisKKyNpZiBHRVRYQVRU Ul9XSVRIX1BPU0lYX0FDTFMKKyMgaW5jbHVkZSA8c3lzL3hhdHRyLmg+CisjIGluY2x1ZGUg PGxpbnV4L3hhdHRyLmg+CisjZW5kaWYKKworLyogUmV0dXJuIDEgaWYgTkFNRSBoYXMgYSBu b250cml2aWFsIGFjY2VzcyBjb250cm9sIGxpc3QsCisgICAwIGlmIEFDTHMgYXJlIG5vdCBz dXBwb3J0ZWQsIG9yIGlmIE5BTUUgaGFzIG5vIG9yIG9ubHkgYSBiYXNlIEFDTCwKKyAgIGFu ZCAtMSAoc2V0dGluZyBlcnJubykgb24gZXJyb3IuICBOb3RlIGNhbGxlcnMgY2FuIGRldGVy bWluZQorICAgaWYgQUNMcyBhcmUgbm90IHN1cHBvcnRlZCBhcyBlcnJubyBpcyBzZXQgaW4g dGhhdCBjYXNlIGFsc28uCisgICBTQiBtdXN0IGJlIHNldCB0byB0aGUgc3RhdCBidWZmZXIg b2YgTkFNRSwKKyAgIG9idGFpbmVkIHRocm91Z2ggc3RhdCgpIG9yIGxzdGF0KCkuICAqLwor CitpbnQKK2ZpbGVfaGFzX2FjbCAoY2hhciBjb25zdCAqbmFtZSwgc3RydWN0IHN0YXQgY29u c3QgKnNiKQoreworI2lmIFVTRV9BQ0wKKyAgaWYgKCEgU19JU0xOSyAoc2ItPnN0X21vZGUp KQorICAgIHsKKworIyBpZiBHRVRYQVRUUl9XSVRIX1BPU0lYX0FDTFMKKworICAgICAgc3Np emVfdCByZXQ7CisKKyAgICAgIHJldCA9IGdldHhhdHRyIChuYW1lLCBYQVRUUl9OQU1FX1BP U0lYX0FDTF9BQ0NFU1MsIE5VTEwsIDApOworICAgICAgaWYgKHJldCA8IDAgJiYgZXJybm8g PT0gRU5PREFUQSkKKyAgICAgICAgcmV0ID0gMDsKKyAgICAgIGVsc2UgaWYgKHJldCA+IDAp CisgICAgICAgIHJldHVybiAxOworCisgICAgICBpZiAocmV0ID09IDAgJiYgU19JU0RJUiAo c2ItPnN0X21vZGUpKQorICAgICAgICB7CisgICAgICAgICAgcmV0ID0gZ2V0eGF0dHIgKG5h bWUsIFhBVFRSX05BTUVfUE9TSVhfQUNMX0RFRkFVTFQsIE5VTEwsIDApOworICAgICAgICAg IGlmIChyZXQgPCAwICYmIGVycm5vID09IEVOT0RBVEEpCisgICAgICAgICAgICByZXQgPSAw OworICAgICAgICAgIGVsc2UgaWYgKHJldCA+IDApCisgICAgICAgICAgICByZXR1cm4gMTsK KyAgICAgICAgfQorCisgICAgICBpZiAocmV0IDwgMCkKKyAgICAgICAgcmV0dXJuIC0gYWNs X2Vycm5vX3ZhbGlkIChlcnJubyk7CisgICAgICByZXR1cm4gcmV0OworCisjIGVsaWYgSEFW RV9BQ0xfR0VUX0ZJTEUKKworICAgICAgLyogUE9TSVggMTAwMy4xZSAoZHJhZnQgMTcgLS0g YWJhbmRvbmVkKSBzcGVjaWZpYyB2ZXJzaW9uLiAgKi8KKyAgICAgIC8qIExpbnV4LCBGcmVl QlNELCBNYWMgT1MgWCwgSVJJWCwgVHJ1NjQsIEN5Z3dpbiA+PSAyLjUgKi8KKyAgICAgIGlu dCByZXQ7CisKKyAgICAgIGlmIChIQVZFX0FDTF9FWFRFTkRFRF9GSUxFKSAvKiBMaW51eCAq LworICAgICAgICB7CisgICAgICAgICAgLyogT24gTGludXgsIGFjbF9leHRlbmRlZF9maWxl IGlzIGFuIG9wdGltaXplZCBmdW5jdGlvbjogSXQgb25seQorICAgICAgICAgICAgIG1ha2Vz IHR3byBjYWxscyB0byBnZXR4YXR0cigpLCBvbmUgZm9yIEFDTF9UWVBFX0FDQ0VTUywgb25l IGZvcgorICAgICAgICAgICAgIEFDTF9UWVBFX0RFRkFVTFQuICAqLworICAgICAgICAgIHJl dCA9IGFjbF9leHRlbmRlZF9maWxlIChuYW1lKTsKKyAgICAgICAgfQorICAgICAgZWxzZSAv KiBGcmVlQlNELCBNYWMgT1MgWCwgSVJJWCwgVHJ1NjQsIEN5Z3dpbiA+PSAyLjUgKi8KKyAg ICAgICAgeworIyAgaWYgSEFWRV9BQ0xfVFlQRV9FWFRFTkRFRCAvKiBNYWMgT1MgWCAqLwor ICAgICAgICAgIC8qIE9uIE1hYyBPUyBYLCBhY2xfZ2V0X2ZpbGUgKG5hbWUsIEFDTF9UWVBF X0FDQ0VTUykKKyAgICAgICAgICAgICBhbmQgYWNsX2dldF9maWxlIChuYW1lLCBBQ0xfVFlQ RV9ERUZBVUxUKQorICAgICAgICAgICAgIGFsd2F5cyByZXR1cm4gTlVMTCAvIEVJTlZBTC4g IFRoZXJlIGlzIG5vIHBvaW50IGluIG1ha2luZworICAgICAgICAgICAgIHRoZXNlIHR3byB1 c2VsZXNzIGNhbGxzLiAgVGhlIHJlYWwgQUNMIGlzIHJldHJpZXZlZCB0aHJvdWdoCisgICAg ICAgICAgICAgYWNsX2dldF9maWxlIChuYW1lLCBBQ0xfVFlQRV9FWFRFTkRFRCkuICAqLwor ICAgICAgICAgIGFjbF90IGFjbCA9IGFjbF9nZXRfZmlsZSAobmFtZSwgQUNMX1RZUEVfRVhU RU5ERUQpOworICAgICAgICAgIGlmIChhY2wpCisgICAgICAgICAgICB7CisgICAgICAgICAg ICAgIHJldCA9IGFjbF9leHRlbmRlZF9ub250cml2aWFsIChhY2wpOworICAgICAgICAgICAg ICBhY2xfZnJlZSAoYWNsKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlCisgICAg ICAgICAgICByZXQgPSAtMTsKKyMgIGVsc2UgLyogRnJlZUJTRCwgSVJJWCwgVHJ1NjQsIEN5 Z3dpbiA+PSAyLjUgKi8KKyAgICAgICAgICBhY2xfdCBhY2wgPSBhY2xfZ2V0X2ZpbGUgKG5h bWUsIEFDTF9UWVBFX0FDQ0VTUyk7CisgICAgICAgICAgaWYgKGFjbCkKKyAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgaW50IHNhdmVkX2Vycm5vOworCisgICAgICAgICAgICAgIHJl dCA9IGFjbF9hY2Nlc3Nfbm9udHJpdmlhbCAoYWNsKTsKKyAgICAgICAgICAgICAgc2F2ZWRf ZXJybm8gPSBlcnJubzsKKyAgICAgICAgICAgICAgYWNsX2ZyZWUgKGFjbCk7CisgICAgICAg ICAgICAgIGVycm5vID0gc2F2ZWRfZXJybm87CisjICAgaWYgSEFWRV9BQ0xfRlJFRV9URVhU IC8qIFRydTY0ICovCisgICAgICAgICAgICAgIC8qIE9uIE9TRi8xLCBhY2xfZ2V0X2ZpbGUg KG5hbWUsIEFDTF9UWVBFX0RFRkFVTFQpIGFsd2F5cworICAgICAgICAgICAgICAgICByZXR1 cm5zIE5VTEwgd2l0aCBlcnJubyBub3Qgc2V0LiAgVGhlcmUgaXMgbm8gcG9pbnQgaW4KKyAg ICAgICAgICAgICAgICAgbWFraW5nIHRoaXMgY2FsbC4gICovCisjICAgZWxzZSAvKiBGcmVl QlNELCBJUklYLCBDeWd3aW4gPj0gMi41ICovCisgICAgICAgICAgICAgIC8qIE9uIExpbnV4 LCBGcmVlQlNELCBJUklYLCBhY2xfZ2V0X2ZpbGUgKG5hbWUsIEFDTF9UWVBFX0FDQ0VTUykK KyAgICAgICAgICAgICAgICAgYW5kIGFjbF9nZXRfZmlsZSAobmFtZSwgQUNMX1RZUEVfREVG QVVMVCkgb24gYSBkaXJlY3RvcnkKKyAgICAgICAgICAgICAgICAgZWl0aGVyIGJvdGggc3Vj Y2VlZCBvciBib3RoIGZhaWw7IGl0IGRlcGVuZHMgb24gdGhlCisgICAgICAgICAgICAgICAg IGZpbGUgc3lzdGVtLiAgVGhlcmVmb3JlIHRoZXJlIGlzIG5vIHBvaW50IGluIG1ha2luZyB0 aGUgc2Vjb25kCisgICAgICAgICAgICAgICAgIGNhbGwgaWYgdGhlIGZpcnN0IG9uZSBhbHJl YWR5IGZhaWxlZC4gICovCisgICAgICAgICAgICAgIGlmIChyZXQgPT0gMCAmJiBTX0lTRElS IChzYi0+c3RfbW9kZSkpCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAg YWNsID0gYWNsX2dldF9maWxlIChuYW1lLCBBQ0xfVFlQRV9ERUZBVUxUKTsKKyAgICAgICAg ICAgICAgICAgIGlmIChhY2wpCisgICAgICAgICAgICAgICAgICAgIHsKKyMgICAgaWZkZWYg X19DWUdXSU5fXyAvKiBDeWd3aW4gPj0gMi41ICovCisgICAgICAgICAgICAgICAgICAgICAg cmV0ID0gYWNsX2FjY2Vzc19ub250cml2aWFsIChhY2wpOworICAgICAgICAgICAgICAgICAg ICAgIHNhdmVkX2Vycm5vID0gZXJybm87CisgICAgICAgICAgICAgICAgICAgICAgYWNsX2Zy ZWUgKGFjbCk7CisgICAgICAgICAgICAgICAgICAgICAgZXJybm8gPSBzYXZlZF9lcnJubzsK KyMgICAgZWxzZQorICAgICAgICAgICAgICAgICAgICAgIHJldCA9ICgwIDwgYWNsX2VudHJp ZXMgKGFjbCkpOworICAgICAgICAgICAgICAgICAgICAgIGFjbF9mcmVlIChhY2wpOworIyAg ICBlbmRpZgorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICBlbHNl CisgICAgICAgICAgICAgICAgICAgIHJldCA9IC0xOworICAgICAgICAgICAgICAgIH0KKyMg ICBlbmRpZgorICAgICAgICAgICAgfQorICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHJl dCA9IC0xOworIyAgZW5kaWYKKyAgICAgICAgfQorICAgICAgaWYgKHJldCA8IDApCisgICAg ICAgIHJldHVybiAtIGFjbF9lcnJub192YWxpZCAoZXJybm8pOworICAgICAgcmV0dXJuIHJl dDsKKworIyBlbGlmIEhBVkVfRkFDTCAmJiBkZWZpbmVkIEdFVEFDTCAvKiBTb2xhcmlzLCBD eWd3aW4gPCAyLjUsIG5vdCBIUC1VWCAqLworCisjICBpZiBkZWZpbmVkIEFDTF9OT19UUklW SUFMCisKKyAgICAgIC8qIFNvbGFyaXMgMTAgKG5ld2VyIHZlcnNpb24pLCB3aGljaCBoYXMg YWRkaXRpb25hbCBBUEkgZGVjbGFyZWQgaW4KKyAgICAgICAgIDxzeXMvYWNsLmg+IChhY2xf dCkgYW5kIGltcGxlbWVudGVkIGluIGxpYnNlYyAoYWNsX3NldCwgYWNsX3RyaXZpYWwsCisg ICAgICAgICBhY2xfZnJvbXRleHQsIC4uLikuICAqLworICAgICAgcmV0dXJuIGFjbF90cml2 aWFsIChuYW1lKTsKKworIyAgZWxzZSAvKiBTb2xhcmlzLCBDeWd3aW4sIGdlbmVyYWwgY2Fz ZSAqLworCisgICAgICAvKiBTb2xhcmlzIDIuNSB0aHJvdWdoIFNvbGFyaXMgMTAsIEN5Z3dp biwgYW5kIGNvbnRlbXBvcmFuZW91cyB2ZXJzaW9ucworICAgICAgICAgb2YgVW5peHdhcmUu ICBUaGUgYWNsKCkgY2FsbCByZXR1cm5zIHRoZSBhY2Nlc3MgYW5kIGRlZmF1bHQgQUNMIGJv dGgKKyAgICAgICAgIGF0IG9uY2UuICAqLworICAgICAgeworICAgICAgICAvKiBJbml0aWFs bHksIHRyeSB0byByZWFkIHRoZSBlbnRyaWVzIGludG8gYSBzdGFjay1hbGxvY2F0ZWQgYnVm ZmVyLgorICAgICAgICAgICBVc2UgbWFsbG9jIGlmIGl0IGRvZXMgbm90IGZpdC4gICovCisg ICAgICAgIGVudW0KKyAgICAgICAgICB7CisgICAgICAgICAgICBhbGxvY19pbml0ID0gNDAw MCAvIHNpemVvZiAoYWNsZW50X3QpLCAvKiA+PSAzICovCisgICAgICAgICAgICBhbGxvY19t YXggPSBNSU4gKElOVF9NQVgsIFNJWkVfTUFYIC8gc2l6ZW9mIChhY2xlbnRfdCkpCisgICAg ICAgICAgfTsKKyAgICAgICAgYWNsZW50X3QgYnVmW2FsbG9jX2luaXRdOworICAgICAgICBz aXplX3QgYWxsb2MgPSBhbGxvY19pbml0OworICAgICAgICBhY2xlbnRfdCAqZW50cmllcyA9 IGJ1ZjsKKyAgICAgICAgYWNsZW50X3QgKm1hbGxvY2VkID0gTlVMTDsKKyAgICAgICAgaW50 IGNvdW50OworCisgICAgICAgIGZvciAoOzspCisgICAgICAgICAgeworICAgICAgICAgICAg Y291bnQgPSBhY2wgKG5hbWUsIEdFVEFDTCwgYWxsb2MsIGVudHJpZXMpOworICAgICAgICAg ICAgaWYgKGNvdW50IDwgMCAmJiBlcnJubyA9PSBFTk9TUEMpCisgICAgICAgICAgICAgIHsK KyAgICAgICAgICAgICAgICAvKiBJbmNyZWFzZSB0aGUgc2l6ZSBvZiB0aGUgYnVmZmVyLiAg Ki8KKyAgICAgICAgICAgICAgICBmcmVlIChtYWxsb2NlZCk7CisgICAgICAgICAgICAgICAg aWYgKGFsbG9jID4gYWxsb2NfbWF4IC8gMikKKyAgICAgICAgICAgICAgICAgIHsKKyAgICAg ICAgICAgICAgICAgICAgZXJybm8gPSBFTk9NRU07CisgICAgICAgICAgICAgICAgICAgIHJl dHVybiAtMTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBhbGxvYyA9 IDIgKiBhbGxvYzsgLyogPD0gYWxsb2NfbWF4ICovCisgICAgICAgICAgICAgICAgZW50cmll cyA9IG1hbGxvY2VkID0KKyAgICAgICAgICAgICAgICAgIChhY2xlbnRfdCAqKSBtYWxsb2Mg KGFsbG9jICogc2l6ZW9mIChhY2xlbnRfdCkpOworICAgICAgICAgICAgICAgIGlmIChlbnRy aWVzID09IE5VTEwpCisgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAg IGVycm5vID0gRU5PTUVNOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7CisgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgIH0KKyAgICAgICAgaWYgKGNv dW50IDwgMCkKKyAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoZXJybm8gPT0gRU5PU1lT IHx8IGVycm5vID09IEVOT1RTVVApCisgICAgICAgICAgICAgIDsKKyAgICAgICAgICAgIGVs c2UKKyAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGludCBzYXZlZF9lcnJubyA9 IGVycm5vOworICAgICAgICAgICAgICAgIGZyZWUgKG1hbGxvY2VkKTsKKyAgICAgICAgICAg ICAgICBlcnJubyA9IHNhdmVkX2Vycm5vOworICAgICAgICAgICAgICAgIHJldHVybiAtMTsK KyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAoY291bnQg PT0gMCkKKyAgICAgICAgICA7CisgICAgICAgIGVsc2UKKyAgICAgICAgICB7CisgICAgICAg ICAgICAvKiBEb24ndCB1c2UgTUlOX0FDTF9FTlRSSUVTOiAgSXQncyBzZXQgdG8gNCBvbiBD eWd3aW4sIGJ1dCBDeWd3aW4KKyAgICAgICAgICAgICAgIHJldHVybnMgb25seSAzIGVudHJp ZXMgZm9yIGZpbGVzIHdpdGggbm8gQUNMLiAgQnV0IHRoaXMgaXMgc2FmZToKKyAgICAgICAg ICAgICAgIElmIHRoZXJlIGFyZSBtb3JlIHRoYW4gNCBlbnRyaWVzLCB0aGVyZSBjYW5ub3Qg YmUgb25seSB0aGUKKyAgICAgICAgICAgICAgICJ1c2VyOjoiLCAiZ3JvdXA6OiIsICJvdGhl cjoiLCBhbmQgIm1hc2s6IiBlbnRyaWVzLiAgKi8KKyAgICAgICAgICAgIGlmIChjb3VudCA+ IDQpCisgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBmcmVlIChtYWxsb2NlZCk7 CisgICAgICAgICAgICAgICAgcmV0dXJuIDE7CisgICAgICAgICAgICAgIH0KKworICAgICAg ICAgICAgaWYgKGFjbF9ub250cml2aWFsIChjb3VudCwgZW50cmllcykpCisgICAgICAgICAg ICAgIHsKKyAgICAgICAgICAgICAgICBmcmVlIChtYWxsb2NlZCk7CisgICAgICAgICAgICAg ICAgcmV0dXJuIDE7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICB9CisgICAgICAgIGZy ZWUgKG1hbGxvY2VkKTsKKyAgICAgIH0KKworIyAgIGlmZGVmIEFDRV9HRVRBQ0wKKyAgICAg IC8qIFNvbGFyaXMgYWxzbyBoYXMgYSBkaWZmZXJlbnQgdmFyaWFudCBvZiBBQ0xzLCB1c2Vk IGluIFpGUyBhbmQgTkZTdjQKKyAgICAgICAgIGZpbGUgc3lzdGVtcyAod2hlcmVhcyB0aGUg b3RoZXIgb25lcyBhcmUgdXNlZCBpbiBVRlMgZmlsZSBzeXN0ZW1zKS4gICovCisgICAgICB7 CisgICAgICAgIC8qIEluaXRpYWxseSwgdHJ5IHRvIHJlYWQgdGhlIGVudHJpZXMgaW50byBh IHN0YWNrLWFsbG9jYXRlZCBidWZmZXIuCisgICAgICAgICAgIFVzZSBtYWxsb2MgaWYgaXQg ZG9lcyBub3QgZml0LiAgKi8KKyAgICAgICAgZW51bQorICAgICAgICAgIHsKKyAgICAgICAg ICAgIGFsbG9jX2luaXQgPSA0MDAwIC8gc2l6ZW9mIChhY2VfdCksIC8qID49IDMgKi8KKyAg ICAgICAgICAgIGFsbG9jX21heCA9IE1JTiAoSU5UX01BWCwgU0laRV9NQVggLyBzaXplb2Yg KGFjZV90KSkKKyAgICAgICAgICB9OworICAgICAgICBhY2VfdCBidWZbYWxsb2NfaW5pdF07 CisgICAgICAgIHNpemVfdCBhbGxvYyA9IGFsbG9jX2luaXQ7CisgICAgICAgIGFjZV90ICpl bnRyaWVzID0gYnVmOworICAgICAgICBhY2VfdCAqbWFsbG9jZWQgPSBOVUxMOworICAgICAg ICBpbnQgY291bnQ7CisKKyAgICAgICAgZm9yICg7OykKKyAgICAgICAgICB7CisgICAgICAg ICAgICBjb3VudCA9IGFjbCAobmFtZSwgQUNFX0dFVEFDTCwgYWxsb2MsIGVudHJpZXMpOwor ICAgICAgICAgICAgaWYgKGNvdW50IDwgMCAmJiBlcnJubyA9PSBFTk9TUEMpCisgICAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiBJbmNyZWFzZSB0aGUgc2l6ZSBvZiB0aGUg YnVmZmVyLiAgKi8KKyAgICAgICAgICAgICAgICBmcmVlIChtYWxsb2NlZCk7CisgICAgICAg ICAgICAgICAgaWYgKGFsbG9jID4gYWxsb2NfbWF4IC8gMikKKyAgICAgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICAgICAgZXJybm8gPSBFTk9NRU07CisgICAgICAgICAgICAg ICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICBhbGxvYyA9IDIgKiBhbGxvYzsgLyogPD0gYWxsb2NfbWF4ICovCisgICAgICAgICAgICAg ICAgZW50cmllcyA9IG1hbGxvY2VkID0gKGFjZV90ICopIG1hbGxvYyAoYWxsb2MgKiBzaXpl b2YgKGFjZV90KSk7CisgICAgICAgICAgICAgICAgaWYgKGVudHJpZXMgPT0gTlVMTCkKKyAg ICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgZXJybm8gPSBFTk9NRU07 CisgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgYnJlYWs7CisgICAgICAgICAgfQorICAgICAgICBpZiAoY291bnQgPCAwKQorICAgICAg ICAgIHsKKyAgICAgICAgICAgIGlmIChlcnJubyA9PSBFTk9TWVMgfHwgZXJybm8gPT0gRUlO VkFMKQorICAgICAgICAgICAgICA7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAg IHsKKyAgICAgICAgICAgICAgICBpbnQgc2F2ZWRfZXJybm8gPSBlcnJubzsKKyAgICAgICAg ICAgICAgICBmcmVlIChtYWxsb2NlZCk7CisgICAgICAgICAgICAgICAgZXJybm8gPSBzYXZl ZF9lcnJubzsKKyAgICAgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgICAgICAgIH0K KyAgICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGNvdW50ID09IDApCisgICAgICAgICAg OworICAgICAgICBlbHNlCisgICAgICAgICAgeworICAgICAgICAgICAgLyogSW4gdGhlIG9s ZCAob3JpZ2luYWwgU29sYXJpcyAxMCkgY29udmVudGlvbjoKKyAgICAgICAgICAgICAgIElm IHRoZXJlIGFyZSBtb3JlIHRoYW4gMyBlbnRyaWVzLCB0aGVyZSBjYW5ub3QgYmUgb25seSB0 aGUKKyAgICAgICAgICAgICAgIEFDRV9PV05FUiwgQUNFX0dST1VQLCBBQ0VfT1RIRVIgZW50 cmllcy4KKyAgICAgICAgICAgICAgIEluIHRoZSBuZXdlciBTb2xhcmlzIDEwIGFuZCBTb2xh cmlzIDExIGNvbnZlbnRpb246CisgICAgICAgICAgICAgICBJZiB0aGVyZSBhcmUgbW9yZSB0 aGFuIDYgZW50cmllcywgdGhlcmUgY2Fubm90IGJlIG9ubHkgdGhlCisgICAgICAgICAgICAg ICBBQ0VfT1dORVIsIEFDRV9HUk9VUCwgQUNFX0VWRVJZT05FIGVudHJpZXMsIGVhY2ggb25j ZSB3aXRoCisgICAgICAgICAgICAgICBORVdfQUNFX0FDQ0VTU19BTExPV0VEX0FDRV9UWVBF IGFuZCBvbmNlIHdpdGgKKyAgICAgICAgICAgICAgIE5FV19BQ0VfQUNDRVNTX0RFTklFRF9B Q0VfVFlQRS4gICovCisgICAgICAgICAgICBpZiAoY291bnQgPiA2KQorICAgICAgICAgICAg ICB7CisgICAgICAgICAgICAgICAgZnJlZSAobWFsbG9jZWQpOworICAgICAgICAgICAgICAg IHJldHVybiAxOworICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmIChhY2xfYWNl X25vbnRyaXZpYWwgKGNvdW50LCBlbnRyaWVzKSkKKyAgICAgICAgICAgICAgeworICAgICAg ICAgICAgICAgIGZyZWUgKG1hbGxvY2VkKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gMTsK KyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAgICAgZnJlZSAobWFsbG9jZWQp OworICAgICAgfQorIyAgIGVuZGlmCisKKyAgICAgIHJldHVybiAwOworIyAgZW5kaWYKKwor IyBlbGlmIEhBVkVfR0VUQUNMIC8qIEhQLVVYICovCisKKyAgICAgIHsKKyAgICAgICAgc3Ry dWN0IGFjbF9lbnRyeSBlbnRyaWVzW05BQ0xFTlRSSUVTXTsKKyAgICAgICAgaW50IGNvdW50 OworCisgICAgICAgIGNvdW50ID0gZ2V0YWNsIChuYW1lLCBOQUNMRU5UUklFUywgZW50cmll cyk7CisKKyAgICAgICAgaWYgKGNvdW50IDwgMCkKKyAgICAgICAgICB7CisgICAgICAgICAg ICAvKiBFTk9TWVMgaXMgc2VlbiBvbiBuZXdlciBIUC1VWCB2ZXJzaW9ucy4KKyAgICAgICAg ICAgICAgIEVPUE5PVFNVUFAgaXMgdHlwaWNhbGx5IHNlZW4gb24gTkZTIG1vdW50cy4KKyAg ICAgICAgICAgICAgIEVOT1RTVVAgd2FzIHNlZW4gb24gUXVhbnR1bSBTdG9yTmV4dCBmaWxl IHN5c3RlbXMgKGN2ZnMpLiAgKi8KKyAgICAgICAgICAgIGlmIChlcnJubyA9PSBFTk9TWVMg fHwgZXJybm8gPT0gRU9QTk9UU1VQUCB8fCBlcnJubyA9PSBFTk9UU1VQKQorICAgICAgICAg ICAgICA7CisgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHJldHVybiAtMTsKKyAg ICAgICAgICB9CisgICAgICAgIGVsc2UgaWYgKGNvdW50ID09IDApCisgICAgICAgICAgcmV0 dXJuIDA7CisgICAgICAgIGVsc2UgLyogY291bnQgPiAwICovCisgICAgICAgICAgeworICAg ICAgICAgICAgaWYgKGNvdW50ID4gTkFDTEVOVFJJRVMpCisgICAgICAgICAgICAgIC8qIElm IE5BQ0xFTlRSSUVTIGNhbm5vdCBiZSB0cnVzdGVkLCB1c2UgZHluYW1pYyBtZW1vcnkKKyAg ICAgICAgICAgICAgICAgYWxsb2NhdGlvbi4gICovCisgICAgICAgICAgICAgIGFib3J0ICgp OworCisgICAgICAgICAgICAvKiBJZiB0aGVyZSBhcmUgbW9yZSB0aGFuIDMgZW50cmllcywg dGhlcmUgY2Fubm90IGJlIG9ubHkgdGhlCisgICAgICAgICAgICAgICAodWlkLCUpLCAoJSxn aWQpLCAoJSwlKSBlbnRyaWVzLiAgKi8KKyAgICAgICAgICAgIGlmIChjb3VudCA+IDMpCisg ICAgICAgICAgICAgIHJldHVybiAxOworCisgICAgICAgICAgICB7CisgICAgICAgICAgICAg IHN0cnVjdCBzdGF0IHN0YXRidWY7CisKKyAgICAgICAgICAgICAgaWYgKHN0YXQgKG5hbWUs ICZzdGF0YnVmKSA8IDApCisgICAgICAgICAgICAgICAgcmV0dXJuIC0xOworCisgICAgICAg ICAgICAgIHJldHVybiBhY2xfbm9udHJpdmlhbCAoY291bnQsIGVudHJpZXMpOworICAgICAg ICAgICAgfQorICAgICAgICAgIH0KKyAgICAgIH0KKworIyAgaWYgSEFWRV9BQ0xWX0ggLyog SFAtVVggPj0gMTEuMTEgKi8KKworICAgICAgeworICAgICAgICBzdHJ1Y3QgYWNsIGVudHJp ZXNbTkFDTFZFTlRSSUVTXTsKKyAgICAgICAgaW50IGNvdW50OworCisgICAgICAgIGNvdW50 ID0gYWNsICgoY2hhciAqKSBuYW1lLCBBQ0xfR0VULCBOQUNMVkVOVFJJRVMsIGVudHJpZXMp OworCisgICAgICAgIGlmIChjb3VudCA8IDApCisgICAgICAgICAgeworICAgICAgICAgICAg LyogRU9QTk9UU1VQUCBpcyBzZWVuIG9uIE5GUyBpbiBIUC1VWCAxMS4xMSwgMTEuMjMuCisg ICAgICAgICAgICAgICBFSU5WQUwgaXMgc2VlbiBvbiBORlMgaW4gSFAtVVggMTEuMzEuICAq LworICAgICAgICAgICAgaWYgKGVycm5vID09IEVOT1NZUyB8fCBlcnJubyA9PSBFT1BOT1RT VVBQIHx8IGVycm5vID09IEVJTlZBTCkKKyAgICAgICAgICAgICAgOworICAgICAgICAgICAg ZWxzZQorICAgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgICAgfQorICAgICAgICBl bHNlIGlmIChjb3VudCA9PSAwKQorICAgICAgICAgIHJldHVybiAwOworICAgICAgICBlbHNl IC8qIGNvdW50ID4gMCAqLworICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmIChjb3VudCA+ IE5BQ0xWRU5UUklFUykKKyAgICAgICAgICAgICAgLyogSWYgTkFDTFZFTlRSSUVTIGNhbm5v dCBiZSB0cnVzdGVkLCB1c2UgZHluYW1pYyBtZW1vcnkKKyAgICAgICAgICAgICAgICAgYWxs b2NhdGlvbi4gICovCisgICAgICAgICAgICAgIGFib3J0ICgpOworCisgICAgICAgICAgICAv KiBJZiB0aGVyZSBhcmUgbW9yZSB0aGFuIDQgZW50cmllcywgdGhlcmUgY2Fubm90IGJlIG9u bHkgdGhlCisgICAgICAgICAgICAgICBmb3VyIGJhc2UgQUNMIGVudHJpZXMuICAqLworICAg ICAgICAgICAgaWYgKGNvdW50ID4gNCkKKyAgICAgICAgICAgICAgcmV0dXJuIDE7CisKKyAg ICAgICAgICAgIHJldHVybiBhY2x2X25vbnRyaXZpYWwgKGNvdW50LCBlbnRyaWVzKTsKKyAg ICAgICAgICB9CisgICAgICB9CisKKyMgIGVuZGlmCisKKyMgZWxpZiBIQVZFX0FDTFhfR0VU ICYmIGRlZmluZWQgQUNMX0FJWF9XSVAgLyogQUlYICovCisKKyAgICAgIGFjbF90eXBlX3Qg dHlwZTsKKyAgICAgIGNoYXIgYWNsYnVmWzEwMjRdOworICAgICAgdm9pZCAqYWNsID0gYWNs YnVmOworICAgICAgc2l6ZV90IGFjbHNpemUgPSBzaXplb2YgKGFjbGJ1Zik7CisgICAgICBt b2RlX3QgbW9kZTsKKworICAgICAgZm9yICg7OykKKyAgICAgICAgeworICAgICAgICAgIC8q IFRoZSBkb2NzIHNheSB0aGF0IHR5cGUgYmVpbmcgMCBpcyBlcXVpdmFsZW50IHRvIEFDTF9B TlksIGJ1dCBpdAorICAgICAgICAgICAgIGlzIG5vdCB0cnVlLCBpbiBBSVggNS4zLiAgKi8K KyAgICAgICAgICB0eXBlLnU2NCA9IEFDTF9BTlk7CisgICAgICAgICAgaWYgKGFjbHhfZ2V0 IChuYW1lLCAwLCAmdHlwZSwgYWNsYnVmLCAmYWNsc2l6ZSwgJm1vZGUpID49IDApCisgICAg ICAgICAgICBicmVhazsKKyAgICAgICAgICBpZiAoZXJybm8gPT0gRU5PU1lTKQorICAgICAg ICAgICAgcmV0dXJuIDA7CisgICAgICAgICAgaWYgKGVycm5vICE9IEVOT1NQQykKKyAgICAg ICAgICAgIHsKKyAgICAgICAgICAgICAgaWYgKGFjbCAhPSBhY2xidWYpCisgICAgICAgICAg ICAgICAgeworICAgICAgICAgICAgICAgICAgaW50IHNhdmVkX2Vycm5vID0gZXJybm87Cisg ICAgICAgICAgICAgICAgICBmcmVlIChhY2wpOworICAgICAgICAgICAgICAgICAgZXJybm8g PSBzYXZlZF9lcnJubzsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIHJldHVy biAtMTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICBhY2xzaXplID0gMiAqIGFjbHNpemU7 CisgICAgICAgICAgaWYgKGFjbCAhPSBhY2xidWYpCisgICAgICAgICAgICBmcmVlIChhY2wp OworICAgICAgICAgIGFjbCA9IG1hbGxvYyAoYWNsc2l6ZSk7CisgICAgICAgICAgaWYgKGFj bCA9PSBOVUxMKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICBlcnJubyA9IEVOT01F TTsKKyAgICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICAgICAgfQorICAgICAgICB9 CisKKyAgICAgIGlmICh0eXBlLnU2NCA9PSBBQ0xfQUlYQykKKyAgICAgICAgeworICAgICAg ICAgIGludCByZXN1bHQgPSBhY2xfbm9udHJpdmlhbCAoKHN0cnVjdCBhY2wgKikgYWNsKTsK KyAgICAgICAgICBpZiAoYWNsICE9IGFjbGJ1ZikKKyAgICAgICAgICAgIGZyZWUgKGFjbCk7 CisgICAgICAgICAgcmV0dXJuIHJlc3VsdDsKKyAgICAgICAgfQorICAgICAgZWxzZSBpZiAo dHlwZS51NjQgPT0gQUNMX05GUzQpCisgICAgICAgIHsKKyAgICAgICAgICBpbnQgcmVzdWx0 ID0gYWNsX25mczRfbm9udHJpdmlhbCAoKG5mczRfYWNsX2ludF90ICopIGFjbCk7CisgICAg ICAgICAgaWYgKGFjbCAhPSBhY2xidWYpCisgICAgICAgICAgICBmcmVlIChhY2wpOworICAg ICAgICAgIHJldHVybiByZXN1bHQ7CisgICAgICAgIH0KKyAgICAgIGVsc2UKKyAgICAgICAg eworICAgICAgICAgIC8qIEEgbmV3ZXIgdHlwZSBvZiBBQ0wgaGFzIGJlZW4gaW50cm9kdWNl ZCBpbiB0aGUgc3lzdGVtLgorICAgICAgICAgICAgIFdlIHNob3VsZCBiZXR0ZXIgc3VwcG9y dCBpdC4gICovCisgICAgICAgICAgaWYgKGFjbCAhPSBhY2xidWYpCisgICAgICAgICAgICBm cmVlIChhY2wpOworICAgICAgICAgIGVycm5vID0gRUlOVkFMOworICAgICAgICAgIHJldHVy biAtMTsKKyAgICAgICAgfQorCisjIGVsaWYgSEFWRV9TVEFUQUNMIC8qIG9sZGVyIEFJWCAq LworCisgICAgICB1bmlvbiB7IHN0cnVjdCBhY2wgYTsgY2hhciByb29tWzQwOTZdOyB9IHU7 CisKKyAgICAgIGlmIChzdGF0YWNsICgoY2hhciAqKSBuYW1lLCBTVFhfTk9STUFMLCAmdS5h LCBzaXplb2YgKHUpKSA8IDApCisgICAgICAgIHJldHVybiAtMTsKKworICAgICAgcmV0dXJu IGFjbF9ub250cml2aWFsICgmdS5hKTsKKworIyBlbGlmIEhBVkVfQUNMU09SVCAvKiBOb25T dG9wIEtlcm5lbCAqLworCisgICAgICB7CisgICAgICAgIHN0cnVjdCBhY2wgZW50cmllc1tO QUNMRU5UUklFU107CisgICAgICAgIGludCBjb3VudDsKKworICAgICAgICBjb3VudCA9IGFj bCAoKGNoYXIgKikgbmFtZSwgQUNMX0dFVCwgTkFDTEVOVFJJRVMsIGVudHJpZXMpOworCisg ICAgICAgIGlmIChjb3VudCA8IDApCisgICAgICAgICAgeworICAgICAgICAgICAgaWYgKGVy cm5vID09IEVOT1NZUyB8fCBlcnJubyA9PSBFTk9UU1VQKQorICAgICAgICAgICAgICA7Cisg ICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgICB9 CisgICAgICAgIGVsc2UgaWYgKGNvdW50ID09IDApCisgICAgICAgICAgcmV0dXJuIDA7Cisg ICAgICAgIGVsc2UgLyogY291bnQgPiAwICovCisgICAgICAgICAgeworICAgICAgICAgICAg aWYgKGNvdW50ID4gTkFDTEVOVFJJRVMpCisgICAgICAgICAgICAgIC8qIElmIE5BQ0xFTlRS SUVTIGNhbm5vdCBiZSB0cnVzdGVkLCB1c2UgZHluYW1pYyBtZW1vcnkKKyAgICAgICAgICAg ICAgICAgYWxsb2NhdGlvbi4gICovCisgICAgICAgICAgICAgIGFib3J0ICgpOworCisgICAg ICAgICAgICAvKiBJZiB0aGVyZSBhcmUgbW9yZSB0aGFuIDQgZW50cmllcywgdGhlcmUgY2Fu bm90IGJlIG9ubHkgdGhlCisgICAgICAgICAgICAgICBmb3VyIGJhc2UgQUNMIGVudHJpZXMu ICAqLworICAgICAgICAgICAgaWYgKGNvdW50ID4gNCkKKyAgICAgICAgICAgICAgcmV0dXJu IDE7CisKKyAgICAgICAgICAgIHJldHVybiBhY2xfbm9udHJpdmlhbCAoY291bnQsIGVudHJp ZXMpOworICAgICAgICAgIH0KKyAgICAgIH0KKworIyBlbmRpZgorICAgIH0KKyNlbmRpZgor CisgIHJldHVybiAwOworfQpkaWZmIC0tZ2l0IGEvbGliL2dudWxpYi5tay5pbiBiL2xpYi9n bnVsaWIubWsuaW4KaW5kZXggNzhiNDU0MmQ4MC4uNWUwMjQ0ZjIxYSAxMDA2NDQKLS0tIGEv bGliL2dudWxpYi5tay5pbgorKysgYi9saWIvZ251bGliLm1rLmluCkBAIC05OCw2ICs5OCw3 IEBACiAjICBmY250bCBcCiAjICBmY250bC1oIFwKICMgIGZkb3BlbmRpciBcCisjICBmaWxl LWhhcy1hY2wgXAogIyAgZmlsZW1vZGUgXAogIyAgZmlsZW5hbWUgXAogIyAgZmlsZXZlcmNt cCBcCkBAIC0xNjc2LDYgKzE2NzcsMTYgQEAgRVhUUkFfbGliZ251X2FfU09VUkNFUyArPSBm ZG9wZW5kaXIuYwogZW5kaWYKICMjIGVuZCAgIGdudWxpYiBtb2R1bGUgZmRvcGVuZGlyCiAK KyMjIGJlZ2luIGdudWxpYiBtb2R1bGUgZmlsZS1oYXMtYWNsCitpZmVxICgsJChPTUlUX0dO VUxJQl9NT0RVTEVfZmlsZS1oYXMtYWNsKSkKKworbGliZ251X2FfU09VUkNFUyArPSBmaWxl LWhhcy1hY2wuYworCitFWFRSQV9ESVNUICs9IGFjbC1pbnRlcm5hbC5oCisKK2VuZGlmCisj IyBlbmQgICBnbnVsaWIgbW9kdWxlIGZpbGUtaGFzLWFjbAorCiAjIyBiZWdpbiBnbnVsaWIg bW9kdWxlIGZpbGVtb2RlCiBpZmVxICgsJChPTUlUX0dOVUxJQl9NT0RVTEVfZmlsZW1vZGUp KQogCmRpZmYgLS1naXQgYS9tNC9nbnVsaWItY29tcC5tNCBiL200L2dudWxpYi1jb21wLm00 CmluZGV4IDViZmExNDczZWQuLjViNzMzMmJlMzkgMTAwNjQ0Ci0tLSBhL200L2dudWxpYi1j b21wLm00CisrKyBiL200L2dudWxpYi1jb21wLm00CkBAIC04Nyw2ICs4Nyw3IEBAIEFDX0RF RlVOCiAgICMgQ29kZSBmcm9tIG1vZHVsZSBmY250bDoKICAgIyBDb2RlIGZyb20gbW9kdWxl IGZjbnRsLWg6CiAgICMgQ29kZSBmcm9tIG1vZHVsZSBmZG9wZW5kaXI6CisgICMgQ29kZSBm cm9tIG1vZHVsZSBmaWxlLWhhcy1hY2w6CiAgICMgQ29kZSBmcm9tIG1vZHVsZSBmaWxlbW9k ZToKICAgIyBDb2RlIGZyb20gbW9kdWxlIGZpbGVuYW1lOgogICAjIENvZGUgZnJvbSBtb2R1 bGUgZmlsZXZlcmNtcDoKQEAgLTI4MSw2ICsyODIsNyBAQCBBQ19ERUZVTgogICBmaQogICBn bF9ESVJFTlRfTU9EVUxFX0lORElDQVRPUihbZmRvcGVuZGlyXSkKICAgZ2xfTU9EVUxFX0lO RElDQVRPUihbZmRvcGVuZGlyXSkKKyAgZ2xfRklMRV9IQVNfQUNMCiAgIGdsX0ZJTEVNT0RF CiAgIEFDX0NfRkxFWElCTEVfQVJSQVlfTUVNQkVSCiAgIGdsX0ZVTkNfRlBFTkRJTkcKQEAg LTk3NSw2ICs5NzcsNyBAQCBBQ19ERUZVTgogICBsaWIvZmNudGwuYwogICBsaWIvZmNudGwu aW4uaAogICBsaWIvZmRvcGVuZGlyLmMKKyAgbGliL2ZpbGUtaGFzLWFjbC5jCiAgIGxpYi9m aWxlbW9kZS5jCiAgIGxpYi9maWxlbW9kZS5oCiAgIGxpYi9maWxlbmFtZS5oCi0tIAoyLjI1 LjQKCg== --------------B4492B69FE93BEFD072D593D-- From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 07:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: Teika Kazura , 33847@debbugs.gnu.org, Lars Ingebrigtsen , Eli Zaretskii , Ulrich Mueller Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159808109418929 (code B ref 33847); Sat, 22 Aug 2020 07:25:02 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 07:24:54 +0000 Received: from localhost ([127.0.0.1]:48816 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9NtV-0004vF-Ko for submit@debbugs.gnu.org; Sat, 22 Aug 2020 03:24:53 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:43456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9NtS-0004v1-Kj for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 03:24:51 -0400 From: Ulrich Mueller In-Reply-To: (Paul Eggert's message of "Fri, 21 Aug 2020 14:28:36 -0700") References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> Date: Sat, 22 Aug 2020 09:24:39 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Fri, 21 Aug 2020, Paul Eggert wrote: > These use cases continue to be dubious security-wise (for other > programs as well as for Emacs), but if they're popular then this patch > should help people avoid shooting themselves in the foot quite so > often. Looks complicated. What about my earlier suggestion to avoid both /tmp and XDG_RUNTIME_DIR, but create the socket in a subdir of user-emacs-directory instead? From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 07:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Ulrich Mueller Cc: 33847@debbugs.gnu.org, Lars Ingebrigtsen , Paul Eggert , Teika Kazura Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159808159719757 (code B ref 33847); Sat, 22 Aug 2020 07:34:02 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 07:33:17 +0000 Received: from localhost ([127.0.0.1]:48824 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9O1c-00058b-UV for submit@debbugs.gnu.org; Sat, 22 Aug 2020 03:33:17 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:50081) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9O1Z-00058R-NL for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 03:33:15 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4BYVVJ3Ljrz1qrf8; Sat, 22 Aug 2020 09:33:11 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4BYVVH61pCz1r56r; Sat, 22 Aug 2020 09:33:11 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id x8jEZ-LQb056; Sat, 22 Aug 2020 09:33:11 +0200 (CEST) X-Auth-Info: qwP/KXeEqnEFw9uMeYQMY53kjlSpZpfFo9kD6bsM11tYo7/Z4qB4npVnFKxCjpaD Received: from hase.home (ppp-46-244-175-181.dynamic.mnet-online.de [46.244.175.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Sat, 22 Aug 2020 09:33:11 +0200 (CEST) Received: by hase.home (Postfix, from userid 1000) id 371371027F6; Sat, 22 Aug 2020 09:33:10 +0200 (CEST) From: Andreas Schwab References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> X-Yow: I am having FUN... I wonder if it's NET FUN or GROSS FUN? Date: Sat, 22 Aug 2020 09:33:09 +0200 In-Reply-To: (Ulrich Mueller's message of "Sat, 22 Aug 2020 09:24:39 +0200") Message-ID: <87eenzyw22.fsf@linux-m68k.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) On Aug 22 2020, Ulrich Mueller wrote: > What about my earlier suggestion to avoid both /tmp and XDG_RUNTIME_DIR, > but create the socket in a subdir of user-emacs-directory instead? user-emacs-directory may be a shared directory, causing clashes when Emacs is run simultanously on different hosts. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different." From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 07:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Andreas Schwab Cc: 33847@debbugs.gnu.org, Lars Ingebrigtsen , Paul Eggert , Teika Kazura Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159808233820891 (code B ref 33847); Sat, 22 Aug 2020 07:46:02 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 07:45:38 +0000 Received: from localhost ([127.0.0.1]:48847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9ODa-0005Qt-7f for submit@debbugs.gnu.org; Sat, 22 Aug 2020 03:45:38 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:46048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9ODV-0005Qa-3P for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 03:45:36 -0400 From: Ulrich Mueller In-Reply-To: <87eenzyw22.fsf@linux-m68k.org> (Andreas Schwab's message of "Sat, 22 Aug 2020 09:33:09 +0200") References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <87eenzyw22.fsf@linux-m68k.org> Date: Sat, 22 Aug 2020 09:45:20 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Sat, 22 Aug 2020, Andreas Schwab wrote: > user-emacs-directory may be a shared directory, causing clashes when > Emacs is run simultanously on different hosts. Is that really a problem for local sockets? Also, it should be trivial to disambiguate it using the hostname. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 08:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: teika@gmx.com, larsi@gnus.org, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159808320922363 (code B ref 33847); Sat, 22 Aug 2020 08:01:01 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 08:00:09 +0000 Received: from localhost ([127.0.0.1]:48851 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9ORd-0005od-Id for submit@debbugs.gnu.org; Sat, 22 Aug 2020 04:00:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9ORb-0005nD-9X for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 04:00:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35634) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9ORU-00063W-Nl; Sat, 22 Aug 2020 04:00:00 -0400 Received: from [176.228.60.248] (port=3664 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k9ORT-0007Zi-Vl; Sat, 22 Aug 2020 04:00:00 -0400 Date: Sat, 22 Aug 2020 10:59:56 +0300 Message-Id: <83lfi79klf.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Paul Eggert on Fri, 21 Aug 2020 14:28:36 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: 33847@debbugs.gnu.org, Ulrich Mueller , > Teika Kazura > From: Paul Eggert > Date: Fri, 21 Aug 2020 14:28:36 -0700 > > I spent quite a bit of time looking into this and came up with the attached > proposed patch which should make the use cases work again without opening > security holes. This patch fixes some other bugs that I noticed while I was in > the area. This patch will almost certainly break w32, so please don't install without a heads-up and some time left to adapt. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 08:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Ulrich Mueller Cc: teika@gmx.com, larsi@gnus.org, eggert@cs.ucla.edu, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159808325022422 (code B ref 33847); Sat, 22 Aug 2020 08:01:02 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 08:00:50 +0000 Received: from localhost ([127.0.0.1]:48854 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9OSH-0005pa-S6 for submit@debbugs.gnu.org; Sat, 22 Aug 2020 04:00:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47032) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9OSG-0005pO-7W for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 04:00:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35672) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9OSA-0006EY-TK; Sat, 22 Aug 2020 04:00:42 -0400 Received: from [176.228.60.248] (port=3709 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k9OSA-0008Bm-7t; Sat, 22 Aug 2020 04:00:42 -0400 Date: Sat, 22 Aug 2020 11:00:40 +0300 Message-Id: <83k0xr9kk7.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Ulrich Mueller on Sat, 22 Aug 2020 09:24:39 +0200) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Ulrich Mueller > Cc: Lars Ingebrigtsen , Eli Zaretskii , > 33847@debbugs.gnu.org, Ulrich Mueller , Teika Kazura > > Date: Sat, 22 Aug 2020 09:24:39 +0200 > > >>>>> On Fri, 21 Aug 2020, Paul Eggert wrote: > > > These use cases continue to be dubious security-wise (for other > > programs as well as for Emacs), but if they're popular then this patch > > should help people avoid shooting themselves in the foot quite so > > often. > > Looks complicated. The understatement of the year, I'd say ;-) From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 17:52:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Ulrich Mueller Cc: Teika Kazura , 33847@debbugs.gnu.org, Lars Ingebrigtsen , Eli Zaretskii Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159811871521079 (code B ref 33847); Sat, 22 Aug 2020 17:52:01 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 17:51:55 +0000 Received: from localhost ([127.0.0.1]:51359 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9XgI-0005Tu-P9 for submit@debbugs.gnu.org; Sat, 22 Aug 2020 13:51:54 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52456) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9XgF-0005Th-Pd for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 13:51:53 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 390D11600EB; Sat, 22 Aug 2020 10:51:46 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 7kfFEfHN8f4H; Sat, 22 Aug 2020 10:51:45 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 40DA71600ED; Sat, 22 Aug 2020 10:51:45 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QzygWu7dDHVN; Sat, 22 Aug 2020 10:51:45 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id DEDE21600EB; Sat, 22 Aug 2020 10:51:44 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoUEJZWDM0blNTaUhsbUxDKwpLYUhMZUNMRjVaSTJ2S20zSEVlQ1R0bE9n N3haRU9OZ3d6TCtmZEtvK0Q2U29DOFJSeEpLczhhM3NWZkk0dDZDCm5yUXp2SmJCbjZneGRn Q3U1aTI5SjFRQ1lyQ1l2cWwyVXlGUEFLK2RvOTkvMWpPWFQ0bTI4MzZqMXdBUkFRQUIKdENC UVlYVnNJRVZuWjJWeWRDQThaV2RuWlhKMFFHTnpMblZqYkdFdVpXUjFQb2tDUGdRVEFRSUFL QVVDVElCeQpaQUliQXdVSkVzd0RBQVlMQ1FnSEF3SUdGUWdDQ1FvTEJCWUNBd0VDSGdFQ0Y0 QUFDZ2tRN1pmcERtS3FmalJSCkd3LytJajAzZGhZZllsL2dYVlJpdXpWMWdHcmJIayt0bmZy SS9DN2ZBZW9GelE1dFZnVmluU2hhUGtabzBIVFAKZjE4eDZJREVkQWlPOE1xbzF5cDBDdEht ekdNQ0o1MG80R3JnZmpscjZnLyt2dEVPS2JobGVzek4yWHBKdnB3TQoyUWdHdm4vbGFUTFV1 OFBIOWFSV1RzN3FKSlpLS0tBYjRzeFljOTJGZWhQdTZGT0QwZERpeWhsREFxNGxPVjJtCmRC cHpRYmlvam9aelFMTVF3anBnQ1RLMjU3MmVLOUVPRVF5U1VUaFhyU0l6NkFTZW5wNE5ZVEZI czl0dUpRdlgKazlnWkRkUFNsM2JwKzQ3ZEd4bHhFV0xwQklNN3pJT053NGtzNGF6Z1Q4bnZE WnhBNUlaSHR2cUJsSkxCT2JZWQowTGU2MVdwMHkzVGxCRGgycWRLOGVZTDQyNlc0c2NFTVN1 aWc1Z2I4T0F0UWlCVzZrMnNHVXh4ZWl2OG92V3U4CllBWmdLSmZ1b1dJK3VSbk1FZGRydVk4 SnNvTTU0S2FLdlppa2tLczJiZzFuZHRMVnpIcEo2cUZaQzdRVmplSFUKaDYvQm1ndmRqV1Ba WUZUdE4rS0E5Q1dYM0dRS0tnTjN1dTk4OHl6bkQ3TG5COThUNEVVSDFIQS9HbmZCcU1WMQpn cHpUdlBjNHFWUWluQ21Ja0VGcDgzemwrRzVmQ2pKSjNXN2l2ekNuWW80S2hLTHBGVW05N29r VEtSMkxXM3haCnpFVzRjTFNXTzM4N01USzNDekRPeDVxZTZzNGE5MVp1Wk0vai9UUWRUTERh cU5uODNrQTRIcTQ4VUhYWXhjSWgKK05kOGsvM3c2bEZ1b0swd3JPRml5d2pMeCswdXI1am1t YmVjQkdIYzF4ZGhBRkc1QWcwRVRJQnlaQUVRQUthRgo2NzhUOXd5SDR3alRyVjFQejNjREVv U25WLzBaVXJPVDM3cDFkY0d5ai9JWHExeDY3MEhSVmFoQW1rMHNacFljCjI1UEY5RDVHUFlI RldsTmp1UFU5NnJEbmRYQjNoZWRtQlJoTGRDNGJBWGpJNERWK2JtZFZlK3EvSU1ubFpSYVYK bG05RWlNQ1ZBUjZ3MTNzUmV1N3FYa1c5cjNSd1kyQXpYc2twL3RBZTRCUktyMVptYnZpMm5i blE2ZXBFQzQycgpSYngwQjFFaGpiSVFaNUpIR2syNGlQVDdMZEJnbk5tb3M1d1lqendObGtN UUQ1VDBZZHpoazdKK1V4d0E1bTQ2Cm1PaFJEQzJyRlYvQTBnbTVUTHk4RFhqdi9Fc2M0Z1lu WWFpNlNRcW5VRVZoNUx1VjhZQ0pCbmlqcytUaXc3MXgKMWljbW42eEdJNDVFdWdKT2dlYyty THlwWWdwVnA0eDBISTVUODhxQlJZQ2t4SDNLZzhRbytFV05BOUE0TFJROQpEWDhuam9uYTBn ZjBzMDN0b2NLOGtCTjY2VW9xcVB0SEJuYzRlTWdCeW1DZmxLMTJlS2ZkMllZeG55ZzljWmF6 CldBNVZzbHZUeHBtNzZoYmc1b2lBRUgvVmcvOE14SHlBblBoZnJnd3lQcm1KRWNWQmFmZHNw Sm5ZUXhCWU5jbzIKTEZQSWhsT3ZXaDhyNGF0K3MrTTNMYjI2b1VUY3psZ2RXMVNmM1NEQTc3 Qk1SbkYwRlF5RSs3QXpWNzlNQk40eQpraXFhZXpReHRhRjFGeS90dmtoZmZTbzh1K2R3RzBF Z0poK3RlMzhnVGNJU1ZyMEdJUHBsTHo2WWhqcmJIclBSCkYxQ041VXVMOURCR2p4dU4zNVJM TlZFZnRhNlJVRmxSNk5jdFRqdnJBQkVCQUFHSkFpVUVHQUVDQUE4RkFreUEKY21RQ0d3d0ZD UkxNQXdBQUNna1E3WmZwRG1LcWZqU3JIQS8rS3pBS3ZUeFJoQTlNV05MeEl5SjdTNXVKMTZn cwpUM29DalpyQktHRWhLTU9HWDRPMEdBNlZPRXJ5TzdRUkNDWWFoM294U0czOElBbk5laXdK WGdVOUJ6a2s4NVVHCmJQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: Date: Sat, 22 Aug 2020 10:51:44 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -3.2 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.2 (----) On 8/22/20 12:24 AM, Ulrich Mueller wrote: >>>>>> On Fri, 21 Aug 2020, Paul Eggert wrote: > >> These use cases continue to be dubious security-wise (for other >> programs as well as for Emacs), but if they're popular then this patch >> should help people avoid shooting themselves in the foot quite so >> often. > > Looks complicated. Yes. It's complicated partly because it fixes longstanding obscure security bugs in the /tmp handling code. These bugs should be fixed anyway, regardless of what we do about XDG_RUNTIME_DIR. With some effort I could break it into two patches but I'd rather not spend the effort - I already have spent more time in this obscure but security-relevant area than I'd like. > What about my earlier suggestion to avoid both /tmp and XDG_RUNTIME_DIR, > but create the socket in a subdir of user-emacs-directory instead? This would be worse for several reasons: you'd need to disambiguate via hostname, you'd need to guarantee hostnames are unique, you'd have problems when NFS is flaky or hanging in your home directory, and you'd need to deal with socket files that survive OS crashes. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 17:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: teika@gmx.com, larsi@gnus.org, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159811892521402 (code B ref 33847); Sat, 22 Aug 2020 17:56:02 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 17:55:25 +0000 Received: from localhost ([127.0.0.1]:51363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9Xjh-0005Z7-8K for submit@debbugs.gnu.org; Sat, 22 Aug 2020 13:55:25 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:52808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9Xjf-0005Ys-On for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 13:55:24 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 587441600EB; Sat, 22 Aug 2020 10:55:18 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 80jHjNmxkysy; Sat, 22 Aug 2020 10:55:17 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 93B1B1600ED; Sat, 22 Aug 2020 10:55:17 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YvXW-q3cgpyv; Sat, 22 Aug 2020 10:55:17 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 41D891600EB; Sat, 22 Aug 2020 10:55:17 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoUEJZWDM0blNTaUhsbUxDKwpLYUhMZUNMRjVaSTJ2S20zSEVlQ1R0bE9n N3haRU9OZ3d6TCtmZEtvK0Q2U29DOFJSeEpLczhhM3NWZkk0dDZDCm5yUXp2SmJCbjZneGRn Q3U1aTI5SjFRQ1lyQ1l2cWwyVXlGUEFLK2RvOTkvMWpPWFQ0bTI4MzZqMXdBUkFRQUIKdENC UVlYVnNJRVZuWjJWeWRDQThaV2RuWlhKMFFHTnpMblZqYkdFdVpXUjFQb2tDUGdRVEFRSUFL QVVDVElCeQpaQUliQXdVSkVzd0RBQVlMQ1FnSEF3SUdGUWdDQ1FvTEJCWUNBd0VDSGdFQ0Y0 QUFDZ2tRN1pmcERtS3FmalJSCkd3LytJajAzZGhZZllsL2dYVlJpdXpWMWdHcmJIayt0bmZy SS9DN2ZBZW9GelE1dFZnVmluU2hhUGtabzBIVFAKZjE4eDZJREVkQWlPOE1xbzF5cDBDdEht ekdNQ0o1MG80R3JnZmpscjZnLyt2dEVPS2JobGVzek4yWHBKdnB3TQoyUWdHdm4vbGFUTFV1 OFBIOWFSV1RzN3FKSlpLS0tBYjRzeFljOTJGZWhQdTZGT0QwZERpeWhsREFxNGxPVjJtCmRC cHpRYmlvam9aelFMTVF3anBnQ1RLMjU3MmVLOUVPRVF5U1VUaFhyU0l6NkFTZW5wNE5ZVEZI czl0dUpRdlgKazlnWkRkUFNsM2JwKzQ3ZEd4bHhFV0xwQklNN3pJT053NGtzNGF6Z1Q4bnZE WnhBNUlaSHR2cUJsSkxCT2JZWQowTGU2MVdwMHkzVGxCRGgycWRLOGVZTDQyNlc0c2NFTVN1 aWc1Z2I4T0F0UWlCVzZrMnNHVXh4ZWl2OG92V3U4CllBWmdLSmZ1b1dJK3VSbk1FZGRydVk4 SnNvTTU0S2FLdlppa2tLczJiZzFuZHRMVnpIcEo2cUZaQzdRVmplSFUKaDYvQm1ndmRqV1Ba WUZUdE4rS0E5Q1dYM0dRS0tnTjN1dTk4OHl6bkQ3TG5COThUNEVVSDFIQS9HbmZCcU1WMQpn cHpUdlBjNHFWUWluQ21Ja0VGcDgzemwrRzVmQ2pKSjNXN2l2ekNuWW80S2hLTHBGVW05N29r VEtSMkxXM3haCnpFVzRjTFNXTzM4N01USzNDekRPeDVxZTZzNGE5MVp1Wk0vai9UUWRUTERh cU5uODNrQTRIcTQ4VUhYWXhjSWgKK05kOGsvM3c2bEZ1b0swd3JPRml5d2pMeCswdXI1am1t YmVjQkdIYzF4ZGhBRkc1QWcwRVRJQnlaQUVRQUthRgo2NzhUOXd5SDR3alRyVjFQejNjREVv U25WLzBaVXJPVDM3cDFkY0d5ai9JWHExeDY3MEhSVmFoQW1rMHNacFljCjI1UEY5RDVHUFlI RldsTmp1UFU5NnJEbmRYQjNoZWRtQlJoTGRDNGJBWGpJNERWK2JtZFZlK3EvSU1ubFpSYVYK bG05RWlNQ1ZBUjZ3MTNzUmV1N3FYa1c5cjNSd1kyQXpYc2twL3RBZTRCUktyMVptYnZpMm5i blE2ZXBFQzQycgpSYngwQjFFaGpiSVFaNUpIR2syNGlQVDdMZEJnbk5tb3M1d1lqendObGtN UUQ1VDBZZHpoazdKK1V4d0E1bTQ2Cm1PaFJEQzJyRlYvQTBnbTVUTHk4RFhqdi9Fc2M0Z1lu WWFpNlNRcW5VRVZoNUx1VjhZQ0pCbmlqcytUaXc3MXgKMWljbW42eEdJNDVFdWdKT2dlYyty THlwWWdwVnA0eDBISTVUODhxQlJZQ2t4SDNLZzhRbytFV05BOUE0TFJROQpEWDhuam9uYTBn ZjBzMDN0b2NLOGtCTjY2VW9xcVB0SEJuYzRlTWdCeW1DZmxLMTJlS2ZkMllZeG55ZzljWmF6 CldBNVZzbHZUeHBtNzZoYmc1b2lBRUgvVmcvOE14SHlBblBoZnJnd3lQcm1KRWNWQmFmZHNw Sm5ZUXhCWU5jbzIKTEZQSWhsT3ZXaDhyNGF0K3MrTTNMYjI2b1VUY3psZ2RXMVNmM1NEQTc3 Qk1SbkYwRlF5RSs3QXpWNzlNQk40eQpraXFhZXpReHRhRjFGeS90dmtoZmZTbzh1K2R3RzBF Z0poK3RlMzhnVGNJU1ZyMEdJUHBsTHo2WWhqcmJIclBSCkYxQ041VXVMOURCR2p4dU4zNVJM TlZFZnRhNlJVRmxSNk5jdFRqdnJBQkVCQUFHSkFpVUVHQUVDQUE4RkFreUEKY21RQ0d3d0ZD UkxNQXdBQUNna1E3WmZwRG1LcWZqU3JIQS8rS3pBS3ZUeFJoQTlNV05MeEl5SjdTNXVKMTZn cwpUM29DalpyQktHRWhLTU9HWDRPMEdBNlZPRXJ5TzdRUkNDWWFoM294U0czOElBbk5laXdK WGdVOUJ6a2s4NVVHCmJQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: Date: Sat, 22 Aug 2020 10:55:16 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <83lfi79klf.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -3.2 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.2 (----) On 8/22/20 12:59 AM, Eli Zaretskii wrote: > This patch will almost certainly break w32 How so? The emacsclient.c changes are almost all inside "#ifdef SOCKETS_IN_FILE_SYSTEM", and that's defined only if WINDOWSNT is not defined. Outside that #ifdef, only "#include " seems relevant and src/fileio.c already does that. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 18:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: teika@gmx.com, larsi@gnus.org, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.15981210501045 (code B ref 33847); Sat, 22 Aug 2020 18:31:02 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 18:30:50 +0000 Received: from localhost ([127.0.0.1]:51431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9YHx-0000Gm-TE for submit@debbugs.gnu.org; Sat, 22 Aug 2020 14:30:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9YHu-0000GX-J9 for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 14:30:48 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41476) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9YHo-0001K4-AM; Sat, 22 Aug 2020 14:30:40 -0400 Received: from [176.228.60.248] (port=2888 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k9YHl-0001fe-JU; Sat, 22 Aug 2020 14:30:38 -0400 Date: Sat, 22 Aug 2020 21:30:29 +0300 Message-Id: <831rjya5yy.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Paul Eggert on Sat, 22 Aug 2020 10:55:16 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: larsi@gnus.org, 33847@debbugs.gnu.org, ulm@gentoo.org, teika@gmx.com > From: Paul Eggert > Date: Sat, 22 Aug 2020 10:55:16 -0700 > > Outside that #ifdef, only "#include " seems relevant and src/fileio.c > already does that. The acl stuff in Emacs for w32 is implemented in w32.c. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Aug 2020 21:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: teika@gmx.com, larsi@gnus.org, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.15981312471622 (code B ref 33847); Sat, 22 Aug 2020 21:21:01 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Aug 2020 21:20:47 +0000 Received: from localhost ([127.0.0.1]:51611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9awO-0000Q3-4j for submit@debbugs.gnu.org; Sat, 22 Aug 2020 17:20:47 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:42684) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9awM-0000Pq-LM for 33847@debbugs.gnu.org; Sat, 22 Aug 2020 17:20:43 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 374F01600ED; Sat, 22 Aug 2020 14:20:37 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Wb3xk3lVFnU0; Sat, 22 Aug 2020 14:20:36 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 47BB71600F1; Sat, 22 Aug 2020 14:20:36 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CCx9DPZ4oYPY; Sat, 22 Aug 2020 14:20:36 -0700 (PDT) Received: from [192.168.1.9] (cpe-75-82-69-226.socal.res.rr.com [75.82.69.226]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 0B89F1600ED; Sat, 22 Aug 2020 14:20:36 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> From: Paul Eggert Autocrypt: addr=eggert@cs.ucla.edu; prefer-encrypt=mutual; keydata= LS0tLS1CRUdJTiBQR1AgUFVCTElDIEtFWSBCTE9DSy0tLS0tCgptUUlOQkV5QWNtUUJFQURB QXlIMnhvVHU3cHBHNUQzYThGTVpFb243NGRDdmM0K3ExWEEySjJ0QnkycHdhVHFmCmhweHhk R0E5Smo1MFVKM1BENGJTVUVnTjh0TFowc2FuNDdsNVhUQUZMaTI0NTZjaVNsNW04c0thSGxH ZHQ5WG0KQUF0bVhxZVpWSVlYL1VGUzk2ZkR6ZjR4aEVtbS95N0xiWUVQUWRVZHh1NDd4QTVL aFRZcDVibHRGM1dZRHoxWQpnZDdneDA3QXV3cDdpdzdlTnZub0RUQWxLQWw4S1lEWnpiRE5D UUdFYnBZM2VmWkl2UGRlSStGV1FONFcra2doCnkrUDZhdTZQcklJaFlyYWV1YTdYRGRiMkxT MWVuM1NzbUUzUWpxZlJxSS9BMnVlOEpNd3N2WGUvV0szOEV6czYKeDc0aVRhcUkzQUZINmls QWhEcXBNbmQvbXNTRVNORnQ3NkRpTzFaS1FNcjlhbVZQa25qZlBtSklTcWRoZ0IxRApsRWR3 MzRzUk9mNlY4bVp3MHhmcVQ2UEtFNDZMY0ZlZnpzMGtiZzRHT1JmOHZqRzJTZjF0azVlVThN Qml5Ti9iClowM2JLTmpOWU1wT0REUVF3dVA4NGtZTGtYMndCeHhNQWhCeHdiRFZadWR6eERa SjFDMlZYdWpDT0pWeHEya2wKakJNOUVUWXVVR3FkNzVBVzJMWHJMdzYrTXVJc0hGQVlBZ1Jy NytLY3dEZ0JBZndoUEJZWDM0blNTaUhsbUxDKwpLYUhMZUNMRjVaSTJ2S20zSEVlQ1R0bE9n N3haRU9OZ3d6TCtmZEtvK0Q2U29DOFJSeEpLczhhM3NWZkk0dDZDCm5yUXp2SmJCbjZneGRn Q3U1aTI5SjFRQ1lyQ1l2cWwyVXlGUEFLK2RvOTkvMWpPWFQ0bTI4MzZqMXdBUkFRQUIKdENC UVlYVnNJRVZuWjJWeWRDQThaV2RuWlhKMFFHTnpMblZqYkdFdVpXUjFQb2tDUGdRVEFRSUFL QVVDVElCeQpaQUliQXdVSkVzd0RBQVlMQ1FnSEF3SUdGUWdDQ1FvTEJCWUNBd0VDSGdFQ0Y0 QUFDZ2tRN1pmcERtS3FmalJSCkd3LytJajAzZGhZZllsL2dYVlJpdXpWMWdHcmJIayt0bmZy SS9DN2ZBZW9GelE1dFZnVmluU2hhUGtabzBIVFAKZjE4eDZJREVkQWlPOE1xbzF5cDBDdEht ekdNQ0o1MG80R3JnZmpscjZnLyt2dEVPS2JobGVzek4yWHBKdnB3TQoyUWdHdm4vbGFUTFV1 OFBIOWFSV1RzN3FKSlpLS0tBYjRzeFljOTJGZWhQdTZGT0QwZERpeWhsREFxNGxPVjJtCmRC cHpRYmlvam9aelFMTVF3anBnQ1RLMjU3MmVLOUVPRVF5U1VUaFhyU0l6NkFTZW5wNE5ZVEZI czl0dUpRdlgKazlnWkRkUFNsM2JwKzQ3ZEd4bHhFV0xwQklNN3pJT053NGtzNGF6Z1Q4bnZE WnhBNUlaSHR2cUJsSkxCT2JZWQowTGU2MVdwMHkzVGxCRGgycWRLOGVZTDQyNlc0c2NFTVN1 aWc1Z2I4T0F0UWlCVzZrMnNHVXh4ZWl2OG92V3U4CllBWmdLSmZ1b1dJK3VSbk1FZGRydVk4 SnNvTTU0S2FLdlppa2tLczJiZzFuZHRMVnpIcEo2cUZaQzdRVmplSFUKaDYvQm1ndmRqV1Ba WUZUdE4rS0E5Q1dYM0dRS0tnTjN1dTk4OHl6bkQ3TG5COThUNEVVSDFIQS9HbmZCcU1WMQpn cHpUdlBjNHFWUWluQ21Ja0VGcDgzemwrRzVmQ2pKSjNXN2l2ekNuWW80S2hLTHBGVW05N29r VEtSMkxXM3haCnpFVzRjTFNXTzM4N01USzNDekRPeDVxZTZzNGE5MVp1Wk0vai9UUWRUTERh cU5uODNrQTRIcTQ4VUhYWXhjSWgKK05kOGsvM3c2bEZ1b0swd3JPRml5d2pMeCswdXI1am1t YmVjQkdIYzF4ZGhBRkc1QWcwRVRJQnlaQUVRQUthRgo2NzhUOXd5SDR3alRyVjFQejNjREVv U25WLzBaVXJPVDM3cDFkY0d5ai9JWHExeDY3MEhSVmFoQW1rMHNacFljCjI1UEY5RDVHUFlI RldsTmp1UFU5NnJEbmRYQjNoZWRtQlJoTGRDNGJBWGpJNERWK2JtZFZlK3EvSU1ubFpSYVYK bG05RWlNQ1ZBUjZ3MTNzUmV1N3FYa1c5cjNSd1kyQXpYc2twL3RBZTRCUktyMVptYnZpMm5i blE2ZXBFQzQycgpSYngwQjFFaGpiSVFaNUpIR2syNGlQVDdMZEJnbk5tb3M1d1lqendObGtN UUQ1VDBZZHpoazdKK1V4d0E1bTQ2Cm1PaFJEQzJyRlYvQTBnbTVUTHk4RFhqdi9Fc2M0Z1lu WWFpNlNRcW5VRVZoNUx1VjhZQ0pCbmlqcytUaXc3MXgKMWljbW42eEdJNDVFdWdKT2dlYyty THlwWWdwVnA0eDBISTVUODhxQlJZQ2t4SDNLZzhRbytFV05BOUE0TFJROQpEWDhuam9uYTBn ZjBzMDN0b2NLOGtCTjY2VW9xcVB0SEJuYzRlTWdCeW1DZmxLMTJlS2ZkMllZeG55ZzljWmF6 CldBNVZzbHZUeHBtNzZoYmc1b2lBRUgvVmcvOE14SHlBblBoZnJnd3lQcm1KRWNWQmFmZHNw Sm5ZUXhCWU5jbzIKTEZQSWhsT3ZXaDhyNGF0K3MrTTNMYjI2b1VUY3psZ2RXMVNmM1NEQTc3 Qk1SbkYwRlF5RSs3QXpWNzlNQk40eQpraXFhZXpReHRhRjFGeS90dmtoZmZTbzh1K2R3RzBF Z0poK3RlMzhnVGNJU1ZyMEdJUHBsTHo2WWhqcmJIclBSCkYxQ041VXVMOURCR2p4dU4zNVJM TlZFZnRhNlJVRmxSNk5jdFRqdnJBQkVCQUFHSkFpVUVHQUVDQUE4RkFreUEKY21RQ0d3d0ZD UkxNQXdBQUNna1E3WmZwRG1LcWZqU3JIQS8rS3pBS3ZUeFJoQTlNV05MeEl5SjdTNXVKMTZn cwpUM29DalpyQktHRWhLTU9HWDRPMEdBNlZPRXJ5TzdRUkNDWWFoM294U0czOElBbk5laXdK WGdVOUJ6a2s4NVVHCmJQRWQ3SEdGL1ZTZUhDUXdXb3U2anFVRFRTRHZuOVloTlRkRzBLWFBN NzRhQyt4cjJab3cxTzJtaFhpaGdXS0QKMER3KzBMWVBuVU9zUTBLT0Z4SFhYWUhtUnJTMU9a UFU1OUJMdmMrVFJoSWhhZlNIS0x3YlhLKzZja2t4Qng2aAo4ejVjY3BHMFFzNGJGaGRGWW5G ckVpZURMb0dtbkUyWUxoZFY2c3dKOVZOQ1M2cExpRW9oVDNmbTdhWG0xNXRaCk9JeXpNWmhI UlNBUGJsWHhRMFpTV2pxOG9ScmNZTkZ4YzRXMVVScEFrQkNPWUpvWHZRZkQ1TDNscUFsOFRD cUQKVXpZeGhIL3RKaGJEZEhycUhINzY3amFEYVRCMStUYWxwLzJBTUt3Y1hOT2Rpa2xHeGJt SFZHNllHbDZnOExyYgpzdTlOWkVJNHlMbEh6dWlrdGhKV2d6KzN2WmhWR3lObHQrSE5Jb0Y2 Q2pETDJvbXU1Y0VxNFJESE00NFFxUGs2Cmw3TzBwVXZOMW1UNEIrUzFiMDhSS3BxbS9mZjAx NUUzN0hOVi9waUl2Smx4R0FZejhQU2Z1R0NCMXRoTVlxbG0KZ2RoZDkvQmFiR0ZiR0dZSEE2 VTQvVDV6cVUrZjZ4SHkxU3NBUVoxTVNLbEx3ZWtCSVQrNC9jTFJHcUNIam5WMApxNUgvVDZh N3Q1bVBrYnpTck9MU280cHVqK0lUb05qWXlZSURCV3pobEExOWF2T2ErcnZVam1IdEQzc0ZO N2NYCld0a0dvaThidU5jYnk0VT0KPUFMNm8KLS0tLS1FTkQgUEdQIFBVQkxJQyBLRVkgQkxP Q0stLS0tLQo= Organization: UCLA Computer Science Department Message-ID: <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> Date: Sat, 22 Aug 2020 14:20:35 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <831rjya5yy.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -3.2 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.2 (----) On 8/22/20 11:30 AM, Eli Zaretskii wrote: >> Outside that #ifdef, only "#include " seems relevant and src/fileio.c >> already does that. > The acl stuff in Emacs for w32 is implemented in w32.c. If WINDOWSNT is defined then the patched emacsclient.c never uses any of the acl stuff. It doesn't even link to it; it's all ifdeffed out. So what problems do you anticipate? From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Aug 2020 05:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: teika@gmx.com, larsi@gnus.org, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.159816129632167 (code B ref 33847); Sun, 23 Aug 2020 05:42:01 +0000 Received: (at 33847) by debbugs.gnu.org; 23 Aug 2020 05:41:36 +0000 Received: from localhost ([127.0.0.1]:51912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9il5-0008Ml-Ub for submit@debbugs.gnu.org; Sun, 23 Aug 2020 01:41:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k9il3-0008MX-NT for 33847@debbugs.gnu.org; Sun, 23 Aug 2020 01:41:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:49924) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k9ikw-0002Cr-JR; Sun, 23 Aug 2020 01:41:27 -0400 Received: from [176.228.60.248] (port=3965 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1k9ikw-0008Bd-4g; Sun, 23 Aug 2020 01:41:26 -0400 Date: Sun, 23 Aug 2020 08:41:20 +0300 Message-Id: <83v9h99awv.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> (message from Paul Eggert on Sat, 22 Aug 2020 14:20:35 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: larsi@gnus.org, 33847@debbugs.gnu.org, ulm@gentoo.org, teika@gmx.com > From: Paul Eggert > Date: Sat, 22 Aug 2020 14:20:35 -0700 > > On 8/22/20 11:30 AM, Eli Zaretskii wrote: > >> Outside that #ifdef, only "#include " seems relevant and src/fileio.c > >> already does that. > > The acl stuff in Emacs for w32 is implemented in w32.c. > > If WINDOWSNT is defined then the patched emacsclient.c never uses any of the acl > stuff. It doesn't even link to it; it's all ifdeffed out. So what problems do > you anticipate? I said "almost" because I wasn't 110% sure. Maybe I was mistaken, and there will be no changes; all I ask is a heads-up to allow me to study the patch more thoroughly and test it, that's all. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 11:03:40 2020 Received: (at control) by debbugs.gnu.org; 14 Sep 2020 15:03:40 +0000 Received: from localhost ([127.0.0.1]:55819 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHq16-0002M6-HZ for submit@debbugs.gnu.org; Mon, 14 Sep 2020 11:03:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHq14-0002Lt-VC for control@debbugs.gnu.org; Mon, 14 Sep 2020 11:03:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=SwubfCkHMK5Iras4nwtF2t5hNZ9WRgrNrtFuXjDCW34=; b=CBiM03ynXm0q9005BjszBwI4Ic E4KjqGF/iqc9Fak7AEroYhgbeA0VQy7j6D6JfwhCXg8tP7yzHW2+M0jNjf0HvTc7Z0IoZmuzK0AP8 yrhpw7jxwr6UHAYlESS41IDYfc2L8IlHqqcOswqPFAqAbTsPa8SLDu9OEGfnNXLBo9Jw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHq0x-0002nZ-7L for control@debbugs.gnu.org; Mon, 14 Sep 2020 17:03:33 +0200 Date: Mon, 14 Sep 2020 17:03:30 +0200 Message-Id: <87lfhc764d.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #33847 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: forcemerge 33847 41707 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) forcemerge 33847 41707 quit From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 13:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: teika@gmx.com, Paul Eggert , 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.1626959335724 (code B ref 33847); Thu, 22 Jul 2021 13:09:01 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Jul 2021 13:08:55 +0000 Received: from localhost ([127.0.0.1]:39725 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6YRa-0000Bc-Lb for submit@debbugs.gnu.org; Thu, 22 Jul 2021 09:08:54 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54862) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6YRW-0000BN-LG for 33847@debbugs.gnu.org; Thu, 22 Jul 2021 09:08:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=YifRNwS1NapzYC0aCoecBO6fKInjxygnFKLW8XrX4Xs=; b=XkESHZq3vAfXNPWdnlIhK48fsy QFQZD8uh3U6GvW7WUqgZXMST4LcrHafVwsAu2sSxytG5kAF4SSeEKz7NJ52ueu55myC5f4pc40oI8 lpUt6NE4/Az02KRNvCAuT41Le+6Jb5Upn/DK1eUwTWRYAX+1JVOhIhwszt1XeXcRgm8U=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6YRM-0002eP-Be; Thu, 22 Jul 2021 15:08:42 +0200 From: Lars Ingebrigtsen References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> X-Now-Playing: John T. Gast's _Inna Babalon_: "Surman" Date: Thu, 22 Jul 2021 15:08:39 +0200 In-Reply-To: <83v9h99awv.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 23 Aug 2020 08:41:20 +0300") Message-ID: <878s1yjy20.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > I said "almost" because I wasn't 110% sure. Maybe I was mistaken, and > there will be no changes; all I ask is a heads-up to allow me to study > the patch more thoroughly and test it, that's all. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > I said "almost" because I wasn't 110% sure. Maybe I was mistaken, and > there will be no changes; all I ask is a heads-up to allow me to study > the patch more thoroughly and test it, that's all. This was the last post in this thread. Paul's patch is pretty, er, long, but I've tested it a bit, and it doesn't seem to break anything for me. But then again, there's a lot of different setups in this area... I've respun the patch for the current trunk. Can you give it a test and see whether it works for you too? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=client.patch /usr/bin/patch: **** Only garbage was found in the patch input. patching file admin/merge-gnulib Hunk #1 FAILED at 33. 1 out of 1 hunk FAILED -- saving rejects to file /tmp/debbugs-gnu.rej patching file lib-src/emacsclient.c Hunk #3 succeeded at 1133 (offset -15 lines). Hunk #4 succeeded at 1377 (offset -15 lines). Hunk #5 succeeded at 1430 (offset -15 lines). Hunk #6 succeeded at 1485 (offset -15 lines). Hunk #7 succeeded at 1519 (offset -15 lines). Hunk #8 succeeded at 1568 (offset -15 lines). patching file lib/file-has-acl.c patching file lib/gnulib.mk.in Hunk #2 succeeded at 1789 (offset 112 lines). patching file m4/gnulib-comp.m4 Hunk #1 succeeded at 89 (offset 2 lines). Hunk #2 succeeded at 288 (offset 6 lines). Hunk #3 succeeded at 1047 (offset 70 lines). --- admin/merge-gnulib +++ admin/merge-gnulib @@ -33,7 +33,7 @@ GNULIB_MODULES= crypto/md5-buffer crypto/sha1-buffer crypto/sha256-buffer crypto/sha512-buffer d-type diffseq double-slash-root dtoastr dtotimespec dup2 environ execinfo explicit_bzero faccessat - fchmodat fcntl fcntl-h fdopendir + fchmodat fcntl fcntl-h fdopendir file-has-acl filemode filename filevercmp flexmember fpieee fstatat fsusage fsync futimens getloadavg getopt-gnu getrandom gettime gettimeofday gitlog-to-changelog ieee754-h ignore-value intprops largefile libgmp lstat --=-=-=-- From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 16:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: teika@gmx.com, eggert@cs.ucla.edu, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.16269724046742 (code B ref 33847); Thu, 22 Jul 2021 16:47:01 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Jul 2021 16:46:44 +0000 Received: from localhost ([127.0.0.1]:41531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6bqO-0001kg-9J for submit@debbugs.gnu.org; Thu, 22 Jul 2021 12:46:44 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6bqJ-0001kP-UV for 33847@debbugs.gnu.org; Thu, 22 Jul 2021 12:46:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58246) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6bqC-0007Ot-Vc; Thu, 22 Jul 2021 12:46:32 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3591 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6bpX-00084i-Cg; Thu, 22 Jul 2021 12:46:25 -0400 Date: Thu, 22 Jul 2021 19:45:31 +0300 Message-Id: <83lf5y2t78.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <878s1yjy20.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 22 Jul 2021 15:08:39 +0200) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Paul Eggert , teika@gmx.com, > 33847@debbugs.gnu.org, ulm@gentoo.org > Date: Thu, 22 Jul 2021 15:08:39 +0200 > > Eli Zaretskii writes: > > > I said "almost" because I wasn't 110% sure. Maybe I was mistaken, and > > there will be no changes; all I ask is a heads-up to allow me to study > > the patch more thoroughly and test it, that's all. > > This was the last post in this thread. > > Paul's patch is pretty, er, long, but I've tested it a bit, and it > doesn't seem to break anything for me. But then again, there's a lot of > different setups in this area... > > I've respun the patch for the current trunk. Can you give it a test and > see whether it works for you too? Looks like you didn't attach the right patch? Anyway, the main problem with the original patch is that it uses Gnulib ACL module unconditionally. Gnulib's ACL module doesn't support MS-Windows ACLs, so Emacs has its own emulation of the relevant routines in w32.c. To make this emacsclient patch work on MS-Windows one must either #ifdef away the emacsclient ACL code for the WINDOWSNT build, or provide ACL emulation code in ntlib.c. Both are non-trivial jobs that I didn't yet have time to do, sorry. I can look into that during the following days if you show the right patch. However, it sounds like Ulrich wasn't happy with this solution back then, so perhaps we should first see that the problem still exists and that everyone involved are okay with installing this, modulo minor fixes? From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: teika@gmx.com, eggert@cs.ucla.edu, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.16269735288566 (code B ref 33847); Thu, 22 Jul 2021 17:06:02 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Jul 2021 17:05:28 +0000 Received: from localhost ([127.0.0.1]:41544 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6c8V-0002E3-1h for submit@debbugs.gnu.org; Thu, 22 Jul 2021 13:05:28 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6c8R-0002Dm-Hr for 33847@debbugs.gnu.org; Thu, 22 Jul 2021 13:05:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sqkv0mqkEdtgEuid6pxSoQ3Tien33rdwrXHJLySqNPU=; b=RVKp/RQsYG703/ZDxzxogpfeZF g9bVDkC9O+EnvnzTsqSdi+r3GIQvJgxKI+31tz28rECUNTayGRTF6M2pGNKX//vPNIBE0V1a8FsNm JKcSTy/XF2NSvUx84NMtPC2dqdb9U65BvvZ1vQmSt8Fw7Yu2Kp8AZQCCJ53YGEkI7VHU=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6c8G-000502-Rx; Thu, 22 Jul 2021 19:05:16 +0200 From: Lars Ingebrigtsen References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> X-Now-Playing: Pet Shop Boys's _Hotspot_: "Happy people" Date: Thu, 22 Jul 2021 19:05:11 +0200 In-Reply-To: <83lf5y2t78.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jul 2021 19:45:31 +0300") Message-ID: <878s1yi8jc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Looks like you didn't attach the right patch? Yup; 2nd attempt now. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain Eli Zaretskii writes: > Looks like you didn't attach the right patch? Yup; 2nd attempt now. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=client.patch Content-Transfer-Encoding: quoted-printable diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 1c8b442700..c12e83dd2f 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -33,7 +33,7 @@ GNULIB_MODULES=3D crypto/md5-buffer crypto/sha1-buffer crypto/sha256-buffer crypto/sha512-= buffer d-type diffseq double-slash-root dtoastr dtotimespec dup2 environ execinfo explicit_bzero faccessat - fchmodat fcntl fcntl-h fdopendir + fchmodat fcntl fcntl-h fdopendir file-has-acl filemode filename filevercmp flexmember fpieee free-posix fstatat fsusage fsync futimens getloadavg getopt-gnu getrandom gettime gettimeofday gitlog-to-changelog diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 12ced4aadb..3972cbba45 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -80,6 +80,7 @@ Copyright (C) 1986-1987, 1994, 1999-2021 Free Software Fo= undation, Inc. #include #include =20 +#include #include #include #include @@ -91,6 +92,10 @@ Copyright (C) 1986-1987, 1994, 1999-2021 Free Software F= oundation, Inc. # pragma GCC diagnostic ignored "-Wformat-truncation=3D2" #endif =20 +#ifndef O_PATH +# define O_PATH O_SEARCH +#endif + /* Name used to invoke this program. */ static char const *progname; @@ -1128,24 +1133,74 @@ process_grouping (void) =20 #ifdef SOCKETS_IN_FILE_SYSTEM =20 -/* Return the file status of NAME, ordinarily a socket. - It should be owned by UID. Return one of the following: - >0 - 'stat' failed with this errno value - -1 - isn't owned by us - 0 - success: none of the above */ +/* A local socket address. The union avoids the need to cast. */ +union local_sockaddr +{ + struct sockaddr_un un; + struct sockaddr sa; +}; + +/* Relative to the directory DIRFD, connect the socket file named ADDR + to the socket S. Return 0 if successful, -1 if DIRFD is not + AT_FDCWD and DIRFD's permissions would allow a symlink attack, an + errno otherwise. */ =20 static int -socket_status (const char *name, uid_t uid) +connect_socket (int dirfd, char const *addr, int s, uid_t uid) { - struct stat statbfr; + int sock_status =3D 0; =20 - if (stat (name, &statbfr) !=3D 0) - return errno; + union local_sockaddr server; + if (sizeof server.un.sun_path <=3D strlen (addr)) + return ENAMETOOLONG; + server.un.sun_family =3D AF_UNIX; + strcpy (server.un.sun_path, addr); =20 - if (statbfr.st_uid !=3D uid) - return -1; + /* If -1, WDFD is not set yet. If nonnegative, WDFD is a file + descriptor for the initial working directory. Otherwise -1 - WDFD is + the error number for the initial working directory. */ + static int wdfd =3D -1; =20 - return 0; + if (dirfd !=3D AT_FDCWD) + { + /* Fail if DIRFD's permissions are bogus. */ + struct stat st; + if (fstat (dirfd, &st) !=3D 0) + return errno; + if (st.st_uid !=3D uid || (st.st_mode & (S_IWGRP | S_IWOTH))) + return -1; + + if (wdfd =3D=3D -1) + { + /* Save the initial working directory. */ + wdfd =3D open (".", O_PATH | O_CLOEXEC); + if (wdfd < 0) + wdfd =3D -1 - errno; + } + if (wdfd < 0) + return -1 - wdfd; + if (fchdir (dirfd) !=3D 0) + return errno; + + /* Fail if DIRFD has an ACL, which means its permissions are + almost surely bogus. */ + int has_acl =3D file_has_acl (".", &st); + if (has_acl) + sock_status =3D has_acl < 0 ? errno : -1; + } + + if (!sock_status) + sock_status =3D connect (s, &server.sa, sizeof server.un) =3D=3D 0 ? 0= : errno; + + /* Fail immediately if we cannot change back to the initial working + directory, as that can mess up the rest of execution. */ + if (dirfd !=3D AT_FDCWD && fchdir (wdfd) !=3D 0) + { + message (true, "%s: .: %s\n", progname, strerror (errno)); + exit (EXIT_FAILURE); + } + + return sock_status; } =20 @@ -1322,32 +1377,49 @@ act_on_signals (HSOCKET emacs_socket) } } =20 -/* Create in SOCKNAME (of size SOCKNAMESIZE) a name for a local socket. - The first TMPDIRLEN bytes of SOCKNAME are already initialized to be - the name of a temporary directory. Use UID and SERVER_NAME to - concoct the name. Return the total length of the name if successful, - -1 if it does not fit (and store a truncated name in that case). - Fail if TMPDIRLEN is out of range. */ +enum { socknamesize =3D sizeof ((struct sockaddr_un *) NULL)->sun_path }; + +/* Given a local socket S, create in *SOCKNAME a name for a local socket + and connect to that socket. The first TMPDIRLEN bytes of *SOCKNAME are + already initialized to be the name of a temporary directory. + Use UID and SERVER_NAME to concoct the name. Return 0 if + successful, -1 if the socket's parent directory is not safe, and an + errno if there is some other problem. */ =20 static int -local_sockname (char *sockname, int socknamesize, int tmpdirlen, - uintmax_t uid, char const *server_name) +local_sockname (int s, char sockname[socknamesize], int tmpdirlen, + uid_t uid, char const *server_name) { /* If ! (0 <=3D TMPDIRLEN && TMPDIRLEN < SOCKNAMESIZE) the truncated temporary directory name is already in SOCKNAME, so nothing more need be stored. */ - if (0 <=3D tmpdirlen) - { - int remaining =3D socknamesize - tmpdirlen; - if (0 < remaining) - { - int suffixlen =3D snprintf (&sockname[tmpdirlen], remaining, - "/emacs%"PRIuMAX"/%s", uid, server_name); - if (0 <=3D suffixlen && suffixlen < remaining) - return tmpdirlen + suffixlen; - } - } - return -1; + if (! (0 <=3D tmpdirlen && tmpdirlen < socknamesize)) + return ENAMETOOLONG; + + /* Put the full address name into the buffer, since the caller might + need it for diagnostics. But don't overrun the buffer. */ + uintmax_t uidmax =3D uid; + int emacsdirlen; + int suffixlen =3D snprintf (sockname + tmpdirlen, socknamesize - tmpdirl= en, + "/emacs%"PRIuMAX"%n/%s", uidmax, &emacsdirlen, + server_name); + if (! (0 <=3D suffixlen && suffixlen < socknamesize - tmpdirlen)) + return ENAMETOOLONG; + + /* Make sure the address's parent directory is not a symlink and is + this user's directory and does not let others write to it; this + fends off some symlink attacks. To avoid races, keep the parent + directory open while checking. */ + char *emacsdirend =3D sockname + tmpdirlen + emacsdirlen; + *emacsdirend =3D '\0'; + int dir =3D openat (AT_FDCWD, sockname, + O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); + *emacsdirend =3D '/'; + if (dir < 0) + return errno; + int sock_status =3D connect_socket (dir, server_name, s, uid); + close (dir); + return sock_status; } =20 /* Create a local socket for SERVER_NAME and connect it to Emacs. If @@ -1358,28 +1430,43 @@ local_sockname (char *sockname, int socknamesize, i= nt tmpdirlen, static HSOCKET set_local_socket (char const *server_name) { - union { - struct sockaddr_un un; - struct sockaddr sa; - } server =3D {{ .sun_family =3D AF_UNIX }}; + union local_sockaddr server; + int sock_status; char *sockname =3D server.un.sun_path; - enum { socknamesize =3D sizeof server.un.sun_path }; int tmpdirlen =3D -1; int socknamelen =3D -1; uid_t uid =3D geteuid (); bool tmpdir_used =3D false; + int s =3D cloexec_socket (AF_UNIX, SOCK_STREAM, 0); + if (s < 0) + { + message (true, "%s: can't create socket: %s\n", + progname, strerror (errno)); + fail (); + } =20 if (strchr (server_name, '/') || (ISSLASH ('\\') && strchr (server_name, '\\'))) - socknamelen =3D snprintf (sockname, socknamesize, "%s", server_name); + { + socknamelen =3D snprintf (sockname, socknamesize, "%s", server_name); + sock_status =3D (0 <=3D socknamelen && socknamelen < socknamesize + ? connect_socket (AT_FDCWD, sockname, s, 0) + : ENAMETOOLONG); + } else { /* socket_name is a file name component. */ + sock_status =3D ENOENT; char const *xdg_runtime_dir =3D egetenv ("XDG_RUNTIME_DIR"); if (xdg_runtime_dir) - socknamelen =3D snprintf (sockname, socknamesize, "%s/emacs/%s", - xdg_runtime_dir, server_name); - else + { + socknamelen =3D snprintf (sockname, socknamesize, "%s/emacs/%s", + xdg_runtime_dir, server_name); + sock_status =3D (0 <=3D socknamelen && socknamelen < socknamesize + ? connect_socket (AT_FDCWD, sockname, s, 0) + : ENAMETOOLONG); + } + if (sock_status =3D=3D ENOENT) { char const *tmpdir =3D egetenv ("TMPDIR"); if (tmpdir) @@ -1398,23 +1485,24 @@ set_local_socket (char const *server_name) if (tmpdirlen < 0) tmpdirlen =3D snprintf (sockname, socknamesize, "/tmp"); } - socknamelen =3D local_sockname (sockname, socknamesize, tmpdirlen, + sock_status =3D local_sockname (s, sockname, tmpdirlen, uid, server_name); tmpdir_used =3D true; } } =20 - if (! (0 <=3D socknamelen && socknamelen < socknamesize)) + if (sock_status =3D=3D 0) + return s; + + if (sock_status =3D=3D ENAMETOOLONG) { message (true, "%s: socket-name %s... too long\n", progname, socknam= e); fail (); } =20 - /* See if the socket exists, and if it's owned by us. */ - int sock_status =3D socket_status (sockname, uid); - if (sock_status) + if (tmpdir_used) { - /* Failing that, see if LOGNAME or USER exist and differ from + /* See whether LOGNAME or USER exist and differ from our euid. If so, look for a socket based on the UID associated with the name. This is reminiscent of the logic that init_editfns uses to set the global Vuser_full_name. */ @@ -1431,48 +1519,26 @@ set_local_socket (char const *server_name) if (pw && pw->pw_uid !=3D uid) { /* We're running under su, apparently. */ - socknamelen =3D local_sockname (sockname, socknamesize, tmpdirlen, + sock_status =3D local_sockname (s, sockname, tmpdirlen, pw->pw_uid, server_name); - if (socknamelen < 0) + if (sock_status =3D=3D 0) + return s; + if (sock_status =3D=3D ENAMETOOLONG) { message (true, "%s: socket-name %s... too long\n", progname, sockname); exit (EXIT_FAILURE); } - - sock_status =3D socket_status (sockname, uid); } } } =20 - if (sock_status =3D=3D 0) - { - HSOCKET s =3D cloexec_socket (AF_UNIX, SOCK_STREAM, 0); - if (s < 0) - { - message (true, "%s: socket: %s\n", progname, strerror (errno)); - return INVALID_SOCKET; - } - if (connect (s, &server.sa, sizeof server.un) !=3D 0) - { - message (true, "%s: connect: %s\n", progname, strerror (errno)); - CLOSE_SOCKET (s); - return INVALID_SOCKET; - } - - struct stat connect_stat; - if (fstat (s, &connect_stat) !=3D 0) - sock_status =3D errno; - else if (connect_stat.st_uid =3D=3D uid) - return s; - else - sock_status =3D -1; - - CLOSE_SOCKET (s); - } + close (s); =20 - if (sock_status < 0) - message (true, "%s: Invalid socket owner\n", progname); + if (sock_status =3D=3D -1) + message (true, + "%s: Invalid permissions on parent directory of socket: %s\n", + progname, sockname); else if (sock_status =3D=3D ENOENT) { if (tmpdir_used) @@ -1502,7 +1568,7 @@ set_local_socket (char const *server_name) } } else - message (true, "%s: can't stat %s: %s\n", + message (true, "%s: can't connect to %s: %s\n", progname, sockname, strerror (sock_status)); =20 return INVALID_SOCKET; diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c new file mode 100644 index 0000000000..c667ae9d24 --- /dev/null +++ b/lib/file-has-acl.c @@ -0,0 +1,510 @@ +/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*- + + Copyright (C) 2002-2003, 2005-2020 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + + Written by Paul Eggert, Andreas Gr=C3=BCnbacher, and Bruno Haible. */ + +/* Without this pragma, gcc 4.7.0 20120126 may suggest that the + file_has_acl function might be candidate for attribute 'const' */ +#if (__GNUC__ =3D=3D 4 && 6 <=3D __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=3Dconst" +#endif + +#include + +#include "acl.h" + +#include "acl-internal.h" + +#if GETXATTR_WITH_POSIX_ACLS +# include +# include +#endif + +/* Return 1 if NAME has a nontrivial access control list, + 0 if ACLs are not supported, or if NAME has no or only a base ACL, + and -1 (setting errno) on error. Note callers can determine + if ACLs are not supported as errno is set in that case also. + SB must be set to the stat buffer of NAME, + obtained through stat() or lstat(). */ + +int +file_has_acl (char const *name, struct stat const *sb) +{ +#if USE_ACL + if (! S_ISLNK (sb->st_mode)) + { + +# if GETXATTR_WITH_POSIX_ACLS + + ssize_t ret; + + ret =3D getxattr (name, XATTR_NAME_POSIX_ACL_ACCESS, NULL, 0); + if (ret < 0 && errno =3D=3D ENODATA) + ret =3D 0; + else if (ret > 0) + return 1; + + if (ret =3D=3D 0 && S_ISDIR (sb->st_mode)) + { + ret =3D getxattr (name, XATTR_NAME_POSIX_ACL_DEFAULT, NULL, 0); + if (ret < 0 && errno =3D=3D ENODATA) + ret =3D 0; + else if (ret > 0) + return 1; + } + + if (ret < 0) + return - acl_errno_valid (errno); + return ret; + +# elif HAVE_ACL_GET_FILE + + /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */ + /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >=3D 2.5 */ + int ret; + + if (HAVE_ACL_EXTENDED_FILE) /* Linux */ + { + /* On Linux, acl_extended_file is an optimized function: It only + makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one f= or + ACL_TYPE_DEFAULT. */ + ret =3D acl_extended_file (name); + } + else /* FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >=3D 2.5 */ + { +# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ + /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS) + and acl_get_file (name, ACL_TYPE_DEFAULT) + always return NULL / EINVAL. There is no point in making + these two useless calls. The real ACL is retrieved through + acl_get_file (name, ACL_TYPE_EXTENDED). */ + acl_t acl =3D acl_get_file (name, ACL_TYPE_EXTENDED); + if (acl) + { + ret =3D acl_extended_nontrivial (acl); + acl_free (acl); + } + else + ret =3D -1; +# else /* FreeBSD, IRIX, Tru64, Cygwin >=3D 2.5 */ + acl_t acl =3D acl_get_file (name, ACL_TYPE_ACCESS); + if (acl) + { + int saved_errno; + + ret =3D acl_access_nontrivial (acl); + saved_errno =3D errno; + acl_free (acl); + errno =3D saved_errno; +# if HAVE_ACL_FREE_TEXT /* Tru64 */ + /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always + returns NULL with errno not set. There is no point in + making this call. */ +# else /* FreeBSD, IRIX, Cygwin >=3D 2.5 */ + /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_ACC= ESS) + and acl_get_file (name, ACL_TYPE_DEFAULT) on a directory + either both succeed or both fail; it depends on the + file system. Therefore there is no point in making the s= econd + call if the first one already failed. */ + if (ret =3D=3D 0 && S_ISDIR (sb->st_mode)) + { + acl =3D acl_get_file (name, ACL_TYPE_DEFAULT); + if (acl) + { +# ifdef __CYGWIN__ /* Cygwin >=3D 2.5 */ + ret =3D acl_access_nontrivial (acl); + saved_errno =3D errno; + acl_free (acl); + errno =3D saved_errno; +# else + ret =3D (0 < acl_entries (acl)); + acl_free (acl); +# endif + } + else + ret =3D -1; + } +# endif + } + else + ret =3D -1; +# endif + } + if (ret < 0) + return - acl_errno_valid (errno); + return ret; + +# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX */ + +# if defined ACL_NO_TRIVIAL + + /* Solaris 10 (newer version), which has additional API declared in + (acl_t) and implemented in libsec (acl_set, acl_trivi= al, + acl_fromtext, ...). */ + return acl_trivial (name); + +# else /* Solaris, Cygwin, general case */ + + /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous versi= ons + of Unixware. The acl() call returns the access and default ACL b= oth + at once. */ + { + /* Initially, try to read the entries into a stack-allocated buffe= r. + Use malloc if it does not fit. */ + enum + { + alloc_init =3D 4000 / sizeof (aclent_t), /* >=3D 3 */ + alloc_max =3D MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t)) + }; + aclent_t buf[alloc_init]; + size_t alloc =3D alloc_init; + aclent_t *entries =3D buf; + aclent_t *malloced =3D NULL; + int count; + + for (;;) + { + count =3D acl (name, GETACL, alloc, entries); + if (count < 0 && errno =3D=3D ENOSPC) + { + /* Increase the size of the buffer. */ + free (malloced); + if (alloc > alloc_max / 2) + { + errno =3D ENOMEM; + return -1; + } + alloc =3D 2 * alloc; /* <=3D alloc_max */ + entries =3D malloced =3D + (aclent_t *) malloc (alloc * sizeof (aclent_t)); + if (entries =3D=3D NULL) + { + errno =3D ENOMEM; + return -1; + } + continue; + } + break; + } + if (count < 0) + { + if (errno =3D=3D ENOSYS || errno =3D=3D ENOTSUP) + ; + else + { + int saved_errno =3D errno; + free (malloced); + errno =3D saved_errno; + return -1; + } + } + else if (count =3D=3D 0) + ; + else + { + /* Don't use MIN_ACL_ENTRIES: It's set to 4 on Cygwin, but Cy= gwin + returns only 3 entries for files with no ACL. But this is = safe: + If there are more than 4 entries, there cannot be only the + "user::", "group::", "other:", and "mask:" entries. */ + if (count > 4) + { + free (malloced); + return 1; + } + + if (acl_nontrivial (count, entries)) + { + free (malloced); + return 1; + } + } + free (malloced); + } + +# ifdef ACE_GETACL + /* Solaris also has a different variant of ACLs, used in ZFS and NFS= v4 + file systems (whereas the other ones are used in UFS file systems= ). */ + { + /* Initially, try to read the entries into a stack-allocated buffe= r. + Use malloc if it does not fit. */ + enum + { + alloc_init =3D 4000 / sizeof (ace_t), /* >=3D 3 */ + alloc_max =3D MIN (INT_MAX, SIZE_MAX / sizeof (ace_t)) + }; + ace_t buf[alloc_init]; + size_t alloc =3D alloc_init; + ace_t *entries =3D buf; + ace_t *malloced =3D NULL; + int count; + + for (;;) + { + count =3D acl (name, ACE_GETACL, alloc, entries); + if (count < 0 && errno =3D=3D ENOSPC) + { + /* Increase the size of the buffer. */ + free (malloced); + if (alloc > alloc_max / 2) + { + errno =3D ENOMEM; + return -1; + } + alloc =3D 2 * alloc; /* <=3D alloc_max */ + entries =3D malloced =3D (ace_t *) malloc (alloc * sizeof = (ace_t)); + if (entries =3D=3D NULL) + { + errno =3D ENOMEM; + return -1; + } + continue; + } + break; + } + if (count < 0) + { + if (errno =3D=3D ENOSYS || errno =3D=3D EINVAL) + ; + else + { + int saved_errno =3D errno; + free (malloced); + errno =3D saved_errno; + return -1; + } + } + else if (count =3D=3D 0) + ; + else + { + /* In the old (original Solaris 10) convention: + If there are more than 3 entries, there cannot be only the + ACE_OWNER, ACE_GROUP, ACE_OTHER entries. + In the newer Solaris 10 and Solaris 11 convention: + If there are more than 6 entries, there cannot be only the + ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once with + NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with + NEW_ACE_ACCESS_DENIED_ACE_TYPE. */ + if (count > 6) + { + free (malloced); + return 1; + } + + if (acl_ace_nontrivial (count, entries)) + { + free (malloced); + return 1; + } + } + free (malloced); + } +# endif + + return 0; +# endif + +# elif HAVE_GETACL /* HP-UX */ + + { + struct acl_entry entries[NACLENTRIES]; + int count; + + count =3D getacl (name, NACLENTRIES, entries); + + if (count < 0) + { + /* ENOSYS is seen on newer HP-UX versions. + EOPNOTSUPP is typically seen on NFS mounts. + ENOTSUP was seen on Quantum StorNext file systems (cvfs). = */ + if (errno =3D=3D ENOSYS || errno =3D=3D EOPNOTSUPP || errno = =3D=3D ENOTSUP) + ; + else + return -1; + } + else if (count =3D=3D 0) + return 0; + else /* count > 0 */ + { + if (count > NACLENTRIES) + /* If NACLENTRIES cannot be trusted, use dynamic memory + allocation. */ + abort (); + + /* If there are more than 3 entries, there cannot be only the + (uid,%), (%,gid), (%,%) entries. */ + if (count > 3) + return 1; + + { + struct stat statbuf; + + if (stat (name, &statbuf) < 0) + return -1; + + return acl_nontrivial (count, entries); + } + } + } + +# if HAVE_ACLV_H /* HP-UX >=3D 11.11 */ + + { + struct acl entries[NACLVENTRIES]; + int count; + + count =3D acl ((char *) name, ACL_GET, NACLVENTRIES, entries); + + if (count < 0) + { + /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23. + EINVAL is seen on NFS in HP-UX 11.31. */ + if (errno =3D=3D ENOSYS || errno =3D=3D EOPNOTSUPP || errno = =3D=3D EINVAL) + ; + else + return -1; + } + else if (count =3D=3D 0) + return 0; + else /* count > 0 */ + { + if (count > NACLVENTRIES) + /* If NACLVENTRIES cannot be trusted, use dynamic memory + allocation. */ + abort (); + + /* If there are more than 4 entries, there cannot be only the + four base ACL entries. */ + if (count > 4) + return 1; + + return aclv_nontrivial (count, entries); + } + } + +# endif + +# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */ + + acl_type_t type; + char aclbuf[1024]; + void *acl =3D aclbuf; + size_t aclsize =3D sizeof (aclbuf); + mode_t mode; + + for (;;) + { + /* The docs say that type being 0 is equivalent to ACL_ANY, but = it + is not true, in AIX 5.3. */ + type.u64 =3D ACL_ANY; + if (aclx_get (name, 0, &type, aclbuf, &aclsize, &mode) >=3D 0) + break; + if (errno =3D=3D ENOSYS) + return 0; + if (errno !=3D ENOSPC) + { + if (acl !=3D aclbuf) + { + int saved_errno =3D errno; + free (acl); + errno =3D saved_errno; + } + return -1; + } + aclsize =3D 2 * aclsize; + if (acl !=3D aclbuf) + free (acl); + acl =3D malloc (aclsize); + if (acl =3D=3D NULL) + { + errno =3D ENOMEM; + return -1; + } + } + + if (type.u64 =3D=3D ACL_AIXC) + { + int result =3D acl_nontrivial ((struct acl *) acl); + if (acl !=3D aclbuf) + free (acl); + return result; + } + else if (type.u64 =3D=3D ACL_NFS4) + { + int result =3D acl_nfs4_nontrivial ((nfs4_acl_int_t *) acl); + if (acl !=3D aclbuf) + free (acl); + return result; + } + else + { + /* A newer type of ACL has been introduced in the system. + We should better support it. */ + if (acl !=3D aclbuf) + free (acl); + errno =3D EINVAL; + return -1; + } + +# elif HAVE_STATACL /* older AIX */ + + union { struct acl a; char room[4096]; } u; + + if (statacl ((char *) name, STX_NORMAL, &u.a, sizeof (u)) < 0) + return -1; + + return acl_nontrivial (&u.a); + +# elif HAVE_ACLSORT /* NonStop Kernel */ + + { + struct acl entries[NACLENTRIES]; + int count; + + count =3D acl ((char *) name, ACL_GET, NACLENTRIES, entries); + + if (count < 0) + { + if (errno =3D=3D ENOSYS || errno =3D=3D ENOTSUP) + ; + else + return -1; + } + else if (count =3D=3D 0) + return 0; + else /* count > 0 */ + { + if (count > NACLENTRIES) + /* If NACLENTRIES cannot be trusted, use dynamic memory + allocation. */ + abort (); + + /* If there are more than 4 entries, there cannot be only the + four base ACL entries. */ + if (count > 4) + return 1; + + return acl_nontrivial (count, entries); + } + } + +# endif + } +#endif + + return 0; +} diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 07736f9b8b..0b9aaf6d9e 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -98,6 +98,7 @@ # fcntl \ # fcntl-h \ # fdopendir \ +# file-has-acl \ # filemode \ # filename \ # filevercmp \ @@ -1788,6 +1789,16 @@ EXTRA_libgnu_a_SOURCES +=3D fdopendir.c endif ## end gnulib module fdopendir =20 +## begin gnulib module file-has-acl +ifeq (,$(OMIT_GNULIB_MODULE_file-has-acl)) + +libgnu_a_SOURCES +=3D file-has-acl.c + +EXTRA_DIST +=3D acl-internal.h + +endif +## end gnulib module file-has-acl + ## begin gnulib module filemode ifeq (,$(OMIT_GNULIB_MODULE_filemode)) =20 diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index cd6f7b4bbd..05e7faa993 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -89,6 +89,7 @@ AC_DEFUN # Code from module fcntl: # Code from module fcntl-h: # Code from module fdopendir: + # Code from module file-has-acl: # Code from module filemode: # Code from module filename: # Code from module filevercmp: @@ -287,6 +288,7 @@ AC_DEFUN fi gl_DIRENT_MODULE_INDICATOR([fdopendir]) gl_MODULE_INDICATOR([fdopendir]) + gl_FILE_HAS_ACL gl_FILEMODE AC_C_FLEXIBLE_ARRAY_MEMBER gl_FUNC_FPENDING @@ -1045,6 +1047,7 @@ AC_DEFUN lib/fcntl.c lib/fcntl.in.h lib/fdopendir.c + lib/file-has-acl.c lib/filemode.c lib/filemode.h lib/filename.h --=-=-=-- From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 17:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: teika@gmx.com, eggert@cs.ucla.edu, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162697506011158 (code B ref 33847); Thu, 22 Jul 2021 17:31:01 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Jul 2021 17:31:00 +0000 Received: from localhost ([127.0.0.1]:41559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6cX8-0002to-N3 for submit@debbugs.gnu.org; Thu, 22 Jul 2021 13:31:00 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57958) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6cX3-0002tY-5f for 33847@debbugs.gnu.org; Thu, 22 Jul 2021 13:30:52 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59286) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6cWw-000490-AT; Thu, 22 Jul 2021 13:30:42 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2387 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6cWu-0000SY-N2; Thu, 22 Jul 2021 13:30:42 -0400 Date: Thu, 22 Jul 2021 20:30:20 +0300 Message-Id: <83h7gm2r4j.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <878s1yi8jc.fsf@gnus.org> (message from Lars Ingebrigtsen on Thu, 22 Jul 2021 19:05:11 +0200) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > From: Lars Ingebrigtsen > Cc: eggert@cs.ucla.edu, teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org > Date: Thu, 22 Jul 2021 19:05:11 +0200 > > Eli Zaretskii writes: > > > Looks like you didn't attach the right patch? > > Yup; 2nd attempt now. Thanks. It looks like the w32-related aspect of this is easier to resolve than I originally thought, because almost all of the changes are in the SOCKETS_IN_FILE_SYSTEM part, which is not compiled for the MS-Windows build. The only potential issues I spotted are: > --- a/lib-src/emacsclient.c > +++ b/lib-src/emacsclient.c > @@ -80,6 +80,7 @@ Copyright (C) 1986-1987, 1994, 1999-2021 Free Software Foundation, Inc. > #include > #include > > +#include <<<<<<<<<<<<<<<<<<<<<<<<<<< > #include > #include > #include We cannot unconditionally include acl.h on MS-Windows, so this has to be #ifdef'ed away. > @@ -91,6 +92,10 @@ Copyright (C) 1986-1987, 1994, 1999-2021 Free Software Foundation, Inc. > # pragma GCC diagnostic ignored "-Wformat-truncation=2" > #endif > > +#ifndef O_PATH > +# define O_PATH O_SEARCH <<<<<<<<<<<<<<<<<<<<<<<<< > +#endif This is probably harmless, but I'd like to #ifdef it away as well. > diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in > index 07736f9b8b..0b9aaf6d9e 100644 > --- a/lib/gnulib.mk.in > +++ b/lib/gnulib.mk.in > @@ -98,6 +98,7 @@ > # fcntl \ > # fcntl-h \ > # fdopendir \ > +# file-has-acl \ > # filemode \ > # filename \ > # filevercmp \ > @@ -1788,6 +1789,16 @@ EXTRA_libgnu_a_SOURCES += fdopendir.c > endif > ## end gnulib module fdopendir > > +## begin gnulib module file-has-acl > +ifeq (,$(OMIT_GNULIB_MODULE_file-has-acl)) > + > +libgnu_a_SOURCES += file-has-acl.c > + > +EXTRA_DIST += acl-internal.h > + > +endif > +## end gnulib module file-has-acl > + > ## begin gnulib module filemode > ifeq (,$(OMIT_GNULIB_MODULE_filemode)) > We need to add stuff to nt/gnulib-cfg.mk to omit building the file-has-acl.c file on MS-Windows. (I can do that after the rest is installed.) The only other worry is whether we indeed have ways to test this thoroughly enough on Posix systems. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 22 Jul 2021 18:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33847@debbugs.gnu.org, Lars Ingebrigtsen , eggert@cs.ucla.edu, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162697863016547 (code B ref 33847); Thu, 22 Jul 2021 18:31:01 +0000 Received: (at 33847) by debbugs.gnu.org; 22 Jul 2021 18:30:30 +0000 Received: from localhost ([127.0.0.1]:41587 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6dSo-0004Ip-98 for submit@debbugs.gnu.org; Thu, 22 Jul 2021 14:30:30 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:48184) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6dSl-0004Ia-HR for 33847@debbugs.gnu.org; Thu, 22 Jul 2021 14:30:28 -0400 From: Ulrich Mueller In-Reply-To: <83lf5y2t78.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jul 2021 19:45:31 +0300") References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <9ebcad22-2cdb-46fb-4be9-efc4ad234b6d@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> Date: Thu, 22 Jul 2021 20:30:15 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -5.0 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -6.0 (------) >>>>> On Thu, 22 Jul 2021, Eli Zaretskii wrote: > However, it sounds like Ulrich wasn't happy with this solution back > then, I don't think I said that. I was only surprised that the fix was so complicated. :) > so perhaps we should first see that the problem still exists and that > everyone involved are okay with installing this, modulo minor fixes? The problem still exists in the current master: If the server is started in a non-XDG environment then it will create its socket in /tmp, and an emacsclient started in an XDG environment won't find the socket. In my original report I had suggested: | - Have emacsclient fall back to TMPDIR as well when no socket is found | under XDG_RUNTIME_DIR. I have tested the patch at https://debbugs.gnu.org/cgi/bugreport.cgi?bug=33847;filename=client.patch;att=1;msg=123 and the client falls back to /tmp as it should. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2021 11:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: teika@gmx.com, eggert@cs.ucla.edu, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162703991020845 (code B ref 33847); Fri, 23 Jul 2021 11:32:02 +0000 Received: (at 33847) by debbugs.gnu.org; 23 Jul 2021 11:31:50 +0000 Received: from localhost ([127.0.0.1]:42420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tPB-0005Pu-NG for submit@debbugs.gnu.org; Fri, 23 Jul 2021 07:31:50 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tP8-0005J8-Ea for 33847@debbugs.gnu.org; Fri, 23 Jul 2021 07:31:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=b8UVi9wRRhN2wC9lZ59yMXtyQmVsP20zwLtpQPO4a7U=; b=KXlBhHYIxJj1T82jWT9tXVclnO grdaKchDSeg2+cYnuRR2WVvllzFa8xpKpmKG+rH8kYUa5R4yl0oeGdbn8cbw0GFQ29aczMAgsghW2 k1kESxnJCJauXYiZuxwUyrpwY5CMJl6KdugBuwtuF4VKjeCYf59MAyjvb9X4Xg7yegjI=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6tOy-00070i-1q; Fri, 23 Jul 2021 13:31:38 +0200 From: Lars Ingebrigtsen References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEX7+/vi4d3DwrzO zcuvrqu/v7mPj41gYF9PT08fHyADAwQtLS50c3N/f4D///+/Y3f8AAAAAWJLR0QOb70wTwAAAAd0 SU1FB+UHFwo6Jg+ATfUAAAFVSURBVDjLvZK/S8NAFMffkVC1ONyZULA4VPoP3BFRKA4pVAed/A/s 4hAcBDcnBxejg05KNlGa5rVDB6fg0KFT/wT/Gi+NIdh7GUTwm+Uun/f7HUClBLQsBT7ANpMud8Hl tm+daOBZfXbAfAY7rNWQLjR4zc/sQDFHf11tsfAQG8pRQgnw2h4p+GcxkStPbpSjMsazxv+iXUn/ X7l9osER4mkVuK4AdxMS7M/OaA8b7At6JHtb0/L2PR994rXZ8bsB9HCscHSZ3ojSsgg0T3oQ4tTI sI4o4QofgS+BVUwA5vhgeCzAZwn4DxDgy1ILDDZz8GqEauZgwIjZdlmKb/Q2KBAg+iwiQIiJ1B4D A0SIH+cpjimQaWgsA38LrAIU+ygW44xyYCa/zx2kAdoRJkQKsCYBDnUbfaOq5w7GAdE4HK5h3KGA XmHcJIrKnsm4TgIb43oZ6gv0cocGYVYw+wAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMS0wNy0yM1Qx MDo1ODozOCswMDowMO6R6QgAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjEtMDctMjNUMTA6NTg6Mzgr MDA6MDCfzFG0AAAAAElFTkSuQmCC X-Now-Playing: Jane Siberry's _Jane Siberry_: "This Girl I Know" Date: Fri, 23 Jul 2021 13:31:35 +0200 In-Reply-To: <83h7gm2r4j.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 22 Jul 2021 20:30:20 +0300") Message-ID: <87wnphe06g.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> +#include <<<<<<<<<<<<<<<<<<<<<<<<<<< >> #include >> #include >> #include > > We cannot unconditionally include acl.h on MS-Windows, so this has to > b [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> +#include <<<<<<<<<<<<<<<<<<<<<<<<<<< >> #include >> #include >> #include > > We cannot unconditionally include acl.h on MS-Windows, so this has to > be #ifdef'ed away. >> +#ifndef O_PATH >> +# define O_PATH O_SEARCH <<<<<<<<<<<<<<<<<<<<<<<<< >> +#endif > > This is probably harmless, but I'd like to #ifdef it away as well. OK; I've now adjusted the patch with those two things... > The only other worry is whether we indeed have ways to test this > thoroughly enough on Posix systems. ... and that is indeed the major problem here -- this is an area where it's very difficult to test all the use cases, and Emacs behaves differently here on different systems. I think the only realistic way to get some testing here is to just push it to the trunk and see whether people report issues, unfortunately. (The patch works fine on this Debian system, at least, and Ulrich reports the same, so we have at least two systems it works on. :-)) So I'll push the patch and we'll see whether there's any fall-out... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 23 07:34:16 2021 Received: (at control) by debbugs.gnu.org; 23 Jul 2021 11:34:16 +0000 Received: from localhost ([127.0.0.1]:42428 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tRY-00067g-HI for submit@debbugs.gnu.org; Fri, 23 Jul 2021 07:34:16 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37704) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tRV-00067S-TG for control@debbugs.gnu.org; Fri, 23 Jul 2021 07:34:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fESOlRVXssAH/wgNtsdi8sytXqu+s9/6Qs7YF3g75Mk=; b=MmFAH05iUpepuyoMlv3I/aqJ72 CHni+nJ2HA6ya0akJSMMuRRnTA72JSJE4D1ANoGvMzx7xcfhjbMizSu9DKY8nUkUh7Tv2poR42If+ GXNtwwtVhz3d6lKf+3EfUVNj1GEAN55HdRAjPXPpxX6F9JZxn27N9xWgRHzSluoLaDYE=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6tRO-00072C-A6 for control@debbugs.gnu.org; Fri, 23 Jul 2021 13:34:08 +0200 Date: Fri, 23 Jul 2021 13:34:05 +0200 Message-Id: <87v951e02a.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #33847 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 33847 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 33847 28.1 quit From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2021 11:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: teika@gmx.com, eggert@cs.ucla.edu, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162704032123963 (code B ref 33847); Fri, 23 Jul 2021 11:39:01 +0000 Received: (at 33847) by debbugs.gnu.org; 23 Jul 2021 11:38:41 +0000 Received: from localhost ([127.0.0.1]:42435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tVp-0006ER-0c for submit@debbugs.gnu.org; Fri, 23 Jul 2021 07:38:41 -0400 Received: from quimby.gnus.org ([95.216.78.240]:37832) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tVn-0006EA-96 for 33847@debbugs.gnu.org; Fri, 23 Jul 2021 07:38:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=dvotpcToIj1wIHGBc+QOOG/opaeAHR6hGZnVFOG2wGk=; b=CuDBhoM3fECm9vL9M5zvkV6PVJ rmvIpp8b5EqNc1QFZdG0sXWPXZuOx5ow2Rq9lps5ugjVKGhY7+2kpX00uOVC4kYjxzpmVUm+TzuV3 9Qod4sGu810AYBgGm6SD5O3CDalGTmf1L4tO3wfIuAOsgwjNiACglpmp4LXGFPmodp2k=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m6tVd-00077J-JD; Fri, 23 Jul 2021 13:38:32 +0200 From: Lars Ingebrigtsen References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUEBAYdHSEuLjJM TVGenqGMjJBsbXDPz9H29vfe3uCur7J9foI9PkG9vsH////xnARDAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+UHFwsmBtNbWlcAAAF0SURBVDjLY2AYvIARpwQjKcYgAwGyJbEBJUNknrIijCXsHIokw5Sm IGQA9gxTRWfHLAO4hEqoaXAS0DMCDGwdQJAA996sVVVLk8FMbqB4O1yCraWio8sMbDRIR5cCTEKy q6OjM3UxiGnjVVESJmAMlbCcAVS3dBHYeUbKygoCalCJw2tdOpZsTgIxj3mF27oqmMFcez10erIS 2GTVqBXZSxWSYRIVHe3Tl4HDiHXGVfOpColQCWagxIymA2CXz5i7ogsRjB4dZSsWQRy5ovz6bISE RkfXjIUQZsbMmZMREuydMys3QJi6HZ2BiEBk7pg+BapMZWUxUlQxRnQ0Q1kZQQJC8CBhYAuZCQ04 to6utFREhES2GjFC9Ud0dLbA44Oro6MEFofM7uUIyzk7OqaGJWGJf2AktJc7YEsZmR0drQLYJBjM krGL0wzgzCtMTEpKilglhI2UlbAaJShwEMP1jIpKgkCgqIChXECQgUEQqIeavgEA4i1a2PKvQgUA AAAldEVYdGRhdGU6Y3JlYXRlADIwMjEtMDctMjNUMTE6Mzg6MDYrMDA6MDAFAoZwAAAAJXRFWHRk YXRlOm1vZGlmeQAyMDIxLTA3LTIzVDExOjM4OjA2KzAwOjAwdF8+zAAAAABJRU5ErkJggg== X-Now-Playing: Bill Rieflin & Chris Connelly's _Largo_: "Largo" Date: Fri, 23 Jul 2021 13:38:29 +0200 In-Reply-To: <87wnphe06g.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 23 Jul 2021 13:31:35 +0200") Message-ID: <87r1fpdzuy.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > (The patch works fine on this Debian system, at least, and Ulrich > reports the same, so we have at least two systems it works on. :-)) And I've now tested on Macos, too, and emacsclient still works there. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > (The patch works fine on this Debian system, at least, and Ulrich > reports the same, so we have at least two systems it works on. :-)) And I've now tested on Macos, too, and emacsclient still works there. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2021 11:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: teika@gmx.com, eggert@cs.ucla.edu, 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.16270415251640 (code B ref 33847); Fri, 23 Jul 2021 11:59:01 +0000 Received: (at 33847) by debbugs.gnu.org; 23 Jul 2021 11:58:45 +0000 Received: from localhost ([127.0.0.1]:42461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tpF-0000QN-2A for submit@debbugs.gnu.org; Fri, 23 Jul 2021 07:58:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49902) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6tpB-0000Q9-9D for 33847@debbugs.gnu.org; Fri, 23 Jul 2021 07:58:43 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:47738) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6tp4-0008Ku-Dm; Fri, 23 Jul 2021 07:58:34 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2618 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6tp4-0005zC-1K; Fri, 23 Jul 2021 07:58:34 -0400 Date: Fri, 23 Jul 2021 14:58:17 +0300 Message-Id: <83mtqd1bty.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87wnphe06g.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri, 23 Jul 2021 13:31:35 +0200) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: eggert@cs.ucla.edu, teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org > Date: Fri, 23 Jul 2021 13:31:35 +0200 > > Eli Zaretskii writes: > > > The only other worry is whether we indeed have ways to test this > > thoroughly enough on Posix systems. > > ... and that is indeed the major problem here -- this is an area where > it's very difficult to test all the use cases, and Emacs behaves > differently here on different systems. > > I think the only realistic way to get some testing here is to just push > it to the trunk and see whether people report issues, unfortunately. > (The patch works fine on this Debian system, at least, and Ulrich > reports the same, so we have at least two systems it works on. :-)) > > So I'll push the patch and we'll see whether there's any fall-out... That's fine with me, thanks. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 23 Jul 2021 23:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: teika@gmx.com, Eli Zaretskii , 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162708472832689 (code B ref 33847); Fri, 23 Jul 2021 23:59:02 +0000 Received: (at 33847) by debbugs.gnu.org; 23 Jul 2021 23:58:48 +0000 Received: from localhost ([127.0.0.1]:44934 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7544-0008VB-A5 for submit@debbugs.gnu.org; Fri, 23 Jul 2021 19:58:48 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:53956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7542-0008Uy-8k for 33847@debbugs.gnu.org; Fri, 23 Jul 2021 19:58:47 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3B0DA1600BB; Fri, 23 Jul 2021 16:58:40 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id ash95_cJlwkl; Fri, 23 Jul 2021 16:58:02 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1D6A81600C3; Fri, 23 Jul 2021 16:58:02 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2kGGp2hABD58; Fri, 23 Jul 2021 16:58:01 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id BF1AF1600BB; Fri, 23 Jul 2021 16:58:00 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Fri, 23 Jul 2021 16:58:00 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87r1fpdzuy.fsf@gnus.org> Content-Type: multipart/mixed; boundary="------------1CA4F37942ED9D8B1452A402" Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" This is a multi-part message in MIME format. --------------1CA4F37942ED9D8B1452A402 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On 7/23/21 4:38 AM, Lars Ingebrigtsen wrote: > And I've now tested on Macos, too, and emacsclient still works there. Thanks for reminding me about that old patch. Unfortunately it uses an=20 old version of the Gnulib ACL code, which means it'll miss a fix or two.=20 I suggest the attached patches instead. They update Emacs to use current=20 Gnulib (the first two patches) and then apply the same patch you sent,=20 except with current Gnulib code. The first two patches are something we should be doing anyway, to bring=20 Emacs up-to-date on other Gnulib stuff. One thing worth putting into=20 NEWS is the new --disable-year2038 option to 'configure', which may be=20 useful for the next glibc release (for those people still running Emacs=20 on 32-bit GNU/Linux x86 or ARM). You probably gotta run 'make bootstrap' after installing these patches.=20 Although I fixed the glitches Eli noted, the other Gnulib changes may=20 need further changes to Emacs's Microsoft-related code. --------------1CA4F37942ED9D8B1452A402 Content-Type: text/x-patch; charset=UTF-8; name="0001-Update-from-Gnulib-by-running-admin-merge-gnulib.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-Update-from-Gnulib-by-running-admin-merge-gnulib.patch" =46rom a3e4d801f6f387f44bb5661b2146d30010e36bd6 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 23 Jul 2021 18:49:16 -0500 Subject: [PATCH 1/3] Update from Gnulib by running admin/merge-gnulib --- build-aux/config.guess | 1229 ++++++++++--------- build-aux/config.sub | 68 +- build-aux/gitlog-to-changelog | 5 +- doc/misc/texinfo.tex | 267 ++--- lib/_Noreturn.h | 8 +- lib/alloca.in.h | 20 +- lib/allocator.c | 17 + lib/allocator.h | 14 +- lib/arg-nonnull.h | 8 +- lib/attribute.h | 16 +- lib/binary-io.c | 14 +- lib/binary-io.h | 14 +- lib/byteswap.in.h | 14 +- lib/c++defs.h | 8 +- lib/c-ctype.c | 18 + lib/c-ctype.h | 24 +- lib/c-strcase.h | 16 +- lib/c-strcasecmp.c | 16 +- lib/c-strncasecmp.c | 16 +- lib/canonicalize-lgpl.c | 15 +- lib/careadlinkat.c | 42 +- lib/careadlinkat.h | 14 +- lib/cdefs.h | 38 +- lib/cloexec.c | 18 +- lib/cloexec.h | 18 +- lib/close-stream.h | 18 + lib/copy-file-range.c | 14 +- lib/count-leading-zeros.c | 18 + lib/count-leading-zeros.h | 14 +- lib/count-one-bits.c | 18 + lib/count-one-bits.h | 14 +- lib/count-trailing-zeros.c | 18 + lib/count-trailing-zeros.h | 14 +- lib/dirent.in.h | 14 +- lib/dirfd.c | 14 +- lib/dtoastr.c | 17 + lib/dup2.c | 14 +- lib/dynarray.h | 273 ++++- lib/eloop-threshold.h | 8 +- lib/errno.in.h | 16 +- lib/euidaccess.c | 14 +- lib/execinfo.c | 18 + lib/execinfo.in.h | 8 +- lib/explicit_bzero.c | 8 +- lib/fcntl.c | 14 +- lib/fcntl.in.h | 14 +- lib/filename.h | 8 +- lib/filevercmp.c | 16 +- lib/filevercmp.h | 16 +- lib/flexmember.h | 8 +- lib/free.c | 30 +- lib/fsusage.c | 14 +- lib/fsusage.h | 14 +- lib/fsync.c | 16 +- lib/futimens.c | 14 +- lib/getdtablesize.c | 14 +- lib/getgroups.c | 20 +- lib/getopt-cdefs.in.h | 21 +- lib/getopt-core.h | 8 +- lib/getopt-ext.h | 8 +- lib/getopt-pfx-core.h | 21 +- lib/getopt-pfx-ext.h | 21 +- lib/getopt.c | 8 +- lib/getopt.in.h | 24 +- lib/getopt1.c | 8 +- lib/getopt_int.h | 8 +- lib/getrandom.c | 20 +- lib/gettext.h | 16 +- lib/gettime.c | 14 +- lib/gettimeofday.c | 16 +- lib/gnulib.mk.in | 1260 +++++++++++--------- lib/group-member.c | 22 +- lib/idx.h | 8 +- lib/ieee754.in.h | 8 +- lib/ignore-value.h | 14 +- lib/intprops.h | 26 +- lib/inttypes.in.h | 14 +- lib/libc-config.h | 31 +- lib/limits.in.h | 16 +- lib/lstat.c | 14 +- lib/malloc/dynarray-skeleton.c | 41 +- lib/malloc/dynarray.h | 8 +- lib/malloc/dynarray_at_failure.c | 12 +- lib/malloc/dynarray_emplace_enlarge.c | 12 +- lib/malloc/dynarray_finalize.c | 12 +- lib/malloc/dynarray_resize.c | 12 +- lib/malloc/dynarray_resize_clear.c | 12 +- lib/malloc/scratch_buffer.h | 8 +- lib/malloc/scratch_buffer_dupfree.c | 8 +- lib/malloc/scratch_buffer_grow.c | 8 +- lib/malloc/scratch_buffer_grow_preserve.c | 8 +- lib/malloc/scratch_buffer_set_array_size.c | 8 +- lib/md5.c | 16 +- lib/md5.h | 16 +- lib/memmem.c | 16 +- lib/mempcpy.c | 21 +- lib/memrchr.c | 14 +- lib/mini-gmp-gnulib.c | 28 +- lib/mini-gmp.c | 8 +- lib/mini-gmp.h | 9 +- lib/minmax.h | 16 +- lib/mkostemp.c | 14 +- lib/mktime-internal.h | 8 +- lib/mktime.c | 8 +- lib/nstrftime.c | 19 +- lib/open.c | 14 +- lib/pathmax.h | 16 +- lib/pipe2.c | 18 +- lib/pselect.c | 16 +- lib/pthread_sigmask.c | 14 +- lib/rawmemchr.c | 19 +- lib/rawmemchr.valgrind | 14 +- lib/readlink.c | 14 +- lib/realloc.c | 63 + lib/regcomp.c | 16 +- lib/regex.c | 8 +- lib/regex.h | 8 +- lib/regex_internal.c | 9 +- lib/regex_internal.h | 17 +- lib/regexec.c | 105 +- lib/root-uid.h | 18 +- lib/scratch_buffer.h | 115 +- lib/sha1.c | 16 +- lib/sha1.h | 16 +- lib/sha256.c | 14 +- lib/sha256.h | 14 +- lib/sha512.c | 14 +- lib/sha512.h | 14 +- lib/sigdescr_np.c | 14 +- lib/signal.in.h | 14 +- lib/stat-time.c | 18 + lib/stat-time.h | 14 +- lib/stdalign.in.h | 29 +- lib/stddef.in.h | 27 +- lib/stdint.in.h | 20 +- lib/stdio-impl.h | 14 +- lib/stdio.in.h | 24 +- lib/stdlib.in.h | 146 ++- lib/stpcpy.c | 14 +- lib/str-two-way.h | 16 +- lib/strftime.h | 14 +- lib/string.in.h | 18 +- lib/strnlen.c | 16 +- lib/strtoimax.c | 14 +- lib/strtol.c | 55 +- lib/strtoll.c | 14 +- lib/symlink.c | 14 +- lib/sys_random.in.h | 16 +- lib/sys_select.in.h | 16 +- lib/sys_stat.in.h | 16 +- lib/sys_time.in.h | 16 +- lib/sys_types.in.h | 16 +- lib/tempname.c | 8 +- lib/tempname.h | 14 +- lib/time-internal.h | 16 +- lib/time.in.h | 58 +- lib/time_r.c | 16 +- lib/time_rz.c | 16 +- lib/timegm.c | 8 +- lib/timespec.c | 18 + lib/timespec.h | 14 +- lib/u64.c | 18 + lib/u64.h | 14 +- lib/unistd.c | 18 + lib/unistd.in.h | 29 +- lib/unlocked-io.h | 26 +- lib/utimens.c | 20 +- lib/utimens.h | 14 +- lib/verify.h | 14 +- lib/warn-on-use.h | 8 +- lib/xalloc-oversized.h | 53 +- m4/dirent_h.m4 | 45 +- m4/environ.m4 | 5 +- m4/explicit_bzero.m4 | 2 +- m4/fcntl_h.m4 | 39 +- m4/free.m4 | 7 +- m4/gettimeofday.m4 | 6 +- m4/gnulib-common.m4 | 84 +- m4/gnulib-comp.m4 | 132 +- m4/inttypes.m4 | 31 +- m4/largefile.m4 | 28 +- m4/malloc.m4 | 174 +++ m4/memmem.m4 | 5 +- m4/mempcpy.m4 | 4 +- m4/memrchr.m4 | 4 +- m4/mktime.m4 | 4 +- m4/pselect.m4 | 4 +- m4/pthread_sigmask.m4 | 10 +- m4/rawmemchr.m4 | 4 +- m4/realloc.m4 | 63 + m4/regex.m4 | 44 +- m4/sigdescr_np.m4 | 4 +- m4/signal_h.m4 | 33 +- m4/stdalign.m4 | 4 +- m4/stddef_h.m4 | 23 +- m4/stdint.m4 | 6 +- m4/stdio_h.m4 | 168 ++- m4/stdlib_h.m4 | 122 +- m4/stpcpy.m4 | 4 +- m4/string_h.m4 | 124 +- m4/strnlen.m4 | 4 +- m4/strtoll.m4 | 36 +- m4/sys_random_h.m4 | 25 +- m4/sys_select_h.m4 | 29 +- m4/sys_socket_h.m4 | 53 +- m4/sys_stat_h.m4 | 65 +- m4/sys_time_h.m4 | 34 +- m4/sys_types_h.m4 | 16 +- m4/time_h.m4 | 62 +- m4/time_r.m4 | 2 +- m4/time_rz.m4 | 2 +- m4/timegm.m4 | 4 +- m4/unistd_h.m4 | 194 +-- m4/unlocked-io.m4 | 7 +- m4/year2038.m4 | 112 ++ 215 files changed, 4846 insertions(+), 3126 deletions(-) create mode 100644 lib/realloc.c create mode 100644 m4/malloc.m4 create mode 100644 m4/realloc.m4 create mode 100644 m4/year2038.m4 diff --git a/build-aux/config.guess b/build-aux/config.guess index f7727026b7..e81d3ae7c2 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,9 @@ # Attempt to guess a canonical system name. # Copyright 1992-2021 Free Software Foundation, Inc. =20 -timestamp=3D'2021-01-01' +# shellcheck disable=3DSC2006,SC2268 # see below for rationale + +timestamp=3D'2021-06-03' =20 # 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 @@ -32,7 +34,15 @@ timestamp=3D # Please send patches to . =20 =20 -me=3D$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide= +# variety of pre-POSIX systems that do not have POSIX shells at all, and= +# even some reasonably current systems (Solaris 10 as case-in-point) sti= ll +# have a pre-POSIX /bin/sh. + + +me=3D`echo "$0" | sed -e 's,.*/,,'` =20 usage=3D"\ Usage: $0 [OPTION] @@ -84,6 +94,9 @@ help=3D exit 1 fi =20 +# Just in case it came from the environment. +GUESS=3D + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -102,8 +115,8 @@ set_cc_for_build() # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=3D/tmp}" - # shellcheck disable=3DSC2039 - { tmp=3D$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) = && test -n "$tmp" && test -d "$tmp" ; } || + # shellcheck disable=3DSC2039,SC3028 + { tmp=3D`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` &&= test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=3D$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdi= r "$tmp" 2>/dev/null) ; } || { tmp=3D$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && ech= o "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit= 1 ; } @@ -112,7 +125,7 @@ set_cc_for_build() ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD=3D"$driver" + CC_FOR_BUILD=3D$driver break fi done @@ -131,12 +144,12 @@ set_cc_for_build() PATH=3D$PATH:/.attbin ; export PATH fi =20 -UNAME_MACHINE=3D$( (uname -m) 2>/dev/null) || UNAME_MACHINE=3Dunknown -UNAME_RELEASE=3D$( (uname -r) 2>/dev/null) || UNAME_RELEASE=3Dunknown -UNAME_SYSTEM=3D$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=3Dunknown -UNAME_VERSION=3D$( (uname -v) 2>/dev/null) || UNAME_VERSION=3Dunknown +UNAME_MACHINE=3D`(uname -m) 2>/dev/null` || UNAME_MACHINE=3Dunknown +UNAME_RELEASE=3D`(uname -r) 2>/dev/null` || UNAME_RELEASE=3Dunknown +UNAME_SYSTEM=3D`(uname -s) 2>/dev/null` || UNAME_SYSTEM=3Dunknown +UNAME_VERSION=3D`(uname -v) 2>/dev/null` || UNAME_VERSION=3Dunknown =20 -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=3Dunknown =20 @@ -157,7 +170,8 @@ UNAME_VERSION=3D #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's= , ,,g')" + cc_set_libc=3D`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' |= sed 's, ,,g'` + eval "$cc_set_libc" =20 # Second heuristic to detect musl libc. if [ "$LIBC" =3D unknown ] && @@ -176,7 +190,7 @@ UNAME_VERSION=3D =20 # Note: order is significant - the case branches are not exclusive. =20 -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -188,12 +202,11 @@ UNAME_VERSION=3D # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl=3D"sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=3D$( (uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)) - case "$UNAME_MACHINE_ARCH" in + UNAME_MACHINE_ARCH=3D`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in aarch64eb) machine=3Daarch64_be-unknown ;; armeb) machine=3Darmeb-unknown ;; arm*) machine=3Darm-unknown ;; @@ -201,15 +214,15 @@ UNAME_VERSION=3D sh3eb) machine=3Dsh-unknown ;; sh5el) machine=3Dsh5le-unknown ;; earmv*) - arch=3D$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,= ') - endian=3D$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') - machine=3D"${arch}${endian}"-unknown + arch=3D`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'= ` + endian=3D`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=3D${arch}${endian}-unknown ;; - *) machine=3D"$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=3D$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=3Dnetbsdelf ;; @@ -230,10 +243,10 @@ UNAME_VERSION=3D ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr=3D's/^earmv[0-9]/-eabi/;s/eb$//' - abi=3D$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + abi=3D`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -241,76 +254,82 @@ UNAME_VERSION=3D # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release=3D'-gnu' ;; *) - release=3D$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,= 2) + release=3D`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2= ` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=3D$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=3D$(arch | sed 's/Bitrig.//') - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=3D`arch | sed 's/Bitrig.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=3D$(arch | sed 's/OpenBSD.//') - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=3D`arch | sed 's/OpenBSD.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=3D`arch | sed 's/SecBSD.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=3D$(arch | sed 's/^.*BSD\.//') - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=3D`arch | sed 's/^.*BSD\.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=3Dmips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=3D$(/usr/sbin/sizer -v | awk '{print $3}') + UNAME_RELEASE=3D`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=3D$(/usr/sbin/sizer -v | awk '{print $4}') + UNAME_RELEASE=3D`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=3D$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.= *\) processor.*$/\1/p' | head -n 1) - case "$ALPHA_CPU_TYPE" in + ALPHA_CPU_TYPE=3D`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*= \) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=3Dalpha ;; "EV4.5 (21064)") @@ -347,68 +366,69 @@ UNAME_VERSION=3D # A Tn.n version is a released field test version. # 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/^[PVT= X]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=3D$? - trap '' 0 - exit $exitcode ;; + OSF_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJ= KLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=3D$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=3Dm68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=3Di370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=3Ds390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=3Dpowerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=3Darm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=3Darm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=3Dhppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "$( (/bin/universe) 2>/dev/null)" =3D att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=3Dpyramid-pyramid-sysv3 ;; + *) GUESS=3Dpyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=3Dpyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=3Dsparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case $(/usr/bin/uname -p) in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + case `/usr/bin/uname -p` in + sparc) GUESS=3Dsparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/= [^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3D$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dsparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dsparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=3Di386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=3Di386 @@ -423,41 +443,44 @@ UNAME_VERSION=3D SUN_ARCH=3Dx86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'= )" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3D$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dsparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "$(/usr/bin/arch -k)" in + case `/usr/bin/arch -k` in Series*|S4*) - UNAME_RELEASE=3D$(uname -v) + UNAME_RELEASE=3D`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=3Dsparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=3D$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>= /dev/null) + UNAME_RELEASE=3D`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/d= ev/null` test "x$UNAME_RELEASE" =3D x && UNAME_RELEASE=3D3 - case "$(/bin/arch)" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=3Dm68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=3Dsparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=3Dsparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -467,41 +490,41 @@ UNAME_VERSION=3D # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=3Dmips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=3Dvax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=3Dclipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -526,78 +549,79 @@ UNAME_VERSION=3D } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=3D$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') &&= - SYSTEM_NAME=3D$("$dummy" "$dummyarg") && + dummyarg=3D`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=3D`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=3Dpowerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=3Dpowerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=3Dpowerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=3Dpowerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=3Dm88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=3Dm88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=3Dm88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=3D$(/usr/bin/uname -p) + UNAME_PROCESSOR=3D`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" =3D mc88100 || test "$UNAME_PROCESSOR" =3D m= c88110 then if test "$TARGET_BINARY_INTERFACE"x =3D m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x =3D x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=3Dm88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=3Dm88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=3Di586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=3Dm88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=3Dm88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=3Dm88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)= - echo m68k-tektronix-bsd - exit ;; + GUESS=3Dm68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" - exit ;; + IRIX_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=3Dmips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' + GUESS=3Dromp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=3Di386-ibm-aix + ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=3D$(/usr/bin/oslevel) + IBM_REV=3D`/usr/bin/oslevel` else - IBM_REV=3D"$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=3D$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=3D$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -612,68 +636,68 @@ main() exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D$("$dummy") + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=3D$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=3Drs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=3Drs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=3Drs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) - IBM_CPU_ID=3D$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | = awk '{ print $1 }') + IBM_CPU_ID=3D`/usr/sbin/lsdev -C -c processor -S available | sed 1q | a= wk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; = then IBM_ARCH=3Drs6000 else IBM_ARCH=3Dpowerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=3D$(/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + IBM_REV=3D`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=3D"$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=3D$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=3D$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=3Drs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=3Dromp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=3Dromp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=3Drs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=3Dm68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=3Dm68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=3Dm68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=3D$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - case "$UNAME_MACHINE" in + HPUX_REV=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=3Dm68000 ;; 9000/[34]??) HP_ARCH=3Dm68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then - sc_cpu_version=3D$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) - sc_kernel_bits=3D$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) - case "$sc_cpu_version" in + sc_cpu_version=3D`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=3D`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in 523) HP_ARCH=3Dhppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=3Dhppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=3Dhppa2.0n ;; 64) HP_ARCH=3Dhppa2.0w ;; '') HP_ARCH=3Dhppa2.0 ;; # HP-UX 10.20 @@ -715,7 +739,7 @@ main() exit (0); } EOF - (CCOPTS=3D"" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && = HP_ARCH=3D$("$dummy") + (CCOPTS=3D"" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && = HP_ARCH=3D`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=3Dhppa fi ;; esac @@ -740,12 +764,12 @@ main() HP_ARCH=3Dhppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=3D$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=3D$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=3Dia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -773,38 +797,38 @@ main () exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D$("$dummy") && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=3Dunknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=3Dhppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=3Dhppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=3Dhppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=3Dhppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=3Dhppa1.0-hp-osf + ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + GUESS=3D$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=3D$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=3Dhppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=3Dc1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -812,17 +836,18 @@ main () fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=3Dc34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=3Dc38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=3Dc4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -830,114 +855,126 @@ main () -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dt90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dalphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dsv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dcraynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=3D$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklm= nopqrstuvwxyz) - FUJITSU_SYS=3D$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmn= opqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=3D$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=3D`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmn= opqrstuvwxyz` + FUJITSU_SYS=3D`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmno= pqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=3D${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=3D$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmn= opqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=3D$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ a= bcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=3D`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmno= pqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=3D`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ ab= cdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=3Dsparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=3Dsparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=3D$(uname -p) + UNAME_PROCESSOR=3D`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|s= ed -e 's/[-(].*//')"-gnueabi + FREEBSD_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|s= ed -e 's/[-(].*//')"-gnueabihf + FREEBSD_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=3D$(/usr/bin/uname -p) - case "$UNAME_PROCESSOR" in + UNAME_PROCESSOR=3D`/usr/bin/uname -p` + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=3Dx86_64 ;; i386) UNAME_PROCESSOR=3Di586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e = 's/[-(].*//')" - exit ;; + FREEBSD_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=3D$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=3D$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=3D$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=3D$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=3D$UNAME_MACHINE-pc-pw32 + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=3Di586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=3Dx86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=3Dia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=3D$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=3Dx86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*= //')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dpowerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo= "$UNAME_RELEASE"|sed -e 's,/.*$,,')" - exit ;; + GNU_ARCH=3D`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=3D`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=3D$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,'= | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'= )-$LIBC" - exit ;; + GNU_SYS=3D`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[= :lower:]"` + GNU_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=3Daarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/nul= l) in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null= ` in EV5) UNAME_MACHINE=3Dalphaev5 ;; EV56) UNAME_MACHINE=3Dalphaev56 ;; PCA56) UNAME_MACHINE=3Dalphapca56 ;; @@ -948,63 +985,63 @@ main () esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" =3D 0 ; then LIBC=3Dgnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)= + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=3D$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=3D$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*= :*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=3D0 @@ -1049,65 +1086,66 @@ main () #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_END= IAN\|^LIBCABI')" + cc_set_vars=3D`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^M= IPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" !=3D x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCAB= I"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dor1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dsparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dhppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) i= n - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in= + PA7*) GUESS=3Dhppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=3Dhppa2.0-unknown-linux-$LIBC ;; + *) GUESS=3Dhppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpcle-unknown-linux-$LIBC + ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv6= 4be:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=3D$LIBC @@ -1116,71 +1154,71 @@ main () (CCOPTS=3D"" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then - LIBCABI=3D"$LIBC"x32 + LIBCABI=3D${LIBC}x32 fi fi - echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=3Di386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=3D$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=3D$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Di386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=3D$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) - UNAME_REL=3D$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + UNAME_REL=3D`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=3D$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=3D$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case $(/bin/uname -X | grep "^Machine") in + case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=3Di486 ;; *Pentium) UNAME_MACHINE=3Di586 ;; *Pent*|*Celeron) UNAME_MACHINE=3Di686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME= _VERSION}" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNA= ME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=3D$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=3D$( (/bin/uname -X|grep Release|sed -e 's/.*=3D //')) + UNAME_REL=3D`(/bin/uname -X|grep Release|sed -e 's/.*=3D //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=3Di486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=3Di586 @@ -1188,11 +1226,11 @@ main () && UNAME_MACHINE=3Di686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=3Di686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=3D$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=3D$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1200,37 +1238,37 @@ main () # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=3Di586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=3Di386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=3Di860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=3Di860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SV= R4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=3Di860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=3Dm68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=3Dm68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=3Dm68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34= ]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS= 2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL=3D'' test -r /etc/.relid \ - && OS_REL=3D.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.rel= id) + && OS_REL=3D.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.reli= d` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1241,7 +1279,7 @@ main () NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL=3D'.3' test -r /etc/.relid \ - && OS_REL=3D.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/= =2Erelid) + && OS_REL=3D.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.= relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1249,118 +1287,118 @@ main () /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=3Dm68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Dsparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Drs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[= 02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=3Dmips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=3Dmips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=3D$( (uname -p) 2>/dev/null) - echo "$UNAME_MACHINE"-sni-sysv4 + UNAME_MACHINE=3D`(uname -p) 2>/dev/null` + GUESS=3D$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=3Dns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=3Di586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=3Dhppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=3Di860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=3D$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=3Dhppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=3Dmips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then - echo mips-nec-sysv"$UNAME_RELEASE" + GUESS=3Dmips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=3Dmips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=3Dpowerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=3Dpowerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=3Di586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=3Di586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=3Dx86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; arm64:Darwin:*:*) - echo aarch64-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=3Daarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=3D$(uname -p) + UNAME_PROCESSOR=3D`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=3Dpowerpc ;; esac @@ -1394,109 +1432,116 @@ main () # uname -m returns i386 or x86_64 UNAME_PROCESSOR=3D$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=3D$(uname -p) + UNAME_PROCESSOR=3D`uname -p` if test "$UNAME_PROCESSOR" =3D x86; then UNAME_PROCESSOR=3Di386 UNAME_MACHINE=3Dpc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=3Di386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dneo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=3Dmips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=3Dbs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=3DSC2154 - if test "$cputype" =3D 386; then + if test "${cputype-}" =3D 386; then UNAME_MACHINE=3Di386 - else - UNAME_MACHINE=3D"$cputype" + elif test "x${cputype-}" !=3D x; then + UNAME_MACHINE=3D$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=3Dpdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=3Dpdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=3Dpdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=3Dpdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=3Dpdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=3Dpdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e = 's/[-(].*//')" - exit ;; + DRAGONFLY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) - UNAME_MACHINE=3D$( (uname -p) 2>/dev/null) - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + UNAME_MACHINE=3D`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=3Dalpha-dec-vms ;; + I*) GUESS=3Dia64-dec-vms ;; + V*) GUESS=3Dvax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=3Di386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$= //')" - exit ;; + SKYOS_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=3D$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=3D$UNAME_MACHINE-pc-rdos + ;; + *:AROS:*:*) + GUESS=3D$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=3Dx86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac =20 +# Do we have a guess based on uname results? +if test "x$GUESS" !=3D x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" </= dev/null); + version=3D`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/de= v/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1628,7 +1673,7 @@ main () } EOF =20 -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=3D$($dum= my) && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=3D`"$dum= my"` && { echo "$SYSTEM_NAME"; exit; } =20 # Apollos put the system type in the environment. @@ -1636,7 +1681,7 @@ main () =20 echo "$0: unable to guess system type" >&2 =20 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 </dev/null || echo unknown) -uname -r =3D $( (uname -r) 2>/dev/null || echo unknown) -uname -s =3D $( (uname -s) 2>/dev/null || echo unknown) -uname -v =3D $( (uname -v) 2>/dev/null || echo unknown) +uname -m =3D `(uname -m) 2>/dev/null || echo unknown` +uname -r =3D `(uname -r) 2>/dev/null || echo unknown` +uname -s =3D `(uname -s) 2>/dev/null || echo unknown` +uname -v =3D `(uname -v) 2>/dev/null || echo unknown` =20 -/usr/bin/uname -p =3D $( (/usr/bin/uname -p) 2>/dev/null) -/bin/uname -X =3D $( (/bin/uname -X) 2>/dev/null) +/usr/bin/uname -p =3D `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X =3D `(/bin/uname -X) 2>/dev/null` =20 -hostinfo =3D $( (hostinfo) 2>/dev/null) -/bin/universe =3D $( (/bin/universe) 2>/dev/null) -/usr/bin/arch -k =3D $( (/usr/bin/arch -k) 2>/dev/null) -/bin/arch =3D $( (/bin/arch) 2>/dev/null) -/usr/bin/oslevel =3D $( (/usr/bin/oslevel) 2>/dev/null) -/usr/convex/getsysinfo =3D $( (/usr/convex/getsysinfo) 2>/dev/null) +hostinfo =3D `(hostinfo) 2>/dev/null` +/bin/universe =3D `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k =3D `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch =3D `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel =3D `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo =3D `(/usr/convex/getsysinfo) 2>/dev/null` =20 UNAME_MACHINE =3D "$UNAME_MACHINE" UNAME_RELEASE =3D "$UNAME_RELEASE" diff --git a/build-aux/config.sub b/build-aux/config.sub index b0f8492348..d80c5d759e 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,9 @@ # Configuration validation subroutine script. # Copyright 1992-2021 Free Software Foundation, Inc. =20 -timestamp=3D'2021-01-07' +# shellcheck disable=3DSC2006,SC2268 # see below for rationale + +timestamp=3D'2021-07-03' =20 # 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 @@ -50,7 +52,14 @@ timestamp=3D # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. =20 -me=3D$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide= +# variety of pre-POSIX systems that do not have POSIX shells at all, and= +# even some reasonably current systems (Solaris 10 as case-in-point) sti= ll +# have a pre-POSIX /bin/sh. + +me=3D`echo "$0" | sed -e 's,.*/,,'` =20 usage=3D"\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -769,22 +778,22 @@ IFS=3D vendor=3Dhp ;; i*86v32) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsysv32 ;; i*86v4*) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsysv4 ;; i*86v) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsysv ;; i*86sol2) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsolaris2 ;; @@ -917,7 +926,7 @@ IFS=3D ;; leon-*|leon[3-9]-*) cpu=3Dsparc - vendor=3D$(echo "$basic_machine" | sed 's/-.*//') + vendor=3D`echo "$basic_machine" | sed 's/-.*//'` ;; =20 *-*) @@ -1084,7 +1093,7 @@ IFS=3D cpu=3Dmipsisa64sb1el ;; sh5e[lb]-*) - cpu=3D$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/') + cpu=3D`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` ;; spur-*) cpu=3Dspur @@ -1102,7 +1111,7 @@ IFS=3D cpu=3Dx86_64 ;; xscale-* | xscalee[bl]-*) - cpu=3D$(echo "$cpu" | sed 's/^xscale/arm/') + cpu=3D`echo "$cpu" | sed 's/^xscale/arm/'` ;; arm64-*) cpu=3Daarch64 @@ -1165,7 +1174,7 @@ IFS=3D | alphapca5[67] | alpha64pca5[67] \ | am33_2.0 \ | amdgcn \ - | arc | arceb \ + | arc | arceb | arc32 | arc64 \ | arm | arm[lb]e | arme[lb] | armv* \ | avr | avr32 \ | asmjs \ @@ -1204,9 +1213,13 @@ IFS=3D | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ @@ -1288,15 +1301,15 @@ IFS=3D case $basic_os in gnu/linux*) kernel=3Dlinux - os=3D$(echo $basic_os | sed -e 's|gnu/linux|gnu|') + os=3D`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=3Dos2 - os=3D$(echo $basic_os | sed -e 's|os2-emx|emx|') + os=3D`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=3Dnto - os=3D$(echo $basic_os | sed -e 's|nto-qnx|qnx|') + os=3D`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=3DSC2162 @@ -1307,11 +1320,11 @@ IFS=3D # Default OS when just kernel was specified nto*) kernel=3Dnto - os=3D$(echo $basic_os | sed -e 's|nto|qnx|') + os=3D`echo "$basic_os" | sed -e 's|nto|qnx|'` ;; linux*) kernel=3Dlinux - os=3D$(echo $basic_os | sed -e 's|linux|gnu|') + os=3D`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; *) kernel=3D @@ -1332,7 +1345,7 @@ IFS=3D os=3Dcnk ;; solaris1 | solaris1.*) - os=3D$(echo $os | sed -e 's|solaris1|sunos4|') + os=3D`echo "$os" | sed -e 's|solaris1|sunos4|'` ;; solaris) os=3Dsolaris2 @@ -1361,7 +1374,7 @@ IFS=3D os=3Dsco3.2v4 ;; sco3.2.[4-9]*) - os=3D$(echo $os | sed -e 's/sco3.2./sco3.2v/') + os=3D`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` ;; sco*v* | scout) # Don't match below @@ -1391,7 +1404,7 @@ IFS=3D os=3Dlynxos ;; mac[0-9]*) - os=3D$(echo "$os" | sed -e 's|mac|macos|') + os=3D`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) os=3Dopenedition @@ -1400,10 +1413,10 @@ IFS=3D os=3Dos400 ;; sunos5*) - os=3D$(echo "$os" | sed -e 's|sunos5|solaris2|') + os=3D`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; sunos6*) - os=3D$(echo "$os" | sed -e 's|sunos6|solaris3|') + os=3D`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; wince*) os=3Dwince @@ -1437,7 +1450,7 @@ IFS=3D ;; # Preserve the version number of sinix5. sinix5.*) - os=3D$(echo $os | sed -e 's|sinix|sysv|') + os=3D`echo "$os" | sed -e 's|sinix|sysv|'` ;; sinix*) os=3Dsysv4 @@ -1683,12 +1696,15 @@ kernel=3D =20 # Now, validate our (potentially fixed-up) OS. case $os in - # Sometimes we do "kernel-abi", so those need to count as OSes. + # Sometimes we do "kernel-libc", so those need to count as OSes. musl* | newlib* | uclibc*) ;; - # Likewise for "kernel-libc" + # Likewise for "kernel-abi" eabi* | gnueabi*) ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1704,12 +1720,12 @@ kernel=3D | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | mirbsd* | netbsd* | dicos* | openedition* | ose* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* = \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ @@ -1751,6 +1767,8 @@ kernel=3D ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; nto-qnx*) ;; os2-emx) diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelo= g index de76f658d4..9ff15f6019 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -35,7 +35,7 @@ eval 'exec perl -wSx "$0" "$@"' if 0; =20 -my $VERSION =3D '2020-04-04 15:07'; # UTC +my $VERSION =3D '2021-02-24 23:42'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -455,7 +455,8 @@ sub git_dir_option($) # If there were any lines if (@line =3D=3D 0) { - warn "$ME: warning: empty commit message:\n $date_line\n"= ; + warn "$ME: warning: empty commit message:\n" + . " commit $sha\n $date_line\n"; } else { diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index a91181b116..e48383defc 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,9 +3,9 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2020-11-25.18} +\def\texinfoversion{2021-04-25.21} % -% Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990-2021 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or= % modify it under the terms of the GNU General Public License as @@ -574,7 +574,7 @@ =20 =20 % @end foo calls \checkenv and executes the definition of \Efoo. -\parseargdef\end{ +\parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. @@ -1002,6 +1002,14 @@ \global\everypar =3D {}% } =20 +% leave vertical mode without cancelling any first paragraph indent +\gdef\imageindent{% + \toks0=3D\everypar + \everypar=3D{}% + \ptexnoindent + \global\everypar=3D\toks0 +} + =20 % @refill is a no-op. \let\refill=3D\relax @@ -1181,7 +1189,7 @@ % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % -% See https://mailman.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html = and +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to @@ -1862,19 +1870,23 @@ \closein 1 \endgroup % - \def\xetexpdfext{pdf}% - \ifx\xeteximgext\xetexpdfext - \XeTeXpdffile "#1".\xeteximgext "" - \else - \def\xetexpdfext{PDF}% + % Putting an \hbox around the image can prevent an over-long line + % after the image. + \hbox\bgroup + \def\xetexpdfext{pdf}% \ifx\xeteximgext\xetexpdfext \XeTeXpdffile "#1".\xeteximgext "" \else - \XeTeXpicfile "#1".\xeteximgext "" + \def\xetexpdfext{PDF}% + \ifx\xeteximgext\xetexpdfext + \XeTeXpdffile "#1".\xeteximgext "" + \else + \XeTeXpicfile "#1".\xeteximgext "" + \fi \fi - \fi - \ifdim \wd0 >0pt width \xeteximagewidth \fi - \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + \ifdim \wd0 >0pt width \xeteximagewidth \fi + \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + \egroup } \fi =20 @@ -3539,7 +3551,7 @@ % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need).= -% It is available from https://www.ctan.org/tex-archive/fonts/eurosym. +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular @@ -4289,82 +4301,8 @@ \doitemize{#1.}\flushcr } =20 -% @alphaenumerate and @capsenumerate are abbreviations for giving an arg= -% to @enumerate. -% -\def\alphaenumerate{\enumerate{a}} -\def\capsenumerate{\enumerate{A}} -\def\Ealphaenumerate{\Eenumerate} -\def\Ecapsenumerate{\Eenumerate} - =20 % @multitable macros -% Amy Hendrickson, 8/18/94, 3/6/96 -% -% @multitable ... @end multitable will make as many columns as desired. -% Contents of each column will wrap at width given in preamble. Width -% can be specified either with sample text given in a template line, -% or in percent of \hsize, the current width of text on page. - -% Table can continue over pages but will only break between lines. - -% To make preamble: -% -% Either define widths of columns in terms of percent of \hsize: -% @multitable @columnfractions .25 .3 .45 -% @item ... -% -% Numbers following @columnfractions are the percent of the total -% current hsize to be used for each column. You may use as many -% columns as desired. - - -% Or use a template: -% @multitable {Column 1 template} {Column 2 template} {Column 3 templa= te} -% @item ... -% using the widest term desired in each column. - -% Each new table line starts with @item, each subsequent new column -% starts with @tab. Empty columns may be produced by supplying @tab's -% with nothing between them for as many times as empty columns are neede= d, -% ie, @tab@tab@tab will produce two empty columns. - -% @item, @tab do not need to be on their own lines, but it will not hurt= -% if they are. - -% Sample multitable: - -% @multitable {Column 1 template} {Column 2 template} {Column 3 templa= te} -% @item first col stuff @tab second col stuff @tab third col -% @item -% first col stuff -% @tab -% second col stuff -% @tab -% third col -% @item first col stuff @tab second col stuff -% @tab Many paragraphs of text may be used in any column. -% -% They will wrap at the width determined by the template. -% @item@tab@tab This will be in third column. -% @end multitable - -% Default dimensions may be reset by user. -% @multitableparskip is vertical space between paragraphs in table. -% @multitableparindent is paragraph indent in table. -% @multitablecolmargin is horizontal space to be left between columns. -% @multitablelinespace is space to leave between table items, baseline -% to baseline= =2E -% 0pt means it depends on current normal line spacing. -% -\newskip\multitableparskip -\newskip\multitableparindent -\newdimen\multitablecolspace -\newskip\multitablelinespace -\multitableparskip=3D0pt -\multitableparindent=3D6pt -\multitablecolspace=3D12pt -\multitablelinespace=3D0pt =20 % Macros used to set up halign preamble: % @@ -4412,8 +4350,6 @@ \go } =20 -% multitable-only commands. -% % @headitem starts a heading row, which we typeset in bold. Assignments= % have to be global since we are inside the implicit group of an % alignment entry. \everycr below resets \everytab so we don't have to @@ -4430,14 +4366,8 @@ % default for tables with no headings. \let\headitemcrhook=3D\relax % -% A \tab used to include \hskip1sp. But then the space in a template -% line is not enough. That is bad. So let's go back to just `&' until -% we again encounter the problem the 1sp was intended to solve. -% --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% =20 -% @multitable ... @end multitable definitions: -% \newtoks\everytab % insert after every tab. % \envdef\multitable{% @@ -4452,9 +4382,8 @@ % \tolerance=3D9500 \hbadness=3D9500 - \setmultitablespacing - \parskip=3D\multitableparskip - \parindent=3D\multitableparindent + \parskip=3D0pt + \parindent=3D6pt \overfullrule=3D0pt \global\colcount=3D0 % @@ -4484,47 +4413,24 @@ % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 - \multistrut + \strut \vtop{% - % Use the current \colcount to find the correct column width: + \advance\hsize by -1\leftskip + % Find the correct column width \hsize=3D\expandafter\csname col\the\colcount\endcsname % - % In order to keep entries from bumping into each other - % we will add a \leftskip of \multitablecolspace to all columns af= ter - % the first one. - % - % If a template has been used, we will add \multitablecolspace - % to the width of each template entry. - % - % If the user has set preamble in terms of percent of \hsize we wi= ll - % use that dimension as the width of the column, and the \leftskip= - % will keep entries from bumping into each other. Table will star= t at - % left margin and final column will justify at right margin. - % - % Make sure we don't inherit \rightskip from the outer environment= =2E \rightskip=3D0pt \ifnum\colcount=3D1 - % The first column will be indented with the surrounding text. - \advance\hsize by\leftskip + \advance\hsize by\leftskip % Add indent of surrounding text \else - \ifsetpercent \else - % If user has not set preamble in terms of percent of \hsize - % we will advance \hsize by \multitablecolspace. - \advance\hsize by \multitablecolspace - \fi - % In either case we will make \leftskip=3D\multitablecolspace: - \leftskip=3D\multitablecolspace + % In order to keep entries from bumping into each other. + \leftskip=3D12pt + \ifsetpercent \else + % If a template has been used + \advance\hsize by \leftskip + \fi \fi - % Ignoring space at the beginning and end avoids an occasional spu= rious - % blank line, when TeX decides to break the line at the space befo= re the - % box from the multistrut, so the strut ends up on a line by itsel= f. - % For example: - % @multitable @columnfractions .11 .89 - % @item @code{#} - % @tab Legal holiday which is valid in major parts of the whole co= untry. - % Is automatically provided with highlighting sequences respective= ly - % marking characters. - \noindent\ignorespaces##\unskip\multistrut + \noindent\ignorespaces##\unskip\strut }\cr } \def\Emultitable{% @@ -4533,31 +4439,6 @@ \global\setpercentfalse } =20 -\def\setmultitablespacing{% - \def\multistrut{\strut}% just use the standard line spacing - % - % Compute \multitablelinespace (if not defined by user) for use in - % \multitableparskip calculation. We used define \multistrut based on= - % this, but (ironically) that caused the spacing to be off. - % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +01= 00. -\ifdim\multitablelinespace=3D0pt -\setbox0=3D\vbox{X}\global\multitablelinespace=3D\the\baselineskip -\global\advance\multitablelinespace by-\ht0 -\fi -% Test to see if parskip is larger than space between lines of -% table. If not, do nothing. -% If so, set to same dimension as multitablelinespace. -\ifdim\multitableparskip>\multitablelinespace -\global\multitableparskip=3D\multitablelinespace -\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller= - % than skip between lines in the t= able. -\fi% -\ifdim\multitableparskip=3D0pt -\global\multitableparskip=3D\multitablelinespace -\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller= - % than skip between lines in the t= able. -\fi} - =20 \message{conditionals,} =20 @@ -5171,30 +5052,29 @@ \let\lbracechar\{% \let\rbracechar\}% % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\TH{TH}% + \def\aa{aa}% + \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% + \def\ordf{a}% + \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{th}% % \let\do\indexnofontsdef % - % Non-English letters. - \do\AA{AA}% - \do\AE{AE}% - \do\DH{DZZ}% - \do\L{L}% - \do\OE{OE}% - \do\O{O}% - \do\TH{TH}% - \do\aa{aa}% - \do\ae{ae}% - \do\dh{dzz}% - \do\exclamdown{!}% - \do\l{l}% - \do\oe{oe}% - \do\ordf{a}% - \do\ordm{o}% - \do\o{o}% - \do\questiondown{?}% - \do\ss{ss}% - \do\th{th}% - % \do\LaTeX{LaTeX}% \do\TeX{TeX}% % @@ -8931,7 +8811,7 @@ \else \ifhavexrefs % We (should) know the real title if we have the xref values. - \def\printedrefname{\refx{#1-title}{}}% + \def\printedrefname{\refx{#1-title}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% @@ -9025,7 +8905,7 @@ % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox =3D 0pt - \refx{#1-snt}{}% + \refx{#1-snt}% \else \printedrefname \fi @@ -9060,9 +8940,9 @@ \else % Reference within this manual. % - % Only output a following space if the -snt ref is nonempty; for - % @unnumbered and @anchor, it won't be. - \setbox2 =3D \hbox{\ignorespaces \refx{#1-snt}{}}% + % Only output a following space if the -snt ref is nonempty, as th= e ref + % will be empty for @unnumbered and @anchor. + \setbox2 =3D \hbox{\ignorespaces \refx{#1-snt}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi % % output the `[mynode]' via the macro below so it can be overridde= n. @@ -9073,7 +8953,7 @@ ,\space % % output the `page 3'. - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \turnoffactive \putwordpage\tie\refx{#1-pg}% % Add a , if xref followed by a space \if\space\noexpand\tokenafterxref ,% \else\ifx\ \tokenafterxref ,% @TAB @@ -9150,9 +9030,8 @@ \fi\fi\fi } =20 -% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. = SUFFIX -% is output afterwards if non-empty. -\def\refx#1#2{% +% \refx{NAME} - reference a cross-reference string named NAME. +\def\refx#1{% \requireauxfile {% \indexnofonts @@ -9179,7 +9058,6 @@ % It's defined, so just use it. \thisrefX \fi - #2% Output the suffix in any case. } =20 % This is the macro invoked by entries in the aux file. Define a contro= l @@ -9289,10 +9167,10 @@ \catcode`\[=3D\other \catcode`\]=3D\other \catcode`\"=3D\other - \catcode`\_=3D\other - \catcode`\|=3D\other - \catcode`\<=3D\other - \catcode`\>=3D\other + \catcode`\_=3D\active + \catcode`\|=3D\active + \catcode`\<=3D\active + \catcode`\>=3D\active \catcode`\$=3D\other \catcode`\#=3D\other \catcode`\&=3D\other @@ -9539,7 +9417,7 @@ % On the other hand, if we are in the case of @center @image, we don't= % want to start a paragraph, which will create a hsize-width box and % eradicate the centering. - \ifx\centersub\centerV\else \noindent \fi + \ifx\centersub\centerV \else \imageindent \fi % % Output the image. \ifpdf @@ -11731,3 +11609,4 @@ @c vim:sw=3D2: =20 @enablebackslashhack + diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h index fb718bc069..cb72f26206 100644 --- a/lib/_Noreturn.h +++ b/lib/_Noreturn.h @@ -2,16 +2,16 @@ Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _Noreturn diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 0a6137e037..65c2d4d939 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h @@ -3,20 +3,18 @@ Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundati= on, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your option= ) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with this program; if not, see - . - */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ diff --git a/lib/allocator.c b/lib/allocator.c index 2c1a3da03a..2262de9ff3 100644 --- a/lib/allocator.c +++ b/lib/allocator.c @@ -1,3 +1,20 @@ +/* Memory allocators such as malloc+free. + + Copyright (C) 2011-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #define _GL_USE_STDLIB_ALLOC 1 #include #include "allocator.h" diff --git a/lib/allocator.h b/lib/allocator.h index cfa0535774..f0e8f34896 100644 --- a/lib/allocator.h +++ b/lib/allocator.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/arg-nonnull.h b/lib/arg-nonnull.h index 5b81b50a87..b4de241e90 100644 --- a/lib/arg-nonnull.h +++ b/lib/arg-nonnull.h @@ -2,16 +2,16 @@ Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer too= ls diff --git a/lib/attribute.h b/lib/attribute.h index 82245279eb..6d3c04c070 100644 --- a/lib/attribute.h +++ b/lib/attribute.h @@ -2,17 +2,17 @@ =20 Copyright 2020-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/binary-io.c b/lib/binary-io.c index f2678972ef..adc0ae2b0c 100644 --- a/lib/binary-io.c +++ b/lib/binary-io.c @@ -1,17 +1,17 @@ /* Binary mode I/O. Copyright 2017-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/binary-io.h b/lib/binary-io.h index 8654fd2d39..0fa8d546f1 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -1,17 +1,17 @@ /* Binary mode I/O. Copyright (C) 2001, 2003, 2005, 2008-2021 Free Software Foundation, I= nc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _BINARY_H diff --git a/lib/byteswap.in.h b/lib/byteswap.in.h index 2b7d5abe1b..113f878027 100644 --- a/lib/byteswap.in.h +++ b/lib/byteswap.in.h @@ -2,17 +2,17 @@ Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. Written by Oskar Liljeblad , 2005. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _GL_BYTESWAP_H diff --git a/lib/c++defs.h b/lib/c++defs.h index 39df1bc76b..a47b61a009 100644 --- a/lib/c++defs.h +++ b/lib/c++defs.h @@ -2,16 +2,16 @@ Copyright (C) 2010-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _GL_CXXDEFS_H diff --git a/lib/c-ctype.c b/lib/c-ctype.c index 5d9d4d87a6..300f97c292 100644 --- a/lib/c-ctype.c +++ b/lib/c-ctype.c @@ -1,3 +1,21 @@ +/* Character handling in C locale. + + Copyright (C) 2003-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define C_CTYPE_INLINE _GL_EXTERN_INLINE #include "c-ctype.h" diff --git a/lib/c-ctype.h b/lib/c-ctype.h index bf24a88310..3a652ac1f2 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -7,18 +7,18 @@ =20 Copyright (C) 2000-2003, 2006, 2008-2021 Free Software Foundation, In= c. =20 -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, see . *= / + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef C_CTYPE_H #define C_CTYPE_H diff --git a/lib/c-strcase.h b/lib/c-strcase.h index 089edfe7eb..82f99bb06b 100644 --- a/lib/c-strcase.h +++ b/lib/c-strcase.h @@ -2,18 +2,18 @@ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef C_STRCASE_H #define C_STRCASE_H diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index 55479d6a33..3c22455082 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c @@ -1,18 +1,18 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index 02bc0f2ecd..f3ca786cb3 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c @@ -1,18 +1,18 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c index b7dba08994..c6fef174c4 100644 --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -21,7 +21,6 @@ optimizes away the name =3D=3D NULL test below. */ # define _GL_ARG_NONNULL(params) =20 -# define _GL_USE_STDLIB_ALLOC 1 # include #endif =20 @@ -76,6 +75,12 @@ # define __rawmemchr rawmemchr # define __readlink readlink # define __stat stat +# if IN_RELOCWRAPPER + /* When building the relocatable program wrapper, use the system's m= emmove + function, not the gnulib override, otherwise we would get a link = error. + */ +# undef memmove +# endif #endif =20 /* Suppress bogus GCC -Wmaybe-uninitialized warnings. */ diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 18cfc114b6..9d0c125ecb 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -3,17 +3,17 @@ Copyright (C) 2001, 2003-2004, 2007, 2009-2021 Free Software Foundati= on, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ @@ -22,6 +22,9 @@ =20 #include "careadlinkat.h" =20 +#include "idx.h" +#include "minmax.h" + #include #include #include @@ -65,11 +68,6 @@ readlink_stk (int fd, char const *filename, ssize_t (*preadlinkat) (int, char const *, char *, size_t)= , char stack_buf[STACK_BUF_SIZE]) { - char *buf; - size_t buf_size; - size_t buf_size_max =3D - SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; - if (! alloc) alloc =3D &stdlib_allocator; =20 @@ -79,14 +77,14 @@ readlink_stk (int fd, char const *filename, buffer_size =3D STACK_BUF_SIZE; } =20 - buf =3D buffer; - buf_size =3D buffer_size; + char *buf =3D buffer; + idx_t buf_size_max =3D MIN (IDX_MAX, MIN (SSIZE_MAX, SIZE_MAX)); + idx_t buf_size =3D MIN (buffer_size, buf_size_max); =20 while (buf) { /* Attempt to read the link into the current buffer. */ - ssize_t link_length =3D preadlinkat (fd, filename, buf, buf_size);= - size_t link_size; + idx_t link_length =3D preadlinkat (fd, filename, buf, buf_size); if (link_length < 0) { if (buf !=3D buffer) @@ -98,7 +96,7 @@ readlink_stk (int fd, char const *filename, return NULL; } =20 - link_size =3D link_length; + idx_t link_size =3D link_length; =20 if (link_size < buf_size) { @@ -127,17 +125,13 @@ readlink_stk (int fd, char const *filename, if (buf !=3D buffer) alloc->free (buf); =20 - if (buf_size < buf_size_max / 2) - buf_size =3D 2 * buf_size + 1; - else if (buf_size < buf_size_max) - buf_size =3D buf_size_max; - else if (buf_size_max < SIZE_MAX) + if (buf_size_max / 2 <=3D buf_size) { errno =3D ENAMETOOLONG; return NULL; } - else - break; + + buf_size =3D 2 * buf_size + 1; buf =3D alloc->allocate (buf_size); } =20 diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index c506fac3cb..a3517b827a 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ diff --git a/lib/cdefs.h b/lib/cdefs.h index 17a0919cd8..b883b25666 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -2,16 +2,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -259,10 +259,12 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) # define __attribute_const__ /* Ignore */ #endif =20 -#if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__ -# define __attribute_maybe_unused__ [[__maybe_unused__]] -#elif __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) +#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) # define __attribute_maybe_unused__ __attribute__ ((__unused__)) +/* Once the next version of the C standard comes out, we can + do something like the following here: + #elif defined __STDC_VERSION__ && 202???L <=3D __STDC_VERSION__ + # define __attribute_maybe_unused__ [[__maybe_unused__]] */ #else # define __attribute_maybe_unused__ /* Ignore */ #endif @@ -320,16 +322,18 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) #endif =20 /* The nonnull function attribute marks pointer parameters that - must not be NULL. */ -#ifndef __nonnull + must not be NULL. This has the name __nonnull in glibc, + and __attribute_nonnull__ in files shared with Gnulib to avoid + collision with a different __nonnull in DragonFlyBSD 5.9. */ +#ifndef __attribute_nonnull__ # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) -# define __nonnull(params) __attribute__ ((__nonnull__ params)) +# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ para= ms)) # else -# define __nonnull(params) +# define __attribute_nonnull__(params) # endif -#elif !defined __GLIBC__ -# undef __nonnull -# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params) +#endif +#ifndef __nonnull +# define __nonnull(params) __attribute_nonnull__ (params) #endif =20 /* If fortification mode, we warn about unused results of certain @@ -485,9 +489,9 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] #endif =20 -/* The #ifndef lets Gnulib avoid including these on non-glibc - platforms, where the includes typically do not exist. */ -#ifndef __WORDSIZE +/* Gnulib avoids including these, as they don't work on non-glibc or + older glibc platforms. */ +#ifndef __GNULIB_CDEFS # include # include #endif diff --git a/lib/cloexec.c b/lib/cloexec.c index 8363ddaa60..7defa93446 100644 --- a/lib/cloexec.c +++ b/lib/cloexec.c @@ -2,20 +2,20 @@ =20 Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 - The code is taken from glibc/manual/llio.texi */ +/* The code is taken from glibc/manual/llio.texi */ =20 #include =20 diff --git a/lib/cloexec.h b/lib/cloexec.h index 5ca0e6413e..97a3659efb 100644 --- a/lib/cloexec.h +++ b/lib/cloexec.h @@ -2,20 +2,18 @@ =20 Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E - -*/ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/close-stream.h b/lib/close-stream.h index be3d4196b0..8a58a48e61 100644 --- a/lib/close-stream.h +++ b/lib/close-stream.h @@ -1,2 +1,20 @@ +/* Close a stream, with nicer error checking than fclose's. + + Copyright (C) 2006-2021 Free Software Foundation, Inc. + + 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 the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see = =2E */ + #include + int close_stream (FILE *stream); diff --git a/lib/copy-file-range.c b/lib/copy-file-range.c index e73c78b5aa..17df577055 100644 --- a/lib/copy-file-range.c +++ b/lib/copy-file-range.c @@ -1,17 +1,17 @@ /* Stub for copy_file_range Copyright 2019-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/count-leading-zeros.c b/lib/count-leading-zeros.c index d0c0704f58..7cf1ac2ff0 100644 --- a/lib/count-leading-zeros.c +++ b/lib/count-leading-zeros.c @@ -1,3 +1,21 @@ +/* Count the number of leading 0 bits in a word. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define COUNT_LEADING_ZEROS_INLINE _GL_EXTERN_INLINE #include "count-leading-zeros.h" diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h index 575ec3b4d0..cef529ac13 100644 --- a/lib/count-leading-zeros.h +++ b/lib/count-leading-zeros.h @@ -1,17 +1,17 @@ /* count-leading-zeros.h -- counts the number of leading 0 bits in a wor= d. Copyright (C) 2012-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Eric Blake. */ diff --git a/lib/count-one-bits.c b/lib/count-one-bits.c index 66341d77cd..d9b4f5e848 100644 --- a/lib/count-one-bits.c +++ b/lib/count-one-bits.c @@ -1,4 +1,22 @@ +/* Count the number of 1-bits in a word. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define COUNT_ONE_BITS_INLINE _GL_EXTERN_INLINE #include "count-one-bits.h" =20 diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h index 1a14f11f15..5e87a572b0 100644 --- a/lib/count-one-bits.h +++ b/lib/count-one-bits.h @@ -1,17 +1,17 @@ /* count-one-bits.h -- counts the number of 1-bits in a word. Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Ben Pfaff. */ diff --git a/lib/count-trailing-zeros.c b/lib/count-trailing-zeros.c index f3da886742..538b01dc02 100644 --- a/lib/count-trailing-zeros.c +++ b/lib/count-trailing-zeros.c @@ -1,3 +1,21 @@ +/* Count the number of trailing 0 bits in a word. + + Copyright 2013-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define COUNT_TRAILING_ZEROS_INLINE _GL_EXTERN_INLINE #include "count-trailing-zeros.h" diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h index 5a8ef563ea..f81674c571 100644 --- a/lib/count-trailing-zeros.h +++ b/lib/count-trailing-zeros.h @@ -1,17 +1,17 @@ /* count-trailing-zeros.h -- counts the number of trailing 0 bits in a w= ord. Copyright 2013-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 4666972b15..647a3dba51 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -1,17 +1,17 @@ /* A GNU-like . Copyright (C) 2006-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_DIRENT_H diff --git a/lib/dirfd.c b/lib/dirfd.c index ced7531c5e..640cb4ff13 100644 --- a/lib/dirfd.c +++ b/lib/dirfd.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2001, 2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Jim Meyering. */ diff --git a/lib/dtoastr.c b/lib/dtoastr.c index aed181d66b..5baba92922 100644 --- a/lib/dtoastr.c +++ b/lib/dtoastr.c @@ -1,2 +1,19 @@ +/* Convert 'double' to accurate string. + + Copyright (C) 2010-2021 Free Software Foundation, Inc. + + 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 the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see = =2E */ + #define LENGTH 2 #include "ftoastr.c" diff --git a/lib/dup2.c b/lib/dup2.c index c4a0a29fbd..53e5552132 100644 --- a/lib/dup2.c +++ b/lib/dup2.c @@ -2,17 +2,17 @@ =20 Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ diff --git a/lib/dynarray.h b/lib/dynarray.h index 6da3e87e55..ec64273b3a 100644 --- a/lib/dynarray.h +++ b/lib/dynarray.h @@ -1,31 +1,284 @@ /* Type-safe arrays which grow dynamically. Copyright 2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 -/* Written by Paul Eggert, 2021. */ +/* Written by Paul Eggert and Bruno Haible, 2021. */ =20 #ifndef _GL_DYNARRAY_H #define _GL_DYNARRAY_H =20 -#include +/* Before including this file, you need to define: =20 + DYNARRAY_STRUCT + The struct tag of dynamic array to be defined. + + DYNARRAY_ELEMENT + The type name of the element type. Elements are copied + as if by memcpy, and can change address as the dynamic + array grows. + + DYNARRAY_PREFIX + The prefix of the functions which are defined. + + The following parameters are optional: + + DYNARRAY_ELEMENT_FREE + DYNARRAY_ELEMENT_FREE (E) is evaluated to deallocate the + contents of elements. E is of type DYNARRAY_ELEMENT *. + + DYNARRAY_ELEMENT_INIT + DYNARRAY_ELEMENT_INIT (E) is evaluated to initialize a new + element. E is of type DYNARRAY_ELEMENT *. + If DYNARRAY_ELEMENT_FREE but not DYNARRAY_ELEMENT_INIT is + defined, new elements are automatically zero-initialized. + Otherwise, new elements have undefined contents. + + DYNARRAY_INITIAL_SIZE + The size of the statically allocated array (default: + at least 2, more elements if they fit into 128 bytes). + Must be a preprocessor constant. If DYNARRAY_INITIAL_SIZE is 0, + there is no statically allocated array at, and all non-empty + arrays are heap-allocated. + + DYNARRAY_FINAL_TYPE + The name of the type which holds the final array. If not + defined, is PREFIX##finalize not provided. DYNARRAY_FINAL_TYPE + must be a struct type, with members of type DYNARRAY_ELEMENT and + size_t at the start (in this order). + + These macros are undefined after this header file has been + included. + + The following types are provided (their members are private to the + dynarray implementation): + + struct DYNARRAY_STRUCT + + The following functions are provided: + */ + +/* Initialize a dynamic array object. This must be called before any + use of the object. */ +#if 0 +static void + DYNARRAY_PREFIX##init (struct DYNARRAY_STRUCT *list); +#endif + +/* Deallocate the dynamic array and its elements. */ +#if 0 +static void + DYNARRAY_PREFIX##free (struct DYNARRAY_STRUCT *list); +#endif + +/* Return true if the dynamic array is in an error state. */ +#if 0 +static bool + DYNARRAY_PREFIX##has_failed (const struct DYNARRAY_STRUCT *list);= +#endif + +/* Mark the dynamic array as failed. All elements are deallocated as + a side effect. */ +#if 0 +static void + DYNARRAY_PREFIX##mark_failed (struct DYNARRAY_STRUCT *list); +#endif + +/* Return the number of elements which have been added to the dynamic + array. */ +#if 0 +static size_t + DYNARRAY_PREFIX##size (const struct DYNARRAY_STRUCT *list); +#endif + +/* Return a pointer to the first array element, if any. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##begin (const struct DYNARRAY_STRUCT *list); +#endif + +/* Return a pointer one element past the last array element. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##end (const struct DYNARRAY_STRUCT *list); +#endif + +/* Return a pointer to the array element at INDEX. Terminate the + process if INDEX is out of bounds. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##at (struct DYNARRAY_STRUCT *list, size_t index);= +#endif + +/* Add ITEM at the end of the array, enlarging it by one element. + Mark *LIST as failed if the dynamic array allocation size cannot be + increased. */ +#if 0 +static void + DYNARRAY_PREFIX##add (struct DYNARRAY_STRUCT *list, + DYNARRAY_ELEMENT item); +#endif + +/* Allocate a place for a new element in *LIST and return a pointer to + it. The pointer can be NULL if the dynamic array cannot be + enlarged due to a memory allocation failure. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##emplace (struct DYNARRAY_STRUCT *list); +#endif + +/* Change the size of *LIST to SIZE. If SIZE is larger than the + existing size, new elements are added (which can be initialized). + Otherwise, the list is truncated, and elements are freed. Return + false on memory allocation failure (and mark *LIST as failed). */ +#if 0 +static bool + DYNARRAY_PREFIX##resize (struct DYNARRAY_STRUCT *list, size_t siz= e); +#endif + +/* Remove the last element of LIST if it is present. */ +#if 0 +static void + DYNARRAY_PREFIX##remove_last (struct DYNARRAY_STRUCT *list); +#endif + +/* Remove all elements from the list. The elements are freed, but the + list itself is not. */ +#if 0 +static void + DYNARRAY_PREFIX##clear (struct DYNARRAY_STRUCT *list); +#endif + +#if defined DYNARRAY_FINAL_TYPE +/* Transfer the dynamic array to a permanent location at *RESULT. + Returns true on success on false on allocation failure. In either + case, *LIST is re-initialized and can be reused. A NULL pointer is + stored in *RESULT if LIST refers to an empty list. On success, the + pointer in *RESULT is heap-allocated and must be deallocated using + free. */ +#if 0 +static bool + DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *list, + DYNARRAY_FINAL_TYPE *result); +#endif +#else /* !defined DYNARRAY_FINAL_TYPE */ +/* Transfer the dynamic array to a heap-allocated array and return a + pointer to it. The pointer is NULL if memory allocation fails, or + if the array is empty, so this function should be used only for + arrays which are known not be empty (usually because they always + have a sentinel at the end). If LENGTHP is not NULL, the array + length is written to *LENGTHP. *LIST is re-initialized and can be + reused. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *list, + size_t *lengthp); +#endif +#endif + +/* A minimal example which provides a growing list of integers can be + defined like this: + + struct int_array + { + // Pointer to result array followed by its length, + // as required by DYNARRAY_FINAL_TYPE. + int *array; + size_t length; + }; + + #define DYNARRAY_STRUCT dynarray_int + #define DYNARRAY_ELEMENT int + #define DYNARRAY_PREFIX dynarray_int_ + #define DYNARRAY_FINAL_TYPE struct int_array + #include + + To create a three-element array with elements 1, 2, 3, use this + code: + + struct dynarray_int dyn; + dynarray_int_init (&dyn); + for (int i =3D 1; i <=3D 3; ++i) + { + int *place =3D dynarray_int_emplace (&dyn); + assert (place !=3D NULL); + *place =3D i; + } + struct int_array result; + bool ok =3D dynarray_int_finalize (&dyn, &result); + assert (ok); + assert (result.length =3D=3D 3); + assert (result.array[0] =3D=3D 1); + assert (result.array[1] =3D=3D 2); + assert (result.array[2] =3D=3D 3); + free (result.array); + + If the elements contain resources which must be freed, define + DYNARRAY_ELEMENT_FREE appropriately, like this: + + struct str_array + { + char **array; + size_t length; + }; + + #define DYNARRAY_STRUCT dynarray_str + #define DYNARRAY_ELEMENT char * + #define DYNARRAY_ELEMENT_FREE(ptr) free (*ptr) + #define DYNARRAY_PREFIX dynarray_str_ + #define DYNARRAY_FINAL_TYPE struct str_array + #include + */ + + +/* The implementation is imported from glibc. */ + +/* Avoid possible conflicts with symbols exported by the GNU libc. */ #define __libc_dynarray_at_failure gl_dynarray_at_failure #define __libc_dynarray_emplace_enlarge gl_dynarray_emplace_enlarge #define __libc_dynarray_finalize gl_dynarray_finalize #define __libc_dynarray_resize_clear gl_dynarray_resize_clear #define __libc_dynarray_resize gl_dynarray_resize -#include + +#if defined DYNARRAY_STRUCT || defined DYNARRAY_ELEMENT || defined DYNAR= RAY_PREFIX + +# ifndef _GL_LIKELY +/* Rely on __builtin_expect, as provided by the module 'builtin-expect'.= */ +# define _GL_LIKELY(cond) __builtin_expect ((cond), 1) +# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0) +# endif + +/* Define auxiliary structs and declare auxiliary functions, common to a= ll + instantiations of dynarray. */ +# include + +/* Define the instantiation, specified through + DYNARRAY_STRUCT + DYNARRAY_ELEMENT + DYNARRAY_PREFIX + etc. */ +# include + +#else + +/* This file is being included from one of the malloc/dynarray_*.c files= =2E */ +# include + +#endif =20 #endif /* _GL_DYNARRAY_H */ diff --git a/lib/eloop-threshold.h b/lib/eloop-threshold.h index 27d07a7296..fcd30ab1e6 100644 --- a/lib/eloop-threshold.h +++ b/lib/eloop-threshold.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/errno.in.h b/lib/errno.in.h index c6ab4e88e1..3cad9e2d62 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_ERRNO_H =20 diff --git a/lib/euidaccess.c b/lib/euidaccess.c index ef65961d81..a86cebd179 100644 --- a/lib/euidaccess.c +++ b/lib/euidaccess.c @@ -5,17 +5,17 @@ =20 This file is part of the GNU C Library. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by David MacKenzie and Torbjorn Granlund. diff --git a/lib/execinfo.c b/lib/execinfo.c index 0bcd9f078b..18a1051b25 100644 --- a/lib/execinfo.c +++ b/lib/execinfo.c @@ -1,3 +1,21 @@ +/* Information about executables. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_EXECINFO_INLINE _GL_EXTERN_INLINE #include "execinfo.h" diff --git a/lib/execinfo.in.h b/lib/execinfo.in.h index 790bec087e..98bb8039b7 100644 --- a/lib/execinfo.in.h +++ b/lib/execinfo.in.h @@ -3,16 +3,16 @@ Copyright (C) 2012-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + it under the terms of the GNU Lesser General Public License as publis= hed by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c index f50ed0875d..2906c04d0f 100644 --- a/lib/explicit_bzero.c +++ b/lib/explicit_bzero.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/fcntl.c b/lib/fcntl.c index 9d6b10fa30..c744eb91e6 100644 --- a/lib/fcntl.c +++ b/lib/fcntl.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Eric Blake . */ diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index 0b14467c54..26dedc3041 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ diff --git a/lib/filename.h b/lib/filename.h index 541ffec0d5..dafe3dfddb 100644 --- a/lib/filename.h +++ b/lib/filename.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/filevercmp.c b/lib/filevercmp.c index 6b7226de6c..fca23ec4fc 100644 --- a/lib/filevercmp.c +++ b/lib/filevercmp.c @@ -3,18 +3,18 @@ Copyright (C) 2001 Anthony Towns Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include #include "filevercmp.h" diff --git a/lib/filevercmp.h b/lib/filevercmp.h index 5de212f436..c210452938 100644 --- a/lib/filevercmp.h +++ b/lib/filevercmp.h @@ -3,18 +3,18 @@ Copyright (C) 2001 Anthony Towns Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef FILEVERCMP_H #define FILEVERCMP_H diff --git a/lib/flexmember.h b/lib/flexmember.h index 9f6e1bf110..1b19a2bfd9 100644 --- a/lib/flexmember.h +++ b/lib/flexmember.h @@ -5,16 +5,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . =20 diff --git a/lib/free.c b/lib/free.c index 5c89787aba..780f03dd11 100644 --- a/lib/free.c +++ b/lib/free.c @@ -2,32 +2,36 @@ =20 Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ =20 #include =20 +/* Specification. */ #include =20 -#include +/* A function definition is only needed if HAVE_FREE_POSIX is not define= d. */ +#if !HAVE_FREE_POSIX + +# include =20 void rpl_free (void *p) -#undef free +# undef free { -#if defined __GNUC__ && !defined __clang__ +# if defined __GNUC__ && !defined __clang__ /* An invalid GCC optimization would optimize away the assignments in the code below, when link-ti= me @@ -39,9 +43,11 @@ rpl_free (void *p) errno =3D 0; free (p); errno =3D err[errno =3D=3D 0]; -#else +# else int err =3D errno; free (p); errno =3D err; -#endif +# endif } + +#endif diff --git a/lib/fsusage.c b/lib/fsusage.c index 35de136cd8..740cdc219a 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -3,17 +3,17 @@ Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2021 Free S= oftware Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/fsusage.h b/lib/fsusage.h index e0657b3651..b3f58d9994 100644 --- a/lib/fsusage.h +++ b/lib/fsusage.h @@ -3,17 +3,17 @@ Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Space usage statistics for a file system. Blocks are 512-byte. */ diff --git a/lib/fsync.c b/lib/fsync.c index a5280f281c..99a932d770 100644 --- a/lib/fsync.c +++ b/lib/fsync.c @@ -9,17 +9,17 @@ =20 Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This library is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/futimens.c b/lib/futimens.c index 99eaba95df..273cc87187 100644 --- a/lib/futimens.c +++ b/lib/futimens.c @@ -1,17 +1,17 @@ /* Set the access and modification time of an open fd. Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Eric Blake */ diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index 56eaf5d32c..5006c2d5c5 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c @@ -2,17 +2,17 @@ Copyright (C) 2008-2021 Free Software Foundation, Inc. Written by Bruno Haible , 2008. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/getgroups.c b/lib/getgroups.c index af602a74d3..2092bd2778 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c @@ -2,17 +2,17 @@ =20 Copyright (C) 1996, 1999, 2003, 2006-2021 Free Software Foundation, I= nc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Jim Meyering */ @@ -70,7 +70,6 @@ rpl_getgroups (int n, gid_t *group) { int n_groups; GETGROUPS_T *gbuf; - int saved_errno; =20 if (n < 0) { @@ -99,9 +98,7 @@ rpl_getgroups (int n, gid_t *group) while (n--) group[n] =3D gbuf[n]; } - saved_errno =3D errno; free (gbuf); - errno =3D saved_errno; return result; } =20 @@ -121,10 +118,7 @@ rpl_getgroups (int n, gid_t *group) n *=3D 2; } =20 - saved_errno =3D errno; free (gbuf); - errno =3D saved_errno; - return n_groups; } =20 diff --git a/lib/getopt-cdefs.in.h b/lib/getopt-cdefs.in.h index 11fe536ff2..33e3d4b3d8 100644 --- a/lib/getopt-cdefs.in.h +++ b/lib/getopt-cdefs.in.h @@ -4,19 +4,18 @@ Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _GETOPT_CDEFS_H #define _GETOPT_CDEFS_H 1 diff --git a/lib/getopt-core.h b/lib/getopt-core.h index 05d16b0740..ceb14d0597 100644 --- a/lib/getopt-core.h +++ b/lib/getopt-core.h @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/getopt-ext.h b/lib/getopt-ext.h index 9b11b47f0f..f82a8c6129 100644 --- a/lib/getopt-ext.h +++ b/lib/getopt-ext.h @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h index 78990a345a..b1733a3497 100644 --- a/lib/getopt-pfx-core.h +++ b/lib/getopt-pfx-core.h @@ -4,19 +4,18 @@ Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _GETOPT_PFX_CORE_H #define _GETOPT_PFX_CORE_H 1 diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h index 61ea8d2b1d..b9a14ba05a 100644 --- a/lib/getopt-pfx-ext.h +++ b/lib/getopt-pfx-ext.h @@ -4,19 +4,18 @@ Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _GETOPT_PFX_EXT_H #define _GETOPT_PFX_EXT_H 1 diff --git a/lib/getopt.c b/lib/getopt.c index dd96c18407..b1069891e8 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =0C diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 541fb9da2e..bf884f0322 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h @@ -5,18 +5,18 @@ with the GNU C Library, which supplies a different version of this file. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. - - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with gnulib; if not, see . */ + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_GETOPT_H =20 diff --git a/lib/getopt1.c b/lib/getopt1.c index ca24eb811f..5a928062fd 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =0C diff --git a/lib/getopt_int.h b/lib/getopt_int.h index b70ff5badf..91254e487d 100644 --- a/lib/getopt_int.h +++ b/lib/getopt_int.h @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/getrandom.c b/lib/getrandom.c index 41212fb329..a186c4d3bd 100644 --- a/lib/getrandom.c +++ b/lib/getrandom.c @@ -2,17 +2,17 @@ =20 Copyright 2020-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ @@ -178,7 +178,11 @@ getrandom (void *buffer, size_t length, unsigned int= flags) + (flags & GRND_NONBLOCK ? O_NONBLOCK : 0)); fd =3D open (randdevice[devrandom], oflags); if (fd < 0) - return fd; + { + if (errno =3D=3D ENOENT || errno =3D=3D ENOTDIR) + errno =3D ENOSYS; + return -1; + } randfd[devrandom] =3D fd; } =20 diff --git a/lib/gettext.h b/lib/gettext.h index 3552157efd..f1c7a24075 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -2,18 +2,18 @@ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Softwar= e Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 diff --git a/lib/gettime.c b/lib/gettime.c index fb721b2cda..8f28a32df1 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2002, 2004-2007, 2009-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index b1c93e1c3a..2a222fc5b7 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -2,18 +2,18 @@ =20 Copyright (C) 2001-2003, 2005-2007, 2009-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* written by Jim Meyering */ =20 diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 07736f9b8b..19531e9031 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -171,9 +171,7 @@ ALLOCA =3D @ALLOCA@ ALLOCA_H =3D @ALLOCA_H@ ALSA_CFLAGS =3D @ALSA_CFLAGS@ ALSA_LIBS =3D @ALSA_LIBS@ -AM_DEFAULT_V =3D @AM_DEFAULT_V@ AM_DEFAULT_VERBOSITY =3D @AM_DEFAULT_VERBOSITY@ -AM_V =3D @AM_V@ APPLE_UNIVERSAL_BUILD =3D @APPLE_UNIVERSAL_BUILD@ AR =3D @AR@ ARFLAGS =3D @ARFLAGS@ @@ -212,6 +210,7 @@ DEFS =3D @DEFS@ DESLIB =3D @DESLIB@ DOCMISC_W32 =3D @DOCMISC_W32@ DUMPING =3D @DUMPING@ +DYNLIB_OBJ =3D @DYNLIB_OBJ@ ECHO_C =3D @ECHO_C@ ECHO_N =3D @ECHO_N@ ECHO_T =3D @ECHO_T@ @@ -254,297 +253,300 @@ GL_GENERATE_MINI_GMP_H =3D @GL_GENERATE_MINI_GMP_= H@ GL_GENERATE_STDALIGN_H =3D @GL_GENERATE_STDALIGN_H@ GL_GENERATE_STDDEF_H =3D @GL_GENERATE_STDDEF_H@ GL_GENERATE_STDINT_H =3D @GL_GENERATE_STDINT_H@ +GL_GNULIB_ACCESS =3D @GL_GNULIB_ACCESS@ +GL_GNULIB_ALIGNED_ALLOC =3D @GL_GNULIB_ALIGNED_ALLOC@ +GL_GNULIB_ALPHASORT =3D @GL_GNULIB_ALPHASORT@ +GL_GNULIB_ATOLL =3D @GL_GNULIB_ATOLL@ +GL_GNULIB_CALLOC_POSIX =3D @GL_GNULIB_CALLOC_POSIX@ +GL_GNULIB_CANONICALIZE_FILE_NAME =3D @GL_GNULIB_CANONICALIZE_FILE_NAME@ +GL_GNULIB_CHDIR =3D @GL_GNULIB_CHDIR@ +GL_GNULIB_CHOWN =3D @GL_GNULIB_CHOWN@ +GL_GNULIB_CLOSE =3D @GL_GNULIB_CLOSE@ +GL_GNULIB_CLOSEDIR =3D @GL_GNULIB_CLOSEDIR@ +GL_GNULIB_COPY_FILE_RANGE =3D @GL_GNULIB_COPY_FILE_RANGE@ +GL_GNULIB_CREAT =3D @GL_GNULIB_CREAT@ +GL_GNULIB_CTIME =3D @GL_GNULIB_CTIME@ +GL_GNULIB_DIRFD =3D @GL_GNULIB_DIRFD@ +GL_GNULIB_DPRINTF =3D @GL_GNULIB_DPRINTF@ +GL_GNULIB_DUP =3D @GL_GNULIB_DUP@ +GL_GNULIB_DUP2 =3D @GL_GNULIB_DUP2@ +GL_GNULIB_DUP3 =3D @GL_GNULIB_DUP3@ +GL_GNULIB_ENVIRON =3D @GL_GNULIB_ENVIRON@ +GL_GNULIB_EUIDACCESS =3D @GL_GNULIB_EUIDACCESS@ +GL_GNULIB_EXECL =3D @GL_GNULIB_EXECL@ +GL_GNULIB_EXECLE =3D @GL_GNULIB_EXECLE@ +GL_GNULIB_EXECLP =3D @GL_GNULIB_EXECLP@ +GL_GNULIB_EXECV =3D @GL_GNULIB_EXECV@ +GL_GNULIB_EXECVE =3D @GL_GNULIB_EXECVE@ +GL_GNULIB_EXECVP =3D @GL_GNULIB_EXECVP@ +GL_GNULIB_EXECVPE =3D @GL_GNULIB_EXECVPE@ +GL_GNULIB_EXPLICIT_BZERO =3D @GL_GNULIB_EXPLICIT_BZERO@ +GL_GNULIB_FACCESSAT =3D @GL_GNULIB_FACCESSAT@ +GL_GNULIB_FCHDIR =3D @GL_GNULIB_FCHDIR@ +GL_GNULIB_FCHMODAT =3D @GL_GNULIB_FCHMODAT@ +GL_GNULIB_FCHOWNAT =3D @GL_GNULIB_FCHOWNAT@ +GL_GNULIB_FCLOSE =3D @GL_GNULIB_FCLOSE@ +GL_GNULIB_FCNTL =3D @GL_GNULIB_FCNTL@ +GL_GNULIB_FDATASYNC =3D @GL_GNULIB_FDATASYNC@ +GL_GNULIB_FDOPEN =3D @GL_GNULIB_FDOPEN@ +GL_GNULIB_FDOPENDIR =3D @GL_GNULIB_FDOPENDIR@ +GL_GNULIB_FFLUSH =3D @GL_GNULIB_FFLUSH@ +GL_GNULIB_FFSL =3D @GL_GNULIB_FFSL@ +GL_GNULIB_FFSLL =3D @GL_GNULIB_FFSLL@ +GL_GNULIB_FGETC =3D @GL_GNULIB_FGETC@ +GL_GNULIB_FGETS =3D @GL_GNULIB_FGETS@ +GL_GNULIB_FOPEN =3D @GL_GNULIB_FOPEN@ +GL_GNULIB_FPRINTF =3D @GL_GNULIB_FPRINTF@ +GL_GNULIB_FPRINTF_POSIX =3D @GL_GNULIB_FPRINTF_POSIX@ +GL_GNULIB_FPURGE =3D @GL_GNULIB_FPURGE@ +GL_GNULIB_FPUTC =3D @GL_GNULIB_FPUTC@ +GL_GNULIB_FPUTS =3D @GL_GNULIB_FPUTS@ +GL_GNULIB_FREAD =3D @GL_GNULIB_FREAD@ +GL_GNULIB_FREE_POSIX =3D @GL_GNULIB_FREE_POSIX@ +GL_GNULIB_FREOPEN =3D @GL_GNULIB_FREOPEN@ +GL_GNULIB_FSCANF =3D @GL_GNULIB_FSCANF@ +GL_GNULIB_FSEEK =3D @GL_GNULIB_FSEEK@ +GL_GNULIB_FSEEKO =3D @GL_GNULIB_FSEEKO@ +GL_GNULIB_FSTAT =3D @GL_GNULIB_FSTAT@ +GL_GNULIB_FSTATAT =3D @GL_GNULIB_FSTATAT@ +GL_GNULIB_FSYNC =3D @GL_GNULIB_FSYNC@ +GL_GNULIB_FTELL =3D @GL_GNULIB_FTELL@ +GL_GNULIB_FTELLO =3D @GL_GNULIB_FTELLO@ +GL_GNULIB_FTRUNCATE =3D @GL_GNULIB_FTRUNCATE@ +GL_GNULIB_FUTIMENS =3D @GL_GNULIB_FUTIMENS@ +GL_GNULIB_FWRITE =3D @GL_GNULIB_FWRITE@ +GL_GNULIB_GETC =3D @GL_GNULIB_GETC@ +GL_GNULIB_GETCHAR =3D @GL_GNULIB_GETCHAR@ +GL_GNULIB_GETCWD =3D @GL_GNULIB_GETCWD@ +GL_GNULIB_GETDELIM =3D @GL_GNULIB_GETDELIM@ +GL_GNULIB_GETDOMAINNAME =3D @GL_GNULIB_GETDOMAINNAME@ +GL_GNULIB_GETDTABLESIZE =3D @GL_GNULIB_GETDTABLESIZE@ +GL_GNULIB_GETENTROPY =3D @GL_GNULIB_GETENTROPY@ +GL_GNULIB_GETGROUPS =3D @GL_GNULIB_GETGROUPS@ +GL_GNULIB_GETHOSTNAME =3D @GL_GNULIB_GETHOSTNAME@ +GL_GNULIB_GETLINE =3D @GL_GNULIB_GETLINE@ +GL_GNULIB_GETLOADAVG =3D @GL_GNULIB_GETLOADAVG@ +GL_GNULIB_GETLOGIN =3D @GL_GNULIB_GETLOGIN@ +GL_GNULIB_GETLOGIN_R =3D @GL_GNULIB_GETLOGIN_R@ +GL_GNULIB_GETOPT_POSIX =3D @GL_GNULIB_GETOPT_POSIX@ +GL_GNULIB_GETPAGESIZE =3D @GL_GNULIB_GETPAGESIZE@ +GL_GNULIB_GETPASS =3D @GL_GNULIB_GETPASS@ +GL_GNULIB_GETRANDOM =3D @GL_GNULIB_GETRANDOM@ +GL_GNULIB_GETSUBOPT =3D @GL_GNULIB_GETSUBOPT@ +GL_GNULIB_GETTIMEOFDAY =3D @GL_GNULIB_GETTIMEOFDAY@ +GL_GNULIB_GETUMASK =3D @GL_GNULIB_GETUMASK@ +GL_GNULIB_GETUSERSHELL =3D @GL_GNULIB_GETUSERSHELL@ +GL_GNULIB_GRANTPT =3D @GL_GNULIB_GRANTPT@ +GL_GNULIB_GROUP_MEMBER =3D @GL_GNULIB_GROUP_MEMBER@ +GL_GNULIB_IMAXABS =3D @GL_GNULIB_IMAXABS@ +GL_GNULIB_IMAXDIV =3D @GL_GNULIB_IMAXDIV@ +GL_GNULIB_ISATTY =3D @GL_GNULIB_ISATTY@ +GL_GNULIB_LCHMOD =3D @GL_GNULIB_LCHMOD@ +GL_GNULIB_LCHOWN =3D @GL_GNULIB_LCHOWN@ +GL_GNULIB_LINK =3D @GL_GNULIB_LINK@ +GL_GNULIB_LINKAT =3D @GL_GNULIB_LINKAT@ +GL_GNULIB_LOCALTIME =3D @GL_GNULIB_LOCALTIME@ +GL_GNULIB_LSEEK =3D @GL_GNULIB_LSEEK@ +GL_GNULIB_LSTAT =3D @GL_GNULIB_LSTAT@ +GL_GNULIB_MALLOC_POSIX =3D @GL_GNULIB_MALLOC_POSIX@ +GL_GNULIB_MBSCASECMP =3D @GL_GNULIB_MBSCASECMP@ +GL_GNULIB_MBSCASESTR =3D @GL_GNULIB_MBSCASESTR@ +GL_GNULIB_MBSCHR =3D @GL_GNULIB_MBSCHR@ +GL_GNULIB_MBSCSPN =3D @GL_GNULIB_MBSCSPN@ +GL_GNULIB_MBSLEN =3D @GL_GNULIB_MBSLEN@ +GL_GNULIB_MBSNCASECMP =3D @GL_GNULIB_MBSNCASECMP@ +GL_GNULIB_MBSNLEN =3D @GL_GNULIB_MBSNLEN@ +GL_GNULIB_MBSPBRK =3D @GL_GNULIB_MBSPBRK@ +GL_GNULIB_MBSPCASECMP =3D @GL_GNULIB_MBSPCASECMP@ +GL_GNULIB_MBSRCHR =3D @GL_GNULIB_MBSRCHR@ +GL_GNULIB_MBSSEP =3D @GL_GNULIB_MBSSEP@ +GL_GNULIB_MBSSPN =3D @GL_GNULIB_MBSSPN@ +GL_GNULIB_MBSSTR =3D @GL_GNULIB_MBSSTR@ +GL_GNULIB_MBSTOK_R =3D @GL_GNULIB_MBSTOK_R@ +GL_GNULIB_MBTOWC =3D @GL_GNULIB_MBTOWC@ +GL_GNULIB_MDA_ACCESS =3D @GL_GNULIB_MDA_ACCESS@ +GL_GNULIB_MDA_CHDIR =3D @GL_GNULIB_MDA_CHDIR@ +GL_GNULIB_MDA_CHMOD =3D @GL_GNULIB_MDA_CHMOD@ +GL_GNULIB_MDA_CLOSE =3D @GL_GNULIB_MDA_CLOSE@ +GL_GNULIB_MDA_CREAT =3D @GL_GNULIB_MDA_CREAT@ +GL_GNULIB_MDA_DUP =3D @GL_GNULIB_MDA_DUP@ +GL_GNULIB_MDA_DUP2 =3D @GL_GNULIB_MDA_DUP2@ +GL_GNULIB_MDA_ECVT =3D @GL_GNULIB_MDA_ECVT@ +GL_GNULIB_MDA_EXECL =3D @GL_GNULIB_MDA_EXECL@ +GL_GNULIB_MDA_EXECLE =3D @GL_GNULIB_MDA_EXECLE@ +GL_GNULIB_MDA_EXECLP =3D @GL_GNULIB_MDA_EXECLP@ +GL_GNULIB_MDA_EXECV =3D @GL_GNULIB_MDA_EXECV@ +GL_GNULIB_MDA_EXECVE =3D @GL_GNULIB_MDA_EXECVE@ +GL_GNULIB_MDA_EXECVP =3D @GL_GNULIB_MDA_EXECVP@ +GL_GNULIB_MDA_EXECVPE =3D @GL_GNULIB_MDA_EXECVPE@ +GL_GNULIB_MDA_FCLOSEALL =3D @GL_GNULIB_MDA_FCLOSEALL@ +GL_GNULIB_MDA_FCVT =3D @GL_GNULIB_MDA_FCVT@ +GL_GNULIB_MDA_FDOPEN =3D @GL_GNULIB_MDA_FDOPEN@ +GL_GNULIB_MDA_FILENO =3D @GL_GNULIB_MDA_FILENO@ +GL_GNULIB_MDA_GCVT =3D @GL_GNULIB_MDA_GCVT@ +GL_GNULIB_MDA_GETCWD =3D @GL_GNULIB_MDA_GETCWD@ +GL_GNULIB_MDA_GETPID =3D @GL_GNULIB_MDA_GETPID@ +GL_GNULIB_MDA_GETW =3D @GL_GNULIB_MDA_GETW@ +GL_GNULIB_MDA_ISATTY =3D @GL_GNULIB_MDA_ISATTY@ +GL_GNULIB_MDA_LSEEK =3D @GL_GNULIB_MDA_LSEEK@ +GL_GNULIB_MDA_MEMCCPY =3D @GL_GNULIB_MDA_MEMCCPY@ +GL_GNULIB_MDA_MKDIR =3D @GL_GNULIB_MDA_MKDIR@ +GL_GNULIB_MDA_MKTEMP =3D @GL_GNULIB_MDA_MKTEMP@ +GL_GNULIB_MDA_OPEN =3D @GL_GNULIB_MDA_OPEN@ +GL_GNULIB_MDA_PUTENV =3D @GL_GNULIB_MDA_PUTENV@ +GL_GNULIB_MDA_PUTW =3D @GL_GNULIB_MDA_PUTW@ +GL_GNULIB_MDA_READ =3D @GL_GNULIB_MDA_READ@ +GL_GNULIB_MDA_RMDIR =3D @GL_GNULIB_MDA_RMDIR@ +GL_GNULIB_MDA_STRDUP =3D @GL_GNULIB_MDA_STRDUP@ +GL_GNULIB_MDA_SWAB =3D @GL_GNULIB_MDA_SWAB@ +GL_GNULIB_MDA_TEMPNAM =3D @GL_GNULIB_MDA_TEMPNAM@ +GL_GNULIB_MDA_TZSET =3D @GL_GNULIB_MDA_TZSET@ +GL_GNULIB_MDA_UMASK =3D @GL_GNULIB_MDA_UMASK@ +GL_GNULIB_MDA_UNLINK =3D @GL_GNULIB_MDA_UNLINK@ +GL_GNULIB_MDA_WRITE =3D @GL_GNULIB_MDA_WRITE@ +GL_GNULIB_MEMCHR =3D @GL_GNULIB_MEMCHR@ +GL_GNULIB_MEMMEM =3D @GL_GNULIB_MEMMEM@ +GL_GNULIB_MEMPCPY =3D @GL_GNULIB_MEMPCPY@ +GL_GNULIB_MEMRCHR =3D @GL_GNULIB_MEMRCHR@ +GL_GNULIB_MKDIR =3D @GL_GNULIB_MKDIR@ +GL_GNULIB_MKDIRAT =3D @GL_GNULIB_MKDIRAT@ +GL_GNULIB_MKDTEMP =3D @GL_GNULIB_MKDTEMP@ +GL_GNULIB_MKFIFO =3D @GL_GNULIB_MKFIFO@ +GL_GNULIB_MKFIFOAT =3D @GL_GNULIB_MKFIFOAT@ +GL_GNULIB_MKNOD =3D @GL_GNULIB_MKNOD@ +GL_GNULIB_MKNODAT =3D @GL_GNULIB_MKNODAT@ +GL_GNULIB_MKOSTEMP =3D @GL_GNULIB_MKOSTEMP@ +GL_GNULIB_MKOSTEMPS =3D @GL_GNULIB_MKOSTEMPS@ +GL_GNULIB_MKSTEMP =3D @GL_GNULIB_MKSTEMP@ +GL_GNULIB_MKSTEMPS =3D @GL_GNULIB_MKSTEMPS@ +GL_GNULIB_MKTIME =3D @GL_GNULIB_MKTIME@ +GL_GNULIB_NANOSLEEP =3D @GL_GNULIB_NANOSLEEP@ +GL_GNULIB_NONBLOCKING =3D @GL_GNULIB_NONBLOCKING@ +GL_GNULIB_OBSTACK_PRINTF =3D @GL_GNULIB_OBSTACK_PRINTF@ +GL_GNULIB_OBSTACK_PRINTF_POSIX =3D @GL_GNULIB_OBSTACK_PRINTF_POSIX@ +GL_GNULIB_OPEN =3D @GL_GNULIB_OPEN@ +GL_GNULIB_OPENAT =3D @GL_GNULIB_OPENAT@ +GL_GNULIB_OPENDIR =3D @GL_GNULIB_OPENDIR@ +GL_GNULIB_OVERRIDES_STRUCT_STAT =3D @GL_GNULIB_OVERRIDES_STRUCT_STAT@ +GL_GNULIB_PCLOSE =3D @GL_GNULIB_PCLOSE@ +GL_GNULIB_PERROR =3D @GL_GNULIB_PERROR@ +GL_GNULIB_PIPE =3D @GL_GNULIB_PIPE@ +GL_GNULIB_PIPE2 =3D @GL_GNULIB_PIPE2@ +GL_GNULIB_POPEN =3D @GL_GNULIB_POPEN@ +GL_GNULIB_POSIX_MEMALIGN =3D @GL_GNULIB_POSIX_MEMALIGN@ +GL_GNULIB_POSIX_OPENPT =3D @GL_GNULIB_POSIX_OPENPT@ +GL_GNULIB_PREAD =3D @GL_GNULIB_PREAD@ +GL_GNULIB_PRINTF =3D @GL_GNULIB_PRINTF@ +GL_GNULIB_PRINTF_POSIX =3D @GL_GNULIB_PRINTF_POSIX@ +GL_GNULIB_PSELECT =3D @GL_GNULIB_PSELECT@ +GL_GNULIB_PTHREAD_SIGMASK =3D @GL_GNULIB_PTHREAD_SIGMASK@ +GL_GNULIB_PTSNAME =3D @GL_GNULIB_PTSNAME@ +GL_GNULIB_PTSNAME_R =3D @GL_GNULIB_PTSNAME_R@ +GL_GNULIB_PUTC =3D @GL_GNULIB_PUTC@ +GL_GNULIB_PUTCHAR =3D @GL_GNULIB_PUTCHAR@ +GL_GNULIB_PUTENV =3D @GL_GNULIB_PUTENV@ +GL_GNULIB_PUTS =3D @GL_GNULIB_PUTS@ +GL_GNULIB_PWRITE =3D @GL_GNULIB_PWRITE@ +GL_GNULIB_QSORT_R =3D @GL_GNULIB_QSORT_R@ +GL_GNULIB_RAISE =3D @GL_GNULIB_RAISE@ +GL_GNULIB_RANDOM =3D @GL_GNULIB_RANDOM@ +GL_GNULIB_RANDOM_R =3D @GL_GNULIB_RANDOM_R@ +GL_GNULIB_RAWMEMCHR =3D @GL_GNULIB_RAWMEMCHR@ +GL_GNULIB_READ =3D @GL_GNULIB_READ@ +GL_GNULIB_READDIR =3D @GL_GNULIB_READDIR@ +GL_GNULIB_READLINK =3D @GL_GNULIB_READLINK@ +GL_GNULIB_READLINKAT =3D @GL_GNULIB_READLINKAT@ +GL_GNULIB_REALLOCARRAY =3D @GL_GNULIB_REALLOCARRAY@ +GL_GNULIB_REALLOC_POSIX =3D @GL_GNULIB_REALLOC_POSIX@ +GL_GNULIB_REALPATH =3D @GL_GNULIB_REALPATH@ +GL_GNULIB_REMOVE =3D @GL_GNULIB_REMOVE@ +GL_GNULIB_RENAME =3D @GL_GNULIB_RENAME@ +GL_GNULIB_RENAMEAT =3D @GL_GNULIB_RENAMEAT@ +GL_GNULIB_REWINDDIR =3D @GL_GNULIB_REWINDDIR@ +GL_GNULIB_RMDIR =3D @GL_GNULIB_RMDIR@ +GL_GNULIB_RPMATCH =3D @GL_GNULIB_RPMATCH@ +GL_GNULIB_SCANDIR =3D @GL_GNULIB_SCANDIR@ +GL_GNULIB_SCANF =3D @GL_GNULIB_SCANF@ +GL_GNULIB_SECURE_GETENV =3D @GL_GNULIB_SECURE_GETENV@ +GL_GNULIB_SELECT =3D @GL_GNULIB_SELECT@ +GL_GNULIB_SETENV =3D @GL_GNULIB_SETENV@ +GL_GNULIB_SETHOSTNAME =3D @GL_GNULIB_SETHOSTNAME@ +GL_GNULIB_SIGABBREV_NP =3D @GL_GNULIB_SIGABBREV_NP@ +GL_GNULIB_SIGACTION =3D @GL_GNULIB_SIGACTION@ +GL_GNULIB_SIGDESCR_NP =3D @GL_GNULIB_SIGDESCR_NP@ +GL_GNULIB_SIGNAL_H_SIGPIPE =3D @GL_GNULIB_SIGNAL_H_SIGPIPE@ +GL_GNULIB_SIGPROCMASK =3D @GL_GNULIB_SIGPROCMASK@ +GL_GNULIB_SLEEP =3D @GL_GNULIB_SLEEP@ +GL_GNULIB_SNPRINTF =3D @GL_GNULIB_SNPRINTF@ +GL_GNULIB_SPRINTF_POSIX =3D @GL_GNULIB_SPRINTF_POSIX@ +GL_GNULIB_STAT =3D @GL_GNULIB_STAT@ +GL_GNULIB_STDIO_H_NONBLOCKING =3D @GL_GNULIB_STDIO_H_NONBLOCKING@ +GL_GNULIB_STDIO_H_SIGPIPE =3D @GL_GNULIB_STDIO_H_SIGPIPE@ +GL_GNULIB_STPCPY =3D @GL_GNULIB_STPCPY@ +GL_GNULIB_STPNCPY =3D @GL_GNULIB_STPNCPY@ +GL_GNULIB_STRCASESTR =3D @GL_GNULIB_STRCASESTR@ +GL_GNULIB_STRCHRNUL =3D @GL_GNULIB_STRCHRNUL@ +GL_GNULIB_STRDUP =3D @GL_GNULIB_STRDUP@ +GL_GNULIB_STRERROR =3D @GL_GNULIB_STRERROR@ +GL_GNULIB_STRERRORNAME_NP =3D @GL_GNULIB_STRERRORNAME_NP@ +GL_GNULIB_STRERROR_R =3D @GL_GNULIB_STRERROR_R@ +GL_GNULIB_STRFTIME =3D @GL_GNULIB_STRFTIME@ +GL_GNULIB_STRNCAT =3D @GL_GNULIB_STRNCAT@ +GL_GNULIB_STRNDUP =3D @GL_GNULIB_STRNDUP@ +GL_GNULIB_STRNLEN =3D @GL_GNULIB_STRNLEN@ +GL_GNULIB_STRPBRK =3D @GL_GNULIB_STRPBRK@ +GL_GNULIB_STRPTIME =3D @GL_GNULIB_STRPTIME@ +GL_GNULIB_STRSEP =3D @GL_GNULIB_STRSEP@ +GL_GNULIB_STRSIGNAL =3D @GL_GNULIB_STRSIGNAL@ +GL_GNULIB_STRSTR =3D @GL_GNULIB_STRSTR@ +GL_GNULIB_STRTOD =3D @GL_GNULIB_STRTOD@ +GL_GNULIB_STRTOIMAX =3D @GL_GNULIB_STRTOIMAX@ +GL_GNULIB_STRTOK_R =3D @GL_GNULIB_STRTOK_R@ +GL_GNULIB_STRTOL =3D @GL_GNULIB_STRTOL@ +GL_GNULIB_STRTOLD =3D @GL_GNULIB_STRTOLD@ +GL_GNULIB_STRTOLL =3D @GL_GNULIB_STRTOLL@ +GL_GNULIB_STRTOUL =3D @GL_GNULIB_STRTOUL@ +GL_GNULIB_STRTOULL =3D @GL_GNULIB_STRTOULL@ +GL_GNULIB_STRTOUMAX =3D @GL_GNULIB_STRTOUMAX@ +GL_GNULIB_STRVERSCMP =3D @GL_GNULIB_STRVERSCMP@ +GL_GNULIB_SYMLINK =3D @GL_GNULIB_SYMLINK@ +GL_GNULIB_SYMLINKAT =3D @GL_GNULIB_SYMLINKAT@ +GL_GNULIB_SYSTEM_POSIX =3D @GL_GNULIB_SYSTEM_POSIX@ +GL_GNULIB_TIMEGM =3D @GL_GNULIB_TIMEGM@ +GL_GNULIB_TIMESPEC_GET =3D @GL_GNULIB_TIMESPEC_GET@ +GL_GNULIB_TIME_R =3D @GL_GNULIB_TIME_R@ +GL_GNULIB_TIME_RZ =3D @GL_GNULIB_TIME_RZ@ +GL_GNULIB_TMPFILE =3D @GL_GNULIB_TMPFILE@ +GL_GNULIB_TRUNCATE =3D @GL_GNULIB_TRUNCATE@ +GL_GNULIB_TTYNAME_R =3D @GL_GNULIB_TTYNAME_R@ +GL_GNULIB_TZSET =3D @GL_GNULIB_TZSET@ +GL_GNULIB_UNISTD_H_GETOPT =3D @GL_GNULIB_UNISTD_H_GETOPT@ +GL_GNULIB_UNISTD_H_NONBLOCKING =3D @GL_GNULIB_UNISTD_H_NONBLOCKING@ +GL_GNULIB_UNISTD_H_SIGPIPE =3D @GL_GNULIB_UNISTD_H_SIGPIPE@ +GL_GNULIB_UNLINK =3D @GL_GNULIB_UNLINK@ +GL_GNULIB_UNLINKAT =3D @GL_GNULIB_UNLINKAT@ +GL_GNULIB_UNLOCKPT =3D @GL_GNULIB_UNLOCKPT@ +GL_GNULIB_UNSETENV =3D @GL_GNULIB_UNSETENV@ +GL_GNULIB_USLEEP =3D @GL_GNULIB_USLEEP@ +GL_GNULIB_UTIMENSAT =3D @GL_GNULIB_UTIMENSAT@ +GL_GNULIB_VASPRINTF =3D @GL_GNULIB_VASPRINTF@ +GL_GNULIB_VDPRINTF =3D @GL_GNULIB_VDPRINTF@ +GL_GNULIB_VFPRINTF =3D @GL_GNULIB_VFPRINTF@ +GL_GNULIB_VFPRINTF_POSIX =3D @GL_GNULIB_VFPRINTF_POSIX@ +GL_GNULIB_VFSCANF =3D @GL_GNULIB_VFSCANF@ +GL_GNULIB_VPRINTF =3D @GL_GNULIB_VPRINTF@ +GL_GNULIB_VPRINTF_POSIX =3D @GL_GNULIB_VPRINTF_POSIX@ +GL_GNULIB_VSCANF =3D @GL_GNULIB_VSCANF@ +GL_GNULIB_VSNPRINTF =3D @GL_GNULIB_VSNPRINTF@ +GL_GNULIB_VSPRINTF_POSIX =3D @GL_GNULIB_VSPRINTF_POSIX@ +GL_GNULIB_WCTOMB =3D @GL_GNULIB_WCTOMB@ +GL_GNULIB_WRITE =3D @GL_GNULIB_WRITE@ +GL_GNULIB__EXIT =3D @GL_GNULIB__EXIT@ GMALLOC_OBJ =3D @GMALLOC_OBJ@ GMP_H =3D @GMP_H@ -GNULIB_ACCESS =3D @GNULIB_ACCESS@ -GNULIB_ALIGNED_ALLOC =3D @GNULIB_ALIGNED_ALLOC@ -GNULIB_ALPHASORT =3D @GNULIB_ALPHASORT@ -GNULIB_ATOLL =3D @GNULIB_ATOLL@ -GNULIB_CALLOC_POSIX =3D @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME =3D @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CHDIR =3D @GNULIB_CHDIR@ -GNULIB_CHOWN =3D @GNULIB_CHOWN@ -GNULIB_CLOSE =3D @GNULIB_CLOSE@ -GNULIB_CLOSEDIR =3D @GNULIB_CLOSEDIR@ -GNULIB_COPY_FILE_RANGE =3D @GNULIB_COPY_FILE_RANGE@ -GNULIB_CREAT =3D @GNULIB_CREAT@ -GNULIB_CTIME =3D @GNULIB_CTIME@ -GNULIB_DIRFD =3D @GNULIB_DIRFD@ -GNULIB_DPRINTF =3D @GNULIB_DPRINTF@ -GNULIB_DUP =3D @GNULIB_DUP@ -GNULIB_DUP2 =3D @GNULIB_DUP2@ -GNULIB_DUP3 =3D @GNULIB_DUP3@ -GNULIB_ENVIRON =3D @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS =3D @GNULIB_EUIDACCESS@ -GNULIB_EXECL =3D @GNULIB_EXECL@ -GNULIB_EXECLE =3D @GNULIB_EXECLE@ -GNULIB_EXECLP =3D @GNULIB_EXECLP@ -GNULIB_EXECV =3D @GNULIB_EXECV@ -GNULIB_EXECVE =3D @GNULIB_EXECVE@ -GNULIB_EXECVP =3D @GNULIB_EXECVP@ -GNULIB_EXECVPE =3D @GNULIB_EXECVPE@ -GNULIB_EXPLICIT_BZERO =3D @GNULIB_EXPLICIT_BZERO@ -GNULIB_FACCESSAT =3D @GNULIB_FACCESSAT@ -GNULIB_FCHDIR =3D @GNULIB_FCHDIR@ -GNULIB_FCHMODAT =3D @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT =3D @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE =3D @GNULIB_FCLOSE@ -GNULIB_FCNTL =3D @GNULIB_FCNTL@ -GNULIB_FDATASYNC =3D @GNULIB_FDATASYNC@ -GNULIB_FDOPEN =3D @GNULIB_FDOPEN@ -GNULIB_FDOPENDIR =3D @GNULIB_FDOPENDIR@ -GNULIB_FFLUSH =3D @GNULIB_FFLUSH@ -GNULIB_FFSL =3D @GNULIB_FFSL@ -GNULIB_FFSLL =3D @GNULIB_FFSLL@ -GNULIB_FGETC =3D @GNULIB_FGETC@ -GNULIB_FGETS =3D @GNULIB_FGETS@ -GNULIB_FOPEN =3D @GNULIB_FOPEN@ -GNULIB_FPRINTF =3D @GNULIB_FPRINTF@ -GNULIB_FPRINTF_POSIX =3D @GNULIB_FPRINTF_POSIX@ -GNULIB_FPURGE =3D @GNULIB_FPURGE@ -GNULIB_FPUTC =3D @GNULIB_FPUTC@ -GNULIB_FPUTS =3D @GNULIB_FPUTS@ -GNULIB_FREAD =3D @GNULIB_FREAD@ -GNULIB_FREE_POSIX =3D @GNULIB_FREE_POSIX@ -GNULIB_FREOPEN =3D @GNULIB_FREOPEN@ -GNULIB_FSCANF =3D @GNULIB_FSCANF@ -GNULIB_FSEEK =3D @GNULIB_FSEEK@ -GNULIB_FSEEKO =3D @GNULIB_FSEEKO@ -GNULIB_FSTAT =3D @GNULIB_FSTAT@ -GNULIB_FSTATAT =3D @GNULIB_FSTATAT@ -GNULIB_FSYNC =3D @GNULIB_FSYNC@ -GNULIB_FTELL =3D @GNULIB_FTELL@ -GNULIB_FTELLO =3D @GNULIB_FTELLO@ -GNULIB_FTRUNCATE =3D @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS =3D @GNULIB_FUTIMENS@ -GNULIB_FWRITE =3D @GNULIB_FWRITE@ -GNULIB_GETC =3D @GNULIB_GETC@ -GNULIB_GETCHAR =3D @GNULIB_GETCHAR@ -GNULIB_GETCWD =3D @GNULIB_GETCWD@ -GNULIB_GETDELIM =3D @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME =3D @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE =3D @GNULIB_GETDTABLESIZE@ -GNULIB_GETENTROPY =3D @GNULIB_GETENTROPY@ -GNULIB_GETGROUPS =3D @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME =3D @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE =3D @GNULIB_GETLINE@ -GNULIB_GETLOADAVG =3D @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN =3D @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R =3D @GNULIB_GETLOGIN_R@ -GNULIB_GETOPT_POSIX =3D @GNULIB_GETOPT_POSIX@ -GNULIB_GETPAGESIZE =3D @GNULIB_GETPAGESIZE@ -GNULIB_GETPASS =3D @GNULIB_GETPASS@ -GNULIB_GETRANDOM =3D @GNULIB_GETRANDOM@ -GNULIB_GETSUBOPT =3D @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY =3D @GNULIB_GETTIMEOFDAY@ -GNULIB_GETUMASK =3D @GNULIB_GETUMASK@ -GNULIB_GETUSERSHELL =3D @GNULIB_GETUSERSHELL@ -GNULIB_GL_UNISTD_H_GETOPT =3D @GNULIB_GL_UNISTD_H_GETOPT@ -GNULIB_GRANTPT =3D @GNULIB_GRANTPT@ -GNULIB_GROUP_MEMBER =3D @GNULIB_GROUP_MEMBER@ -GNULIB_IMAXABS =3D @GNULIB_IMAXABS@ -GNULIB_IMAXDIV =3D @GNULIB_IMAXDIV@ -GNULIB_ISATTY =3D @GNULIB_ISATTY@ -GNULIB_LCHMOD =3D @GNULIB_LCHMOD@ -GNULIB_LCHOWN =3D @GNULIB_LCHOWN@ -GNULIB_LINK =3D @GNULIB_LINK@ -GNULIB_LINKAT =3D @GNULIB_LINKAT@ -GNULIB_LOCALTIME =3D @GNULIB_LOCALTIME@ -GNULIB_LSEEK =3D @GNULIB_LSEEK@ -GNULIB_LSTAT =3D @GNULIB_LSTAT@ -GNULIB_MALLOC_POSIX =3D @GNULIB_MALLOC_POSIX@ -GNULIB_MBSCASECMP =3D @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR =3D @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR =3D @GNULIB_MBSCHR@ -GNULIB_MBSCSPN =3D @GNULIB_MBSCSPN@ -GNULIB_MBSLEN =3D @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP =3D @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN =3D @GNULIB_MBSNLEN@ -GNULIB_MBSPBRK =3D @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP =3D @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR =3D @GNULIB_MBSRCHR@ -GNULIB_MBSSEP =3D @GNULIB_MBSSEP@ -GNULIB_MBSSPN =3D @GNULIB_MBSSPN@ -GNULIB_MBSSTR =3D @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R =3D @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC =3D @GNULIB_MBTOWC@ -GNULIB_MDA_ACCESS =3D @GNULIB_MDA_ACCESS@ -GNULIB_MDA_CHDIR =3D @GNULIB_MDA_CHDIR@ -GNULIB_MDA_CHMOD =3D @GNULIB_MDA_CHMOD@ -GNULIB_MDA_CLOSE =3D @GNULIB_MDA_CLOSE@ -GNULIB_MDA_CREAT =3D @GNULIB_MDA_CREAT@ -GNULIB_MDA_DUP =3D @GNULIB_MDA_DUP@ -GNULIB_MDA_DUP2 =3D @GNULIB_MDA_DUP2@ -GNULIB_MDA_ECVT =3D @GNULIB_MDA_ECVT@ -GNULIB_MDA_EXECL =3D @GNULIB_MDA_EXECL@ -GNULIB_MDA_EXECLE =3D @GNULIB_MDA_EXECLE@ -GNULIB_MDA_EXECLP =3D @GNULIB_MDA_EXECLP@ -GNULIB_MDA_EXECV =3D @GNULIB_MDA_EXECV@ -GNULIB_MDA_EXECVE =3D @GNULIB_MDA_EXECVE@ -GNULIB_MDA_EXECVP =3D @GNULIB_MDA_EXECVP@ -GNULIB_MDA_EXECVPE =3D @GNULIB_MDA_EXECVPE@ -GNULIB_MDA_FCLOSEALL =3D @GNULIB_MDA_FCLOSEALL@ -GNULIB_MDA_FCVT =3D @GNULIB_MDA_FCVT@ -GNULIB_MDA_FDOPEN =3D @GNULIB_MDA_FDOPEN@ -GNULIB_MDA_FILENO =3D @GNULIB_MDA_FILENO@ -GNULIB_MDA_GCVT =3D @GNULIB_MDA_GCVT@ -GNULIB_MDA_GETCWD =3D @GNULIB_MDA_GETCWD@ -GNULIB_MDA_GETPID =3D @GNULIB_MDA_GETPID@ -GNULIB_MDA_GETW =3D @GNULIB_MDA_GETW@ -GNULIB_MDA_ISATTY =3D @GNULIB_MDA_ISATTY@ -GNULIB_MDA_LSEEK =3D @GNULIB_MDA_LSEEK@ -GNULIB_MDA_MEMCCPY =3D @GNULIB_MDA_MEMCCPY@ -GNULIB_MDA_MKDIR =3D @GNULIB_MDA_MKDIR@ -GNULIB_MDA_MKTEMP =3D @GNULIB_MDA_MKTEMP@ -GNULIB_MDA_OPEN =3D @GNULIB_MDA_OPEN@ -GNULIB_MDA_PUTENV =3D @GNULIB_MDA_PUTENV@ -GNULIB_MDA_PUTW =3D @GNULIB_MDA_PUTW@ -GNULIB_MDA_READ =3D @GNULIB_MDA_READ@ -GNULIB_MDA_RMDIR =3D @GNULIB_MDA_RMDIR@ -GNULIB_MDA_STRDUP =3D @GNULIB_MDA_STRDUP@ -GNULIB_MDA_SWAB =3D @GNULIB_MDA_SWAB@ -GNULIB_MDA_TEMPNAM =3D @GNULIB_MDA_TEMPNAM@ -GNULIB_MDA_TZSET =3D @GNULIB_MDA_TZSET@ -GNULIB_MDA_UMASK =3D @GNULIB_MDA_UMASK@ -GNULIB_MDA_UNLINK =3D @GNULIB_MDA_UNLINK@ -GNULIB_MDA_WRITE =3D @GNULIB_MDA_WRITE@ -GNULIB_MEMCHR =3D @GNULIB_MEMCHR@ -GNULIB_MEMMEM =3D @GNULIB_MEMMEM@ -GNULIB_MEMPCPY =3D @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR =3D @GNULIB_MEMRCHR@ -GNULIB_MKDIR =3D @GNULIB_MKDIR@ -GNULIB_MKDIRAT =3D @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP =3D @GNULIB_MKDTEMP@ -GNULIB_MKFIFO =3D @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT =3D @GNULIB_MKFIFOAT@ -GNULIB_MKNOD =3D @GNULIB_MKNOD@ -GNULIB_MKNODAT =3D @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP =3D @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS =3D @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP =3D @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS =3D @GNULIB_MKSTEMPS@ -GNULIB_MKTIME =3D @GNULIB_MKTIME@ -GNULIB_NANOSLEEP =3D @GNULIB_NANOSLEEP@ -GNULIB_NONBLOCKING =3D @GNULIB_NONBLOCKING@ -GNULIB_OBSTACK_PRINTF =3D @GNULIB_OBSTACK_PRINTF@ -GNULIB_OBSTACK_PRINTF_POSIX =3D @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_OPEN =3D @GNULIB_OPEN@ -GNULIB_OPENAT =3D @GNULIB_OPENAT@ -GNULIB_OPENDIR =3D @GNULIB_OPENDIR@ -GNULIB_OVERRIDES_STRUCT_STAT =3D @GNULIB_OVERRIDES_STRUCT_STAT@ GNULIB_OVERRIDES_WINT_T =3D @GNULIB_OVERRIDES_WINT_T@ -GNULIB_PCLOSE =3D @GNULIB_PCLOSE@ -GNULIB_PERROR =3D @GNULIB_PERROR@ -GNULIB_PIPE =3D @GNULIB_PIPE@ -GNULIB_PIPE2 =3D @GNULIB_PIPE2@ -GNULIB_POPEN =3D @GNULIB_POPEN@ -GNULIB_POSIX_MEMALIGN =3D @GNULIB_POSIX_MEMALIGN@ -GNULIB_POSIX_OPENPT =3D @GNULIB_POSIX_OPENPT@ -GNULIB_PREAD =3D @GNULIB_PREAD@ -GNULIB_PRINTF =3D @GNULIB_PRINTF@ -GNULIB_PRINTF_POSIX =3D @GNULIB_PRINTF_POSIX@ -GNULIB_PSELECT =3D @GNULIB_PSELECT@ -GNULIB_PTHREAD_SIGMASK =3D @GNULIB_PTHREAD_SIGMASK@ -GNULIB_PTSNAME =3D @GNULIB_PTSNAME@ -GNULIB_PTSNAME_R =3D @GNULIB_PTSNAME_R@ -GNULIB_PUTC =3D @GNULIB_PUTC@ -GNULIB_PUTCHAR =3D @GNULIB_PUTCHAR@ -GNULIB_PUTENV =3D @GNULIB_PUTENV@ -GNULIB_PUTS =3D @GNULIB_PUTS@ -GNULIB_PWRITE =3D @GNULIB_PWRITE@ -GNULIB_QSORT_R =3D @GNULIB_QSORT_R@ -GNULIB_RAISE =3D @GNULIB_RAISE@ -GNULIB_RANDOM =3D @GNULIB_RANDOM@ -GNULIB_RANDOM_R =3D @GNULIB_RANDOM_R@ -GNULIB_RAWMEMCHR =3D @GNULIB_RAWMEMCHR@ -GNULIB_READ =3D @GNULIB_READ@ -GNULIB_READDIR =3D @GNULIB_READDIR@ -GNULIB_READLINK =3D @GNULIB_READLINK@ -GNULIB_READLINKAT =3D @GNULIB_READLINKAT@ -GNULIB_REALLOCARRAY =3D @GNULIB_REALLOCARRAY@ -GNULIB_REALLOC_POSIX =3D @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH =3D @GNULIB_REALPATH@ -GNULIB_REMOVE =3D @GNULIB_REMOVE@ -GNULIB_RENAME =3D @GNULIB_RENAME@ -GNULIB_RENAMEAT =3D @GNULIB_RENAMEAT@ -GNULIB_REWINDDIR =3D @GNULIB_REWINDDIR@ -GNULIB_RMDIR =3D @GNULIB_RMDIR@ -GNULIB_RPMATCH =3D @GNULIB_RPMATCH@ -GNULIB_SCANDIR =3D @GNULIB_SCANDIR@ -GNULIB_SCANF =3D @GNULIB_SCANF@ -GNULIB_SECURE_GETENV =3D @GNULIB_SECURE_GETENV@ -GNULIB_SELECT =3D @GNULIB_SELECT@ -GNULIB_SETENV =3D @GNULIB_SETENV@ -GNULIB_SETHOSTNAME =3D @GNULIB_SETHOSTNAME@ -GNULIB_SIGABBREV_NP =3D @GNULIB_SIGABBREV_NP@ -GNULIB_SIGACTION =3D @GNULIB_SIGACTION@ -GNULIB_SIGDESCR_NP =3D @GNULIB_SIGDESCR_NP@ -GNULIB_SIGNAL_H_SIGPIPE =3D @GNULIB_SIGNAL_H_SIGPIPE@ -GNULIB_SIGPROCMASK =3D @GNULIB_SIGPROCMASK@ -GNULIB_SLEEP =3D @GNULIB_SLEEP@ -GNULIB_SNPRINTF =3D @GNULIB_SNPRINTF@ -GNULIB_SPRINTF_POSIX =3D @GNULIB_SPRINTF_POSIX@ -GNULIB_STAT =3D @GNULIB_STAT@ -GNULIB_STDIO_H_NONBLOCKING =3D @GNULIB_STDIO_H_NONBLOCKING@ -GNULIB_STDIO_H_SIGPIPE =3D @GNULIB_STDIO_H_SIGPIPE@ -GNULIB_STPCPY =3D @GNULIB_STPCPY@ -GNULIB_STPNCPY =3D @GNULIB_STPNCPY@ -GNULIB_STRCASESTR =3D @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL =3D @GNULIB_STRCHRNUL@ -GNULIB_STRDUP =3D @GNULIB_STRDUP@ -GNULIB_STRERROR =3D @GNULIB_STRERROR@ -GNULIB_STRERRORNAME_NP =3D @GNULIB_STRERRORNAME_NP@ -GNULIB_STRERROR_R =3D @GNULIB_STRERROR_R@ -GNULIB_STRFTIME =3D @GNULIB_STRFTIME@ -GNULIB_STRNCAT =3D @GNULIB_STRNCAT@ -GNULIB_STRNDUP =3D @GNULIB_STRNDUP@ -GNULIB_STRNLEN =3D @GNULIB_STRNLEN@ -GNULIB_STRPBRK =3D @GNULIB_STRPBRK@ -GNULIB_STRPTIME =3D @GNULIB_STRPTIME@ -GNULIB_STRSEP =3D @GNULIB_STRSEP@ -GNULIB_STRSIGNAL =3D @GNULIB_STRSIGNAL@ -GNULIB_STRSTR =3D @GNULIB_STRSTR@ -GNULIB_STRTOD =3D @GNULIB_STRTOD@ -GNULIB_STRTOIMAX =3D @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R =3D @GNULIB_STRTOK_R@ -GNULIB_STRTOLD =3D @GNULIB_STRTOLD@ -GNULIB_STRTOLL =3D @GNULIB_STRTOLL@ -GNULIB_STRTOULL =3D @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX =3D @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP =3D @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK =3D @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT =3D @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX =3D @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM =3D @GNULIB_TIMEGM@ -GNULIB_TIMESPEC_GET =3D @GNULIB_TIMESPEC_GET@ -GNULIB_TIME_R =3D @GNULIB_TIME_R@ -GNULIB_TIME_RZ =3D @GNULIB_TIME_RZ@ -GNULIB_TMPFILE =3D @GNULIB_TMPFILE@ -GNULIB_TRUNCATE =3D @GNULIB_TRUNCATE@ -GNULIB_TTYNAME_R =3D @GNULIB_TTYNAME_R@ -GNULIB_TZSET =3D @GNULIB_TZSET@ -GNULIB_UNISTD_H_NONBLOCKING =3D @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE =3D @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK =3D @GNULIB_UNLINK@ -GNULIB_UNLINKAT =3D @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT =3D @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV =3D @GNULIB_UNSETENV@ -GNULIB_USLEEP =3D @GNULIB_USLEEP@ -GNULIB_UTIMENSAT =3D @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF =3D @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF =3D @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF =3D @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX =3D @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF =3D @GNULIB_VFSCANF@ -GNULIB_VPRINTF =3D @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX =3D @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF =3D @GNULIB_VSCANF@ -GNULIB_VSNPRINTF =3D @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX =3D @GNULIB_VSPRINTF_POSIX@ GNULIB_WARN_CFLAGS =3D @GNULIB_WARN_CFLAGS@ -GNULIB_WCTOMB =3D @GNULIB_WCTOMB@ -GNULIB_WRITE =3D @GNULIB_WRITE@ -GNULIB__EXIT =3D @GNULIB__EXIT@ GNUSTEP_CFLAGS =3D @GNUSTEP_CFLAGS@ GNU_OBJC_CFLAGS =3D @GNU_OBJC_CFLAGS@ GOBJECT_CFLAGS =3D @GOBJECT_CFLAGS@ @@ -652,10 +654,10 @@ HAVE_INTTYPES_H =3D @HAVE_INTTYPES_H@ HAVE_LCHMOD =3D @HAVE_LCHMOD@ HAVE_LCHOWN =3D @HAVE_LCHOWN@ HAVE_LIBGMP =3D @HAVE_LIBGMP@ +HAVE_LIBSECCOMP =3D @HAVE_LIBSECCOMP@ HAVE_LINK =3D @HAVE_LINK@ HAVE_LINKAT =3D @HAVE_LINKAT@ HAVE_LSTAT =3D @HAVE_LSTAT@ -HAVE_MAKEINFO =3D @HAVE_MAKEINFO@ HAVE_MAX_ALIGN_T =3D @HAVE_MAX_ALIGN_T@ HAVE_MBSLEN =3D @HAVE_MBSLEN@ HAVE_MBTOWC =3D @HAVE_MBTOWC@ @@ -672,6 +674,7 @@ HAVE_MKSTEMP =3D @HAVE_MKSTEMP@ HAVE_MKSTEMPS =3D @HAVE_MKSTEMPS@ HAVE_MODULES =3D @HAVE_MODULES@ HAVE_NANOSLEEP =3D @HAVE_NANOSLEEP@ +HAVE_NATIVE_COMP =3D @HAVE_NATIVE_COMP@ HAVE_OPENAT =3D @HAVE_OPENAT@ HAVE_OPENDIR =3D @HAVE_OPENDIR@ HAVE_OS_H =3D @HAVE_OS_H@ @@ -704,6 +707,7 @@ HAVE_RENAMEAT =3D @HAVE_RENAMEAT@ HAVE_REWINDDIR =3D @HAVE_REWINDDIR@ HAVE_RPMATCH =3D @HAVE_RPMATCH@ HAVE_SCANDIR =3D @HAVE_SCANDIR@ +HAVE_SECCOMP =3D @HAVE_SECCOMP@ HAVE_SECURE_GETENV =3D @HAVE_SECURE_GETENV@ HAVE_SETENV =3D @HAVE_SETENV@ HAVE_SETHOSTNAME =3D @HAVE_SETHOSTNAME@ @@ -728,8 +732,10 @@ HAVE_STRPBRK =3D @HAVE_STRPBRK@ HAVE_STRPTIME =3D @HAVE_STRPTIME@ HAVE_STRSEP =3D @HAVE_STRSEP@ HAVE_STRTOD =3D @HAVE_STRTOD@ +HAVE_STRTOL =3D @HAVE_STRTOL@ HAVE_STRTOLD =3D @HAVE_STRTOLD@ HAVE_STRTOLL =3D @HAVE_STRTOLL@ +HAVE_STRTOUL =3D @HAVE_STRTOUL@ HAVE_STRTOULL =3D @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA =3D @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION =3D @HAVE_STRUCT_SIGACTION_SA_SIGACTI= ON@ @@ -789,6 +795,7 @@ LD_SWITCH_SYSTEM =3D @LD_SWITCH_SYSTEM@ LD_SWITCH_SYSTEM_TEMACS =3D @LD_SWITCH_SYSTEM_TEMACS@ LD_SWITCH_X_SITE =3D @LD_SWITCH_X_SITE@ LD_SWITCH_X_SITE_RPATH =3D @LD_SWITCH_X_SITE_RPATH@ +LIBGCCJIT_LIB =3D @LIBGCCJIT_LIB@ LIBGIF =3D @LIBGIF@ LIBGMP =3D @LIBGMP@ LIBGNUTLS_CFLAGS =3D @LIBGNUTLS_CFLAGS@ @@ -806,6 +813,8 @@ LIBOTF_LIBS =3D @LIBOTF_LIBS@ LIBPNG =3D @LIBPNG@ LIBRESOLV =3D @LIBRESOLV@ LIBS =3D @LIBS@ +LIBSECCOMP_CFLAGS =3D @LIBSECCOMP_CFLAGS@ +LIBSECCOMP_LIBS =3D @LIBSECCOMP_LIBS@ LIBSELINUX_LIBS =3D @LIBSELINUX_LIBS@ LIBSOUND =3D @LIBSOUND@ LIBSYSTEMD_CFLAGS =3D @LIBSYSTEMD_CFLAGS@ @@ -1022,6 +1031,7 @@ REPLACE_READ =3D @REPLACE_READ@ REPLACE_READLINK =3D @REPLACE_READLINK@ REPLACE_READLINKAT =3D @REPLACE_READLINKAT@ REPLACE_REALLOC =3D @REPLACE_REALLOC@ +REPLACE_REALLOCARRAY =3D @REPLACE_REALLOCARRAY@ REPLACE_REALPATH =3D @REPLACE_REALPATH@ REPLACE_REMOVE =3D @REPLACE_REMOVE@ REPLACE_RENAME =3D @REPLACE_RENAME@ @@ -1052,7 +1062,11 @@ REPLACE_STRSTR =3D @REPLACE_STRSTR@ REPLACE_STRTOD =3D @REPLACE_STRTOD@ REPLACE_STRTOIMAX =3D @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R =3D @REPLACE_STRTOK_R@ +REPLACE_STRTOL =3D @REPLACE_STRTOL@ REPLACE_STRTOLD =3D @REPLACE_STRTOLD@ +REPLACE_STRTOLL =3D @REPLACE_STRTOLL@ +REPLACE_STRTOUL =3D @REPLACE_STRTOUL@ +REPLACE_STRTOULL =3D @REPLACE_STRTOULL@ REPLACE_STRTOUMAX =3D @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL =3D @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK =3D @REPLACE_SYMLINK@ @@ -1103,6 +1117,7 @@ UNISTD_H_HAVE_SYS_RANDOM_H =3D @UNISTD_H_HAVE_SYS_R= ANDOM_H@ UNISTD_H_HAVE_WINSOCK2_H =3D @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS =3D @UNISTD_H_HAVE_WINSOCK2_H_A= ND_USE_SOCKETS@ USE_ACL =3D @USE_ACL@ +USE_STARTUP_NOTIFICATION =3D @USE_STARTUP_NOTIFICATION@ VMLIMIT_OBJ =3D @VMLIMIT_OBJ@ W32_LIBS =3D @W32_LIBS@ W32_OBJ =3D @W32_OBJ@ @@ -1171,17 +1186,18 @@ gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb= 7 =3D @gl_GNULIB_ENABLED_03e0aaad gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b =3D @gl_GNULIB_ENABLE= D_260941c0e5dc67ec9e87d1fb321c300b@ gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31 =3D @gl_GNULIB_ENABLE= D_5264294aa0a5557541b53c8c741f7f31@ gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c =3D @gl_GNULIB_ENABLE= D_6099e9737f757db36c47fa9d9f02e88c@ +gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4 =3D @gl_GNULIB_ENABLE= D_61bcaca76b3e6f9ae55d57a1c3193bc4@ gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec =3D @gl_GNULIB_ENABLE= D_682e609604ccaac6be382e4ee3a4eaec@ gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c =3D @gl_GNULIB_ENABLE= D_925677f0343de64b89a9f0c790b4104c@ gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1 =3D @gl_GNULIB_ENABLE= D_a9786850e999ae65a836a6041e8e5ed1@ gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36 =3D @gl_GNULIB_ENABLE= D_be453cec5eecf5731a274f2de7f2db36@ gl_GNULIB_ENABLED_cloexec =3D @gl_GNULIB_ENABLED_cloexec@ +gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b =3D @gl_GNULIB_ENABLE= D_d3b2383720ee0e541357aa2aac598e2b@ gl_GNULIB_ENABLED_dirfd =3D @gl_GNULIB_ENABLED_dirfd@ gl_GNULIB_ENABLED_dynarray =3D @gl_GNULIB_ENABLED_dynarray@ gl_GNULIB_ENABLED_euidaccess =3D @gl_GNULIB_ENABLED_euidaccess@ gl_GNULIB_ENABLED_getdtablesize =3D @gl_GNULIB_ENABLED_getdtablesize@ gl_GNULIB_ENABLED_getgroups =3D @gl_GNULIB_ENABLED_getgroups@ -gl_GNULIB_ENABLED_idx =3D @gl_GNULIB_ENABLED_idx@ gl_GNULIB_ENABLED_lchmod =3D @gl_GNULIB_ENABLED_lchmod@ gl_GNULIB_ENABLED_open =3D @gl_GNULIB_ENABLED_open@ gl_GNULIB_ENABLED_rawmemchr =3D @gl_GNULIB_ENABLED_rawmemchr@ @@ -1205,6 +1221,7 @@ libdir =3D @libdir@ libexecdir =3D @libexecdir@ liblockfile =3D @liblockfile@ lispdir =3D @lispdir@ +lispdirrel =3D @lispdirrel@ lisppath =3D @lisppath@ localedir =3D @localedir@ locallisppath =3D @locallisppath@ @@ -1212,6 +1229,8 @@ localstatedir =3D @localstatedir@ mandir =3D @mandir@ ns_appbindir =3D @ns_appbindir@ ns_appdir =3D @ns_appdir@ +ns_applibdir =3D @ns_applibdir@ +ns_applibexecdir =3D @ns_applibexecdir@ ns_appresdir =3D @ns_appresdir@ ns_appsrc =3D @ns_appsrc@ ns_check_file =3D @ns_check_file@ @@ -1221,6 +1240,7 @@ pdfdir =3D @pdfdir@ prefix =3D @prefix@ program_transform_name =3D @program_transform_name@ psdir =3D @psdir@ +runstatedir =3D @runstatedir@ sbindir =3D @sbindir@ sharedstatedir =3D @sharedstatedir@ srcdir =3D @srcdir@ @@ -1513,14 +1533,14 @@ dirent.h: dirent.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ - -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ - -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ - -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ - -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ - -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ - -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ - -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ - -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ + -e 's/@''GNULIB_OPENDIR''@/$(GL_GNULIB_OPENDIR)/g' \ + -e 's/@''GNULIB_READDIR''@/$(GL_GNULIB_READDIR)/g' \ + -e 's/@''GNULIB_REWINDDIR''@/$(GL_GNULIB_REWINDDIR)/g' \ + -e 's/@''GNULIB_CLOSEDIR''@/$(GL_GNULIB_CLOSEDIR)/g' \ + -e 's/@''GNULIB_DIRFD''@/$(GL_GNULIB_DIRFD)/g' \ + -e 's/@''GNULIB_FDOPENDIR''@/$(GL_GNULIB_FDOPENDIR)/g' \ + -e 's/@''GNULIB_SCANDIR''@/$(GL_GNULIB_SCANDIR)/g' \ + -e 's/@''GNULIB_ALPHASORT''@/$(GL_GNULIB_ALPHASORT)/g' \ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ @@ -1595,6 +1615,32 @@ endif ifeq (,$(OMIT_GNULIB_MODULE_dynarray)) =20 ifneq (,$(gl_GNULIB_ENABLED_dynarray)) +BUILT_SOURCES +=3D malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h + +malloc/dynarray.gl.h: malloc/dynarray.h + $(AM_V_at)$(MKDIR_P) malloc + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES +=3D malloc/dynarray.gl.h malloc/dynarray.gl.h-t + +malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c + $(AM_V_at)$(MKDIR_P) malloc + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|||g' \ + -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ + -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \ + -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g'= \ + -e 's|__glibc_likely|_GL_LIKELY|g' \ + -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ + < $(srcdir)/malloc/dynarray-skeleton.c; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES +=3D malloc/dynarray-skeleton.gl.h malloc/dynarray-skel= eton.gl.h-t + libgnu_a_SOURCES +=3D malloc/dynarray_at_failure.c mallo= c/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c = malloc/dynarray_resize.c malloc/dynarray_r= esize_clear.c =20 endif @@ -1751,13 +1797,13 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status= $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ - -e 's/@''GNULIB_CREAT''@/$(GNULIB_CREAT)/g' \ - -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ - -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ - -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ - -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ - -e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \ - -e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \ + -e 's/@''GNULIB_CREAT''@/$(GL_GNULIB_CREAT)/g' \ + -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \ + -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \ + -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \ + -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \ + -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \ + -e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \ @@ -2032,10 +2078,8 @@ endif ## begin gnulib module idx ifeq (,$(OMIT_GNULIB_MODULE_idx)) =20 -ifneq (,$(gl_GNULIB_ENABLED_idx)) libgnu_a_SOURCES +=3D idx.h =20 -endif endif ## end gnulib module idx =20 @@ -2100,10 +2144,10 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.= status $(CXXDEFS_H) $(WARN_ON_U -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ - -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ - -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ - -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ - -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ + -e 's/@''GNULIB_IMAXABS''@/$(GL_GNULIB_IMAXABS)/g' \ + -e 's/@''GNULIB_IMAXDIV''@/$(GL_GNULIB_IMAXDIV)/g' \ + -e 's/@''GNULIB_STRTOIMAX''@/$(GL_GNULIB_STRTOIMAX)/g' \ + -e 's/@''GNULIB_STRTOUMAX''@/$(GL_GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ @@ -2413,6 +2457,32 @@ EXTRA_libgnu_a_SOURCES +=3D at-func.c readlinkat.c= endif ## end gnulib module readlinkat =20 +## begin gnulib module realloc-gnu +ifeq (,$(OMIT_GNULIB_MODULE_realloc-gnu)) + +ifneq (,$(gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b)) + +endif +EXTRA_DIST +=3D realloc.c + +EXTRA_libgnu_a_SOURCES +=3D realloc.c + +endif +## end gnulib module realloc-gnu + +## begin gnulib module realloc-posix +ifeq (,$(OMIT_GNULIB_MODULE_realloc-posix)) + +ifneq (,$(gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4)) + +endif +EXTRA_DIST +=3D realloc.c + +EXTRA_libgnu_a_SOURCES +=3D realloc.c + +endif +## end gnulib module realloc-posix + ## begin gnulib module regex ifeq (,$(OMIT_GNULIB_MODULE_regex)) =20 @@ -2439,6 +2509,21 @@ endif ifeq (,$(OMIT_GNULIB_MODULE_scratch_buffer)) =20 ifneq (,$(gl_GNULIB_ENABLED_scratch_buffer)) +BUILT_SOURCES +=3D malloc/scratch_buffer.gl.h + +malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h + $(AM_V_at)$(MKDIR_P) malloc + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ + -e 's|__glibc_likely|_GL_LIKELY|g' \ + -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ + -e '/libc_hidden_proto/d' \ + < $(srcdir)/malloc/scratch_buffer.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES +=3D malloc/scratch_buffer.gl.h malloc/scratch_buffer.g= l.h-t + libgnu_a_SOURCES +=3D malloc/scratch_buffer_dupfree.c ma= lloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_pre= serve.c malloc/scratch_buffer_set_array_size.c =20 endif @@ -2484,11 +2569,11 @@ signal.h: signal.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ - -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \= - -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \ - -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g'= \ - -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ - -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ + -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GL_GNULIB_PTHREAD_SIGMASK)/g= ' \ + -e 's/@''GNULIB_RAISE''@/$(GL_GNULIB_RAISE)/g' \ + -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GL_GNULIB_SIGNAL_H_SIGPIPE)= /g' \ + -e 's/@''GNULIB_SIGPROCMASK''@/$(GL_GNULIB_SIGPROCMASK)/g' \ + -e 's/@''GNULIB_SIGACTION''@/$(GL_GNULIB_SIGACTION)/g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING= )|g' \ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ @@ -2674,7 +2759,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status= -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g'= \ + -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRID= E_WINT_T)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ @@ -2704,65 +2789,65 @@ stdio.h: stdio.in.h $(top_builddir)/config.status= $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ - -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ - -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ - -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ - -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ - -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ - -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ - -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ - -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ - -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ - -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ - -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ - -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ - -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ - -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ - -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ - -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ - -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ - -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ - -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ - -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ - -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ - -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_P= OSIX)/g' \ - -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ - -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ - -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ - -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ - -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ - -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ - -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ - -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ - -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ - -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ - -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ - -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ - -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKI= NG)/g' \ - -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \= - -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ - -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ - -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ - -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ - -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ - -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ - -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GNULIB_MDA_FCLOSEALL)/g' \ - -e 's/@''GNULIB_MDA_FDOPEN''@/$(GNULIB_MDA_FDOPEN)/g' \ - -e 's/@''GNULIB_MDA_FILENO''@/$(GNULIB_MDA_FILENO)/g' \ - -e 's/@''GNULIB_MDA_GETW''@/$(GNULIB_MDA_GETW)/g' \ - -e 's/@''GNULIB_MDA_PUTW''@/$(GNULIB_MDA_PUTW)/g' \ - -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GNULIB_MDA_TEMPNAM)/g' \ + -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \ + -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \ + -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \ + -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \ + -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \ + -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \ + -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \ + -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \ + -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \ + -e 's/@''GNULIB_FPUTC''@/$(GL_GNULIB_FPUTC)/g' \ + -e 's/@''GNULIB_FPUTS''@/$(GL_GNULIB_FPUTS)/g' \ + -e 's/@''GNULIB_FREAD''@/$(GL_GNULIB_FREAD)/g' \ + -e 's/@''GNULIB_FREOPEN''@/$(GL_GNULIB_FREOPEN)/g' \ + -e 's/@''GNULIB_FSCANF''@/$(GL_GNULIB_FSCANF)/g' \ + -e 's/@''GNULIB_FSEEK''@/$(GL_GNULIB_FSEEK)/g' \ + -e 's/@''GNULIB_FSEEKO''@/$(GL_GNULIB_FSEEKO)/g' \ + -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \ + -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \ + -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \ + -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \ + -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \ + -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \ + -e 's/@''GNULIB_GETLINE''@/$(GL_GNULIB_GETLINE)/g' \ + -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GL_GNULIB_OBSTACK_PRINTF)/g' = \ + -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GL_GNULIB_OBSTACK_PRINT= F_POSIX)/g' \ + -e 's/@''GNULIB_PCLOSE''@/$(GL_GNULIB_PCLOSE)/g' \ + -e 's/@''GNULIB_PERROR''@/$(GL_GNULIB_PERROR)/g' \ + -e 's/@''GNULIB_POPEN''@/$(GL_GNULIB_POPEN)/g' \ + -e 's/@''GNULIB_PRINTF''@/$(GL_GNULIB_PRINTF)/g' \ + -e 's/@''GNULIB_PRINTF_POSIX''@/$(GL_GNULIB_PRINTF_POSIX)/g' \ + -e 's/@''GNULIB_PUTC''@/$(GL_GNULIB_PUTC)/g' \ + -e 's/@''GNULIB_PUTCHAR''@/$(GL_GNULIB_PUTCHAR)/g' \ + -e 's/@''GNULIB_PUTS''@/$(GL_GNULIB_PUTS)/g' \ + -e 's/@''GNULIB_REMOVE''@/$(GL_GNULIB_REMOVE)/g' \ + -e 's/@''GNULIB_RENAME''@/$(GL_GNULIB_RENAME)/g' \ + -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \ + -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \ + -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \ + -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLO= CKING)/g' \ + -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g= ' \ + -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \ + -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \ + -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' = \ + -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \ + -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \ + -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \ + -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \ + -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' = \ + -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \ + -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \ + -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \ + -e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \ + -e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \ + -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \ -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ @@ -2842,49 +2927,51 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ - -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \ - -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ - -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ - -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_F= ILE_NAME)/g' \ - -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \ - -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ - -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ - -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ - -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ - -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ - -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ - -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ - -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ - -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \ - -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ - -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ - -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ - -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ - -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ - -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ - -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ - -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ - -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ - -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ - -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ - -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ - -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ - -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ - -e 's/@''GNULIB_STRTOLD''@/$(GNULIB_STRTOLD)/g' \ - -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ - -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ - -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ - -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ - -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ - -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ - -e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \ - -e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \ - -e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \ - -e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \ - -e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \ + -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \ + -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \ + -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \ + -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \ + -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZ= E_FILE_NAME)/g' \ + -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \ + -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \ + -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \ + -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \ + -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \ + -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \ + -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMPS''@/$(GL_GNULIB_MKOSTEMPS)/g' \ + -e 's/@''GNULIB_MKSTEMP''@/$(GL_GNULIB_MKSTEMP)/g' \ + -e 's/@''GNULIB_MKSTEMPS''@/$(GL_GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GL_GNULIB_POSIX_MEMALIGN)/g' = \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GL_GNULIB_POSIX_OPENPT)/g' \ + -e 's/@''GNULIB_PTSNAME''@/$(GL_GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \ + -e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \ + -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \ + -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \ + -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \ + -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \ + -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \ + -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \ + -e 's/@''GNULIB_RPMATCH''@/$(GL_GNULIB_RPMATCH)/g' \ + -e 's/@''GNULIB_SECURE_GETENV''@/$(GL_GNULIB_SECURE_GETENV)/g' \ + -e 's/@''GNULIB_SETENV''@/$(GL_GNULIB_SETENV)/g' \ + -e 's/@''GNULIB_STRTOD''@/$(GL_GNULIB_STRTOD)/g' \ + -e 's/@''GNULIB_STRTOL''@/$(GL_GNULIB_STRTOL)/g' \ + -e 's/@''GNULIB_STRTOLD''@/$(GL_GNULIB_STRTOLD)/g' \ + -e 's/@''GNULIB_STRTOLL''@/$(GL_GNULIB_STRTOLL)/g' \ + -e 's/@''GNULIB_STRTOUL''@/$(GL_GNULIB_STRTOUL)/g' \ + -e 's/@''GNULIB_STRTOULL''@/$(GL_GNULIB_STRTOULL)/g' \ + -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GL_GNULIB_SYSTEM_POSIX)/g' \ + -e 's/@''GNULIB_UNLOCKPT''@/$(GL_GNULIB_UNLOCKPT)/g' \ + -e 's/@''GNULIB_UNSETENV''@/$(GL_GNULIB_UNSETENV)/g' \ + -e 's/@''GNULIB_WCTOMB''@/$(GL_GNULIB_WCTOMB)/g' \ + -e 's/@''GNULIB_MDA_ECVT''@/$(GL_GNULIB_MDA_ECVT)/g' \ + -e 's/@''GNULIB_MDA_FCVT''@/$(GL_GNULIB_MDA_FCVT)/g' \ + -e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \ + -e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \ + -e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \ @@ -2920,8 +3007,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.statu= s $(CXXDEFS_H) \ -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \ -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ + -e 's|@''HAVE_STRTOL''@|$(HAVE_STRTOL)|g' \ -e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ + -e 's|@''HAVE_STRTOUL''@|$(HAVE_STRTOUL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g'= \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ @@ -2943,11 +3032,16 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) \ -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ + -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ + -e 's|@''REPLACE_STRTOL''@|$(REPLACE_STRTOL)|g' \ -e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \ + -e 's|@''REPLACE_STRTOLL''@|$(REPLACE_STRTOLL)|g' \ + -e 's|@''REPLACE_STRTOUL''@|$(REPLACE_STRTOUL)|g' \ + -e 's|@''REPLACE_STRTOULL''@|$(REPLACE_STRTOULL)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ @@ -2989,49 +3083,49 @@ string.h: string.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ - -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ - -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ - -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ - -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ - -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ - -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ - -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ - -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ - -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ - -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ - -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ - -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ - -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ - -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ - -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ - -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ - -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ - -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ - -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ - -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ - -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ - -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ - -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ - -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ - -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ - -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ - -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ - -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ - -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ - -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ - -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ - -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ - -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ - -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ - -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ - -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \= - -e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \ - -e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \ - -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ - -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ - -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \ - -e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \ + -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GL_GNULIB_EXPLICIT_BZERO)/g' = \ + -e 's/@''GNULIB_FFSL''@/$(GL_GNULIB_FFSL)/g' \ + -e 's/@''GNULIB_FFSLL''@/$(GL_GNULIB_FFSLL)/g' \ + -e 's/@''GNULIB_MBSLEN''@/$(GL_GNULIB_MBSLEN)/g' \ + -e 's/@''GNULIB_MBSNLEN''@/$(GL_GNULIB_MBSNLEN)/g' \ + -e 's/@''GNULIB_MBSCHR''@/$(GL_GNULIB_MBSCHR)/g' \ + -e 's/@''GNULIB_MBSRCHR''@/$(GL_GNULIB_MBSRCHR)/g' \ + -e 's/@''GNULIB_MBSSTR''@/$(GL_GNULIB_MBSSTR)/g' \ + -e 's/@''GNULIB_MBSCASECMP''@/$(GL_GNULIB_MBSCASECMP)/g' \ + -e 's/@''GNULIB_MBSNCASECMP''@/$(GL_GNULIB_MBSNCASECMP)/g' \ + -e 's/@''GNULIB_MBSPCASECMP''@/$(GL_GNULIB_MBSPCASECMP)/g' \ + -e 's/@''GNULIB_MBSCASESTR''@/$(GL_GNULIB_MBSCASESTR)/g' \ + -e 's/@''GNULIB_MBSCSPN''@/$(GL_GNULIB_MBSCSPN)/g' \ + -e 's/@''GNULIB_MBSPBRK''@/$(GL_GNULIB_MBSPBRK)/g' \ + -e 's/@''GNULIB_MBSSPN''@/$(GL_GNULIB_MBSSPN)/g' \ + -e 's/@''GNULIB_MBSSEP''@/$(GL_GNULIB_MBSSEP)/g' \ + -e 's/@''GNULIB_MBSTOK_R''@/$(GL_GNULIB_MBSTOK_R)/g' \ + -e 's/@''GNULIB_MEMCHR''@/$(GL_GNULIB_MEMCHR)/g' \ + -e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \ + -e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \ + -e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \ + -e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \ + -e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \ + -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \ + -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \ + -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \ + -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \ + -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \ + -e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \ + -e 's/@''GNULIB_STRPBRK''@/$(GL_GNULIB_STRPBRK)/g' \ + -e 's/@''GNULIB_STRSEP''@/$(GL_GNULIB_STRSEP)/g' \ + -e 's/@''GNULIB_STRSTR''@/$(GL_GNULIB_STRSTR)/g' \ + -e 's/@''GNULIB_STRCASESTR''@/$(GL_GNULIB_STRCASESTR)/g' \ + -e 's/@''GNULIB_STRTOK_R''@/$(GL_GNULIB_STRTOK_R)/g' \ + -e 's/@''GNULIB_STRERROR''@/$(GL_GNULIB_STRERROR)/g' \ + -e 's/@''GNULIB_STRERROR_R''@/$(GL_GNULIB_STRERROR_R)/g' \ + -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GL_GNULIB_STRERRORNAME_NP)/g= ' \ + -e 's/@''GNULIB_SIGABBREV_NP''@/$(GL_GNULIB_SIGABBREV_NP)/g' \ + -e 's/@''GNULIB_SIGDESCR_NP''@/$(GL_GNULIB_SIGDESCR_NP)/g' \ + -e 's/@''GNULIB_STRSIGNAL''@/$(GL_GNULIB_STRSIGNAL)/g' \ + -e 's/@''GNULIB_STRVERSCMP''@/$(GL_GNULIB_STRVERSCMP)/g' \ + -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \ + -e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ @@ -3150,7 +3244,7 @@ sys/random.h: sys_random.in.h $(top_builddir)/confi= g.status $(CXXDEFS_H) $(ARG_N -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_RANDOM_H''@|$(NEXT_SYS_RANDOM_H)|g' \ -e 's|@''HAVE_SYS_RANDOM_H''@|$(HAVE_SYS_RANDOM_H)|g' \ - -e 's/@''GNULIB_GETRANDOM''@/$(GNULIB_GETRANDOM)/g' \ + -e 's/@''GNULIB_GETRANDOM''@/$(GL_GNULIB_GETRANDOM)/g' \ -e 's/@''HAVE_GETRANDOM''@/$(HAVE_GETRANDOM)/g' \ -e 's/@''REPLACE_GETRANDOM''@/$(REPLACE_GETRANDOM)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ @@ -3184,8 +3278,8 @@ sys/select.h: sys_select.in.h $(top_builddir)/confi= g.status $(CXXDEFS_H) $(WARN_ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ - -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ - -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ + -e 's/@''GNULIB_PSELECT''@/$(GL_GNULIB_PSELECT)/g' \ + -e 's/@''GNULIB_SELECT''@/$(GL_GNULIB_SELECT)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ @@ -3221,25 +3315,25 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.= status $(CXXDEFS_H) $(ARG_NONNU -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \= -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ - -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ - -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ - -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ - -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ - -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \ - -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ - -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ - -e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \ - -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ - -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ - -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ - -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ - -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ - -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ - -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ - -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUC= T_STAT)/g' \ - -e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \ - -e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \ - -e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \ + -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \ + -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \ + -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \ + -e 's/@''GNULIB_FUTIMENS''@/$(GL_GNULIB_FUTIMENS)/g' \ + -e 's/@''GNULIB_GETUMASK''@/$(GL_GNULIB_GETUMASK)/g' \ + -e 's/@''GNULIB_LCHMOD''@/$(GL_GNULIB_LCHMOD)/g' \ + -e 's/@''GNULIB_LSTAT''@/$(GL_GNULIB_LSTAT)/g' \ + -e 's/@''GNULIB_MKDIR''@/$(GL_GNULIB_MKDIR)/g' \ + -e 's/@''GNULIB_MKDIRAT''@/$(GL_GNULIB_MKDIRAT)/g' \ + -e 's/@''GNULIB_MKFIFO''@/$(GL_GNULIB_MKFIFO)/g' \ + -e 's/@''GNULIB_MKFIFOAT''@/$(GL_GNULIB_MKFIFOAT)/g' \ + -e 's/@''GNULIB_MKNOD''@/$(GL_GNULIB_MKNOD)/g' \ + -e 's/@''GNULIB_MKNODAT''@/$(GL_GNULIB_MKNODAT)/g' \ + -e 's/@''GNULIB_STAT''@/$(GL_GNULIB_STAT)/g' \ + -e 's/@''GNULIB_UTIMENSAT''@/$(GL_GNULIB_UTIMENSAT)/g' \ + -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GL_GNULIB_OVERRIDES_ST= RUCT_STAT)/g' \ + -e 's/@''GNULIB_MDA_CHMOD''@/$(GL_GNULIB_MDA_CHMOD)/g' \ + -e 's/@''GNULIB_MDA_MKDIR''@/$(GL_GNULIB_MDA_MKDIR)/g' \ + -e 's/@''GNULIB_MDA_UMASK''@/$(GL_GNULIB_MDA_UMASK)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ @@ -3295,7 +3389,7 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.st= atus $(CXXDEFS_H) $(ARG_NONNU -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GL_GNULIB_GETTIMEOFDAY)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ @@ -3367,18 +3461,18 @@ time.h: time.in.h $(top_builddir)/config.status $= (CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \ - -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \ - -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ - -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ - -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \ - -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ - -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ - -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \ - -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ - -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ - -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \ - -e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \ + -e 's/@''GNULIB_CTIME''@/$(GL_GNULIB_CTIME)/g' \ + -e 's/@''GNULIB_LOCALTIME''@/$(GL_GNULIB_LOCALTIME)/g' \ + -e 's/@''GNULIB_MKTIME''@/$(GL_GNULIB_MKTIME)/g' \ + -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \ + -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \ + -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \ + -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \ + -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \ + -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \ + -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \ + -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \ + -e 's/@''GNULIB_MDA_TZSET''@/$(GL_GNULIB_MDA_TZSET)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ @@ -3499,89 +3593,89 @@ unistd.h: unistd.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \ - -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ - -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ - -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ - -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GNULIB_COPY_FILE_RANGE)/g' \= - -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ - -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ - -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ - -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ - -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ - -e 's/@''GNULIB_EXECL''@/$(GNULIB_EXECL)/g' \ - -e 's/@''GNULIB_EXECLE''@/$(GNULIB_EXECLE)/g' \ - -e 's/@''GNULIB_EXECLP''@/$(GNULIB_EXECLP)/g' \ - -e 's/@''GNULIB_EXECV''@/$(GNULIB_EXECV)/g' \ - -e 's/@''GNULIB_EXECVE''@/$(GNULIB_EXECVE)/g' \ - -e 's/@''GNULIB_EXECVP''@/$(GNULIB_EXECVP)/g' \ - -e 's/@''GNULIB_EXECVPE''@/$(GNULIB_EXECVPE)/g' \ - -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ - -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ - -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ - -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ - -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ - -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ - -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ - -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ - -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ - -e 's/@''GNULIB_GETENTROPY''@/$(GNULIB_GETENTROPY)/g' \ - -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ - -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ - -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ - -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ - -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \ - -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ - -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ - -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ - -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ - -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ - -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ - -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ - -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ - -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ - -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ - -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ - -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ - -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ - -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ - -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ - -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ - -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ - -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ - -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ - -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ - -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ - -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ - -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/= g' \ - -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOC= KING)/g' \ - -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g'= \ - -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ - -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ - -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ - -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ - -e 's/@''GNULIB_MDA_ACCESS''@/$(GNULIB_MDA_ACCESS)/g' \ - -e 's/@''GNULIB_MDA_CHDIR''@/$(GNULIB_MDA_CHDIR)/g' \ - -e 's/@''GNULIB_MDA_CLOSE''@/$(GNULIB_MDA_CLOSE)/g' \ - -e 's/@''GNULIB_MDA_DUP''@/$(GNULIB_MDA_DUP)/g' \ - -e 's/@''GNULIB_MDA_DUP2''@/$(GNULIB_MDA_DUP2)/g' \ - -e 's/@''GNULIB_MDA_EXECL''@/$(GNULIB_MDA_EXECL)/g' \ - -e 's/@''GNULIB_MDA_EXECLE''@/$(GNULIB_MDA_EXECLE)/g' \ - -e 's/@''GNULIB_MDA_EXECLP''@/$(GNULIB_MDA_EXECLP)/g' \ - -e 's/@''GNULIB_MDA_EXECV''@/$(GNULIB_MDA_EXECV)/g' \ - -e 's/@''GNULIB_MDA_EXECVE''@/$(GNULIB_MDA_EXECVE)/g' \ - -e 's/@''GNULIB_MDA_EXECVP''@/$(GNULIB_MDA_EXECVP)/g' \ - -e 's/@''GNULIB_MDA_EXECVPE''@/$(GNULIB_MDA_EXECVPE)/g' \ - -e 's/@''GNULIB_MDA_GETCWD''@/$(GNULIB_MDA_GETCWD)/g' \ - -e 's/@''GNULIB_MDA_GETPID''@/$(GNULIB_MDA_GETPID)/g' \ - -e 's/@''GNULIB_MDA_ISATTY''@/$(GNULIB_MDA_ISATTY)/g' \ - -e 's/@''GNULIB_MDA_LSEEK''@/$(GNULIB_MDA_LSEEK)/g' \ - -e 's/@''GNULIB_MDA_READ''@/$(GNULIB_MDA_READ)/g' \ - -e 's/@''GNULIB_MDA_RMDIR''@/$(GNULIB_MDA_RMDIR)/g' \ - -e 's/@''GNULIB_MDA_SWAB''@/$(GNULIB_MDA_SWAB)/g' \ - -e 's/@''GNULIB_MDA_UNLINK''@/$(GNULIB_MDA_UNLINK)/g' \ - -e 's/@''GNULIB_MDA_WRITE''@/$(GNULIB_MDA_WRITE)/g' \ + -e 's/@''GNULIB_ACCESS''@/$(GL_GNULIB_ACCESS)/g' \ + -e 's/@''GNULIB_CHDIR''@/$(GL_GNULIB_CHDIR)/g' \ + -e 's/@''GNULIB_CHOWN''@/$(GL_GNULIB_CHOWN)/g' \ + -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GL_GNULIB_COPY_FILE_RANGE)/g= ' \ + -e 's/@''GNULIB_DUP''@/$(GL_GNULIB_DUP)/g' \ + -e 's/@''GNULIB_DUP2''@/$(GL_GNULIB_DUP2)/g' \ + -e 's/@''GNULIB_DUP3''@/$(GL_GNULIB_DUP3)/g' \ + -e 's/@''GNULIB_ENVIRON''@/$(GL_GNULIB_ENVIRON)/g' \ + -e 's/@''GNULIB_EUIDACCESS''@/$(GL_GNULIB_EUIDACCESS)/g' \ + -e 's/@''GNULIB_EXECL''@/$(GL_GNULIB_EXECL)/g' \ + -e 's/@''GNULIB_EXECLE''@/$(GL_GNULIB_EXECLE)/g' \ + -e 's/@''GNULIB_EXECLP''@/$(GL_GNULIB_EXECLP)/g' \ + -e 's/@''GNULIB_EXECV''@/$(GL_GNULIB_EXECV)/g' \ + -e 's/@''GNULIB_EXECVE''@/$(GL_GNULIB_EXECVE)/g' \ + -e 's/@''GNULIB_EXECVP''@/$(GL_GNULIB_EXECVP)/g' \ + -e 's/@''GNULIB_EXECVPE''@/$(GL_GNULIB_EXECVPE)/g' \ + -e 's/@''GNULIB_FACCESSAT''@/$(GL_GNULIB_FACCESSAT)/g' \ + -e 's/@''GNULIB_FCHDIR''@/$(GL_GNULIB_FCHDIR)/g' \ + -e 's/@''GNULIB_FCHOWNAT''@/$(GL_GNULIB_FCHOWNAT)/g' \ + -e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \ + -e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \ + -e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \ + -e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \ + -e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \ + -e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \ + -e 's/@''GNULIB_GETENTROPY''@/$(GL_GNULIB_GETENTROPY)/g' \ + -e 's/@''GNULIB_GETGROUPS''@/$(GL_GNULIB_GETGROUPS)/g' \ + -e 's/@''GNULIB_GETHOSTNAME''@/$(GL_GNULIB_GETHOSTNAME)/g' \ + -e 's/@''GNULIB_GETLOGIN''@/$(GL_GNULIB_GETLOGIN)/g' \ + -e 's/@''GNULIB_GETLOGIN_R''@/$(GL_GNULIB_GETLOGIN_R)/g' \ + -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \ + -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \ + -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \ + -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \ + -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \ + -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \ + -e 's/@''GNULIB_LCHOWN''@/$(GL_GNULIB_LCHOWN)/g' \ + -e 's/@''GNULIB_LINK''@/$(GL_GNULIB_LINK)/g' \ + -e 's/@''GNULIB_LINKAT''@/$(GL_GNULIB_LINKAT)/g' \ + -e 's/@''GNULIB_LSEEK''@/$(GL_GNULIB_LSEEK)/g' \ + -e 's/@''GNULIB_PIPE''@/$(GL_GNULIB_PIPE)/g' \ + -e 's/@''GNULIB_PIPE2''@/$(GL_GNULIB_PIPE2)/g' \ + -e 's/@''GNULIB_PREAD''@/$(GL_GNULIB_PREAD)/g' \ + -e 's/@''GNULIB_PWRITE''@/$(GL_GNULIB_PWRITE)/g' \ + -e 's/@''GNULIB_READ''@/$(GL_GNULIB_READ)/g' \ + -e 's/@''GNULIB_READLINK''@/$(GL_GNULIB_READLINK)/g' \ + -e 's/@''GNULIB_READLINKAT''@/$(GL_GNULIB_READLINKAT)/g' \ + -e 's/@''GNULIB_RMDIR''@/$(GL_GNULIB_RMDIR)/g' \ + -e 's/@''GNULIB_SETHOSTNAME''@/$(GL_GNULIB_SETHOSTNAME)/g' \ + -e 's/@''GNULIB_SLEEP''@/$(GL_GNULIB_SLEEP)/g' \ + -e 's/@''GNULIB_SYMLINK''@/$(GL_GNULIB_SYMLINK)/g' \ + -e 's/@''GNULIB_SYMLINKAT''@/$(GL_GNULIB_SYMLINKAT)/g' \ + -e 's/@''GNULIB_TRUNCATE''@/$(GL_GNULIB_TRUNCATE)/g' \ + -e 's/@''GNULIB_TTYNAME_R''@/$(GL_GNULIB_TTYNAME_R)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GL_GNULIB_UNISTD_H_GETOPT)/= g' \ + -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GL_GNULIB_UNISTD_H_NONB= LOCKING)/g' \ + -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GL_GNULIB_UNISTD_H_SIGPIPE)= /g' \ + -e 's/@''GNULIB_UNLINK''@/$(GL_GNULIB_UNLINK)/g' \ + -e 's/@''GNULIB_UNLINKAT''@/$(GL_GNULIB_UNLINKAT)/g' \ + -e 's/@''GNULIB_USLEEP''@/$(GL_GNULIB_USLEEP)/g' \ + -e 's/@''GNULIB_WRITE''@/$(GL_GNULIB_WRITE)/g' \ + -e 's/@''GNULIB_MDA_ACCESS''@/$(GL_GNULIB_MDA_ACCESS)/g' \ + -e 's/@''GNULIB_MDA_CHDIR''@/$(GL_GNULIB_MDA_CHDIR)/g' \ + -e 's/@''GNULIB_MDA_CLOSE''@/$(GL_GNULIB_MDA_CLOSE)/g' \ + -e 's/@''GNULIB_MDA_DUP''@/$(GL_GNULIB_MDA_DUP)/g' \ + -e 's/@''GNULIB_MDA_DUP2''@/$(GL_GNULIB_MDA_DUP2)/g' \ + -e 's/@''GNULIB_MDA_EXECL''@/$(GL_GNULIB_MDA_EXECL)/g' \ + -e 's/@''GNULIB_MDA_EXECLE''@/$(GL_GNULIB_MDA_EXECLE)/g' \ + -e 's/@''GNULIB_MDA_EXECLP''@/$(GL_GNULIB_MDA_EXECLP)/g' \ + -e 's/@''GNULIB_MDA_EXECV''@/$(GL_GNULIB_MDA_EXECV)/g' \ + -e 's/@''GNULIB_MDA_EXECVE''@/$(GL_GNULIB_MDA_EXECVE)/g' \ + -e 's/@''GNULIB_MDA_EXECVP''@/$(GL_GNULIB_MDA_EXECVP)/g' \ + -e 's/@''GNULIB_MDA_EXECVPE''@/$(GL_GNULIB_MDA_EXECVPE)/g' \ + -e 's/@''GNULIB_MDA_GETCWD''@/$(GL_GNULIB_MDA_GETCWD)/g' \ + -e 's/@''GNULIB_MDA_GETPID''@/$(GL_GNULIB_MDA_GETPID)/g' \ + -e 's/@''GNULIB_MDA_ISATTY''@/$(GL_GNULIB_MDA_ISATTY)/g' \ + -e 's/@''GNULIB_MDA_LSEEK''@/$(GL_GNULIB_MDA_LSEEK)/g' \ + -e 's/@''GNULIB_MDA_READ''@/$(GL_GNULIB_MDA_READ)/g' \ + -e 's/@''GNULIB_MDA_RMDIR''@/$(GL_GNULIB_MDA_RMDIR)/g' \ + -e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \ + -e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \ + -e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \ @@ -3688,14 +3782,14 @@ EXTRA_DIST +=3D unistd.in.h endif ## end gnulib module unistd =20 -## begin gnulib module unlocked-io -ifeq (,$(OMIT_GNULIB_MODULE_unlocked-io)) +## begin gnulib module unlocked-io-internal +ifeq (,$(OMIT_GNULIB_MODULE_unlocked-io-internal)) =20 =20 EXTRA_DIST +=3D unlocked-io.h =20 endif -## end gnulib module unlocked-io +## end gnulib module unlocked-io-internal =20 ## begin gnulib module update-copyright ifeq (,$(OMIT_GNULIB_MODULE_update-copyright)) diff --git a/lib/group-member.c b/lib/group-member.c index 52159016ea..24aea3599c 100644 --- a/lib/group-member.c +++ b/lib/group-member.c @@ -3,17 +3,17 @@ Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2021 Free Softwa= re Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include @@ -25,7 +25,7 @@ #include #include =20 -#include "xalloc-oversized.h" +#include "intprops.h" =20 /* Most processes have no more than this many groups, and for these processes we can avoid using malloc. */ @@ -53,10 +53,10 @@ get_group_info (struct group_info *gi) if (n_groups < 0) { int n_group_slots =3D getgroups (0, NULL); - if (0 <=3D n_group_slots - && ! xalloc_oversized (n_group_slots, sizeof *gi->group)) + size_t nbytes; + if (! INT_MULTIPLY_WRAPV (n_group_slots, sizeof *gi->group, &nbyte= s)) { - gi->group =3D malloc (n_group_slots * sizeof *gi->group); + gi->group =3D malloc (nbytes); if (gi->group) n_groups =3D getgroups (n_group_slots, gi->group); } diff --git a/lib/idx.h b/lib/idx.h index 681c8c90f1..483587eabb 100644 --- a/lib/idx.h +++ b/lib/idx.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/ieee754.in.h b/lib/ieee754.in.h index ce13efc918..ce371cbcea 100644 --- a/lib/ieee754.in.h +++ b/lib/ieee754.in.h @@ -2,16 +2,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/ignore-value.h b/lib/ignore-value.h index 0a3cf1e95b..6099abad97 100644 --- a/lib/ignore-value.h +++ b/lib/ignore-value.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Jim Meyering, Eric Blake and P=C3=A1draig Brady. */ diff --git a/lib/intprops.h b/lib/intprops.h index 2a420ac831..9d10028a59 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -3,16 +3,16 @@ Copyright (C) 2001-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2.1 of the License, o= r (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ @@ -133,7 +133,8 @@ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + = 1) operators might not yield numerically correct answers due to arithmetic overflow. They do not rely on undefined or implementation-defined behavior. Their implementations are simple - and straightforward, but they are a bit harder to use than the + and straightforward, but they are harder to use and may be less + efficient than the INT__WRAPV, INT__OK, and INT__OVERFLOW macros described below. =20 Example usage: @@ -158,6 +159,9 @@ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + = 1) must have minimum value MIN and maximum MAX. Unsigned types should use a zero MIN of the proper type. =20 + Because all arguments are subject to integer promotions, these + macros typically do not work on types narrower than 'int'. + These macros are tuned for constant MIN and MAX. For commutative operations such as A + B, they are also tuned for constant B. */ =20 @@ -339,9 +343,15 @@ #define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) = \ arguments should not have side effects. =20 The WRAPV macros are not constant expressions. They support only - +, binary -, and *. Because the WRAPV macros convert the result, - they report overflow in different circumstances than the OVERFLOW - macros do. + +, binary -, and *. + + Because the WRAPV macros convert the result, they report overflow + in different circumstances than the OVERFLOW macros do. For + example, in the typical case with 16-bit 'short' and 32-bit 'int', + if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B) + returns false because the addition cannot overflow after A and B + are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns + true or false depending on whether the sum fits into 'short'. =20 These macros are tuned for their last input argument being a constant= =2E =20 diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index e9ee500e3e..41cb4220ce 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -2,17 +2,17 @@ Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* diff --git a/lib/libc-config.h b/lib/libc-config.h index c0eac707cf..f68749fc74 100644 --- a/lib/libc-config.h +++ b/lib/libc-config.h @@ -3,16 +3,16 @@ Copyright 2017-2021 Free Software Foundation, Inc. =20 This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ =20 @@ -28,14 +28,17 @@ =20 When compiled as part of glibc this is a no-op; when compiled as part of Gnulib this includes Gnulib's and defines macros - that glibc library code would normally assume. */ + that glibc library code would normally assume. + + Note: This header file MUST NOT be included by public header files + of Gnulib. */ =20 #include =20 /* On glibc this includes and and #defines - _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it - includes which defines __nonnull. Elsewhere it - is harmless. */ + _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 and + DragonFlyBSD 5.9 it includes which defines __nonnull. + Elsewhere it is harmless. */ #include =20 /* From glibc . */ @@ -71,7 +74,7 @@ # endif #endif =20 -#ifndef __attribute_maybe_unused__ +#ifndef __attribute_nonnull__ /* either does not exist, or is too old for Gnulib. Prepare to include , which is Gnulib's version of a more-recent glibc . */ @@ -80,13 +83,9 @@ # ifndef _FEATURES_H # define _FEATURES_H 1 # endif -/* Define __WORDSIZE so that does not attempt to include - nonexistent files. Make it a syntax error, since Gnulib does not - use __WORDSIZE now, and if Gnulib uses it later the syntax error - will let us know that __WORDSIZE needs configuring. */ -# ifndef __WORDSIZE -# define __WORDSIZE %%% -# endif +/* Define __GNULIB_CDEFS so that does not attempt to include + nonexistent files. */ +# define __GNULIB_CDEFS /* Undef the macros unconditionally defined by our copy of glibc , so that they do not clash with any system-defined versions. */ diff --git a/lib/limits.in.h b/lib/limits.in.h index 076ab9ef54..65ea12dbc8 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h @@ -2,18 +2,18 @@ =20 Copyright 2016-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 3, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/lstat.c b/lib/lstat.c index a584c6aa06..7de0bf1027 100644 --- a/lib/lstat.c +++ b/lib/lstat.c @@ -2,17 +2,17 @@ =20 Copyright (C) 1997-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Jim Meyering */ diff --git a/lib/malloc/dynarray-skeleton.c b/lib/malloc/dynarray-skeleto= n.c index 4995fd1c04..48210e3252 100644 --- a/lib/malloc/dynarray-skeleton.c +++ b/lib/malloc/dynarray-skeleton.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -192,7 +192,7 @@ DYNARRAY_NAME (free__array__) (struct DYNARRAY_STRUCT= *list) =20 /* Initialize a dynamic array object. This must be called before any use of the object. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static void DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) { @@ -202,7 +202,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) } =20 /* Deallocate the dynamic array and its elements. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) { @@ -213,7 +213,7 @@ DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) } =20 /* Return true if the dynamic array is in an error state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline bool DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) { @@ -222,7 +222,7 @@ DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STR= UCT *list) =20 /* Mark the dynamic array as failed. All elements are deallocated as a side effect. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static void DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) { @@ -236,7 +236,7 @@ DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *= list) =20 /* Return the number of elements which have been added to the dynamic array. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline size_t DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) { @@ -245,7 +245,7 @@ DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *l= ist) =20 /* Return a pointer to the array element at INDEX. Terminate the process if INDEX is out of bounds. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) { @@ -257,7 +257,7 @@ DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, siz= e_t index) /* Return a pointer to the first array element, if any. For a zero-length array, the pointer can be NULL even though the dynamic array has not entered the failure state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) { @@ -267,7 +267,7 @@ DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) /* Return a pointer one element past the last array element. For a zero-length array, the pointer can be NULL even though the dynamic array has not entered the failure state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) { @@ -294,7 +294,7 @@ DYNARRAY_NAME (add__) (struct DYNARRAY_STRUCT *list, = DYNARRAY_ELEMENT item) /* Add ITEM at the end of the array, enlarging it by one element. Mark *LIST as failed if the dynamic array allocation size cannot be increased. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline void DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item= ) { @@ -348,7 +348,8 @@ DYNARRAY_NAME (emplace__) (struct DYNARRAY_STRUCT *li= st) /* Allocate a place for a new element in *LIST and return a pointer to it. The pointer can be NULL if the dynamic array cannot be enlarged due to a memory allocation failure. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((= 1)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1)) static /* Avoid inlining with the larger initialization code. */ #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)= ) @@ -372,7 +373,7 @@ DYNARRAY_NAME (emplace) (struct DYNARRAY_STRUCT *list= ) existing size, new elements are added (which can be initialized). Otherwise, the list is truncated, and elements are freed. Return false on memory allocation failure (and mark *LIST as failed). */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static bool DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) { @@ -417,7 +418,7 @@ DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list,= size_t size) } =20 /* Remove the last element of LIST if it is present. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) { @@ -434,7 +435,7 @@ DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *= list) =20 /* Remove all elements from the list. The elements are freed, but the list itself is not. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) { @@ -452,7 +453,8 @@ DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) stored in *RESULT if LIST refers to an empty list. On success, the pointer in *RESULT is heap-allocated and must be deallocated using free. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((= 1, 2)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1, 2)) static bool DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, DYNARRAY_FINAL_TYPE *result) @@ -483,7 +485,8 @@ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *lis= t, have a sentinel at the end). If LENGTHP is not NULL, the array length is written to *LENGTHP. *LIST is re-initialized and can be reused. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((= 1)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1)) static DYNARRAY_ELEMENT * DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp)= { diff --git a/lib/malloc/dynarray.h b/lib/malloc/dynarray.h index 84e4394bf3..638c33f986 100644 --- a/lib/malloc/dynarray.h +++ b/lib/malloc/dynarray.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/dynarray_at_failure.c b/lib/malloc/dynarray_at_fa= ilure.c index a442459374..4f840db7c5 100644 --- a/lib/malloc/dynarray_at_failure.c +++ b/lib/malloc/dynarray_at_failure.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_emplace_enlarge.c b/lib/malloc/dynarray_= emplace_enlarge.c index 7ac4b6db40..0f8baf94ad 100644 --- a/lib/malloc/dynarray_emplace_enlarge.c +++ b/lib/malloc/dynarray_emplace_enlarge.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_finalize.c b/lib/malloc/dynarray_finaliz= e.c index be9441e313..c33da41389 100644 --- a/lib/malloc/dynarray_finalize.c +++ b/lib/malloc/dynarray_finalize.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_resize.c b/lib/malloc/dynarray_resize.c index 92bbddd446..5a57166a84 100644 --- a/lib/malloc/dynarray_resize.c +++ b/lib/malloc/dynarray_resize.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_resize_clear.c b/lib/malloc/dynarray_res= ize_clear.c index 99c2cc87c3..9c43b00c3a 100644 --- a/lib/malloc/dynarray_resize_clear.c +++ b/lib/malloc/dynarray_resize_clear.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include =20 diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h index 26e306212d..36d0bef4bb 100644 --- a/lib/malloc/scratch_buffer.h +++ b/lib/malloc/scratch_buffer.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_dupfree.c b/lib/malloc/scratch_buf= fer_dupfree.c index 775bff5609..07363b9bc8 100644 --- a/lib/malloc/scratch_buffer_dupfree.c +++ b/lib/malloc/scratch_buffer_dupfree.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer= _grow.c index e7606d81cd..22c8c7781e 100644 --- a/lib/malloc/scratch_buffer_grow.c +++ b/lib/malloc/scratch_buffer_grow.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_grow_preserve.c b/lib/malloc/scrat= ch_buffer_grow_preserve.c index 59f8c71000..2b2b819289 100644 --- a/lib/malloc/scratch_buffer_grow_preserve.c +++ b/lib/malloc/scratch_buffer_grow_preserve.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_set_array_size.c b/lib/malloc/scra= tch_buffer_set_array_size.c index e2b9f31211..a47f9276a8 100644 --- a/lib/malloc/scratch_buffer_set_array_size.c +++ b/lib/malloc/scratch_buffer_set_array_size.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/md5.c b/lib/md5.c index e7eeeaab03..b1dd452ed2 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -4,18 +4,18 @@ Foundation, Inc. This file is part of the GNU C Library. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Ulrich Drepper , 1995. */ =20 diff --git a/lib/md5.h b/lib/md5.h index aa4b0805d5..ca7c78ed5c 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -4,18 +4,18 @@ Foundation, Inc. This file is part of the GNU C Library. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _MD5_H #define _MD5_H 1 diff --git a/lib/memmem.c b/lib/memmem.c index 87266fa87a..142de576d9 100644 --- a/lib/memmem.c +++ b/lib/memmem.c @@ -2,18 +2,18 @@ Foundation, Inc. This file is part of the GNU C Library. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* This particular implementation was written by Eric Blake, 2008. */ =20 diff --git a/lib/mempcpy.c b/lib/mempcpy.c index fea618a9e5..cacacdbc62 100644 --- a/lib/mempcpy.c +++ b/lib/mempcpy.c @@ -1,24 +1,27 @@ /* Copy memory area and return pointer after last written byte. Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 /* Specification. */ #include =20 +/* A function definition is only needed if HAVE_MEMPCPY is not defined. = */ +#if !HAVE_MEMPCPY + /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ void * @@ -26,3 +29,5 @@ mempcpy (void *dest, const void *src, size_t n) { return (char *) memcpy (dest, src, n) + n; } + +#endif diff --git a/lib/memrchr.c b/lib/memrchr.c index dcd24fafc6..e0d47d13d7 100644 --- a/lib/memrchr.c +++ b/lib/memrchr.c @@ -9,17 +9,17 @@ adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),= and implemented by Roland McGrath (roland@ai.mit.edu). =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if defined _LIBC diff --git a/lib/mini-gmp-gnulib.c b/lib/mini-gmp-gnulib.c index d46c2b993b..08aa8f97c1 100644 --- a/lib/mini-gmp-gnulib.c +++ b/lib/mini-gmp-gnulib.c @@ -2,18 +2,26 @@ =20 Copyright 2018-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License and the GNU General Public License + for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E */ + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ =20 #include =20 diff --git a/lib/mini-gmp.c b/lib/mini-gmp.c index de061e673a..28b159752e 100644 --- a/lib/mini-gmp.c +++ b/lib/mini-gmp.c @@ -2,21 +2,21 @@ =20 Contributed to the GNU project by Niels M=C3=B6ller =20 -Copyright 1991-1997, 1999-2020 Free Software Foundation, Inc. +Copyright 1991-1997, 1999-2021 Free Software Foundation, Inc. =20 This file is part of the GNU MP Library. =20 The GNU MP Library is free software; you can redistribute it and/or modi= fy it under the terms of either: =20 - * the GNU General Public License as published by the Free + * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. =20 or =20 * the GNU General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any= + Foundation; either version 2 of the License, or (at your option) any= later version. =20 or both in parallel, as here. @@ -27,7 +27,7 @@ for more details. =20 You should have received copies of the GNU General Public License and th= e -GNU General Public License along with the GNU MP Library. If not, +GNU Lesser General Public License along with the GNU MP Library. If not= , see https://www.gnu.org/licenses/. */ =20 /* NOTE: All functions in this file which are not declared in diff --git a/lib/mini-gmp.h b/lib/mini-gmp.h index 59a37e6494..59c24cf511 100644 --- a/lib/mini-gmp.h +++ b/lib/mini-gmp.h @@ -1,20 +1,20 @@ /* mini-gmp, a minimalistic implementation of a GNU GMP subset. =20 -Copyright 2011-2015, 2017, 2019-2020 Free Software Foundation, Inc. +Copyright 2011-2015, 2017, 2019-2021 Free Software Foundation, Inc. =20 This file is part of the GNU MP Library. =20 The GNU MP Library is free software; you can redistribute it and/or modi= fy it under the terms of either: =20 - * the GNU General Public License as published by the Free + * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. =20 or =20 * the GNU General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any= + Foundation; either version 2 of the License, or (at your option) any= later version. =20 or both in parallel, as here. @@ -25,7 +25,7 @@ for more details. =20 You should have received copies of the GNU General Public License and th= e -GNU General Public License along with the GNU MP Library. If not, +GNU Lesser General Public License along with the GNU MP Library. If not= , see https://www.gnu.org/licenses/. */ =20 /* About mini-gmp: This is a minimal implementation of a subset of the @@ -296,6 +296,7 @@ #define MPZ_ROINIT_N(xp, xs) {{0, (xs),(xp) }} || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ || defined (__STDIO_LOADED) /* VMS */ \ + || defined (_STDIO) /* HPE NonStop */ \ || defined (__DEFINED_FILE) /* musl */ size_t mpz_out_str (FILE *, int, const mpz_t); #endif diff --git a/lib/minmax.h b/lib/minmax.h index eb9fb09a54..a03361bafa 100644 --- a/lib/minmax.h +++ b/lib/minmax.h @@ -2,18 +2,18 @@ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _MINMAX_H #define _MINMAX_H diff --git a/lib/mkostemp.c b/lib/mkostemp.c index 9d733ddd10..285f1badf8 100644 --- a/lib/mkostemp.c +++ b/lib/mkostemp.c @@ -2,17 +2,17 @@ Foundation, Inc. This file is derived from the one in the GNU C Library. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if !_LIBC diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h index 9c447bd7b0..7386625d3d 100644 --- a/lib/mktime-internal.h +++ b/lib/mktime-internal.h @@ -4,16 +4,16 @@ Contributed by Paul Eggert . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/mktime.c b/lib/mktime.c index 2c7cd7ba83..ae721c72e6 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -4,16 +4,16 @@ Contributed by Paul Eggert . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/nstrftime.c b/lib/nstrftime.c index 2f5e4fbe63..7f258e8727 100644 --- a/lib/nstrftime.c +++ b/lib/nstrftime.c @@ -1,19 +1,18 @@ /* Copyright (C) 1991-2021 Free Software Foundation, Inc. This file is part of the GNU C Library. =20 - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - The GNU C Library is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with the GNU C Library; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifdef _LIBC # define USE_IN_EXTENDED_LOCALE_MODEL 1 diff --git a/lib/open.c b/lib/open.c index 8599185331..372cda8816 100644 --- a/lib/open.c +++ b/lib/open.c @@ -1,17 +1,17 @@ /* Open a descriptor to a file. Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Bruno Haible , 2007. */ diff --git a/lib/pathmax.h b/lib/pathmax.h index 49cf4629c7..716f4a9aae 100644 --- a/lib/pathmax.h +++ b/lib/pathmax.h @@ -2,18 +2,18 @@ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _PATHMAX_H # define _PATHMAX_H diff --git a/lib/pipe2.c b/lib/pipe2.c index adbaa4a102..9ba8c3b703 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -1,18 +1,18 @@ /* Create a pipe, with specific opening flags. Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 @@ -41,7 +41,7 @@ pipe2 (int fd[2], int flags) { /* Mingw _pipe() corrupts fd on failure; also, if we succeed at creating the pipe but later fail at changing fcntl, we want - to leave fd unchanged: https://austingroupbugs.net/view.php?id=3D46= 7 */ + to leave fd unchanged: http://austingroupbugs.net/view.php?id=3D467= */ int tmp[2]; tmp[0] =3D fd[0]; tmp[1] =3D fd[1]; diff --git a/lib/pselect.c b/lib/pselect.c index 0fda4eef6e..b5fadc6728 100644 --- a/lib/pselect.c +++ b/lib/pselect.c @@ -4,18 +4,18 @@ =20 This file is part of gnulib. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ =20 diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c index 8a692048a0..11b7091e7f 100644 --- a/lib/pthread_sigmask.c +++ b/lib/pthread_sigmask.c @@ -1,17 +1,17 @@ /* POSIX compatible signal blocking for threads. Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c index bbb250feb8..896d435afc 100644 --- a/lib/rawmemchr.c +++ b/lib/rawmemchr.c @@ -1,17 +1,17 @@ /* Searching in a string. Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include @@ -19,6 +19,9 @@ /* Specification. */ #include =20 +/* A function definition is only needed if HAVE_RAWMEMCHR is not defined= =2E */ +#if !HAVE_RAWMEMCHR + /* Find the first occurrence of C in S. */ void * rawmemchr (const void *s, int c_in) @@ -134,3 +137,5 @@ rawmemchr (const void *s, int c_in) char_ptr++; return (void *) char_ptr; } + +#endif diff --git a/lib/rawmemchr.valgrind b/lib/rawmemchr.valgrind index 087d5e4178..d489c320c3 100644 --- a/lib/rawmemchr.valgrind +++ b/lib/rawmemchr.valgrind @@ -2,17 +2,17 @@ =20 # Copyright (C) 2008-2021 Free Software Foundation, Inc. # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. +# This file is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. # -# This program is distributed in the hope that it will be useful, +# This file is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Lesser General Public Licen= se # along with this program. If not, see .= =20 # This use is OK because it provides only a speedup. diff --git a/lib/readlink.c b/lib/readlink.c index c4b635ce71..d4f4b08e99 100644 --- a/lib/readlink.c +++ b/lib/readlink.c @@ -1,17 +1,17 @@ /* Read the contents of a symbolic link. Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/realloc.c b/lib/realloc.c new file mode 100644 index 0000000000..af03f0c577 --- /dev/null +++ b/lib/realloc.c @@ -0,0 +1,63 @@ +/* realloc() function that is glibc compatible. + + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2021 Free Software + Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + +/* written by Jim Meyering and Bruno Haible */ + +#include + +#include + +#include + +#include "xalloc-oversized.h" + +/* Call the system's realloc below. This file does not define + _GL_USE_STDLIB_ALLOC because it needs Gnulib's malloc if present. */= +#undef realloc + +/* Change the size of an allocated block of memory P to N bytes, + with error checking. If P is NULL, use malloc. Otherwise if N is ze= ro, + free P and return NULL. */ + +void * +rpl_realloc (void *p, size_t n) +{ + if (p =3D=3D NULL) + return malloc (n); + + if (n =3D=3D 0) + { + free (p); + return NULL; + } + + if (xalloc_oversized (n, 1)) + { + errno =3D ENOMEM; + return NULL; + } + + void *result =3D realloc (p, n); + +#if !HAVE_MALLOC_POSIX + if (result =3D=3D NULL) + errno =3D ENOMEM; +#endif + + return result; +} diff --git a/lib/regcomp.c b/lib/regcomp.c index 0c31b0e14c..887e5b5068 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -1695,12 +1695,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_= t *dfa, Idx node, bool root) reg_errcode_t err; Idx i; re_node_set eclosure; - bool ok; bool incomplete =3D false; err =3D re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (__glibc_unlikely (err !=3D REG_NOERROR)) return err; =20 + /* An epsilon closure includes itself. */ + eclosure.elems[eclosure.nelem++] =3D node; + /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem =3D -1; @@ -1753,10 +1755,6 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t= *dfa, Idx node, bool root) } } =20 - /* An epsilon closure includes itself. */ - ok =3D re_node_set_insert (&eclosure, node); - if (__glibc_unlikely (! ok)) - return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem =3D 0; else diff --git a/lib/regex.c b/lib/regex.c index f76a416b3b..7296be0f08 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/regex.h b/lib/regex.h index d291e38793..8e4ef45578 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -4,16 +4,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/regex_internal.c b/lib/regex_internal.c index 73087c8610..55f6b66de0 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -1314,6 +1314,7 @@ re_node_set_insert (re_node_set *set, Idx elem) { for (idx =3D set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] =3D set->elems[idx - 1]; + DEBUG_ASSERT (set->elems[idx - 1] < elem); } =20 /* Insert the new element. */ diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 4c634edcbf..1245e782ff 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -32,7 +32,10 @@ #define _REGEX_INTERNAL_H 1 #include #include =20 -#include +#ifndef _LIBC +# include +#endif + #include #include =20 @@ -50,14 +53,14 @@ #define _REGEX_INTERNAL_H 1 # define lock_fini(lock) ((void) 0) # define lock_lock(lock) __libc_lock_lock (lock) # define lock_unlock(lock) __libc_lock_unlock (lock) -#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO +#elif defined GNULIB_LOCK && !defined GNULIB_REGEX_SINGLE_THREAD # include "glthread/lock.h" # define lock_define(name) gl_lock_define (, name) # define lock_init(lock) glthread_lock_init (&(lock)) # define lock_fini(lock) glthread_lock_destroy (&(lock)) # define lock_lock(lock) glthread_lock_lock (&(lock)) # define lock_unlock(lock) glthread_lock_unlock (&(lock)) -#elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO +#elif defined GNULIB_PTHREAD && !defined GNULIB_REGEX_SINGLE_THREAD # include # define lock_define(name) pthread_mutex_t name; # define lock_init(lock) pthread_mutex_init (&(lock), 0) diff --git a/lib/regexec.c b/lib/regexec.c index 15dc57bd0e..5e4eb497a6 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -59,7 +59,7 @@ Idx cur_idx, Idx nmatch); static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, - regmatch_t *regs, + regmatch_t *regs, regmatch_t *prevregs, re_node_set *eps_via_nodes); static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, @@ -186,7 +186,8 @@ REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. =20 - We return 0 if we find a match and REG_NOMATCH if not. */ + Return 0 if a match is found, REG_NOMATCH if not, REG_BADPAT if + EFLAGS is invalid. */ =20 int regexec (const regex_t *__restrict preg, const char *__restrict string, @@ -269,8 +270,8 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC= _2_0); strings.) =20 On success, re_match* functions return the length of the match, re_se= arch* - return the position of the start of the match. Return value -1 means= no - match was found and -2 indicates an internal error. */ + return the position of the start of the match. They return -1 on + match failure, -2 on error. */ =20 regoff_t re_match (struct re_pattern_buffer *bufp, const char *string, Idx length= , @@ -1206,27 +1207,30 @@ check_halt_state_context (const re_match_context_= t *mctx, /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA= corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES; - return -1 in case of errors. */ + return -1 on match failure, -2 on error. */ =20 static Idx proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t= *regs, + regmatch_t *prevregs, Idx *pidx, Idx node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa =3D mctx->dfa; - Idx i; - bool ok; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes =3D &mctx->state_log[*pidx]->nodes; re_node_set *edests =3D &dfa->edests[node]; - Idx dest_node; - ok =3D re_node_set_insert (eps_via_nodes, node); - if (__glibc_unlikely (! ok)) - return -2; - /* Pick up a valid destination, or return -1 if none - is found. */ - for (dest_node =3D -1, i =3D 0; i < edests->nelem; ++i) + + if (! re_node_set_contains (eps_via_nodes, node)) + { + bool ok =3D re_node_set_insert (eps_via_nodes, node); + if (__glibc_unlikely (! ok)) + return -2; + } + + /* Pick a valid destination, or return -1 if none is found. */ + Idx dest_node =3D -1; + for (Idx i =3D 0; i < edests->nelem; i++) { Idx candidate =3D edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) @@ -1244,7 +1248,7 @@ proceed_next_node (const re_match_context_t *mctx, = Idx nregs, regmatch_t *regs, /* Otherwise, push the second epsilon-transition on the fail stac= k. */ else if (fs !=3D NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, - eps_via_nodes)) + prevregs, eps_via_nodes)) return -2; =20 /* We know we are going to exit. */ @@ -1288,7 +1292,7 @@ proceed_next_node (const re_match_context_t *mctx, = Idx nregs, regmatch_t *regs, if (naccepted =3D=3D 0) { Idx dest_node; - ok =3D re_node_set_insert (eps_via_nodes, node); + bool ok =3D re_node_set_insert (eps_via_nodes, node); if (__glibc_unlikely (! ok)) return -2; dest_node =3D dfa->edests[node].elems[0]; @@ -1317,7 +1321,8 @@ proceed_next_node (const re_match_context_t *mctx, = Idx nregs, regmatch_t *regs, static reg_errcode_t __attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,= - Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) + Idx nregs, regmatch_t *regs, regmatch_t *prevregs, + re_node_set *eps_via_nodes) { reg_errcode_t err; Idx num =3D fs->num++; @@ -1333,25 +1338,30 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx = str_idx, Idx dest_node, } fs->stack[num].idx =3D str_idx; fs->stack[num].node =3D dest_node; - fs->stack[num].regs =3D re_malloc (regmatch_t, nregs); + fs->stack[num].regs =3D re_malloc (regmatch_t, 2 * nregs); if (fs->stack[num].regs =3D=3D NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); + memcpy (fs->stack[num].regs + nregs, prevregs, sizeof (regmatch_t) * n= regs); err =3D re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_= nodes); return err; } =20 static Idx pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, - regmatch_t *regs, re_node_set *eps_via_nodes) + regmatch_t *regs, regmatch_t *prevregs, + re_node_set *eps_via_nodes) { + if (fs =3D=3D NULL || fs->num =3D=3D 0) + return -1; Idx num =3D --fs->num; - DEBUG_ASSERT (num >=3D 0); *pidx =3D fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); + memcpy (prevregs, fs->stack[num].regs + nregs, sizeof (regmatch_t) * n= regs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes =3D fs->stack[num].eps_via_nodes; + DEBUG_ASSERT (0 <=3D fs->stack[num].node); return fs->stack[num].node; } =20 @@ -1407,33 +1417,32 @@ set_regs (const regex_t *preg, const re_match_con= text_t *mctx, size_t nmatch, { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); =20 - if (idx =3D=3D pmatch[0].rm_eo && cur_node =3D=3D mctx->last_node)= + if ((idx =3D=3D pmatch[0].rm_eo && cur_node =3D=3D mctx->last_node= ) + || (fs && re_node_set_contains (&eps_via_nodes, cur_node))) { Idx reg_idx; + cur_node =3D -1; if (fs) { for (reg_idx =3D 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo =3D=3D -1) - break; - if (reg_idx =3D=3D nmatch) - { - re_node_set_free (&eps_via_nodes); - regmatch_list_free (&prev_match); - return free_fail_stack_return (fs); - } - cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); + { + cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, + prev_idx_match, &eps_via_nodes); + break; + } } - else + if (cur_node < 0) { re_node_set_free (&eps_via_nodes); regmatch_list_free (&prev_match); - return REG_NOERROR; + return free_fail_stack_return (fs); } } =20 /* Proceed to next node. */ - cur_node =3D proceed_next_node (mctx, nmatch, pmatch, &idx, cur_no= de, + cur_node =3D proceed_next_node (mctx, nmatch, pmatch, prev_idx_mat= ch, + &idx, cur_node, &eps_via_nodes, fs); =20 if (__glibc_unlikely (cur_node < 0)) @@ -1445,13 +1454,13 @@ set_regs (const regex_t *preg, const re_match_con= text_t *mctx, size_t nmatch, free_fail_stack_return (fs); return REG_ESPACE; } - if (fs) - cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); - else + cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, + prev_idx_match, &eps_via_nodes); + if (cur_node < 0) { re_node_set_free (&eps_via_nodes); regmatch_list_free (&prev_match); + free_fail_stack_return (fs); return REG_NOMATCH; } } @@ -1495,10 +1504,10 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pma= tch, } else if (type =3D=3D OP_CLOSE_SUBEXP) { + /* We are at the last node of this sub expression. */ Idx reg_num =3D dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { - /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo =3D cur_idx; @@ -2195,6 +2204,7 @@ sift_states_iter_mb (const re_match_context_t *mctx= , re_sift_context_t *sctx, =20 /* Return the next state to which the current state STATE will transit b= y accepting the current input byte, and update STATE_LOG if necessary. + Return NULL on failure. If STATE can accept a multibyte char/collating element/back reference= update the destination of STATE_LOG. */ =20 @@ -2395,7 +2405,7 @@ check_subexp_matching_top (re_match_context_t *mctx= , re_node_set *cur_nodes, =20 #if 0 /* Return the next state to which the current state STATE will transit b= y - accepting the current input byte. */ + accepting the current input byte. Return NULL on failure. */ =20 static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, @@ -2817,7 +2827,8 @@ find_subexp_node (const re_dfa_t *dfa, const re_nod= e_set *nodes, /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be= heavily reused. - Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ + Return REG_NOERROR if it can arrive, REG_NOMATCH if it cannot, + REG_ESPACE if memory is exhausted. */ =20 static reg_errcode_t __attribute_warn_unused_result__ @@ -3433,7 +3444,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *= state) /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination= to DESTS_NODE[i] and set the characters accepted by the destination - to DEST_CH[i]. This function return the number of destinations. */ + to DEST_CH[i]. Return the number of destinations if successful, + -1 on internal error. */ =20 static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *st= ate, @@ -4211,7 +4223,8 @@ match_ctx_add_subtop (re_match_context_t *mctx, Idx= node, Idx str_idx) } =20 /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matc= hes - at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ + at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. + Return the new entry if successful, NULL if memory is exhausted. */ =20 static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx= ) diff --git a/lib/root-uid.h b/lib/root-uid.h index cb74a49c1b..b367d5ab69 100644 --- a/lib/root-uid.h +++ b/lib/root-uid.h @@ -2,20 +2,20 @@ =20 Copyright 2012-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 - Written by Paul Eggert. */ +/* Written by Paul Eggert. */ =20 #ifndef ROOT_UID_H_ #define ROOT_UID_H_ diff --git a/lib/scratch_buffer.h b/lib/scratch_buffer.h index 603b0d65d0..88735771d2 100644 --- a/lib/scratch_buffer.h +++ b/lib/scratch_buffer.h @@ -1,17 +1,17 @@ /* Variable-sized buffer with on-stack default allocation. Copyright (C) 2017-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, 2017. */ @@ -19,12 +19,109 @@ #ifndef _GL_SCRATCH_BUFFER_H #define _GL_SCRATCH_BUFFER_H =20 -#include +/* Scratch buffers with a default stack allocation and fallback to + heap allocation. It is expected that this function is used in this + way: =20 + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + return -1; + + scratch_buffer_free (&tmpbuf); + return 0; + + The allocation functions (scratch_buffer_grow, + scratch_buffer_grow_preserve, scratch_buffer_set_array_size) make + sure that the heap allocation, if any, is freed, so that the code + above does not have a memory leak. The buffer still remains in a + state that can be deallocated using scratch_buffer_free, so a loop + like this is valid as well: + + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + break; + + scratch_buffer_free (&tmpbuf); + + scratch_buffer_grow and scratch_buffer_grow_preserve are guaranteed + to grow the buffer by at least 512 bytes. This means that when + using the scratch buffer as a backing store for a non-character + array whose element size, in bytes, is 512 or smaller, the scratch + buffer only has to grow once to make room for at least one more + element. +*/ + +/* Scratch buffer. Must be initialized with scratch_buffer_init + before its use. */ +struct scratch_buffer; + +/* Initializes *BUFFER so that BUFFER->data points to BUFFER->__space + and BUFFER->length reflects the available space. */ +#if 0 +extern void scratch_buffer_init (struct scratch_buffer *buffer); +#endif + +/* Deallocates *BUFFER (if it was heap-allocated). */ +#if 0 +extern void scratch_buffer_free (struct scratch_buffer *buffer); +#endif + +/* Grow *BUFFER by some arbitrary amount. The buffer contents is NOT + preserved. Return true on success, false on allocation failure (in + which case the old buffer is freed). On success, the new buffer is + larger than the previous size. On failure, *BUFFER is deallocated, + but remains in a free-able state, and errno is set. */ +#if 0 +extern bool scratch_buffer_grow (struct scratch_buffer *buffer); +#endif + +/* Like scratch_buffer_grow, but preserve the old buffer + contents on success, as a prefix of the new buffer. */ +#if 0 +extern bool scratch_buffer_grow_preserve (struct scratch_buffer *buffer)= ; +#endif + +/* Grow *BUFFER so that it can store at least NELEM elements of SIZE + bytes. The buffer contents are NOT preserved. Both NELEM and SIZE + can be zero. Return true on success, false on allocation failure + (in which case the old buffer is freed, but *BUFFER remains in a + free-able state, and errno is set). It is unspecified whether this + function can reduce the array size. */ +#if 0 +extern bool scratch_buffer_set_array_size (struct scratch_buffer *buffer= , + size_t nelem, size_t size); +#endif + +/* Return a copy of *BUFFER's first SIZE bytes as a heap-allocated block= , + deallocating *BUFFER if it was heap-allocated. SIZE must be at + most *BUFFER's size. Return NULL (setting errno) on memory + exhaustion. */ +#if 0 +extern void *scratch_buffer_dupfree (struct scratch_buffer *buffer, + size_t size); +#endif + + +/* The implementation is imported from glibc. */ + +/* Avoid possible conflicts with symbols exported by the GNU libc. */ #define __libc_scratch_buffer_dupfree gl_scratch_buffer_dupfree #define __libc_scratch_buffer_grow gl_scratch_buffer_grow #define __libc_scratch_buffer_grow_preserve gl_scratch_buffer_grow_prese= rve #define __libc_scratch_buffer_set_array_size gl_scratch_buffer_set_array= _size -#include + +#ifndef _GL_LIKELY +/* Rely on __builtin_expect, as provided by the module 'builtin-expect'.= */ +# define _GL_LIKELY(cond) __builtin_expect ((cond), 1) +# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0) +#endif + +#include =20 #endif /* _GL_SCRATCH_BUFFER_H */ diff --git a/lib/sha1.c b/lib/sha1.c index 612d46de82..df2dbb4959 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -3,18 +3,18 @@ =20 Copyright (C) 2000-2001, 2003-2006, 2008-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Scott G. Miller Credits: diff --git a/lib/sha1.h b/lib/sha1.h index 94ccd18fda..a619623f7c 100644 --- a/lib/sha1.h +++ b/lib/sha1.h @@ -3,18 +3,18 @@ Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef SHA1_H # define SHA1_H 1 diff --git a/lib/sha256.c b/lib/sha256.c index 129d64b174..2a2ca5316b 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -3,17 +3,17 @@ =20 Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by David Madore, considerably copypasting from diff --git a/lib/sha256.h b/lib/sha256.h index b4bc082267..31d788b88e 100644 --- a/lib/sha256.h +++ b/lib/sha256.h @@ -2,17 +2,17 @@ library functions. Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef SHA256_H diff --git a/lib/sha512.c b/lib/sha512.c index 4ac3fa3e42..a3533209c6 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -3,17 +3,17 @@ =20 Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by David Madore, considerably copypasting from diff --git a/lib/sha512.h b/lib/sha512.h index 81b53034c7..8a540bff85 100644 --- a/lib/sha512.h +++ b/lib/sha512.h @@ -2,17 +2,17 @@ library functions. Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef SHA512_H diff --git a/lib/sigdescr_np.c b/lib/sigdescr_np.c index 6c9bf283a8..7f8dccf81a 100644 --- a/lib/sigdescr_np.c +++ b/lib/sigdescr_np.c @@ -1,17 +1,17 @@ /* English descriptions of signals. Copyright (C) 2020-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Bruno Haible , 2020. */ diff --git a/lib/signal.in.h b/lib/signal.in.h index ed01d672c9..275da8c817 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 diff --git a/lib/stat-time.c b/lib/stat-time.c index 81b83ddb4f..7b92792694 100644 --- a/lib/stat-time.c +++ b/lib/stat-time.c @@ -1,3 +1,21 @@ +/* stat-related time functions. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE #include "stat-time.h" diff --git a/lib/stat-time.h b/lib/stat-time.h index 523ed21b08..fe3483d633 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index eae9d13221..592d58e372 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -2,18 +2,18 @@ =20 Copyright 2011-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert and Bruno Haible. */ =20 @@ -104,12 +104,13 @@ #define __alignof_is_defined 1 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 # if defined __cplusplus && 201103 <=3D __cplusplus # define _Alignas(a) alignas (a) -# elif ((defined __APPLE__ && defined __MACH__ \ - ? 4 < __GNUC__ + (1 <=3D __GNUC_MINOR__) \ - : __GNUC__ && !defined __ibmxl__) \ - || (4 <=3D __clang_major__) \ - || (__ia64 && (61200 <=3D __HP_cc || 61200 <=3D __HP_aCC)) \ - || __ICC || 0x590 <=3D __SUNPRO_C || 0x0600 <=3D __xlC__) +# elif (!defined __attribute__ \ + && ((defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <=3D __GNUC_MINOR__) \ + : __GNUC__ && !defined __ibmxl__) \ + || (4 <=3D __clang_major__) \ + || (__ia64 && (61200 <=3D __HP_cc || 61200 <=3D __HP_aCC)) \= + || __ICC || 0x590 <=3D __SUNPRO_C || 0x0600 <=3D __xlC__)) # define _Alignas(a) __attribute__ ((__aligned__ (a))) # elif 1300 <=3D _MSC_VER # define _Alignas(a) __declspec (align (a)) diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 0f506a5b18..42290d448d 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Eric Blake. */ =20 @@ -42,6 +42,13 @@ # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + /* On TinyCC, make sure that the macros that indicate the special inv= ocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif =20 #else @@ -51,7 +58,7 @@ =20 /* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t t= o a type with alignment 4, but 'long' has alignment 8. */ -# if defined _AIX && defined _ARCH_PPC64 +# if defined _AIX && defined __LP64__ # if !GNULIB_defined_max_align_t # ifdef _MAX_ALIGN_T /* /usr/include/stddef.h has already defined max_align_t. Override it. = */ @@ -109,7 +116,7 @@ && defined __cplusplus # include #else -# if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) +# if ! (@HAVE_MAX_ALIGN_T@ || (defined _GCC_MAX_ALIGN_T && !defined __cl= ang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4,= but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8= , diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 7a8f27cef7..85c5418f14 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -2,18 +2,18 @@ Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* * ISO C 99 for platforms that lack it. @@ -85,7 +85,7 @@ #define _@GUARD_PREFIX@_STDINT_H =20 /* Override WINT_MIN and WINT_MAX if gnulib's or ov= errides wint_t. */ -#if @GNULIB_OVERRIDES_WINT_T@ +#if @GNULIBHEADERS_OVERRIDE_WINT_T@ # undef WINT_MIN # undef WINT_MAX # define WINT_MIN 0x0U @@ -598,7 +598,7 @@ #define _@GUARD_PREFIX@_STDINT_H /* wint_t limits */ /* If gnulib's or overrides wint_t, @WINT_T_SUFFIX@= is not accurate, therefore use the definitions from above. */ -# if !@GNULIB_OVERRIDES_WINT_T@ +# if !@GNULIBHEADERS_OVERRIDE_WINT_T@ # undef WINT_MIN # undef WINT_MAX # if @HAVE_SIGNED_WINT_T@ diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 2a5db74f28..3fa94b487e 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -1,17 +1,17 @@ /* Implementation details of FILE streams. Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Many stdio implementations have the same logic and therefore can shar= e diff --git a/lib/stdio.in.h b/lib/stdio.in.h index a930840505..20ba488a47 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ @@ -242,7 +242,7 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX = compliant - " _GL_CXXALIAS_MDA (fcloseall, int, (void)); # else # if @HAVE_DECL_FCLOSEALL@ -# if defined __FreeBSD__ +# if defined __FreeBSD__ || defined __DragonFly__ _GL_CXXALIAS_SYS (fcloseall, void, (void)); # else _GL_CXXALIAS_SYS (fcloseall, int, (void)); @@ -1257,6 +1257,7 @@ _GL_CXXALIASWARN (scanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) @@ -1302,6 +1303,7 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable = - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)= _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) @@ -1369,6 +1371,7 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on= mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) @@ -1390,6 +1393,7 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) @@ -1573,6 +1577,7 @@ _GL_CXXALIASWARN (vscanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) @@ -1609,6 +1614,7 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportabl= e - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 49fc44e14a..652062d949 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -2,17 +2,17 @@ =20 Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @@ -1032,12 +1032,23 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX c= ompliant everywhere - " =20 =20 #if @GNULIB_REALLOCARRAY@ -# if ! @HAVE_REALLOCARRAY@ +# if @REPLACE_REALLOCARRAY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! @HAVE_REALLOCARRAY@ _GL_FUNCDECL_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); -# endif +# endif _GL_CXXALIAS_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); +# endif _GL_CXXALIASWARN (reallocarray); #elif defined GNULIB_POSIXCHECK # undef reallocarray @@ -1202,6 +1213,47 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable -= " # endif #endif =20 +#if @GNULIB_STRTOL@ +/* Parse a signed integer whose textual representation starts at STRING.= + The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with pre= fix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the intege= r is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is= set + to ERANGE. */ +# if @REPLACE_STRTOL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOL@ +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtol); +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + #if @GNULIB_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING.= The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, @@ -1211,15 +1263,29 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable = - " stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno = is set to ERANGE. */ -# if !@HAVE_STRTOLL@ +# if @REPLACE_STRTOLL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOLL@ _GL_FUNCDECL_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll @@ -1229,6 +1295,46 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable -= " # endif #endif =20 +#if @GNULIB_STRTOUL@ +/* Parse an unsigned integer whose textual representation starts at STRI= NG. + The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with pre= fix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the intege= r is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERA= NGE. */ +# if @REPLACE_STRTOUL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOUL@ +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoul); +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + #if @GNULIB_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRI= NG. The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, @@ -1238,15 +1344,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable = - " stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ -# if !@HAVE_STRTOULL@ +# if @REPLACE_STRTOULL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOULL@ _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull diff --git a/lib/stpcpy.c b/lib/stpcpy.c index a4165ba4bf..c312fe44ba 100644 --- a/lib/stpcpy.c +++ b/lib/stpcpy.c @@ -5,17 +5,17 @@ NOTE: The canonical source of this file is maintained with the GNU C = Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/str-two-way.h b/lib/str-two-way.h index 005a19fb51..fc2db03b7b 100644 --- a/lib/str-two-way.h +++ b/lib/str-two-way.h @@ -3,18 +3,18 @@ This file is part of the GNU C Library. Written by Eric Blake , 2008. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Before including this file, you need to include and , and define: diff --git a/lib/strftime.h b/lib/strftime.h index 7284f67133..790a80ed8f 100644 --- a/lib/strftime.h +++ b/lib/strftime.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2002, 2004, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/string.in.h b/lib/string.in.h index c76c1820b3..cb964bc8d1 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 1995-1996, 2001-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ @@ -446,7 +446,7 @@ _GL_WARN_ON_USE (strdup, "strdup is unportable - " #elif @GNULIB_MDA_STRDUP@ /* On native Windows, map 'creat' to '_creat', so that -loldnames is not= required. In C++ with GNULIB_NAMESPACE, avoid differences between - platforms by defining GNULIB_NAMESPACE::creat always. */ + platforms by defining GNULIB_NAMESPACE::strdup always. */ # if defined _WIN32 && !defined __CYGWIN__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup diff --git a/lib/strnlen.c b/lib/strnlen.c index c27a0392c2..ded06ce23f 100644 --- a/lib/strnlen.c +++ b/lib/strnlen.c @@ -2,18 +2,18 @@ Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. Written by Simon Josefsson. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 37a25c31d4..bf8534a767 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -3,17 +3,17 @@ Copyright (C) 1999, 2001-2004, 2006, 2009-2021 Free Software Foundati= on, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/strtol.c b/lib/strtol.c index 2f2159b623..c49321ba0c 100644 --- a/lib/strtol.c +++ b/lib/strtol.c @@ -6,17 +6,17 @@ NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifdef _LIBC @@ -51,6 +51,7 @@ =20 /* Determine the name. */ #ifdef USE_IN_EXTENDED_LOCALE_MODEL +# undef strtol # if UNSIGNED # ifdef USE_WIDE_CHAR # ifdef QUAD @@ -82,6 +83,7 @@ # endif #else # if UNSIGNED +# undef strtol # ifdef USE_WIDE_CHAR # ifdef QUAD # define strtol wcstoull @@ -97,6 +99,7 @@ # endif # else # ifdef USE_WIDE_CHAR +# undef strtol # ifdef QUAD # define strtol wcstoll # else @@ -104,6 +107,7 @@ # endif # else # ifdef QUAD +# undef strtol # define strtol strtoll # endif # endif @@ -131,6 +135,12 @@ #endif =20 =20 +#ifdef USE_NUMBER_GROUPING +# define GROUP_PARAM_PROTO , int group +#else +# define GROUP_PARAM_PROTO +#endif + /* We use this code also for the extended locale handling where the function gets as an additional argument the locale which has to be used. To access the values we have to redefine the _NL_CURRENT @@ -166,19 +176,23 @@ # define UCHAR_TYPE unsigned char # define STRING_TYPE char # ifdef USE_IN_EXTENDED_LOCALE_MODEL -# define ISSPACE(Ch) __isspace_l ((Ch), loc) -# define ISALPHA(Ch) __isalpha_l ((Ch), loc) -# define TOUPPER(Ch) __toupper_l ((Ch), loc) +# define ISSPACE(Ch) __isspace_l ((unsigned char) (Ch), loc) +# define ISALPHA(Ch) __isalpha_l ((unsigned char) (Ch), loc) +# define TOUPPER(Ch) __toupper_l ((unsigned char) (Ch), loc) # else -# define ISSPACE(Ch) isspace (Ch) -# define ISALPHA(Ch) isalpha (Ch) -# define TOUPPER(Ch) toupper (Ch) +# define ISSPACE(Ch) isspace ((unsigned char) (Ch)) +# define ISALPHA(Ch) isalpha ((unsigned char) (Ch)) +# define TOUPPER(Ch) toupper ((unsigned char) (Ch)) # endif #endif =20 -#define INTERNAL(X) INTERNAL1(X) -#define INTERNAL1(X) __##X##_internal -#define WEAKNAME(X) WEAKNAME1(X) +#ifdef USE_NUMBER_GROUPING +# define INTERNAL(X) INTERNAL1(X) +# define INTERNAL1(X) __##X##_internal +# define WEAKNAME(X) WEAKNAME1(X) +#else +# define INTERNAL(X) X +#endif =20 #ifdef USE_NUMBER_GROUPING /* This file defines a function to check for correct grouping. */ @@ -196,7 +210,7 @@ #define WEAKNAME(X) WEAKNAME1(X) =20 INT INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr, - int base, int group LOCALE_PARAM_PROTO) + int base GROUP_PARAM_PROTO LOCALE_PARAM_PROTO) { int negative; register unsigned LONG int cutoff; @@ -379,15 +393,16 @@ INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_= TYPE **endptr, return 0L; } =0C +#ifdef USE_NUMBER_GROUPING /* External user entry point. */ =20 - INT -#ifdef weak_function +# ifdef weak_function weak_function -#endif +# endif strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, int base LOCALE_PARAM_PROTO) { return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM); } +#endif diff --git a/lib/strtoll.c b/lib/strtoll.c index 30daefc50f..8e6f93faeb 100644 --- a/lib/strtoll.c +++ b/lib/strtoll.c @@ -3,17 +3,17 @@ Inc. This file is part of the GNU C Library. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #define QUAD 1 diff --git a/lib/symlink.c b/lib/symlink.c index 2f6c0d484b..6e488986c1 100644 --- a/lib/symlink.c +++ b/lib/symlink.c @@ -1,17 +1,17 @@ /* Stub for symlink(). Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h index 5b9280dda3..1abd6c544e 100644 --- a/lib/sys_random.in.h +++ b/lib/sys_random.in.h @@ -1,18 +1,18 @@ /* Substitute for . Copyright (C) 2020-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 # if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 1dacb21087..f8ef648d48 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -1,18 +1,18 @@ /* Substitute for . Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 # if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 13d12943cd..babe3dba3e 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -1,18 +1,18 @@ /* Provide a more complete sys/stat.h header file. Copyright (C) 2005-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ =20 diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index 90a67d1842..8035fbe7ec 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h index 654e80335f..2079d72efc 100644 --- a/lib/sys_types.in.h +++ b/lib/sys_types.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/tempname.c b/lib/tempname.c index e243483eaf..5f804b38d7 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -2,16 +2,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/tempname.h b/lib/tempname.h index a8681fc998..795bb49764 100644 --- a/lib/tempname.h +++ b/lib/tempname.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* header written by Eric Blake */ diff --git a/lib/time-internal.h b/lib/time-internal.h index 067ee729ed..6bbd0a727b 100644 --- a/lib/time-internal.h +++ b/lib/time-internal.h @@ -2,18 +2,18 @@ =20 Copyright 2015-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/time.in.h b/lib/time.in.h index 1385980cdf..a73fe59cbb 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ @@ -340,22 +340,60 @@ _GL_CXXALIASWARN (strftime); # endif =20 # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ +/* Functions that use a first-class time zone data type, instead of + relying on an implicit global time zone. + Inspired by NetBSD. */ + +/* Represents a time zone. + (timezone_t) NULL stands for UTC. */ typedef struct tm_zone *timezone_t; + +/* tzalloc (name) + Returns a time zone object for the given time zone NAME. This object= + represents the time zone that other functions would use it the TZ + environment variable was set to NAME. + If NAME is NULL, the result represents the time zone that other funct= ions + would use it the TZ environment variable was unset. + May return NULL if NAME is invalid (this is platform dependent) or + upon memory allocation failure. */ _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); + +/* tzfree (tz) + Frees a time zone object. + The argument must have been returned by tzalloc(). */ _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); + +/* localtime_rz (tz, &t, &result) + Converts an absolute time T to a broken-down time RESULT, assuming th= e + time zone TZ. + This function is like 'localtime_r', but relies on the argument TZ in= stead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)= )); _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); + +/* mktime_z (tz, &tm) + Normalizes the broken-down time TM and converts it to an absolute tim= e, + assuming the time zone TZ. Returns the absolute time. + This function is like 'mktime', but relies on the argument TZ instead= + of an implicit global time zone. */ _GL_FUNCDECL_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result) + (timezone_t __tz, struct tm *restrict __tm) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result)); + (timezone_t __tz, struct tm *restrict __tm)); + +/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime= _z' + in the 'tm_zone' member of 'struct tm') are valid as long as + - the 'struct tm' argument is not destroyed or overwritten, + and + - the 'timezone_t' argument is not freed through tzfree(). */ + # endif =20 /* Convert TM to a time_t value, assuming UTC. */ diff --git a/lib/time_r.c b/lib/time_r.c index d908986870..88d3c1c76f 100644 --- a/lib/time_r.c +++ b/lib/time_r.c @@ -2,18 +2,18 @@ =20 Copyright (C) 2003, 2006-2007, 2010-2021 Free Software Foundation, In= c. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/time_rz.c b/lib/time_rz.c index 3ac053c621..e7722447c0 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c @@ -2,18 +2,18 @@ =20 Copyright 2015-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/timegm.c b/lib/timegm.c index e4127e71c0..7e723e1fb8 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -4,16 +4,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/timespec.c b/lib/timespec.c index 2b6098ed7b..957b5fbba4 100644 --- a/lib/timespec.c +++ b/lib/timespec.c @@ -1,3 +1,21 @@ +/* Inline functions for . + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE #include "timespec.h" diff --git a/lib/timespec.h b/lib/timespec.h index 9a71e9ea89..94a5db751f 100644 --- a/lib/timespec.h +++ b/lib/timespec.h @@ -3,17 +3,17 @@ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if ! defined TIMESPEC_H diff --git a/lib/u64.c b/lib/u64.c index 1e3854ddcd..c905af626f 100644 --- a/lib/u64.c +++ b/lib/u64.c @@ -1,4 +1,22 @@ +/* uint64_t-like operations that work even on hosts lacking uint64_t + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_U64_INLINE _GL_EXTERN_INLINE #include "u64.h" typedef int dummy; diff --git a/lib/u64.h b/lib/u64.h index ad719c84f8..8d21ec17ed 100644 --- a/lib/u64.h +++ b/lib/u64.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/unistd.c b/lib/unistd.c index 72bad1c052..0763456021 100644 --- a/lib/unistd.c +++ b/lib/unistd.c @@ -1,4 +1,22 @@ +/* Inline functions for . + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE #include "unistd.h" typedef int dummy; diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 5e9b47d981..73c882f97b 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1,18 +1,18 @@ /* Substitute for and wrapper around . Copyright (C) 2003-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_UNISTD_H =20 @@ -1521,6 +1521,7 @@ _GL_WARN_ON_USE (group_member, "group_member is unp= ortable - " # undef isatty # define isatty rpl_isatty # endif +# define GNULIB_defined_isatty 1 _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); # elif defined _WIN32 && !defined __CYGWIN__ @@ -2027,15 +2028,23 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " #if @GNULIB_MDA_SWAB@ /* On native Windows, map 'swab' to '_swab', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between - platforms by defining GNULIB_NAMESPACE::creat always. */ + platforms by defining GNULIB_NAMESPACE::swab always. */ # if defined _WIN32 && !defined __CYGWIN__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef swab # define swab _swab # endif -_GL_CXXALIAS_MDA (swab, void, (char *from, char *to, int n)); +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */= +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); # else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else _GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif # endif _GL_CXXALIASWARN (swab); #endif diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h index 86b91c19dd..ca184b31fb 100644 --- a/lib/unlocked-io.h +++ b/lib/unlocked-io.h @@ -33,91 +33,91 @@ =20 # include =20 -# if HAVE_DECL_CLEARERR_UNLOCKED +# if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked # undef clearerr # define clearerr(x) clearerr_unlocked (x) # else # define clearerr_unlocked(x) clearerr (x) # endif =20 -# if HAVE_DECL_FEOF_UNLOCKED +# if HAVE_DECL_FEOF_UNLOCKED || defined feof_unlocked # undef feof # define feof(x) feof_unlocked (x) # else # define feof_unlocked(x) feof (x) # endif =20 -# if HAVE_DECL_FERROR_UNLOCKED +# if HAVE_DECL_FERROR_UNLOCKED || defined ferror_unlocked # undef ferror # define ferror(x) ferror_unlocked (x) # else # define ferror_unlocked(x) ferror (x) # endif =20 -# if HAVE_DECL_FFLUSH_UNLOCKED +# if HAVE_DECL_FFLUSH_UNLOCKED || defined fflush_unlocked # undef fflush # define fflush(x) fflush_unlocked (x) # else # define fflush_unlocked(x) fflush (x) # endif =20 -# if HAVE_DECL_FGETS_UNLOCKED +# if HAVE_DECL_FGETS_UNLOCKED || defined fgets_unlocked # undef fgets # define fgets(x,y,z) fgets_unlocked (x,y,z) # else # define fgets_unlocked(x,y,z) fgets (x,y,z) # endif =20 -# if HAVE_DECL_FPUTC_UNLOCKED +# if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked # undef fputc # define fputc(x,y) fputc_unlocked (x,y) # else # define fputc_unlocked(x,y) fputc (x,y) # endif =20 -# if HAVE_DECL_FPUTS_UNLOCKED +# if HAVE_DECL_FPUTS_UNLOCKED || defined fputs_unlocked # undef fputs # define fputs(x,y) fputs_unlocked (x,y) # else # define fputs_unlocked(x,y) fputs (x,y) # endif =20 -# if HAVE_DECL_FREAD_UNLOCKED +# if HAVE_DECL_FREAD_UNLOCKED || defined fread_unlocked # undef fread # define fread(w,x,y,z) fread_unlocked (w,x,y,z) # else # define fread_unlocked(w,x,y,z) fread (w,x,y,z) # endif =20 -# if HAVE_DECL_FWRITE_UNLOCKED +# if HAVE_DECL_FWRITE_UNLOCKED || defined fwrite_unlocked # undef fwrite # define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z) # else # define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z) # endif =20 -# if HAVE_DECL_GETC_UNLOCKED +# if HAVE_DECL_GETC_UNLOCKED || defined get_unlocked # undef getc # define getc(x) getc_unlocked (x) # else # define getc_unlocked(x) getc (x) # endif =20 -# if HAVE_DECL_GETCHAR_UNLOCKED +# if HAVE_DECL_GETCHAR_UNLOCKED || defined getchar_unlocked # undef getchar # define getchar() getchar_unlocked () # else # define getchar_unlocked() getchar () # endif =20 -# if HAVE_DECL_PUTC_UNLOCKED +# if HAVE_DECL_PUTC_UNLOCKED || defined putc_unlocked # undef putc # define putc(x,y) putc_unlocked (x,y) # else # define putc_unlocked(x,y) putc (x,y) # endif =20 -# if HAVE_DECL_PUTCHAR_UNLOCKED +# if HAVE_DECL_PUTCHAR_UNLOCKED || defined putchar_unlocked # undef putchar # define putchar(x) putchar_unlocked (x) # else diff --git a/lib/utimens.c b/lib/utimens.c index 44d1ea003e..a34180050e 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2003-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ @@ -126,14 +126,14 @@ validate_timespec (struct timespec timespec[2]) return result + (utime_omit_count =3D=3D 1); } =20 -/* Normalize any UTIME_NOW or UTIME_OMIT values in *TS, using stat - buffer STATBUF to obtain the current timestamps of the file. If +/* Normalize any UTIME_NOW or UTIME_OMIT values in (*TS)[0] and (*TS)[1]= , + using STATBUF to obtain the current timestamps of the file. If both times are UTIME_NOW, set *TS to NULL (as this can avoid some permissions issues). If both times are UTIME_OMIT, return true (nothing further beyond the prior collection of STATBUF is necessary); otherwise return false. */ static bool -update_timespec (struct stat const *statbuf, struct timespec *ts[2]) +update_timespec (struct stat const *statbuf, struct timespec **ts) { struct timespec *timespec =3D *ts; if (timespec[0].tv_nsec =3D=3D UTIME_OMIT diff --git a/lib/utimens.h b/lib/utimens.h index 295d3d71cc..d17953c052 100644 --- a/lib/utimens.h +++ b/lib/utimens.h @@ -2,17 +2,17 @@ =20 Copyright 2012-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/verify.h b/lib/verify.h index 65514c34b9..3485a7e69f 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h index 5d5b17f05b..612937abb0 100644 --- a/lib/warn-on-use.h +++ b/lib/warn-on-use.h @@ -2,16 +2,16 @@ Copyright (C) 2010-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index 53daf59663..4184f33955 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h @@ -2,17 +2,17 @@ =20 Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundatio= n, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef XALLOC_OVERSIZED_H_ @@ -21,34 +21,39 @@ #define XALLOC_OVERSIZED_H_ #include #include =20 -/* True if N * S would overflow in a size_t calculation, - or would generate a value larger than PTRDIFF_MAX. +/* True if N * S does not fit into both ptrdiff_t and size_t. + N and S should be nonnegative and free of side effects. This expands to a constant expression if N and S are both constants. - By gnulib convention, SIZE_MAX represents overflow in size + By gnulib convention, SIZE_MAX represents overflow in size_t calculations, so the conservative size_t-based dividend to use here is SIZE_MAX - 1. */ #define __xalloc_oversized(n, s) \ - ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) = < (n)) + ((s) !=3D 0 \ + && ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / = (s) \ + < (n))) =20 -#if PTRDIFF_MAX < SIZE_MAX -typedef ptrdiff_t __xalloc_count_type; -#else -typedef size_t __xalloc_count_type; -#endif +/* Return 1 if and only if an array of N objects, each of size S, + cannot exist reliably because its total size in bytes would exceed + MIN (PTRDIFF_MAX, SIZE_MAX - 1). + + N and S should be nonnegative and free of side effects. =20 -/* Return 1 if an array of N objects, each of size S, cannot exist - reliably due to size or ptrdiff_t arithmetic overflow. S must be - positive and N must be nonnegative. This is a macro, not a - function, so that it works correctly even when SIZE_MAX < N. */ + Warning: (xalloc_oversized (N, S) ? NULL : malloc (N * S)) can + misbehave if N and S are both narrower than ptrdiff_t and size_t, + and can be rewritten as (xalloc_oversized (N, S) ? NULL + : malloc (N * (size_t) S)). =20 -#if 7 <=3D __GNUC__ && !defined __clang__ + This is a macro, not a function, so that it works even if an + argument exceeds MAX (PTRDIFF_MAX, SIZE_MAX). */ +#if 7 <=3D __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX # define xalloc_oversized(n, s) \ - __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) -#elif 5 <=3D __GNUC__ && !defined __ICC && !__STRICT_ANSI__ + __builtin_mul_overflow_p (n, s, (ptrdiff_t) 1) +#elif (5 <=3D __GNUC__ && !defined __ICC && !__STRICT_ANSI__ \ + && PTRDIFF_MAX < SIZE_MAX) # define xalloc_oversized(n, s) \ (__builtin_constant_p (n) && __builtin_constant_p (s) \ ? __xalloc_oversized (n, s) \ - : ({ __xalloc_count_type __xalloc_count; \ + : ({ ptrdiff_t __xalloc_count; \ __builtin_mul_overflow (n, s, &__xalloc_count); })) =20 /* Other compilers use integer division; this may be slower but is diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4 index 6d86142585..17e2a20c5d 100644 --- a/m4/dirent_h.m4 +++ b/m4/dirent_h.m4 @@ -1,4 +1,4 @@ -# dirent_h.m4 serial 16 +# dirent_h.m4 serial 19 dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,10 +6,10 @@ =20 dnl Written by Bruno Haible. =20 -AC_DEFUN([gl_DIRENT_H], +AC_DEFUN_ONCE([gl_DIRENT_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) =20 dnl is always overridden, because of GNULIB_POSIXCHECK. @@ -27,26 +27,41 @@ AC_DEFUN ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir sc= andir]) ]) =20 +# gl_DIRENT_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_DIRENT_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_DIRENT_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_DIRENT_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REWINDDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSEDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DIRFD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPENDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALPHASORT]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_DIRENT_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) +]) + AC_DEFUN([gl_DIRENT_H_DEFAULTS], [ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_OPENDIR=3D0; AC_SUBST([GNULIB_OPENDIR]) - GNULIB_READDIR=3D0; AC_SUBST([GNULIB_READDIR]) - GNULIB_REWINDDIR=3D0; AC_SUBST([GNULIB_REWINDDIR]) - GNULIB_CLOSEDIR=3D0; AC_SUBST([GNULIB_CLOSEDIR]) - GNULIB_DIRFD=3D0; AC_SUBST([GNULIB_DIRFD]) - GNULIB_FDOPENDIR=3D0; AC_SUBST([GNULIB_FDOPENDIR]) - GNULIB_SCANDIR=3D0; AC_SUBST([GNULIB_SCANDIR]) - GNULIB_ALPHASORT=3D0; AC_SUBST([GNULIB_ALPHASORT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_OPENDIR=3D1; AC_SUBST([HAVE_OPENDIR]) HAVE_READDIR=3D1; AC_SUBST([HAVE_READDIR]) diff --git a/m4/environ.m4 b/m4/environ.m4 index d971770860..ae5329108e 100644 --- a/m4/environ.m4 +++ b/m4/environ.m4 @@ -1,4 +1,4 @@ -# environ.m4 serial 7 +# environ.m4 serial 8 dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -33,7 +33,8 @@ AC_DEFUN [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[$1 - extern struct { int foo; } $2;]], + typedef struct { int foo; } foo_t; + extern foo_t $2;]], [[$2.foo =3D 1;]])], [gt_cv_var=3Dno], [gt_cv_var=3Dyes])]) diff --git a/m4/explicit_bzero.m4 b/m4/explicit_bzero.m4 index d77ec5a3a5..8c86d69e05 100644 --- a/m4/explicit_bzero.m4 +++ b/m4/explicit_bzero.m4 @@ -5,7 +5,7 @@ =20 AC_DEFUN([gl_FUNC_EXPLICIT_BZERO], [ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) =20 dnl Persuade glibc to declare explicit_bzero. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4 index e63a82f10a..aba44735d1 100644 --- a/m4/fcntl_h.m4 +++ b/m4/fcntl_h.m4 @@ -1,4 +1,4 @@ -# serial 17 +# serial 20 # Configure fcntl.h. dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -7,7 +7,7 @@ =20 dnl Written by Paul Eggert. =20 -AC_DEFUN([gl_FCNTL_H], +AC_DEFUN_ONCE([gl_FCNTL_H], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) @@ -26,25 +26,40 @@ AC_DEFUN ]], [fcntl openat]) ]) =20 +# gl_FCNTL_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_FCNTL_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS= ], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CREAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCNTL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAUL= TS]) + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) +]) + AC_DEFUN([gl_FCNTL_H_DEFAULTS], [ - GNULIB_CREAT=3D0; AC_SUBST([GNULIB_CREAT]) - GNULIB_FCNTL=3D0; AC_SUBST([GNULIB_FCNTL]) - GNULIB_NONBLOCKING=3D0; AC_SUBST([GNULIB_NONBLOCKING]) - GNULIB_OPEN=3D0; AC_SUBST([GNULIB_OPEN]) - GNULIB_OPENAT=3D0; AC_SUBST([GNULIB_OPENAT]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_CREAT=3D1; AC_SUBST([GNULIB_MDA_CREAT]) - GNULIB_MDA_OPEN=3D1; AC_SUBST([GNULIB_MDA_OPEN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCNTL=3D1; AC_SUBST([HAVE_FCNTL]) HAVE_OPENAT=3D1; AC_SUBST([HAVE_OPENAT]) diff --git a/m4/free.m4 b/m4/free.m4 index d671376b0b..a7923b9059 100644 --- a/m4/free.m4 +++ b/m4/free.m4 @@ -1,4 +1,4 @@ -# free.m4 serial 5 +# free.m4 serial 6 # Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,7 +40,10 @@ AC_DEFUN ]) =20 case $gl_cv_func_free_preserves_errno in - *yes) ;; + *yes) + AC_DEFINE([HAVE_FREE_POSIX], [1], + [Define if the 'free' function is guaranteed to preserve errno.]) + ;; *) REPLACE_FREE=3D1 ;; esac ]) diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index 3c20081574..37c54404bb 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,4 +1,4 @@ -# serial 28 +# serial 29 =20 # Copyright (C) 2001-2003, 2005, 2007, 2009-2021 Free Software Foundatio= n, Inc. # This file is free software; the Free Software Foundation @@ -9,10 +9,10 @@ =20 AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [ - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([gl_SYS_TIME_H]) AC_CHECK_FUNCS_ONCE([gettimeofday]) =20 gl_gettimeofday_timezone=3Dvoid diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index f2eff10de6..bfa1645db2 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 63 +# gnulib-common.m4 serial 66 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -357,6 +357,16 @@ AC_DEFUN export LIBC_FATAL_STDERR_ ]) =20 +# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename]) +# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename], [initialvalue]) +# initializes the shell variable that indicates the presence of the give= n module +# as a C preprocessor expression. +AC_DEFUN([gl_MODULE_INDICATOR_INIT_VARIABLE], +[ + GL_MODULE_INDICATOR_PREFIX[]_[$1]=3Dm4_if([$2], , [0], [$2]) + AC_SUBST(GL_MODULE_INDICATOR_PREFIX[]_[$1]) +]) + # gl_MODULE_INDICATOR_CONDITION # expands to a C preprocessor expression that evaluates to 1 or 0, depen= ding # whether a gnulib module that has been requested shall be considered pr= esent @@ -369,9 +379,9 @@ m4_define AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], [ gl_MODULE_INDICATOR_SET_VARIABLE_AUX( - [GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], + [GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]m4_translit([[$1]], + [abcdefghijklmnop= qrstuvwxyz./-], + [ABCDEFGHIJKLMNOP= QRSTUVWXYZ___])], [gl_MODULE_INDICATOR_CONDITION]) ]) =20 @@ -656,6 +666,72 @@ AC_DEFUN ]) ]) =20 +# gl_CC_ALLOW_WARNINGS +# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) op= tion +# that reverts a preceding '-Werror' option, if available. +# This is expected to be '-Wno-error' on gcc, clang (except clang/MSVC),= xlclang +# and empty otherwise. +AC_DEFUN([gl_CC_ALLOW_WARNINGS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_CACHE_CHECK([for C compiler option to allow warnings], + [gl_cv_cc_wallow], + [rm -f conftest* + echo 'int dummy;' > conftest.c + AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest= 1.err]) >/dev/null + AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c= 2>conftest2.err]) >/dev/null + dnl Test the number of error output lines, because AIX xlc accepts = the + dnl option '-Wno-error', just to produce a warning + dnl "Option -Wno-error was incorrectly specified. The option will b= e ignored." + dnl afterwards. + if test $? =3D 0 && test `wc -l < conftest1.err` =3D `wc -l < conft= est2.err`; then + gl_cv_cc_wallow=3D'-Wno-error' + else + gl_cv_cc_wallow=3Dnone + fi + rm -f conftest* + ]) + case "$gl_cv_cc_wallow" in + none) GL_CFLAG_ALLOW_WARNINGS=3D'' ;; + *) GL_CFLAG_ALLOW_WARNINGS=3D"$gl_cv_cc_wallow" ;; + esac + AC_SUBST([GL_CFLAG_ALLOW_WARNINGS]) +]) + +# gl_CXX_ALLOW_WARNINGS +# sets and substitutes a variable GL_CXXFLAG_ALLOW_WARNINGS, to a $(CC) = option +# that reverts a preceding '-Werror' option, if available. +AC_DEFUN([gl_CXX_ALLOW_WARNINGS], +[ + dnl Requires AC_PROG_CXX or gl_PROG_ANSI_CXX. + if test -n "$CXX" && test "$CXX" !=3D no; then + AC_CACHE_CHECK([for C++ compiler option to allow warnings], + [gl_cv_cxx_wallow], + [rm -f conftest* + echo 'int dummy;' > conftest.cc + AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>c= onftest1.err]) >/dev/null + AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conf= test.cc 2>conftest2.err]) >/dev/null + dnl Test the number of error output lines, because AIX xlC accept= s the + dnl option '-Wno-error', just to produce a warning + dnl "Option -Wno-error was incorrectly specified. The option will= be ignored." + dnl afterwards. + if test $? =3D 0 && test `wc -l < conftest1.err` =3D `wc -l < con= ftest2.err`; then + gl_cv_cxx_wallow=3D'-Wno-error' + else + gl_cv_cxx_wallow=3Dnone + fi + rm -f conftest* + ]) + case "$gl_cv_cxx_wallow" in + none) GL_CXXFLAG_ALLOW_WARNINGS=3D'' ;; + *) GL_CXXFLAG_ALLOW_WARNINGS=3D"$gl_cv_cxx_wallow" ;; + esac + else + GL_CXXFLAG_ALLOW_WARNINGS=3D'' + fi + AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS]) +]) + dnl Expands to some code for use in .c programs that, on native Windows,= defines dnl the Microsoft deprecated alias function names to the underscore-pref= ixed dnl actual function names. With this macro, these function names are ava= ilable diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index cd6f7b4bbd..30bda2de08 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -120,6 +120,7 @@ AC_DEFUN # Code from module inttypes-incomplete: # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) + AC_REQUIRE([gl_YEAR2038_EARLY]) # Code from module lchmod: # Code from module libc-config: # Code from module libgmp: @@ -146,6 +147,8 @@ AC_DEFUN # Code from module rawmemchr: # Code from module readlink: # Code from module readlinkat: + # Code from module realloc-gnu: + # Code from module realloc-posix: # Code from module regex: # Code from module root-uid: # Code from module scratch_buffer: @@ -188,6 +191,7 @@ AC_DEFUN # Code from module u64: # Code from module unistd: # Code from module unlocked-io: + # Code from module unlocked-io-internal: # Code from module update-copyright: # Code from module utimens: # Code from module utimensat: @@ -212,6 +216,8 @@ AC_DEFUN m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) + m4_pushdef([GL_MACRO_PREFIX], [gl]) + m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) gl_COMMON gl_source_base=3D'lib' gl_FUNC_ACL @@ -244,6 +250,7 @@ AC_DEFUN gl_SHA512 gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE gl_DIRENT_H + gl_DIRENT_H_REQUIRE_DEFAULTS gl_DOUBLE_SLASH_ROOT gl_FUNC_DUP2 if test $REPLACE_DUP2 =3D 1; then @@ -281,6 +288,7 @@ AC_DEFUN fi gl_FCNTL_MODULE_INDICATOR([fcntl]) gl_FCNTL_H + gl_FCNTL_H_REQUIRE_DEFAULTS gl_FUNC_FDOPENDIR if test $HAVE_FDOPENDIR =3D 0 || test $REPLACE_FDOPENDIR =3D 1; then AC_LIBOBJ([fdopendir]) @@ -335,10 +343,10 @@ AC_DEFUN if test $REPLACE_GETOPT =3D 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) - dnl Arrange for unistd.h to include getopt.h. - GNULIB_GL_UNISTD_H_GETOPT=3D1 + dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1. + gl_UNISTD_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1]) fi - AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_UNISTD_MODULE_INDICATOR([getopt-posix]) AC_REQUIRE([AC_CANONICAL_HOST]) gl_FUNC_GETRANDOM @@ -355,6 +363,7 @@ AC_DEFUN gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) gl_IEEE754_H gl_INTTYPES_INCOMPLETE + gl_INTTYPES_H_REQUIRE_DEFAULTS AC_REQUIRE([gl_LARGEFILE]) gl___INLINE gl_LIBGMP @@ -442,22 +451,50 @@ AC_DEFUN fi gl_STRING_MODULE_INDICATOR([sigdescr_np]) gl_SIGNAL_H + gl_SIGNAL_H_REQUIRE_DEFAULTS gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T gl_STAT_TIME gl_STAT_BIRTHTIME gl_STDALIGN_H gl_STDDEF_H + gl_STDDEF_H_REQUIRE_DEFAULTS gl_STDINT_H gl_STDIO_H + gl_STDIO_H_REQUIRE_DEFAULTS + dnl No need to create extra modules for these functions. Everyone who = uses + dnl likely needs them. + gl_STDIO_MODULE_INDICATOR([fscanf]) + gl_MODULE_INDICATOR([fscanf]) + gl_STDIO_MODULE_INDICATOR([scanf]) + gl_MODULE_INDICATOR([scanf]) + gl_STDIO_MODULE_INDICATOR([fgetc]) + gl_STDIO_MODULE_INDICATOR([getc]) + gl_STDIO_MODULE_INDICATOR([getchar]) + gl_STDIO_MODULE_INDICATOR([fgets]) + gl_STDIO_MODULE_INDICATOR([fread]) + dnl No need to create extra modules for these functions. Everyone who = uses + dnl likely needs them. + gl_STDIO_MODULE_INDICATOR([fprintf]) + gl_STDIO_MODULE_INDICATOR([printf]) + gl_STDIO_MODULE_INDICATOR([vfprintf]) + gl_STDIO_MODULE_INDICATOR([vprintf]) + gl_STDIO_MODULE_INDICATOR([fputc]) + gl_STDIO_MODULE_INDICATOR([putc]) + gl_STDIO_MODULE_INDICATOR([putchar]) + gl_STDIO_MODULE_INDICATOR([fputs]) + gl_STDIO_MODULE_INDICATOR([puts]) + gl_STDIO_MODULE_INDICATOR([fwrite]) gl_STDLIB_H + gl_STDLIB_H_REQUIRE_DEFAULTS gl_FUNC_STPCPY if test $HAVE_STPCPY =3D 0; then AC_LIBOBJ([stpcpy]) gl_PREREQ_STPCPY fi gl_STRING_MODULE_INDICATOR([stpcpy]) - gl_HEADER_STRING_H + gl_STRING_H + gl_STRING_H_REQUIRE_DEFAULTS gl_FUNC_STRNLEN if test $HAVE_DECL_STRNLEN =3D 0 || test $REPLACE_STRNLEN =3D 1; then AC_LIBOBJ([strnlen]) @@ -475,19 +512,25 @@ AC_DEFUN AC_LIBOBJ([symlink]) fi gl_UNISTD_MODULE_INDICATOR([symlink]) - gl_HEADER_SYS_RANDOM + gl_SYS_RANDOM_H + gl_SYS_RANDOM_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P - AC_REQUIRE([gl_HEADER_SYS_SELECT]) + gl_SYS_SELECT_H + gl_SYS_SELECT_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P - gl_HEADER_SYS_STAT_H + gl_SYS_STAT_H + gl_SYS_STAT_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P - gl_HEADER_SYS_TIME_H + gl_SYS_TIME_H + gl_SYS_TIME_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_SYS_TYPES_H + gl_SYS_TYPES_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_FUNC_GEN_TEMPNAME gl_MODULE_INDICATOR([tempname]) - gl_HEADER_TIME_H + gl_TIME_H + gl_TIME_H_REQUIRE_DEFAULTS gl_TIME_R if test $HAVE_LOCALTIME_R =3D 0 || test $REPLACE_LOCALTIME_R =3D 1; th= en AC_LIBOBJ([time_r]) @@ -508,6 +551,17 @@ AC_DEFUN gl_TIMER_TIME gl_TIMESPEC gl_UNISTD_H + gl_UNISTD_H_REQUIRE_DEFAULTS + AC_DEFINE([GNULIB_STDIO_SINGLE_THREAD], [1], + [Define to 1 if you want the FILE stream functions getc, putc, etc. + to use unlocked I/O if available, throughout the package. + Unlocked I/O can improve performance, sometimes dramatically. + But unlocked I/O is safe only in single-threaded programs, + as well as in multithreaded programs for which you can guarantee th= at + every FILE stream, including stdin, stdout, stderr, is used only + in a single thread.]) + AC_DEFINE([USE_UNLOCKED_IO], [GNULIB_STDIO_SINGLE_THREAD], + [An alias of GNULIB_STDIO_SINGLE_THREAD.]) gl_FUNC_GLIBC_UNLOCKED_IO gl_FUNC_UTIMENSAT if test $HAVE_UTIMENSAT =3D 0 || test $REPLACE_UTIMENSAT =3D 1; then @@ -525,12 +579,13 @@ AC_DEFUN gl_gnulib_enabled_getgroups=3Dfalse gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=3Dfalse gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=3Dfalse - gl_gnulib_enabled_idx=3Dfalse gl_gnulib_enabled_lchmod=3Dfalse gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=3Dfalse gl_gnulib_enabled_open=3Dfalse gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=3Dfalse gl_gnulib_enabled_rawmemchr=3Dfalse + gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=3Dfalse + gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=3Dfalse gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=3Dfalse gl_gnulib_enabled_scratch_buffer=3Dfalse gl_gnulib_enabled_strtoll=3Dfalse @@ -569,6 +624,7 @@ AC_DEFUN func_gl_gnulib_m4code_dynarray () { if ! $gl_gnulib_enabled_dynarray; then + AC_PROG_MKDIR_P gl_gnulib_enabled_dynarray=3Dtrue fi } @@ -639,16 +695,10 @@ AC_DEFUN func_gl_gnulib_m4code_getgroups fi if test $HAVE_GROUP_MEMBER =3D 0; then - func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec + func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b fi fi } - func_gl_gnulib_m4code_idx () - { - if ! $gl_gnulib_enabled_idx; then - gl_gnulib_enabled_idx=3Dtrue - fi - } func_gl_gnulib_m4code_lchmod () { if ! $gl_gnulib_enabled_lchmod; then @@ -705,6 +755,31 @@ AC_DEFUN gl_gnulib_enabled_rawmemchr=3Dtrue fi } + func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b () + { + if ! $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b; then + gl_FUNC_REALLOC_GNU + if test $REPLACE_REALLOC =3D 1; then + AC_LIBOBJ([realloc]) + fi + gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=3Dtrue + func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 + fi + } + func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 () + { + if ! $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then + gl_FUNC_REALLOC_POSIX + if test $REPLACE_REALLOC =3D 1; then + AC_LIBOBJ([realloc]) + fi + gl_STDLIB_MODULE_INDICATOR([realloc-posix]) + gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=3Dtrue + if test $REPLACE_REALLOC =3D 1; then + func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec + fi + fi + } func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c () { if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then @@ -714,14 +789,16 @@ AC_DEFUN func_gl_gnulib_m4code_scratch_buffer () { if ! $gl_gnulib_enabled_scratch_buffer; then + AC_PROG_MKDIR_P gl_gnulib_enabled_scratch_buffer=3Dtrue + func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 fi } func_gl_gnulib_m4code_strtoll () { if ! $gl_gnulib_enabled_strtoll; then gl_FUNC_STRTOLL - if test $HAVE_STRTOLL =3D 0; then + if test $HAVE_STRTOLL =3D 0 || test $REPLACE_STRTOLL =3D 1; then AC_LIBOBJ([strtoll]) gl_PREREQ_STRTOLL fi @@ -745,9 +822,6 @@ AC_DEFUN if test $HAVE_CANONICALIZE_FILE_NAME =3D 0 || test $REPLACE_CANONICALI= ZE_FILE_NAME =3D 1; then func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c fi - if test $HAVE_CANONICALIZE_FILE_NAME =3D 0 || test $REPLACE_CANONICALI= ZE_FILE_NAME =3D 1; then - func_gl_gnulib_m4code_idx - fi if test $HAVE_CANONICALIZE_FILE_NAME =3D 0 || test $REPLACE_CANONICALI= ZE_FILE_NAME =3D 1; then func_gl_gnulib_m4code_rawmemchr fi @@ -811,9 +885,6 @@ AC_DEFUN if { test $HAVE_DECL_STRTOIMAX =3D 0 || test $REPLACE_STRTOIMAX =3D 1;= } && test $ac_cv_type_long_long_int =3D yes; then func_gl_gnulib_m4code_strtoll fi - if test $HAVE_TIMEZONE_T =3D 0; then - func_gl_gnulib_m4code_idx - fi if test $HAVE_TIMEGM =3D 0 || test $REPLACE_TIMEGM =3D 1; then func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 fi @@ -837,12 +908,13 @@ AC_DEFUN AM_CONDITIONAL([gl_GNULIB_ENABLED_getgroups], [$gl_gnulib_enabled_getg= roups]) AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [= $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [= $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_idx], [$gl_gnulib_enabled_idx]) AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod]= ) AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [= $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31]) AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open]) AM_CONDITIONAL([gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7], [= $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7]) AM_CONDITIONAL([gl_GNULIB_ENABLED_rawmemchr], [$gl_gnulib_enabled_rawm= emchr]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b], [= $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4], [= $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4]) AM_CONDITIONAL([gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c], [= $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c]) AM_CONDITIONAL([gl_GNULIB_ENABLED_scratch_buffer], [$gl_gnulib_enabled= _scratch_buffer]) AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtol= l]) @@ -860,6 +932,8 @@ AC_DEFUN m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES,= not found])]) ]) + m4_popdef([GL_MODULE_INDICATOR_PREFIX]) + m4_popdef([GL_MACRO_PREFIX]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) @@ -886,6 +960,8 @@ AC_DEFUN m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) + m4_pushdef([GL_MACRO_PREFIX], [gltests]) + m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) gl_COMMON gl_source_base=3D'tests' changequote(,)dnl @@ -907,6 +983,8 @@ AC_DEFUN m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES,= not found])]) ]) + m4_popdef([GL_MODULE_INDICATOR_PREFIX]) + m4_popdef([GL_MACRO_PREFIX]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) @@ -1127,6 +1205,7 @@ AC_DEFUN lib/rawmemchr.valgrind lib/readlink.c lib/readlinkat.c + lib/realloc.c lib/regcomp.c lib/regex.c lib/regex.h @@ -1247,6 +1326,7 @@ AC_DEFUN m4/libgmp.m4 m4/limits-h.m4 m4/lstat.m4 + m4/malloc.m4 m4/manywarnings-c++.m4 m4/manywarnings.m4 m4/mbstate_t.m4 @@ -1273,6 +1353,7 @@ AC_DEFUN m4/rawmemchr.m4 m4/readlink.m4 m4/readlinkat.m4 + m4/realloc.m4 m4/regex.m4 m4/sha1.m4 m4/sha256.m4 @@ -1319,5 +1400,6 @@ AC_DEFUN m4/warnings.m4 m4/wchar_t.m4 m4/wint_t.m4 + m4/year2038.m4 m4/zzgnulib.m4 ]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 index f56e94a888..64b1de5c42 100644 --- a/m4/inttypes.m4 +++ b/m4/inttypes.m4 @@ -1,4 +1,4 @@ -# inttypes.m4 serial 32 +# inttypes.m4 serial 35 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,7 +7,7 @@ dnl From Derek Price, Bruno Haible. dnl Test whether is supported or must be substituted. =20 -AC_DEFUN([gl_INTTYPES_H], +AC_DEFUN_ONCE([gl_INTTYPES_H], [ AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) gl_INTTYPES_PRI_SCN @@ -136,19 +136,34 @@ AC_DEFUN AC_SUBST([$1]) ]) =20 +# gl_INTTYPES_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_INTTYPES_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_INTTYPES_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAU= LTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXABS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXDIV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOIMAX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUMAX]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) +]) + AC_DEFUN([gl_INTTYPES_H_DEFAULTS], [ - GNULIB_IMAXABS=3D0; AC_SUBST([GNULIB_IMAXABS]) - GNULIB_IMAXDIV=3D0; AC_SUBST([GNULIB_IMAXDIV]) - GNULIB_STRTOIMAX=3D0; AC_SUBST([GNULIB_STRTOIMAX]) - GNULIB_STRTOUMAX=3D0; AC_SUBST([GNULIB_STRTOUMAX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_IMAXABS=3D1; AC_SUBST([HAVE_DECL_IMAXABS]) HAVE_DECL_IMAXDIV=3D1; AC_SUBST([HAVE_DECL_IMAXDIV]) diff --git a/m4/largefile.m4 b/m4/largefile.m4 index cadb16dc97..fbde5e6647 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 @@ -22,7 +22,8 @@ AC_DEFUN esac ]) =20 -# The following implementation works around a problem in autoconf <=3D 2= =2E69; +# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+= +# with _TIME_BITS. Also, work around a problem in autoconf <=3D 2.69: # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,= # or configures them incorrectly in some cases. m4_version_prereq([2.70], [], [ @@ -40,6 +41,7 @@ m4_define && LARGE_OFF_T % 2147483647 =3D=3D 1) ? 1 : -1]];[]dnl ]) +])# m4_version_prereq 2.70 =20 =20 # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, @@ -54,7 +56,8 @@ m4_define [AC_LANG_PROGRAM([$5], [$6])], [$3=3Dno; break]) m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( - [AC_LANG_PROGRAM([#define $1 $2 + [AC_LANG_PROGRAM([#undef $1 +#define $1 $2 $5], [$6])], [$3=3D$2; break]) $3=3Dunknown @@ -80,9 +83,8 @@ m4_define AC_DEFUN([AC_SYS_LARGEFILE], [AC_ARG_ENABLE(largefile, [ --disable-largefile omit support for large files])= -if test "$enable_largefile" !=3D no; then - - AC_CACHE_CHECK([for special C compiler options needed for large files]= , +AS_IF([test "$enable_largefile" !=3D no], + [AC_CACHE_CHECK([for special C compiler options needed for large files]= , ac_cv_sys_largefile_CC, [ac_cv_sys_largefile_CC=3Dno if test "$GCC" !=3D yes; then @@ -107,15 +109,15 @@ AC_DEFUN ac_cv_sys_file_offset_bits, [Number of bits in a file offset, on hosts where this is settable.],= [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - if test $ac_cv_sys_file_offset_bits =3D unknown; then - _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, - [Define for large files, on AIX-style hosts.], - [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - fi -fi + AS_CASE([$ac_cv_sys_file_offset_bits], + [unknown], + [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1], + [ac_cv_sys_large_files], + [Define for large files, on AIX-style hosts.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES])], + [64], + [gl_YEAR2038_BODY([])])]) ])# AC_SYS_LARGEFILE -])# m4_version_prereq 2.70 =20 # Enable large files on systems where this is implemented by Gnulib, not= by the # system headers. diff --git a/m4/malloc.m4 b/m4/malloc.m4 new file mode 100644 index 0000000000..972e808ab7 --- /dev/null +++ b/m4/malloc.m4 @@ -0,0 +1,174 @@ +# malloc.m4 serial 27 +dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# This is adapted with modifications from upstream Autoconf here: +# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/funct= ions.m4?id=3Dv2.70#n949 +AC_DEFUN([_AC_FUNC_MALLOC_IF], +[ + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CACHE_CHECK([whether malloc (0) returns nonnull], + [ac_cv_func_malloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[void *p =3D malloc (0); + int result =3D !p; + free (p); + return result;]]) + ], + [ac_cv_func_malloc_0_nonnull=3Dyes], + [ac_cv_func_malloc_0_nonnull=3Dno], + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | gnu* | *-musl* | midnightbsd* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull=3D"guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_malloc_0_nonnull=3D"$gl_cross_guess_normal" ;; + esac + ]) + ]) + AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2]) +])# _AC_FUNC_MALLOC_IF + +# gl_FUNC_MALLOC_GNU +# ------------------ +# Replace malloc if it is not compatible with GNU libc. +AC_DEFUN([gl_FUNC_MALLOC_GNU], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) + if test $REPLACE_MALLOC =3D 0; then + _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=3D1]) + fi +]) + +# gl_FUNC_MALLOC_PTRDIFF +# ---------------------- +# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX, +# and replace malloc otherwise. +AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) + test "$gl_cv_malloc_ptrdiff" =3D yes || REPLACE_MALLOC=3D1 +]) + +# Test whether malloc, realloc, calloc refuse to create objects +# larger than what can be expressed in ptrdiff_t. +# Set gl_cv_func_malloc_gnu to yes or no accordingly. +AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF], +[ + AC_CACHE_CHECK([whether malloc is ptrdiff_t safe], + [gl_cv_malloc_ptrdiff], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[/* 64-bit ptrdiff_t is so wide that no practical platform + can exceed it. */ + #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 !=3D 0) + + /* On rare machines where size_t fits in ptrdiff_t there + is no problem. */ + #define NARROW_SIZE (SIZE_MAX <=3D PTRDIFF_MAX) + + /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t + bounds even on 32-bit platforms. We don't know which + non-glibc systems are safe. */ + #define KNOWN_SAFE (2 < __GLIBC__ + (30 <=3D __GLIBC_MINOR__= )) + + #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE + return 0; + #else + #error "malloc might not be ptrdiff_t safe" + syntax error + #endif + ]])], + [gl_cv_malloc_ptrdiff=3Dyes], + [gl_cv_malloc_ptrdiff=3Dno]) + ]) +]) + +# gl_FUNC_MALLOC_POSIX +# -------------------- +# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it= +# fails, and doesn't mess up with ptrdiff_t overflow), and replace +# malloc if it is not. +AC_DEFUN([gl_FUNC_MALLOC_POSIX], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF]) + AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) + if test "$gl_cv_func_malloc_posix" =3D yes; then + AC_DEFINE([HAVE_MALLOC_POSIX], [1], + [Define if malloc, realloc, and calloc set errno on allocation fai= lure.]) + else + REPLACE_MALLOC=3D1 + fi +]) + +# Test whether malloc, realloc, calloc set errno to ENOMEM on failure. +# Set gl_cv_func_malloc_posix to yes or no accordingly. +AC_DEFUN([gl_CHECK_MALLOC_POSIX], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether malloc, realloc, calloc set errno on failure],= + [gl_cv_func_malloc_posix], + [ + dnl It is too dangerous to try to allocate a large amount of memor= y: + dnl some systems go to their knees when you do that. So assume tha= t + dnl all Unix implementations of the function set errno on failure,= + dnl except on those platforms where we have seen 'test-malloc-gnu'= , + dnl 'test-realloc-gnu', 'test-calloc-gnu' fail. + case "$host_os" in + mingw*) + gl_cv_func_malloc_posix=3Dno ;; + irix* | solaris*) + dnl On IRIX 6.5, the three functions return NULL with errno un= set + dnl when the argument is larger than PTRDIFF_MAX. + dnl On Solaris 11.3, the three functions return NULL with errn= o set + dnl to EAGAIN, not ENOMEM, when the argument is larger than + dnl PTRDIFF_MAX. + dnl Here is a test program: +m4_divert_push([KILL]) +#include +#include +#include +#define ptrdiff_t long +#ifndef PTRDIFF_MAX +# define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1))= - 1)) +#endif + +int main () +{ + void *p; + + fprintf (stderr, "PTRDIFF_MAX =3D %lu\n", (unsigned long) PTRDIFF_MAX)= ; + + errno =3D 0; + p =3D malloc ((unsigned long) PTRDIFF_MAX + 1); + fprintf (stderr, "p=3D%p errno=3D%d\n", p, errno); + + errno =3D 0; + p =3D calloc (PTRDIFF_MAX / 2 + 1, 2); + fprintf (stderr, "p=3D%p errno=3D%d\n", p, errno); + + errno =3D 0; + p =3D realloc (NULL, (unsigned long) PTRDIFF_MAX + 1); + fprintf (stderr, "p=3D%p errno=3D%d\n", p, errno); + + return 0; +} +m4_divert_pop([KILL]) + gl_cv_func_malloc_posix=3Dno ;; + *) + gl_cv_func_malloc_posix=3Dyes ;; + esac + ]) +]) diff --git a/m4/memmem.m4 b/m4/memmem.m4 index e2a785f48d..6dac766128 100644 --- a/m4/memmem.m4 +++ b/m4/memmem.m4 @@ -1,4 +1,4 @@ -# memmem.m4 serial 27 +# memmem.m4 serial 29 dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,7 +10,7 @@ AC_DEFUN dnl Persuade glibc to declare memmem(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([memmem]) if test $ac_cv_func_memmem =3D yes; then HAVE_MEMMEM=3D1 @@ -50,6 +50,7 @@ AC_DEFUN dnl Assume that it works on all other platforms (even if not li= near). AC_EGREP_CPP([Lucky user], [ +#include /* for __GNU_LIBRARY__ */ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ =3D=3D 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9)= \ diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4 index c5ee2af8cc..f9d9ec8f30 100644 --- a/m4/mempcpy.m4 +++ b/m4/mempcpy.m4 @@ -1,4 +1,4 @@ -# mempcpy.m4 serial 11 +# mempcpy.m4 serial 12 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -13,7 +13,7 @@ AC_DEFUN dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([mempcpy]) if test $ac_cv_func_mempcpy =3D no; then HAVE_MEMPCPY=3D0 diff --git a/m4/memrchr.m4 b/m4/memrchr.m4 index d0c05896e5..40f61c5ac0 100644 --- a/m4/memrchr.m4 +++ b/m4/memrchr.m4 @@ -1,4 +1,4 @@ -# memrchr.m4 serial 10 +# memrchr.m4 serial 11 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -10,7 +10,7 @@ AC_DEFUN dnl Persuade glibc to declare memrchr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([memrchr]) if test $ac_cv_have_decl_memrchr =3D no; then HAVE_DECL_MEMRCHR=3D0 diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 245649e774..721189af56 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,4 +1,4 @@ -# serial 35 +# serial 36 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -255,7 +255,7 @@ AC_DEFUN dnl Main macro of module 'mktime'. AC_DEFUN([gl_FUNC_MKTIME], [ - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) =20 diff --git a/m4/pselect.m4 b/m4/pselect.m4 index 538fe7dc12..9de63baf99 100644 --- a/m4/pselect.m4 +++ b/m4/pselect.m4 @@ -1,4 +1,4 @@ -# pselect.m4 serial 9 +# pselect.m4 serial 10 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 AC_DEFUN([gl_FUNC_PSELECT], [ - AC_REQUIRE([gl_HEADER_SYS_SELECT]) + AC_REQUIRE([gl_SYS_SELECT_H]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([pselect]) diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index eb4c784965..ff7fa9610e 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 19 +# pthread_sigmask.m4 serial 21 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -111,9 +111,9 @@ AC_DEFUN AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles =20 - dnl On FreeBSD 6.4, HP-UX 11.31, Solaris 9, in programs that are not= linked - dnl with -lpthread, the pthread_sigmask() function always returns 0 = and has - dnl no effect. + dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in pro= grams + dnl that are not linked with -lpthread, the pthread_sigmask() functi= on + dnl always returns 0 and has no effect. if test -z "$LIB_PTHREAD_SIGMASK"; then case " $LIBS " in *' -pthread '*) ;; @@ -138,7 +138,7 @@ AC_DEFUN [ changequote(,)dnl case "$host_os" in - freebsd* | hpux* | solaris | solaris2.[2-9]*) + freebsd* | midnightbsd* | hpux* | solaris | solaris2.= [2-9]*) gl_cv_func_pthread_sigmask_in_libc_works=3D"guessin= g no";; *) gl_cv_func_pthread_sigmask_in_libc_works=3D"guessin= g yes";; diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4 index f92846543c..452fab18f1 100644 --- a/m4/rawmemchr.m4 +++ b/m4/rawmemchr.m4 @@ -1,4 +1,4 @@ -# rawmemchr.m4 serial 2 +# rawmemchr.m4 serial 3 dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,7 @@ AC_DEFUN dnl Persuade glibc to declare rawmemchr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([rawmemchr]) if test $ac_cv_func_rawmemchr =3D no; then HAVE_RAWMEMCHR=3D0 diff --git a/m4/realloc.m4 b/m4/realloc.m4 new file mode 100644 index 0000000000..0abc4185ed --- /dev/null +++ b/m4/realloc.m4 @@ -0,0 +1,63 @@ +# realloc.m4 serial 24 +dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# This is adapted with modifications from upstream Autoconf here: +# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/funct= ions.m4?id=3Dv2.70#n1455 +AC_DEFUN([_AC_FUNC_REALLOC_IF], +[ + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull], + [ac_cv_func_realloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[void *p =3D realloc (0, 0); + int result =3D !p; + free (p); + return result;]]) + ], + [ac_cv_func_realloc_0_nonnull=3Dyes], + [ac_cv_func_realloc_0_nonnull=3Dno], + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | gnu* | *-musl* | midnightbsd* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_realloc_0_nonnull=3D"guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_realloc_0_nonnull=3D"$gl_cross_guess_normal" ;; + esac + ]) + ]) + AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2]) +])# AC_FUNC_REALLOC + +# gl_FUNC_REALLOC_GNU +# ------------------- +# Replace realloc if it is not compatible with GNU libc. +AC_DEFUN([gl_FUNC_REALLOC_GNU], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_REALLOC_POSIX]) + if test $REPLACE_REALLOC =3D 0; then + _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=3D1]) + fi +])# gl_FUNC_REALLOC_GNU + +# gl_FUNC_REALLOC_POSIX +# --------------------- +# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when i= t +# fails, and doesn't mess up with ptrdiff_t overflow), +# and replace realloc if it is not. +AC_DEFUN([gl_FUNC_REALLOC_POSIX], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) + if test $REPLACE_MALLOC =3D 1; then + REPLACE_REALLOC=3D1 + fi +]) diff --git a/m4/regex.m4 b/m4/regex.m4 index 850c572228..1c7e562f6c 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -# serial 71 +# serial 73 =20 # Copyright (C) 1996-2001, 2003-2021 Free Software Foundation, Inc. # @@ -246,7 +246,7 @@ AC_DEFUN & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); - s =3D re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex)= ; + s =3D re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, ®ex= ); if (s) result |=3D 32; else @@ -264,14 +264,50 @@ AC_DEFUN back reference. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); - s =3D re_compile_pattern ("0|()0|\\1|0", 10, ®ex); + s =3D re_compile_pattern ("0|()0|\\\\1|0", 10, ®ex); if (!s) - result |=3D 64; + { + memset (®s, 0, sizeof regs); + i =3D re_search (®ex, "x", 1, 0, 1, ®s); + if (i !=3D -1) + result |=3D 64; + if (0 <=3D i) + { + free (regs.start); + free (regs.end); + } + regfree (®ex); + } else { if (strcmp (s, "Invalid back reference")) result |=3D 64; + } + + /* glibc bug 11053. */ + re_set_syntax (RE_SYNTAX_POSIX_BASIC); + memset (®ex, 0, sizeof regex); + static char const pat_sub2[] =3D "\\\\(a*\\\\)*a*\\\\1"; + s =3D re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &re= gex); + if (s) + result |=3D 64; + else + { + memset (®s, 0, sizeof regs); + static char const data[] =3D "a"; + int datalen =3D sizeof data - 1; + i =3D re_search (®ex, data, datalen, 0, datalen, ®= s); + if (i !=3D 0) + result |=3D 64; + else if (regs.num_regs < 2) + result |=3D 64; + else if (! (regs.start[0] =3D=3D 0 && regs.end[0] =3D=3D= 1)) + result |=3D 64; + else if (! (regs.start[1] =3D=3D 0 && regs.end[1] =3D=3D= 0)) + result |=3D 64; regfree (®ex); + free (regs.start); + free (regs.end); } =20 #if 0 diff --git a/m4/sigdescr_np.m4 b/m4/sigdescr_np.m4 index f6fa63140c..17c22506cc 100644 --- a/m4/sigdescr_np.m4 +++ b/m4/sigdescr_np.m4 @@ -1,4 +1,4 @@ -# sigdescr_np.m4 serial 1 +# sigdescr_np.m4 serial 2 dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,7 @@ AC_DEFUN dnl Persuade glibc to declare sigdescr_np(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([sigdescr_np]) if test $ac_cv_func_sigdescr_np =3D no; then HAVE_SIGDESCR_NP=3D0 diff --git a/m4/signal_h.m4 b/m4/signal_h.m4 index ff9f0251fd..8b938809b7 100644 --- a/m4/signal_h.m4 +++ b/m4/signal_h.m4 @@ -1,10 +1,10 @@ -# signal_h.m4 serial 19 +# signal_h.m4 serial 22 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_SIGNAL_H], +AC_DEFUN_ONCE([gl_SIGNAL_H], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) @@ -52,22 +52,37 @@ AC_DEFUN fi ]) =20 +# gl_SIGNAL_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SIGNAL_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SIGNAL_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SIGMASK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAISE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNAL_H_SIGPIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGPROCMASK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGACTION]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) +]) + AC_DEFUN([gl_SIGNAL_H_DEFAULTS], [ - GNULIB_PTHREAD_SIGMASK=3D0; AC_SUBST([GNULIB_PTHREAD_SIGMASK]) - GNULIB_RAISE=3D0; AC_SUBST([GNULIB_RAISE]) - GNULIB_SIGNAL_H_SIGPIPE=3D0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) - GNULIB_SIGPROCMASK=3D0; AC_SUBST([GNULIB_SIGPROCMASK]) - GNULIB_SIGACTION=3D0; AC_SUBST([GNULIB_SIGACTION]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_POSIX_SIGNALBLOCKING=3D1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) HAVE_PTHREAD_SIGMASK=3D1; AC_SUBST([HAVE_PTHREAD_SIGMASK]) diff --git a/m4/stdalign.m4 b/m4/stdalign.m4 index 8dcb634d55..e22d7f78c0 100644 --- a/m4/stdalign.m4 +++ b/m4/stdalign.m4 @@ -13,7 +13,8 @@ AC_DEFUN [gl_cv_header_working_stdalign_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[#include + [[#include + #include #include =20 /* Test that alignof yields a result consistent with offseto= f. @@ -32,6 +33,7 @@ AC_DEFUN /* Test _Alignas only on platforms where gnulib can help. *= / #if \ ((defined __cplusplus && 201103 <=3D __cplusplus) \ + || (__TINYC__ && defined __attribute__) \ || (defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <=3D __GNUC_MINOR__) \ : __GNUC__) \ diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4 index cd666c4a58..1303d2e06c 100644 --- a/m4/stddef_h.m4 +++ b/m4/stddef_h.m4 @@ -1,4 +1,4 @@ -# stddef_h.m4 serial 9 +# stddef_h.m4 serial 11 dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 dnl A placeholder for , for platforms that have issues. =20 -AC_DEFUN([gl_STDDEF_H], +AC_DEFUN_ONCE([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) @@ -68,13 +68,28 @@ AC_DEFUN fi ]) =20 +# gl_STDDEF_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STDDEF_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STDDEF_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULT= S], [ + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) +]) + AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. diff --git a/m4/stdint.m4 b/m4/stdint.m4 index a785b44ed1..2eb1652d8e 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 58 +# stdint.m4 serial 60 dnl Copyright (C) 2001-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -170,7 +170,7 @@ AC_DEFUN_ONCE PTRDIFF_MIN =3D=3D TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX =3D=3D TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ + /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN =3D=3D TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX =3D=3D TYPE_MAXIMUM (sig_atomic_t) @@ -527,7 +527,7 @@ AC_DEFUN dnl requirement that wint_t is "unchanged by default argument promotio= ns". dnl In this case gnulib's and override wint_t. dnl Set the variable BITSIZEOF_WINT_T accordingly. - if test $GNULIB_OVERRIDES_WINT_T =3D 1; then + if test $GNULIBHEADERS_OVERRIDE_WINT_T =3D 1; then BITSIZEOF_WINT_T=3D32 fi ]) diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 4c3f24acca..e704383862 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,11 +1,12 @@ -# stdio_h.m4 serial 52 +# stdio_h.m4 serial 56 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_STDIO_H], +AC_DEFUN_ONCE([gl_STDIO_H], [ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AH_VERBATIM([MINGW_ANSI_STDIO], [/* Use GNU style printf and scanf. */ #ifndef __USE_MINGW_ANSI_STDIO @@ -13,7 +14,6 @@ AC_DEFUN #endif ]) AC_DEFINE([__USE_MINGW_ANSI_STDIO]) - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_NEXT_HEADERS([stdio.h]) =20 dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and @@ -40,17 +40,6 @@ AC_DEFUN attribute "__gnu_printf__" instead of "__printf__"]) fi =20 - dnl No need to create extra modules for these functions. Everyone who = uses - dnl likely needs them. - GNULIB_FSCANF=3D1 - gl_MODULE_INDICATOR([fscanf]) - GNULIB_SCANF=3D1 - gl_MODULE_INDICATOR([scanf]) - GNULIB_FGETC=3D1 - GNULIB_GETC=3D1 - GNULIB_GETCHAR=3D1 - GNULIB_FGETS=3D1 - GNULIB_FREAD=3D1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-= read.c" dnl "expected source file, required through AC_LIBSOURCES, not found".= It is dnl also an optimization, to avoid performing a configure check whose = result @@ -64,18 +53,6 @@ AC_DEFUN fi ]) =20 - dnl No need to create extra modules for these functions. Everyone who = uses - dnl likely needs them. - GNULIB_FPRINTF=3D1 - GNULIB_PRINTF=3D1 - GNULIB_VFPRINTF=3D1 - GNULIB_VPRINTF=3D1 - GNULIB_FPUTC=3D1 - GNULIB_PUTC=3D1 - GNULIB_PUTCHAR=3D1 - GNULIB_FPUTS=3D1 - GNULIB_PUTS=3D1 - GNULIB_FWRITE=3D1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-= write.c" dnl "expected source file, required through AC_LIBSOURCES, not found".= It is dnl also an optimization, to avoid performing a configure check whose = result @@ -116,77 +93,92 @@ AC_DEFUN fi ]) =20 +# gl_STDIO_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STDIO_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS= ], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCLOSE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFLUSH]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREAD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEKO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELLO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FWRITE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCHAR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDELIM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLINE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PCLOSE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PERROR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTCHAR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMOVE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAMEAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SNPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_NONBLOCKING]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_SIGPIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TMPFILE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VASPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFSCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VDPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSNPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSPRINTF_POSIX]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCLOSEALL], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FDOPEN], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FILENO], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETW], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTW], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TEMPNAM], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAUL= TS]) + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) +]) + AC_DEFUN([gl_STDIO_H_DEFAULTS], [ - GNULIB_DPRINTF=3D0; AC_SUBST([GNULIB_DPRINTF]) - GNULIB_FCLOSE=3D0; AC_SUBST([GNULIB_FCLOSE]) - GNULIB_FDOPEN=3D0; AC_SUBST([GNULIB_FDOPEN]) - GNULIB_FFLUSH=3D0; AC_SUBST([GNULIB_FFLUSH]) - GNULIB_FGETC=3D0; AC_SUBST([GNULIB_FGETC]) - GNULIB_FGETS=3D0; AC_SUBST([GNULIB_FGETS]) - GNULIB_FOPEN=3D0; AC_SUBST([GNULIB_FOPEN]) - GNULIB_FPRINTF=3D0; AC_SUBST([GNULIB_FPRINTF]) - GNULIB_FPRINTF_POSIX=3D0; AC_SUBST([GNULIB_FPRINTF_POSIX]) - GNULIB_FPURGE=3D0; AC_SUBST([GNULIB_FPURGE]) - GNULIB_FPUTC=3D0; AC_SUBST([GNULIB_FPUTC]) - GNULIB_FPUTS=3D0; AC_SUBST([GNULIB_FPUTS]) - GNULIB_FREAD=3D0; AC_SUBST([GNULIB_FREAD]) - GNULIB_FREOPEN=3D0; AC_SUBST([GNULIB_FREOPEN]) - GNULIB_FSCANF=3D0; AC_SUBST([GNULIB_FSCANF]) - GNULIB_FSEEK=3D0; AC_SUBST([GNULIB_FSEEK]) - GNULIB_FSEEKO=3D0; AC_SUBST([GNULIB_FSEEKO]) - GNULIB_FTELL=3D0; AC_SUBST([GNULIB_FTELL]) - GNULIB_FTELLO=3D0; AC_SUBST([GNULIB_FTELLO]) - GNULIB_FWRITE=3D0; AC_SUBST([GNULIB_FWRITE]) - GNULIB_GETC=3D0; AC_SUBST([GNULIB_GETC]) - GNULIB_GETCHAR=3D0; AC_SUBST([GNULIB_GETCHAR]) - GNULIB_GETDELIM=3D0; AC_SUBST([GNULIB_GETDELIM]) - GNULIB_GETLINE=3D0; AC_SUBST([GNULIB_GETLINE]) - GNULIB_OBSTACK_PRINTF=3D0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) - GNULIB_OBSTACK_PRINTF_POSIX=3D0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX= ]) - GNULIB_PCLOSE=3D0; AC_SUBST([GNULIB_PCLOSE]) - GNULIB_PERROR=3D0; AC_SUBST([GNULIB_PERROR]) - GNULIB_POPEN=3D0; AC_SUBST([GNULIB_POPEN]) - GNULIB_PRINTF=3D0; AC_SUBST([GNULIB_PRINTF]) - GNULIB_PRINTF_POSIX=3D0; AC_SUBST([GNULIB_PRINTF_POSIX]) - GNULIB_PUTC=3D0; AC_SUBST([GNULIB_PUTC]) - GNULIB_PUTCHAR=3D0; AC_SUBST([GNULIB_PUTCHAR]) - GNULIB_PUTS=3D0; AC_SUBST([GNULIB_PUTS]) - GNULIB_REMOVE=3D0; AC_SUBST([GNULIB_REMOVE]) - GNULIB_RENAME=3D0; AC_SUBST([GNULIB_RENAME]) - GNULIB_RENAMEAT=3D0; AC_SUBST([GNULIB_RENAMEAT]) - GNULIB_SCANF=3D0; AC_SUBST([GNULIB_SCANF]) - GNULIB_SNPRINTF=3D0; AC_SUBST([GNULIB_SNPRINTF]) - GNULIB_SPRINTF_POSIX=3D0; AC_SUBST([GNULIB_SPRINTF_POSIX]) - GNULIB_STDIO_H_NONBLOCKING=3D0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]= ) - GNULIB_STDIO_H_SIGPIPE=3D0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) - GNULIB_TMPFILE=3D0; AC_SUBST([GNULIB_TMPFILE]) - GNULIB_VASPRINTF=3D0; AC_SUBST([GNULIB_VASPRINTF]) - GNULIB_VFSCANF=3D0; AC_SUBST([GNULIB_VFSCANF]) - GNULIB_VSCANF=3D0; AC_SUBST([GNULIB_VSCANF]) - GNULIB_VDPRINTF=3D0; AC_SUBST([GNULIB_VDPRINTF]) - GNULIB_VFPRINTF=3D0; AC_SUBST([GNULIB_VFPRINTF]) - GNULIB_VFPRINTF_POSIX=3D0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) - GNULIB_VPRINTF=3D0; AC_SUBST([GNULIB_VPRINTF]) - GNULIB_VPRINTF_POSIX=3D0; AC_SUBST([GNULIB_VPRINTF_POSIX]) - GNULIB_VSNPRINTF=3D0; AC_SUBST([GNULIB_VSNPRINTF]) - GNULIB_VSPRINTF_POSIX=3D0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_FCLOSEALL=3D1; AC_SUBST([GNULIB_MDA_FCLOSEALL]) - GNULIB_MDA_FDOPEN=3D1; AC_SUBST([GNULIB_MDA_FDOPEN]) - GNULIB_MDA_FILENO=3D1; AC_SUBST([GNULIB_MDA_FILENO]) - GNULIB_MDA_GETW=3D1; AC_SUBST([GNULIB_MDA_GETW]) - GNULIB_MDA_PUTW=3D1; AC_SUBST([GNULIB_MDA_PUTW]) - GNULIB_MDA_TEMPNAM=3D1; AC_SUBST([GNULIB_MDA_TEMPNAM]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_FCLOSEALL=3D1; AC_SUBST([HAVE_DECL_FCLOSEALL]) HAVE_DECL_FPURGE=3D1; AC_SUBST([HAVE_DECL_FPURGE]) diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 5a02972e05..9c1d1c76c1 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,10 +1,10 @@ -# stdlib_h.m4 serial 55 +# stdlib_h.m4 serial 63 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_STDLIB_H], +AC_DEFUN_ONCE([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_NEXT_HEADERS([stdlib.h]) @@ -28,7 +28,7 @@ AC_DEFUN posix_memalign posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r - strtod strtold strtoll strtoull unlockpt unsetenv]) + strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv]) =20 AC_REQUIRE([AC_C_RESTRICT]) =20 @@ -46,61 +46,78 @@ AC_DEFUN fi ]) =20 +# gl_STDLIB_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STDLIB_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMPS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMPS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_MEMALIGN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_OPENPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_QSORT_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SECURE_GETENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOULL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYSTEM_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLOCKPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNSETENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOMB]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ECVT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCVT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GCVT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKTEMP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTENV], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) +]) + AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ - GNULIB__EXIT=3D0; AC_SUBST([GNULIB__EXIT]) - GNULIB_ALIGNED_ALLOC=3D0; AC_SUBST([GNULIB_ALIGNED_ALLOC]) - GNULIB_ATOLL=3D0; AC_SUBST([GNULIB_ATOLL]) - GNULIB_CALLOC_POSIX=3D0; AC_SUBST([GNULIB_CALLOC_POSIX]) - GNULIB_CANONICALIZE_FILE_NAME=3D0; AC_SUBST([GNULIB_CANONICALIZE_FILE= _NAME]) - GNULIB_FREE_POSIX=3D0; AC_SUBST([GNULIB_FREE_POSIX]) - GNULIB_GETLOADAVG=3D0; AC_SUBST([GNULIB_GETLOADAVG]) - GNULIB_GETSUBOPT=3D0; AC_SUBST([GNULIB_GETSUBOPT]) - GNULIB_GRANTPT=3D0; AC_SUBST([GNULIB_GRANTPT]) - GNULIB_MALLOC_POSIX=3D0; AC_SUBST([GNULIB_MALLOC_POSIX]) - GNULIB_MBTOWC=3D0; AC_SUBST([GNULIB_MBTOWC]) - GNULIB_MKDTEMP=3D0; AC_SUBST([GNULIB_MKDTEMP]) - GNULIB_MKOSTEMP=3D0; AC_SUBST([GNULIB_MKOSTEMP]) - GNULIB_MKOSTEMPS=3D0; AC_SUBST([GNULIB_MKOSTEMPS]) - GNULIB_MKSTEMP=3D0; AC_SUBST([GNULIB_MKSTEMP]) - GNULIB_MKSTEMPS=3D0; AC_SUBST([GNULIB_MKSTEMPS]) - GNULIB_POSIX_MEMALIGN=3D0;AC_SUBST([GNULIB_POSIX_MEMALIGN]) - GNULIB_POSIX_OPENPT=3D0; AC_SUBST([GNULIB_POSIX_OPENPT]) - GNULIB_PTSNAME=3D0; AC_SUBST([GNULIB_PTSNAME]) - GNULIB_PTSNAME_R=3D0; AC_SUBST([GNULIB_PTSNAME_R]) - GNULIB_PUTENV=3D0; AC_SUBST([GNULIB_PUTENV]) - GNULIB_QSORT_R=3D0; AC_SUBST([GNULIB_QSORT_R]) - GNULIB_RANDOM=3D0; AC_SUBST([GNULIB_RANDOM]) - GNULIB_RANDOM_R=3D0; AC_SUBST([GNULIB_RANDOM_R]) - GNULIB_REALLOCARRAY=3D0; AC_SUBST([GNULIB_REALLOCARRAY]) - GNULIB_REALLOC_POSIX=3D0; AC_SUBST([GNULIB_REALLOC_POSIX]) - GNULIB_REALPATH=3D0; AC_SUBST([GNULIB_REALPATH]) - GNULIB_RPMATCH=3D0; AC_SUBST([GNULIB_RPMATCH]) - GNULIB_SECURE_GETENV=3D0; AC_SUBST([GNULIB_SECURE_GETENV]) - GNULIB_SETENV=3D0; AC_SUBST([GNULIB_SETENV]) - GNULIB_STRTOD=3D0; AC_SUBST([GNULIB_STRTOD]) - GNULIB_STRTOLD=3D0; AC_SUBST([GNULIB_STRTOLD]) - GNULIB_STRTOLL=3D0; AC_SUBST([GNULIB_STRTOLL]) - GNULIB_STRTOULL=3D0; AC_SUBST([GNULIB_STRTOULL]) - GNULIB_SYSTEM_POSIX=3D0; AC_SUBST([GNULIB_SYSTEM_POSIX]) - GNULIB_UNLOCKPT=3D0; AC_SUBST([GNULIB_UNLOCKPT]) - GNULIB_UNSETENV=3D0; AC_SUBST([GNULIB_UNSETENV]) - GNULIB_WCTOMB=3D0; AC_SUBST([GNULIB_WCTOMB]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_ECVT=3D1; AC_SUBST([GNULIB_MDA_ECVT]) - GNULIB_MDA_FCVT=3D1; AC_SUBST([GNULIB_MDA_FCVT]) - GNULIB_MDA_GCVT=3D1; AC_SUBST([GNULIB_MDA_GCVT]) - GNULIB_MDA_MKTEMP=3D1; AC_SUBST([GNULIB_MDA_MKTEMP]) - GNULIB_MDA_PUTENV=3D1; AC_SUBST([GNULIB_MDA_PUTENV]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE__EXIT=3D1; AC_SUBST([HAVE__EXIT]) HAVE_ALIGNED_ALLOC=3D1; AC_SUBST([HAVE_ALIGNED_ALLOC]) @@ -137,8 +154,10 @@ AC_DEFUN HAVE_SETSTATE=3D1; AC_SUBST([HAVE_SETSTATE]) HAVE_DECL_SETSTATE=3D1; AC_SUBST([HAVE_DECL_SETSTATE]) HAVE_STRTOD=3D1; AC_SUBST([HAVE_STRTOD]) + HAVE_STRTOL=3D1; AC_SUBST([HAVE_STRTOL]) HAVE_STRTOLD=3D1; AC_SUBST([HAVE_STRTOLD]) HAVE_STRTOLL=3D1; AC_SUBST([HAVE_STRTOLL]) + HAVE_STRTOUL=3D1; AC_SUBST([HAVE_STRTOUL]) HAVE_STRTOULL=3D1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=3D1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=3D0; AC_SUBST([HAVE_SYS_LOADAVG_H]) @@ -160,11 +179,16 @@ AC_DEFUN REPLACE_RANDOM=3D0; AC_SUBST([REPLACE_RANDOM]) REPLACE_RANDOM_R=3D0; AC_SUBST([REPLACE_RANDOM_R]) REPLACE_REALLOC=3D0; AC_SUBST([REPLACE_REALLOC]) + REPLACE_REALLOCARRAY=3D0; AC_SUBST([REPLACE_REALLOCARRAY]) REPLACE_REALPATH=3D0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=3D0; AC_SUBST([REPLACE_SETENV]) REPLACE_SETSTATE=3D0; AC_SUBST([REPLACE_SETSTATE]) REPLACE_STRTOD=3D0; AC_SUBST([REPLACE_STRTOD]) + REPLACE_STRTOL=3D0; AC_SUBST([REPLACE_STRTOL]) REPLACE_STRTOLD=3D0; AC_SUBST([REPLACE_STRTOLD]) + REPLACE_STRTOLL=3D0; AC_SUBST([REPLACE_STRTOLL]) + REPLACE_STRTOUL=3D0; AC_SUBST([REPLACE_STRTOUL]) + REPLACE_STRTOULL=3D0; AC_SUBST([REPLACE_STRTOULL]) REPLACE_UNSETENV=3D0; AC_SUBST([REPLACE_UNSETENV]) REPLACE_WCTOMB=3D0; AC_SUBST([REPLACE_WCTOMB]) ]) diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4 index 28db4f45df..eb44f03adb 100644 --- a/m4/stpcpy.m4 +++ b/m4/stpcpy.m4 @@ -1,4 +1,4 @@ -# stpcpy.m4 serial 8 +# stpcpy.m4 serial 9 dnl Copyright (C) 2002, 2007, 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,7 +12,7 @@ AC_DEFUN dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([stpcpy]) if test $ac_cv_func_stpcpy =3D no; then HAVE_STPCPY=3D0 diff --git a/m4/string_h.m4 b/m4/string_h.m4 index a4cc5b4378..80d1e58753 100644 --- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -5,20 +5,15 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. =20 -# serial 29 +# serial 32 =20 # Written by Paul Eggert. =20 -AC_DEFUN([gl_HEADER_STRING_H], +AC_DEFUN_ONCE([gl_STRING_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_STRING_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_BODY], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. + AC_REQUIRE([gl_STRING_H_DEFAULTS]) gl_NEXT_HEADERS([string.h]) =20 dnl Check for declarations of anything we want to poison if the @@ -33,62 +28,77 @@ AC_DEFUN AC_REQUIRE([AC_C_RESTRICT]) ]) =20 +# gl_STRING_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STRING_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 -AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPLICIT_BZERO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMMEM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMPCPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMRCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNLEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPBRK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCASESTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOK_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSLEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNLEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASECMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNCASECMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPCASECMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASESTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCSPN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPBRK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSPN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOK_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERRORNAME_NP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGABBREV_NP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGDESCR_NP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSIGNAL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRVERSCMP]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MEMCCPY], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_STRDUP], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) +]) + +AC_DEFUN([gl_STRING_H_DEFAULTS], [ - GNULIB_EXPLICIT_BZERO=3D0; AC_SUBST([GNULIB_EXPLICIT_BZERO]) - GNULIB_FFSL=3D0; AC_SUBST([GNULIB_FFSL]) - GNULIB_FFSLL=3D0; AC_SUBST([GNULIB_FFSLL]) - GNULIB_MEMCHR=3D0; AC_SUBST([GNULIB_MEMCHR]) - GNULIB_MEMMEM=3D0; AC_SUBST([GNULIB_MEMMEM]) - GNULIB_MEMPCPY=3D0; AC_SUBST([GNULIB_MEMPCPY]) - GNULIB_MEMRCHR=3D0; AC_SUBST([GNULIB_MEMRCHR]) - GNULIB_RAWMEMCHR=3D0; AC_SUBST([GNULIB_RAWMEMCHR]) - GNULIB_STPCPY=3D0; AC_SUBST([GNULIB_STPCPY]) - GNULIB_STPNCPY=3D0; AC_SUBST([GNULIB_STPNCPY]) - GNULIB_STRCHRNUL=3D0; AC_SUBST([GNULIB_STRCHRNUL]) - GNULIB_STRDUP=3D0; AC_SUBST([GNULIB_STRDUP]) - GNULIB_STRNCAT=3D0; AC_SUBST([GNULIB_STRNCAT]) - GNULIB_STRNDUP=3D0; AC_SUBST([GNULIB_STRNDUP]) - GNULIB_STRNLEN=3D0; AC_SUBST([GNULIB_STRNLEN]) - GNULIB_STRPBRK=3D0; AC_SUBST([GNULIB_STRPBRK]) - GNULIB_STRSEP=3D0; AC_SUBST([GNULIB_STRSEP]) - GNULIB_STRSTR=3D0; AC_SUBST([GNULIB_STRSTR]) - GNULIB_STRCASESTR=3D0; AC_SUBST([GNULIB_STRCASESTR]) - GNULIB_STRTOK_R=3D0; AC_SUBST([GNULIB_STRTOK_R]) - GNULIB_MBSLEN=3D0; AC_SUBST([GNULIB_MBSLEN]) - GNULIB_MBSNLEN=3D0; AC_SUBST([GNULIB_MBSNLEN]) - GNULIB_MBSCHR=3D0; AC_SUBST([GNULIB_MBSCHR]) - GNULIB_MBSRCHR=3D0; AC_SUBST([GNULIB_MBSRCHR]) - GNULIB_MBSSTR=3D0; AC_SUBST([GNULIB_MBSSTR]) - GNULIB_MBSCASECMP=3D0; AC_SUBST([GNULIB_MBSCASECMP]) - GNULIB_MBSNCASECMP=3D0; AC_SUBST([GNULIB_MBSNCASECMP]) - GNULIB_MBSPCASECMP=3D0; AC_SUBST([GNULIB_MBSPCASECMP]) - GNULIB_MBSCASESTR=3D0; AC_SUBST([GNULIB_MBSCASESTR]) - GNULIB_MBSCSPN=3D0; AC_SUBST([GNULIB_MBSCSPN]) - GNULIB_MBSPBRK=3D0; AC_SUBST([GNULIB_MBSPBRK]) - GNULIB_MBSSPN=3D0; AC_SUBST([GNULIB_MBSSPN]) - GNULIB_MBSSEP=3D0; AC_SUBST([GNULIB_MBSSEP]) - GNULIB_MBSTOK_R=3D0; AC_SUBST([GNULIB_MBSTOK_R]) - GNULIB_STRERROR=3D0; AC_SUBST([GNULIB_STRERROR]) - GNULIB_STRERROR_R=3D0; AC_SUBST([GNULIB_STRERROR_R]) - GNULIB_STRERRORNAME_NP=3D0; AC_SUBST([GNULIB_STRERRORNAME_NP]) - GNULIB_SIGABBREV_NP=3D0; AC_SUBST([GNULIB_SIGABBREV_NP]) - GNULIB_SIGDESCR_NP=3D0; AC_SUBST([GNULIB_SIGDESCR_NP]) - GNULIB_STRSIGNAL=3D0; AC_SUBST([GNULIB_STRSIGNAL]) - GNULIB_STRVERSCMP=3D0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=3D0; AC_SUBST([HAVE_MBSLEN]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_MEMCCPY=3D1; AC_SUBST([GNULIB_MDA_MEMCCPY]) - GNULIB_MDA_STRDUP=3D1; AC_SUBST([GNULIB_MDA_STRDUP]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_EXPLICIT_BZERO=3D1; AC_SUBST([HAVE_EXPLICIT_BZERO]) HAVE_FFSL=3D1; AC_SUBST([HAVE_FFSL]) diff --git a/m4/strnlen.m4 b/m4/strnlen.m4 index bb9a680fdc..1d4f10616e 100644 --- a/m4/strnlen.m4 +++ b/m4/strnlen.m4 @@ -1,4 +1,4 @@ -# strnlen.m4 serial 13 +# strnlen.m4 serial 14 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -7,7 +7,7 @@ =20 AC_DEFUN([gl_FUNC_STRNLEN], [ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) =20 dnl Persuade glibc to declare strnlen(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 index d2c9e5310d..14455dc3db 100644 --- a/m4/strtoll.m4 +++ b/m4/strtoll.m4 @@ -1,4 +1,4 @@ -# strtoll.m4 serial 8 +# strtoll.m4 serial 9 dnl Copyright (C) 2002, 2004, 2006, 2008-2021 Free Software Foundation, = Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,8 +7,40 @@ AC_DEFUN([gl_FUNC_STRTOLL], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS([strtoll]) - if test $ac_cv_func_strtoll =3D no; then + if test $ac_cv_func_strtoll =3D yes; then + AC_CACHE_CHECK([whether strtoll works], + [gl_cv_func_strtoll_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[int result =3D 0; + char *term; + /* This test fails on Minix and native Windows. */ + { + const char input[] =3D "0x"; + (void) strtoll (input, &term, 16); + if (term !=3D input + 1) + result |=3D 1; + } + return result; + ]]) + ], + [gl_cv_func_strtoll_works=3Dyes], + [gl_cv_func_strtoll_works=3Dno], + [case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_strtoll_works=3D"guessing no" ;; + *) gl_cv_func_strtoll_works=3D"$gl_cross_guess_normal" = ;; + esac + ]) + ]) + case "$gl_cv_func_strtoll_works" in + *yes) ;; + *) REPLACE_STRTOLL=3D1 ;; + esac + else HAVE_STRTOLL=3D0 fi ]) diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4 index 45e0469ba0..37bc31606b 100644 --- a/m4/sys_random_h.m4 +++ b/m4/sys_random_h.m4 @@ -1,10 +1,10 @@ -# sys_random_h.m4 serial 5 +# sys_random_h.m4 serial 8 dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_HEADER_SYS_RANDOM], +AC_DEFUN_ONCE([gl_SYS_RANDOM_H], [ AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) dnl is always overridden, because of GNULIB_POSIXCHECK.= @@ -35,18 +35,33 @@ AC_DEFUN [getrandom]) ]) =20 +# gl_SYS_RANDOM_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_RANDOM_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_RANDOM_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_RANDOM_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEF= AULTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETRANDOM]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_D= EFAULTS]) + AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_RANDOM_H_DEFAULTS], [ - GNULIB_GETRANDOM=3D0; AC_SUBST([GNULIB_GETRANDOM]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_GETRANDOM=3D1; AC_SUBST([HAVE_GETRANDOM]) REPLACE_GETRANDOM=3D0; AC_SUBST([REPLACE_GETRANDOM]) diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4 index 4b33d312e5..2e7d140dee 100644 --- a/m4/sys_select_h.m4 +++ b/m4/sys_select_h.m4 @@ -1,13 +1,13 @@ -# sys_select_h.m4 serial 20 +# sys_select_h.m4 serial 23 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_HEADER_SYS_SELECT], +AC_DEFUN_ONCE([gl_SYS_SELECT_H], [ - AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_select_h_selfcontained], [ @@ -75,19 +75,34 @@ AC_DEFUN ]], [pselect select]) ]) =20 +# gl_SYS_SELECT_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_SELECT_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_SELECT_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_DEF= AULTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PSELECT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SELECT]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_D= EFAULTS]) + AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], [ - GNULIB_PSELECT=3D0; AC_SUBST([GNULIB_PSELECT]) - GNULIB_SELECT=3D0; AC_SUBST([GNULIB_SELECT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_PSELECT=3D1; AC_SUBST([HAVE_PSELECT]) REPLACE_PSELECT=3D0; AC_SUBST([REPLACE_PSELECT]) diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4 index 503cb9668b..5676a0d217 100644 --- a/m4/sys_socket_h.m4 +++ b/m4/sys_socket_h.m4 @@ -1,4 +1,4 @@ -# sys_socket_h.m4 serial 25 +# sys_socket_h.m4 serial 28 dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 dnl From Simon Josefsson. =20 -AC_DEFUN([gl_HEADER_SYS_SOCKET], +AC_DEFUN_ONCE([gl_SYS_SOCKET_H], [ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) @@ -156,32 +156,47 @@ AC_DEFUN AC_SUBST([HAVE_WS2TCPIP_H]) ]) =20 +# gl_SYS_SOCKET_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_SOCKET_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_SOCKET_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEF= AULTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SOCKET]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CONNECT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BIND]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPEERNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LISTEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SEND]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECVFROM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SENDTO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETSOCKOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SHUTDOWN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT4]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_D= EFAULTS]) + AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], [ - GNULIB_SOCKET=3D0; AC_SUBST([GNULIB_SOCKET]) - GNULIB_CONNECT=3D0; AC_SUBST([GNULIB_CONNECT]) - GNULIB_ACCEPT=3D0; AC_SUBST([GNULIB_ACCEPT]) - GNULIB_BIND=3D0; AC_SUBST([GNULIB_BIND]) - GNULIB_GETPEERNAME=3D0; AC_SUBST([GNULIB_GETPEERNAME]) - GNULIB_GETSOCKNAME=3D0; AC_SUBST([GNULIB_GETSOCKNAME]) - GNULIB_GETSOCKOPT=3D0; AC_SUBST([GNULIB_GETSOCKOPT]) - GNULIB_LISTEN=3D0; AC_SUBST([GNULIB_LISTEN]) - GNULIB_RECV=3D0; AC_SUBST([GNULIB_RECV]) - GNULIB_SEND=3D0; AC_SUBST([GNULIB_SEND]) - GNULIB_RECVFROM=3D0; AC_SUBST([GNULIB_RECVFROM]) - GNULIB_SENDTO=3D0; AC_SUBST([GNULIB_SENDTO]) - GNULIB_SETSOCKOPT=3D0; AC_SUBST([GNULIB_SETSOCKOPT]) - GNULIB_SHUTDOWN=3D0; AC_SUBST([GNULIB_SHUTDOWN]) - GNULIB_ACCEPT4=3D0; AC_SUBST([GNULIB_ACCEPT4]) HAVE_STRUCT_SOCKADDR_STORAGE=3D1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORA= GE]) HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=3D1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY= ]) diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 index 23cbdd28eb..ac91d425bb 100644 --- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -1,4 +1,4 @@ -# sys_stat_h.m4 serial 38 -*- Autoconf -*- +# sys_stat_h.m4 serial 41 -*- Autoconf -*- dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,7 +7,7 @@ dnl From Eric Blake. dnl Provide a GNU-like . =20 -AC_DEFUN([gl_HEADER_SYS_STAT_H], +AC_DEFUN_ONCE([gl_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) =20 @@ -52,38 +52,53 @@ AC_DEFUN AC_REQUIRE([AC_C_RESTRICT]) ]) =20 +# gl_SYS_STAT_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_STAT_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_STAT_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAU= LTS], [ + gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FUTIMENS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUMASK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHMOD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSTAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIRAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFOAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNOD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNODAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UTIMENSAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OVERRIDES_STRUCT_STAT]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHMOD], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKDIR], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UMASK], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_FCHMODAT=3D0; AC_SUBST([GNULIB_FCHMODAT]) - GNULIB_FSTAT=3D0; AC_SUBST([GNULIB_FSTAT]) - GNULIB_FSTATAT=3D0; AC_SUBST([GNULIB_FSTATAT]) - GNULIB_FUTIMENS=3D0; AC_SUBST([GNULIB_FUTIMENS]) - GNULIB_GETUMASK=3D0; AC_SUBST([GNULIB_GETUMASK]) - GNULIB_LCHMOD=3D0; AC_SUBST([GNULIB_LCHMOD]) - GNULIB_LSTAT=3D0; AC_SUBST([GNULIB_LSTAT]) - GNULIB_MKDIR=3D0; AC_SUBST([GNULIB_MKDIR]) - GNULIB_MKDIRAT=3D0; AC_SUBST([GNULIB_MKDIRAT]) - GNULIB_MKFIFO=3D0; AC_SUBST([GNULIB_MKFIFO]) - GNULIB_MKFIFOAT=3D0; AC_SUBST([GNULIB_MKFIFOAT]) - GNULIB_MKNOD=3D0; AC_SUBST([GNULIB_MKNOD]) - GNULIB_MKNODAT=3D0; AC_SUBST([GNULIB_MKNODAT]) - GNULIB_STAT=3D0; AC_SUBST([GNULIB_STAT]) - GNULIB_UTIMENSAT=3D0; AC_SUBST([GNULIB_UTIMENSAT]) - GNULIB_OVERRIDES_STRUCT_STAT=3D0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_ST= AT]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_CHMOD=3D1; AC_SUBST([GNULIB_MDA_CHMOD]) - GNULIB_MDA_MKDIR=3D1; AC_SUBST([GNULIB_MDA_MKDIR]) - GNULIB_MDA_UMASK=3D1; AC_SUBST([GNULIB_MDA_UMASK]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=3D1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=3D1; AC_SUBST([HAVE_FSTATAT]) diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index 64f133d513..c425a9639a 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,5 +1,5 @@ # Configure a replacement for . -# serial 9 +# serial 12 =20 # Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -8,18 +8,13 @@ =20 # Written by Paul Eggert and Martin Lambers. =20 -AC_DEFUN([gl_HEADER_SYS_TIME_H], +AC_DEFUN_ONCE([gl_SYS_TIME_H], [ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=3D0 statemen= t dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=3D1 dnl statements that occur in other macros. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], -[ + AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([sys/time.h]) gl_CHECK_NEXT_HEADERS([sys/time.h]) =20 @@ -89,18 +84,33 @@ AC_DEFUN ]], [gettimeofday]) ]) =20 +# gl_SYS_TIME_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_TIME_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 -AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_TIME_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEFAU= LTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETTIMEOFDAY]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) +]) + +AC_DEFUN([gl_SYS_TIME_H_DEFAULTS], [ - GNULIB_GETTIMEOFDAY=3D0; AC_SUBST([GNULIB_GETTIMEOFDAY]) dnl Assume POSIX behavior unless another module says otherwise. HAVE_GETTIMEOFDAY=3D1; AC_SUBST([HAVE_GETTIMEOFDAY]) HAVE_STRUCT_TIMEVAL=3D1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4 index 2172c836d9..6dd6fee10c 100644 --- a/m4/sys_types_h.m4 +++ b/m4/sys_types_h.m4 @@ -1,4 +1,4 @@ -# sys_types_h.m4 serial 11 +# sys_types_h.m4 serial 13 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,10 +6,11 @@ =20 AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ + AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) + dnl Use sane struct stat types in OpenVMS 8.2 and later. AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) =20 - AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) =20 dnl Ensure the type pid_t gets defined. @@ -30,6 +31,17 @@ AC_DEFUN_ONCE AC_SUBST([WINDOWS_STAT_INODES]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_TYPES_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAU= LTS], [ + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], [ ]) diff --git a/m4/time_h.m4 b/m4/time_h.m4 index b6a1aa3bc0..b57474b48b 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -2,7 +2,7 @@ =20 # Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation= , Inc. =20 -# serial 15 +# serial 18 =20 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10,16 +10,11 @@ =20 # Written by Paul Eggert and Jim Meyering. =20 -AC_DEFUN([gl_HEADER_TIME_H], +AC_DEFUN_ONCE([gl_TIME_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_BODY], -[ - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. + AC_REQUIRE([gl_TIME_H_DEFAULTS]) =20 gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) @@ -111,30 +106,45 @@ AC_DEFUN AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC]) ]) =20 +# gl_TIME_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_TIME_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_TIME_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 -AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS]= , [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TZSET], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULT= S]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) +]) + +AC_DEFUN([gl_TIME_H_DEFAULTS], [ - GNULIB_CTIME=3D0; AC_SUBST([GNULIB_CTIME]) - GNULIB_MKTIME=3D0; AC_SUBST([GNULIB_MKTIME]) - GNULIB_LOCALTIME=3D0; AC_SUBST([GNULIB_LOCALTIME]) - GNULIB_NANOSLEEP=3D0; AC_SUBST([GNULIB_NANOSLEEP]) - GNULIB_STRFTIME=3D0; AC_SUBST([GNULIB_STRFTIME]) - GNULIB_STRPTIME=3D0; AC_SUBST([GNULIB_STRPTIME]) - GNULIB_TIMEGM=3D0; AC_SUBST([GNULIB_TIMEGM]) - GNULIB_TIMESPEC_GET=3D0; AC_SUBST([GNULIB_TIMESPEC_GET= ]) - GNULIB_TIME_R=3D0; AC_SUBST([GNULIB_TIME_R]) - GNULIB_TIME_RZ=3D0; AC_SUBST([GNULIB_TIME_RZ]) - GNULIB_TZSET=3D0; AC_SUBST([GNULIB_TZSET]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_TZSET=3D1; AC_SUBST([GNULIB_MDA_TZSET]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_LOCALTIME_R=3D1; AC_SUBST([HAVE_DECL_LOCALTIME= _R]) HAVE_NANOSLEEP=3D1; AC_SUBST([HAVE_NANOSLEEP]) diff --git a/m4/time_r.m4 b/m4/time_r.m4 index 713e93ac26..2d49b64f12 100644 --- a/m4/time_r.m4 +++ b/m4/time_r.m4 @@ -12,7 +12,7 @@ AC_DEFUN dnl Persuade glibc and Solaris to declare localtime_r. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) =20 dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTR= ANT is diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 index 34ef0bab4b..c5e85dc625 100644 --- a/m4/time_rz.m4 +++ b/m4/time_rz.m4 @@ -10,7 +10,7 @@ AC_DEFUN([gl_TIME_RZ], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([AC_STRUCT_TIMEZONE]) =20 # On Mac OS X 10.6, localtime loops forever with some time_t values. diff --git a/m4/timegm.m4 b/m4/timegm.m4 index 098c857e7f..58123beb0c 100644 --- a/m4/timegm.m4 +++ b/m4/timegm.m4 @@ -1,4 +1,4 @@ -# timegm.m4 serial 12 +# timegm.m4 serial 13 dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 AC_DEFUN([gl_FUNC_TIMEGM], [ - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) REPLACE_TIMEGM=3D0 AC_CHECK_FUNCS_ONCE([timegm]) diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index 0f26fb908d..0ce4ea4511 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 85 +# unistd_h.m4 serial 89 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,10 +6,10 @@ =20 dnl Written by Simon Josefsson, Bruno Haible. =20 -AC_DEFUN([gl_UNISTD_H], +AC_DEFUN_ONCE([gl_UNISTD_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) =20 gl_CHECK_NEXT_HEADERS([unistd.h]) @@ -59,100 +59,116 @@ AC_DEFUN fi ]) =20 +# gl_UNISTD_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_UNISTD_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCESS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHOWN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPY_FILE_RANGE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP2]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP3]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ENVIRON]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EUIDACCESS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FACCESSAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHOWNAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDATASYNC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSYNC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTRUNCATE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCWD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDOMAINNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDTABLESIZE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETENTROPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETGROUPS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETHOSTNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHOWN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSEEK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE2]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PREAD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PWRITE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READ]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RMDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETHOSTNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SLEEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_USLEEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WRITE]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ACCESS], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHDIR], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CLOSE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP2], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECL], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECV], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVPE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETCWD], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETPID], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ISATTY], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LSEEK], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_READ], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_RMDIR], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_SWAB], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UNLINK], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WRITE], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) +]) + AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ - GNULIB_ACCESS=3D0; AC_SUBST([GNULIB_ACCESS]) - GNULIB_CHDIR=3D0; AC_SUBST([GNULIB_CHDIR]) - GNULIB_CHOWN=3D0; AC_SUBST([GNULIB_CHOWN]) - GNULIB_CLOSE=3D0; AC_SUBST([GNULIB_CLOSE]) - GNULIB_COPY_FILE_RANGE=3D0; AC_SUBST([GNULIB_COPY_FILE_RANGE]) - GNULIB_DUP=3D0; AC_SUBST([GNULIB_DUP]) - GNULIB_DUP2=3D0; AC_SUBST([GNULIB_DUP2]) - GNULIB_DUP3=3D0; AC_SUBST([GNULIB_DUP3]) - GNULIB_ENVIRON=3D0; AC_SUBST([GNULIB_ENVIRON]) - GNULIB_EUIDACCESS=3D0; AC_SUBST([GNULIB_EUIDACCESS]) - GNULIB_EXECL=3D0; AC_SUBST([GNULIB_EXECL]) - GNULIB_EXECLE=3D0; AC_SUBST([GNULIB_EXECLE]) - GNULIB_EXECLP=3D0; AC_SUBST([GNULIB_EXECLP]) - GNULIB_EXECV=3D0; AC_SUBST([GNULIB_EXECV]) - GNULIB_EXECVE=3D0; AC_SUBST([GNULIB_EXECVE]) - GNULIB_EXECVP=3D0; AC_SUBST([GNULIB_EXECVP]) - GNULIB_EXECVPE=3D0; AC_SUBST([GNULIB_EXECVPE]) - GNULIB_FACCESSAT=3D0; AC_SUBST([GNULIB_FACCESSAT]) - GNULIB_FCHDIR=3D0; AC_SUBST([GNULIB_FCHDIR]) - GNULIB_FCHOWNAT=3D0; AC_SUBST([GNULIB_FCHOWNAT]) - GNULIB_FDATASYNC=3D0; AC_SUBST([GNULIB_FDATASYNC]) - GNULIB_FSYNC=3D0; AC_SUBST([GNULIB_FSYNC]) - GNULIB_FTRUNCATE=3D0; AC_SUBST([GNULIB_FTRUNCATE]) - GNULIB_GETCWD=3D0; AC_SUBST([GNULIB_GETCWD]) - GNULIB_GETDOMAINNAME=3D0; AC_SUBST([GNULIB_GETDOMAINNAME]) - GNULIB_GETDTABLESIZE=3D0; AC_SUBST([GNULIB_GETDTABLESIZE]) - GNULIB_GETENTROPY=3D0; AC_SUBST([GNULIB_GETENTROPY]) - GNULIB_GETGROUPS=3D0; AC_SUBST([GNULIB_GETGROUPS]) - GNULIB_GETHOSTNAME=3D0; AC_SUBST([GNULIB_GETHOSTNAME]) - GNULIB_GETLOGIN=3D0; AC_SUBST([GNULIB_GETLOGIN]) - GNULIB_GETLOGIN_R=3D0; AC_SUBST([GNULIB_GETLOGIN_R]) - GNULIB_GETOPT_POSIX=3D0; AC_SUBST([GNULIB_GETOPT_POSIX]) - GNULIB_GETPAGESIZE=3D0; AC_SUBST([GNULIB_GETPAGESIZE]) - GNULIB_GETPASS=3D0; AC_SUBST([GNULIB_GETPASS]) - GNULIB_GETUSERSHELL=3D0; AC_SUBST([GNULIB_GETUSERSHELL]) - GNULIB_GROUP_MEMBER=3D0; AC_SUBST([GNULIB_GROUP_MEMBER]) - GNULIB_ISATTY=3D0; AC_SUBST([GNULIB_ISATTY]) - GNULIB_LCHOWN=3D0; AC_SUBST([GNULIB_LCHOWN]) - GNULIB_LINK=3D0; AC_SUBST([GNULIB_LINK]) - GNULIB_LINKAT=3D0; AC_SUBST([GNULIB_LINKAT]) - GNULIB_LSEEK=3D0; AC_SUBST([GNULIB_LSEEK]) - GNULIB_PIPE=3D0; AC_SUBST([GNULIB_PIPE]) - GNULIB_PIPE2=3D0; AC_SUBST([GNULIB_PIPE2]) - GNULIB_PREAD=3D0; AC_SUBST([GNULIB_PREAD]) - GNULIB_PWRITE=3D0; AC_SUBST([GNULIB_PWRITE]) - GNULIB_READ=3D0; AC_SUBST([GNULIB_READ]) - GNULIB_READLINK=3D0; AC_SUBST([GNULIB_READLINK]) - GNULIB_READLINKAT=3D0; AC_SUBST([GNULIB_READLINKAT]) - GNULIB_RMDIR=3D0; AC_SUBST([GNULIB_RMDIR]) - GNULIB_SETHOSTNAME=3D0; AC_SUBST([GNULIB_SETHOSTNAME]) - GNULIB_SLEEP=3D0; AC_SUBST([GNULIB_SLEEP]) - GNULIB_SYMLINK=3D0; AC_SUBST([GNULIB_SYMLINK]) - GNULIB_SYMLINKAT=3D0; AC_SUBST([GNULIB_SYMLINKAT]) - GNULIB_TRUNCATE=3D0; AC_SUBST([GNULIB_TRUNCATE]) - GNULIB_TTYNAME_R=3D0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_NONBLOCKING=3D0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING= ]) - GNULIB_UNISTD_H_SIGPIPE=3D0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) - GNULIB_UNLINK=3D0; AC_SUBST([GNULIB_UNLINK]) - GNULIB_UNLINKAT=3D0; AC_SUBST([GNULIB_UNLINKAT]) - GNULIB_USLEEP=3D0; AC_SUBST([GNULIB_USLEEP]) - GNULIB_WRITE=3D0; AC_SUBST([GNULIB_WRITE]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_ACCESS=3D1; AC_SUBST([GNULIB_MDA_ACCESS]) - GNULIB_MDA_CHDIR=3D1; AC_SUBST([GNULIB_MDA_CHDIR]) - GNULIB_MDA_CLOSE=3D1; AC_SUBST([GNULIB_MDA_CLOSE]) - GNULIB_MDA_DUP=3D1; AC_SUBST([GNULIB_MDA_DUP]) - GNULIB_MDA_DUP2=3D1; AC_SUBST([GNULIB_MDA_DUP2]) - GNULIB_MDA_EXECL=3D1; AC_SUBST([GNULIB_MDA_EXECL]) - GNULIB_MDA_EXECLE=3D1; AC_SUBST([GNULIB_MDA_EXECLE]) - GNULIB_MDA_EXECLP=3D1; AC_SUBST([GNULIB_MDA_EXECLP]) - GNULIB_MDA_EXECV=3D1; AC_SUBST([GNULIB_MDA_EXECV]) - GNULIB_MDA_EXECVE=3D1; AC_SUBST([GNULIB_MDA_EXECVE]) - GNULIB_MDA_EXECVP=3D1; AC_SUBST([GNULIB_MDA_EXECVP]) - GNULIB_MDA_EXECVPE=3D1; AC_SUBST([GNULIB_MDA_EXECVPE]) - GNULIB_MDA_GETCWD=3D1; AC_SUBST([GNULIB_MDA_GETCWD]) - GNULIB_MDA_GETPID=3D1; AC_SUBST([GNULIB_MDA_GETPID]) - GNULIB_MDA_ISATTY=3D1; AC_SUBST([GNULIB_MDA_ISATTY]) - GNULIB_MDA_LSEEK=3D1; AC_SUBST([GNULIB_MDA_LSEEK]) - GNULIB_MDA_READ=3D1; AC_SUBST([GNULIB_MDA_READ]) - GNULIB_MDA_RMDIR=3D1; AC_SUBST([GNULIB_MDA_RMDIR]) - GNULIB_MDA_SWAB=3D1; AC_SUBST([GNULIB_MDA_SWAB]) - GNULIB_MDA_UNLINK=3D1; AC_SUBST([GNULIB_MDA_UNLINK]) - GNULIB_MDA_WRITE=3D1; AC_SUBST([GNULIB_MDA_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CHOWN=3D1; AC_SUBST([HAVE_CHOWN]) HAVE_COPY_FILE_RANGE=3D1; AC_SUBST([HAVE_COPY_FILE_RANGE]) diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4 index a2dc8a144a..b689020ff4 100644 --- a/m4/unlocked-io.m4 +++ b/m4/unlocked-io.m4 @@ -1,4 +1,4 @@ -# unlocked-io.m4 serial 15 +# unlocked-io.m4 serial 16 =20 # Copyright (C) 1998-2006, 2009-2021 Free Software Foundation, Inc. # @@ -16,11 +16,6 @@ =20 AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], [ - AC_DEFINE([USE_UNLOCKED_IO], [1], - [Define to 1 if you want getc etc. to use unlocked I/O if available.= - Unlocked I/O can improve performance in unithreaded apps, - but it is not safe for multithreaded apps.]) - dnl Persuade glibc and Solaris to declare dnl fgets_unlocked(), fputs_unlocked() etc. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/year2038.m4 b/m4/year2038.m4 new file mode 100644 index 0000000000..ad7f303581 --- /dev/null +++ b/m4/year2038.m4 @@ -0,0 +1,112 @@ +# year2038.m4 serial 5 +dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Attempt to ensure that 'time_t' is a 64-bit type +dnl and that the functions time(), stat(), etc. return 64-bit times. + +AC_DEFUN([gl_YEAR2038_EARLY], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) + AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1], + [For 64-bit time_t on 32-bit mingw.]) + ;; + esac +]) + +# gl_YEAR2038_TEST_INCLUDES +# ------------------------- +AC_DEFUN([gl_YEAR2038_TEST_INCLUDES], +[[ + #include + /* Check that time_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_TIME_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ + #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31= << 31)) + int verify_time_t_range[(LARGE_TIME_T % 2147483629 =3D=3D 721 + && LARGE_TIME_T % 2147483647 =3D=3D 1) + ? 1 : -1]; +]]) + +# gl_YEAR2038_BODY(REQUIRE-64-BIT) +---------------------------------- +AC_DEFUN([gl_YEAR2038_BODY], +[ + AC_ARG_ENABLE([year2038], + [ --disable-year2038 omit support for timestamps past the year = 2038]) + AS_IF([test "$enable_year2038" !=3D no], + [ + dnl On many systems, time_t is already a 64-bit type. + dnl On those systems where time_t is still 32-bit, it requires kernel + dnl and libc support to make it 64-bit. For glibc 2.34 and later on Li= nux, + dnl defining _TIME_BITS=3D64 and _FILE_OFFSET_BITS=3D64 is needed on x= 86 and ARM. + dnl + dnl On native Windows, the system include files define types __time32_= t + dnl and __time64_t. By default, time_t is an alias of + dnl - __time32_t on 32-bit mingw, + dnl - __time64_t on 64-bit mingw and on MSVC (since MSVC 8). + dnl But when compiling with -D__MINGW_USE_VC2005_COMPAT, time_t is an + dnl alias of __time64_t. + dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of= + dnl __time32_t. + AC_CACHE_CHECK([for 64-bit time_t], [gl_cv_type_time_t_64], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])], + [gl_cv_type_time_t_64=3Dyes], [gl_cv_type_time_t_64=3Dno]) + ]) + if test "$gl_cv_type_time_t_64" =3D no; then + AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=3D64], + [gl_cv_type_time_t_bits_macro], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[#define _TIME_BITS 64 + #define _FILE_OFFSET_BITS 64 + ]gl_YEAR2038_TEST_INCLUDES])], + [gl_cv_type_time_t_bits_macro=3Dyes], + [gl_cv_type_time_t_bits_macro=3Dno]) + ]) + if test "$gl_cv_type_time_t_bits_macro" =3D yes; then + AC_DEFINE([_TIME_BITS], [64], + [Number of bits in a timestamp, on hosts where this is settable.= ]) + dnl AC_SYS_LARGFILE also defines this; it's OK if we do too. + AC_DEFINE([_FILE_OFFSET_BITS], [64], + [Number of bits in a file offset, on hosts where this is settabl= e.]) + gl_cv_type_time_t_64=3Dyes + fi + fi + if test $gl_cv_type_time_t_64 =3D no; then + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _USE_32BIT_TIME_T + int ok; + #else + error fail + #endif + ]])], + [AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type. Rem= ove _USE_32BIT_TIME_T from the compiler flags.])], + [# If not cross-compiling and $1 says we should check, + # and 'touch' works with a large timestamp, then evidently 64-bit= time_t + # is desired and supported, so fail and ask the builder to fix th= e + # problem. Otherwise, just warn the builder. + m4_ifval([$1], + [if test $cross_compiling =3D no \ + && TZ=3DUTC0 touch -t 210602070628.16 conftest.time 2>/dev/= null; then + rm -f conftest.time + AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type= , which your system appears to support. You might try configuring with 'C= PPFLAGS=3D"-m64" LDFLAGS=3D"-m64"'. To build with a 32-bit time_t anyway = (not recommended), configure with '--disable-year2038'.]) + fi]) + if test "$gl_warned_about_64_bit_time_t" !=3D yes; then + AC_MSG_WARN([This package requires a 64-bit 'time_t' type if th= ere is any way to access timestamps outside the year range 1901-2038 on y= our platform. Perhaps you should configure with 'CPPFLAGS=3D"-m64" LDFLAG= S=3D"-m64"'?]) + gl_warned_about_64_bit_time_t=3Dyes + fi + ]) + fi]) +]) + +AC_DEFUN([gl_YEAR2038], +[ + gl_YEAR2038_BODY([require-64-bit]) +]) --=20 2.31.1 --------------1CA4F37942ED9D8B1452A402 Content-Type: text/x-patch; charset=UTF-8; name="0002-By-hand-fixes-for-update-from-Gnulib.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0002-By-hand-fixes-for-update-from-Gnulib.patch" =46rom 8d390e2511eed485d3194c3959570191563baabd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 23 Jul 2021 18:49:16 -0500 Subject: [PATCH 2/3] By-hand fixes for update from Gnulib * .gitignore: Add lib/malloc/*.gl.h. * admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h directly from Gnulib, without worrying about Gnulib modules, as these files are special cases. * lib/af_alg.h, lib/save-cwd.h: Copy from Gnulib. * lib/malloca.c, lib/malloca.h: * m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4: Remove. These are either no longer present in Gnulib, or are no longer needed by modules that Emacs uses. --- .gitignore | 1 + INSTALL | 7 ++- admin/merge-gnulib | 3 ++ etc/NEWS | 6 +++ lib/af_alg.h | 18 +++---- lib/malloca.c | 106 -------------------------------------- lib/malloca.h | 123 --------------------------------------------- lib/save-cwd.h | 4 +- m4/close-stream.m4 | 11 ---- m4/glibc21.m4 | 34 ------------- m4/malloca.m4 | 14 ------ 11 files changed, 26 insertions(+), 301 deletions(-) delete mode 100644 lib/malloca.c delete mode 100644 lib/malloca.h delete mode 100644 m4/close-stream.m4 delete mode 100644 m4/glibc21.m4 delete mode 100644 m4/malloca.m4 diff --git a/.gitignore b/.gitignore index fcbc9cd7f4..00d0599b63 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,7 @@ lib/ieee754.h lib/inttypes.h lib/libgnu.a lib/limits.h +lib/malloc/*.gl.h lib/signal.h lib/std*.h !lib/std*.in.h diff --git a/INSTALL b/INSTALL index b6f681a153..8c036f2e60 100644 --- a/INSTALL +++ b/INSTALL @@ -322,8 +322,11 @@ Use --without-toolkit-scroll-bars to disable Motif o= r Xaw3d scroll bars. Use --without-xim to inhibit the default use of X Input Methods. In this case, the X resource useXIM can be used to turn on use of XIM. =20 -Use --disable-largefile to omit support for files larger than 2GB on -systems which support that. +Use --disable-largefile to omit support for files larger than 2GB, and +--disable-year2038 to omit support for timestamps past the year 2038, +on systems which allow omitting such support. This may help when +linking Emacs to a library with an ABI that requires a particular +width for off_t or for time_t. =20 Use --without-sound to disable sound support. =20 diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 1c8b442700..76349034fd 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -118,5 +118,8 @@ avoided_flags=3D "$gnulib_srcdir"/build-aux/install-sh \ "$gnulib_srcdir"/build-aux/move-if-change \ "$src"build-aux && +cp -- "$gnulib_srcdir"/lib/af_alg.h \ + "$gnulib_srcdir"/lib/save-cwd.h \ + "$src"lib && { test -z "$src" || cd "$src"; } && ./autogen.sh diff --git a/etc/NEWS b/etc/NEWS index 95218faa1b..7c23a1eff3 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -78,6 +78,12 @@ It was declared obsolete in Emacs 27.1. This was only ever relevant when building from a repository checkout. This now requires makeinfo, which is part of the texinfo package. =20 +--- +** There is a new configure option '--disable-year2038' to omit +support for 64-bit timestamps on platforms like GNU/Linux ARM where +time_t is traditionally 32-bit. This may be helpful when linking +Emacs to a library with ABI requiring 32-bit time_t. + --- ** Support for building with '-fcheck-pointer-bounds' has been removed. GCC has withdrawn the '-fcheck-pointer-bounds' option and support for diff --git a/lib/af_alg.h b/lib/af_alg.h index 4c5854cc99..f0fe7fc055 100644 --- a/lib/af_alg.h +++ b/lib/af_alg.h @@ -1,18 +1,18 @@ /* af_alg.h - Compute message digests from file streams and buffers. - Copyright (C) 2018-2020 Free Software Foundation, Inc. + Copyright (C) 2018-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 2, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Matteo Croce , 2018. Documentation by Bruno Haible , 2018. */ diff --git a/lib/malloca.c b/lib/malloca.c deleted file mode 100644 index d68d233dcb..0000000000 --- a/lib/malloca.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, - Inc. - Written by Bruno Haible , 2003, 2018. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include - -/* Specification. */ -#include "malloca.h" - -#include "verify.h" - -/* The speed critical point in this file is freea() applied to an alloca= () - result: it must be fast, to match the speed of alloca(). The speed o= f - mmalloca() and freea() in the other case are not critical, because th= ey - are only invoked for big memory sizes. - Here we use a bit in the address as an indicator, an idea by Ond=C5=99= ej B=C3=ADlka. - malloca() can return three types of pointers: - - Pointers =E2=89=A1 0 mod 2*sa_alignment_max come from stack alloc= ation. - - Pointers =E2=89=A1 sa_alignment_max mod 2*sa_alignment_max come f= rom heap - allocation. - - NULL comes from a failed heap allocation. */ - -/* Type for holding very small pointer differences. */ -typedef unsigned char small_t; -/* Verify that it is wide enough. */ -verify (2 * sa_alignment_max - 1 <=3D (small_t) -1); - -void * -mmalloca (size_t n) -{ -#if HAVE_ALLOCA - /* Allocate one more word, used to determine the address to pass to fr= eea(), - and room for the alignment =E2=89=A1 sa_alignment_max mod 2*sa_alig= nment_max. */ - size_t nplus =3D n + sizeof (small_t) + 2 * sa_alignment_max - 1; - - if (nplus >=3D n) - { - char *mem =3D (char *) malloc (nplus); - - if (mem !=3D NULL) - { - char *p =3D - (char *)((((uintptr_t)mem + sizeof (small_t) + sa_alignment_= max - 1) - & ~(uintptr_t)(2 * sa_alignment_max - 1)) - + sa_alignment_max); - /* Here p >=3D mem + sizeof (small_t), - and p <=3D mem + sizeof (small_t) + 2 * sa_alignment_max - = 1 - hence p + n <=3D mem + nplus. - So, the memory range [p, p+n) lies in the allocated memory = range - [mem, mem + nplus). */ - ((small_t *) p)[-1] =3D p - mem; - /* p =E2=89=A1 sa_alignment_max mod 2*sa_alignment_max. */ - return p; - } - } - /* Out of memory. */ - return NULL; -#else -# if !MALLOC_0_IS_NONNULL - if (n =3D=3D 0) - n =3D 1; -# endif - return malloc (n); -#endif -} - -#if HAVE_ALLOCA -void -freea (void *p) -{ - /* Check argument. */ - if ((uintptr_t) p & (sa_alignment_max - 1)) - { - /* p was not the result of a malloca() call. Invalid argument. *= / - abort (); - } - /* Determine whether p was a non-NULL pointer returned by mmalloca(). = */ - if ((uintptr_t) p & sa_alignment_max) - { - void *mem =3D (char *) p - ((small_t *) p)[-1]; - free (mem); - } -} -#endif - -/* - * Hey Emacs! - * Local Variables: - * coding: utf-8 - * End: - */ diff --git a/lib/malloca.h b/lib/malloca.h deleted file mode 100644 index a04e54593f..0000000000 --- a/lib/malloca.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ - -#ifndef _MALLOCA_H -#define _MALLOCA_H - -#include -#include -#include -#include - -#include "xalloc-oversized.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call - alloca(N); otherwise it returns NULL. It either returns N bytes of - memory allocated on the stack, that lasts until the function returns,= - or NULL. - Use of safe_alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns. -*/ -#if HAVE_ALLOCA -/* The OS usually guarantees only one guard page at the bottom of the st= ack, - and a page size can be as small as 4096 bytes. So we cannot safely - allocate anything larger than 4096 bytes. Also care for the possibil= ity - of a few compiler-allocated temporary stack slots. - This must be a macro, not a function. */ -# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) -#else -# define safe_alloca(N) ((void) (N), NULL) -#endif - -/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of - memory allocated on the stack, that must be freed using freea() befor= e - the function returns. Upon failure, it returns NULL. */ -#if HAVE_ALLOCA -# define malloca(N) \ - ((N) < 4032 - (2 * sa_alignment_max - 1) = \ - ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max = - 1) \ - + (2 * sa_alignment_max - 1)) = \ - & ~(uintptr_t)(2 * sa_alignment_max - 1)) = \ - : mmalloca (N)) -#else -# define malloca(N) \ - mmalloca (N) -#endif -extern void * mmalloca (size_t n); - -/* Free a block of memory allocated through malloca(). */ -#if HAVE_ALLOCA -extern void freea (void *p); -#else -# define freea free -#endif - -/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). - It allocates an array of N objects, each with S bytes of memory, - on the stack. S must be positive and N must be nonnegative. - The array must be freed using freea() before the function returns. *= / -#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * = (s))) - - -#ifdef __cplusplus -} -#endif - - -/* ------------------- Auxiliary, non-public definitions ---------------= ---- */ - -/* Determine the alignment of a type at compile time. */ -#if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__ -# define sa_alignof __alignof__ -#elif defined __cplusplus - template struct sa_alignof_helper { char __slot1; type __= slot2; }; -# define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) -#elif defined __hpux - /* Work around a HP-UX 10.20 cc bug with enums constants defined as of= fsetof - values. */ -# define sa_alignof(type) (sizeof (type) <=3D 4 ? 4 : 8) -#elif defined _AIX - /* Work around an AIX 3.2.5 xlc bug with enums constants defined as of= fsetof - values. */ -# define sa_alignof(type) (sizeof (type) <=3D 4 ? 4 : 8) -#else -# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2;= }, __slot2) -#endif - -enum -{ -/* The desired alignment of memory allocations is the maximum alignment - among all elementary types. */ - sa_alignment_long =3D sa_alignof (long), - sa_alignment_double =3D sa_alignof (double), - sa_alignment_longlong =3D sa_alignof (long long), - sa_alignment_longdouble =3D sa_alignof (long double), - sa_alignment_max =3D ((sa_alignment_long - 1) | (sa_alignment_double -= 1) - | (sa_alignment_longlong - 1) - | (sa_alignment_longdouble - 1) - ) + 1 -}; - -#endif /* _MALLOCA_H */ diff --git a/lib/save-cwd.h b/lib/save-cwd.h index e1e69eceaf..3cefba58c0 100644 --- a/lib/save-cwd.h +++ b/lib/save-cwd.h @@ -1,7 +1,7 @@ /* Save and restore current working directory. =20 - Copyright (C) 1995, 1997-1998, 2003, 2009-2021 Free Software - Foundation, Inc. + Copyright (C) 1995, 1997-1998, 2003, 2009-2021 Free Software Foundati= on, + Inc. =20 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/m4/close-stream.m4 b/m4/close-stream.m4 deleted file mode 100644 index feeb4eae5d..0000000000 --- a/m4/close-stream.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 4 -dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Prerequisites of lib/close-stream.c. -AC_DEFUN([gl_CLOSE_STREAM], -[ - : -]) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 deleted file mode 100644 index 74a781aa1c..0000000000 --- a/m4/glibc21.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2021 Free Software -dnl Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer, or uClibc. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK([whether we are using the GNU C Library >=3D 2.1 or u= Clibc], - [ac_cv_gnu_library_2_1], - [AC_EGREP_CPP([Lucky], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ =3D=3D 2 && __GLIBC_MINOR__ >=3D 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif - ], - [ac_cv_gnu_library_2_1=3Dyes], - [ac_cv_gnu_library_2_1=3Dno]) - ] - ) - AC_SUBST([GLIBC21]) - GLIBC21=3D"$ac_cv_gnu_library_2_1" - ] -) diff --git a/m4/malloca.m4 b/m4/malloca.m4 deleted file mode 100644 index 7ee33773d2..0000000000 --- a/m4/malloca.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# malloca.m4 serial 2 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software -dnl Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MALLOCA], -[ - dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variab= les - dnl @ALLOCA@ and @LTALLOCA@. - dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies= =2E - AC_REQUIRE([gl_EEMALLOC]) -]) --=20 2.31.1 --------------1CA4F37942ED9D8B1452A402 Content-Type: text/x-patch; charset=UTF-8; name="0003-Redo-emacsclient-socket-symlink-attack-checking.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0003-Redo-emacsclient-socket-symlink-attack-checking.patch" =46rom e47f0063c041b161f7a0b0d1fcd1badcb47cb802 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 23 Jul 2021 18:49:16 -0500 Subject: [PATCH 3/3] Redo emacsclient socket symlink-attack checking MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit This addresses Bug#33847, which complained about emacsclient in a safer XDG environment not connecting to an Emacs server running in a less-safe enviroment outside XDG. The patch fixes a longstanding issue with emacsclient permission checking. It=E2=80=99s ineffective to look at the permission of the socket file itself; on some platforms, these permissions are ignored anyway. What matters are the permissions on the parent directory of the socket file, as these are what make symlink attacks possible. Change the permissions check accordingly, and also refuse to follow symlinks to that parent directory. These changes make it OK for emacsclient to fall back from XDG_RUNTIME_DIR to the traditionally less-safe /tmp/emacsNNNN directories, since /tmp is universally sticky nowadays. * admin/merge-gnulib (GNULIB_MODULES): Add file-has-acl. * lib-src/emacsclient.c [SOCKETS_IN_FILE_SYSTEM]: Include acl.h, for file_has_acl. (O_PATH): Default to O_SEARCH, which is good enough here. (union local_sockaddr): New type. (socket_status): Remove, replacing with ... (connect_socket): New function. All callers changed. This function checks for ownership and permissions issues with the parent directory of the socket file, instead of checking the owner of the socket (which does not help security). (socknamesize): Move to file scope. (local_sockname): New arg S. No need to pass socknamesize. UID arg is now uid_t. All callers changed. Get file descriptor of parent directory of socket, to foil some symlink attacks. Do not follow symlinks to that directory. (set_local_socket): Create the socket here instead of on each attempt to connect it. Fall back from XDG_RUNTIME_DIR to /tmp only if the former fails due to ENOENT. Adjust permission-failure diagnostic to match changed behavior. * lib/file-has-acl.c: New file, copied from Gnulib. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. --- admin/merge-gnulib | 2 +- lib-src/emacsclient.c | 225 ++++++++++++------- lib/file-has-acl.c | 502 ++++++++++++++++++++++++++++++++++++++++++ lib/gnulib.mk.in | 12 + m4/gnulib-comp.m4 | 3 + 5 files changed, 664 insertions(+), 80 deletions(-) create mode 100644 lib/file-has-acl.c diff --git a/admin/merge-gnulib b/admin/merge-gnulib index 76349034fd..a0cdb7db31 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -33,7 +33,7 @@ GNULIB_MODULES=3D crypto/md5-buffer crypto/sha1-buffer crypto/sha256-buffer crypto/sha51= 2-buffer d-type diffseq double-slash-root dtoastr dtotimespec dup2 environ execinfo explicit_bzero faccessat - fchmodat fcntl fcntl-h fdopendir + fchmodat fcntl fcntl-h fdopendir file-has-acl filemode filename filevercmp flexmember fpieee free-posix fstatat fsusage fsync futimens getloadavg getopt-gnu getrandom gettime gettimeofday gitlog-to-changel= og diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 12ced4aadb..434db1bec4 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -1128,24 +1128,80 @@ process_grouping (void) =20 #ifdef SOCKETS_IN_FILE_SYSTEM =20 -/* Return the file status of NAME, ordinarily a socket. - It should be owned by UID. Return one of the following: - >0 - 'stat' failed with this errno value - -1 - isn't owned by us - 0 - success: none of the above */ +# include + +# ifndef O_PATH +# define O_PATH O_SEARCH +# endif + +/* A local socket address. The union avoids the need to cast. */ +union local_sockaddr +{ + struct sockaddr_un un; + struct sockaddr sa; +}; + +/* Relative to the directory DIRFD, connect the socket file named ADDR + to the socket S. Return 0 if successful, -1 if DIRFD is not + AT_FDCWD and DIRFD's permissions would allow a symlink attack, an + errno otherwise. */ =20 static int -socket_status (const char *name, uid_t uid) +connect_socket (int dirfd, char const *addr, int s, uid_t uid) { - struct stat statbfr; + int sock_status =3D 0; =20 - if (stat (name, &statbfr) !=3D 0) - return errno; + union local_sockaddr server; + if (sizeof server.un.sun_path <=3D strlen (addr)) + return ENAMETOOLONG; + server.un.sun_family =3D AF_UNIX; + strcpy (server.un.sun_path, addr); =20 - if (statbfr.st_uid !=3D uid) - return -1; + /* If -1, WDFD is not set yet. If nonnegative, WDFD is a file + descriptor for the initial working directory. Otherwise -1 - WDFD = is + the error number for the initial working directory. */ + static int wdfd =3D -1; =20 - return 0; + if (dirfd !=3D AT_FDCWD) + { + /* Fail if DIRFD's permissions are bogus. */ + struct stat st; + if (fstat (dirfd, &st) !=3D 0) + return errno; + if (st.st_uid !=3D uid || (st.st_mode & (S_IWGRP | S_IWOTH))) + return -1; + + if (wdfd =3D=3D -1) + { + /* Save the initial working directory. */ + wdfd =3D open (".", O_PATH | O_CLOEXEC); + if (wdfd < 0) + wdfd =3D -1 - errno; + } + if (wdfd < 0) + return -1 - wdfd; + if (fchdir (dirfd) !=3D 0) + return errno; + + /* Fail if DIRFD has an ACL, which means its permissions are + almost surely bogus. */ + int has_acl =3D file_has_acl (".", &st); + if (has_acl) + sock_status =3D has_acl < 0 ? errno : -1; + } + + if (!sock_status) + sock_status =3D connect (s, &server.sa, sizeof server.un) =3D=3D 0 ?= 0 : errno; + + /* Fail immediately if we cannot change back to the initial working + directory, as that can mess up the rest of execution. */ + if (dirfd !=3D AT_FDCWD && fchdir (wdfd) !=3D 0) + { + message (true, "%s: .: %s\n", progname, strerror (errno)); + exit (EXIT_FAILURE); + } + + return sock_status; } =20 =0C @@ -1322,32 +1378,49 @@ act_on_signals (HSOCKET emacs_socket) } } =20 -/* Create in SOCKNAME (of size SOCKNAMESIZE) a name for a local socket. - The first TMPDIRLEN bytes of SOCKNAME are already initialized to be - the name of a temporary directory. Use UID and SERVER_NAME to - concoct the name. Return the total length of the name if successful,= - -1 if it does not fit (and store a truncated name in that case). - Fail if TMPDIRLEN is out of range. */ +enum { socknamesize =3D sizeof ((struct sockaddr_un *) NULL)->sun_path }= ; + +/* Given a local socket S, create in *SOCKNAME a name for a local socket= + and connect to that socket. The first TMPDIRLEN bytes of *SOCKNAME a= re + already initialized to be the name of a temporary directory. + Use UID and SERVER_NAME to concoct the name. Return 0 if + successful, -1 if the socket's parent directory is not safe, and an + errno if there is some other problem. */ =20 static int -local_sockname (char *sockname, int socknamesize, int tmpdirlen, - uintmax_t uid, char const *server_name) +local_sockname (int s, char sockname[socknamesize], int tmpdirlen, + uid_t uid, char const *server_name) { /* If ! (0 <=3D TMPDIRLEN && TMPDIRLEN < SOCKNAMESIZE) the truncated temporary directory name is already in SOCKNAME, so nothing more need be stored. */ - if (0 <=3D tmpdirlen) - { - int remaining =3D socknamesize - tmpdirlen; - if (0 < remaining) - { - int suffixlen =3D snprintf (&sockname[tmpdirlen], remaining, - "/emacs%"PRIuMAX"/%s", uid, server_name); - if (0 <=3D suffixlen && suffixlen < remaining) - return tmpdirlen + suffixlen; - } - } - return -1; + if (! (0 <=3D tmpdirlen && tmpdirlen < socknamesize)) + return ENAMETOOLONG; + + /* Put the full address name into the buffer, since the caller might + need it for diagnostics. But don't overrun the buffer. */ + uintmax_t uidmax =3D uid; + int emacsdirlen; + int suffixlen =3D snprintf (sockname + tmpdirlen, socknamesize - tmpdi= rlen, + "/emacs%"PRIuMAX"%n/%s", uidmax, &emacsdirlen, + server_name); + if (! (0 <=3D suffixlen && suffixlen < socknamesize - tmpdirlen)) + return ENAMETOOLONG; + + /* Make sure the address's parent directory is not a symlink and is + this user's directory and does not let others write to it; this + fends off some symlink attacks. To avoid races, keep the parent + directory open while checking. */ + char *emacsdirend =3D sockname + tmpdirlen + emacsdirlen; + *emacsdirend =3D '\0'; + int dir =3D openat (AT_FDCWD, sockname, + O_PATH | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); + *emacsdirend =3D '/'; + if (dir < 0) + return errno; + int sock_status =3D connect_socket (dir, server_name, s, uid); + close (dir); + return sock_status; } =20 /* Create a local socket for SERVER_NAME and connect it to Emacs. If @@ -1358,28 +1431,43 @@ local_sockname (char *sockname, int socknamesize,= int tmpdirlen, static HSOCKET set_local_socket (char const *server_name) { - union { - struct sockaddr_un un; - struct sockaddr sa; - } server =3D {{ .sun_family =3D AF_UNIX }}; + union local_sockaddr server; + int sock_status; char *sockname =3D server.un.sun_path; - enum { socknamesize =3D sizeof server.un.sun_path }; int tmpdirlen =3D -1; int socknamelen =3D -1; uid_t uid =3D geteuid (); bool tmpdir_used =3D false; + int s =3D cloexec_socket (AF_UNIX, SOCK_STREAM, 0); + if (s < 0) + { + message (true, "%s: can't create socket: %s\n", + progname, strerror (errno)); + fail (); + } =20 if (strchr (server_name, '/') || (ISSLASH ('\\') && strchr (server_name, '\\'))) - socknamelen =3D snprintf (sockname, socknamesize, "%s", server_name)= ; + { + socknamelen =3D snprintf (sockname, socknamesize, "%s", server_nam= e); + sock_status =3D (0 <=3D socknamelen && socknamelen < socknamesize + ? connect_socket (AT_FDCWD, sockname, s, 0) + : ENAMETOOLONG); + } else { /* socket_name is a file name component. */ + sock_status =3D ENOENT; char const *xdg_runtime_dir =3D egetenv ("XDG_RUNTIME_DIR"); if (xdg_runtime_dir) - socknamelen =3D snprintf (sockname, socknamesize, "%s/emacs/%s", - xdg_runtime_dir, server_name); - else + { + socknamelen =3D snprintf (sockname, socknamesize, "%s/emacs/%s", + xdg_runtime_dir, server_name); + sock_status =3D (0 <=3D socknamelen && socknamelen < socknamesize + ? connect_socket (AT_FDCWD, sockname, s, 0) + : ENAMETOOLONG); + } + if (sock_status =3D=3D ENOENT) { char const *tmpdir =3D egetenv ("TMPDIR"); if (tmpdir) @@ -1398,23 +1486,24 @@ set_local_socket (char const *server_name) if (tmpdirlen < 0) tmpdirlen =3D snprintf (sockname, socknamesize, "/tmp"); } - socknamelen =3D local_sockname (sockname, socknamesize, tmpdirlen, + sock_status =3D local_sockname (s, sockname, tmpdirlen, uid, server_name); tmpdir_used =3D true; } } =20 - if (! (0 <=3D socknamelen && socknamelen < socknamesize)) + if (sock_status =3D=3D 0) + return s; + + if (sock_status =3D=3D ENAMETOOLONG) { message (true, "%s: socket-name %s... too long\n", progname, sockn= ame); fail (); } =20 - /* See if the socket exists, and if it's owned by us. */ - int sock_status =3D socket_status (sockname, uid); - if (sock_status) + if (tmpdir_used) { - /* Failing that, see if LOGNAME or USER exist and differ from + /* See whether LOGNAME or USER exist and differ from our euid. If so, look for a socket based on the UID associated with the name. This is reminiscent of the logic that init_editfns uses to set the global Vuser_full_name. */ @@ -1431,48 +1520,26 @@ set_local_socket (char const *server_name) if (pw && pw->pw_uid !=3D uid) { /* We're running under su, apparently. */ - socknamelen =3D local_sockname (sockname, socknamesize, tmpdirlen= , + sock_status =3D local_sockname (s, sockname, tmpdirlen, pw->pw_uid, server_name); - if (socknamelen < 0) + if (sock_status =3D=3D 0) + return s; + if (sock_status =3D=3D ENAMETOOLONG) { message (true, "%s: socket-name %s... too long\n", progname, sockname); exit (EXIT_FAILURE); } - - sock_status =3D socket_status (sockname, uid); } } } =20 - if (sock_status =3D=3D 0) - { - HSOCKET s =3D cloexec_socket (AF_UNIX, SOCK_STREAM, 0); - if (s < 0) - { - message (true, "%s: socket: %s\n", progname, strerror (errno)); - return INVALID_SOCKET; - } - if (connect (s, &server.sa, sizeof server.un) !=3D 0) - { - message (true, "%s: connect: %s\n", progname, strerror (errno)); - CLOSE_SOCKET (s); - return INVALID_SOCKET; - } + close (s); =20 - struct stat connect_stat; - if (fstat (s, &connect_stat) !=3D 0) - sock_status =3D errno; - else if (connect_stat.st_uid =3D=3D uid) - return s; - else - sock_status =3D -1; - - CLOSE_SOCKET (s); - } - - if (sock_status < 0) - message (true, "%s: Invalid socket owner\n", progname); + if (sock_status =3D=3D -1) + message (true, + "%s: Invalid permissions on parent directory of socket: %s\n", + progname, sockname); else if (sock_status =3D=3D ENOENT) { if (tmpdir_used) @@ -1502,7 +1569,7 @@ set_local_socket (char const *server_name) } } else - message (true, "%s: can't stat %s: %s\n", + message (true, "%s: can't connect to %s: %s\n", progname, sockname, strerror (sock_status)); =20 return INVALID_SOCKET; diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c new file mode 100644 index 0000000000..800af227cc --- /dev/null +++ b/lib/file-has-acl.c @@ -0,0 +1,502 @@ +/* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*- + + Copyright (C) 2002-2003, 2005-2021 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see = =2E + + Written by Paul Eggert, Andreas Gr=C3=BCnbacher, and Bruno Haible. *= / + +/* Without this pragma, gcc 4.7.0 20120126 may suggest that the + file_has_acl function might be candidate for attribute 'const' */ +#if (__GNUC__ =3D=3D 4 && 6 <=3D __GNUC_MINOR__) || 4 < __GNUC__ +# pragma GCC diagnostic ignored "-Wsuggest-attribute=3Dconst" +#endif + +#include + +#include "acl.h" + +#include "acl-internal.h" + +#if GETXATTR_WITH_POSIX_ACLS +# include +# include +#endif + +/* Return 1 if NAME has a nontrivial access control list, + 0 if ACLs are not supported, or if NAME has no or only a base ACL, + and -1 (setting errno) on error. Note callers can determine + if ACLs are not supported as errno is set in that case also. + SB must be set to the stat buffer of NAME, + obtained through stat() or lstat(). */ + +int +file_has_acl (char const *name, struct stat const *sb) +{ +#if USE_ACL + if (! S_ISLNK (sb->st_mode)) + { + +# if GETXATTR_WITH_POSIX_ACLS + + ssize_t ret; + + ret =3D getxattr (name, XATTR_NAME_POSIX_ACL_ACCESS, NULL, 0); + if (ret < 0 && errno =3D=3D ENODATA) + ret =3D 0; + else if (ret > 0) + return 1; + + if (ret =3D=3D 0 && S_ISDIR (sb->st_mode)) + { + ret =3D getxattr (name, XATTR_NAME_POSIX_ACL_DEFAULT, NULL, 0)= ; + if (ret < 0 && errno =3D=3D ENODATA) + ret =3D 0; + else if (ret > 0) + return 1; + } + + if (ret < 0) + return - acl_errno_valid (errno); + return ret; + +# elif HAVE_ACL_GET_FILE + + /* POSIX 1003.1e (draft 17 -- abandoned) specific version. */ + /* Linux, FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >=3D 2.5 */ + int ret; + + if (HAVE_ACL_EXTENDED_FILE) /* Linux */ + { + /* On Linux, acl_extended_file is an optimized function: It on= ly + makes two calls to getxattr(), one for ACL_TYPE_ACCESS, one= for + ACL_TYPE_DEFAULT. */ + ret =3D acl_extended_file (name); + } + else /* FreeBSD, Mac OS X, IRIX, Tru64, Cygwin >=3D 2.5 */ + { +# if HAVE_ACL_TYPE_EXTENDED /* Mac OS X */ + /* On Mac OS X, acl_get_file (name, ACL_TYPE_ACCESS) + and acl_get_file (name, ACL_TYPE_DEFAULT) + always return NULL / EINVAL. There is no point in making + these two useless calls. The real ACL is retrieved through= + acl_get_file (name, ACL_TYPE_EXTENDED). */ + acl_t acl =3D acl_get_file (name, ACL_TYPE_EXTENDED); + if (acl) + { + ret =3D acl_extended_nontrivial (acl); + acl_free (acl); + } + else + ret =3D -1; +# else /* FreeBSD, IRIX, Tru64, Cygwin >=3D 2.5 */ + acl_t acl =3D acl_get_file (name, ACL_TYPE_ACCESS); + if (acl) + { + int saved_errno; + + ret =3D acl_access_nontrivial (acl); + saved_errno =3D errno; + acl_free (acl); + errno =3D saved_errno; +# if HAVE_ACL_FREE_TEXT /* Tru64 */ + /* On OSF/1, acl_get_file (name, ACL_TYPE_DEFAULT) always + returns NULL with errno not set. There is no point in + making this call. */ +# else /* FreeBSD, IRIX, Cygwin >=3D 2.5 */ + /* On Linux, FreeBSD, IRIX, acl_get_file (name, ACL_TYPE_A= CCESS) + and acl_get_file (name, ACL_TYPE_DEFAULT) on a director= y + either both succeed or both fail; it depends on the + file system. Therefore there is no point in making the= second + call if the first one already failed. */ + if (ret =3D=3D 0 && S_ISDIR (sb->st_mode)) + { + acl =3D acl_get_file (name, ACL_TYPE_DEFAULT); + if (acl) + { +# ifdef __CYGWIN__ /* Cygwin >=3D 2.5 */ + ret =3D acl_access_nontrivial (acl); + saved_errno =3D errno; + acl_free (acl); + errno =3D saved_errno; +# else + ret =3D (0 < acl_entries (acl)); + acl_free (acl); +# endif + } + else + ret =3D -1; + } +# endif + } + else + ret =3D -1; +# endif + } + if (ret < 0) + return - acl_errno_valid (errno); + return ret; + +# elif HAVE_FACL && defined GETACL /* Solaris, Cygwin < 2.5, not HP-UX *= / + +# if defined ACL_NO_TRIVIAL + + /* Solaris 10 (newer version), which has additional API declared i= n + (acl_t) and implemented in libsec (acl_set, acl_tri= vial, + acl_fromtext, ...). */ + return acl_trivial (name); + +# else /* Solaris, Cygwin, general case */ + + /* Solaris 2.5 through Solaris 10, Cygwin, and contemporaneous ver= sions + of Unixware. The acl() call returns the access and default ACL= both + at once. */ + { + /* Initially, try to read the entries into a stack-allocated buf= fer. + Use malloc if it does not fit. */ + enum + { + alloc_init =3D 4000 / sizeof (aclent_t), /* >=3D 3 */ + alloc_max =3D MIN (INT_MAX, SIZE_MAX / sizeof (aclent_t)) + }; + aclent_t buf[alloc_init]; + size_t alloc =3D alloc_init; + aclent_t *entries =3D buf; + aclent_t *malloced =3D NULL; + int count; + + for (;;) + { + count =3D acl (name, GETACL, alloc, entries); + if (count < 0 && errno =3D=3D ENOSPC) + { + /* Increase the size of the buffer. */ + free (malloced); + if (alloc > alloc_max / 2) + { + errno =3D ENOMEM; + return -1; + } + alloc =3D 2 * alloc; /* <=3D alloc_max */ + entries =3D malloced =3D + (aclent_t *) malloc (alloc * sizeof (aclent_t)); + if (entries =3D=3D NULL) + { + errno =3D ENOMEM; + return -1; + } + continue; + } + break; + } + if (count < 0) + { + if (errno =3D=3D ENOSYS || errno =3D=3D ENOTSUP) + ; + else + { + free (malloced); + return -1; + } + } + else if (count =3D=3D 0) + ; + else + { + /* Don't use MIN_ACL_ENTRIES: It's set to 4 on Cygwin, but = Cygwin + returns only 3 entries for files with no ACL. But this i= s safe: + If there are more than 4 entries, there cannot be only th= e + "user::", "group::", "other:", and "mask:" entries. */ + if (count > 4) + { + free (malloced); + return 1; + } + + if (acl_nontrivial (count, entries)) + { + free (malloced); + return 1; + } + } + free (malloced); + } + +# ifdef ACE_GETACL + /* Solaris also has a different variant of ACLs, used in ZFS and N= FSv4 + file systems (whereas the other ones are used in UFS file syste= ms). */ + { + /* Initially, try to read the entries into a stack-allocated buf= fer. + Use malloc if it does not fit. */ + enum + { + alloc_init =3D 4000 / sizeof (ace_t), /* >=3D 3 */ + alloc_max =3D MIN (INT_MAX, SIZE_MAX / sizeof (ace_t)) + }; + ace_t buf[alloc_init]; + size_t alloc =3D alloc_init; + ace_t *entries =3D buf; + ace_t *malloced =3D NULL; + int count; + + for (;;) + { + count =3D acl (name, ACE_GETACL, alloc, entries); + if (count < 0 && errno =3D=3D ENOSPC) + { + /* Increase the size of the buffer. */ + free (malloced); + if (alloc > alloc_max / 2) + { + errno =3D ENOMEM; + return -1; + } + alloc =3D 2 * alloc; /* <=3D alloc_max */ + entries =3D malloced =3D (ace_t *) malloc (alloc * sizeo= f (ace_t)); + if (entries =3D=3D NULL) + { + errno =3D ENOMEM; + return -1; + } + continue; + } + break; + } + if (count < 0) + { + if (errno =3D=3D ENOSYS || errno =3D=3D EINVAL) + ; + else + { + free (malloced); + return -1; + } + } + else if (count =3D=3D 0) + ; + else + { + /* In the old (original Solaris 10) convention: + If there are more than 3 entries, there cannot be only th= e + ACE_OWNER, ACE_GROUP, ACE_OTHER entries. + In the newer Solaris 10 and Solaris 11 convention: + If there are more than 6 entries, there cannot be only th= e + ACE_OWNER, ACE_GROUP, ACE_EVERYONE entries, each once wit= h + NEW_ACE_ACCESS_ALLOWED_ACE_TYPE and once with + NEW_ACE_ACCESS_DENIED_ACE_TYPE. */ + if (count > 6) + { + free (malloced); + return 1; + } + + if (acl_ace_nontrivial (count, entries)) + { + free (malloced); + return 1; + } + } + free (malloced); + } +# endif + + return 0; +# endif + +# elif HAVE_GETACL /* HP-UX */ + + { + struct acl_entry entries[NACLENTRIES]; + int count; + + count =3D getacl (name, NACLENTRIES, entries); + + if (count < 0) + { + /* ENOSYS is seen on newer HP-UX versions. + EOPNOTSUPP is typically seen on NFS mounts. + ENOTSUP was seen on Quantum StorNext file systems (cvfs).= */ + if (errno =3D=3D ENOSYS || errno =3D=3D EOPNOTSUPP || errno = =3D=3D ENOTSUP) + ; + else + return -1; + } + else if (count =3D=3D 0) + return 0; + else /* count > 0 */ + { + if (count > NACLENTRIES) + /* If NACLENTRIES cannot be trusted, use dynamic memory + allocation. */ + abort (); + + /* If there are more than 3 entries, there cannot be only th= e + (uid,%), (%,gid), (%,%) entries. */ + if (count > 3) + return 1; + + { + struct stat statbuf; + + if (stat (name, &statbuf) =3D=3D -1 && errno !=3D EOVERFLO= W) + return -1; + + return acl_nontrivial (count, entries); + } + } + } + +# if HAVE_ACLV_H /* HP-UX >=3D 11.11 */ + + { + struct acl entries[NACLVENTRIES]; + int count; + + count =3D acl ((char *) name, ACL_GET, NACLVENTRIES, entries); + + if (count < 0) + { + /* EOPNOTSUPP is seen on NFS in HP-UX 11.11, 11.23. + EINVAL is seen on NFS in HP-UX 11.31. */ + if (errno =3D=3D ENOSYS || errno =3D=3D EOPNOTSUPP || errno = =3D=3D EINVAL) + ; + else + return -1; + } + else if (count =3D=3D 0) + return 0; + else /* count > 0 */ + { + if (count > NACLVENTRIES) + /* If NACLVENTRIES cannot be trusted, use dynamic memory + allocation. */ + abort (); + + /* If there are more than 4 entries, there cannot be only th= e + four base ACL entries. */ + if (count > 4) + return 1; + + return aclv_nontrivial (count, entries); + } + } + +# endif + +# elif HAVE_ACLX_GET && defined ACL_AIX_WIP /* AIX */ + + acl_type_t type; + char aclbuf[1024]; + void *acl =3D aclbuf; + size_t aclsize =3D sizeof (aclbuf); + mode_t mode; + + for (;;) + { + /* The docs say that type being 0 is equivalent to ACL_ANY, bu= t it + is not true, in AIX 5.3. */ + type.u64 =3D ACL_ANY; + if (aclx_get (name, 0, &type, aclbuf, &aclsize, &mode) >=3D 0)= + break; + if (errno =3D=3D ENOSYS) + return 0; + if (errno !=3D ENOSPC) + { + if (acl !=3D aclbuf) + free (acl); + return -1; + } + aclsize =3D 2 * aclsize; + if (acl !=3D aclbuf) + free (acl); + acl =3D malloc (aclsize); + if (acl =3D=3D NULL) + { + errno =3D ENOMEM; + return -1; + } + } + + if (type.u64 =3D=3D ACL_AIXC) + { + int result =3D acl_nontrivial ((struct acl *) acl); + if (acl !=3D aclbuf) + free (acl); + return result; + } + else if (type.u64 =3D=3D ACL_NFS4) + { + int result =3D acl_nfs4_nontrivial ((nfs4_acl_int_t *) acl); + if (acl !=3D aclbuf) + free (acl); + return result; + } + else + { + /* A newer type of ACL has been introduced in the system. + We should better support it. */ + if (acl !=3D aclbuf) + free (acl); + errno =3D EINVAL; + return -1; + } + +# elif HAVE_STATACL /* older AIX */ + + union { struct acl a; char room[4096]; } u; + + if (statacl ((char *) name, STX_NORMAL, &u.a, sizeof (u)) < 0) + return -1; + + return acl_nontrivial (&u.a); + +# elif HAVE_ACLSORT /* NonStop Kernel */ + + { + struct acl entries[NACLENTRIES]; + int count; + + count =3D acl ((char *) name, ACL_GET, NACLENTRIES, entries); + + if (count < 0) + { + if (errno =3D=3D ENOSYS || errno =3D=3D ENOTSUP) + ; + else + return -1; + } + else if (count =3D=3D 0) + return 0; + else /* count > 0 */ + { + if (count > NACLENTRIES) + /* If NACLENTRIES cannot be trusted, use dynamic memory + allocation. */ + abort (); + + /* If there are more than 4 entries, there cannot be only th= e + four base ACL entries. */ + if (count > 4) + return 1; + + return acl_nontrivial (count, entries); + } + } + +# endif + } +#endif + + return 0; +} diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 19531e9031..6ac22124ed 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -98,6 +98,7 @@ # fcntl \ # fcntl-h \ # fdopendir \ +# file-has-acl \ # filemode \ # filename \ # filevercmp \ @@ -840,6 +841,7 @@ LIB_CLOCK_GETTIME =3D @LIB_CLOCK_GETTIME@ LIB_EACCESS =3D @LIB_EACCESS@ LIB_EXECINFO =3D @LIB_EXECINFO@ LIB_GETRANDOM =3D @LIB_GETRANDOM@ +LIB_HAS_ACL =3D @LIB_HAS_ACL@ LIB_MATH =3D @LIB_MATH@ LIB_PTHREAD =3D @LIB_PTHREAD@ LIB_PTHREAD_SIGMASK =3D @LIB_PTHREAD_SIGMASK@ @@ -1834,6 +1836,16 @@ EXTRA_libgnu_a_SOURCES +=3D fdopendir.c endif ## end gnulib module fdopendir =20 +## begin gnulib module file-has-acl +ifeq (,$(OMIT_GNULIB_MODULE_file-has-acl)) + +libgnu_a_SOURCES +=3D file-has-acl.c + +EXTRA_DIST +=3D acl-internal.h + +endif +## end gnulib module file-has-acl + ## begin gnulib module filemode ifeq (,$(OMIT_GNULIB_MODULE_filemode)) =20 diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 30bda2de08..fa6a0e2d07 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -89,6 +89,7 @@ AC_DEFUN # Code from module fcntl: # Code from module fcntl-h: # Code from module fdopendir: + # Code from module file-has-acl: # Code from module filemode: # Code from module filename: # Code from module filevercmp: @@ -295,6 +296,7 @@ AC_DEFUN fi gl_DIRENT_MODULE_INDICATOR([fdopendir]) gl_MODULE_INDICATOR([fdopendir]) + gl_FILE_HAS_ACL gl_FILEMODE AC_C_FLEXIBLE_ARRAY_MEMBER gl_FUNC_FPENDING @@ -1123,6 +1125,7 @@ AC_DEFUN lib/fcntl.c lib/fcntl.in.h lib/fdopendir.c + lib/file-has-acl.c lib/filemode.c lib/filemode.h lib/filename.h --=20 2.31.1 --------------1CA4F37942ED9D8B1452A402-- From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jul 2021 06:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 33847@debbugs.gnu.org, larsi@gnus.org, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.16271078513759 (code B ref 33847); Sat, 24 Jul 2021 06:25:01 +0000 Received: (at 33847) by debbugs.gnu.org; 24 Jul 2021 06:24:11 +0000 Received: from localhost ([127.0.0.1]:45067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7B51-0000yZ-C8 for submit@debbugs.gnu.org; Sat, 24 Jul 2021 02:24:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7B4y-0000yK-7L for 33847@debbugs.gnu.org; Sat, 24 Jul 2021 02:24:09 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60388) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7B4r-0002hz-ID; Sat, 24 Jul 2021 02:24:01 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2758 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7B4r-0002ia-43; Sat, 24 Jul 2021 02:24:01 -0400 Date: Sat, 24 Jul 2021 09:23:46 +0300 Message-Id: <838s1w1b7x.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Paul Eggert on Fri, 23 Jul 2021 16:58:00 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org, > Eli Zaretskii > From: Paul Eggert > Date: Fri, 23 Jul 2021 16:58:00 -0700 > > On 7/23/21 4:38 AM, Lars Ingebrigtsen wrote: > > And I've now tested on Macos, too, and emacsclient still works there. > > Thanks for reminding me about that old patch. Unfortunately it uses an > old version of the Gnulib ACL code, which means it'll miss a fix or two. > I suggest the attached patches instead. They update Emacs to use current > Gnulib (the first two patches) and then apply the same patch you sent, > except with current Gnulib code. Phew! Talk about a hammer and a nail!.. > The first two patches are something we should be doing anyway, to bring > Emacs up-to-date on other Gnulib stuff. One thing worth putting into > NEWS is the new --disable-year2038 option to 'configure', which may be > useful for the next glibc release (for those people still running Emacs > on 32-bit GNU/Linux x86 or ARM). Yes, but why in conjunction with this particular issue? What does socket security have to do with 2038/32-bit time_t issue and the 64-bit file offsets issue? > You probably gotta run 'make bootstrap' after installing these patches. > Although I fixed the glitches Eli noted, the other Gnulib changes may > need further changes to Emacs's Microsoft-related code. Which of the Gnulib changes might need that, please? From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jul 2021 07:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33847@debbugs.gnu.org, larsi@gnus.org, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162711291811459 (code B ref 33847); Sat, 24 Jul 2021 07:49:02 +0000 Received: (at 33847) by debbugs.gnu.org; 24 Jul 2021 07:48:38 +0000 Received: from localhost ([127.0.0.1]:45102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7COj-0002yl-LS for submit@debbugs.gnu.org; Sat, 24 Jul 2021 03:48:37 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:59228) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7COe-0002yU-Tp for 33847@debbugs.gnu.org; Sat, 24 Jul 2021 03:48:36 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 62F8A1600DB; Sat, 24 Jul 2021 00:48:27 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id xYxxoSksbEl5; Sat, 24 Jul 2021 00:48:26 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 37CAB1600EF; Sat, 24 Jul 2021 00:48:26 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 87_S09gqUGYW; Sat, 24 Jul 2021 00:48:26 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id EAF5B1600DB; Sat, 24 Jul 2021 00:48:25 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> Date: Sat, 24 Jul 2021 00:48:25 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <838s1w1b7x.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 7/23/21 11:23 PM, Eli Zaretskii wrote: > why in conjunction with this particular issue? It's typically better to sync to a single coherent version of Gnulib,=20 than to take bits and pieces from different versions of Gnulib. That way=20 one needn't worry about version mismatch. >> Although I fixed the glitches Eli noted, the other Gnulib changes may >> need further changes to Emacs's Microsoft-related code. >=20 > Which of the Gnulib changes might need that, please? I said that more as boilerplate than as careful analysis. But in looking=20 at the patch more carefully, there may be issues in nt/gnulib-cfg.mk=20 where you have to set the following appropriately for MS-Windows: OMIT_GNULIB_MODULE_realloc-gnu OMIT_GNULIB_MODULE_realloc-posix The realloc-posix module supplies a 'realloc' that conforms to POSIX=20 (i.e., it sets errno when it fails, and it refuses to allocate anything=20 larger than PTRDIFF_MAX in size). The realloc-gnu module in addition makes sure that 'realloc' is=20 compatible with GNU realloc (i.e., realloc (NULL, 0) returns nonnull=20 when it succeeds). The new file lib/realloc.c arranges for a replacement realloc on=20 platforms where realloc-posix and/or realloc-gnu discover that the=20 system realloc doesn't match glibc realloc in behavior. The msdos directory may need to do something similar. Also, it may need=20 to change "GNULIB_" to "GL_GNULIB_" for identifiers like GNULIB_GETLOADAV= G. There may be other issues, but these are the ones that jump out at me. Hmm, come to think of it, does Emacs already arrange to avoid the=20 problematic realloc behavior areas? If so, we can avoid using=20 realloc-gnu and realloc-posix, which would simplify the patch a bit. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jul 2021 08:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 33847@debbugs.gnu.org, larsi@gnus.org, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162711516615093 (code B ref 33847); Sat, 24 Jul 2021 08:27:01 +0000 Received: (at 33847) by debbugs.gnu.org; 24 Jul 2021 08:26:06 +0000 Received: from localhost ([127.0.0.1]:45124 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7Cyw-0003v5-1L for submit@debbugs.gnu.org; Sat, 24 Jul 2021 04:26:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7Cys-0003un-2O for 33847@debbugs.gnu.org; Sat, 24 Jul 2021 04:26:01 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:34372) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7Cyl-0003ds-HJ; Sat, 24 Jul 2021 04:25:51 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2294 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7Cyl-0003Pz-54; Sat, 24 Jul 2021 04:25:51 -0400 Date: Sat, 24 Jul 2021 11:25:37 +0300 Message-Id: <83v950yv7i.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> (message from Paul Eggert on Sat, 24 Jul 2021 00:48:25 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Cc: larsi@gnus.org, teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org > From: Paul Eggert > Date: Sat, 24 Jul 2021 00:48:25 -0700 > > On 7/23/21 11:23 PM, Eli Zaretskii wrote: > > > why in conjunction with this particular issue? > > It's typically better to sync to a single coherent version of Gnulib, > than to take bits and pieces from different versions of Gnulib. That way > one needn't worry about version mismatch. Yes, but making changes in most/all Gnulib while fixing a minor issue in a single auxiliary program is IMO too much, and stretches this principle way beyond any reasonable limit. So I'd prefer to make these Gnulib updates a separate changeset, if that's feasible. > >> Although I fixed the glitches Eli noted, the other Gnulib changes may > >> need further changes to Emacs's Microsoft-related code. > > > > Which of the Gnulib changes might need that, please? > > I said that more as boilerplate than as careful analysis. But in looking > at the patch more carefully, there may be issues in nt/gnulib-cfg.mk > where you have to set the following appropriately for MS-Windows: > > OMIT_GNULIB_MODULE_realloc-gnu > OMIT_GNULIB_MODULE_realloc-posix > > The realloc-posix module supplies a 'realloc' that conforms to POSIX > (i.e., it sets errno when it fails, and it refuses to allocate anything > larger than PTRDIFF_MAX in size). > > The realloc-gnu module in addition makes sure that 'realloc' is > compatible with GNU realloc (i.e., realloc (NULL, 0) returns nonnull > when it succeeds). > > The new file lib/realloc.c arranges for a replacement realloc on > platforms where realloc-posix and/or realloc-gnu discover that the > system realloc doesn't match glibc realloc in behavior. We cannot use these modules on MS-Windows because we have our private implementation of malloc/realloc/free in w32heap.c. Any problems with errno and return values for zero-sized allocations must be handled by our own code there (we could borrow the ideas from Gnulib, of course). > The msdos directory may need to do something similar. That's a different port of Emacs and a different libc, so the results are different. > There may be other issues, but these are the ones that jump out at me. Can you tell which Gnulib modules are affected by the new "--disable-year2038" option? This might have direct effect on how Emacs is built with mingw.org's MinGW (which is what I use), and in general to the entire issue of supporting old 32-bit versions of MS-Windows. > Hmm, come to think of it, does Emacs already arrange to avoid the > problematic realloc behavior areas? If so, we can avoid using > realloc-gnu and realloc-posix, which would simplify the patch a bit. How would Emacs arrange to avoid these problems? I could take a look if I knew what I should look for. Thanks. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jul 2021 10:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: teika@gmx.com, Eli Zaretskii , 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162712151025401 (code B ref 33847); Sat, 24 Jul 2021 10:12:02 +0000 Received: (at 33847) by debbugs.gnu.org; 24 Jul 2021 10:11:50 +0000 Received: from localhost ([127.0.0.1]:45182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7EdJ-0006bd-NU for submit@debbugs.gnu.org; Sat, 24 Jul 2021 06:11:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60352) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7EdE-0006bM-QA for 33847@debbugs.gnu.org; Sat, 24 Jul 2021 06:11:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=33/xoVjmp23E7wULwMPahVJeH+e1TXaYZvzeGXJoNx0=; b=Uk5/Z/ykJy50t91ujmL2atFNsK 3Ii6onHOKiqr+KS/FJZPU+8PKE4skAPAkKUbmjtr1ofUIQwCoLEiOedlYkYe79UWkfuYAppgg4e/d QQx1uAchy3FLSIhUq+LgaDyOroyu/PDjD4lr4PjUnVcgKyr8jcnnVwl+YrswniaxkLd4=; Received: from cm-84.212.220.105.getinternet.no ([84.212.220.105] helo=elva) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m7Ed1-000467-JH; Sat, 24 Jul 2021 12:11:34 +0200 From: Lars Ingebrigtsen References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEX41p3otofWmnCp aVNKLyb///85U+krAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UHGAoJDHgz8UUAAAG+SURBVDjLbZPb leQgDETBk4CENwAjOoA2cgLbkH9MWxL4MbNDf7QPl1LxKIUwB4VvI15fRN/gE8Qn4CeIvwKQhS7E fJUkgGtdvACbgsMpYU5zhZRE27YQnwrx/0UxStry6cHJwZdq762CMIqwCRwsNo8BEfEcE/QxmuaT SDGno5+kxm3MOwhzFlxlCkQNXIrePjG7w09gkmigOHi1m7wj/w42caAO1v6oNb0dfD3A3+n9H2jZ wfCITxCt0gRhPZ6KdIOnP3G+AZ7h9GnJBBNQvjUfTtU2pf7A/tTu07YYdW53CSsvmyQ//l5ZtJZq pTisVLIWu/amutayFzWwhUJFHDQ8LyxyKQYyAFa89Gh6qEorMhQprPngT2na8VP5lPoa5rQmxZd5 9KppTyg1tksStVrmYF7tPdYyDph2ThmJAcChcbvmYnFeaPF52EsOI1YABPsUKUqWVxMakUZKcCGW VogiQB4gOUCMI0PE6U/fzrAPABXOyXnt7xuMUJ7dsNNoKGRXpiKEYl1yNhRAzhO8cCmdpjuAn4k9 wniSOmpNIBmS0Sbt6kEHArCMMLgiXkB45qS9z3b2fF1AdR+15B+Mln+kRFSe+QAAACV0RVh0ZGF0 ZTpjcmVhdGUAMjAyMS0wNy0yNFQxMDowOToxMiswMDowMGuojjIAAAAldEVYdGRhdGU6bW9kaWZ5 ADIwMjEtMDctMjRUMTA6MDk6MTIrMDA6MDAa9TaOAAAAAElFTkSuQmCC X-Now-Playing: Heidi Berry's _Heidi Berry_: "Darling Companion" Date: Sat, 24 Jul 2021 12:11:31 +0200 In-Reply-To: (Paul Eggert's message of "Fri, 23 Jul 2021 16:58:00 -0700") Message-ID: <87h7gkhvho.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Paul Eggert writes: > They update Emacs to use current Gnulib (the first two patches) and > then apply the same patch you sent, except with current Gnulib code. Just one note here -- I already applied and pushed that patch to Emacs 28, so I guess it'll either have to be reverted (and then reapplied from your new patch), or the new patch has to be rebased. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Paul Eggert writes: > They update Emacs to use current Gnulib (the first two patches) and > then apply the same patch you sent, except with current Gnulib code. Just one note here -- I already applied and pushed that patch to Emacs 28, so I guess it'll either have to be reverted (and then reapplied from your new patch), or the new patch has to be rebased. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jul 2021 19:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: teika@gmx.com, Eli Zaretskii , 33847@debbugs.gnu.org, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162715547218091 (code B ref 33847); Sat, 24 Jul 2021 19:38:02 +0000 Received: (at 33847) by debbugs.gnu.org; 24 Jul 2021 19:37:52 +0000 Received: from localhost ([127.0.0.1]:47083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7NT5-0004hj-N8 for submit@debbugs.gnu.org; Sat, 24 Jul 2021 15:37:51 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:51382) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7NT3-0004hX-S4 for 33847@debbugs.gnu.org; Sat, 24 Jul 2021 15:37:50 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 577D41600EB; Sat, 24 Jul 2021 12:37:44 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id X90Nvq9lVLPL; Sat, 24 Jul 2021 12:37:43 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 878F81600ED; Sat, 24 Jul 2021 12:37:43 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id qH-p4486_AU7; Sat, 24 Jul 2021 12:37:43 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 4DC5F1600EB; Sat, 24 Jul 2021 12:37:43 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <87h7gkhvho.fsf@gnus.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <1a95bea1-4005-44be-d439-523521fa7b61@cs.ucla.edu> Date: Sat, 24 Jul 2021 12:37:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87h7gkhvho.fsf@gnus.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.4 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 7/24/21 3:11 AM, Lars Ingebrigtsen wrote: > Just one note here -- I already applied and pushed that patch to Emacs > 28, so I guess it'll either have to be reverted (and then reapplied from > your new patch), or the new patch has to be rebased. No problem, I'll rebase it with Eli's comments in mind. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jul 2021 23:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33847@debbugs.gnu.org, larsi@gnus.org, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.16271695306798 (code B ref 33847); Sat, 24 Jul 2021 23:33:01 +0000 Received: (at 33847) by debbugs.gnu.org; 24 Jul 2021 23:32:10 +0000 Received: from localhost ([127.0.0.1]:47197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7R7q-0001la-Dv for submit@debbugs.gnu.org; Sat, 24 Jul 2021 19:32:10 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:39602) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7R7o-0001lM-Aj for 33847@debbugs.gnu.org; Sat, 24 Jul 2021 19:32:09 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 9EE721600ED; Sat, 24 Jul 2021 16:32:02 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id LLg2fgj07_uo; Sat, 24 Jul 2021 16:31:24 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 02ACC1600EF; Sat, 24 Jul 2021 16:31:24 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id S3G3ydGf_9WN; Sat, 24 Jul 2021 16:31:23 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 6CF001600ED; Sat, 24 Jul 2021 16:31:22 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> <83v950yv7i.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> Date: Sat, 24 Jul 2021 16:31:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83v950yv7i.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------E4BEEE2CBC36A509D278BC92" Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" This is a multi-part message in MIME format. --------------E4BEEE2CBC36A509D278BC92 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable > We cannot use these modules on MS-Windows because we have our private > implementation of malloc/realloc/free in w32heap.c. In looking into this, I noticed that our current approach has another=20 problem, because admin/merge-gnulib avoids Gnulib's malloc-posix module=20 so that the Emacs build procedure need not worry about Gnulib's malloc=20 interposition on MS-Windows. However, Gnulib relies on the POSIX malloc=20 spec in its own use of malloc, so malloc-posix should be present in=20 Emacs; this is for the benefit of some platforms that are neither GNU=20 nor MS-Windows. What we should do is (A) have the Emacs tarball contain whatever Gnulib=20 memory-allocation modules Gnulib needs, (B) arrange for Gnulib's=20 memory-allocation modules to be inactive on MS-Windows, and (C) arrange=20 for Emacs's private implementation of malloc/realloc/free to be=20 GNU-compatible. Proposed patches attached to do all this. Patch 4/4 is the one needing=20 most scrutiny, since it involves MS-Windows which I don't use. Some context here. Gnulib's recent memory-allocation changes mostly deal=20 with sizes exceeding PTRDIFF_MAX, which is a no-no for obvious reasons=20 (POSIX will prohibit this in the next version, I think) and where Gnulib=20 assumes malloc etc. will fail. This is of practical concern mostly on=20 32-bit platforms (though there's a practical concern with calloc even on=20 64-bit platforms). Similarly, the new year2038 Gnulib code is of practical concern only on=20 some 32-bit platforms (namely, GNU/Linux x86 and ARM). > Can you tell which Gnulib modules are affected by the new > "--disable-year2038" option? No modules are affected by the --disable-year2038 option on MS-Windows. The --disable-year2038 option has an effect only on 32-bit GNU/Linux x86=20 and ARM (glibc 2.34 and later). On these platforms, the option affects a=20 good many Gnulib modules as well as Emacs source code directly. This is=20 because the option affects anything that gets or sets a timestamp from=20 the OS. 'stat' syscalls, for example. As I understand it, MS-Windows switched to 64-bit time_t back in 2005=20 (even on 32-bit platforms), and nowadays you have to explicitly request=20 32-bit time_t (does anybody do that when building Emacs? I hope not).=20 The --disable-year2038 option does not have any effect on MS-Windows,=20 because nobody has bothered to add support for that option on that=20 platform and I expect and hope that nobody ever will. The only reason --disable-year2038 might be useful to Emacs is on=20 GNU/Linux x86 or ARM, if Emacs is linked to old libraries that require=20 time_t to be 32-bit in their ABI. Although I don't know of any such=20 libraries being used with Emacs, I haven't checked everything that Emacs=20 potentially links to, so there might be an issue there. Any Emacs executables built with the --disable-year2038 option on=20 GNU/Linux x86 or ARM will of course stop working after 2038, so it's not=20 an option I recommend. --------------E4BEEE2CBC36A509D278BC92 Content-Type: text/x-patch; charset=UTF-8; name="0001-Simplify-socket-symlink-attack-checking.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-Simplify-socket-symlink-attack-checking.patch" =46rom 979edbb953c834027716a3ceeba7bee1bf368ffa Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Jul 2021 16:11:15 -0700 Subject: [PATCH 1/4] Simplify socket symlink-attack checking * lib-src/emacsclient.c: Move "#include " to inside "#ifdef SOCKETS_IN_FILE_SYSTEM", which is more accurate and simpler than having a separate "#ifndef WINDOWSNT". (O_PATH): Likewise. --- lib-src/emacsclient.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 8346524a3e..434db1bec4 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -80,9 +80,6 @@ Copyright (C) 1986-1987, 1994, 1999-2021 Free Software = Foundation, Inc. #include #include =20 -#ifndef WINDOWSNT -# include -#endif #include #include #include @@ -94,10 +91,6 @@ Copyright (C) 1986-1987, 1994, 1999-2021 Free Software= Foundation, Inc. # pragma GCC diagnostic ignored "-Wformat-truncation=3D2" #endif =20 -#if !defined O_PATH && !defined WINDOWSNT -# define O_PATH O_SEARCH -#endif - =0C /* Name used to invoke this program. */ static char const *progname; @@ -1135,6 +1128,12 @@ process_grouping (void) =20 #ifdef SOCKETS_IN_FILE_SYSTEM =20 +# include + +# ifndef O_PATH +# define O_PATH O_SEARCH +# endif + /* A local socket address. The union avoids the need to cast. */ union local_sockaddr { --=20 2.31.1 --------------E4BEEE2CBC36A509D278BC92 Content-Type: text/x-patch; charset=UTF-8; name="0002-Update-from-Gnulib-by-running-admin-merge-gnulib.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0002-Update-from-Gnulib-by-running-admin-merge-gnulib.patch" =46rom 5a9c5321bbb3794e7aff795f8c020496220affb7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Jul 2021 16:11:16 -0700 Subject: [PATCH 2/4] Update from Gnulib by running admin/merge-gnulib --- build-aux/config.guess | 1229 ++++++++++--------- build-aux/config.sub | 68 +- build-aux/gitlog-to-changelog | 5 +- doc/misc/texinfo.tex | 267 ++--- lib/_Noreturn.h | 8 +- lib/alloca.in.h | 20 +- lib/allocator.c | 17 + lib/allocator.h | 14 +- lib/arg-nonnull.h | 8 +- lib/attribute.h | 16 +- lib/binary-io.c | 14 +- lib/binary-io.h | 14 +- lib/byteswap.in.h | 14 +- lib/c++defs.h | 8 +- lib/c-ctype.c | 18 + lib/c-ctype.h | 24 +- lib/c-strcase.h | 16 +- lib/c-strcasecmp.c | 16 +- lib/c-strncasecmp.c | 16 +- lib/canonicalize-lgpl.c | 15 +- lib/careadlinkat.c | 42 +- lib/careadlinkat.h | 14 +- lib/cdefs.h | 38 +- lib/cloexec.c | 18 +- lib/cloexec.h | 18 +- lib/close-stream.h | 18 + lib/copy-file-range.c | 14 +- lib/count-leading-zeros.c | 18 + lib/count-leading-zeros.h | 14 +- lib/count-one-bits.c | 18 + lib/count-one-bits.h | 14 +- lib/count-trailing-zeros.c | 18 + lib/count-trailing-zeros.h | 14 +- lib/dirent.in.h | 14 +- lib/dirfd.c | 14 +- lib/dtoastr.c | 17 + lib/dup2.c | 14 +- lib/dynarray.h | 273 ++++- lib/eloop-threshold.h | 8 +- lib/errno.in.h | 16 +- lib/euidaccess.c | 14 +- lib/execinfo.c | 18 + lib/execinfo.in.h | 8 +- lib/explicit_bzero.c | 8 +- lib/fcntl.c | 14 +- lib/fcntl.in.h | 14 +- lib/file-has-acl.c | 14 +- lib/filename.h | 8 +- lib/filevercmp.c | 16 +- lib/filevercmp.h | 16 +- lib/flexmember.h | 8 +- lib/free.c | 30 +- lib/fsusage.c | 14 +- lib/fsusage.h | 14 +- lib/fsync.c | 16 +- lib/futimens.c | 14 +- lib/getdtablesize.c | 14 +- lib/getgroups.c | 20 +- lib/getopt-cdefs.in.h | 21 +- lib/getopt-core.h | 8 +- lib/getopt-ext.h | 8 +- lib/getopt-pfx-core.h | 21 +- lib/getopt-pfx-ext.h | 21 +- lib/getopt.c | 8 +- lib/getopt.in.h | 24 +- lib/getopt1.c | 8 +- lib/getopt_int.h | 8 +- lib/getrandom.c | 20 +- lib/gettext.h | 16 +- lib/gettime.c | 14 +- lib/gettimeofday.c | 16 +- lib/gnulib.mk.in | 1261 +++++++++++--------- lib/group-member.c | 22 +- lib/idx.h | 8 +- lib/ieee754.in.h | 8 +- lib/ignore-value.h | 14 +- lib/intprops.h | 26 +- lib/inttypes.in.h | 14 +- lib/libc-config.h | 31 +- lib/limits.in.h | 16 +- lib/lstat.c | 14 +- lib/malloc/dynarray-skeleton.c | 41 +- lib/malloc/dynarray.h | 8 +- lib/malloc/dynarray_at_failure.c | 12 +- lib/malloc/dynarray_emplace_enlarge.c | 12 +- lib/malloc/dynarray_finalize.c | 12 +- lib/malloc/dynarray_resize.c | 12 +- lib/malloc/dynarray_resize_clear.c | 12 +- lib/malloc/scratch_buffer.h | 8 +- lib/malloc/scratch_buffer_dupfree.c | 8 +- lib/malloc/scratch_buffer_grow.c | 8 +- lib/malloc/scratch_buffer_grow_preserve.c | 8 +- lib/malloc/scratch_buffer_set_array_size.c | 8 +- lib/md5.c | 16 +- lib/md5.h | 16 +- lib/memmem.c | 16 +- lib/mempcpy.c | 21 +- lib/memrchr.c | 14 +- lib/mini-gmp-gnulib.c | 28 +- lib/mini-gmp.c | 8 +- lib/mini-gmp.h | 9 +- lib/minmax.h | 16 +- lib/mkostemp.c | 14 +- lib/mktime-internal.h | 8 +- lib/mktime.c | 8 +- lib/nstrftime.c | 19 +- lib/open.c | 14 +- lib/pathmax.h | 16 +- lib/pipe2.c | 18 +- lib/pselect.c | 16 +- lib/pthread_sigmask.c | 14 +- lib/rawmemchr.c | 19 +- lib/rawmemchr.valgrind | 14 +- lib/readlink.c | 14 +- lib/realloc.c | 63 + lib/regcomp.c | 16 +- lib/regex.c | 8 +- lib/regex.h | 8 +- lib/regex_internal.c | 9 +- lib/regex_internal.h | 17 +- lib/regexec.c | 105 +- lib/root-uid.h | 18 +- lib/scratch_buffer.h | 115 +- lib/sha1.c | 16 +- lib/sha1.h | 16 +- lib/sha256.c | 14 +- lib/sha256.h | 14 +- lib/sha512.c | 14 +- lib/sha512.h | 14 +- lib/sigdescr_np.c | 14 +- lib/signal.in.h | 14 +- lib/stat-time.c | 18 + lib/stat-time.h | 14 +- lib/stdalign.in.h | 29 +- lib/stddef.in.h | 27 +- lib/stdint.in.h | 20 +- lib/stdio-impl.h | 14 +- lib/stdio.in.h | 24 +- lib/stdlib.in.h | 146 ++- lib/stpcpy.c | 14 +- lib/str-two-way.h | 16 +- lib/strftime.h | 14 +- lib/string.in.h | 18 +- lib/strnlen.c | 16 +- lib/strtoimax.c | 14 +- lib/strtol.c | 55 +- lib/strtoll.c | 14 +- lib/symlink.c | 14 +- lib/sys_random.in.h | 16 +- lib/sys_select.in.h | 16 +- lib/sys_stat.in.h | 16 +- lib/sys_time.in.h | 16 +- lib/sys_types.in.h | 16 +- lib/tempname.c | 8 +- lib/tempname.h | 14 +- lib/time-internal.h | 16 +- lib/time.in.h | 58 +- lib/time_r.c | 16 +- lib/time_rz.c | 16 +- lib/timegm.c | 8 +- lib/timespec.c | 18 + lib/timespec.h | 14 +- lib/u64.c | 18 + lib/u64.h | 14 +- lib/unistd.c | 18 + lib/unistd.in.h | 29 +- lib/unlocked-io.h | 26 +- lib/utimens.c | 20 +- lib/utimens.h | 14 +- lib/verify.h | 14 +- lib/warn-on-use.h | 8 +- lib/xalloc-oversized.h | 53 +- m4/dirent_h.m4 | 45 +- m4/environ.m4 | 5 +- m4/explicit_bzero.m4 | 2 +- m4/fcntl_h.m4 | 39 +- m4/free.m4 | 7 +- m4/gettimeofday.m4 | 6 +- m4/gnulib-common.m4 | 84 +- m4/gnulib-comp.m4 | 132 +- m4/inttypes.m4 | 31 +- m4/largefile.m4 | 28 +- m4/malloc.m4 | 174 +++ m4/memmem.m4 | 5 +- m4/mempcpy.m4 | 4 +- m4/memrchr.m4 | 4 +- m4/mktime.m4 | 4 +- m4/pselect.m4 | 4 +- m4/pthread_sigmask.m4 | 10 +- m4/rawmemchr.m4 | 4 +- m4/realloc.m4 | 63 + m4/regex.m4 | 44 +- m4/sigdescr_np.m4 | 4 +- m4/signal_h.m4 | 33 +- m4/stdalign.m4 | 4 +- m4/stddef_h.m4 | 23 +- m4/stdint.m4 | 6 +- m4/stdio_h.m4 | 168 ++- m4/stdlib_h.m4 | 122 +- m4/stpcpy.m4 | 4 +- m4/string_h.m4 | 124 +- m4/strnlen.m4 | 4 +- m4/strtoll.m4 | 36 +- m4/sys_random_h.m4 | 25 +- m4/sys_select_h.m4 | 29 +- m4/sys_socket_h.m4 | 53 +- m4/sys_stat_h.m4 | 65 +- m4/sys_time_h.m4 | 34 +- m4/sys_types_h.m4 | 16 +- m4/time_h.m4 | 62 +- m4/time_r.m4 | 2 +- m4/time_rz.m4 | 2 +- m4/timegm.m4 | 4 +- m4/unistd_h.m4 | 194 +-- m4/unlocked-io.m4 | 7 +- m4/year2038.m4 | 112 ++ 216 files changed, 4850 insertions(+), 3137 deletions(-) create mode 100644 lib/realloc.c create mode 100644 m4/malloc.m4 create mode 100644 m4/realloc.m4 create mode 100644 m4/year2038.m4 diff --git a/build-aux/config.guess b/build-aux/config.guess index f7727026b7..e81d3ae7c2 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -2,7 +2,9 @@ # Attempt to guess a canonical system name. # Copyright 1992-2021 Free Software Foundation, Inc. =20 -timestamp=3D'2021-01-01' +# shellcheck disable=3DSC2006,SC2268 # see below for rationale + +timestamp=3D'2021-06-03' =20 # 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 @@ -32,7 +34,15 @@ timestamp=3D # Please send patches to . =20 =20 -me=3D$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide= +# variety of pre-POSIX systems that do not have POSIX shells at all, and= +# even some reasonably current systems (Solaris 10 as case-in-point) sti= ll +# have a pre-POSIX /bin/sh. + + +me=3D`echo "$0" | sed -e 's,.*/,,'` =20 usage=3D"\ Usage: $0 [OPTION] @@ -84,6 +94,9 @@ help=3D exit 1 fi =20 +# Just in case it came from the environment. +GUESS=3D + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -102,8 +115,8 @@ set_cc_for_build() # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=3D/tmp}" - # shellcheck disable=3DSC2039 - { tmp=3D$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) = && test -n "$tmp" && test -d "$tmp" ; } || + # shellcheck disable=3DSC2039,SC3028 + { tmp=3D`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` &&= test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=3D$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdi= r "$tmp" 2>/dev/null) ; } || { tmp=3D$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && ech= o "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit= 1 ; } @@ -112,7 +125,7 @@ set_cc_for_build() ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD=3D"$driver" + CC_FOR_BUILD=3D$driver break fi done @@ -131,12 +144,12 @@ set_cc_for_build() PATH=3D$PATH:/.attbin ; export PATH fi =20 -UNAME_MACHINE=3D$( (uname -m) 2>/dev/null) || UNAME_MACHINE=3Dunknown -UNAME_RELEASE=3D$( (uname -r) 2>/dev/null) || UNAME_RELEASE=3Dunknown -UNAME_SYSTEM=3D$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=3Dunknown -UNAME_VERSION=3D$( (uname -v) 2>/dev/null) || UNAME_VERSION=3Dunknown +UNAME_MACHINE=3D`(uname -m) 2>/dev/null` || UNAME_MACHINE=3Dunknown +UNAME_RELEASE=3D`(uname -r) 2>/dev/null` || UNAME_RELEASE=3Dunknown +UNAME_SYSTEM=3D`(uname -s) 2>/dev/null` || UNAME_SYSTEM=3Dunknown +UNAME_VERSION=3D`(uname -v) 2>/dev/null` || UNAME_VERSION=3Dunknown =20 -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=3Dunknown =20 @@ -157,7 +170,8 @@ UNAME_VERSION=3D #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's= , ,,g')" + cc_set_libc=3D`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' |= sed 's, ,,g'` + eval "$cc_set_libc" =20 # Second heuristic to detect musl libc. if [ "$LIBC" =3D unknown ] && @@ -176,7 +190,7 @@ UNAME_VERSION=3D =20 # Note: order is significant - the case branches are not exclusive. =20 -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -188,12 +202,11 @@ UNAME_VERSION=3D # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - sysctl=3D"sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=3D$( (uname -p 2>/dev/null || \ - "/sbin/$sysctl" 2>/dev/null || \ - "/usr/sbin/$sysctl" 2>/dev/null || \ - echo unknown)) - case "$UNAME_MACHINE_ARCH" in + UNAME_MACHINE_ARCH=3D`(uname -p 2>/dev/null || \ + /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ + echo unknown)` + case $UNAME_MACHINE_ARCH in aarch64eb) machine=3Daarch64_be-unknown ;; armeb) machine=3Darmeb-unknown ;; arm*) machine=3Darm-unknown ;; @@ -201,15 +214,15 @@ UNAME_VERSION=3D sh3eb) machine=3Dsh-unknown ;; sh5el) machine=3Dsh5le-unknown ;; earmv*) - arch=3D$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,= ') - endian=3D$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') - machine=3D"${arch}${endian}"-unknown + arch=3D`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'= ` + endian=3D`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=3D${arch}${endian}-unknown ;; - *) machine=3D"$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=3D$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=3Dnetbsdelf ;; @@ -230,10 +243,10 @@ UNAME_VERSION=3D ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr=3D's/^earmv[0-9]/-eabi/;s/eb$//' - abi=3D$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + abi=3D`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -241,76 +254,82 @@ UNAME_VERSION=3D # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release=3D'-gnu' ;; *) - release=3D$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,= 2) + release=3D`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2= ` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=3D$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=3D$(arch | sed 's/Bitrig.//') - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=3D`arch | sed 's/Bitrig.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=3D$(arch | sed 's/OpenBSD.//') - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=3D`arch | sed 's/OpenBSD.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=3D`arch | sed 's/SecBSD.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=3D$(arch | sed 's/^.*BSD\.//') - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=3D`arch | sed 's/^.*BSD\.//'` + GUESS=3D$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=3Dmips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=3D$(/usr/sbin/sizer -v | awk '{print $3}') + UNAME_RELEASE=3D`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=3D$(/usr/sbin/sizer -v | awk '{print $4}') + UNAME_RELEASE=3D`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=3D$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.= *\) processor.*$/\1/p' | head -n 1) - case "$ALPHA_CPU_TYPE" in + ALPHA_CPU_TYPE=3D`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*= \) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=3Dalpha ;; "EV4.5 (21064)") @@ -347,68 +366,69 @@ UNAME_VERSION=3D # A Tn.n version is a released field test version. # 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/^[PVT= X]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=3D$? - trap '' 0 - exit $exitcode ;; + OSF_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJ= KLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=3D$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=3Dm68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=3Di370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=3Ds390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=3Dpowerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=3Darm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=3Darm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=3Dhppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "$( (/bin/universe) 2>/dev/null)" =3D att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=3Dpyramid-pyramid-sysv3 ;; + *) GUESS=3Dpyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=3Dpyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=3Dsparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case $(/usr/bin/uname -p) in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + case `/usr/bin/uname -p` in + sparc) GUESS=3Dsparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/= [^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3D$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dsparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dsparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=3Di386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=3Di386 @@ -423,41 +443,44 @@ UNAME_VERSION=3D SUN_ARCH=3Dx86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'= )" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3D$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dsparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "$(/usr/bin/arch -k)" in + case `/usr/bin/arch -k` in Series*|S4*) - UNAME_RELEASE=3D$(uname -v) + UNAME_RELEASE=3D`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=3Dsparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=3D$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>= /dev/null) + UNAME_RELEASE=3D`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/d= ev/null` test "x$UNAME_RELEASE" =3D x && UNAME_RELEASE=3D3 - case "$(/bin/arch)" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=3Dm68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=3Dsparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=3Dsparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -467,41 +490,41 @@ UNAME_VERSION=3D # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=3Dmips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=3Dvax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=3Dclipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -526,78 +549,79 @@ UNAME_VERSION=3D } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=3D$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') &&= - SYSTEM_NAME=3D$("$dummy" "$dummyarg") && + dummyarg=3D`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=3D`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=3Dpowerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=3Dpowerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=3Dpowerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=3Dpowerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=3Dm88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=3Dm88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=3Dm88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=3D$(/usr/bin/uname -p) + UNAME_PROCESSOR=3D`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" =3D mc88100 || test "$UNAME_PROCESSOR" =3D m= c88110 then if test "$TARGET_BINARY_INTERFACE"x =3D m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x =3D x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=3Dm88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=3Dm88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=3Di586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=3Dm88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=3Dm88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=3Dm88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)= - echo m68k-tektronix-bsd - exit ;; + GUESS=3Dm68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" - exit ;; + IRIX_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=3Dmips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' + GUESS=3Dromp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=3Di386-ibm-aix + ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=3D$(/usr/bin/oslevel) + IBM_REV=3D`/usr/bin/oslevel` else - IBM_REV=3D"$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=3D$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=3D$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -612,68 +636,68 @@ main() exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D$("$dummy") + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=3D$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=3Drs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=3Drs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=3Drs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) - IBM_CPU_ID=3D$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | = awk '{ print $1 }') + IBM_CPU_ID=3D`/usr/sbin/lsdev -C -c processor -S available | sed 1q | a= wk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; = then IBM_ARCH=3Drs6000 else IBM_ARCH=3Dpowerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=3D$(/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + IBM_REV=3D`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV=3D"$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=3D$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=3D$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=3Drs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=3Dromp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=3Dromp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=3Drs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=3Dm68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=3Dm68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=3Dm68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=3D$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - case "$UNAME_MACHINE" in + HPUX_REV=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=3Dm68000 ;; 9000/[34]??) HP_ARCH=3Dm68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then - sc_cpu_version=3D$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) - sc_kernel_bits=3D$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) - case "$sc_cpu_version" in + sc_cpu_version=3D`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=3D`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in 523) HP_ARCH=3Dhppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=3Dhppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=3Dhppa2.0n ;; 64) HP_ARCH=3Dhppa2.0w ;; '') HP_ARCH=3Dhppa2.0 ;; # HP-UX 10.20 @@ -715,7 +739,7 @@ main() exit (0); } EOF - (CCOPTS=3D"" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && = HP_ARCH=3D$("$dummy") + (CCOPTS=3D"" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && = HP_ARCH=3D`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=3Dhppa fi ;; esac @@ -740,12 +764,12 @@ main() HP_ARCH=3Dhppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=3D$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=3D$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=3Dia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -773,38 +797,38 @@ main () exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D$("$dummy") && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=3D`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=3Dunknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=3Dhppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=3Dhppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=3Dhppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=3Dhppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=3Dhppa1.0-hp-osf + ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + GUESS=3D$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=3D$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=3Dhppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=3Dc1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -812,17 +836,18 @@ main () fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=3Dc34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=3Dc38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=3Dc4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -830,114 +855,126 @@ main () -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dt90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dalphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dsv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=3Dcraynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=3D$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklm= nopqrstuvwxyz) - FUJITSU_SYS=3D$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmn= opqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=3D$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=3D`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmn= opqrstuvwxyz` + FUJITSU_SYS=3D`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmno= pqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=3D${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=3D$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmn= opqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=3D$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ a= bcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=3D`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmno= pqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=3D`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ ab= cdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=3Dsparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=3Dsparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=3D$(uname -p) + UNAME_PROCESSOR=3D`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|s= ed -e 's/[-(].*//')"-gnueabi + FREEBSD_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|s= ed -e 's/[-(].*//')"-gnueabihf + FREEBSD_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=3D$(/usr/bin/uname -p) - case "$UNAME_PROCESSOR" in + UNAME_PROCESSOR=3D`/usr/bin/uname -p` + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=3Dx86_64 ;; i386) UNAME_PROCESSOR=3Di586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e = 's/[-(].*//')" - exit ;; + FREEBSD_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=3D$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=3D$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=3D$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=3D$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=3D$UNAME_MACHINE-pc-pw32 + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=3Di586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=3Dx86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=3Dia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=3D$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=3Dx86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*= //')" - exit ;; + SUN_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=3Dpowerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo= "$UNAME_RELEASE"|sed -e 's,/.*$,,')" - exit ;; + GNU_ARCH=3D`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=3D`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=3D$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,'= | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'= )-$LIBC" - exit ;; + GNU_SYS=3D`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[= :lower:]"` + GNU_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=3Daarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/nul= l) in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null= ` in EV5) UNAME_MACHINE=3Dalphaev5 ;; EV56) UNAME_MACHINE=3Dalphaev56 ;; PCA56) UNAME_MACHINE=3Dalphapca56 ;; @@ -948,63 +985,63 @@ main () esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" =3D 0 ; then LIBC=3Dgnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)= + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=3D$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=3D$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*= :*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=3D0 @@ -1049,65 +1086,66 @@ main () #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_END= IAN\|^LIBCABI')" + cc_set_vars=3D`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^M= IPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" !=3D x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCAB= I"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dor1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dsparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dhppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) i= n - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in= + PA7*) GUESS=3Dhppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=3Dhppa2.0-unknown-linux-$LIBC ;; + *) GUESS=3Dhppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; + GUESS=3Dpowerpcle-unknown-linux-$LIBC + ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv6= 4be:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=3D$LIBC @@ -1116,71 +1154,71 @@ main () (CCOPTS=3D"" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then - LIBCABI=3D"$LIBC"x32 + LIBCABI=3D${LIBC}x32 fi fi - echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=3Di386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=3D$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=3D$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=3D$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Di386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=3D$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) - UNAME_REL=3D$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + UNAME_REL=3D`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=3D$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=3D$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case $(/bin/uname -X | grep "^Machine") in + case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=3Di486 ;; *Pentium) UNAME_MACHINE=3Di586 ;; *Pent*|*Celeron) UNAME_MACHINE=3Di686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME= _VERSION}" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNA= ME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=3D$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=3D$( (/bin/uname -X|grep Release|sed -e 's/.*=3D //')) + UNAME_REL=3D`(/bin/uname -X|grep Release|sed -e 's/.*=3D //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=3Di486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=3Di586 @@ -1188,11 +1226,11 @@ main () && UNAME_MACHINE=3Di686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=3Di686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=3D$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=3D$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1200,37 +1238,37 @@ main () # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=3Di586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=3Di386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=3Di860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=3Di860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SV= R4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=3Di860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=3Dm68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=3Dm68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=3Dm68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34= ]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS= 2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL=3D'' test -r /etc/.relid \ - && OS_REL=3D.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.rel= id) + && OS_REL=3D.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.reli= d` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1241,7 +1279,7 @@ main () NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL=3D'.3' test -r /etc/.relid \ - && OS_REL=3D.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/= =2Erelid) + && OS_REL=3D.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.= relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1249,118 +1287,118 @@ main () /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=3Dm68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Dsparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Drs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[= 02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=3Dmips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=3Dmips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=3D$( (uname -p) 2>/dev/null) - echo "$UNAME_MACHINE"-sni-sysv4 + UNAME_MACHINE=3D`(uname -p) 2>/dev/null` + GUESS=3D$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=3Dns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=3Di586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=3Dhppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=3Di860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=3D$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=3Dhppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=3Dm68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=3Dmips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then - echo mips-nec-sysv"$UNAME_RELEASE" + GUESS=3Dmips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=3Dmips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=3Dpowerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=3Dpowerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=3Di586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=3Di586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=3Dx86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=3Dsxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=3Dpowerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; arm64:Darwin:*:*) - echo aarch64-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=3Daarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=3D$(uname -p) + UNAME_PROCESSOR=3D`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=3Dpowerpc ;; esac @@ -1394,109 +1432,116 @@ main () # uname -m returns i386 or x86_64 UNAME_PROCESSOR=3D$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=3D$(uname -p) + UNAME_PROCESSOR=3D`uname -p` if test "$UNAME_PROCESSOR" =3D x86; then UNAME_PROCESSOR=3Di386 UNAME_MACHINE=3Dpc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=3Di386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dneo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=3Dnsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=3Dmips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=3Dbs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=3DSC2154 - if test "$cputype" =3D 386; then + if test "${cputype-}" =3D 386; then UNAME_MACHINE=3Di386 - else - UNAME_MACHINE=3D"$cputype" + elif test "x${cputype-}" !=3D x; then + UNAME_MACHINE=3D$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=3Dpdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=3Dpdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=3Dpdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=3Dpdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=3Dpdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=3Dpdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=3Dmips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e = 's/[-(].*//')" - exit ;; + DRAGONFLY_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=3D$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) - UNAME_MACHINE=3D$( (uname -p) 2>/dev/null) - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + UNAME_MACHINE=3D`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=3Dalpha-dec-vms ;; + I*) GUESS=3Dia64-dec-vms ;; + V*) GUESS=3Dvax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=3Di386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$= //')" - exit ;; + SKYOS_REL=3D`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=3D$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; - i*86:AROS:*:*) - echo "$UNAME_MACHINE"-pc-aros - exit ;; + GUESS=3D$UNAME_MACHINE-pc-rdos + ;; + *:AROS:*:*) + GUESS=3D$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=3Dx86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=3D$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac =20 +# Do we have a guess based on uname results? +if test "x$GUESS" !=3D x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" </= dev/null); + version=3D`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/de= v/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1628,7 +1673,7 @@ main () } EOF =20 -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=3D$($dum= my) && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=3D`"$dum= my"` && { echo "$SYSTEM_NAME"; exit; } =20 # Apollos put the system type in the environment. @@ -1636,7 +1681,7 @@ main () =20 echo "$0: unable to guess system type" >&2 =20 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 </dev/null || echo unknown) -uname -r =3D $( (uname -r) 2>/dev/null || echo unknown) -uname -s =3D $( (uname -s) 2>/dev/null || echo unknown) -uname -v =3D $( (uname -v) 2>/dev/null || echo unknown) +uname -m =3D `(uname -m) 2>/dev/null || echo unknown` +uname -r =3D `(uname -r) 2>/dev/null || echo unknown` +uname -s =3D `(uname -s) 2>/dev/null || echo unknown` +uname -v =3D `(uname -v) 2>/dev/null || echo unknown` =20 -/usr/bin/uname -p =3D $( (/usr/bin/uname -p) 2>/dev/null) -/bin/uname -X =3D $( (/bin/uname -X) 2>/dev/null) +/usr/bin/uname -p =3D `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X =3D `(/bin/uname -X) 2>/dev/null` =20 -hostinfo =3D $( (hostinfo) 2>/dev/null) -/bin/universe =3D $( (/bin/universe) 2>/dev/null) -/usr/bin/arch -k =3D $( (/usr/bin/arch -k) 2>/dev/null) -/bin/arch =3D $( (/bin/arch) 2>/dev/null) -/usr/bin/oslevel =3D $( (/usr/bin/oslevel) 2>/dev/null) -/usr/convex/getsysinfo =3D $( (/usr/convex/getsysinfo) 2>/dev/null) +hostinfo =3D `(hostinfo) 2>/dev/null` +/bin/universe =3D `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k =3D `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch =3D `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel =3D `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo =3D `(/usr/convex/getsysinfo) 2>/dev/null` =20 UNAME_MACHINE =3D "$UNAME_MACHINE" UNAME_RELEASE =3D "$UNAME_RELEASE" diff --git a/build-aux/config.sub b/build-aux/config.sub index b0f8492348..d80c5d759e 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -2,7 +2,9 @@ # Configuration validation subroutine script. # Copyright 1992-2021 Free Software Foundation, Inc. =20 -timestamp=3D'2021-01-07' +# shellcheck disable=3DSC2006,SC2268 # see below for rationale + +timestamp=3D'2021-07-03' =20 # 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 @@ -50,7 +52,14 @@ timestamp=3D # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. =20 -me=3D$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide= +# variety of pre-POSIX systems that do not have POSIX shells at all, and= +# even some reasonably current systems (Solaris 10 as case-in-point) sti= ll +# have a pre-POSIX /bin/sh. + +me=3D`echo "$0" | sed -e 's,.*/,,'` =20 usage=3D"\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -769,22 +778,22 @@ IFS=3D vendor=3Dhp ;; i*86v32) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsysv32 ;; i*86v4*) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsysv4 ;; i*86v) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsysv ;; i*86sol2) - cpu=3D$(echo "$1" | sed -e 's/86.*/86/') + cpu=3D`echo "$1" | sed -e 's/86.*/86/'` vendor=3Dpc basic_os=3Dsolaris2 ;; @@ -917,7 +926,7 @@ IFS=3D ;; leon-*|leon[3-9]-*) cpu=3Dsparc - vendor=3D$(echo "$basic_machine" | sed 's/-.*//') + vendor=3D`echo "$basic_machine" | sed 's/-.*//'` ;; =20 *-*) @@ -1084,7 +1093,7 @@ IFS=3D cpu=3Dmipsisa64sb1el ;; sh5e[lb]-*) - cpu=3D$(echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/') + cpu=3D`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'` ;; spur-*) cpu=3Dspur @@ -1102,7 +1111,7 @@ IFS=3D cpu=3Dx86_64 ;; xscale-* | xscalee[bl]-*) - cpu=3D$(echo "$cpu" | sed 's/^xscale/arm/') + cpu=3D`echo "$cpu" | sed 's/^xscale/arm/'` ;; arm64-*) cpu=3Daarch64 @@ -1165,7 +1174,7 @@ IFS=3D | alphapca5[67] | alpha64pca5[67] \ | am33_2.0 \ | amdgcn \ - | arc | arceb \ + | arc | arceb | arc32 | arc64 \ | arm | arm[lb]e | arme[lb] | armv* \ | avr | avr32 \ | asmjs \ @@ -1204,9 +1213,13 @@ IFS=3D | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r3 | mipsisa32r3el \ + | mipsisa32r5 | mipsisa32r5el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r3 | mipsisa64r3el \ + | mipsisa64r5 | mipsisa64r5el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ @@ -1288,15 +1301,15 @@ IFS=3D case $basic_os in gnu/linux*) kernel=3Dlinux - os=3D$(echo $basic_os | sed -e 's|gnu/linux|gnu|') + os=3D`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'` ;; os2-emx) kernel=3Dos2 - os=3D$(echo $basic_os | sed -e 's|os2-emx|emx|') + os=3D`echo "$basic_os" | sed -e 's|os2-emx|emx|'` ;; nto-qnx*) kernel=3Dnto - os=3D$(echo $basic_os | sed -e 's|nto-qnx|qnx|') + os=3D`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'` ;; *-*) # shellcheck disable=3DSC2162 @@ -1307,11 +1320,11 @@ IFS=3D # Default OS when just kernel was specified nto*) kernel=3Dnto - os=3D$(echo $basic_os | sed -e 's|nto|qnx|') + os=3D`echo "$basic_os" | sed -e 's|nto|qnx|'` ;; linux*) kernel=3Dlinux - os=3D$(echo $basic_os | sed -e 's|linux|gnu|') + os=3D`echo "$basic_os" | sed -e 's|linux|gnu|'` ;; *) kernel=3D @@ -1332,7 +1345,7 @@ IFS=3D os=3Dcnk ;; solaris1 | solaris1.*) - os=3D$(echo $os | sed -e 's|solaris1|sunos4|') + os=3D`echo "$os" | sed -e 's|solaris1|sunos4|'` ;; solaris) os=3Dsolaris2 @@ -1361,7 +1374,7 @@ IFS=3D os=3Dsco3.2v4 ;; sco3.2.[4-9]*) - os=3D$(echo $os | sed -e 's/sco3.2./sco3.2v/') + os=3D`echo "$os" | sed -e 's/sco3.2./sco3.2v/'` ;; sco*v* | scout) # Don't match below @@ -1391,7 +1404,7 @@ IFS=3D os=3Dlynxos ;; mac[0-9]*) - os=3D$(echo "$os" | sed -e 's|mac|macos|') + os=3D`echo "$os" | sed -e 's|mac|macos|'` ;; opened*) os=3Dopenedition @@ -1400,10 +1413,10 @@ IFS=3D os=3Dos400 ;; sunos5*) - os=3D$(echo "$os" | sed -e 's|sunos5|solaris2|') + os=3D`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; sunos6*) - os=3D$(echo "$os" | sed -e 's|sunos6|solaris3|') + os=3D`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; wince*) os=3Dwince @@ -1437,7 +1450,7 @@ IFS=3D ;; # Preserve the version number of sinix5. sinix5.*) - os=3D$(echo $os | sed -e 's|sinix|sysv|') + os=3D`echo "$os" | sed -e 's|sinix|sysv|'` ;; sinix*) os=3Dsysv4 @@ -1683,12 +1696,15 @@ kernel=3D =20 # Now, validate our (potentially fixed-up) OS. case $os in - # Sometimes we do "kernel-abi", so those need to count as OSes. + # Sometimes we do "kernel-libc", so those need to count as OSes. musl* | newlib* | uclibc*) ;; - # Likewise for "kernel-libc" + # Likewise for "kernel-abi" eabi* | gnueabi*) ;; + # VxWorks passes extra cpu info in the 4th filed. + simlinux | simwindows | spe) + ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. @@ -1704,12 +1720,12 @@ kernel=3D | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \ | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \ | mirbsd* | netbsd* | dicos* | openedition* | ose* \ - | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \ + | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* = \ | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \ | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \ | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \ | udi* | lites* | ieee* | go32* | aux* | hcos* \ - | chorusrdb* | cegcc* | glidix* \ + | chorusrdb* | cegcc* | glidix* | serenity* \ | cygwin* | msys* | pe* | moss* | proelf* | rtems* \ | midipix* | mingw32* | mingw64* | mint* \ | uxpv* | beos* | mpeix* | udk* | moxiebox* \ @@ -1751,6 +1767,8 @@ kernel=3D ;; kfreebsd*-gnu* | kopensolaris*-gnu*) ;; + vxworks-simlinux | vxworks-simwindows | vxworks-spe) + ;; nto-qnx*) ;; os2-emx) diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelo= g index de76f658d4..9ff15f6019 100755 --- a/build-aux/gitlog-to-changelog +++ b/build-aux/gitlog-to-changelog @@ -35,7 +35,7 @@ eval 'exec perl -wSx "$0" "$@"' if 0; =20 -my $VERSION =3D '2020-04-04 15:07'; # UTC +my $VERSION =3D '2021-02-24 23:42'; # UTC # The definition above must lie within the first 8 lines in order # for the Emacs time-stamp write hook (at end) to update it. # If you change this file with Emacs, please let the write hook @@ -455,7 +455,8 @@ sub git_dir_option($) # If there were any lines if (@line =3D=3D 0) { - warn "$ME: warning: empty commit message:\n $date_line\n"= ; + warn "$ME: warning: empty commit message:\n" + . " commit $sha\n $date_line\n"; } else { diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index a91181b116..e48383defc 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,9 +3,9 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2020-11-25.18} +\def\texinfoversion{2021-04-25.21} % -% Copyright 1985, 1986, 1988, 1990-2020 Free Software Foundation, Inc. +% Copyright 1985, 1986, 1988, 1990-2021 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or= % modify it under the terms of the GNU General Public License as @@ -574,7 +574,7 @@ =20 =20 % @end foo calls \checkenv and executes the definition of \Efoo. -\parseargdef\end{ +\parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. @@ -1002,6 +1002,14 @@ \global\everypar =3D {}% } =20 +% leave vertical mode without cancelling any first paragraph indent +\gdef\imageindent{% + \toks0=3D\everypar + \everypar=3D{}% + \ptexnoindent + \global\everypar=3D\toks0 +} + =20 % @refill is a no-op. \let\refill=3D\relax @@ -1181,7 +1189,7 @@ % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % -% See https://mailman.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html = and +% See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to @@ -1862,19 +1870,23 @@ \closein 1 \endgroup % - \def\xetexpdfext{pdf}% - \ifx\xeteximgext\xetexpdfext - \XeTeXpdffile "#1".\xeteximgext "" - \else - \def\xetexpdfext{PDF}% + % Putting an \hbox around the image can prevent an over-long line + % after the image. + \hbox\bgroup + \def\xetexpdfext{pdf}% \ifx\xeteximgext\xetexpdfext \XeTeXpdffile "#1".\xeteximgext "" \else - \XeTeXpicfile "#1".\xeteximgext "" + \def\xetexpdfext{PDF}% + \ifx\xeteximgext\xetexpdfext + \XeTeXpdffile "#1".\xeteximgext "" + \else + \XeTeXpicfile "#1".\xeteximgext "" + \fi \fi - \fi - \ifdim \wd0 >0pt width \xeteximagewidth \fi - \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + \ifdim \wd0 >0pt width \xeteximagewidth \fi + \ifdim \wd2 >0pt height \xeteximageheight \fi \relax + \egroup } \fi =20 @@ -3539,7 +3551,7 @@ % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need).= -% It is available from https://www.ctan.org/tex-archive/fonts/eurosym. +% It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular @@ -4289,82 +4301,8 @@ \doitemize{#1.}\flushcr } =20 -% @alphaenumerate and @capsenumerate are abbreviations for giving an arg= -% to @enumerate. -% -\def\alphaenumerate{\enumerate{a}} -\def\capsenumerate{\enumerate{A}} -\def\Ealphaenumerate{\Eenumerate} -\def\Ecapsenumerate{\Eenumerate} - =20 % @multitable macros -% Amy Hendrickson, 8/18/94, 3/6/96 -% -% @multitable ... @end multitable will make as many columns as desired. -% Contents of each column will wrap at width given in preamble. Width -% can be specified either with sample text given in a template line, -% or in percent of \hsize, the current width of text on page. - -% Table can continue over pages but will only break between lines. - -% To make preamble: -% -% Either define widths of columns in terms of percent of \hsize: -% @multitable @columnfractions .25 .3 .45 -% @item ... -% -% Numbers following @columnfractions are the percent of the total -% current hsize to be used for each column. You may use as many -% columns as desired. - - -% Or use a template: -% @multitable {Column 1 template} {Column 2 template} {Column 3 templa= te} -% @item ... -% using the widest term desired in each column. - -% Each new table line starts with @item, each subsequent new column -% starts with @tab. Empty columns may be produced by supplying @tab's -% with nothing between them for as many times as empty columns are neede= d, -% ie, @tab@tab@tab will produce two empty columns. - -% @item, @tab do not need to be on their own lines, but it will not hurt= -% if they are. - -% Sample multitable: - -% @multitable {Column 1 template} {Column 2 template} {Column 3 templa= te} -% @item first col stuff @tab second col stuff @tab third col -% @item -% first col stuff -% @tab -% second col stuff -% @tab -% third col -% @item first col stuff @tab second col stuff -% @tab Many paragraphs of text may be used in any column. -% -% They will wrap at the width determined by the template. -% @item@tab@tab This will be in third column. -% @end multitable - -% Default dimensions may be reset by user. -% @multitableparskip is vertical space between paragraphs in table. -% @multitableparindent is paragraph indent in table. -% @multitablecolmargin is horizontal space to be left between columns. -% @multitablelinespace is space to leave between table items, baseline -% to baseline= =2E -% 0pt means it depends on current normal line spacing. -% -\newskip\multitableparskip -\newskip\multitableparindent -\newdimen\multitablecolspace -\newskip\multitablelinespace -\multitableparskip=3D0pt -\multitableparindent=3D6pt -\multitablecolspace=3D12pt -\multitablelinespace=3D0pt =20 % Macros used to set up halign preamble: % @@ -4412,8 +4350,6 @@ \go } =20 -% multitable-only commands. -% % @headitem starts a heading row, which we typeset in bold. Assignments= % have to be global since we are inside the implicit group of an % alignment entry. \everycr below resets \everytab so we don't have to @@ -4430,14 +4366,8 @@ % default for tables with no headings. \let\headitemcrhook=3D\relax % -% A \tab used to include \hskip1sp. But then the space in a template -% line is not enough. That is bad. So let's go back to just `&' until -% we again encounter the problem the 1sp was intended to solve. -% --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% =20 -% @multitable ... @end multitable definitions: -% \newtoks\everytab % insert after every tab. % \envdef\multitable{% @@ -4452,9 +4382,8 @@ % \tolerance=3D9500 \hbadness=3D9500 - \setmultitablespacing - \parskip=3D\multitableparskip - \parindent=3D\multitableparindent + \parskip=3D0pt + \parindent=3D6pt \overfullrule=3D0pt \global\colcount=3D0 % @@ -4484,47 +4413,24 @@ % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 - \multistrut + \strut \vtop{% - % Use the current \colcount to find the correct column width: + \advance\hsize by -1\leftskip + % Find the correct column width \hsize=3D\expandafter\csname col\the\colcount\endcsname % - % In order to keep entries from bumping into each other - % we will add a \leftskip of \multitablecolspace to all columns af= ter - % the first one. - % - % If a template has been used, we will add \multitablecolspace - % to the width of each template entry. - % - % If the user has set preamble in terms of percent of \hsize we wi= ll - % use that dimension as the width of the column, and the \leftskip= - % will keep entries from bumping into each other. Table will star= t at - % left margin and final column will justify at right margin. - % - % Make sure we don't inherit \rightskip from the outer environment= =2E \rightskip=3D0pt \ifnum\colcount=3D1 - % The first column will be indented with the surrounding text. - \advance\hsize by\leftskip + \advance\hsize by\leftskip % Add indent of surrounding text \else - \ifsetpercent \else - % If user has not set preamble in terms of percent of \hsize - % we will advance \hsize by \multitablecolspace. - \advance\hsize by \multitablecolspace - \fi - % In either case we will make \leftskip=3D\multitablecolspace: - \leftskip=3D\multitablecolspace + % In order to keep entries from bumping into each other. + \leftskip=3D12pt + \ifsetpercent \else + % If a template has been used + \advance\hsize by \leftskip + \fi \fi - % Ignoring space at the beginning and end avoids an occasional spu= rious - % blank line, when TeX decides to break the line at the space befo= re the - % box from the multistrut, so the strut ends up on a line by itsel= f. - % For example: - % @multitable @columnfractions .11 .89 - % @item @code{#} - % @tab Legal holiday which is valid in major parts of the whole co= untry. - % Is automatically provided with highlighting sequences respective= ly - % marking characters. - \noindent\ignorespaces##\unskip\multistrut + \noindent\ignorespaces##\unskip\strut }\cr } \def\Emultitable{% @@ -4533,31 +4439,6 @@ \global\setpercentfalse } =20 -\def\setmultitablespacing{% - \def\multistrut{\strut}% just use the standard line spacing - % - % Compute \multitablelinespace (if not defined by user) for use in - % \multitableparskip calculation. We used define \multistrut based on= - % this, but (ironically) that caused the spacing to be off. - % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +01= 00. -\ifdim\multitablelinespace=3D0pt -\setbox0=3D\vbox{X}\global\multitablelinespace=3D\the\baselineskip -\global\advance\multitablelinespace by-\ht0 -\fi -% Test to see if parskip is larger than space between lines of -% table. If not, do nothing. -% If so, set to same dimension as multitablelinespace. -\ifdim\multitableparskip>\multitablelinespace -\global\multitableparskip=3D\multitablelinespace -\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller= - % than skip between lines in the t= able. -\fi% -\ifdim\multitableparskip=3D0pt -\global\multitableparskip=3D\multitablelinespace -\global\advance\multitableparskip-7pt % to keep parskip somewhat smaller= - % than skip between lines in the t= able. -\fi} - =20 \message{conditionals,} =20 @@ -5171,30 +5052,29 @@ \let\lbracechar\{% \let\rbracechar\}% % + % Non-English letters. + \def\AA{AA}% + \def\AE{AE}% + \def\DH{DZZ}% + \def\L{L}% + \def\OE{OE}% + \def\O{O}% + \def\TH{TH}% + \def\aa{aa}% + \def\ae{ae}% + \def\dh{dzz}% + \def\exclamdown{!}% + \def\l{l}% + \def\oe{oe}% + \def\ordf{a}% + \def\ordm{o}% + \def\o{o}% + \def\questiondown{?}% + \def\ss{ss}% + \def\th{th}% % \let\do\indexnofontsdef % - % Non-English letters. - \do\AA{AA}% - \do\AE{AE}% - \do\DH{DZZ}% - \do\L{L}% - \do\OE{OE}% - \do\O{O}% - \do\TH{TH}% - \do\aa{aa}% - \do\ae{ae}% - \do\dh{dzz}% - \do\exclamdown{!}% - \do\l{l}% - \do\oe{oe}% - \do\ordf{a}% - \do\ordm{o}% - \do\o{o}% - \do\questiondown{?}% - \do\ss{ss}% - \do\th{th}% - % \do\LaTeX{LaTeX}% \do\TeX{TeX}% % @@ -8931,7 +8811,7 @@ \else \ifhavexrefs % We (should) know the real title if we have the xref values. - \def\printedrefname{\refx{#1-title}{}}% + \def\printedrefname{\refx{#1-title}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% @@ -9025,7 +8905,7 @@ % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox =3D 0pt - \refx{#1-snt}{}% + \refx{#1-snt}% \else \printedrefname \fi @@ -9060,9 +8940,9 @@ \else % Reference within this manual. % - % Only output a following space if the -snt ref is nonempty; for - % @unnumbered and @anchor, it won't be. - \setbox2 =3D \hbox{\ignorespaces \refx{#1-snt}{}}% + % Only output a following space if the -snt ref is nonempty, as th= e ref + % will be empty for @unnumbered and @anchor. + \setbox2 =3D \hbox{\ignorespaces \refx{#1-snt}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi % % output the `[mynode]' via the macro below so it can be overridde= n. @@ -9073,7 +8953,7 @@ ,\space % % output the `page 3'. - \turnoffactive \putwordpage\tie\refx{#1-pg}{}% + \turnoffactive \putwordpage\tie\refx{#1-pg}% % Add a , if xref followed by a space \if\space\noexpand\tokenafterxref ,% \else\ifx\ \tokenafterxref ,% @TAB @@ -9150,9 +9030,8 @@ \fi\fi\fi } =20 -% \refx{NAME}{SUFFIX} - reference a cross-reference string named NAME. = SUFFIX -% is output afterwards if non-empty. -\def\refx#1#2{% +% \refx{NAME} - reference a cross-reference string named NAME. +\def\refx#1{% \requireauxfile {% \indexnofonts @@ -9179,7 +9058,6 @@ % It's defined, so just use it. \thisrefX \fi - #2% Output the suffix in any case. } =20 % This is the macro invoked by entries in the aux file. Define a contro= l @@ -9289,10 +9167,10 @@ \catcode`\[=3D\other \catcode`\]=3D\other \catcode`\"=3D\other - \catcode`\_=3D\other - \catcode`\|=3D\other - \catcode`\<=3D\other - \catcode`\>=3D\other + \catcode`\_=3D\active + \catcode`\|=3D\active + \catcode`\<=3D\active + \catcode`\>=3D\active \catcode`\$=3D\other \catcode`\#=3D\other \catcode`\&=3D\other @@ -9539,7 +9417,7 @@ % On the other hand, if we are in the case of @center @image, we don't= % want to start a paragraph, which will create a hsize-width box and % eradicate the centering. - \ifx\centersub\centerV\else \noindent \fi + \ifx\centersub\centerV \else \imageindent \fi % % Output the image. \ifpdf @@ -11731,3 +11609,4 @@ @c vim:sw=3D2: =20 @enablebackslashhack + diff --git a/lib/_Noreturn.h b/lib/_Noreturn.h index fb718bc069..cb72f26206 100644 --- a/lib/_Noreturn.h +++ b/lib/_Noreturn.h @@ -2,16 +2,16 @@ Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _Noreturn diff --git a/lib/alloca.in.h b/lib/alloca.in.h index 0a6137e037..65c2d4d939 100644 --- a/lib/alloca.in.h +++ b/lib/alloca.in.h @@ -3,20 +3,18 @@ Copyright (C) 1995, 1999, 2001-2004, 2006-2021 Free Software Foundati= on, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3, or (at your option= ) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with this program; if not, see - . - */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H means there is a real alloca function. */ diff --git a/lib/allocator.c b/lib/allocator.c index 2c1a3da03a..2262de9ff3 100644 --- a/lib/allocator.c +++ b/lib/allocator.c @@ -1,3 +1,20 @@ +/* Memory allocators such as malloc+free. + + Copyright (C) 2011-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #define _GL_USE_STDLIB_ALLOC 1 #include #include "allocator.h" diff --git a/lib/allocator.h b/lib/allocator.h index cfa0535774..f0e8f34896 100644 --- a/lib/allocator.h +++ b/lib/allocator.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/arg-nonnull.h b/lib/arg-nonnull.h index 5b81b50a87..b4de241e90 100644 --- a/lib/arg-nonnull.h +++ b/lib/arg-nonnull.h @@ -2,16 +2,16 @@ Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer too= ls diff --git a/lib/attribute.h b/lib/attribute.h index 82245279eb..6d3c04c070 100644 --- a/lib/attribute.h +++ b/lib/attribute.h @@ -2,17 +2,17 @@ =20 Copyright 2020-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/binary-io.c b/lib/binary-io.c index f2678972ef..adc0ae2b0c 100644 --- a/lib/binary-io.c +++ b/lib/binary-io.c @@ -1,17 +1,17 @@ /* Binary mode I/O. Copyright 2017-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/binary-io.h b/lib/binary-io.h index 8654fd2d39..0fa8d546f1 100644 --- a/lib/binary-io.h +++ b/lib/binary-io.h @@ -1,17 +1,17 @@ /* Binary mode I/O. Copyright (C) 2001, 2003, 2005, 2008-2021 Free Software Foundation, I= nc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _BINARY_H diff --git a/lib/byteswap.in.h b/lib/byteswap.in.h index 2b7d5abe1b..113f878027 100644 --- a/lib/byteswap.in.h +++ b/lib/byteswap.in.h @@ -2,17 +2,17 @@ Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. Written by Oskar Liljeblad , 2005. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _GL_BYTESWAP_H diff --git a/lib/c++defs.h b/lib/c++defs.h index 39df1bc76b..a47b61a009 100644 --- a/lib/c++defs.h +++ b/lib/c++defs.h @@ -2,16 +2,16 @@ Copyright (C) 2010-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _GL_CXXDEFS_H diff --git a/lib/c-ctype.c b/lib/c-ctype.c index 5d9d4d87a6..300f97c292 100644 --- a/lib/c-ctype.c +++ b/lib/c-ctype.c @@ -1,3 +1,21 @@ +/* Character handling in C locale. + + Copyright (C) 2003-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define C_CTYPE_INLINE _GL_EXTERN_INLINE #include "c-ctype.h" diff --git a/lib/c-ctype.h b/lib/c-ctype.h index bf24a88310..3a652ac1f2 100644 --- a/lib/c-ctype.h +++ b/lib/c-ctype.h @@ -7,18 +7,18 @@ =20 Copyright (C) 2000-2003, 2006, 2008-2021 Free Software Foundation, In= c. =20 -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, see . *= / + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef C_CTYPE_H #define C_CTYPE_H diff --git a/lib/c-strcase.h b/lib/c-strcase.h index 089edfe7eb..82f99bb06b 100644 --- a/lib/c-strcase.h +++ b/lib/c-strcase.h @@ -2,18 +2,18 @@ Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef C_STRCASE_H #define C_STRCASE_H diff --git a/lib/c-strcasecmp.c b/lib/c-strcasecmp.c index 55479d6a33..3c22455082 100644 --- a/lib/c-strcasecmp.c +++ b/lib/c-strcasecmp.c @@ -1,18 +1,18 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/c-strncasecmp.c b/lib/c-strncasecmp.c index 02bc0f2ecd..f3ca786cb3 100644 --- a/lib/c-strncasecmp.c +++ b/lib/c-strncasecmp.c @@ -1,18 +1,18 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale Copyright (C) 1998-1999, 2005-2006, 2009-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/canonicalize-lgpl.c b/lib/canonicalize-lgpl.c index b7dba08994..c6fef174c4 100644 --- a/lib/canonicalize-lgpl.c +++ b/lib/canonicalize-lgpl.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -21,7 +21,6 @@ optimizes away the name =3D=3D NULL test below. */ # define _GL_ARG_NONNULL(params) =20 -# define _GL_USE_STDLIB_ALLOC 1 # include #endif =20 @@ -76,6 +75,12 @@ # define __rawmemchr rawmemchr # define __readlink readlink # define __stat stat +# if IN_RELOCWRAPPER + /* When building the relocatable program wrapper, use the system's m= emmove + function, not the gnulib override, otherwise we would get a link = error. + */ +# undef memmove +# endif #endif =20 /* Suppress bogus GCC -Wmaybe-uninitialized warnings. */ diff --git a/lib/careadlinkat.c b/lib/careadlinkat.c index 18cfc114b6..9d0c125ecb 100644 --- a/lib/careadlinkat.c +++ b/lib/careadlinkat.c @@ -3,17 +3,17 @@ Copyright (C) 2001, 2003-2004, 2007, 2009-2021 Free Software Foundati= on, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ @@ -22,6 +22,9 @@ =20 #include "careadlinkat.h" =20 +#include "idx.h" +#include "minmax.h" + #include #include #include @@ -65,11 +68,6 @@ readlink_stk (int fd, char const *filename, ssize_t (*preadlinkat) (int, char const *, char *, size_t)= , char stack_buf[STACK_BUF_SIZE]) { - char *buf; - size_t buf_size; - size_t buf_size_max =3D - SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; - if (! alloc) alloc =3D &stdlib_allocator; =20 @@ -79,14 +77,14 @@ readlink_stk (int fd, char const *filename, buffer_size =3D STACK_BUF_SIZE; } =20 - buf =3D buffer; - buf_size =3D buffer_size; + char *buf =3D buffer; + idx_t buf_size_max =3D MIN (IDX_MAX, MIN (SSIZE_MAX, SIZE_MAX)); + idx_t buf_size =3D MIN (buffer_size, buf_size_max); =20 while (buf) { /* Attempt to read the link into the current buffer. */ - ssize_t link_length =3D preadlinkat (fd, filename, buf, buf_size);= - size_t link_size; + idx_t link_length =3D preadlinkat (fd, filename, buf, buf_size); if (link_length < 0) { if (buf !=3D buffer) @@ -98,7 +96,7 @@ readlink_stk (int fd, char const *filename, return NULL; } =20 - link_size =3D link_length; + idx_t link_size =3D link_length; =20 if (link_size < buf_size) { @@ -127,17 +125,13 @@ readlink_stk (int fd, char const *filename, if (buf !=3D buffer) alloc->free (buf); =20 - if (buf_size < buf_size_max / 2) - buf_size =3D 2 * buf_size + 1; - else if (buf_size < buf_size_max) - buf_size =3D buf_size_max; - else if (buf_size_max < SIZE_MAX) + if (buf_size_max / 2 <=3D buf_size) { errno =3D ENAMETOOLONG; return NULL; } - else - break; + + buf_size =3D 2 * buf_size + 1; buf =3D alloc->allocate (buf_size); } =20 diff --git a/lib/careadlinkat.h b/lib/careadlinkat.h index c506fac3cb..a3517b827a 100644 --- a/lib/careadlinkat.h +++ b/lib/careadlinkat.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ diff --git a/lib/cdefs.h b/lib/cdefs.h index 17a0919cd8..b883b25666 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -2,16 +2,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -259,10 +259,12 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) # define __attribute_const__ /* Ignore */ #endif =20 -#if defined __STDC_VERSION__ && 201710L < __STDC_VERSION__ -# define __attribute_maybe_unused__ [[__maybe_unused__]] -#elif __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) +#if __GNUC_PREREQ (2,7) || __glibc_has_attribute (__unused__) # define __attribute_maybe_unused__ __attribute__ ((__unused__)) +/* Once the next version of the C standard comes out, we can + do something like the following here: + #elif defined __STDC_VERSION__ && 202???L <=3D __STDC_VERSION__ + # define __attribute_maybe_unused__ [[__maybe_unused__]] */ #else # define __attribute_maybe_unused__ /* Ignore */ #endif @@ -320,16 +322,18 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) #endif =20 /* The nonnull function attribute marks pointer parameters that - must not be NULL. */ -#ifndef __nonnull + must not be NULL. This has the name __nonnull in glibc, + and __attribute_nonnull__ in files shared with Gnulib to avoid + collision with a different __nonnull in DragonFlyBSD 5.9. */ +#ifndef __attribute_nonnull__ # if __GNUC_PREREQ (3,3) || __glibc_has_attribute (__nonnull__) -# define __nonnull(params) __attribute__ ((__nonnull__ params)) +# define __attribute_nonnull__(params) __attribute__ ((__nonnull__ para= ms)) # else -# define __nonnull(params) +# define __attribute_nonnull__(params) # endif -#elif !defined __GLIBC__ -# undef __nonnull -# define __nonnull(params) _GL_ATTRIBUTE_NONNULL (params) +#endif +#ifndef __nonnull +# define __nonnull(params) __attribute_nonnull__ (params) #endif =20 /* If fortification mode, we warn about unused results of certain @@ -485,9 +489,9 @@ #define __bos0(ptr) __builtin_object_size (ptr, 0) [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })] #endif =20 -/* The #ifndef lets Gnulib avoid including these on non-glibc - platforms, where the includes typically do not exist. */ -#ifndef __WORDSIZE +/* Gnulib avoids including these, as they don't work on non-glibc or + older glibc platforms. */ +#ifndef __GNULIB_CDEFS # include # include #endif diff --git a/lib/cloexec.c b/lib/cloexec.c index 8363ddaa60..7defa93446 100644 --- a/lib/cloexec.c +++ b/lib/cloexec.c @@ -2,20 +2,20 @@ =20 Copyright (C) 1991, 2004-2006, 2009-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 - The code is taken from glibc/manual/llio.texi */ +/* The code is taken from glibc/manual/llio.texi */ =20 #include =20 diff --git a/lib/cloexec.h b/lib/cloexec.h index 5ca0e6413e..97a3659efb 100644 --- a/lib/cloexec.h +++ b/lib/cloexec.h @@ -2,20 +2,18 @@ =20 Copyright (C) 2004, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E - -*/ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/close-stream.h b/lib/close-stream.h index be3d4196b0..8a58a48e61 100644 --- a/lib/close-stream.h +++ b/lib/close-stream.h @@ -1,2 +1,20 @@ +/* Close a stream, with nicer error checking than fclose's. + + Copyright (C) 2006-2021 Free Software Foundation, Inc. + + 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 the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see = =2E */ + #include + int close_stream (FILE *stream); diff --git a/lib/copy-file-range.c b/lib/copy-file-range.c index e73c78b5aa..17df577055 100644 --- a/lib/copy-file-range.c +++ b/lib/copy-file-range.c @@ -1,17 +1,17 @@ /* Stub for copy_file_range Copyright 2019-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/count-leading-zeros.c b/lib/count-leading-zeros.c index d0c0704f58..7cf1ac2ff0 100644 --- a/lib/count-leading-zeros.c +++ b/lib/count-leading-zeros.c @@ -1,3 +1,21 @@ +/* Count the number of leading 0 bits in a word. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define COUNT_LEADING_ZEROS_INLINE _GL_EXTERN_INLINE #include "count-leading-zeros.h" diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h index 575ec3b4d0..cef529ac13 100644 --- a/lib/count-leading-zeros.h +++ b/lib/count-leading-zeros.h @@ -1,17 +1,17 @@ /* count-leading-zeros.h -- counts the number of leading 0 bits in a wor= d. Copyright (C) 2012-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Eric Blake. */ diff --git a/lib/count-one-bits.c b/lib/count-one-bits.c index 66341d77cd..d9b4f5e848 100644 --- a/lib/count-one-bits.c +++ b/lib/count-one-bits.c @@ -1,4 +1,22 @@ +/* Count the number of 1-bits in a word. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define COUNT_ONE_BITS_INLINE _GL_EXTERN_INLINE #include "count-one-bits.h" =20 diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h index 1a14f11f15..5e87a572b0 100644 --- a/lib/count-one-bits.h +++ b/lib/count-one-bits.h @@ -1,17 +1,17 @@ /* count-one-bits.h -- counts the number of 1-bits in a word. Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Ben Pfaff. */ diff --git a/lib/count-trailing-zeros.c b/lib/count-trailing-zeros.c index f3da886742..538b01dc02 100644 --- a/lib/count-trailing-zeros.c +++ b/lib/count-trailing-zeros.c @@ -1,3 +1,21 @@ +/* Count the number of trailing 0 bits in a word. + + Copyright 2013-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define COUNT_TRAILING_ZEROS_INLINE _GL_EXTERN_INLINE #include "count-trailing-zeros.h" diff --git a/lib/count-trailing-zeros.h b/lib/count-trailing-zeros.h index 5a8ef563ea..f81674c571 100644 --- a/lib/count-trailing-zeros.h +++ b/lib/count-trailing-zeros.h @@ -1,17 +1,17 @@ /* count-trailing-zeros.h -- counts the number of trailing 0 bits in a w= ord. Copyright 2013-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/dirent.in.h b/lib/dirent.in.h index 4666972b15..647a3dba51 100644 --- a/lib/dirent.in.h +++ b/lib/dirent.in.h @@ -1,17 +1,17 @@ /* A GNU-like . Copyright (C) 2006-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_DIRENT_H diff --git a/lib/dirfd.c b/lib/dirfd.c index ced7531c5e..640cb4ff13 100644 --- a/lib/dirfd.c +++ b/lib/dirfd.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2001, 2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Jim Meyering. */ diff --git a/lib/dtoastr.c b/lib/dtoastr.c index aed181d66b..5baba92922 100644 --- a/lib/dtoastr.c +++ b/lib/dtoastr.c @@ -1,2 +1,19 @@ +/* Convert 'double' to accurate string. + + Copyright (C) 2010-2021 Free Software Foundation, Inc. + + 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 the Free Software Foundation; either version 3 of the License, + or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see = =2E */ + #define LENGTH 2 #include "ftoastr.c" diff --git a/lib/dup2.c b/lib/dup2.c index c4a0a29fbd..53e5552132 100644 --- a/lib/dup2.c +++ b/lib/dup2.c @@ -2,17 +2,17 @@ =20 Copyright (C) 1999, 2004-2007, 2009-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ diff --git a/lib/dynarray.h b/lib/dynarray.h index 6da3e87e55..ec64273b3a 100644 --- a/lib/dynarray.h +++ b/lib/dynarray.h @@ -1,31 +1,284 @@ /* Type-safe arrays which grow dynamically. Copyright 2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 -/* Written by Paul Eggert, 2021. */ +/* Written by Paul Eggert and Bruno Haible, 2021. */ =20 #ifndef _GL_DYNARRAY_H #define _GL_DYNARRAY_H =20 -#include +/* Before including this file, you need to define: =20 + DYNARRAY_STRUCT + The struct tag of dynamic array to be defined. + + DYNARRAY_ELEMENT + The type name of the element type. Elements are copied + as if by memcpy, and can change address as the dynamic + array grows. + + DYNARRAY_PREFIX + The prefix of the functions which are defined. + + The following parameters are optional: + + DYNARRAY_ELEMENT_FREE + DYNARRAY_ELEMENT_FREE (E) is evaluated to deallocate the + contents of elements. E is of type DYNARRAY_ELEMENT *. + + DYNARRAY_ELEMENT_INIT + DYNARRAY_ELEMENT_INIT (E) is evaluated to initialize a new + element. E is of type DYNARRAY_ELEMENT *. + If DYNARRAY_ELEMENT_FREE but not DYNARRAY_ELEMENT_INIT is + defined, new elements are automatically zero-initialized. + Otherwise, new elements have undefined contents. + + DYNARRAY_INITIAL_SIZE + The size of the statically allocated array (default: + at least 2, more elements if they fit into 128 bytes). + Must be a preprocessor constant. If DYNARRAY_INITIAL_SIZE is 0, + there is no statically allocated array at, and all non-empty + arrays are heap-allocated. + + DYNARRAY_FINAL_TYPE + The name of the type which holds the final array. If not + defined, is PREFIX##finalize not provided. DYNARRAY_FINAL_TYPE + must be a struct type, with members of type DYNARRAY_ELEMENT and + size_t at the start (in this order). + + These macros are undefined after this header file has been + included. + + The following types are provided (their members are private to the + dynarray implementation): + + struct DYNARRAY_STRUCT + + The following functions are provided: + */ + +/* Initialize a dynamic array object. This must be called before any + use of the object. */ +#if 0 +static void + DYNARRAY_PREFIX##init (struct DYNARRAY_STRUCT *list); +#endif + +/* Deallocate the dynamic array and its elements. */ +#if 0 +static void + DYNARRAY_PREFIX##free (struct DYNARRAY_STRUCT *list); +#endif + +/* Return true if the dynamic array is in an error state. */ +#if 0 +static bool + DYNARRAY_PREFIX##has_failed (const struct DYNARRAY_STRUCT *list);= +#endif + +/* Mark the dynamic array as failed. All elements are deallocated as + a side effect. */ +#if 0 +static void + DYNARRAY_PREFIX##mark_failed (struct DYNARRAY_STRUCT *list); +#endif + +/* Return the number of elements which have been added to the dynamic + array. */ +#if 0 +static size_t + DYNARRAY_PREFIX##size (const struct DYNARRAY_STRUCT *list); +#endif + +/* Return a pointer to the first array element, if any. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##begin (const struct DYNARRAY_STRUCT *list); +#endif + +/* Return a pointer one element past the last array element. For a + zero-length array, the pointer can be NULL even though the dynamic + array has not entered the failure state. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##end (const struct DYNARRAY_STRUCT *list); +#endif + +/* Return a pointer to the array element at INDEX. Terminate the + process if INDEX is out of bounds. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##at (struct DYNARRAY_STRUCT *list, size_t index);= +#endif + +/* Add ITEM at the end of the array, enlarging it by one element. + Mark *LIST as failed if the dynamic array allocation size cannot be + increased. */ +#if 0 +static void + DYNARRAY_PREFIX##add (struct DYNARRAY_STRUCT *list, + DYNARRAY_ELEMENT item); +#endif + +/* Allocate a place for a new element in *LIST and return a pointer to + it. The pointer can be NULL if the dynamic array cannot be + enlarged due to a memory allocation failure. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##emplace (struct DYNARRAY_STRUCT *list); +#endif + +/* Change the size of *LIST to SIZE. If SIZE is larger than the + existing size, new elements are added (which can be initialized). + Otherwise, the list is truncated, and elements are freed. Return + false on memory allocation failure (and mark *LIST as failed). */ +#if 0 +static bool + DYNARRAY_PREFIX##resize (struct DYNARRAY_STRUCT *list, size_t siz= e); +#endif + +/* Remove the last element of LIST if it is present. */ +#if 0 +static void + DYNARRAY_PREFIX##remove_last (struct DYNARRAY_STRUCT *list); +#endif + +/* Remove all elements from the list. The elements are freed, but the + list itself is not. */ +#if 0 +static void + DYNARRAY_PREFIX##clear (struct DYNARRAY_STRUCT *list); +#endif + +#if defined DYNARRAY_FINAL_TYPE +/* Transfer the dynamic array to a permanent location at *RESULT. + Returns true on success on false on allocation failure. In either + case, *LIST is re-initialized and can be reused. A NULL pointer is + stored in *RESULT if LIST refers to an empty list. On success, the + pointer in *RESULT is heap-allocated and must be deallocated using + free. */ +#if 0 +static bool + DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *list, + DYNARRAY_FINAL_TYPE *result); +#endif +#else /* !defined DYNARRAY_FINAL_TYPE */ +/* Transfer the dynamic array to a heap-allocated array and return a + pointer to it. The pointer is NULL if memory allocation fails, or + if the array is empty, so this function should be used only for + arrays which are known not be empty (usually because they always + have a sentinel at the end). If LENGTHP is not NULL, the array + length is written to *LENGTHP. *LIST is re-initialized and can be + reused. */ +#if 0 +static DYNARRAY_ELEMENT * + DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *list, + size_t *lengthp); +#endif +#endif + +/* A minimal example which provides a growing list of integers can be + defined like this: + + struct int_array + { + // Pointer to result array followed by its length, + // as required by DYNARRAY_FINAL_TYPE. + int *array; + size_t length; + }; + + #define DYNARRAY_STRUCT dynarray_int + #define DYNARRAY_ELEMENT int + #define DYNARRAY_PREFIX dynarray_int_ + #define DYNARRAY_FINAL_TYPE struct int_array + #include + + To create a three-element array with elements 1, 2, 3, use this + code: + + struct dynarray_int dyn; + dynarray_int_init (&dyn); + for (int i =3D 1; i <=3D 3; ++i) + { + int *place =3D dynarray_int_emplace (&dyn); + assert (place !=3D NULL); + *place =3D i; + } + struct int_array result; + bool ok =3D dynarray_int_finalize (&dyn, &result); + assert (ok); + assert (result.length =3D=3D 3); + assert (result.array[0] =3D=3D 1); + assert (result.array[1] =3D=3D 2); + assert (result.array[2] =3D=3D 3); + free (result.array); + + If the elements contain resources which must be freed, define + DYNARRAY_ELEMENT_FREE appropriately, like this: + + struct str_array + { + char **array; + size_t length; + }; + + #define DYNARRAY_STRUCT dynarray_str + #define DYNARRAY_ELEMENT char * + #define DYNARRAY_ELEMENT_FREE(ptr) free (*ptr) + #define DYNARRAY_PREFIX dynarray_str_ + #define DYNARRAY_FINAL_TYPE struct str_array + #include + */ + + +/* The implementation is imported from glibc. */ + +/* Avoid possible conflicts with symbols exported by the GNU libc. */ #define __libc_dynarray_at_failure gl_dynarray_at_failure #define __libc_dynarray_emplace_enlarge gl_dynarray_emplace_enlarge #define __libc_dynarray_finalize gl_dynarray_finalize #define __libc_dynarray_resize_clear gl_dynarray_resize_clear #define __libc_dynarray_resize gl_dynarray_resize -#include + +#if defined DYNARRAY_STRUCT || defined DYNARRAY_ELEMENT || defined DYNAR= RAY_PREFIX + +# ifndef _GL_LIKELY +/* Rely on __builtin_expect, as provided by the module 'builtin-expect'.= */ +# define _GL_LIKELY(cond) __builtin_expect ((cond), 1) +# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0) +# endif + +/* Define auxiliary structs and declare auxiliary functions, common to a= ll + instantiations of dynarray. */ +# include + +/* Define the instantiation, specified through + DYNARRAY_STRUCT + DYNARRAY_ELEMENT + DYNARRAY_PREFIX + etc. */ +# include + +#else + +/* This file is being included from one of the malloc/dynarray_*.c files= =2E */ +# include + +#endif =20 #endif /* _GL_DYNARRAY_H */ diff --git a/lib/eloop-threshold.h b/lib/eloop-threshold.h index 27d07a7296..fcd30ab1e6 100644 --- a/lib/eloop-threshold.h +++ b/lib/eloop-threshold.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/errno.in.h b/lib/errno.in.h index c6ab4e88e1..3cad9e2d62 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_ERRNO_H =20 diff --git a/lib/euidaccess.c b/lib/euidaccess.c index ef65961d81..a86cebd179 100644 --- a/lib/euidaccess.c +++ b/lib/euidaccess.c @@ -5,17 +5,17 @@ =20 This file is part of the GNU C Library. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by David MacKenzie and Torbjorn Granlund. diff --git a/lib/execinfo.c b/lib/execinfo.c index 0bcd9f078b..18a1051b25 100644 --- a/lib/execinfo.c +++ b/lib/execinfo.c @@ -1,3 +1,21 @@ +/* Information about executables. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_EXECINFO_INLINE _GL_EXTERN_INLINE #include "execinfo.h" diff --git a/lib/execinfo.in.h b/lib/execinfo.in.h index 790bec087e..98bb8039b7 100644 --- a/lib/execinfo.in.h +++ b/lib/execinfo.in.h @@ -3,16 +3,16 @@ Copyright (C) 2012-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or + it under the terms of the GNU Lesser General Public License as publis= hed by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/explicit_bzero.c b/lib/explicit_bzero.c index f50ed0875d..2906c04d0f 100644 --- a/lib/explicit_bzero.c +++ b/lib/explicit_bzero.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/fcntl.c b/lib/fcntl.c index 9d6b10fa30..c744eb91e6 100644 --- a/lib/fcntl.c +++ b/lib/fcntl.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Eric Blake . */ diff --git a/lib/fcntl.in.h b/lib/fcntl.in.h index 0b14467c54..26dedc3041 100644 --- a/lib/fcntl.in.h +++ b/lib/fcntl.in.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ diff --git a/lib/file-has-acl.c b/lib/file-has-acl.c index c667ae9d24..800af227cc 100644 --- a/lib/file-has-acl.c +++ b/lib/file-has-acl.c @@ -1,6 +1,6 @@ /* Test whether a file has a nontrivial ACL. -*- coding: utf-8 -*- =20 - Copyright (C) 2002-2003, 2005-2020 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -206,9 +206,7 @@ file_has_acl (char const *name, struct stat const *sb= ) ; else { - int saved_errno =3D errno; free (malloced); - errno =3D saved_errno; return -1; } } @@ -281,9 +279,7 @@ file_has_acl (char const *name, struct stat const *sb= ) ; else { - int saved_errno =3D errno; free (malloced); - errno =3D saved_errno; return -1; } } @@ -353,7 +349,7 @@ file_has_acl (char const *name, struct stat const *sb= ) { struct stat statbuf; =20 - if (stat (name, &statbuf) < 0) + if (stat (name, &statbuf) =3D=3D -1 && errno !=3D EOVERFLO= W) return -1; =20 return acl_nontrivial (count, entries); @@ -418,11 +414,7 @@ file_has_acl (char const *name, struct stat const *s= b) if (errno !=3D ENOSPC) { if (acl !=3D aclbuf) - { - int saved_errno =3D errno; - free (acl); - errno =3D saved_errno; - } + free (acl); return -1; } aclsize =3D 2 * aclsize; diff --git a/lib/filename.h b/lib/filename.h index 541ffec0d5..dafe3dfddb 100644 --- a/lib/filename.h +++ b/lib/filename.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/filevercmp.c b/lib/filevercmp.c index 6b7226de6c..fca23ec4fc 100644 --- a/lib/filevercmp.c +++ b/lib/filevercmp.c @@ -3,18 +3,18 @@ Copyright (C) 2001 Anthony Towns Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include #include "filevercmp.h" diff --git a/lib/filevercmp.h b/lib/filevercmp.h index 5de212f436..c210452938 100644 --- a/lib/filevercmp.h +++ b/lib/filevercmp.h @@ -3,18 +3,18 @@ Copyright (C) 2001 Anthony Towns Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef FILEVERCMP_H #define FILEVERCMP_H diff --git a/lib/flexmember.h b/lib/flexmember.h index 9f6e1bf110..1b19a2bfd9 100644 --- a/lib/flexmember.h +++ b/lib/flexmember.h @@ -5,16 +5,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . =20 diff --git a/lib/free.c b/lib/free.c index 5c89787aba..780f03dd11 100644 --- a/lib/free.c +++ b/lib/free.c @@ -2,32 +2,36 @@ =20 Copyright (C) 2003, 2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ =20 #include =20 +/* Specification. */ #include =20 -#include +/* A function definition is only needed if HAVE_FREE_POSIX is not define= d. */ +#if !HAVE_FREE_POSIX + +# include =20 void rpl_free (void *p) -#undef free +# undef free { -#if defined __GNUC__ && !defined __clang__ +# if defined __GNUC__ && !defined __clang__ /* An invalid GCC optimization would optimize away the assignments in the code below, when link-ti= me @@ -39,9 +43,11 @@ rpl_free (void *p) errno =3D 0; free (p); errno =3D err[errno =3D=3D 0]; -#else +# else int err =3D errno; free (p); errno =3D err; -#endif +# endif } + +#endif diff --git a/lib/fsusage.c b/lib/fsusage.c index 35de136cd8..740cdc219a 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -3,17 +3,17 @@ Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2021 Free S= oftware Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/fsusage.h b/lib/fsusage.h index e0657b3651..b3f58d9994 100644 --- a/lib/fsusage.h +++ b/lib/fsusage.h @@ -3,17 +3,17 @@ Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Space usage statistics for a file system. Blocks are 512-byte. */ diff --git a/lib/fsync.c b/lib/fsync.c index a5280f281c..99a932d770 100644 --- a/lib/fsync.c +++ b/lib/fsync.c @@ -9,17 +9,17 @@ =20 Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This library is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/futimens.c b/lib/futimens.c index 99eaba95df..273cc87187 100644 --- a/lib/futimens.c +++ b/lib/futimens.c @@ -1,17 +1,17 @@ /* Set the access and modification time of an open fd. Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Eric Blake */ diff --git a/lib/getdtablesize.c b/lib/getdtablesize.c index 56eaf5d32c..5006c2d5c5 100644 --- a/lib/getdtablesize.c +++ b/lib/getdtablesize.c @@ -2,17 +2,17 @@ Copyright (C) 2008-2021 Free Software Foundation, Inc. Written by Bruno Haible , 2008. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/getgroups.c b/lib/getgroups.c index af602a74d3..2092bd2778 100644 --- a/lib/getgroups.c +++ b/lib/getgroups.c @@ -2,17 +2,17 @@ =20 Copyright (C) 1996, 1999, 2003, 2006-2021 Free Software Foundation, I= nc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Jim Meyering */ @@ -70,7 +70,6 @@ rpl_getgroups (int n, gid_t *group) { int n_groups; GETGROUPS_T *gbuf; - int saved_errno; =20 if (n < 0) { @@ -99,9 +98,7 @@ rpl_getgroups (int n, gid_t *group) while (n--) group[n] =3D gbuf[n]; } - saved_errno =3D errno; free (gbuf); - errno =3D saved_errno; return result; } =20 @@ -121,10 +118,7 @@ rpl_getgroups (int n, gid_t *group) n *=3D 2; } =20 - saved_errno =3D errno; free (gbuf); - errno =3D saved_errno; - return n_groups; } =20 diff --git a/lib/getopt-cdefs.in.h b/lib/getopt-cdefs.in.h index 11fe536ff2..33e3d4b3d8 100644 --- a/lib/getopt-cdefs.in.h +++ b/lib/getopt-cdefs.in.h @@ -4,19 +4,18 @@ Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _GETOPT_CDEFS_H #define _GETOPT_CDEFS_H 1 diff --git a/lib/getopt-core.h b/lib/getopt-core.h index 05d16b0740..ceb14d0597 100644 --- a/lib/getopt-core.h +++ b/lib/getopt-core.h @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/getopt-ext.h b/lib/getopt-ext.h index 9b11b47f0f..f82a8c6129 100644 --- a/lib/getopt-ext.h +++ b/lib/getopt-ext.h @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h index 78990a345a..b1733a3497 100644 --- a/lib/getopt-pfx-core.h +++ b/lib/getopt-pfx-core.h @@ -4,19 +4,18 @@ Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _GETOPT_PFX_CORE_H #define _GETOPT_PFX_CORE_H 1 diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h index 61ea8d2b1d..b9a14ba05a 100644 --- a/lib/getopt-pfx-ext.h +++ b/lib/getopt-pfx-ext.h @@ -4,19 +4,18 @@ Unlike most of the getopt implementation, it is NOT shared with the GNU C Library. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with gnulib; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _GETOPT_PFX_EXT_H #define _GETOPT_PFX_EXT_H 1 diff --git a/lib/getopt.c b/lib/getopt.c index dd96c18407..b1069891e8 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =0C diff --git a/lib/getopt.in.h b/lib/getopt.in.h index 541fb9da2e..bf884f0322 100644 --- a/lib/getopt.in.h +++ b/lib/getopt.in.h @@ -5,18 +5,18 @@ with the GNU C Library, which supplies a different version of this file. =20 - 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 the Free Software Foundation; either version 3 of - the License, or (at your option) any later version. - - This file is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public - License along with gnulib; if not, see . */ + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_GETOPT_H =20 diff --git a/lib/getopt1.c b/lib/getopt1.c index ca24eb811f..5a928062fd 100644 --- a/lib/getopt1.c +++ b/lib/getopt1.c @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =0C diff --git a/lib/getopt_int.h b/lib/getopt_int.h index b70ff5badf..91254e487d 100644 --- a/lib/getopt_int.h +++ b/lib/getopt_int.h @@ -4,16 +4,16 @@ Patches to this file should be submitted to both projects. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/getrandom.c b/lib/getrandom.c index 41212fb329..a186c4d3bd 100644 --- a/lib/getrandom.c +++ b/lib/getrandom.c @@ -2,17 +2,17 @@ =20 Copyright 2020-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ @@ -178,7 +178,11 @@ getrandom (void *buffer, size_t length, unsigned int= flags) + (flags & GRND_NONBLOCK ? O_NONBLOCK : 0)); fd =3D open (randdevice[devrandom], oflags); if (fd < 0) - return fd; + { + if (errno =3D=3D ENOENT || errno =3D=3D ENOTDIR) + errno =3D ENOSYS; + return -1; + } randfd[devrandom] =3D fd; } =20 diff --git a/lib/gettext.h b/lib/gettext.h index 3552157efd..f1c7a24075 100644 --- a/lib/gettext.h +++ b/lib/gettext.h @@ -2,18 +2,18 @@ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2021 Free Softwar= e Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 diff --git a/lib/gettime.c b/lib/gettime.c index fb721b2cda..8f28a32df1 100644 --- a/lib/gettime.c +++ b/lib/gettime.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2002, 2004-2007, 2009-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/gettimeofday.c b/lib/gettimeofday.c index b1c93e1c3a..2a222fc5b7 100644 --- a/lib/gettimeofday.c +++ b/lib/gettimeofday.c @@ -2,18 +2,18 @@ =20 Copyright (C) 2001-2003, 2005-2007, 2009-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* written by Jim Meyering */ =20 diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 0b9aaf6d9e..6ac22124ed 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -172,9 +172,7 @@ ALLOCA =3D @ALLOCA@ ALLOCA_H =3D @ALLOCA_H@ ALSA_CFLAGS =3D @ALSA_CFLAGS@ ALSA_LIBS =3D @ALSA_LIBS@ -AM_DEFAULT_V =3D @AM_DEFAULT_V@ AM_DEFAULT_VERBOSITY =3D @AM_DEFAULT_VERBOSITY@ -AM_V =3D @AM_V@ APPLE_UNIVERSAL_BUILD =3D @APPLE_UNIVERSAL_BUILD@ AR =3D @AR@ ARFLAGS =3D @ARFLAGS@ @@ -213,6 +211,7 @@ DEFS =3D @DEFS@ DESLIB =3D @DESLIB@ DOCMISC_W32 =3D @DOCMISC_W32@ DUMPING =3D @DUMPING@ +DYNLIB_OBJ =3D @DYNLIB_OBJ@ ECHO_C =3D @ECHO_C@ ECHO_N =3D @ECHO_N@ ECHO_T =3D @ECHO_T@ @@ -255,297 +254,300 @@ GL_GENERATE_MINI_GMP_H =3D @GL_GENERATE_MINI_GMP_= H@ GL_GENERATE_STDALIGN_H =3D @GL_GENERATE_STDALIGN_H@ GL_GENERATE_STDDEF_H =3D @GL_GENERATE_STDDEF_H@ GL_GENERATE_STDINT_H =3D @GL_GENERATE_STDINT_H@ +GL_GNULIB_ACCESS =3D @GL_GNULIB_ACCESS@ +GL_GNULIB_ALIGNED_ALLOC =3D @GL_GNULIB_ALIGNED_ALLOC@ +GL_GNULIB_ALPHASORT =3D @GL_GNULIB_ALPHASORT@ +GL_GNULIB_ATOLL =3D @GL_GNULIB_ATOLL@ +GL_GNULIB_CALLOC_POSIX =3D @GL_GNULIB_CALLOC_POSIX@ +GL_GNULIB_CANONICALIZE_FILE_NAME =3D @GL_GNULIB_CANONICALIZE_FILE_NAME@ +GL_GNULIB_CHDIR =3D @GL_GNULIB_CHDIR@ +GL_GNULIB_CHOWN =3D @GL_GNULIB_CHOWN@ +GL_GNULIB_CLOSE =3D @GL_GNULIB_CLOSE@ +GL_GNULIB_CLOSEDIR =3D @GL_GNULIB_CLOSEDIR@ +GL_GNULIB_COPY_FILE_RANGE =3D @GL_GNULIB_COPY_FILE_RANGE@ +GL_GNULIB_CREAT =3D @GL_GNULIB_CREAT@ +GL_GNULIB_CTIME =3D @GL_GNULIB_CTIME@ +GL_GNULIB_DIRFD =3D @GL_GNULIB_DIRFD@ +GL_GNULIB_DPRINTF =3D @GL_GNULIB_DPRINTF@ +GL_GNULIB_DUP =3D @GL_GNULIB_DUP@ +GL_GNULIB_DUP2 =3D @GL_GNULIB_DUP2@ +GL_GNULIB_DUP3 =3D @GL_GNULIB_DUP3@ +GL_GNULIB_ENVIRON =3D @GL_GNULIB_ENVIRON@ +GL_GNULIB_EUIDACCESS =3D @GL_GNULIB_EUIDACCESS@ +GL_GNULIB_EXECL =3D @GL_GNULIB_EXECL@ +GL_GNULIB_EXECLE =3D @GL_GNULIB_EXECLE@ +GL_GNULIB_EXECLP =3D @GL_GNULIB_EXECLP@ +GL_GNULIB_EXECV =3D @GL_GNULIB_EXECV@ +GL_GNULIB_EXECVE =3D @GL_GNULIB_EXECVE@ +GL_GNULIB_EXECVP =3D @GL_GNULIB_EXECVP@ +GL_GNULIB_EXECVPE =3D @GL_GNULIB_EXECVPE@ +GL_GNULIB_EXPLICIT_BZERO =3D @GL_GNULIB_EXPLICIT_BZERO@ +GL_GNULIB_FACCESSAT =3D @GL_GNULIB_FACCESSAT@ +GL_GNULIB_FCHDIR =3D @GL_GNULIB_FCHDIR@ +GL_GNULIB_FCHMODAT =3D @GL_GNULIB_FCHMODAT@ +GL_GNULIB_FCHOWNAT =3D @GL_GNULIB_FCHOWNAT@ +GL_GNULIB_FCLOSE =3D @GL_GNULIB_FCLOSE@ +GL_GNULIB_FCNTL =3D @GL_GNULIB_FCNTL@ +GL_GNULIB_FDATASYNC =3D @GL_GNULIB_FDATASYNC@ +GL_GNULIB_FDOPEN =3D @GL_GNULIB_FDOPEN@ +GL_GNULIB_FDOPENDIR =3D @GL_GNULIB_FDOPENDIR@ +GL_GNULIB_FFLUSH =3D @GL_GNULIB_FFLUSH@ +GL_GNULIB_FFSL =3D @GL_GNULIB_FFSL@ +GL_GNULIB_FFSLL =3D @GL_GNULIB_FFSLL@ +GL_GNULIB_FGETC =3D @GL_GNULIB_FGETC@ +GL_GNULIB_FGETS =3D @GL_GNULIB_FGETS@ +GL_GNULIB_FOPEN =3D @GL_GNULIB_FOPEN@ +GL_GNULIB_FPRINTF =3D @GL_GNULIB_FPRINTF@ +GL_GNULIB_FPRINTF_POSIX =3D @GL_GNULIB_FPRINTF_POSIX@ +GL_GNULIB_FPURGE =3D @GL_GNULIB_FPURGE@ +GL_GNULIB_FPUTC =3D @GL_GNULIB_FPUTC@ +GL_GNULIB_FPUTS =3D @GL_GNULIB_FPUTS@ +GL_GNULIB_FREAD =3D @GL_GNULIB_FREAD@ +GL_GNULIB_FREE_POSIX =3D @GL_GNULIB_FREE_POSIX@ +GL_GNULIB_FREOPEN =3D @GL_GNULIB_FREOPEN@ +GL_GNULIB_FSCANF =3D @GL_GNULIB_FSCANF@ +GL_GNULIB_FSEEK =3D @GL_GNULIB_FSEEK@ +GL_GNULIB_FSEEKO =3D @GL_GNULIB_FSEEKO@ +GL_GNULIB_FSTAT =3D @GL_GNULIB_FSTAT@ +GL_GNULIB_FSTATAT =3D @GL_GNULIB_FSTATAT@ +GL_GNULIB_FSYNC =3D @GL_GNULIB_FSYNC@ +GL_GNULIB_FTELL =3D @GL_GNULIB_FTELL@ +GL_GNULIB_FTELLO =3D @GL_GNULIB_FTELLO@ +GL_GNULIB_FTRUNCATE =3D @GL_GNULIB_FTRUNCATE@ +GL_GNULIB_FUTIMENS =3D @GL_GNULIB_FUTIMENS@ +GL_GNULIB_FWRITE =3D @GL_GNULIB_FWRITE@ +GL_GNULIB_GETC =3D @GL_GNULIB_GETC@ +GL_GNULIB_GETCHAR =3D @GL_GNULIB_GETCHAR@ +GL_GNULIB_GETCWD =3D @GL_GNULIB_GETCWD@ +GL_GNULIB_GETDELIM =3D @GL_GNULIB_GETDELIM@ +GL_GNULIB_GETDOMAINNAME =3D @GL_GNULIB_GETDOMAINNAME@ +GL_GNULIB_GETDTABLESIZE =3D @GL_GNULIB_GETDTABLESIZE@ +GL_GNULIB_GETENTROPY =3D @GL_GNULIB_GETENTROPY@ +GL_GNULIB_GETGROUPS =3D @GL_GNULIB_GETGROUPS@ +GL_GNULIB_GETHOSTNAME =3D @GL_GNULIB_GETHOSTNAME@ +GL_GNULIB_GETLINE =3D @GL_GNULIB_GETLINE@ +GL_GNULIB_GETLOADAVG =3D @GL_GNULIB_GETLOADAVG@ +GL_GNULIB_GETLOGIN =3D @GL_GNULIB_GETLOGIN@ +GL_GNULIB_GETLOGIN_R =3D @GL_GNULIB_GETLOGIN_R@ +GL_GNULIB_GETOPT_POSIX =3D @GL_GNULIB_GETOPT_POSIX@ +GL_GNULIB_GETPAGESIZE =3D @GL_GNULIB_GETPAGESIZE@ +GL_GNULIB_GETPASS =3D @GL_GNULIB_GETPASS@ +GL_GNULIB_GETRANDOM =3D @GL_GNULIB_GETRANDOM@ +GL_GNULIB_GETSUBOPT =3D @GL_GNULIB_GETSUBOPT@ +GL_GNULIB_GETTIMEOFDAY =3D @GL_GNULIB_GETTIMEOFDAY@ +GL_GNULIB_GETUMASK =3D @GL_GNULIB_GETUMASK@ +GL_GNULIB_GETUSERSHELL =3D @GL_GNULIB_GETUSERSHELL@ +GL_GNULIB_GRANTPT =3D @GL_GNULIB_GRANTPT@ +GL_GNULIB_GROUP_MEMBER =3D @GL_GNULIB_GROUP_MEMBER@ +GL_GNULIB_IMAXABS =3D @GL_GNULIB_IMAXABS@ +GL_GNULIB_IMAXDIV =3D @GL_GNULIB_IMAXDIV@ +GL_GNULIB_ISATTY =3D @GL_GNULIB_ISATTY@ +GL_GNULIB_LCHMOD =3D @GL_GNULIB_LCHMOD@ +GL_GNULIB_LCHOWN =3D @GL_GNULIB_LCHOWN@ +GL_GNULIB_LINK =3D @GL_GNULIB_LINK@ +GL_GNULIB_LINKAT =3D @GL_GNULIB_LINKAT@ +GL_GNULIB_LOCALTIME =3D @GL_GNULIB_LOCALTIME@ +GL_GNULIB_LSEEK =3D @GL_GNULIB_LSEEK@ +GL_GNULIB_LSTAT =3D @GL_GNULIB_LSTAT@ +GL_GNULIB_MALLOC_POSIX =3D @GL_GNULIB_MALLOC_POSIX@ +GL_GNULIB_MBSCASECMP =3D @GL_GNULIB_MBSCASECMP@ +GL_GNULIB_MBSCASESTR =3D @GL_GNULIB_MBSCASESTR@ +GL_GNULIB_MBSCHR =3D @GL_GNULIB_MBSCHR@ +GL_GNULIB_MBSCSPN =3D @GL_GNULIB_MBSCSPN@ +GL_GNULIB_MBSLEN =3D @GL_GNULIB_MBSLEN@ +GL_GNULIB_MBSNCASECMP =3D @GL_GNULIB_MBSNCASECMP@ +GL_GNULIB_MBSNLEN =3D @GL_GNULIB_MBSNLEN@ +GL_GNULIB_MBSPBRK =3D @GL_GNULIB_MBSPBRK@ +GL_GNULIB_MBSPCASECMP =3D @GL_GNULIB_MBSPCASECMP@ +GL_GNULIB_MBSRCHR =3D @GL_GNULIB_MBSRCHR@ +GL_GNULIB_MBSSEP =3D @GL_GNULIB_MBSSEP@ +GL_GNULIB_MBSSPN =3D @GL_GNULIB_MBSSPN@ +GL_GNULIB_MBSSTR =3D @GL_GNULIB_MBSSTR@ +GL_GNULIB_MBSTOK_R =3D @GL_GNULIB_MBSTOK_R@ +GL_GNULIB_MBTOWC =3D @GL_GNULIB_MBTOWC@ +GL_GNULIB_MDA_ACCESS =3D @GL_GNULIB_MDA_ACCESS@ +GL_GNULIB_MDA_CHDIR =3D @GL_GNULIB_MDA_CHDIR@ +GL_GNULIB_MDA_CHMOD =3D @GL_GNULIB_MDA_CHMOD@ +GL_GNULIB_MDA_CLOSE =3D @GL_GNULIB_MDA_CLOSE@ +GL_GNULIB_MDA_CREAT =3D @GL_GNULIB_MDA_CREAT@ +GL_GNULIB_MDA_DUP =3D @GL_GNULIB_MDA_DUP@ +GL_GNULIB_MDA_DUP2 =3D @GL_GNULIB_MDA_DUP2@ +GL_GNULIB_MDA_ECVT =3D @GL_GNULIB_MDA_ECVT@ +GL_GNULIB_MDA_EXECL =3D @GL_GNULIB_MDA_EXECL@ +GL_GNULIB_MDA_EXECLE =3D @GL_GNULIB_MDA_EXECLE@ +GL_GNULIB_MDA_EXECLP =3D @GL_GNULIB_MDA_EXECLP@ +GL_GNULIB_MDA_EXECV =3D @GL_GNULIB_MDA_EXECV@ +GL_GNULIB_MDA_EXECVE =3D @GL_GNULIB_MDA_EXECVE@ +GL_GNULIB_MDA_EXECVP =3D @GL_GNULIB_MDA_EXECVP@ +GL_GNULIB_MDA_EXECVPE =3D @GL_GNULIB_MDA_EXECVPE@ +GL_GNULIB_MDA_FCLOSEALL =3D @GL_GNULIB_MDA_FCLOSEALL@ +GL_GNULIB_MDA_FCVT =3D @GL_GNULIB_MDA_FCVT@ +GL_GNULIB_MDA_FDOPEN =3D @GL_GNULIB_MDA_FDOPEN@ +GL_GNULIB_MDA_FILENO =3D @GL_GNULIB_MDA_FILENO@ +GL_GNULIB_MDA_GCVT =3D @GL_GNULIB_MDA_GCVT@ +GL_GNULIB_MDA_GETCWD =3D @GL_GNULIB_MDA_GETCWD@ +GL_GNULIB_MDA_GETPID =3D @GL_GNULIB_MDA_GETPID@ +GL_GNULIB_MDA_GETW =3D @GL_GNULIB_MDA_GETW@ +GL_GNULIB_MDA_ISATTY =3D @GL_GNULIB_MDA_ISATTY@ +GL_GNULIB_MDA_LSEEK =3D @GL_GNULIB_MDA_LSEEK@ +GL_GNULIB_MDA_MEMCCPY =3D @GL_GNULIB_MDA_MEMCCPY@ +GL_GNULIB_MDA_MKDIR =3D @GL_GNULIB_MDA_MKDIR@ +GL_GNULIB_MDA_MKTEMP =3D @GL_GNULIB_MDA_MKTEMP@ +GL_GNULIB_MDA_OPEN =3D @GL_GNULIB_MDA_OPEN@ +GL_GNULIB_MDA_PUTENV =3D @GL_GNULIB_MDA_PUTENV@ +GL_GNULIB_MDA_PUTW =3D @GL_GNULIB_MDA_PUTW@ +GL_GNULIB_MDA_READ =3D @GL_GNULIB_MDA_READ@ +GL_GNULIB_MDA_RMDIR =3D @GL_GNULIB_MDA_RMDIR@ +GL_GNULIB_MDA_STRDUP =3D @GL_GNULIB_MDA_STRDUP@ +GL_GNULIB_MDA_SWAB =3D @GL_GNULIB_MDA_SWAB@ +GL_GNULIB_MDA_TEMPNAM =3D @GL_GNULIB_MDA_TEMPNAM@ +GL_GNULIB_MDA_TZSET =3D @GL_GNULIB_MDA_TZSET@ +GL_GNULIB_MDA_UMASK =3D @GL_GNULIB_MDA_UMASK@ +GL_GNULIB_MDA_UNLINK =3D @GL_GNULIB_MDA_UNLINK@ +GL_GNULIB_MDA_WRITE =3D @GL_GNULIB_MDA_WRITE@ +GL_GNULIB_MEMCHR =3D @GL_GNULIB_MEMCHR@ +GL_GNULIB_MEMMEM =3D @GL_GNULIB_MEMMEM@ +GL_GNULIB_MEMPCPY =3D @GL_GNULIB_MEMPCPY@ +GL_GNULIB_MEMRCHR =3D @GL_GNULIB_MEMRCHR@ +GL_GNULIB_MKDIR =3D @GL_GNULIB_MKDIR@ +GL_GNULIB_MKDIRAT =3D @GL_GNULIB_MKDIRAT@ +GL_GNULIB_MKDTEMP =3D @GL_GNULIB_MKDTEMP@ +GL_GNULIB_MKFIFO =3D @GL_GNULIB_MKFIFO@ +GL_GNULIB_MKFIFOAT =3D @GL_GNULIB_MKFIFOAT@ +GL_GNULIB_MKNOD =3D @GL_GNULIB_MKNOD@ +GL_GNULIB_MKNODAT =3D @GL_GNULIB_MKNODAT@ +GL_GNULIB_MKOSTEMP =3D @GL_GNULIB_MKOSTEMP@ +GL_GNULIB_MKOSTEMPS =3D @GL_GNULIB_MKOSTEMPS@ +GL_GNULIB_MKSTEMP =3D @GL_GNULIB_MKSTEMP@ +GL_GNULIB_MKSTEMPS =3D @GL_GNULIB_MKSTEMPS@ +GL_GNULIB_MKTIME =3D @GL_GNULIB_MKTIME@ +GL_GNULIB_NANOSLEEP =3D @GL_GNULIB_NANOSLEEP@ +GL_GNULIB_NONBLOCKING =3D @GL_GNULIB_NONBLOCKING@ +GL_GNULIB_OBSTACK_PRINTF =3D @GL_GNULIB_OBSTACK_PRINTF@ +GL_GNULIB_OBSTACK_PRINTF_POSIX =3D @GL_GNULIB_OBSTACK_PRINTF_POSIX@ +GL_GNULIB_OPEN =3D @GL_GNULIB_OPEN@ +GL_GNULIB_OPENAT =3D @GL_GNULIB_OPENAT@ +GL_GNULIB_OPENDIR =3D @GL_GNULIB_OPENDIR@ +GL_GNULIB_OVERRIDES_STRUCT_STAT =3D @GL_GNULIB_OVERRIDES_STRUCT_STAT@ +GL_GNULIB_PCLOSE =3D @GL_GNULIB_PCLOSE@ +GL_GNULIB_PERROR =3D @GL_GNULIB_PERROR@ +GL_GNULIB_PIPE =3D @GL_GNULIB_PIPE@ +GL_GNULIB_PIPE2 =3D @GL_GNULIB_PIPE2@ +GL_GNULIB_POPEN =3D @GL_GNULIB_POPEN@ +GL_GNULIB_POSIX_MEMALIGN =3D @GL_GNULIB_POSIX_MEMALIGN@ +GL_GNULIB_POSIX_OPENPT =3D @GL_GNULIB_POSIX_OPENPT@ +GL_GNULIB_PREAD =3D @GL_GNULIB_PREAD@ +GL_GNULIB_PRINTF =3D @GL_GNULIB_PRINTF@ +GL_GNULIB_PRINTF_POSIX =3D @GL_GNULIB_PRINTF_POSIX@ +GL_GNULIB_PSELECT =3D @GL_GNULIB_PSELECT@ +GL_GNULIB_PTHREAD_SIGMASK =3D @GL_GNULIB_PTHREAD_SIGMASK@ +GL_GNULIB_PTSNAME =3D @GL_GNULIB_PTSNAME@ +GL_GNULIB_PTSNAME_R =3D @GL_GNULIB_PTSNAME_R@ +GL_GNULIB_PUTC =3D @GL_GNULIB_PUTC@ +GL_GNULIB_PUTCHAR =3D @GL_GNULIB_PUTCHAR@ +GL_GNULIB_PUTENV =3D @GL_GNULIB_PUTENV@ +GL_GNULIB_PUTS =3D @GL_GNULIB_PUTS@ +GL_GNULIB_PWRITE =3D @GL_GNULIB_PWRITE@ +GL_GNULIB_QSORT_R =3D @GL_GNULIB_QSORT_R@ +GL_GNULIB_RAISE =3D @GL_GNULIB_RAISE@ +GL_GNULIB_RANDOM =3D @GL_GNULIB_RANDOM@ +GL_GNULIB_RANDOM_R =3D @GL_GNULIB_RANDOM_R@ +GL_GNULIB_RAWMEMCHR =3D @GL_GNULIB_RAWMEMCHR@ +GL_GNULIB_READ =3D @GL_GNULIB_READ@ +GL_GNULIB_READDIR =3D @GL_GNULIB_READDIR@ +GL_GNULIB_READLINK =3D @GL_GNULIB_READLINK@ +GL_GNULIB_READLINKAT =3D @GL_GNULIB_READLINKAT@ +GL_GNULIB_REALLOCARRAY =3D @GL_GNULIB_REALLOCARRAY@ +GL_GNULIB_REALLOC_POSIX =3D @GL_GNULIB_REALLOC_POSIX@ +GL_GNULIB_REALPATH =3D @GL_GNULIB_REALPATH@ +GL_GNULIB_REMOVE =3D @GL_GNULIB_REMOVE@ +GL_GNULIB_RENAME =3D @GL_GNULIB_RENAME@ +GL_GNULIB_RENAMEAT =3D @GL_GNULIB_RENAMEAT@ +GL_GNULIB_REWINDDIR =3D @GL_GNULIB_REWINDDIR@ +GL_GNULIB_RMDIR =3D @GL_GNULIB_RMDIR@ +GL_GNULIB_RPMATCH =3D @GL_GNULIB_RPMATCH@ +GL_GNULIB_SCANDIR =3D @GL_GNULIB_SCANDIR@ +GL_GNULIB_SCANF =3D @GL_GNULIB_SCANF@ +GL_GNULIB_SECURE_GETENV =3D @GL_GNULIB_SECURE_GETENV@ +GL_GNULIB_SELECT =3D @GL_GNULIB_SELECT@ +GL_GNULIB_SETENV =3D @GL_GNULIB_SETENV@ +GL_GNULIB_SETHOSTNAME =3D @GL_GNULIB_SETHOSTNAME@ +GL_GNULIB_SIGABBREV_NP =3D @GL_GNULIB_SIGABBREV_NP@ +GL_GNULIB_SIGACTION =3D @GL_GNULIB_SIGACTION@ +GL_GNULIB_SIGDESCR_NP =3D @GL_GNULIB_SIGDESCR_NP@ +GL_GNULIB_SIGNAL_H_SIGPIPE =3D @GL_GNULIB_SIGNAL_H_SIGPIPE@ +GL_GNULIB_SIGPROCMASK =3D @GL_GNULIB_SIGPROCMASK@ +GL_GNULIB_SLEEP =3D @GL_GNULIB_SLEEP@ +GL_GNULIB_SNPRINTF =3D @GL_GNULIB_SNPRINTF@ +GL_GNULIB_SPRINTF_POSIX =3D @GL_GNULIB_SPRINTF_POSIX@ +GL_GNULIB_STAT =3D @GL_GNULIB_STAT@ +GL_GNULIB_STDIO_H_NONBLOCKING =3D @GL_GNULIB_STDIO_H_NONBLOCKING@ +GL_GNULIB_STDIO_H_SIGPIPE =3D @GL_GNULIB_STDIO_H_SIGPIPE@ +GL_GNULIB_STPCPY =3D @GL_GNULIB_STPCPY@ +GL_GNULIB_STPNCPY =3D @GL_GNULIB_STPNCPY@ +GL_GNULIB_STRCASESTR =3D @GL_GNULIB_STRCASESTR@ +GL_GNULIB_STRCHRNUL =3D @GL_GNULIB_STRCHRNUL@ +GL_GNULIB_STRDUP =3D @GL_GNULIB_STRDUP@ +GL_GNULIB_STRERROR =3D @GL_GNULIB_STRERROR@ +GL_GNULIB_STRERRORNAME_NP =3D @GL_GNULIB_STRERRORNAME_NP@ +GL_GNULIB_STRERROR_R =3D @GL_GNULIB_STRERROR_R@ +GL_GNULIB_STRFTIME =3D @GL_GNULIB_STRFTIME@ +GL_GNULIB_STRNCAT =3D @GL_GNULIB_STRNCAT@ +GL_GNULIB_STRNDUP =3D @GL_GNULIB_STRNDUP@ +GL_GNULIB_STRNLEN =3D @GL_GNULIB_STRNLEN@ +GL_GNULIB_STRPBRK =3D @GL_GNULIB_STRPBRK@ +GL_GNULIB_STRPTIME =3D @GL_GNULIB_STRPTIME@ +GL_GNULIB_STRSEP =3D @GL_GNULIB_STRSEP@ +GL_GNULIB_STRSIGNAL =3D @GL_GNULIB_STRSIGNAL@ +GL_GNULIB_STRSTR =3D @GL_GNULIB_STRSTR@ +GL_GNULIB_STRTOD =3D @GL_GNULIB_STRTOD@ +GL_GNULIB_STRTOIMAX =3D @GL_GNULIB_STRTOIMAX@ +GL_GNULIB_STRTOK_R =3D @GL_GNULIB_STRTOK_R@ +GL_GNULIB_STRTOL =3D @GL_GNULIB_STRTOL@ +GL_GNULIB_STRTOLD =3D @GL_GNULIB_STRTOLD@ +GL_GNULIB_STRTOLL =3D @GL_GNULIB_STRTOLL@ +GL_GNULIB_STRTOUL =3D @GL_GNULIB_STRTOUL@ +GL_GNULIB_STRTOULL =3D @GL_GNULIB_STRTOULL@ +GL_GNULIB_STRTOUMAX =3D @GL_GNULIB_STRTOUMAX@ +GL_GNULIB_STRVERSCMP =3D @GL_GNULIB_STRVERSCMP@ +GL_GNULIB_SYMLINK =3D @GL_GNULIB_SYMLINK@ +GL_GNULIB_SYMLINKAT =3D @GL_GNULIB_SYMLINKAT@ +GL_GNULIB_SYSTEM_POSIX =3D @GL_GNULIB_SYSTEM_POSIX@ +GL_GNULIB_TIMEGM =3D @GL_GNULIB_TIMEGM@ +GL_GNULIB_TIMESPEC_GET =3D @GL_GNULIB_TIMESPEC_GET@ +GL_GNULIB_TIME_R =3D @GL_GNULIB_TIME_R@ +GL_GNULIB_TIME_RZ =3D @GL_GNULIB_TIME_RZ@ +GL_GNULIB_TMPFILE =3D @GL_GNULIB_TMPFILE@ +GL_GNULIB_TRUNCATE =3D @GL_GNULIB_TRUNCATE@ +GL_GNULIB_TTYNAME_R =3D @GL_GNULIB_TTYNAME_R@ +GL_GNULIB_TZSET =3D @GL_GNULIB_TZSET@ +GL_GNULIB_UNISTD_H_GETOPT =3D @GL_GNULIB_UNISTD_H_GETOPT@ +GL_GNULIB_UNISTD_H_NONBLOCKING =3D @GL_GNULIB_UNISTD_H_NONBLOCKING@ +GL_GNULIB_UNISTD_H_SIGPIPE =3D @GL_GNULIB_UNISTD_H_SIGPIPE@ +GL_GNULIB_UNLINK =3D @GL_GNULIB_UNLINK@ +GL_GNULIB_UNLINKAT =3D @GL_GNULIB_UNLINKAT@ +GL_GNULIB_UNLOCKPT =3D @GL_GNULIB_UNLOCKPT@ +GL_GNULIB_UNSETENV =3D @GL_GNULIB_UNSETENV@ +GL_GNULIB_USLEEP =3D @GL_GNULIB_USLEEP@ +GL_GNULIB_UTIMENSAT =3D @GL_GNULIB_UTIMENSAT@ +GL_GNULIB_VASPRINTF =3D @GL_GNULIB_VASPRINTF@ +GL_GNULIB_VDPRINTF =3D @GL_GNULIB_VDPRINTF@ +GL_GNULIB_VFPRINTF =3D @GL_GNULIB_VFPRINTF@ +GL_GNULIB_VFPRINTF_POSIX =3D @GL_GNULIB_VFPRINTF_POSIX@ +GL_GNULIB_VFSCANF =3D @GL_GNULIB_VFSCANF@ +GL_GNULIB_VPRINTF =3D @GL_GNULIB_VPRINTF@ +GL_GNULIB_VPRINTF_POSIX =3D @GL_GNULIB_VPRINTF_POSIX@ +GL_GNULIB_VSCANF =3D @GL_GNULIB_VSCANF@ +GL_GNULIB_VSNPRINTF =3D @GL_GNULIB_VSNPRINTF@ +GL_GNULIB_VSPRINTF_POSIX =3D @GL_GNULIB_VSPRINTF_POSIX@ +GL_GNULIB_WCTOMB =3D @GL_GNULIB_WCTOMB@ +GL_GNULIB_WRITE =3D @GL_GNULIB_WRITE@ +GL_GNULIB__EXIT =3D @GL_GNULIB__EXIT@ GMALLOC_OBJ =3D @GMALLOC_OBJ@ GMP_H =3D @GMP_H@ -GNULIB_ACCESS =3D @GNULIB_ACCESS@ -GNULIB_ALIGNED_ALLOC =3D @GNULIB_ALIGNED_ALLOC@ -GNULIB_ALPHASORT =3D @GNULIB_ALPHASORT@ -GNULIB_ATOLL =3D @GNULIB_ATOLL@ -GNULIB_CALLOC_POSIX =3D @GNULIB_CALLOC_POSIX@ -GNULIB_CANONICALIZE_FILE_NAME =3D @GNULIB_CANONICALIZE_FILE_NAME@ -GNULIB_CHDIR =3D @GNULIB_CHDIR@ -GNULIB_CHOWN =3D @GNULIB_CHOWN@ -GNULIB_CLOSE =3D @GNULIB_CLOSE@ -GNULIB_CLOSEDIR =3D @GNULIB_CLOSEDIR@ -GNULIB_COPY_FILE_RANGE =3D @GNULIB_COPY_FILE_RANGE@ -GNULIB_CREAT =3D @GNULIB_CREAT@ -GNULIB_CTIME =3D @GNULIB_CTIME@ -GNULIB_DIRFD =3D @GNULIB_DIRFD@ -GNULIB_DPRINTF =3D @GNULIB_DPRINTF@ -GNULIB_DUP =3D @GNULIB_DUP@ -GNULIB_DUP2 =3D @GNULIB_DUP2@ -GNULIB_DUP3 =3D @GNULIB_DUP3@ -GNULIB_ENVIRON =3D @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS =3D @GNULIB_EUIDACCESS@ -GNULIB_EXECL =3D @GNULIB_EXECL@ -GNULIB_EXECLE =3D @GNULIB_EXECLE@ -GNULIB_EXECLP =3D @GNULIB_EXECLP@ -GNULIB_EXECV =3D @GNULIB_EXECV@ -GNULIB_EXECVE =3D @GNULIB_EXECVE@ -GNULIB_EXECVP =3D @GNULIB_EXECVP@ -GNULIB_EXECVPE =3D @GNULIB_EXECVPE@ -GNULIB_EXPLICIT_BZERO =3D @GNULIB_EXPLICIT_BZERO@ -GNULIB_FACCESSAT =3D @GNULIB_FACCESSAT@ -GNULIB_FCHDIR =3D @GNULIB_FCHDIR@ -GNULIB_FCHMODAT =3D @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT =3D @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE =3D @GNULIB_FCLOSE@ -GNULIB_FCNTL =3D @GNULIB_FCNTL@ -GNULIB_FDATASYNC =3D @GNULIB_FDATASYNC@ -GNULIB_FDOPEN =3D @GNULIB_FDOPEN@ -GNULIB_FDOPENDIR =3D @GNULIB_FDOPENDIR@ -GNULIB_FFLUSH =3D @GNULIB_FFLUSH@ -GNULIB_FFSL =3D @GNULIB_FFSL@ -GNULIB_FFSLL =3D @GNULIB_FFSLL@ -GNULIB_FGETC =3D @GNULIB_FGETC@ -GNULIB_FGETS =3D @GNULIB_FGETS@ -GNULIB_FOPEN =3D @GNULIB_FOPEN@ -GNULIB_FPRINTF =3D @GNULIB_FPRINTF@ -GNULIB_FPRINTF_POSIX =3D @GNULIB_FPRINTF_POSIX@ -GNULIB_FPURGE =3D @GNULIB_FPURGE@ -GNULIB_FPUTC =3D @GNULIB_FPUTC@ -GNULIB_FPUTS =3D @GNULIB_FPUTS@ -GNULIB_FREAD =3D @GNULIB_FREAD@ -GNULIB_FREE_POSIX =3D @GNULIB_FREE_POSIX@ -GNULIB_FREOPEN =3D @GNULIB_FREOPEN@ -GNULIB_FSCANF =3D @GNULIB_FSCANF@ -GNULIB_FSEEK =3D @GNULIB_FSEEK@ -GNULIB_FSEEKO =3D @GNULIB_FSEEKO@ -GNULIB_FSTAT =3D @GNULIB_FSTAT@ -GNULIB_FSTATAT =3D @GNULIB_FSTATAT@ -GNULIB_FSYNC =3D @GNULIB_FSYNC@ -GNULIB_FTELL =3D @GNULIB_FTELL@ -GNULIB_FTELLO =3D @GNULIB_FTELLO@ -GNULIB_FTRUNCATE =3D @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS =3D @GNULIB_FUTIMENS@ -GNULIB_FWRITE =3D @GNULIB_FWRITE@ -GNULIB_GETC =3D @GNULIB_GETC@ -GNULIB_GETCHAR =3D @GNULIB_GETCHAR@ -GNULIB_GETCWD =3D @GNULIB_GETCWD@ -GNULIB_GETDELIM =3D @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME =3D @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE =3D @GNULIB_GETDTABLESIZE@ -GNULIB_GETENTROPY =3D @GNULIB_GETENTROPY@ -GNULIB_GETGROUPS =3D @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME =3D @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE =3D @GNULIB_GETLINE@ -GNULIB_GETLOADAVG =3D @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN =3D @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R =3D @GNULIB_GETLOGIN_R@ -GNULIB_GETOPT_POSIX =3D @GNULIB_GETOPT_POSIX@ -GNULIB_GETPAGESIZE =3D @GNULIB_GETPAGESIZE@ -GNULIB_GETPASS =3D @GNULIB_GETPASS@ -GNULIB_GETRANDOM =3D @GNULIB_GETRANDOM@ -GNULIB_GETSUBOPT =3D @GNULIB_GETSUBOPT@ GNULIB_GETTIMEOFDAY =3D @GNULIB_GETTIMEOFDAY@ -GNULIB_GETUMASK =3D @GNULIB_GETUMASK@ -GNULIB_GETUSERSHELL =3D @GNULIB_GETUSERSHELL@ -GNULIB_GL_UNISTD_H_GETOPT =3D @GNULIB_GL_UNISTD_H_GETOPT@ -GNULIB_GRANTPT =3D @GNULIB_GRANTPT@ -GNULIB_GROUP_MEMBER =3D @GNULIB_GROUP_MEMBER@ -GNULIB_IMAXABS =3D @GNULIB_IMAXABS@ -GNULIB_IMAXDIV =3D @GNULIB_IMAXDIV@ -GNULIB_ISATTY =3D @GNULIB_ISATTY@ -GNULIB_LCHMOD =3D @GNULIB_LCHMOD@ -GNULIB_LCHOWN =3D @GNULIB_LCHOWN@ -GNULIB_LINK =3D @GNULIB_LINK@ -GNULIB_LINKAT =3D @GNULIB_LINKAT@ -GNULIB_LOCALTIME =3D @GNULIB_LOCALTIME@ -GNULIB_LSEEK =3D @GNULIB_LSEEK@ -GNULIB_LSTAT =3D @GNULIB_LSTAT@ -GNULIB_MALLOC_POSIX =3D @GNULIB_MALLOC_POSIX@ -GNULIB_MBSCASECMP =3D @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR =3D @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR =3D @GNULIB_MBSCHR@ -GNULIB_MBSCSPN =3D @GNULIB_MBSCSPN@ -GNULIB_MBSLEN =3D @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP =3D @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN =3D @GNULIB_MBSNLEN@ -GNULIB_MBSPBRK =3D @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP =3D @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR =3D @GNULIB_MBSRCHR@ -GNULIB_MBSSEP =3D @GNULIB_MBSSEP@ -GNULIB_MBSSPN =3D @GNULIB_MBSSPN@ -GNULIB_MBSSTR =3D @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R =3D @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC =3D @GNULIB_MBTOWC@ -GNULIB_MDA_ACCESS =3D @GNULIB_MDA_ACCESS@ -GNULIB_MDA_CHDIR =3D @GNULIB_MDA_CHDIR@ -GNULIB_MDA_CHMOD =3D @GNULIB_MDA_CHMOD@ -GNULIB_MDA_CLOSE =3D @GNULIB_MDA_CLOSE@ -GNULIB_MDA_CREAT =3D @GNULIB_MDA_CREAT@ -GNULIB_MDA_DUP =3D @GNULIB_MDA_DUP@ -GNULIB_MDA_DUP2 =3D @GNULIB_MDA_DUP2@ -GNULIB_MDA_ECVT =3D @GNULIB_MDA_ECVT@ -GNULIB_MDA_EXECL =3D @GNULIB_MDA_EXECL@ -GNULIB_MDA_EXECLE =3D @GNULIB_MDA_EXECLE@ -GNULIB_MDA_EXECLP =3D @GNULIB_MDA_EXECLP@ -GNULIB_MDA_EXECV =3D @GNULIB_MDA_EXECV@ -GNULIB_MDA_EXECVE =3D @GNULIB_MDA_EXECVE@ -GNULIB_MDA_EXECVP =3D @GNULIB_MDA_EXECVP@ -GNULIB_MDA_EXECVPE =3D @GNULIB_MDA_EXECVPE@ -GNULIB_MDA_FCLOSEALL =3D @GNULIB_MDA_FCLOSEALL@ -GNULIB_MDA_FCVT =3D @GNULIB_MDA_FCVT@ -GNULIB_MDA_FDOPEN =3D @GNULIB_MDA_FDOPEN@ -GNULIB_MDA_FILENO =3D @GNULIB_MDA_FILENO@ -GNULIB_MDA_GCVT =3D @GNULIB_MDA_GCVT@ -GNULIB_MDA_GETCWD =3D @GNULIB_MDA_GETCWD@ -GNULIB_MDA_GETPID =3D @GNULIB_MDA_GETPID@ -GNULIB_MDA_GETW =3D @GNULIB_MDA_GETW@ -GNULIB_MDA_ISATTY =3D @GNULIB_MDA_ISATTY@ -GNULIB_MDA_LSEEK =3D @GNULIB_MDA_LSEEK@ -GNULIB_MDA_MEMCCPY =3D @GNULIB_MDA_MEMCCPY@ -GNULIB_MDA_MKDIR =3D @GNULIB_MDA_MKDIR@ -GNULIB_MDA_MKTEMP =3D @GNULIB_MDA_MKTEMP@ -GNULIB_MDA_OPEN =3D @GNULIB_MDA_OPEN@ -GNULIB_MDA_PUTENV =3D @GNULIB_MDA_PUTENV@ -GNULIB_MDA_PUTW =3D @GNULIB_MDA_PUTW@ -GNULIB_MDA_READ =3D @GNULIB_MDA_READ@ -GNULIB_MDA_RMDIR =3D @GNULIB_MDA_RMDIR@ -GNULIB_MDA_STRDUP =3D @GNULIB_MDA_STRDUP@ -GNULIB_MDA_SWAB =3D @GNULIB_MDA_SWAB@ -GNULIB_MDA_TEMPNAM =3D @GNULIB_MDA_TEMPNAM@ -GNULIB_MDA_TZSET =3D @GNULIB_MDA_TZSET@ -GNULIB_MDA_UMASK =3D @GNULIB_MDA_UMASK@ -GNULIB_MDA_UNLINK =3D @GNULIB_MDA_UNLINK@ -GNULIB_MDA_WRITE =3D @GNULIB_MDA_WRITE@ -GNULIB_MEMCHR =3D @GNULIB_MEMCHR@ -GNULIB_MEMMEM =3D @GNULIB_MEMMEM@ -GNULIB_MEMPCPY =3D @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR =3D @GNULIB_MEMRCHR@ -GNULIB_MKDIR =3D @GNULIB_MKDIR@ -GNULIB_MKDIRAT =3D @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP =3D @GNULIB_MKDTEMP@ -GNULIB_MKFIFO =3D @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT =3D @GNULIB_MKFIFOAT@ -GNULIB_MKNOD =3D @GNULIB_MKNOD@ -GNULIB_MKNODAT =3D @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP =3D @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS =3D @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP =3D @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS =3D @GNULIB_MKSTEMPS@ -GNULIB_MKTIME =3D @GNULIB_MKTIME@ -GNULIB_NANOSLEEP =3D @GNULIB_NANOSLEEP@ -GNULIB_NONBLOCKING =3D @GNULIB_NONBLOCKING@ -GNULIB_OBSTACK_PRINTF =3D @GNULIB_OBSTACK_PRINTF@ -GNULIB_OBSTACK_PRINTF_POSIX =3D @GNULIB_OBSTACK_PRINTF_POSIX@ -GNULIB_OPEN =3D @GNULIB_OPEN@ -GNULIB_OPENAT =3D @GNULIB_OPENAT@ -GNULIB_OPENDIR =3D @GNULIB_OPENDIR@ -GNULIB_OVERRIDES_STRUCT_STAT =3D @GNULIB_OVERRIDES_STRUCT_STAT@ GNULIB_OVERRIDES_WINT_T =3D @GNULIB_OVERRIDES_WINT_T@ -GNULIB_PCLOSE =3D @GNULIB_PCLOSE@ -GNULIB_PERROR =3D @GNULIB_PERROR@ -GNULIB_PIPE =3D @GNULIB_PIPE@ -GNULIB_PIPE2 =3D @GNULIB_PIPE2@ -GNULIB_POPEN =3D @GNULIB_POPEN@ -GNULIB_POSIX_MEMALIGN =3D @GNULIB_POSIX_MEMALIGN@ -GNULIB_POSIX_OPENPT =3D @GNULIB_POSIX_OPENPT@ -GNULIB_PREAD =3D @GNULIB_PREAD@ -GNULIB_PRINTF =3D @GNULIB_PRINTF@ -GNULIB_PRINTF_POSIX =3D @GNULIB_PRINTF_POSIX@ -GNULIB_PSELECT =3D @GNULIB_PSELECT@ -GNULIB_PTHREAD_SIGMASK =3D @GNULIB_PTHREAD_SIGMASK@ -GNULIB_PTSNAME =3D @GNULIB_PTSNAME@ -GNULIB_PTSNAME_R =3D @GNULIB_PTSNAME_R@ -GNULIB_PUTC =3D @GNULIB_PUTC@ -GNULIB_PUTCHAR =3D @GNULIB_PUTCHAR@ -GNULIB_PUTENV =3D @GNULIB_PUTENV@ -GNULIB_PUTS =3D @GNULIB_PUTS@ -GNULIB_PWRITE =3D @GNULIB_PWRITE@ -GNULIB_QSORT_R =3D @GNULIB_QSORT_R@ -GNULIB_RAISE =3D @GNULIB_RAISE@ -GNULIB_RANDOM =3D @GNULIB_RANDOM@ -GNULIB_RANDOM_R =3D @GNULIB_RANDOM_R@ -GNULIB_RAWMEMCHR =3D @GNULIB_RAWMEMCHR@ -GNULIB_READ =3D @GNULIB_READ@ -GNULIB_READDIR =3D @GNULIB_READDIR@ -GNULIB_READLINK =3D @GNULIB_READLINK@ -GNULIB_READLINKAT =3D @GNULIB_READLINKAT@ -GNULIB_REALLOCARRAY =3D @GNULIB_REALLOCARRAY@ -GNULIB_REALLOC_POSIX =3D @GNULIB_REALLOC_POSIX@ -GNULIB_REALPATH =3D @GNULIB_REALPATH@ -GNULIB_REMOVE =3D @GNULIB_REMOVE@ -GNULIB_RENAME =3D @GNULIB_RENAME@ -GNULIB_RENAMEAT =3D @GNULIB_RENAMEAT@ -GNULIB_REWINDDIR =3D @GNULIB_REWINDDIR@ -GNULIB_RMDIR =3D @GNULIB_RMDIR@ -GNULIB_RPMATCH =3D @GNULIB_RPMATCH@ -GNULIB_SCANDIR =3D @GNULIB_SCANDIR@ -GNULIB_SCANF =3D @GNULIB_SCANF@ -GNULIB_SECURE_GETENV =3D @GNULIB_SECURE_GETENV@ -GNULIB_SELECT =3D @GNULIB_SELECT@ -GNULIB_SETENV =3D @GNULIB_SETENV@ -GNULIB_SETHOSTNAME =3D @GNULIB_SETHOSTNAME@ -GNULIB_SIGABBREV_NP =3D @GNULIB_SIGABBREV_NP@ -GNULIB_SIGACTION =3D @GNULIB_SIGACTION@ -GNULIB_SIGDESCR_NP =3D @GNULIB_SIGDESCR_NP@ -GNULIB_SIGNAL_H_SIGPIPE =3D @GNULIB_SIGNAL_H_SIGPIPE@ -GNULIB_SIGPROCMASK =3D @GNULIB_SIGPROCMASK@ -GNULIB_SLEEP =3D @GNULIB_SLEEP@ -GNULIB_SNPRINTF =3D @GNULIB_SNPRINTF@ -GNULIB_SPRINTF_POSIX =3D @GNULIB_SPRINTF_POSIX@ -GNULIB_STAT =3D @GNULIB_STAT@ -GNULIB_STDIO_H_NONBLOCKING =3D @GNULIB_STDIO_H_NONBLOCKING@ -GNULIB_STDIO_H_SIGPIPE =3D @GNULIB_STDIO_H_SIGPIPE@ -GNULIB_STPCPY =3D @GNULIB_STPCPY@ -GNULIB_STPNCPY =3D @GNULIB_STPNCPY@ -GNULIB_STRCASESTR =3D @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL =3D @GNULIB_STRCHRNUL@ -GNULIB_STRDUP =3D @GNULIB_STRDUP@ -GNULIB_STRERROR =3D @GNULIB_STRERROR@ -GNULIB_STRERRORNAME_NP =3D @GNULIB_STRERRORNAME_NP@ -GNULIB_STRERROR_R =3D @GNULIB_STRERROR_R@ -GNULIB_STRFTIME =3D @GNULIB_STRFTIME@ -GNULIB_STRNCAT =3D @GNULIB_STRNCAT@ -GNULIB_STRNDUP =3D @GNULIB_STRNDUP@ -GNULIB_STRNLEN =3D @GNULIB_STRNLEN@ -GNULIB_STRPBRK =3D @GNULIB_STRPBRK@ -GNULIB_STRPTIME =3D @GNULIB_STRPTIME@ -GNULIB_STRSEP =3D @GNULIB_STRSEP@ -GNULIB_STRSIGNAL =3D @GNULIB_STRSIGNAL@ -GNULIB_STRSTR =3D @GNULIB_STRSTR@ -GNULIB_STRTOD =3D @GNULIB_STRTOD@ -GNULIB_STRTOIMAX =3D @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R =3D @GNULIB_STRTOK_R@ -GNULIB_STRTOLD =3D @GNULIB_STRTOLD@ -GNULIB_STRTOLL =3D @GNULIB_STRTOLL@ -GNULIB_STRTOULL =3D @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX =3D @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP =3D @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK =3D @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT =3D @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX =3D @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM =3D @GNULIB_TIMEGM@ -GNULIB_TIMESPEC_GET =3D @GNULIB_TIMESPEC_GET@ -GNULIB_TIME_R =3D @GNULIB_TIME_R@ -GNULIB_TIME_RZ =3D @GNULIB_TIME_RZ@ -GNULIB_TMPFILE =3D @GNULIB_TMPFILE@ -GNULIB_TRUNCATE =3D @GNULIB_TRUNCATE@ -GNULIB_TTYNAME_R =3D @GNULIB_TTYNAME_R@ -GNULIB_TZSET =3D @GNULIB_TZSET@ -GNULIB_UNISTD_H_NONBLOCKING =3D @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE =3D @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK =3D @GNULIB_UNLINK@ -GNULIB_UNLINKAT =3D @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT =3D @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV =3D @GNULIB_UNSETENV@ -GNULIB_USLEEP =3D @GNULIB_USLEEP@ -GNULIB_UTIMENSAT =3D @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF =3D @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF =3D @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF =3D @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX =3D @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF =3D @GNULIB_VFSCANF@ -GNULIB_VPRINTF =3D @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX =3D @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF =3D @GNULIB_VSCANF@ -GNULIB_VSNPRINTF =3D @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX =3D @GNULIB_VSPRINTF_POSIX@ GNULIB_WARN_CFLAGS =3D @GNULIB_WARN_CFLAGS@ -GNULIB_WCTOMB =3D @GNULIB_WCTOMB@ -GNULIB_WRITE =3D @GNULIB_WRITE@ -GNULIB__EXIT =3D @GNULIB__EXIT@ GNUSTEP_CFLAGS =3D @GNUSTEP_CFLAGS@ GNU_OBJC_CFLAGS =3D @GNU_OBJC_CFLAGS@ GOBJECT_CFLAGS =3D @GOBJECT_CFLAGS@ @@ -653,10 +655,10 @@ HAVE_INTTYPES_H =3D @HAVE_INTTYPES_H@ HAVE_LCHMOD =3D @HAVE_LCHMOD@ HAVE_LCHOWN =3D @HAVE_LCHOWN@ HAVE_LIBGMP =3D @HAVE_LIBGMP@ +HAVE_LIBSECCOMP =3D @HAVE_LIBSECCOMP@ HAVE_LINK =3D @HAVE_LINK@ HAVE_LINKAT =3D @HAVE_LINKAT@ HAVE_LSTAT =3D @HAVE_LSTAT@ -HAVE_MAKEINFO =3D @HAVE_MAKEINFO@ HAVE_MAX_ALIGN_T =3D @HAVE_MAX_ALIGN_T@ HAVE_MBSLEN =3D @HAVE_MBSLEN@ HAVE_MBTOWC =3D @HAVE_MBTOWC@ @@ -673,6 +675,7 @@ HAVE_MKSTEMP =3D @HAVE_MKSTEMP@ HAVE_MKSTEMPS =3D @HAVE_MKSTEMPS@ HAVE_MODULES =3D @HAVE_MODULES@ HAVE_NANOSLEEP =3D @HAVE_NANOSLEEP@ +HAVE_NATIVE_COMP =3D @HAVE_NATIVE_COMP@ HAVE_OPENAT =3D @HAVE_OPENAT@ HAVE_OPENDIR =3D @HAVE_OPENDIR@ HAVE_OS_H =3D @HAVE_OS_H@ @@ -705,6 +708,7 @@ HAVE_RENAMEAT =3D @HAVE_RENAMEAT@ HAVE_REWINDDIR =3D @HAVE_REWINDDIR@ HAVE_RPMATCH =3D @HAVE_RPMATCH@ HAVE_SCANDIR =3D @HAVE_SCANDIR@ +HAVE_SECCOMP =3D @HAVE_SECCOMP@ HAVE_SECURE_GETENV =3D @HAVE_SECURE_GETENV@ HAVE_SETENV =3D @HAVE_SETENV@ HAVE_SETHOSTNAME =3D @HAVE_SETHOSTNAME@ @@ -729,8 +733,10 @@ HAVE_STRPBRK =3D @HAVE_STRPBRK@ HAVE_STRPTIME =3D @HAVE_STRPTIME@ HAVE_STRSEP =3D @HAVE_STRSEP@ HAVE_STRTOD =3D @HAVE_STRTOD@ +HAVE_STRTOL =3D @HAVE_STRTOL@ HAVE_STRTOLD =3D @HAVE_STRTOLD@ HAVE_STRTOLL =3D @HAVE_STRTOLL@ +HAVE_STRTOUL =3D @HAVE_STRTOUL@ HAVE_STRTOULL =3D @HAVE_STRTOULL@ HAVE_STRUCT_RANDOM_DATA =3D @HAVE_STRUCT_RANDOM_DATA@ HAVE_STRUCT_SIGACTION_SA_SIGACTION =3D @HAVE_STRUCT_SIGACTION_SA_SIGACTI= ON@ @@ -790,6 +796,7 @@ LD_SWITCH_SYSTEM =3D @LD_SWITCH_SYSTEM@ LD_SWITCH_SYSTEM_TEMACS =3D @LD_SWITCH_SYSTEM_TEMACS@ LD_SWITCH_X_SITE =3D @LD_SWITCH_X_SITE@ LD_SWITCH_X_SITE_RPATH =3D @LD_SWITCH_X_SITE_RPATH@ +LIBGCCJIT_LIB =3D @LIBGCCJIT_LIB@ LIBGIF =3D @LIBGIF@ LIBGMP =3D @LIBGMP@ LIBGNUTLS_CFLAGS =3D @LIBGNUTLS_CFLAGS@ @@ -807,6 +814,8 @@ LIBOTF_LIBS =3D @LIBOTF_LIBS@ LIBPNG =3D @LIBPNG@ LIBRESOLV =3D @LIBRESOLV@ LIBS =3D @LIBS@ +LIBSECCOMP_CFLAGS =3D @LIBSECCOMP_CFLAGS@ +LIBSECCOMP_LIBS =3D @LIBSECCOMP_LIBS@ LIBSELINUX_LIBS =3D @LIBSELINUX_LIBS@ LIBSOUND =3D @LIBSOUND@ LIBSYSTEMD_CFLAGS =3D @LIBSYSTEMD_CFLAGS@ @@ -832,6 +841,7 @@ LIB_CLOCK_GETTIME =3D @LIB_CLOCK_GETTIME@ LIB_EACCESS =3D @LIB_EACCESS@ LIB_EXECINFO =3D @LIB_EXECINFO@ LIB_GETRANDOM =3D @LIB_GETRANDOM@ +LIB_HAS_ACL =3D @LIB_HAS_ACL@ LIB_MATH =3D @LIB_MATH@ LIB_PTHREAD =3D @LIB_PTHREAD@ LIB_PTHREAD_SIGMASK =3D @LIB_PTHREAD_SIGMASK@ @@ -1023,6 +1033,7 @@ REPLACE_READ =3D @REPLACE_READ@ REPLACE_READLINK =3D @REPLACE_READLINK@ REPLACE_READLINKAT =3D @REPLACE_READLINKAT@ REPLACE_REALLOC =3D @REPLACE_REALLOC@ +REPLACE_REALLOCARRAY =3D @REPLACE_REALLOCARRAY@ REPLACE_REALPATH =3D @REPLACE_REALPATH@ REPLACE_REMOVE =3D @REPLACE_REMOVE@ REPLACE_RENAME =3D @REPLACE_RENAME@ @@ -1053,7 +1064,11 @@ REPLACE_STRSTR =3D @REPLACE_STRSTR@ REPLACE_STRTOD =3D @REPLACE_STRTOD@ REPLACE_STRTOIMAX =3D @REPLACE_STRTOIMAX@ REPLACE_STRTOK_R =3D @REPLACE_STRTOK_R@ +REPLACE_STRTOL =3D @REPLACE_STRTOL@ REPLACE_STRTOLD =3D @REPLACE_STRTOLD@ +REPLACE_STRTOLL =3D @REPLACE_STRTOLL@ +REPLACE_STRTOUL =3D @REPLACE_STRTOUL@ +REPLACE_STRTOULL =3D @REPLACE_STRTOULL@ REPLACE_STRTOUMAX =3D @REPLACE_STRTOUMAX@ REPLACE_STRUCT_TIMEVAL =3D @REPLACE_STRUCT_TIMEVAL@ REPLACE_SYMLINK =3D @REPLACE_SYMLINK@ @@ -1104,6 +1119,7 @@ UNISTD_H_HAVE_SYS_RANDOM_H =3D @UNISTD_H_HAVE_SYS_R= ANDOM_H@ UNISTD_H_HAVE_WINSOCK2_H =3D @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS =3D @UNISTD_H_HAVE_WINSOCK2_H_A= ND_USE_SOCKETS@ USE_ACL =3D @USE_ACL@ +USE_STARTUP_NOTIFICATION =3D @USE_STARTUP_NOTIFICATION@ VMLIMIT_OBJ =3D @VMLIMIT_OBJ@ W32_LIBS =3D @W32_LIBS@ W32_OBJ =3D @W32_OBJ@ @@ -1172,17 +1188,18 @@ gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb= 7 =3D @gl_GNULIB_ENABLED_03e0aaad gl_GNULIB_ENABLED_260941c0e5dc67ec9e87d1fb321c300b =3D @gl_GNULIB_ENABLE= D_260941c0e5dc67ec9e87d1fb321c300b@ gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31 =3D @gl_GNULIB_ENABLE= D_5264294aa0a5557541b53c8c741f7f31@ gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c =3D @gl_GNULIB_ENABLE= D_6099e9737f757db36c47fa9d9f02e88c@ +gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4 =3D @gl_GNULIB_ENABLE= D_61bcaca76b3e6f9ae55d57a1c3193bc4@ gl_GNULIB_ENABLED_682e609604ccaac6be382e4ee3a4eaec =3D @gl_GNULIB_ENABLE= D_682e609604ccaac6be382e4ee3a4eaec@ gl_GNULIB_ENABLED_925677f0343de64b89a9f0c790b4104c =3D @gl_GNULIB_ENABLE= D_925677f0343de64b89a9f0c790b4104c@ gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1 =3D @gl_GNULIB_ENABLE= D_a9786850e999ae65a836a6041e8e5ed1@ gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36 =3D @gl_GNULIB_ENABLE= D_be453cec5eecf5731a274f2de7f2db36@ gl_GNULIB_ENABLED_cloexec =3D @gl_GNULIB_ENABLED_cloexec@ +gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b =3D @gl_GNULIB_ENABLE= D_d3b2383720ee0e541357aa2aac598e2b@ gl_GNULIB_ENABLED_dirfd =3D @gl_GNULIB_ENABLED_dirfd@ gl_GNULIB_ENABLED_dynarray =3D @gl_GNULIB_ENABLED_dynarray@ gl_GNULIB_ENABLED_euidaccess =3D @gl_GNULIB_ENABLED_euidaccess@ gl_GNULIB_ENABLED_getdtablesize =3D @gl_GNULIB_ENABLED_getdtablesize@ gl_GNULIB_ENABLED_getgroups =3D @gl_GNULIB_ENABLED_getgroups@ -gl_GNULIB_ENABLED_idx =3D @gl_GNULIB_ENABLED_idx@ gl_GNULIB_ENABLED_lchmod =3D @gl_GNULIB_ENABLED_lchmod@ gl_GNULIB_ENABLED_open =3D @gl_GNULIB_ENABLED_open@ gl_GNULIB_ENABLED_rawmemchr =3D @gl_GNULIB_ENABLED_rawmemchr@ @@ -1206,6 +1223,7 @@ libdir =3D @libdir@ libexecdir =3D @libexecdir@ liblockfile =3D @liblockfile@ lispdir =3D @lispdir@ +lispdirrel =3D @lispdirrel@ lisppath =3D @lisppath@ localedir =3D @localedir@ locallisppath =3D @locallisppath@ @@ -1213,6 +1231,8 @@ localstatedir =3D @localstatedir@ mandir =3D @mandir@ ns_appbindir =3D @ns_appbindir@ ns_appdir =3D @ns_appdir@ +ns_applibdir =3D @ns_applibdir@ +ns_applibexecdir =3D @ns_applibexecdir@ ns_appresdir =3D @ns_appresdir@ ns_appsrc =3D @ns_appsrc@ ns_check_file =3D @ns_check_file@ @@ -1222,6 +1242,7 @@ pdfdir =3D @pdfdir@ prefix =3D @prefix@ program_transform_name =3D @program_transform_name@ psdir =3D @psdir@ +runstatedir =3D @runstatedir@ sbindir =3D @sbindir@ sharedstatedir =3D @sharedstatedir@ srcdir =3D @srcdir@ @@ -1514,14 +1535,14 @@ dirent.h: dirent.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_DIRENT_H''@|$(NEXT_DIRENT_H)|g' \ - -e 's/@''GNULIB_OPENDIR''@/$(GNULIB_OPENDIR)/g' \ - -e 's/@''GNULIB_READDIR''@/$(GNULIB_READDIR)/g' \ - -e 's/@''GNULIB_REWINDDIR''@/$(GNULIB_REWINDDIR)/g' \ - -e 's/@''GNULIB_CLOSEDIR''@/$(GNULIB_CLOSEDIR)/g' \ - -e 's/@''GNULIB_DIRFD''@/$(GNULIB_DIRFD)/g' \ - -e 's/@''GNULIB_FDOPENDIR''@/$(GNULIB_FDOPENDIR)/g' \ - -e 's/@''GNULIB_SCANDIR''@/$(GNULIB_SCANDIR)/g' \ - -e 's/@''GNULIB_ALPHASORT''@/$(GNULIB_ALPHASORT)/g' \ + -e 's/@''GNULIB_OPENDIR''@/$(GL_GNULIB_OPENDIR)/g' \ + -e 's/@''GNULIB_READDIR''@/$(GL_GNULIB_READDIR)/g' \ + -e 's/@''GNULIB_REWINDDIR''@/$(GL_GNULIB_REWINDDIR)/g' \ + -e 's/@''GNULIB_CLOSEDIR''@/$(GL_GNULIB_CLOSEDIR)/g' \ + -e 's/@''GNULIB_DIRFD''@/$(GL_GNULIB_DIRFD)/g' \ + -e 's/@''GNULIB_FDOPENDIR''@/$(GL_GNULIB_FDOPENDIR)/g' \ + -e 's/@''GNULIB_SCANDIR''@/$(GL_GNULIB_SCANDIR)/g' \ + -e 's/@''GNULIB_ALPHASORT''@/$(GL_GNULIB_ALPHASORT)/g' \ -e 's/@''HAVE_OPENDIR''@/$(HAVE_OPENDIR)/g' \ -e 's/@''HAVE_READDIR''@/$(HAVE_READDIR)/g' \ -e 's/@''HAVE_REWINDDIR''@/$(HAVE_REWINDDIR)/g' \ @@ -1596,6 +1617,32 @@ endif ifeq (,$(OMIT_GNULIB_MODULE_dynarray)) =20 ifneq (,$(gl_GNULIB_ENABLED_dynarray)) +BUILT_SOURCES +=3D malloc/dynarray.gl.h malloc/dynarray-skeleton.gl.h + +malloc/dynarray.gl.h: malloc/dynarray.h + $(AM_V_at)$(MKDIR_P) malloc + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e '/libc_hidden_proto/d' < $(srcdir)/malloc/dynarray.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES +=3D malloc/dynarray.gl.h malloc/dynarray.gl.h-t + +malloc/dynarray-skeleton.gl.h: malloc/dynarray-skeleton.c + $(AM_V_at)$(MKDIR_P) malloc + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|||g' \ + -e 's|__attribute_maybe_unused__|_GL_ATTRIBUTE_MAYBE_UNUSED|g' \ + -e 's|__attribute_nonnull__|_GL_ATTRIBUTE_NONNULL|g' \ + -e 's|__attribute_warn_unused_result__|_GL_ATTRIBUTE_NODISCARD|g'= \ + -e 's|__glibc_likely|_GL_LIKELY|g' \ + -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ + < $(srcdir)/malloc/dynarray-skeleton.c; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES +=3D malloc/dynarray-skeleton.gl.h malloc/dynarray-skel= eton.gl.h-t + libgnu_a_SOURCES +=3D malloc/dynarray_at_failure.c mallo= c/dynarray_emplace_enlarge.c malloc/dynarray_finalize.c = malloc/dynarray_resize.c malloc/dynarray_r= esize_clear.c =20 endif @@ -1752,13 +1799,13 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status= $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ - -e 's/@''GNULIB_CREAT''@/$(GNULIB_CREAT)/g' \ - -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ - -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ - -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ - -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ - -e 's/@''GNULIB_MDA_CREAT''@/$(GNULIB_MDA_CREAT)/g' \ - -e 's/@''GNULIB_MDA_OPEN''@/$(GNULIB_MDA_OPEN)/g' \ + -e 's/@''GNULIB_CREAT''@/$(GL_GNULIB_CREAT)/g' \ + -e 's/@''GNULIB_FCNTL''@/$(GL_GNULIB_FCNTL)/g' \ + -e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \ + -e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \ + -e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \ + -e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \ + -e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ -e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \ @@ -2043,10 +2090,8 @@ endif ## begin gnulib module idx ifeq (,$(OMIT_GNULIB_MODULE_idx)) =20 -ifneq (,$(gl_GNULIB_ENABLED_idx)) libgnu_a_SOURCES +=3D idx.h =20 -endif endif ## end gnulib module idx =20 @@ -2111,10 +2156,10 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.= status $(CXXDEFS_H) $(WARN_ON_U -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ - -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ - -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ - -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \ - -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \ + -e 's/@''GNULIB_IMAXABS''@/$(GL_GNULIB_IMAXABS)/g' \ + -e 's/@''GNULIB_IMAXDIV''@/$(GL_GNULIB_IMAXDIV)/g' \ + -e 's/@''GNULIB_STRTOIMAX''@/$(GL_GNULIB_STRTOIMAX)/g' \ + -e 's/@''GNULIB_STRTOUMAX''@/$(GL_GNULIB_STRTOUMAX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \ @@ -2424,6 +2469,32 @@ EXTRA_libgnu_a_SOURCES +=3D at-func.c readlinkat.c= endif ## end gnulib module readlinkat =20 +## begin gnulib module realloc-gnu +ifeq (,$(OMIT_GNULIB_MODULE_realloc-gnu)) + +ifneq (,$(gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b)) + +endif +EXTRA_DIST +=3D realloc.c + +EXTRA_libgnu_a_SOURCES +=3D realloc.c + +endif +## end gnulib module realloc-gnu + +## begin gnulib module realloc-posix +ifeq (,$(OMIT_GNULIB_MODULE_realloc-posix)) + +ifneq (,$(gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4)) + +endif +EXTRA_DIST +=3D realloc.c + +EXTRA_libgnu_a_SOURCES +=3D realloc.c + +endif +## end gnulib module realloc-posix + ## begin gnulib module regex ifeq (,$(OMIT_GNULIB_MODULE_regex)) =20 @@ -2450,6 +2521,21 @@ endif ifeq (,$(OMIT_GNULIB_MODULE_scratch_buffer)) =20 ifneq (,$(gl_GNULIB_ENABLED_scratch_buffer)) +BUILT_SOURCES +=3D malloc/scratch_buffer.gl.h + +malloc/scratch_buffer.gl.h: malloc/scratch_buffer.h + $(AM_V_at)$(MKDIR_P) malloc + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|__always_inline|inline _GL_ATTRIBUTE_ALWAYS_INLINE|g' \ + -e 's|__glibc_likely|_GL_LIKELY|g' \ + -e 's|__glibc_unlikely|_GL_UNLIKELY|g' \ + -e '/libc_hidden_proto/d' \ + < $(srcdir)/malloc/scratch_buffer.h; \ + } > $@-t && \ + mv $@-t $@ +MOSTLYCLEANFILES +=3D malloc/scratch_buffer.gl.h malloc/scratch_buffer.g= l.h-t + libgnu_a_SOURCES +=3D malloc/scratch_buffer_dupfree.c ma= lloc/scratch_buffer_grow.c malloc/scratch_buffer_grow_pre= serve.c malloc/scratch_buffer_set_array_size.c =20 endif @@ -2495,11 +2581,11 @@ signal.h: signal.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \ - -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GNULIB_PTHREAD_SIGMASK)/g' \= - -e 's/@''GNULIB_RAISE''@/$(GNULIB_RAISE)/g' \ - -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GNULIB_SIGNAL_H_SIGPIPE)/g'= \ - -e 's/@''GNULIB_SIGPROCMASK''@/$(GNULIB_SIGPROCMASK)/g' \ - -e 's/@''GNULIB_SIGACTION''@/$(GNULIB_SIGACTION)/g' \ + -e 's/@''GNULIB_PTHREAD_SIGMASK''@/$(GL_GNULIB_PTHREAD_SIGMASK)/g= ' \ + -e 's/@''GNULIB_RAISE''@/$(GL_GNULIB_RAISE)/g' \ + -e 's/@''GNULIB_SIGNAL_H_SIGPIPE''@/$(GL_GNULIB_SIGNAL_H_SIGPIPE)= /g' \ + -e 's/@''GNULIB_SIGPROCMASK''@/$(GL_GNULIB_SIGPROCMASK)/g' \ + -e 's/@''GNULIB_SIGACTION''@/$(GL_GNULIB_SIGACTION)/g' \ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING= )|g' \ -e 's|@''HAVE_PTHREAD_SIGMASK''@|$(HAVE_PTHREAD_SIGMASK)|g' \ -e 's|@''HAVE_RAISE''@|$(HAVE_RAISE)|g' \ @@ -2685,7 +2771,7 @@ stdint.h: stdint.in.h $(top_builddir)/config.status= -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - -e 's/@''GNULIB_OVERRIDES_WINT_T''@/$(GNULIB_OVERRIDES_WINT_T)/g'= \ + -e 's/@''GNULIBHEADERS_OVERRIDE_WINT_T''@/$(GNULIBHEADERS_OVERRID= E_WINT_T)/g' \ < $(srcdir)/stdint.in.h; \ } > $@-t && \ mv $@-t $@ @@ -2715,65 +2801,65 @@ stdio.h: stdio.in.h $(top_builddir)/config.status= $(CXXDEFS_H) $(ARG_NONNULL_H) -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ - -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ - -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ - -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ - -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ - -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ - -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ - -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ - -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ - -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ - -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ - -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ - -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ - -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ - -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ - -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ - -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ - -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ - -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ - -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ - -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ - -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ - -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_P= OSIX)/g' \ - -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ - -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ - -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ - -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ - -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ - -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ - -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ - -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ - -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ - -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ - -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ - -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ - -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKI= NG)/g' \ - -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \= - -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ - -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ - -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ - -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ - -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ - -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ - -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GNULIB_MDA_FCLOSEALL)/g' \ - -e 's/@''GNULIB_MDA_FDOPEN''@/$(GNULIB_MDA_FDOPEN)/g' \ - -e 's/@''GNULIB_MDA_FILENO''@/$(GNULIB_MDA_FILENO)/g' \ - -e 's/@''GNULIB_MDA_GETW''@/$(GNULIB_MDA_GETW)/g' \ - -e 's/@''GNULIB_MDA_PUTW''@/$(GNULIB_MDA_PUTW)/g' \ - -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GNULIB_MDA_TEMPNAM)/g' \ + -e 's/@''GNULIB_DPRINTF''@/$(GL_GNULIB_DPRINTF)/g' \ + -e 's/@''GNULIB_FCLOSE''@/$(GL_GNULIB_FCLOSE)/g' \ + -e 's/@''GNULIB_FDOPEN''@/$(GL_GNULIB_FDOPEN)/g' \ + -e 's/@''GNULIB_FFLUSH''@/$(GL_GNULIB_FFLUSH)/g' \ + -e 's/@''GNULIB_FGETC''@/$(GL_GNULIB_FGETC)/g' \ + -e 's/@''GNULIB_FGETS''@/$(GL_GNULIB_FGETS)/g' \ + -e 's/@''GNULIB_FOPEN''@/$(GL_GNULIB_FOPEN)/g' \ + -e 's/@''GNULIB_FPRINTF''@/$(GL_GNULIB_FPRINTF)/g' \ + -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GL_GNULIB_FPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_FPURGE''@/$(GL_GNULIB_FPURGE)/g' \ + -e 's/@''GNULIB_FPUTC''@/$(GL_GNULIB_FPUTC)/g' \ + -e 's/@''GNULIB_FPUTS''@/$(GL_GNULIB_FPUTS)/g' \ + -e 's/@''GNULIB_FREAD''@/$(GL_GNULIB_FREAD)/g' \ + -e 's/@''GNULIB_FREOPEN''@/$(GL_GNULIB_FREOPEN)/g' \ + -e 's/@''GNULIB_FSCANF''@/$(GL_GNULIB_FSCANF)/g' \ + -e 's/@''GNULIB_FSEEK''@/$(GL_GNULIB_FSEEK)/g' \ + -e 's/@''GNULIB_FSEEKO''@/$(GL_GNULIB_FSEEKO)/g' \ + -e 's/@''GNULIB_FTELL''@/$(GL_GNULIB_FTELL)/g' \ + -e 's/@''GNULIB_FTELLO''@/$(GL_GNULIB_FTELLO)/g' \ + -e 's/@''GNULIB_FWRITE''@/$(GL_GNULIB_FWRITE)/g' \ + -e 's/@''GNULIB_GETC''@/$(GL_GNULIB_GETC)/g' \ + -e 's/@''GNULIB_GETCHAR''@/$(GL_GNULIB_GETCHAR)/g' \ + -e 's/@''GNULIB_GETDELIM''@/$(GL_GNULIB_GETDELIM)/g' \ + -e 's/@''GNULIB_GETLINE''@/$(GL_GNULIB_GETLINE)/g' \ + -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GL_GNULIB_OBSTACK_PRINTF)/g' = \ + -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GL_GNULIB_OBSTACK_PRINT= F_POSIX)/g' \ + -e 's/@''GNULIB_PCLOSE''@/$(GL_GNULIB_PCLOSE)/g' \ + -e 's/@''GNULIB_PERROR''@/$(GL_GNULIB_PERROR)/g' \ + -e 's/@''GNULIB_POPEN''@/$(GL_GNULIB_POPEN)/g' \ + -e 's/@''GNULIB_PRINTF''@/$(GL_GNULIB_PRINTF)/g' \ + -e 's/@''GNULIB_PRINTF_POSIX''@/$(GL_GNULIB_PRINTF_POSIX)/g' \ + -e 's/@''GNULIB_PUTC''@/$(GL_GNULIB_PUTC)/g' \ + -e 's/@''GNULIB_PUTCHAR''@/$(GL_GNULIB_PUTCHAR)/g' \ + -e 's/@''GNULIB_PUTS''@/$(GL_GNULIB_PUTS)/g' \ + -e 's/@''GNULIB_REMOVE''@/$(GL_GNULIB_REMOVE)/g' \ + -e 's/@''GNULIB_RENAME''@/$(GL_GNULIB_RENAME)/g' \ + -e 's/@''GNULIB_RENAMEAT''@/$(GL_GNULIB_RENAMEAT)/g' \ + -e 's/@''GNULIB_SCANF''@/$(GL_GNULIB_SCANF)/g' \ + -e 's/@''GNULIB_SNPRINTF''@/$(GL_GNULIB_SNPRINTF)/g' \ + -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GL_GNULIB_SPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GL_GNULIB_STDIO_H_NONBLO= CKING)/g' \ + -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GL_GNULIB_STDIO_H_SIGPIPE)/g= ' \ + -e 's/@''GNULIB_TMPFILE''@/$(GL_GNULIB_TMPFILE)/g' \ + -e 's/@''GNULIB_VASPRINTF''@/$(GL_GNULIB_VASPRINTF)/g' \ + -e 's/@''GNULIB_VDPRINTF''@/$(GL_GNULIB_VDPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF''@/$(GL_GNULIB_VFPRINTF)/g' \ + -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GL_GNULIB_VFPRINTF_POSIX)/g' = \ + -e 's/@''GNULIB_VFSCANF''@/$(GL_GNULIB_VFSCANF)/g' \ + -e 's/@''GNULIB_VSCANF''@/$(GL_GNULIB_VSCANF)/g' \ + -e 's/@''GNULIB_VPRINTF''@/$(GL_GNULIB_VPRINTF)/g' \ + -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GL_GNULIB_VPRINTF_POSIX)/g' \ + -e 's/@''GNULIB_VSNPRINTF''@/$(GL_GNULIB_VSNPRINTF)/g' \ + -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GL_GNULIB_VSPRINTF_POSIX)/g' = \ + -e 's/@''GNULIB_MDA_FCLOSEALL''@/$(GL_GNULIB_MDA_FCLOSEALL)/g' \ + -e 's/@''GNULIB_MDA_FDOPEN''@/$(GL_GNULIB_MDA_FDOPEN)/g' \ + -e 's/@''GNULIB_MDA_FILENO''@/$(GL_GNULIB_MDA_FILENO)/g' \ + -e 's/@''GNULIB_MDA_GETW''@/$(GL_GNULIB_MDA_GETW)/g' \ + -e 's/@''GNULIB_MDA_PUTW''@/$(GL_GNULIB_MDA_PUTW)/g' \ + -e 's/@''GNULIB_MDA_TEMPNAM''@/$(GL_GNULIB_MDA_TEMPNAM)/g' \ < $(srcdir)/stdio.in.h | \ sed -e 's|@''HAVE_DECL_FCLOSEALL''@|$(HAVE_DECL_FCLOSEALL)|g' \ -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ @@ -2853,49 +2939,51 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) \ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ - -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GNULIB_ALIGNED_ALLOC)/g' \ - -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ - -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ - -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_F= ILE_NAME)/g' \ - -e 's/@''GNULIB_FREE_POSIX''@/$(GNULIB_FREE_POSIX)/g' \ - -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ - -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ - -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ - -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ - -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ - -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ - -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ - -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ - -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GNULIB_POSIX_MEMALIGN)/g' \ - -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ - -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ - -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ - -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ - -e 's/@''GNULIB_QSORT_R''@/$(GNULIB_QSORT_R)/g' \ - -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ - -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ - -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ - -e 's/@''GNULIB_REALLOCARRAY''@/$(GNULIB_REALLOCARRAY)/g' \ - -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ - -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ - -e 's/@''GNULIB_SECURE_GETENV''@/$(GNULIB_SECURE_GETENV)/g' \ - -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ - -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ - -e 's/@''GNULIB_STRTOLD''@/$(GNULIB_STRTOLD)/g' \ - -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ - -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ - -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ - -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ - -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ - -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ - -e 's/@''GNULIB_MDA_ECVT''@/$(GNULIB_MDA_ECVT)/g' \ - -e 's/@''GNULIB_MDA_FCVT''@/$(GNULIB_MDA_FCVT)/g' \ - -e 's/@''GNULIB_MDA_GCVT''@/$(GNULIB_MDA_GCVT)/g' \ - -e 's/@''GNULIB_MDA_MKTEMP''@/$(GNULIB_MDA_MKTEMP)/g' \ - -e 's/@''GNULIB_MDA_PUTENV''@/$(GNULIB_MDA_PUTENV)/g' \ + -e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \ + -e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \ + -e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \ + -e 's/@''GNULIB_CALLOC_POSIX''@/$(GL_GNULIB_CALLOC_POSIX)/g' \ + -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GL_GNULIB_CANONICALIZ= E_FILE_NAME)/g' \ + -e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \ + -e 's/@''GNULIB_GETLOADAVG''@/$(GL_GNULIB_GETLOADAVG)/g' \ + -e 's/@''GNULIB_GETSUBOPT''@/$(GL_GNULIB_GETSUBOPT)/g' \ + -e 's/@''GNULIB_GRANTPT''@/$(GL_GNULIB_GRANTPT)/g' \ + -e 's/@''GNULIB_MALLOC_POSIX''@/$(GL_GNULIB_MALLOC_POSIX)/g' \ + -e 's/@''GNULIB_MBTOWC''@/$(GL_GNULIB_MBTOWC)/g' \ + -e 's/@''GNULIB_MKDTEMP''@/$(GL_GNULIB_MKDTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMP''@/$(GL_GNULIB_MKOSTEMP)/g' \ + -e 's/@''GNULIB_MKOSTEMPS''@/$(GL_GNULIB_MKOSTEMPS)/g' \ + -e 's/@''GNULIB_MKSTEMP''@/$(GL_GNULIB_MKSTEMP)/g' \ + -e 's/@''GNULIB_MKSTEMPS''@/$(GL_GNULIB_MKSTEMPS)/g' \ + -e 's/@''GNULIB_POSIX_MEMALIGN''@/$(GL_GNULIB_POSIX_MEMALIGN)/g' = \ + -e 's/@''GNULIB_POSIX_OPENPT''@/$(GL_GNULIB_POSIX_OPENPT)/g' \ + -e 's/@''GNULIB_PTSNAME''@/$(GL_GNULIB_PTSNAME)/g' \ + -e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \ + -e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \ + -e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \ + -e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \ + -e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \ + -e 's/@''GNULIB_REALLOC_POSIX''@/$(GL_GNULIB_REALLOC_POSIX)/g' \ + -e 's/@''GNULIB_REALLOCARRAY''@/$(GL_GNULIB_REALLOCARRAY)/g' \ + -e 's/@''GNULIB_REALPATH''@/$(GL_GNULIB_REALPATH)/g' \ + -e 's/@''GNULIB_RPMATCH''@/$(GL_GNULIB_RPMATCH)/g' \ + -e 's/@''GNULIB_SECURE_GETENV''@/$(GL_GNULIB_SECURE_GETENV)/g' \ + -e 's/@''GNULIB_SETENV''@/$(GL_GNULIB_SETENV)/g' \ + -e 's/@''GNULIB_STRTOD''@/$(GL_GNULIB_STRTOD)/g' \ + -e 's/@''GNULIB_STRTOL''@/$(GL_GNULIB_STRTOL)/g' \ + -e 's/@''GNULIB_STRTOLD''@/$(GL_GNULIB_STRTOLD)/g' \ + -e 's/@''GNULIB_STRTOLL''@/$(GL_GNULIB_STRTOLL)/g' \ + -e 's/@''GNULIB_STRTOUL''@/$(GL_GNULIB_STRTOUL)/g' \ + -e 's/@''GNULIB_STRTOULL''@/$(GL_GNULIB_STRTOULL)/g' \ + -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GL_GNULIB_SYSTEM_POSIX)/g' \ + -e 's/@''GNULIB_UNLOCKPT''@/$(GL_GNULIB_UNLOCKPT)/g' \ + -e 's/@''GNULIB_UNSETENV''@/$(GL_GNULIB_UNSETENV)/g' \ + -e 's/@''GNULIB_WCTOMB''@/$(GL_GNULIB_WCTOMB)/g' \ + -e 's/@''GNULIB_MDA_ECVT''@/$(GL_GNULIB_MDA_ECVT)/g' \ + -e 's/@''GNULIB_MDA_FCVT''@/$(GL_GNULIB_MDA_FCVT)/g' \ + -e 's/@''GNULIB_MDA_GCVT''@/$(GL_GNULIB_MDA_GCVT)/g' \ + -e 's/@''GNULIB_MDA_MKTEMP''@/$(GL_GNULIB_MDA_MKTEMP)/g' \ + -e 's/@''GNULIB_MDA_PUTENV''@/$(GL_GNULIB_MDA_PUTENV)/g' \ < $(srcdir)/stdlib.in.h | \ sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ -e 's|@''HAVE_ALIGNED_ALLOC''@|$(HAVE_ALIGNED_ALLOC)|g' \ @@ -2931,8 +3019,10 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.statu= s $(CXXDEFS_H) \ -e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \ -e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ + -e 's|@''HAVE_STRTOL''@|$(HAVE_STRTOL)|g' \ -e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ + -e 's|@''HAVE_STRTOUL''@|$(HAVE_STRTOUL)|g' \ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g'= \ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ @@ -2954,11 +3044,16 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) \ -e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \ -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ + -e 's|@''REPLACE_REALLOCARRAY''@|$(REPLACE_REALLOCARRAY)|g' \ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ -e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ + -e 's|@''REPLACE_STRTOL''@|$(REPLACE_STRTOL)|g' \ -e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \ + -e 's|@''REPLACE_STRTOLL''@|$(REPLACE_STRTOLL)|g' \ + -e 's|@''REPLACE_STRTOUL''@|$(REPLACE_STRTOUL)|g' \ + -e 's|@''REPLACE_STRTOULL''@|$(REPLACE_STRTOULL)|g' \ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ @@ -3000,49 +3095,49 @@ string.h: string.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GNULIB_EXPLICIT_BZERO)/g' \ - -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ - -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ - -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ - -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ - -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ - -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ - -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ - -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ - -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ - -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ - -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ - -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ - -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ - -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ - -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ - -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ - -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ - -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ - -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ - -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ - -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ - -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ - -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ - -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ - -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ - -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ - -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ - -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ - -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ - -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ - -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ - -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ - -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ - -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ - -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ - -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GNULIB_STRERRORNAME_NP)/g' \= - -e 's/@''GNULIB_SIGABBREV_NP''@/$(GNULIB_SIGABBREV_NP)/g' \ - -e 's/@''GNULIB_SIGDESCR_NP''@/$(GNULIB_SIGDESCR_NP)/g' \ - -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ - -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ - -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GNULIB_MDA_MEMCCPY)/g' \ - -e 's/@''GNULIB_MDA_STRDUP''@/$(GNULIB_MDA_STRDUP)/g' \ + -e 's/@''GNULIB_EXPLICIT_BZERO''@/$(GL_GNULIB_EXPLICIT_BZERO)/g' = \ + -e 's/@''GNULIB_FFSL''@/$(GL_GNULIB_FFSL)/g' \ + -e 's/@''GNULIB_FFSLL''@/$(GL_GNULIB_FFSLL)/g' \ + -e 's/@''GNULIB_MBSLEN''@/$(GL_GNULIB_MBSLEN)/g' \ + -e 's/@''GNULIB_MBSNLEN''@/$(GL_GNULIB_MBSNLEN)/g' \ + -e 's/@''GNULIB_MBSCHR''@/$(GL_GNULIB_MBSCHR)/g' \ + -e 's/@''GNULIB_MBSRCHR''@/$(GL_GNULIB_MBSRCHR)/g' \ + -e 's/@''GNULIB_MBSSTR''@/$(GL_GNULIB_MBSSTR)/g' \ + -e 's/@''GNULIB_MBSCASECMP''@/$(GL_GNULIB_MBSCASECMP)/g' \ + -e 's/@''GNULIB_MBSNCASECMP''@/$(GL_GNULIB_MBSNCASECMP)/g' \ + -e 's/@''GNULIB_MBSPCASECMP''@/$(GL_GNULIB_MBSPCASECMP)/g' \ + -e 's/@''GNULIB_MBSCASESTR''@/$(GL_GNULIB_MBSCASESTR)/g' \ + -e 's/@''GNULIB_MBSCSPN''@/$(GL_GNULIB_MBSCSPN)/g' \ + -e 's/@''GNULIB_MBSPBRK''@/$(GL_GNULIB_MBSPBRK)/g' \ + -e 's/@''GNULIB_MBSSPN''@/$(GL_GNULIB_MBSSPN)/g' \ + -e 's/@''GNULIB_MBSSEP''@/$(GL_GNULIB_MBSSEP)/g' \ + -e 's/@''GNULIB_MBSTOK_R''@/$(GL_GNULIB_MBSTOK_R)/g' \ + -e 's/@''GNULIB_MEMCHR''@/$(GL_GNULIB_MEMCHR)/g' \ + -e 's/@''GNULIB_MEMMEM''@/$(GL_GNULIB_MEMMEM)/g' \ + -e 's/@''GNULIB_MEMPCPY''@/$(GL_GNULIB_MEMPCPY)/g' \ + -e 's/@''GNULIB_MEMRCHR''@/$(GL_GNULIB_MEMRCHR)/g' \ + -e 's/@''GNULIB_RAWMEMCHR''@/$(GL_GNULIB_RAWMEMCHR)/g' \ + -e 's/@''GNULIB_STPCPY''@/$(GL_GNULIB_STPCPY)/g' \ + -e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \ + -e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \ + -e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \ + -e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \ + -e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \ + -e 's/@''GNULIB_STRNLEN''@/$(GL_GNULIB_STRNLEN)/g' \ + -e 's/@''GNULIB_STRPBRK''@/$(GL_GNULIB_STRPBRK)/g' \ + -e 's/@''GNULIB_STRSEP''@/$(GL_GNULIB_STRSEP)/g' \ + -e 's/@''GNULIB_STRSTR''@/$(GL_GNULIB_STRSTR)/g' \ + -e 's/@''GNULIB_STRCASESTR''@/$(GL_GNULIB_STRCASESTR)/g' \ + -e 's/@''GNULIB_STRTOK_R''@/$(GL_GNULIB_STRTOK_R)/g' \ + -e 's/@''GNULIB_STRERROR''@/$(GL_GNULIB_STRERROR)/g' \ + -e 's/@''GNULIB_STRERROR_R''@/$(GL_GNULIB_STRERROR_R)/g' \ + -e 's/@''GNULIB_STRERRORNAME_NP''@/$(GL_GNULIB_STRERRORNAME_NP)/g= ' \ + -e 's/@''GNULIB_SIGABBREV_NP''@/$(GL_GNULIB_SIGABBREV_NP)/g' \ + -e 's/@''GNULIB_SIGDESCR_NP''@/$(GL_GNULIB_SIGDESCR_NP)/g' \ + -e 's/@''GNULIB_STRSIGNAL''@/$(GL_GNULIB_STRSIGNAL)/g' \ + -e 's/@''GNULIB_STRVERSCMP''@/$(GL_GNULIB_STRVERSCMP)/g' \ + -e 's/@''GNULIB_MDA_MEMCCPY''@/$(GL_GNULIB_MDA_MEMCCPY)/g' \ + -e 's/@''GNULIB_MDA_STRDUP''@/$(GL_GNULIB_MDA_STRDUP)/g' \ < $(srcdir)/string.in.h | \ sed -e 's|@''HAVE_EXPLICIT_BZERO''@|$(HAVE_EXPLICIT_BZERO)|g' \ -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ @@ -3161,7 +3256,7 @@ sys/random.h: sys_random.in.h $(top_builddir)/confi= g.status $(CXXDEFS_H) $(ARG_N -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_RANDOM_H''@|$(NEXT_SYS_RANDOM_H)|g' \ -e 's|@''HAVE_SYS_RANDOM_H''@|$(HAVE_SYS_RANDOM_H)|g' \ - -e 's/@''GNULIB_GETRANDOM''@/$(GNULIB_GETRANDOM)/g' \ + -e 's/@''GNULIB_GETRANDOM''@/$(GL_GNULIB_GETRANDOM)/g' \ -e 's/@''HAVE_GETRANDOM''@/$(HAVE_GETRANDOM)/g' \ -e 's/@''REPLACE_GETRANDOM''@/$(REPLACE_GETRANDOM)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ @@ -3195,8 +3290,8 @@ sys/select.h: sys_select.in.h $(top_builddir)/confi= g.status $(CXXDEFS_H) $(WARN_ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \ -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \ - -e 's/@''GNULIB_PSELECT''@/$(GNULIB_PSELECT)/g' \ - -e 's/@''GNULIB_SELECT''@/$(GNULIB_SELECT)/g' \ + -e 's/@''GNULIB_PSELECT''@/$(GL_GNULIB_PSELECT)/g' \ + -e 's/@''GNULIB_SELECT''@/$(GL_GNULIB_SELECT)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's|@''HAVE_PSELECT''@|$(HAVE_PSELECT)|g' \ -e 's|@''REPLACE_PSELECT''@|$(REPLACE_PSELECT)|g' \ @@ -3232,25 +3327,25 @@ sys/stat.h: sys_stat.in.h $(top_builddir)/config.= status $(CXXDEFS_H) $(ARG_NONNU -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \= -e 's|@''WINDOWS_STAT_TIMESPEC''@|$(WINDOWS_STAT_TIMESPEC)|g' \ - -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ - -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ - -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ - -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ - -e 's/@''GNULIB_GETUMASK''@/$(GNULIB_GETUMASK)/g' \ - -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ - -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ - -e 's/@''GNULIB_MKDIR''@/$(GNULIB_MKDIR)/g' \ - -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ - -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ - -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ - -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ - -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ - -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ - -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ - -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GNULIB_OVERRIDES_STRUC= T_STAT)/g' \ - -e 's/@''GNULIB_MDA_CHMOD''@/$(GNULIB_MDA_CHMOD)/g' \ - -e 's/@''GNULIB_MDA_MKDIR''@/$(GNULIB_MDA_MKDIR)/g' \ - -e 's/@''GNULIB_MDA_UMASK''@/$(GNULIB_MDA_UMASK)/g' \ + -e 's/@''GNULIB_FCHMODAT''@/$(GL_GNULIB_FCHMODAT)/g' \ + -e 's/@''GNULIB_FSTAT''@/$(GL_GNULIB_FSTAT)/g' \ + -e 's/@''GNULIB_FSTATAT''@/$(GL_GNULIB_FSTATAT)/g' \ + -e 's/@''GNULIB_FUTIMENS''@/$(GL_GNULIB_FUTIMENS)/g' \ + -e 's/@''GNULIB_GETUMASK''@/$(GL_GNULIB_GETUMASK)/g' \ + -e 's/@''GNULIB_LCHMOD''@/$(GL_GNULIB_LCHMOD)/g' \ + -e 's/@''GNULIB_LSTAT''@/$(GL_GNULIB_LSTAT)/g' \ + -e 's/@''GNULIB_MKDIR''@/$(GL_GNULIB_MKDIR)/g' \ + -e 's/@''GNULIB_MKDIRAT''@/$(GL_GNULIB_MKDIRAT)/g' \ + -e 's/@''GNULIB_MKFIFO''@/$(GL_GNULIB_MKFIFO)/g' \ + -e 's/@''GNULIB_MKFIFOAT''@/$(GL_GNULIB_MKFIFOAT)/g' \ + -e 's/@''GNULIB_MKNOD''@/$(GL_GNULIB_MKNOD)/g' \ + -e 's/@''GNULIB_MKNODAT''@/$(GL_GNULIB_MKNODAT)/g' \ + -e 's/@''GNULIB_STAT''@/$(GL_GNULIB_STAT)/g' \ + -e 's/@''GNULIB_UTIMENSAT''@/$(GL_GNULIB_UTIMENSAT)/g' \ + -e 's/@''GNULIB_OVERRIDES_STRUCT_STAT''@/$(GL_GNULIB_OVERRIDES_ST= RUCT_STAT)/g' \ + -e 's/@''GNULIB_MDA_CHMOD''@/$(GL_GNULIB_MDA_CHMOD)/g' \ + -e 's/@''GNULIB_MDA_MKDIR''@/$(GL_GNULIB_MDA_MKDIR)/g' \ + -e 's/@''GNULIB_MDA_UMASK''@/$(GL_GNULIB_MDA_UMASK)/g' \ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ @@ -3306,7 +3401,7 @@ sys/time.h: sys_time.in.h $(top_builddir)/config.st= atus $(CXXDEFS_H) $(ARG_NONNU -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ + -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GL_GNULIB_GETTIMEOFDAY)/g' \ -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ @@ -3378,18 +3473,18 @@ time.h: time.in.h $(top_builddir)/config.status $= (CXXDEFS_H) $(ARG_NONNULL_H) $( -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's/@''GNULIB_CTIME''@/$(GNULIB_CTIME)/g' \ - -e 's/@''GNULIB_LOCALTIME''@/$(GNULIB_LOCALTIME)/g' \ - -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ - -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ - -e 's/@''GNULIB_STRFTIME''@/$(GNULIB_STRFTIME)/g' \ - -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ - -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ - -e 's/@''GNULIB_TIMESPEC_GET''@/$(GNULIB_TIMESPEC_GET)/g' \ - -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ - -e 's/@''GNULIB_TIME_RZ''@/$(GNULIB_TIME_RZ)/g' \ - -e 's/@''GNULIB_TZSET''@/$(GNULIB_TZSET)/g' \ - -e 's/@''GNULIB_MDA_TZSET''@/$(GNULIB_MDA_TZSET)/g' \ + -e 's/@''GNULIB_CTIME''@/$(GL_GNULIB_CTIME)/g' \ + -e 's/@''GNULIB_LOCALTIME''@/$(GL_GNULIB_LOCALTIME)/g' \ + -e 's/@''GNULIB_MKTIME''@/$(GL_GNULIB_MKTIME)/g' \ + -e 's/@''GNULIB_NANOSLEEP''@/$(GL_GNULIB_NANOSLEEP)/g' \ + -e 's/@''GNULIB_STRFTIME''@/$(GL_GNULIB_STRFTIME)/g' \ + -e 's/@''GNULIB_STRPTIME''@/$(GL_GNULIB_STRPTIME)/g' \ + -e 's/@''GNULIB_TIMEGM''@/$(GL_GNULIB_TIMEGM)/g' \ + -e 's/@''GNULIB_TIMESPEC_GET''@/$(GL_GNULIB_TIMESPEC_GET)/g' \ + -e 's/@''GNULIB_TIME_R''@/$(GL_GNULIB_TIME_R)/g' \ + -e 's/@''GNULIB_TIME_RZ''@/$(GL_GNULIB_TIME_RZ)/g' \ + -e 's/@''GNULIB_TZSET''@/$(GL_GNULIB_TZSET)/g' \ + -e 's/@''GNULIB_MDA_TZSET''@/$(GL_GNULIB_MDA_TZSET)/g' \ -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ @@ -3510,89 +3605,89 @@ unistd.h: unistd.in.h $(top_builddir)/config.stat= us $(CXXDEFS_H) $(ARG_NONNULL_H -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - -e 's/@''GNULIB_ACCESS''@/$(GNULIB_ACCESS)/g' \ - -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ - -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ - -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ - -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GNULIB_COPY_FILE_RANGE)/g' \= - -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ - -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ - -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ - -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ - -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ - -e 's/@''GNULIB_EXECL''@/$(GNULIB_EXECL)/g' \ - -e 's/@''GNULIB_EXECLE''@/$(GNULIB_EXECLE)/g' \ - -e 's/@''GNULIB_EXECLP''@/$(GNULIB_EXECLP)/g' \ - -e 's/@''GNULIB_EXECV''@/$(GNULIB_EXECV)/g' \ - -e 's/@''GNULIB_EXECVE''@/$(GNULIB_EXECVE)/g' \ - -e 's/@''GNULIB_EXECVP''@/$(GNULIB_EXECVP)/g' \ - -e 's/@''GNULIB_EXECVPE''@/$(GNULIB_EXECVPE)/g' \ - -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ - -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ - -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ - -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ - -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ - -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ - -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ - -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ - -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ - -e 's/@''GNULIB_GETENTROPY''@/$(GNULIB_GETENTROPY)/g' \ - -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ - -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ - -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ - -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ - -e 's/@''GNULIB_GETOPT_POSIX''@/$(GNULIB_GETOPT_POSIX)/g' \ - -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ - -e 's/@''GNULIB_GETPASS''@/$(GNULIB_GETPASS)/g' \ - -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ - -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ - -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ - -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ - -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ - -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ - -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ - -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ - -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ - -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ - -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ - -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ - -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ - -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ - -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ - -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ - -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ - -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ - -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ - -e 's/@''GNULIB_TRUNCATE''@/$(GNULIB_TRUNCATE)/g' \ - -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/= g' \ - -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOC= KING)/g' \ - -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g'= \ - -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ - -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ - -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ - -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ - -e 's/@''GNULIB_MDA_ACCESS''@/$(GNULIB_MDA_ACCESS)/g' \ - -e 's/@''GNULIB_MDA_CHDIR''@/$(GNULIB_MDA_CHDIR)/g' \ - -e 's/@''GNULIB_MDA_CLOSE''@/$(GNULIB_MDA_CLOSE)/g' \ - -e 's/@''GNULIB_MDA_DUP''@/$(GNULIB_MDA_DUP)/g' \ - -e 's/@''GNULIB_MDA_DUP2''@/$(GNULIB_MDA_DUP2)/g' \ - -e 's/@''GNULIB_MDA_EXECL''@/$(GNULIB_MDA_EXECL)/g' \ - -e 's/@''GNULIB_MDA_EXECLE''@/$(GNULIB_MDA_EXECLE)/g' \ - -e 's/@''GNULIB_MDA_EXECLP''@/$(GNULIB_MDA_EXECLP)/g' \ - -e 's/@''GNULIB_MDA_EXECV''@/$(GNULIB_MDA_EXECV)/g' \ - -e 's/@''GNULIB_MDA_EXECVE''@/$(GNULIB_MDA_EXECVE)/g' \ - -e 's/@''GNULIB_MDA_EXECVP''@/$(GNULIB_MDA_EXECVP)/g' \ - -e 's/@''GNULIB_MDA_EXECVPE''@/$(GNULIB_MDA_EXECVPE)/g' \ - -e 's/@''GNULIB_MDA_GETCWD''@/$(GNULIB_MDA_GETCWD)/g' \ - -e 's/@''GNULIB_MDA_GETPID''@/$(GNULIB_MDA_GETPID)/g' \ - -e 's/@''GNULIB_MDA_ISATTY''@/$(GNULIB_MDA_ISATTY)/g' \ - -e 's/@''GNULIB_MDA_LSEEK''@/$(GNULIB_MDA_LSEEK)/g' \ - -e 's/@''GNULIB_MDA_READ''@/$(GNULIB_MDA_READ)/g' \ - -e 's/@''GNULIB_MDA_RMDIR''@/$(GNULIB_MDA_RMDIR)/g' \ - -e 's/@''GNULIB_MDA_SWAB''@/$(GNULIB_MDA_SWAB)/g' \ - -e 's/@''GNULIB_MDA_UNLINK''@/$(GNULIB_MDA_UNLINK)/g' \ - -e 's/@''GNULIB_MDA_WRITE''@/$(GNULIB_MDA_WRITE)/g' \ + -e 's/@''GNULIB_ACCESS''@/$(GL_GNULIB_ACCESS)/g' \ + -e 's/@''GNULIB_CHDIR''@/$(GL_GNULIB_CHDIR)/g' \ + -e 's/@''GNULIB_CHOWN''@/$(GL_GNULIB_CHOWN)/g' \ + -e 's/@''GNULIB_CLOSE''@/$(GL_GNULIB_CLOSE)/g' \ + -e 's/@''GNULIB_COPY_FILE_RANGE''@/$(GL_GNULIB_COPY_FILE_RANGE)/g= ' \ + -e 's/@''GNULIB_DUP''@/$(GL_GNULIB_DUP)/g' \ + -e 's/@''GNULIB_DUP2''@/$(GL_GNULIB_DUP2)/g' \ + -e 's/@''GNULIB_DUP3''@/$(GL_GNULIB_DUP3)/g' \ + -e 's/@''GNULIB_ENVIRON''@/$(GL_GNULIB_ENVIRON)/g' \ + -e 's/@''GNULIB_EUIDACCESS''@/$(GL_GNULIB_EUIDACCESS)/g' \ + -e 's/@''GNULIB_EXECL''@/$(GL_GNULIB_EXECL)/g' \ + -e 's/@''GNULIB_EXECLE''@/$(GL_GNULIB_EXECLE)/g' \ + -e 's/@''GNULIB_EXECLP''@/$(GL_GNULIB_EXECLP)/g' \ + -e 's/@''GNULIB_EXECV''@/$(GL_GNULIB_EXECV)/g' \ + -e 's/@''GNULIB_EXECVE''@/$(GL_GNULIB_EXECVE)/g' \ + -e 's/@''GNULIB_EXECVP''@/$(GL_GNULIB_EXECVP)/g' \ + -e 's/@''GNULIB_EXECVPE''@/$(GL_GNULIB_EXECVPE)/g' \ + -e 's/@''GNULIB_FACCESSAT''@/$(GL_GNULIB_FACCESSAT)/g' \ + -e 's/@''GNULIB_FCHDIR''@/$(GL_GNULIB_FCHDIR)/g' \ + -e 's/@''GNULIB_FCHOWNAT''@/$(GL_GNULIB_FCHOWNAT)/g' \ + -e 's/@''GNULIB_FDATASYNC''@/$(GL_GNULIB_FDATASYNC)/g' \ + -e 's/@''GNULIB_FSYNC''@/$(GL_GNULIB_FSYNC)/g' \ + -e 's/@''GNULIB_FTRUNCATE''@/$(GL_GNULIB_FTRUNCATE)/g' \ + -e 's/@''GNULIB_GETCWD''@/$(GL_GNULIB_GETCWD)/g' \ + -e 's/@''GNULIB_GETDOMAINNAME''@/$(GL_GNULIB_GETDOMAINNAME)/g' \ + -e 's/@''GNULIB_GETDTABLESIZE''@/$(GL_GNULIB_GETDTABLESIZE)/g' \ + -e 's/@''GNULIB_GETENTROPY''@/$(GL_GNULIB_GETENTROPY)/g' \ + -e 's/@''GNULIB_GETGROUPS''@/$(GL_GNULIB_GETGROUPS)/g' \ + -e 's/@''GNULIB_GETHOSTNAME''@/$(GL_GNULIB_GETHOSTNAME)/g' \ + -e 's/@''GNULIB_GETLOGIN''@/$(GL_GNULIB_GETLOGIN)/g' \ + -e 's/@''GNULIB_GETLOGIN_R''@/$(GL_GNULIB_GETLOGIN_R)/g' \ + -e 's/@''GNULIB_GETOPT_POSIX''@/$(GL_GNULIB_GETOPT_POSIX)/g' \ + -e 's/@''GNULIB_GETPAGESIZE''@/$(GL_GNULIB_GETPAGESIZE)/g' \ + -e 's/@''GNULIB_GETPASS''@/$(GL_GNULIB_GETPASS)/g' \ + -e 's/@''GNULIB_GETUSERSHELL''@/$(GL_GNULIB_GETUSERSHELL)/g' \ + -e 's/@''GNULIB_GROUP_MEMBER''@/$(GL_GNULIB_GROUP_MEMBER)/g' \ + -e 's/@''GNULIB_ISATTY''@/$(GL_GNULIB_ISATTY)/g' \ + -e 's/@''GNULIB_LCHOWN''@/$(GL_GNULIB_LCHOWN)/g' \ + -e 's/@''GNULIB_LINK''@/$(GL_GNULIB_LINK)/g' \ + -e 's/@''GNULIB_LINKAT''@/$(GL_GNULIB_LINKAT)/g' \ + -e 's/@''GNULIB_LSEEK''@/$(GL_GNULIB_LSEEK)/g' \ + -e 's/@''GNULIB_PIPE''@/$(GL_GNULIB_PIPE)/g' \ + -e 's/@''GNULIB_PIPE2''@/$(GL_GNULIB_PIPE2)/g' \ + -e 's/@''GNULIB_PREAD''@/$(GL_GNULIB_PREAD)/g' \ + -e 's/@''GNULIB_PWRITE''@/$(GL_GNULIB_PWRITE)/g' \ + -e 's/@''GNULIB_READ''@/$(GL_GNULIB_READ)/g' \ + -e 's/@''GNULIB_READLINK''@/$(GL_GNULIB_READLINK)/g' \ + -e 's/@''GNULIB_READLINKAT''@/$(GL_GNULIB_READLINKAT)/g' \ + -e 's/@''GNULIB_RMDIR''@/$(GL_GNULIB_RMDIR)/g' \ + -e 's/@''GNULIB_SETHOSTNAME''@/$(GL_GNULIB_SETHOSTNAME)/g' \ + -e 's/@''GNULIB_SLEEP''@/$(GL_GNULIB_SLEEP)/g' \ + -e 's/@''GNULIB_SYMLINK''@/$(GL_GNULIB_SYMLINK)/g' \ + -e 's/@''GNULIB_SYMLINKAT''@/$(GL_GNULIB_SYMLINKAT)/g' \ + -e 's/@''GNULIB_TRUNCATE''@/$(GL_GNULIB_TRUNCATE)/g' \ + -e 's/@''GNULIB_TTYNAME_R''@/$(GL_GNULIB_TTYNAME_R)/g' \ + -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GL_GNULIB_UNISTD_H_GETOPT)/= g' \ + -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GL_GNULIB_UNISTD_H_NONB= LOCKING)/g' \ + -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GL_GNULIB_UNISTD_H_SIGPIPE)= /g' \ + -e 's/@''GNULIB_UNLINK''@/$(GL_GNULIB_UNLINK)/g' \ + -e 's/@''GNULIB_UNLINKAT''@/$(GL_GNULIB_UNLINKAT)/g' \ + -e 's/@''GNULIB_USLEEP''@/$(GL_GNULIB_USLEEP)/g' \ + -e 's/@''GNULIB_WRITE''@/$(GL_GNULIB_WRITE)/g' \ + -e 's/@''GNULIB_MDA_ACCESS''@/$(GL_GNULIB_MDA_ACCESS)/g' \ + -e 's/@''GNULIB_MDA_CHDIR''@/$(GL_GNULIB_MDA_CHDIR)/g' \ + -e 's/@''GNULIB_MDA_CLOSE''@/$(GL_GNULIB_MDA_CLOSE)/g' \ + -e 's/@''GNULIB_MDA_DUP''@/$(GL_GNULIB_MDA_DUP)/g' \ + -e 's/@''GNULIB_MDA_DUP2''@/$(GL_GNULIB_MDA_DUP2)/g' \ + -e 's/@''GNULIB_MDA_EXECL''@/$(GL_GNULIB_MDA_EXECL)/g' \ + -e 's/@''GNULIB_MDA_EXECLE''@/$(GL_GNULIB_MDA_EXECLE)/g' \ + -e 's/@''GNULIB_MDA_EXECLP''@/$(GL_GNULIB_MDA_EXECLP)/g' \ + -e 's/@''GNULIB_MDA_EXECV''@/$(GL_GNULIB_MDA_EXECV)/g' \ + -e 's/@''GNULIB_MDA_EXECVE''@/$(GL_GNULIB_MDA_EXECVE)/g' \ + -e 's/@''GNULIB_MDA_EXECVP''@/$(GL_GNULIB_MDA_EXECVP)/g' \ + -e 's/@''GNULIB_MDA_EXECVPE''@/$(GL_GNULIB_MDA_EXECVPE)/g' \ + -e 's/@''GNULIB_MDA_GETCWD''@/$(GL_GNULIB_MDA_GETCWD)/g' \ + -e 's/@''GNULIB_MDA_GETPID''@/$(GL_GNULIB_MDA_GETPID)/g' \ + -e 's/@''GNULIB_MDA_ISATTY''@/$(GL_GNULIB_MDA_ISATTY)/g' \ + -e 's/@''GNULIB_MDA_LSEEK''@/$(GL_GNULIB_MDA_LSEEK)/g' \ + -e 's/@''GNULIB_MDA_READ''@/$(GL_GNULIB_MDA_READ)/g' \ + -e 's/@''GNULIB_MDA_RMDIR''@/$(GL_GNULIB_MDA_RMDIR)/g' \ + -e 's/@''GNULIB_MDA_SWAB''@/$(GL_GNULIB_MDA_SWAB)/g' \ + -e 's/@''GNULIB_MDA_UNLINK''@/$(GL_GNULIB_MDA_UNLINK)/g' \ + -e 's/@''GNULIB_MDA_WRITE''@/$(GL_GNULIB_MDA_WRITE)/g' \ < $(srcdir)/unistd.in.h | \ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ -e 's|@''HAVE_COPY_FILE_RANGE''@|$(HAVE_COPY_FILE_RANGE)|g' \ @@ -3699,14 +3794,14 @@ EXTRA_DIST +=3D unistd.in.h endif ## end gnulib module unistd =20 -## begin gnulib module unlocked-io -ifeq (,$(OMIT_GNULIB_MODULE_unlocked-io)) +## begin gnulib module unlocked-io-internal +ifeq (,$(OMIT_GNULIB_MODULE_unlocked-io-internal)) =20 =20 EXTRA_DIST +=3D unlocked-io.h =20 endif -## end gnulib module unlocked-io +## end gnulib module unlocked-io-internal =20 ## begin gnulib module update-copyright ifeq (,$(OMIT_GNULIB_MODULE_update-copyright)) diff --git a/lib/group-member.c b/lib/group-member.c index 52159016ea..24aea3599c 100644 --- a/lib/group-member.c +++ b/lib/group-member.c @@ -3,17 +3,17 @@ Copyright (C) 1994, 1997-1998, 2003, 2005-2006, 2009-2021 Free Softwa= re Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include @@ -25,7 +25,7 @@ #include #include =20 -#include "xalloc-oversized.h" +#include "intprops.h" =20 /* Most processes have no more than this many groups, and for these processes we can avoid using malloc. */ @@ -53,10 +53,10 @@ get_group_info (struct group_info *gi) if (n_groups < 0) { int n_group_slots =3D getgroups (0, NULL); - if (0 <=3D n_group_slots - && ! xalloc_oversized (n_group_slots, sizeof *gi->group)) + size_t nbytes; + if (! INT_MULTIPLY_WRAPV (n_group_slots, sizeof *gi->group, &nbyte= s)) { - gi->group =3D malloc (n_group_slots * sizeof *gi->group); + gi->group =3D malloc (nbytes); if (gi->group) n_groups =3D getgroups (n_group_slots, gi->group); } diff --git a/lib/idx.h b/lib/idx.h index 681c8c90f1..483587eabb 100644 --- a/lib/idx.h +++ b/lib/idx.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/ieee754.in.h b/lib/ieee754.in.h index ce13efc918..ce371cbcea 100644 --- a/lib/ieee754.in.h +++ b/lib/ieee754.in.h @@ -2,16 +2,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/ignore-value.h b/lib/ignore-value.h index 0a3cf1e95b..6099abad97 100644 --- a/lib/ignore-value.h +++ b/lib/ignore-value.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Jim Meyering, Eric Blake and P=C3=A1draig Brady. */ diff --git a/lib/intprops.h b/lib/intprops.h index 2a420ac831..9d10028a59 100644 --- a/lib/intprops.h +++ b/lib/intprops.h @@ -3,16 +3,16 @@ Copyright (C) 2001-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2.1 of the License, o= r (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ @@ -133,7 +133,8 @@ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + = 1) operators might not yield numerically correct answers due to arithmetic overflow. They do not rely on undefined or implementation-defined behavior. Their implementations are simple - and straightforward, but they are a bit harder to use than the + and straightforward, but they are harder to use and may be less + efficient than the INT__WRAPV, INT__OK, and INT__OVERFLOW macros described below. =20 Example usage: @@ -158,6 +159,9 @@ #define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + = 1) must have minimum value MIN and maximum MAX. Unsigned types should use a zero MIN of the proper type. =20 + Because all arguments are subject to integer promotions, these + macros typically do not work on types narrower than 'int'. + These macros are tuned for constant MIN and MAX. For commutative operations such as A + B, they are also tuned for constant B. */ =20 @@ -339,9 +343,15 @@ #define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) = \ arguments should not have side effects. =20 The WRAPV macros are not constant expressions. They support only - +, binary -, and *. Because the WRAPV macros convert the result, - they report overflow in different circumstances than the OVERFLOW - macros do. + +, binary -, and *. + + Because the WRAPV macros convert the result, they report overflow + in different circumstances than the OVERFLOW macros do. For + example, in the typical case with 16-bit 'short' and 32-bit 'int', + if A, B and R are all of type 'short' then INT_ADD_OVERFLOW (A, B) + returns false because the addition cannot overflow after A and B + are converted to 'int', whereas INT_ADD_WRAPV (A, B, &R) returns + true or false depending on whether the sum fits into 'short'. =20 These macros are tuned for their last input argument being a constant= =2E =20 diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index e9ee500e3e..41cb4220ce 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -2,17 +2,17 @@ Written by Paul Eggert, Bruno Haible, Derek Price. This file is part of gnulib. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* diff --git a/lib/libc-config.h b/lib/libc-config.h index c0eac707cf..f68749fc74 100644 --- a/lib/libc-config.h +++ b/lib/libc-config.h @@ -3,16 +3,16 @@ Copyright 2017-2021 Free Software Foundation, Inc. =20 This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with this program; if not, see . */ =20 @@ -28,14 +28,17 @@ =20 When compiled as part of glibc this is a no-op; when compiled as part of Gnulib this includes Gnulib's and defines macros - that glibc library code would normally assume. */ + that glibc library code would normally assume. + + Note: This header file MUST NOT be included by public header files + of Gnulib. */ =20 #include =20 /* On glibc this includes and and #defines - _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 it - includes which defines __nonnull. Elsewhere it - is harmless. */ + _FEATURES_H, __WORDSIZE, and __set_errno. On FreeBSD 11 and + DragonFlyBSD 5.9 it includes which defines __nonnull. + Elsewhere it is harmless. */ #include =20 /* From glibc . */ @@ -71,7 +74,7 @@ # endif #endif =20 -#ifndef __attribute_maybe_unused__ +#ifndef __attribute_nonnull__ /* either does not exist, or is too old for Gnulib. Prepare to include , which is Gnulib's version of a more-recent glibc . */ @@ -80,13 +83,9 @@ # ifndef _FEATURES_H # define _FEATURES_H 1 # endif -/* Define __WORDSIZE so that does not attempt to include - nonexistent files. Make it a syntax error, since Gnulib does not - use __WORDSIZE now, and if Gnulib uses it later the syntax error - will let us know that __WORDSIZE needs configuring. */ -# ifndef __WORDSIZE -# define __WORDSIZE %%% -# endif +/* Define __GNULIB_CDEFS so that does not attempt to include + nonexistent files. */ +# define __GNULIB_CDEFS /* Undef the macros unconditionally defined by our copy of glibc , so that they do not clash with any system-defined versions. */ diff --git a/lib/limits.in.h b/lib/limits.in.h index 076ab9ef54..65ea12dbc8 100644 --- a/lib/limits.in.h +++ b/lib/limits.in.h @@ -2,18 +2,18 @@ =20 Copyright 2016-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation; either version 3, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/lstat.c b/lib/lstat.c index a584c6aa06..7de0bf1027 100644 --- a/lib/lstat.c +++ b/lib/lstat.c @@ -2,17 +2,17 @@ =20 Copyright (C) 1997-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* written by Jim Meyering */ diff --git a/lib/malloc/dynarray-skeleton.c b/lib/malloc/dynarray-skeleto= n.c index 4995fd1c04..48210e3252 100644 --- a/lib/malloc/dynarray-skeleton.c +++ b/lib/malloc/dynarray-skeleton.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -192,7 +192,7 @@ DYNARRAY_NAME (free__array__) (struct DYNARRAY_STRUCT= *list) =20 /* Initialize a dynamic array object. This must be called before any use of the object. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static void DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) { @@ -202,7 +202,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) } =20 /* Deallocate the dynamic array and its elements. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) { @@ -213,7 +213,7 @@ DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) } =20 /* Return true if the dynamic array is in an error state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline bool DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) { @@ -222,7 +222,7 @@ DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STR= UCT *list) =20 /* Mark the dynamic array as failed. All elements are deallocated as a side effect. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static void DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) { @@ -236,7 +236,7 @@ DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *= list) =20 /* Return the number of elements which have been added to the dynamic array. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline size_t DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) { @@ -245,7 +245,7 @@ DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *l= ist) =20 /* Return a pointer to the array element at INDEX. Terminate the process if INDEX is out of bounds. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) { @@ -257,7 +257,7 @@ DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, siz= e_t index) /* Return a pointer to the first array element, if any. For a zero-length array, the pointer can be NULL even though the dynamic array has not entered the failure state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) { @@ -267,7 +267,7 @@ DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) /* Return a pointer one element past the last array element. For a zero-length array, the pointer can be NULL even though the dynamic array has not entered the failure state. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline DYNARRAY_ELEMENT * DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) { @@ -294,7 +294,7 @@ DYNARRAY_NAME (add__) (struct DYNARRAY_STRUCT *list, = DYNARRAY_ELEMENT item) /* Add ITEM at the end of the array, enlarging it by one element. Mark *LIST as failed if the dynamic array allocation size cannot be increased. */ -__nonnull ((1)) +__attribute_nonnull__ ((1)) static inline void DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item= ) { @@ -348,7 +348,8 @@ DYNARRAY_NAME (emplace__) (struct DYNARRAY_STRUCT *li= st) /* Allocate a place for a new element in *LIST and return a pointer to it. The pointer can be NULL if the dynamic array cannot be enlarged due to a memory allocation failure. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((= 1)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1)) static /* Avoid inlining with the larger initialization code. */ #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)= ) @@ -372,7 +373,7 @@ DYNARRAY_NAME (emplace) (struct DYNARRAY_STRUCT *list= ) existing size, new elements are added (which can be initialized). Otherwise, the list is truncated, and elements are freed. Return false on memory allocation failure (and mark *LIST as failed). */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static bool DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) { @@ -417,7 +418,7 @@ DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list,= size_t size) } =20 /* Remove the last element of LIST if it is present. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) { @@ -434,7 +435,7 @@ DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *= list) =20 /* Remove all elements from the list. The elements are freed, but the list itself is not. */ -__attribute_maybe_unused__ __nonnull ((1)) +__attribute_maybe_unused__ __attribute_nonnull__ ((1)) static void DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) { @@ -452,7 +453,8 @@ DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) stored in *RESULT if LIST refers to an empty list. On success, the pointer in *RESULT is heap-allocated and must be deallocated using free. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((= 1, 2)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1, 2)) static bool DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, DYNARRAY_FINAL_TYPE *result) @@ -483,7 +485,8 @@ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *lis= t, have a sentinel at the end). If LENGTHP is not NULL, the array length is written to *LENGTHP. *LIST is re-initialized and can be reused. */ -__attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((= 1)) +__attribute_maybe_unused__ __attribute_warn_unused_result__ +__attribute_nonnull__ ((1)) static DYNARRAY_ELEMENT * DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp)= { diff --git a/lib/malloc/dynarray.h b/lib/malloc/dynarray.h index 84e4394bf3..638c33f986 100644 --- a/lib/malloc/dynarray.h +++ b/lib/malloc/dynarray.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/dynarray_at_failure.c b/lib/malloc/dynarray_at_fa= ilure.c index a442459374..4f840db7c5 100644 --- a/lib/malloc/dynarray_at_failure.c +++ b/lib/malloc/dynarray_at_failure.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_emplace_enlarge.c b/lib/malloc/dynarray_= emplace_enlarge.c index 7ac4b6db40..0f8baf94ad 100644 --- a/lib/malloc/dynarray_emplace_enlarge.c +++ b/lib/malloc/dynarray_emplace_enlarge.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_finalize.c b/lib/malloc/dynarray_finaliz= e.c index be9441e313..c33da41389 100644 --- a/lib/malloc/dynarray_finalize.c +++ b/lib/malloc/dynarray_finalize.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_resize.c b/lib/malloc/dynarray_resize.c index 92bbddd446..5a57166a84 100644 --- a/lib/malloc/dynarray_resize.c +++ b/lib/malloc/dynarray_resize.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include #include diff --git a/lib/malloc/dynarray_resize_clear.c b/lib/malloc/dynarray_res= ize_clear.c index 99c2cc87c3..9c43b00c3a 100644 --- a/lib/malloc/dynarray_resize_clear.c +++ b/lib/malloc/dynarray_resize_clear.c @@ -3,19 +3,23 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 +#ifndef _LIBC +# include +#endif + #include #include =20 diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h index 26e306212d..36d0bef4bb 100644 --- a/lib/malloc/scratch_buffer.h +++ b/lib/malloc/scratch_buffer.h @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_dupfree.c b/lib/malloc/scratch_buf= fer_dupfree.c index 775bff5609..07363b9bc8 100644 --- a/lib/malloc/scratch_buffer_dupfree.c +++ b/lib/malloc/scratch_buffer_dupfree.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer= _grow.c index e7606d81cd..22c8c7781e 100644 --- a/lib/malloc/scratch_buffer_grow.c +++ b/lib/malloc/scratch_buffer_grow.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_grow_preserve.c b/lib/malloc/scrat= ch_buffer_grow_preserve.c index 59f8c71000..2b2b819289 100644 --- a/lib/malloc/scratch_buffer_grow_preserve.c +++ b/lib/malloc/scratch_buffer_grow_preserve.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/malloc/scratch_buffer_set_array_size.c b/lib/malloc/scra= tch_buffer_set_array_size.c index e2b9f31211..a47f9276a8 100644 --- a/lib/malloc/scratch_buffer_set_array_size.c +++ b/lib/malloc/scratch_buffer_set_array_size.c @@ -3,16 +3,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/md5.c b/lib/md5.c index e7eeeaab03..b1dd452ed2 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -4,18 +4,18 @@ Foundation, Inc. This file is part of the GNU C Library. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Ulrich Drepper , 1995. */ =20 diff --git a/lib/md5.h b/lib/md5.h index aa4b0805d5..ca7c78ed5c 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -4,18 +4,18 @@ Foundation, Inc. This file is part of the GNU C Library. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _MD5_H #define _MD5_H 1 diff --git a/lib/memmem.c b/lib/memmem.c index 87266fa87a..142de576d9 100644 --- a/lib/memmem.c +++ b/lib/memmem.c @@ -2,18 +2,18 @@ Foundation, Inc. This file is part of the GNU C Library. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* This particular implementation was written by Eric Blake, 2008. */ =20 diff --git a/lib/mempcpy.c b/lib/mempcpy.c index fea618a9e5..cacacdbc62 100644 --- a/lib/mempcpy.c +++ b/lib/mempcpy.c @@ -1,24 +1,27 @@ /* Copy memory area and return pointer after last written byte. Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 /* Specification. */ #include =20 +/* A function definition is only needed if HAVE_MEMPCPY is not defined. = */ +#if !HAVE_MEMPCPY + /* Copy N bytes of SRC to DEST, return pointer to bytes after the last written byte. */ void * @@ -26,3 +29,5 @@ mempcpy (void *dest, const void *src, size_t n) { return (char *) memcpy (dest, src, n) + n; } + +#endif diff --git a/lib/memrchr.c b/lib/memrchr.c index dcd24fafc6..e0d47d13d7 100644 --- a/lib/memrchr.c +++ b/lib/memrchr.c @@ -9,17 +9,17 @@ adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),= and implemented by Roland McGrath (roland@ai.mit.edu). =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if defined _LIBC diff --git a/lib/mini-gmp-gnulib.c b/lib/mini-gmp-gnulib.c index d46c2b993b..08aa8f97c1 100644 --- a/lib/mini-gmp-gnulib.c +++ b/lib/mini-gmp-gnulib.c @@ -2,18 +2,26 @@ =20 Copyright 2018-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, + This file is free software. + It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+". + You can redistribute it and/or modify it under either + - the terms of the GNU Lesser General Public License as published + by the Free Software Foundation; either version 3, or (at your + option) any later version, or + - the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) + any later version, or + - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+". + + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License and the GNU General Public License + for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E */ + You should have received a copy of the GNU Lesser General Public + License and of the GNU General Public License along with this + program. If not, see . */ =20 #include =20 diff --git a/lib/mini-gmp.c b/lib/mini-gmp.c index de061e673a..28b159752e 100644 --- a/lib/mini-gmp.c +++ b/lib/mini-gmp.c @@ -2,21 +2,21 @@ =20 Contributed to the GNU project by Niels M=C3=B6ller =20 -Copyright 1991-1997, 1999-2020 Free Software Foundation, Inc. +Copyright 1991-1997, 1999-2021 Free Software Foundation, Inc. =20 This file is part of the GNU MP Library. =20 The GNU MP Library is free software; you can redistribute it and/or modi= fy it under the terms of either: =20 - * the GNU General Public License as published by the Free + * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. =20 or =20 * the GNU General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any= + Foundation; either version 2 of the License, or (at your option) any= later version. =20 or both in parallel, as here. @@ -27,7 +27,7 @@ for more details. =20 You should have received copies of the GNU General Public License and th= e -GNU General Public License along with the GNU MP Library. If not, +GNU Lesser General Public License along with the GNU MP Library. If not= , see https://www.gnu.org/licenses/. */ =20 /* NOTE: All functions in this file which are not declared in diff --git a/lib/mini-gmp.h b/lib/mini-gmp.h index 59a37e6494..59c24cf511 100644 --- a/lib/mini-gmp.h +++ b/lib/mini-gmp.h @@ -1,20 +1,20 @@ /* mini-gmp, a minimalistic implementation of a GNU GMP subset. =20 -Copyright 2011-2015, 2017, 2019-2020 Free Software Foundation, Inc. +Copyright 2011-2015, 2017, 2019-2021 Free Software Foundation, Inc. =20 This file is part of the GNU MP Library. =20 The GNU MP Library is free software; you can redistribute it and/or modi= fy it under the terms of either: =20 - * the GNU General Public License as published by the Free + * the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. =20 or =20 * the GNU General Public License as published by the Free Software - Foundation; either version 3 of the License, or (at your option) any= + Foundation; either version 2 of the License, or (at your option) any= later version. =20 or both in parallel, as here. @@ -25,7 +25,7 @@ for more details. =20 You should have received copies of the GNU General Public License and th= e -GNU General Public License along with the GNU MP Library. If not, +GNU Lesser General Public License along with the GNU MP Library. If not= , see https://www.gnu.org/licenses/. */ =20 /* About mini-gmp: This is a minimal implementation of a subset of the @@ -296,6 +296,7 @@ #define MPZ_ROINIT_N(xp, xs) {{0, (xs),(xp) }} || defined (_STDIO_H_INCLUDED) /* QNX4 */ \ || defined (_ISO_STDIO_ISO_H) /* Sun C++ */ \ || defined (__STDIO_LOADED) /* VMS */ \ + || defined (_STDIO) /* HPE NonStop */ \ || defined (__DEFINED_FILE) /* musl */ size_t mpz_out_str (FILE *, int, const mpz_t); #endif diff --git a/lib/minmax.h b/lib/minmax.h index eb9fb09a54..a03361bafa 100644 --- a/lib/minmax.h +++ b/lib/minmax.h @@ -2,18 +2,18 @@ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _MINMAX_H #define _MINMAX_H diff --git a/lib/mkostemp.c b/lib/mkostemp.c index 9d733ddd10..285f1badf8 100644 --- a/lib/mkostemp.c +++ b/lib/mkostemp.c @@ -2,17 +2,17 @@ Foundation, Inc. This file is derived from the one in the GNU C Library. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if !_LIBC diff --git a/lib/mktime-internal.h b/lib/mktime-internal.h index 9c447bd7b0..7386625d3d 100644 --- a/lib/mktime-internal.h +++ b/lib/mktime-internal.h @@ -4,16 +4,16 @@ Contributed by Paul Eggert . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/mktime.c b/lib/mktime.c index 2c7cd7ba83..ae721c72e6 100644 --- a/lib/mktime.c +++ b/lib/mktime.c @@ -4,16 +4,16 @@ Contributed by Paul Eggert . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/nstrftime.c b/lib/nstrftime.c index 2f5e4fbe63..7f258e8727 100644 --- a/lib/nstrftime.c +++ b/lib/nstrftime.c @@ -1,19 +1,18 @@ /* Copyright (C) 1991-2021 Free Software Foundation, Inc. This file is part of the GNU C Library. =20 - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public - License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - The GNU C Library is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public - License along with the GNU C Library; if not, see - . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifdef _LIBC # define USE_IN_EXTENDED_LOCALE_MODEL 1 diff --git a/lib/open.c b/lib/open.c index 8599185331..372cda8816 100644 --- a/lib/open.c +++ b/lib/open.c @@ -1,17 +1,17 @@ /* Open a descriptor to a file. Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Bruno Haible , 2007. */ diff --git a/lib/pathmax.h b/lib/pathmax.h index 49cf4629c7..716f4a9aae 100644 --- a/lib/pathmax.h +++ b/lib/pathmax.h @@ -2,18 +2,18 @@ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _PATHMAX_H # define _PATHMAX_H diff --git a/lib/pipe2.c b/lib/pipe2.c index adbaa4a102..9ba8c3b703 100644 --- a/lib/pipe2.c +++ b/lib/pipe2.c @@ -1,18 +1,18 @@ /* Create a pipe, with specific opening flags. Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 @@ -41,7 +41,7 @@ pipe2 (int fd[2], int flags) { /* Mingw _pipe() corrupts fd on failure; also, if we succeed at creating the pipe but later fail at changing fcntl, we want - to leave fd unchanged: https://austingroupbugs.net/view.php?id=3D46= 7 */ + to leave fd unchanged: http://austingroupbugs.net/view.php?id=3D467= */ int tmp[2]; tmp[0] =3D fd[0]; tmp[1] =3D fd[1]; diff --git a/lib/pselect.c b/lib/pselect.c index 0fda4eef6e..b5fadc6728 100644 --- a/lib/pselect.c +++ b/lib/pselect.c @@ -4,18 +4,18 @@ =20 This file is part of gnulib. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* written by Paul Eggert */ =20 diff --git a/lib/pthread_sigmask.c b/lib/pthread_sigmask.c index 8a692048a0..11b7091e7f 100644 --- a/lib/pthread_sigmask.c +++ b/lib/pthread_sigmask.c @@ -1,17 +1,17 @@ /* POSIX compatible signal blocking for threads. Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/rawmemchr.c b/lib/rawmemchr.c index bbb250feb8..896d435afc 100644 --- a/lib/rawmemchr.c +++ b/lib/rawmemchr.c @@ -1,17 +1,17 @@ /* Searching in a string. Copyright (C) 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include @@ -19,6 +19,9 @@ /* Specification. */ #include =20 +/* A function definition is only needed if HAVE_RAWMEMCHR is not defined= =2E */ +#if !HAVE_RAWMEMCHR + /* Find the first occurrence of C in S. */ void * rawmemchr (const void *s, int c_in) @@ -134,3 +137,5 @@ rawmemchr (const void *s, int c_in) char_ptr++; return (void *) char_ptr; } + +#endif diff --git a/lib/rawmemchr.valgrind b/lib/rawmemchr.valgrind index 087d5e4178..d489c320c3 100644 --- a/lib/rawmemchr.valgrind +++ b/lib/rawmemchr.valgrind @@ -2,17 +2,17 @@ =20 # Copyright (C) 2008-2021 Free Software Foundation, Inc. # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or -# (at your option) any later version. +# This file is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. # -# This program is distributed in the hope that it will be useful, +# This file is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# GNU Lesser General Public License for more details. # -# You should have received a copy of the GNU General Public License +# You should have received a copy of the GNU Lesser General Public Licen= se # along with this program. If not, see .= =20 # This use is OK because it provides only a speedup. diff --git a/lib/readlink.c b/lib/readlink.c index c4b635ce71..d4f4b08e99 100644 --- a/lib/readlink.c +++ b/lib/readlink.c @@ -1,17 +1,17 @@ /* Read the contents of a symbolic link. Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/realloc.c b/lib/realloc.c new file mode 100644 index 0000000000..af03f0c577 --- /dev/null +++ b/lib/realloc.c @@ -0,0 +1,63 @@ +/* realloc() function that is glibc compatible. + + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2021 Free Software + Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + +/* written by Jim Meyering and Bruno Haible */ + +#include + +#include + +#include + +#include "xalloc-oversized.h" + +/* Call the system's realloc below. This file does not define + _GL_USE_STDLIB_ALLOC because it needs Gnulib's malloc if present. */= +#undef realloc + +/* Change the size of an allocated block of memory P to N bytes, + with error checking. If P is NULL, use malloc. Otherwise if N is ze= ro, + free P and return NULL. */ + +void * +rpl_realloc (void *p, size_t n) +{ + if (p =3D=3D NULL) + return malloc (n); + + if (n =3D=3D 0) + { + free (p); + return NULL; + } + + if (xalloc_oversized (n, 1)) + { + errno =3D ENOMEM; + return NULL; + } + + void *result =3D realloc (p, n); + +#if !HAVE_MALLOC_POSIX + if (result =3D=3D NULL) + errno =3D ENOMEM; +#endif + + return result; +} diff --git a/lib/regcomp.c b/lib/regcomp.c index 0c31b0e14c..887e5b5068 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -1695,12 +1695,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_= t *dfa, Idx node, bool root) reg_errcode_t err; Idx i; re_node_set eclosure; - bool ok; bool incomplete =3D false; err =3D re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); if (__glibc_unlikely (err !=3D REG_NOERROR)) return err; =20 + /* An epsilon closure includes itself. */ + eclosure.elems[eclosure.nelem++] =3D node; + /* This indicates that we are calculating this node now. We reference this value to avoid infinite loop. */ dfa->eclosures[node].nelem =3D -1; @@ -1753,10 +1755,6 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t= *dfa, Idx node, bool root) } } =20 - /* An epsilon closure includes itself. */ - ok =3D re_node_set_insert (&eclosure, node); - if (__glibc_unlikely (! ok)) - return REG_ESPACE; if (incomplete && !root) dfa->eclosures[node].nelem =3D 0; else diff --git a/lib/regex.c b/lib/regex.c index f76a416b3b..7296be0f08 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/regex.h b/lib/regex.h index d291e38793..8e4ef45578 100644 --- a/lib/regex.h +++ b/lib/regex.h @@ -4,16 +4,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/regex_internal.c b/lib/regex_internal.c index 73087c8610..55f6b66de0 100644 --- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -1314,6 +1314,7 @@ re_node_set_insert (re_node_set *set, Idx elem) { for (idx =3D set->nelem; set->elems[idx - 1] > elem; idx--) set->elems[idx] =3D set->elems[idx - 1]; + DEBUG_ASSERT (set->elems[idx - 1] < elem); } =20 /* Insert the new element. */ diff --git a/lib/regex_internal.h b/lib/regex_internal.h index 4c634edcbf..1245e782ff 100644 --- a/lib/regex_internal.h +++ b/lib/regex_internal.h @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -32,7 +32,10 @@ #define _REGEX_INTERNAL_H 1 #include #include =20 -#include +#ifndef _LIBC +# include +#endif + #include #include =20 @@ -50,14 +53,14 @@ #define _REGEX_INTERNAL_H 1 # define lock_fini(lock) ((void) 0) # define lock_lock(lock) __libc_lock_lock (lock) # define lock_unlock(lock) __libc_lock_unlock (lock) -#elif defined GNULIB_LOCK && !defined USE_UNLOCKED_IO +#elif defined GNULIB_LOCK && !defined GNULIB_REGEX_SINGLE_THREAD # include "glthread/lock.h" # define lock_define(name) gl_lock_define (, name) # define lock_init(lock) glthread_lock_init (&(lock)) # define lock_fini(lock) glthread_lock_destroy (&(lock)) # define lock_lock(lock) glthread_lock_lock (&(lock)) # define lock_unlock(lock) glthread_lock_unlock (&(lock)) -#elif defined GNULIB_PTHREAD && !defined USE_UNLOCKED_IO +#elif defined GNULIB_PTHREAD && !defined GNULIB_REGEX_SINGLE_THREAD # include # define lock_define(name) pthread_mutex_t name; # define lock_init(lock) pthread_mutex_init (&(lock), 0) diff --git a/lib/regexec.c b/lib/regexec.c index 15dc57bd0e..5e4eb497a6 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -4,16 +4,16 @@ Contributed by Isamu Hasegawa . =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 @@ -59,7 +59,7 @@ Idx cur_idx, Idx nmatch); static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, Idx nregs, - regmatch_t *regs, + regmatch_t *regs, regmatch_t *prevregs, re_node_set *eps_via_nodes); static reg_errcode_t set_regs (const regex_t *preg, const re_match_context_t *mctx, @@ -186,7 +186,8 @@ REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. =20 - We return 0 if we find a match and REG_NOMATCH if not. */ + Return 0 if a match is found, REG_NOMATCH if not, REG_BADPAT if + EFLAGS is invalid. */ =20 int regexec (const regex_t *__restrict preg, const char *__restrict string, @@ -269,8 +270,8 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC= _2_0); strings.) =20 On success, re_match* functions return the length of the match, re_se= arch* - return the position of the start of the match. Return value -1 means= no - match was found and -2 indicates an internal error. */ + return the position of the start of the match. They return -1 on + match failure, -2 on error. */ =20 regoff_t re_match (struct re_pattern_buffer *bufp, const char *string, Idx length= , @@ -1206,27 +1207,30 @@ check_halt_state_context (const re_match_context_= t *mctx, /* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA= corresponding to the DFA). Return the destination node, and update EPS_VIA_NODES; - return -1 in case of errors. */ + return -1 on match failure, -2 on error. */ =20 static Idx proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t= *regs, + regmatch_t *prevregs, Idx *pidx, Idx node, re_node_set *eps_via_nodes, struct re_fail_stack_t *fs) { const re_dfa_t *const dfa =3D mctx->dfa; - Idx i; - bool ok; if (IS_EPSILON_NODE (dfa->nodes[node].type)) { re_node_set *cur_nodes =3D &mctx->state_log[*pidx]->nodes; re_node_set *edests =3D &dfa->edests[node]; - Idx dest_node; - ok =3D re_node_set_insert (eps_via_nodes, node); - if (__glibc_unlikely (! ok)) - return -2; - /* Pick up a valid destination, or return -1 if none - is found. */ - for (dest_node =3D -1, i =3D 0; i < edests->nelem; ++i) + + if (! re_node_set_contains (eps_via_nodes, node)) + { + bool ok =3D re_node_set_insert (eps_via_nodes, node); + if (__glibc_unlikely (! ok)) + return -2; + } + + /* Pick a valid destination, or return -1 if none is found. */ + Idx dest_node =3D -1; + for (Idx i =3D 0; i < edests->nelem; i++) { Idx candidate =3D edests->elems[i]; if (!re_node_set_contains (cur_nodes, candidate)) @@ -1244,7 +1248,7 @@ proceed_next_node (const re_match_context_t *mctx, = Idx nregs, regmatch_t *regs, /* Otherwise, push the second epsilon-transition on the fail stac= k. */ else if (fs !=3D NULL && push_fail_stack (fs, *pidx, candidate, nregs, regs, - eps_via_nodes)) + prevregs, eps_via_nodes)) return -2; =20 /* We know we are going to exit. */ @@ -1288,7 +1292,7 @@ proceed_next_node (const re_match_context_t *mctx, = Idx nregs, regmatch_t *regs, if (naccepted =3D=3D 0) { Idx dest_node; - ok =3D re_node_set_insert (eps_via_nodes, node); + bool ok =3D re_node_set_insert (eps_via_nodes, node); if (__glibc_unlikely (! ok)) return -2; dest_node =3D dfa->edests[node].elems[0]; @@ -1317,7 +1321,8 @@ proceed_next_node (const re_match_context_t *mctx, = Idx nregs, regmatch_t *regs, static reg_errcode_t __attribute_warn_unused_result__ push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,= - Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) + Idx nregs, regmatch_t *regs, regmatch_t *prevregs, + re_node_set *eps_via_nodes) { reg_errcode_t err; Idx num =3D fs->num++; @@ -1333,25 +1338,30 @@ push_fail_stack (struct re_fail_stack_t *fs, Idx = str_idx, Idx dest_node, } fs->stack[num].idx =3D str_idx; fs->stack[num].node =3D dest_node; - fs->stack[num].regs =3D re_malloc (regmatch_t, nregs); + fs->stack[num].regs =3D re_malloc (regmatch_t, 2 * nregs); if (fs->stack[num].regs =3D=3D NULL) return REG_ESPACE; memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); + memcpy (fs->stack[num].regs + nregs, prevregs, sizeof (regmatch_t) * n= regs); err =3D re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_= nodes); return err; } =20 static Idx pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, - regmatch_t *regs, re_node_set *eps_via_nodes) + regmatch_t *regs, regmatch_t *prevregs, + re_node_set *eps_via_nodes) { + if (fs =3D=3D NULL || fs->num =3D=3D 0) + return -1; Idx num =3D --fs->num; - DEBUG_ASSERT (num >=3D 0); *pidx =3D fs->stack[num].idx; memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); + memcpy (prevregs, fs->stack[num].regs + nregs, sizeof (regmatch_t) * n= regs); re_node_set_free (eps_via_nodes); re_free (fs->stack[num].regs); *eps_via_nodes =3D fs->stack[num].eps_via_nodes; + DEBUG_ASSERT (0 <=3D fs->stack[num].node); return fs->stack[num].node; } =20 @@ -1407,33 +1417,32 @@ set_regs (const regex_t *preg, const re_match_con= text_t *mctx, size_t nmatch, { update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); =20 - if (idx =3D=3D pmatch[0].rm_eo && cur_node =3D=3D mctx->last_node)= + if ((idx =3D=3D pmatch[0].rm_eo && cur_node =3D=3D mctx->last_node= ) + || (fs && re_node_set_contains (&eps_via_nodes, cur_node))) { Idx reg_idx; + cur_node =3D -1; if (fs) { for (reg_idx =3D 0; reg_idx < nmatch; ++reg_idx) if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo =3D=3D -1) - break; - if (reg_idx =3D=3D nmatch) - { - re_node_set_free (&eps_via_nodes); - regmatch_list_free (&prev_match); - return free_fail_stack_return (fs); - } - cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); + { + cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, + prev_idx_match, &eps_via_nodes); + break; + } } - else + if (cur_node < 0) { re_node_set_free (&eps_via_nodes); regmatch_list_free (&prev_match); - return REG_NOERROR; + return free_fail_stack_return (fs); } } =20 /* Proceed to next node. */ - cur_node =3D proceed_next_node (mctx, nmatch, pmatch, &idx, cur_no= de, + cur_node =3D proceed_next_node (mctx, nmatch, pmatch, prev_idx_mat= ch, + &idx, cur_node, &eps_via_nodes, fs); =20 if (__glibc_unlikely (cur_node < 0)) @@ -1445,13 +1454,13 @@ set_regs (const regex_t *preg, const re_match_con= text_t *mctx, size_t nmatch, free_fail_stack_return (fs); return REG_ESPACE; } - if (fs) - cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); - else + cur_node =3D pop_fail_stack (fs, &idx, nmatch, pmatch, + prev_idx_match, &eps_via_nodes); + if (cur_node < 0) { re_node_set_free (&eps_via_nodes); regmatch_list_free (&prev_match); + free_fail_stack_return (fs); return REG_NOMATCH; } } @@ -1495,10 +1504,10 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pma= tch, } else if (type =3D=3D OP_CLOSE_SUBEXP) { + /* We are at the last node of this sub expression. */ Idx reg_num =3D dfa->nodes[cur_node].opr.idx + 1; if (reg_num < nmatch) { - /* We are at the last node of this sub expression. */ if (pmatch[reg_num].rm_so < cur_idx) { pmatch[reg_num].rm_eo =3D cur_idx; @@ -2195,6 +2204,7 @@ sift_states_iter_mb (const re_match_context_t *mctx= , re_sift_context_t *sctx, =20 /* Return the next state to which the current state STATE will transit b= y accepting the current input byte, and update STATE_LOG if necessary. + Return NULL on failure. If STATE can accept a multibyte char/collating element/back reference= update the destination of STATE_LOG. */ =20 @@ -2395,7 +2405,7 @@ check_subexp_matching_top (re_match_context_t *mctx= , re_node_set *cur_nodes, =20 #if 0 /* Return the next state to which the current state STATE will transit b= y - accepting the current input byte. */ + accepting the current input byte. Return NULL on failure. */ =20 static re_dfastate_t * transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, @@ -2817,7 +2827,8 @@ find_subexp_node (const re_dfa_t *dfa, const re_nod= e_set *nodes, /* Check whether the node TOP_NODE at TOP_STR can arrive to the node LAST_NODE at LAST_STR. We record the path onto PATH since it will be= heavily reused. - Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ + Return REG_NOERROR if it can arrive, REG_NOMATCH if it cannot, + REG_ESPACE if memory is exhausted. */ =20 static reg_errcode_t __attribute_warn_unused_result__ @@ -3433,7 +3444,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *= state) /* Group all nodes belonging to STATE into several destinations. Then for all destinations, set the nodes belonging to the destination= to DESTS_NODE[i] and set the characters accepted by the destination - to DEST_CH[i]. This function return the number of destinations. */ + to DEST_CH[i]. Return the number of destinations if successful, + -1 on internal error. */ =20 static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *st= ate, @@ -4211,7 +4223,8 @@ match_ctx_add_subtop (re_match_context_t *mctx, Idx= node, Idx str_idx) } =20 /* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matc= hes - at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ + at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. + Return the new entry if successful, NULL if memory is exhausted. */ =20 static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx= ) diff --git a/lib/root-uid.h b/lib/root-uid.h index cb74a49c1b..b367d5ab69 100644 --- a/lib/root-uid.h +++ b/lib/root-uid.h @@ -2,20 +2,20 @@ =20 Copyright 2012-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program. If not, see = =2E + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 - Written by Paul Eggert. */ +/* Written by Paul Eggert. */ =20 #ifndef ROOT_UID_H_ #define ROOT_UID_H_ diff --git a/lib/scratch_buffer.h b/lib/scratch_buffer.h index 603b0d65d0..88735771d2 100644 --- a/lib/scratch_buffer.h +++ b/lib/scratch_buffer.h @@ -1,17 +1,17 @@ /* Variable-sized buffer with on-stack default allocation. Copyright (C) 2017-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, 2017. */ @@ -19,12 +19,109 @@ #ifndef _GL_SCRATCH_BUFFER_H #define _GL_SCRATCH_BUFFER_H =20 -#include +/* Scratch buffers with a default stack allocation and fallback to + heap allocation. It is expected that this function is used in this + way: =20 + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + return -1; + + scratch_buffer_free (&tmpbuf); + return 0; + + The allocation functions (scratch_buffer_grow, + scratch_buffer_grow_preserve, scratch_buffer_set_array_size) make + sure that the heap allocation, if any, is freed, so that the code + above does not have a memory leak. The buffer still remains in a + state that can be deallocated using scratch_buffer_free, so a loop + like this is valid as well: + + struct scratch_buffer tmpbuf; + scratch_buffer_init (&tmpbuf); + + while (!function_that_uses_buffer (tmpbuf.data, tmpbuf.length)) + if (!scratch_buffer_grow (&tmpbuf)) + break; + + scratch_buffer_free (&tmpbuf); + + scratch_buffer_grow and scratch_buffer_grow_preserve are guaranteed + to grow the buffer by at least 512 bytes. This means that when + using the scratch buffer as a backing store for a non-character + array whose element size, in bytes, is 512 or smaller, the scratch + buffer only has to grow once to make room for at least one more + element. +*/ + +/* Scratch buffer. Must be initialized with scratch_buffer_init + before its use. */ +struct scratch_buffer; + +/* Initializes *BUFFER so that BUFFER->data points to BUFFER->__space + and BUFFER->length reflects the available space. */ +#if 0 +extern void scratch_buffer_init (struct scratch_buffer *buffer); +#endif + +/* Deallocates *BUFFER (if it was heap-allocated). */ +#if 0 +extern void scratch_buffer_free (struct scratch_buffer *buffer); +#endif + +/* Grow *BUFFER by some arbitrary amount. The buffer contents is NOT + preserved. Return true on success, false on allocation failure (in + which case the old buffer is freed). On success, the new buffer is + larger than the previous size. On failure, *BUFFER is deallocated, + but remains in a free-able state, and errno is set. */ +#if 0 +extern bool scratch_buffer_grow (struct scratch_buffer *buffer); +#endif + +/* Like scratch_buffer_grow, but preserve the old buffer + contents on success, as a prefix of the new buffer. */ +#if 0 +extern bool scratch_buffer_grow_preserve (struct scratch_buffer *buffer)= ; +#endif + +/* Grow *BUFFER so that it can store at least NELEM elements of SIZE + bytes. The buffer contents are NOT preserved. Both NELEM and SIZE + can be zero. Return true on success, false on allocation failure + (in which case the old buffer is freed, but *BUFFER remains in a + free-able state, and errno is set). It is unspecified whether this + function can reduce the array size. */ +#if 0 +extern bool scratch_buffer_set_array_size (struct scratch_buffer *buffer= , + size_t nelem, size_t size); +#endif + +/* Return a copy of *BUFFER's first SIZE bytes as a heap-allocated block= , + deallocating *BUFFER if it was heap-allocated. SIZE must be at + most *BUFFER's size. Return NULL (setting errno) on memory + exhaustion. */ +#if 0 +extern void *scratch_buffer_dupfree (struct scratch_buffer *buffer, + size_t size); +#endif + + +/* The implementation is imported from glibc. */ + +/* Avoid possible conflicts with symbols exported by the GNU libc. */ #define __libc_scratch_buffer_dupfree gl_scratch_buffer_dupfree #define __libc_scratch_buffer_grow gl_scratch_buffer_grow #define __libc_scratch_buffer_grow_preserve gl_scratch_buffer_grow_prese= rve #define __libc_scratch_buffer_set_array_size gl_scratch_buffer_set_array= _size -#include + +#ifndef _GL_LIKELY +/* Rely on __builtin_expect, as provided by the module 'builtin-expect'.= */ +# define _GL_LIKELY(cond) __builtin_expect ((cond), 1) +# define _GL_UNLIKELY(cond) __builtin_expect ((cond), 0) +#endif + +#include =20 #endif /* _GL_SCRATCH_BUFFER_H */ diff --git a/lib/sha1.c b/lib/sha1.c index 612d46de82..df2dbb4959 100644 --- a/lib/sha1.c +++ b/lib/sha1.c @@ -3,18 +3,18 @@ =20 Copyright (C) 2000-2001, 2003-2006, 2008-2021 Free Software Foundatio= n, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Scott G. Miller Credits: diff --git a/lib/sha1.h b/lib/sha1.h index 94ccd18fda..a619623f7c 100644 --- a/lib/sha1.h +++ b/lib/sha1.h @@ -3,18 +3,18 @@ Copyright (C) 2000-2001, 2003, 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef SHA1_H # define SHA1_H 1 diff --git a/lib/sha256.c b/lib/sha256.c index 129d64b174..2a2ca5316b 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -3,17 +3,17 @@ =20 Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by David Madore, considerably copypasting from diff --git a/lib/sha256.h b/lib/sha256.h index b4bc082267..31d788b88e 100644 --- a/lib/sha256.h +++ b/lib/sha256.h @@ -2,17 +2,17 @@ library functions. Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef SHA256_H diff --git a/lib/sha512.c b/lib/sha512.c index 4ac3fa3e42..a3533209c6 100644 --- a/lib/sha512.c +++ b/lib/sha512.c @@ -3,17 +3,17 @@ =20 Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by David Madore, considerably copypasting from diff --git a/lib/sha512.h b/lib/sha512.h index 81b53034c7..8a540bff85 100644 --- a/lib/sha512.h +++ b/lib/sha512.h @@ -2,17 +2,17 @@ library functions. Copyright (C) 2005-2006, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef SHA512_H diff --git a/lib/sigdescr_np.c b/lib/sigdescr_np.c index 6c9bf283a8..7f8dccf81a 100644 --- a/lib/sigdescr_np.c +++ b/lib/sigdescr_np.c @@ -1,17 +1,17 @@ /* English descriptions of signals. Copyright (C) 2020-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Bruno Haible , 2020. */ diff --git a/lib/signal.in.h b/lib/signal.in.h index ed01d672c9..275da8c817 100644 --- a/lib/signal.in.h +++ b/lib/signal.in.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 diff --git a/lib/stat-time.c b/lib/stat-time.c index 81b83ddb4f..7b92792694 100644 --- a/lib/stat-time.c +++ b/lib/stat-time.c @@ -1,3 +1,21 @@ +/* stat-related time functions. + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_STAT_TIME_INLINE _GL_EXTERN_INLINE #include "stat-time.h" diff --git a/lib/stat-time.h b/lib/stat-time.h index 523ed21b08..fe3483d633 100644 --- a/lib/stat-time.h +++ b/lib/stat-time.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2005, 2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/stdalign.in.h b/lib/stdalign.in.h index eae9d13221..592d58e372 100644 --- a/lib/stdalign.in.h +++ b/lib/stdalign.in.h @@ -2,18 +2,18 @@ =20 Copyright 2011-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert and Bruno Haible. */ =20 @@ -104,12 +104,13 @@ #define __alignof_is_defined 1 #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 # if defined __cplusplus && 201103 <=3D __cplusplus # define _Alignas(a) alignas (a) -# elif ((defined __APPLE__ && defined __MACH__ \ - ? 4 < __GNUC__ + (1 <=3D __GNUC_MINOR__) \ - : __GNUC__ && !defined __ibmxl__) \ - || (4 <=3D __clang_major__) \ - || (__ia64 && (61200 <=3D __HP_cc || 61200 <=3D __HP_aCC)) \ - || __ICC || 0x590 <=3D __SUNPRO_C || 0x0600 <=3D __xlC__) +# elif (!defined __attribute__ \ + && ((defined __APPLE__ && defined __MACH__ \ + ? 4 < __GNUC__ + (1 <=3D __GNUC_MINOR__) \ + : __GNUC__ && !defined __ibmxl__) \ + || (4 <=3D __clang_major__) \ + || (__ia64 && (61200 <=3D __HP_cc || 61200 <=3D __HP_aCC)) \= + || __ICC || 0x590 <=3D __SUNPRO_C || 0x0600 <=3D __xlC__)) # define _Alignas(a) __attribute__ ((__aligned__ (a))) # elif 1300 <=3D _MSC_VER # define _Alignas(a) __declspec (align (a)) diff --git a/lib/stddef.in.h b/lib/stddef.in.h index 0f506a5b18..42290d448d 100644 --- a/lib/stddef.in.h +++ b/lib/stddef.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Eric Blake. */ =20 @@ -42,6 +42,13 @@ # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ + /* On TinyCC, make sure that the macros that indicate the special inv= ocation + convention get undefined. */ +# undef __need_wchar_t +# undef __need_size_t +# undef __need_ptrdiff_t +# undef __need_NULL +# undef __need_wint_t # endif =20 #else @@ -51,7 +58,7 @@ =20 /* On AIX 7.2, with xlc in 64-bit mode, defines max_align_t t= o a type with alignment 4, but 'long' has alignment 8. */ -# if defined _AIX && defined _ARCH_PPC64 +# if defined _AIX && defined __LP64__ # if !GNULIB_defined_max_align_t # ifdef _MAX_ALIGN_T /* /usr/include/stddef.h has already defined max_align_t. Override it. = */ @@ -109,7 +116,7 @@ && defined __cplusplus # include #else -# if ! (@HAVE_MAX_ALIGN_T@ || defined _GCC_MAX_ALIGN_T) +# if ! (@HAVE_MAX_ALIGN_T@ || (defined _GCC_MAX_ALIGN_T && !defined __cl= ang__)) # if !GNULIB_defined_max_align_t /* On the x86, the maximum storage alignment of double, long, etc. is 4,= but GCC's C11 ABI for x86 says that max_align_t has an alignment of 8= , diff --git a/lib/stdint.in.h b/lib/stdint.in.h index 7a8f27cef7..85c5418f14 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -2,18 +2,18 @@ Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* * ISO C 99 for platforms that lack it. @@ -85,7 +85,7 @@ #define _@GUARD_PREFIX@_STDINT_H =20 /* Override WINT_MIN and WINT_MAX if gnulib's or ov= errides wint_t. */ -#if @GNULIB_OVERRIDES_WINT_T@ +#if @GNULIBHEADERS_OVERRIDE_WINT_T@ # undef WINT_MIN # undef WINT_MAX # define WINT_MIN 0x0U @@ -598,7 +598,7 @@ #define _@GUARD_PREFIX@_STDINT_H /* wint_t limits */ /* If gnulib's or overrides wint_t, @WINT_T_SUFFIX@= is not accurate, therefore use the definitions from above. */ -# if !@GNULIB_OVERRIDES_WINT_T@ +# if !@GNULIBHEADERS_OVERRIDE_WINT_T@ # undef WINT_MIN # undef WINT_MAX # if @HAVE_SIGNED_WINT_T@ diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 2a5db74f28..3fa94b487e 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -1,17 +1,17 @@ /* Implementation details of FILE streams. Copyright (C) 2007-2008, 2010-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Many stdio implementations have the same logic and therefore can shar= e diff --git a/lib/stdio.in.h b/lib/stdio.in.h index a930840505..20ba488a47 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2004, 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ @@ -242,7 +242,7 @@ _GL_WARN_ON_USE (fclose, "fclose is not always POSIX = compliant - " _GL_CXXALIAS_MDA (fcloseall, int, (void)); # else # if @HAVE_DECL_FCLOSEALL@ -# if defined __FreeBSD__ +# if defined __FreeBSD__ || defined __DragonFly__ _GL_CXXALIAS_SYS (fcloseall, void, (void)); # else _GL_CXXALIAS_SYS (fcloseall, int, (void)); @@ -1257,6 +1257,7 @@ _GL_CXXALIASWARN (scanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define snprintf rpl_snprintf # endif +# define GNULIB_overrides_snprintf 1 _GL_FUNCDECL_RPL (snprintf, int, (char *restrict str, size_t size, const char *restrict format, ...) @@ -1302,6 +1303,7 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable = - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define sprintf rpl_sprintf # endif +# define GNULIB_overrides_sprintf 1 _GL_FUNCDECL_RPL (sprintf, int, (char *restrict str, const char *restrict format, ...)= _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) @@ -1369,6 +1371,7 @@ _GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on= mingw - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define asprintf rpl_asprintf # endif +# define GNULIB_overrides_asprintf _GL_FUNCDECL_RPL (asprintf, int, (char **result, const char *format, ...) _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 3) @@ -1390,6 +1393,7 @@ _GL_CXXALIASWARN (asprintf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vasprintf rpl_vasprintf # endif +# define GNULIB_overrides_vasprintf 1 _GL_FUNCDECL_RPL (vasprintf, int, (char **result, const char *format, va_list args) _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD (2, 0) @@ -1573,6 +1577,7 @@ _GL_CXXALIASWARN (vscanf); # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsnprintf rpl_vsnprintf # endif +# define GNULIB_overrides_vsnprintf 1 _GL_FUNCDECL_RPL (vsnprintf, int, (char *restrict str, size_t size, const char *restrict format, va_list args) @@ -1609,6 +1614,7 @@ _GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportabl= e - " # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define vsprintf rpl_vsprintf # endif +# define GNULIB_overrides_vsprintf 1 _GL_FUNCDECL_RPL (vsprintf, int, (char *restrict str, const char *restrict format, va_list args) diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 49fc44e14a..652062d949 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -2,17 +2,17 @@ =20 Copyright (C) 1995, 2001-2004, 2006-2021 Free Software Foundation, In= c. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @@ -1032,12 +1032,23 @@ _GL_WARN_ON_USE (realloc, "realloc is not POSIX c= ompliant everywhere - " =20 =20 #if @GNULIB_REALLOCARRAY@ -# if ! @HAVE_REALLOCARRAY@ +# if @REPLACE_REALLOCARRAY@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# undef reallocarray +# define reallocarray rpl_reallocarray +# endif +_GL_FUNCDECL_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +_GL_CXXALIAS_RPL (reallocarray, void *, + (void *ptr, size_t nmemb, size_t size)); +# else +# if ! @HAVE_REALLOCARRAY@ _GL_FUNCDECL_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); -# endif +# endif _GL_CXXALIAS_SYS (reallocarray, void *, (void *ptr, size_t nmemb, size_t size)); +# endif _GL_CXXALIASWARN (reallocarray); #elif defined GNULIB_POSIXCHECK # undef reallocarray @@ -1202,6 +1213,47 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable -= " # endif #endif =20 +#if @GNULIB_STRTOL@ +/* Parse a signed integer whose textual representation starts at STRING.= + The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with pre= fix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the intege= r is + stored in *ENDPTR. + Upon overflow, the return value is LONG_MAX or LONG_MIN, and errno is= set + to ERANGE. */ +# if @REPLACE_STRTOL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtol rpl_strtol +# endif +# define GNULIB_defined_strtol_function 1 +_GL_FUNCDECL_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOL@ +_GL_FUNCDECL_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtol, long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtol); +#elif defined GNULIB_POSIXCHECK +# undef strtol +# if HAVE_RAW_DECL_STRTOL +_GL_WARN_ON_USE (strtol, "strtol is unportable - " + "use gnulib module strtol for portability"); +# endif +#endif + #if @GNULIB_STRTOLL@ /* Parse a signed integer whose textual representation starts at STRING.= The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, @@ -1211,15 +1263,29 @@ _GL_WARN_ON_USE (strtold, "strtold is unportable = - " stored in *ENDPTR. Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno = is set to ERANGE. */ -# if !@HAVE_STRTOLL@ +# if @REPLACE_STRTOLL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoll rpl_strtoll +# endif +# define GNULIB_defined_strtoll_function 1 +_GL_FUNCDECL_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoll, long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOLL@ _GL_FUNCDECL_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoll, long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoll); #elif defined GNULIB_POSIXCHECK # undef strtoll @@ -1229,6 +1295,46 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable -= " # endif #endif =20 +#if @GNULIB_STRTOUL@ +/* Parse an unsigned integer whose textual representation starts at STRI= NG. + The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, + it may be decimal or octal (with prefix "0") or hexadecimal (with pre= fix + "0x"). + If ENDPTR is not NULL, the address of the first byte after the intege= r is + stored in *ENDPTR. + Upon overflow, the return value is ULONG_MAX, and errno is set to ERA= NGE. */ +# if @REPLACE_STRTOUL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoul rpl_strtoul +# endif +# define GNULIB_defined_strtoul_function 1 +_GL_FUNCDECL_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOUL@ +_GL_FUNCDECL_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +# endif +_GL_CXXALIAS_SYS (strtoul, unsigned long, + (const char *restrict string, char **restrict endptr, + int base)); +# endif +_GL_CXXALIASWARN (strtoul); +#elif defined GNULIB_POSIXCHECK +# undef strtoul +# if HAVE_RAW_DECL_STRTOUL +_GL_WARN_ON_USE (strtoul, "strtoul is unportable - " + "use gnulib module strtoul for portability"); +# endif +#endif + #if @GNULIB_STRTOULL@ /* Parse an unsigned integer whose textual representation starts at STRI= NG. The integer is expected to be in base BASE (2 <=3D BASE <=3D 36); if = BASE =3D=3D 0, @@ -1238,15 +1344,29 @@ _GL_WARN_ON_USE (strtoll, "strtoll is unportable = - " stored in *ENDPTR. Upon overflow, the return value is ULLONG_MAX, and errno is set to ERANGE. */ -# if !@HAVE_STRTOULL@ +# if @REPLACE_STRTOULL@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# define strtoull rpl_strtoull +# endif +# define GNULIB_defined_strtoull_function 1 +_GL_FUNCDECL_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base) + _GL_ARG_NONNULL ((1))); +_GL_CXXALIAS_RPL (strtoull, unsigned long long, + (const char *restrict string, char **restrict endptr, + int base)); +# else +# if !@HAVE_STRTOULL@ _GL_FUNCDECL_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base) _GL_ARG_NONNULL ((1))); -# endif +# endif _GL_CXXALIAS_SYS (strtoull, unsigned long long, (const char *restrict string, char **restrict endptr, int base)); +# endif _GL_CXXALIASWARN (strtoull); #elif defined GNULIB_POSIXCHECK # undef strtoull diff --git a/lib/stpcpy.c b/lib/stpcpy.c index a4165ba4bf..c312fe44ba 100644 --- a/lib/stpcpy.c +++ b/lib/stpcpy.c @@ -5,17 +5,17 @@ NOTE: The canonical source of this file is maintained with the GNU C = Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/str-two-way.h b/lib/str-two-way.h index 005a19fb51..fc2db03b7b 100644 --- a/lib/str-two-way.h +++ b/lib/str-two-way.h @@ -3,18 +3,18 @@ This file is part of the GNU C Library. Written by Eric Blake , 2008. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Before including this file, you need to include and , and define: diff --git a/lib/strftime.h b/lib/strftime.h index 7284f67133..790a80ed8f 100644 --- a/lib/strftime.h +++ b/lib/strftime.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2002, 2004, 2008-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/string.in.h b/lib/string.in.h index c76c1820b3..cb964bc8d1 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 1995-1996, 2001-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ @@ -446,7 +446,7 @@ _GL_WARN_ON_USE (strdup, "strdup is unportable - " #elif @GNULIB_MDA_STRDUP@ /* On native Windows, map 'creat' to '_creat', so that -loldnames is not= required. In C++ with GNULIB_NAMESPACE, avoid differences between - platforms by defining GNULIB_NAMESPACE::creat always. */ + platforms by defining GNULIB_NAMESPACE::strdup always. */ # if defined _WIN32 && !defined __CYGWIN__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef strdup diff --git a/lib/strnlen.c b/lib/strnlen.c index c27a0392c2..ded06ce23f 100644 --- a/lib/strnlen.c +++ b/lib/strnlen.c @@ -2,18 +2,18 @@ Copyright (C) 2005-2007, 2009-2021 Free Software Foundation, Inc. Written by Simon Josefsson. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #include =20 diff --git a/lib/strtoimax.c b/lib/strtoimax.c index 37a25c31d4..bf8534a767 100644 --- a/lib/strtoimax.c +++ b/lib/strtoimax.c @@ -3,17 +3,17 @@ Copyright (C) 1999, 2001-2004, 2006, 2009-2021 Free Software Foundati= on, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/strtol.c b/lib/strtol.c index 2f2159b623..c49321ba0c 100644 --- a/lib/strtol.c +++ b/lib/strtol.c @@ -6,17 +6,17 @@ NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@gnu.org. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifdef _LIBC @@ -51,6 +51,7 @@ =20 /* Determine the name. */ #ifdef USE_IN_EXTENDED_LOCALE_MODEL +# undef strtol # if UNSIGNED # ifdef USE_WIDE_CHAR # ifdef QUAD @@ -82,6 +83,7 @@ # endif #else # if UNSIGNED +# undef strtol # ifdef USE_WIDE_CHAR # ifdef QUAD # define strtol wcstoull @@ -97,6 +99,7 @@ # endif # else # ifdef USE_WIDE_CHAR +# undef strtol # ifdef QUAD # define strtol wcstoll # else @@ -104,6 +107,7 @@ # endif # else # ifdef QUAD +# undef strtol # define strtol strtoll # endif # endif @@ -131,6 +135,12 @@ #endif =20 =20 +#ifdef USE_NUMBER_GROUPING +# define GROUP_PARAM_PROTO , int group +#else +# define GROUP_PARAM_PROTO +#endif + /* We use this code also for the extended locale handling where the function gets as an additional argument the locale which has to be used. To access the values we have to redefine the _NL_CURRENT @@ -166,19 +176,23 @@ # define UCHAR_TYPE unsigned char # define STRING_TYPE char # ifdef USE_IN_EXTENDED_LOCALE_MODEL -# define ISSPACE(Ch) __isspace_l ((Ch), loc) -# define ISALPHA(Ch) __isalpha_l ((Ch), loc) -# define TOUPPER(Ch) __toupper_l ((Ch), loc) +# define ISSPACE(Ch) __isspace_l ((unsigned char) (Ch), loc) +# define ISALPHA(Ch) __isalpha_l ((unsigned char) (Ch), loc) +# define TOUPPER(Ch) __toupper_l ((unsigned char) (Ch), loc) # else -# define ISSPACE(Ch) isspace (Ch) -# define ISALPHA(Ch) isalpha (Ch) -# define TOUPPER(Ch) toupper (Ch) +# define ISSPACE(Ch) isspace ((unsigned char) (Ch)) +# define ISALPHA(Ch) isalpha ((unsigned char) (Ch)) +# define TOUPPER(Ch) toupper ((unsigned char) (Ch)) # endif #endif =20 -#define INTERNAL(X) INTERNAL1(X) -#define INTERNAL1(X) __##X##_internal -#define WEAKNAME(X) WEAKNAME1(X) +#ifdef USE_NUMBER_GROUPING +# define INTERNAL(X) INTERNAL1(X) +# define INTERNAL1(X) __##X##_internal +# define WEAKNAME(X) WEAKNAME1(X) +#else +# define INTERNAL(X) X +#endif =20 #ifdef USE_NUMBER_GROUPING /* This file defines a function to check for correct grouping. */ @@ -196,7 +210,7 @@ #define WEAKNAME(X) WEAKNAME1(X) =20 INT INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr, - int base, int group LOCALE_PARAM_PROTO) + int base GROUP_PARAM_PROTO LOCALE_PARAM_PROTO) { int negative; register unsigned LONG int cutoff; @@ -379,15 +393,16 @@ INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_= TYPE **endptr, return 0L; } =0C +#ifdef USE_NUMBER_GROUPING /* External user entry point. */ =20 - INT -#ifdef weak_function +# ifdef weak_function weak_function -#endif +# endif strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr, int base LOCALE_PARAM_PROTO) { return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM); } +#endif diff --git a/lib/strtoll.c b/lib/strtoll.c index 30daefc50f..8e6f93faeb 100644 --- a/lib/strtoll.c +++ b/lib/strtoll.c @@ -3,17 +3,17 @@ Inc. This file is part of the GNU C Library. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #define QUAD 1 diff --git a/lib/symlink.c b/lib/symlink.c index 2f6c0d484b..6e488986c1 100644 --- a/lib/symlink.c +++ b/lib/symlink.c @@ -1,17 +1,17 @@ /* Stub for symlink(). Copyright (C) 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #include diff --git a/lib/sys_random.in.h b/lib/sys_random.in.h index 5b9280dda3..1abd6c544e 100644 --- a/lib/sys_random.in.h +++ b/lib/sys_random.in.h @@ -1,18 +1,18 @@ /* Substitute for . Copyright (C) 2020-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 # if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/sys_select.in.h b/lib/sys_select.in.h index 1dacb21087..f8ef648d48 100644 --- a/lib/sys_select.in.h +++ b/lib/sys_select.in.h @@ -1,18 +1,18 @@ /* Substitute for . Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 # if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 13d12943cd..babe3dba3e 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -1,18 +1,18 @@ /* Provide a more complete sys/stat.h header file. Copyright (C) 2005-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Eric Blake, Paul Eggert, and Jim Meyering. */ =20 diff --git a/lib/sys_time.in.h b/lib/sys_time.in.h index 90a67d1842..8035fbe7ec 100644 --- a/lib/sys_time.in.h +++ b/lib/sys_time.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/sys_types.in.h b/lib/sys_types.in.h index 654e80335f..2079d72efc 100644 --- a/lib/sys_types.in.h +++ b/lib/sys_types.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2011-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ diff --git a/lib/tempname.c b/lib/tempname.c index e243483eaf..5f804b38d7 100644 --- a/lib/tempname.c +++ b/lib/tempname.c @@ -2,16 +2,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/tempname.h b/lib/tempname.h index a8681fc998..795bb49764 100644 --- a/lib/tempname.h +++ b/lib/tempname.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* header written by Eric Blake */ diff --git a/lib/time-internal.h b/lib/time-internal.h index 067ee729ed..6bbd0a727b 100644 --- a/lib/time-internal.h +++ b/lib/time-internal.h @@ -2,18 +2,18 @@ =20 Copyright 2015-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/time.in.h b/lib/time.in.h index 1385980cdf..a73fe59cbb 100644 --- a/lib/time.in.h +++ b/lib/time.in.h @@ -2,18 +2,18 @@ =20 Copyright (C) 2007-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #if __GNUC__ >=3D 3 @PRAGMA_SYSTEM_HEADER@ @@ -340,22 +340,60 @@ _GL_CXXALIASWARN (strftime); # endif =20 # if defined _GNU_SOURCE && @GNULIB_TIME_RZ@ && ! @HAVE_TIMEZONE_T@ +/* Functions that use a first-class time zone data type, instead of + relying on an implicit global time zone. + Inspired by NetBSD. */ + +/* Represents a time zone. + (timezone_t) NULL stands for UTC. */ typedef struct tm_zone *timezone_t; + +/* tzalloc (name) + Returns a time zone object for the given time zone NAME. This object= + represents the time zone that other functions would use it the TZ + environment variable was set to NAME. + If NAME is NULL, the result represents the time zone that other funct= ions + would use it the TZ environment variable was unset. + May return NULL if NAME is invalid (this is platform dependent) or + upon memory allocation failure. */ _GL_FUNCDECL_SYS (tzalloc, timezone_t, (char const *__name)); _GL_CXXALIAS_SYS (tzalloc, timezone_t, (char const *__name)); + +/* tzfree (tz) + Frees a time zone object. + The argument must have been returned by tzalloc(). */ _GL_FUNCDECL_SYS (tzfree, void, (timezone_t __tz)); _GL_CXXALIAS_SYS (tzfree, void, (timezone_t __tz)); + +/* localtime_rz (tz, &t, &result) + Converts an absolute time T to a broken-down time RESULT, assuming th= e + time zone TZ. + This function is like 'localtime_r', but relies on the argument TZ in= stead + of an implicit global time zone. */ _GL_FUNCDECL_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result) _GL_ARG_NONNULL ((2, 3)= )); _GL_CXXALIAS_SYS (localtime_rz, struct tm *, (timezone_t __tz, time_t const *restrict __timer, struct tm *restrict __result)); + +/* mktime_z (tz, &tm) + Normalizes the broken-down time TM and converts it to an absolute tim= e, + assuming the time zone TZ. Returns the absolute time. + This function is like 'mktime', but relies on the argument TZ instead= + of an implicit global time zone. */ _GL_FUNCDECL_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result) + (timezone_t __tz, struct tm *restrict __tm) _GL_ARG_NONNULL ((2))); _GL_CXXALIAS_SYS (mktime_z, time_t, - (timezone_t __tz, struct tm *restrict __result)); + (timezone_t __tz, struct tm *restrict __tm)); + +/* Time zone abbreviation strings (returned by 'localtime_rz' or 'mktime= _z' + in the 'tm_zone' member of 'struct tm') are valid as long as + - the 'struct tm' argument is not destroyed or overwritten, + and + - the 'timezone_t' argument is not freed through tzfree(). */ + # endif =20 /* Convert TM to a time_t value, assuming UTC. */ diff --git a/lib/time_r.c b/lib/time_r.c index d908986870..88d3c1c76f 100644 --- a/lib/time_r.c +++ b/lib/time_r.c @@ -2,18 +2,18 @@ =20 Copyright (C) 2003, 2006-2007, 2010-2021 Free Software Foundation, In= c. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/time_rz.c b/lib/time_rz.c index 3ac053c621..e7722447c0 100644 --- a/lib/time_rz.c +++ b/lib/time_rz.c @@ -2,18 +2,18 @@ =20 Copyright 2015-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License alo= ng - with this program; if not, see . */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ =20 diff --git a/lib/timegm.c b/lib/timegm.c index e4127e71c0..7e723e1fb8 100644 --- a/lib/timegm.c +++ b/lib/timegm.c @@ -4,16 +4,16 @@ This file is part of the GNU C Library. =20 The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public + modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either - version 3 of the License, or (at your option) any later version. + version 2.1 of the License, or (at your option) any later version. =20 The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public + You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, see . */ =20 diff --git a/lib/timespec.c b/lib/timespec.c index 2b6098ed7b..957b5fbba4 100644 --- a/lib/timespec.c +++ b/lib/timespec.c @@ -1,3 +1,21 @@ +/* Inline functions for . + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_TIMESPEC_INLINE _GL_EXTERN_INLINE #include "timespec.h" diff --git a/lib/timespec.h b/lib/timespec.h index 9a71e9ea89..94a5db751f 100644 --- a/lib/timespec.h +++ b/lib/timespec.h @@ -3,17 +3,17 @@ Copyright (C) 2000, 2002, 2004-2005, 2007, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #if ! defined TIMESPEC_H diff --git a/lib/u64.c b/lib/u64.c index 1e3854ddcd..c905af626f 100644 --- a/lib/u64.c +++ b/lib/u64.c @@ -1,4 +1,22 @@ +/* uint64_t-like operations that work even on hosts lacking uint64_t + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_U64_INLINE _GL_EXTERN_INLINE #include "u64.h" typedef int dummy; diff --git a/lib/u64.h b/lib/u64.h index ad719c84f8..8d21ec17ed 100644 --- a/lib/u64.h +++ b/lib/u64.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/unistd.c b/lib/unistd.c index 72bad1c052..0763456021 100644 --- a/lib/unistd.c +++ b/lib/unistd.c @@ -1,4 +1,22 @@ +/* Inline functions for . + + Copyright (C) 2012-2021 Free Software Foundation, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + #include + #define _GL_UNISTD_INLINE _GL_EXTERN_INLINE #include "unistd.h" typedef int dummy; diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 5e9b47d981..73c882f97b 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -1,18 +1,18 @@ /* Substitute for and wrapper around . Copyright (C) 2003-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 #ifndef _@GUARD_PREFIX@_UNISTD_H =20 @@ -1521,6 +1521,7 @@ _GL_WARN_ON_USE (group_member, "group_member is unp= ortable - " # undef isatty # define isatty rpl_isatty # endif +# define GNULIB_defined_isatty 1 _GL_FUNCDECL_RPL (isatty, int, (int fd)); _GL_CXXALIAS_RPL (isatty, int, (int fd)); # elif defined _WIN32 && !defined __CYGWIN__ @@ -2027,15 +2028,23 @@ _GL_WARN_ON_USE (sleep, "sleep is unportable - " #if @GNULIB_MDA_SWAB@ /* On native Windows, map 'swab' to '_swab', so that -loldnames is not required. In C++ with GNULIB_NAMESPACE, avoid differences between - platforms by defining GNULIB_NAMESPACE::creat always. */ + platforms by defining GNULIB_NAMESPACE::swab always. */ # if defined _WIN32 && !defined __CYGWIN__ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef swab # define swab _swab # endif -_GL_CXXALIAS_MDA (swab, void, (char *from, char *to, int n)); +/* Need to cast, because in old mingw the arguments are + (const char *from, char *to, size_t n). */= +_GL_CXXALIAS_MDA_CAST (swab, void, (char *from, char *to, int n)); # else +# if defined __hpux /* HP-UX */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, int n)); +# elif defined __sun && !defined _XPG4 /* Solaris */ +_GL_CXXALIAS_SYS (swab, void, (const char *from, char *to, ssize_t n)); +# else _GL_CXXALIAS_SYS (swab, void, (const void *from, void *to, ssize_t n)); +# endif # endif _GL_CXXALIASWARN (swab); #endif diff --git a/lib/unlocked-io.h b/lib/unlocked-io.h index 86b91c19dd..ca184b31fb 100644 --- a/lib/unlocked-io.h +++ b/lib/unlocked-io.h @@ -33,91 +33,91 @@ =20 # include =20 -# if HAVE_DECL_CLEARERR_UNLOCKED +# if HAVE_DECL_CLEARERR_UNLOCKED || defined clearerr_unlocked # undef clearerr # define clearerr(x) clearerr_unlocked (x) # else # define clearerr_unlocked(x) clearerr (x) # endif =20 -# if HAVE_DECL_FEOF_UNLOCKED +# if HAVE_DECL_FEOF_UNLOCKED || defined feof_unlocked # undef feof # define feof(x) feof_unlocked (x) # else # define feof_unlocked(x) feof (x) # endif =20 -# if HAVE_DECL_FERROR_UNLOCKED +# if HAVE_DECL_FERROR_UNLOCKED || defined ferror_unlocked # undef ferror # define ferror(x) ferror_unlocked (x) # else # define ferror_unlocked(x) ferror (x) # endif =20 -# if HAVE_DECL_FFLUSH_UNLOCKED +# if HAVE_DECL_FFLUSH_UNLOCKED || defined fflush_unlocked # undef fflush # define fflush(x) fflush_unlocked (x) # else # define fflush_unlocked(x) fflush (x) # endif =20 -# if HAVE_DECL_FGETS_UNLOCKED +# if HAVE_DECL_FGETS_UNLOCKED || defined fgets_unlocked # undef fgets # define fgets(x,y,z) fgets_unlocked (x,y,z) # else # define fgets_unlocked(x,y,z) fgets (x,y,z) # endif =20 -# if HAVE_DECL_FPUTC_UNLOCKED +# if HAVE_DECL_FPUTC_UNLOCKED || defined fputc_unlocked # undef fputc # define fputc(x,y) fputc_unlocked (x,y) # else # define fputc_unlocked(x,y) fputc (x,y) # endif =20 -# if HAVE_DECL_FPUTS_UNLOCKED +# if HAVE_DECL_FPUTS_UNLOCKED || defined fputs_unlocked # undef fputs # define fputs(x,y) fputs_unlocked (x,y) # else # define fputs_unlocked(x,y) fputs (x,y) # endif =20 -# if HAVE_DECL_FREAD_UNLOCKED +# if HAVE_DECL_FREAD_UNLOCKED || defined fread_unlocked # undef fread # define fread(w,x,y,z) fread_unlocked (w,x,y,z) # else # define fread_unlocked(w,x,y,z) fread (w,x,y,z) # endif =20 -# if HAVE_DECL_FWRITE_UNLOCKED +# if HAVE_DECL_FWRITE_UNLOCKED || defined fwrite_unlocked # undef fwrite # define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z) # else # define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z) # endif =20 -# if HAVE_DECL_GETC_UNLOCKED +# if HAVE_DECL_GETC_UNLOCKED || defined get_unlocked # undef getc # define getc(x) getc_unlocked (x) # else # define getc_unlocked(x) getc (x) # endif =20 -# if HAVE_DECL_GETCHAR_UNLOCKED +# if HAVE_DECL_GETCHAR_UNLOCKED || defined getchar_unlocked # undef getchar # define getchar() getchar_unlocked () # else # define getchar_unlocked() getchar () # endif =20 -# if HAVE_DECL_PUTC_UNLOCKED +# if HAVE_DECL_PUTC_UNLOCKED || defined putc_unlocked # undef putc # define putc(x,y) putc_unlocked (x,y) # else # define putc_unlocked(x,y) putc (x,y) # endif =20 -# if HAVE_DECL_PUTCHAR_UNLOCKED +# if HAVE_DECL_PUTCHAR_UNLOCKED || defined putchar_unlocked # undef putchar # define putchar(x) putchar_unlocked (x) # else diff --git a/lib/utimens.c b/lib/utimens.c index 44d1ea003e..a34180050e 100644 --- a/lib/utimens.c +++ b/lib/utimens.c @@ -2,17 +2,17 @@ =20 Copyright (C) 2003-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ @@ -126,14 +126,14 @@ validate_timespec (struct timespec timespec[2]) return result + (utime_omit_count =3D=3D 1); } =20 -/* Normalize any UTIME_NOW or UTIME_OMIT values in *TS, using stat - buffer STATBUF to obtain the current timestamps of the file. If +/* Normalize any UTIME_NOW or UTIME_OMIT values in (*TS)[0] and (*TS)[1]= , + using STATBUF to obtain the current timestamps of the file. If both times are UTIME_NOW, set *TS to NULL (as this can avoid some permissions issues). If both times are UTIME_OMIT, return true (nothing further beyond the prior collection of STATBUF is necessary); otherwise return false. */ static bool -update_timespec (struct stat const *statbuf, struct timespec *ts[2]) +update_timespec (struct stat const *statbuf, struct timespec **ts) { struct timespec *timespec =3D *ts; if (timespec[0].tv_nsec =3D=3D UTIME_OMIT diff --git a/lib/utimens.h b/lib/utimens.h index 295d3d71cc..d17953c052 100644 --- a/lib/utimens.h +++ b/lib/utimens.h @@ -2,17 +2,17 @@ =20 Copyright 2012-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 3 of the License, or any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 3 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert. */ diff --git a/lib/verify.h b/lib/verify.h index 65514c34b9..3485a7e69f 100644 --- a/lib/verify.h +++ b/lib/verify.h @@ -2,17 +2,17 @@ =20 Copyright (C) 2005-2006, 2009-2021 Free Software Foundation, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ diff --git a/lib/warn-on-use.h b/lib/warn-on-use.h index 5d5b17f05b..612937abb0 100644 --- a/lib/warn-on-use.h +++ b/lib/warn-on-use.h @@ -2,16 +2,16 @@ Copyright (C) 2010-2021 Free Software Foundation, Inc. =20 This program is free software: you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published - by the Free Software Foundation; either version 3 of the License, or + under the terms of the GNU Lesser General Public License as published= + by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. =20 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 /* _GL_WARN_ON_USE (function, "literal string") issues a declaration diff --git a/lib/xalloc-oversized.h b/lib/xalloc-oversized.h index 53daf59663..4184f33955 100644 --- a/lib/xalloc-oversized.h +++ b/lib/xalloc-oversized.h @@ -2,17 +2,17 @@ =20 Copyright (C) 1990-2000, 2003-2004, 2006-2021 Free Software Foundatio= n, Inc. =20 - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public Lice= nse along with this program. If not, see = =2E */ =20 #ifndef XALLOC_OVERSIZED_H_ @@ -21,34 +21,39 @@ #define XALLOC_OVERSIZED_H_ #include #include =20 -/* True if N * S would overflow in a size_t calculation, - or would generate a value larger than PTRDIFF_MAX. +/* True if N * S does not fit into both ptrdiff_t and size_t. + N and S should be nonnegative and free of side effects. This expands to a constant expression if N and S are both constants. - By gnulib convention, SIZE_MAX represents overflow in size + By gnulib convention, SIZE_MAX represents overflow in size_t calculations, so the conservative size_t-based dividend to use here is SIZE_MAX - 1. */ #define __xalloc_oversized(n, s) \ - ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) = < (n)) + ((s) !=3D 0 \ + && ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / = (s) \ + < (n))) =20 -#if PTRDIFF_MAX < SIZE_MAX -typedef ptrdiff_t __xalloc_count_type; -#else -typedef size_t __xalloc_count_type; -#endif +/* Return 1 if and only if an array of N objects, each of size S, + cannot exist reliably because its total size in bytes would exceed + MIN (PTRDIFF_MAX, SIZE_MAX - 1). + + N and S should be nonnegative and free of side effects. =20 -/* Return 1 if an array of N objects, each of size S, cannot exist - reliably due to size or ptrdiff_t arithmetic overflow. S must be - positive and N must be nonnegative. This is a macro, not a - function, so that it works correctly even when SIZE_MAX < N. */ + Warning: (xalloc_oversized (N, S) ? NULL : malloc (N * S)) can + misbehave if N and S are both narrower than ptrdiff_t and size_t, + and can be rewritten as (xalloc_oversized (N, S) ? NULL + : malloc (N * (size_t) S)). =20 -#if 7 <=3D __GNUC__ && !defined __clang__ + This is a macro, not a function, so that it works even if an + argument exceeds MAX (PTRDIFF_MAX, SIZE_MAX). */ +#if 7 <=3D __GNUC__ && !defined __clang__ && PTRDIFF_MAX < SIZE_MAX # define xalloc_oversized(n, s) \ - __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) -#elif 5 <=3D __GNUC__ && !defined __ICC && !__STRICT_ANSI__ + __builtin_mul_overflow_p (n, s, (ptrdiff_t) 1) +#elif (5 <=3D __GNUC__ && !defined __ICC && !__STRICT_ANSI__ \ + && PTRDIFF_MAX < SIZE_MAX) # define xalloc_oversized(n, s) \ (__builtin_constant_p (n) && __builtin_constant_p (s) \ ? __xalloc_oversized (n, s) \ - : ({ __xalloc_count_type __xalloc_count; \ + : ({ ptrdiff_t __xalloc_count; \ __builtin_mul_overflow (n, s, &__xalloc_count); })) =20 /* Other compilers use integer division; this may be slower but is diff --git a/m4/dirent_h.m4 b/m4/dirent_h.m4 index 6d86142585..17e2a20c5d 100644 --- a/m4/dirent_h.m4 +++ b/m4/dirent_h.m4 @@ -1,4 +1,4 @@ -# dirent_h.m4 serial 16 +# dirent_h.m4 serial 19 dnl Copyright (C) 2008-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,10 +6,10 @@ =20 dnl Written by Bruno Haible. =20 -AC_DEFUN([gl_DIRENT_H], +AC_DEFUN_ONCE([gl_DIRENT_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) =20 dnl is always overridden, because of GNULIB_POSIXCHECK. @@ -27,26 +27,41 @@ AC_DEFUN ]], [alphasort closedir dirfd fdopendir opendir readdir rewinddir sc= andir]) ]) =20 +# gl_DIRENT_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_DIRENT_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_DIRENT_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_DIRENT_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_DIRENT_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REWINDDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSEDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DIRFD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPENDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALPHASORT]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_DIRENT_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_DIRENT_H_DEFAULTS]) +]) + AC_DEFUN([gl_DIRENT_H_DEFAULTS], [ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_OPENDIR=3D0; AC_SUBST([GNULIB_OPENDIR]) - GNULIB_READDIR=3D0; AC_SUBST([GNULIB_READDIR]) - GNULIB_REWINDDIR=3D0; AC_SUBST([GNULIB_REWINDDIR]) - GNULIB_CLOSEDIR=3D0; AC_SUBST([GNULIB_CLOSEDIR]) - GNULIB_DIRFD=3D0; AC_SUBST([GNULIB_DIRFD]) - GNULIB_FDOPENDIR=3D0; AC_SUBST([GNULIB_FDOPENDIR]) - GNULIB_SCANDIR=3D0; AC_SUBST([GNULIB_SCANDIR]) - GNULIB_ALPHASORT=3D0; AC_SUBST([GNULIB_ALPHASORT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_OPENDIR=3D1; AC_SUBST([HAVE_OPENDIR]) HAVE_READDIR=3D1; AC_SUBST([HAVE_READDIR]) diff --git a/m4/environ.m4 b/m4/environ.m4 index d971770860..ae5329108e 100644 --- a/m4/environ.m4 +++ b/m4/environ.m4 @@ -1,4 +1,4 @@ -# environ.m4 serial 7 +# environ.m4 serial 8 dnl Copyright (C) 2001-2004, 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -33,7 +33,8 @@ AC_DEFUN [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[$1 - extern struct { int foo; } $2;]], + typedef struct { int foo; } foo_t; + extern foo_t $2;]], [[$2.foo =3D 1;]])], [gt_cv_var=3Dno], [gt_cv_var=3Dyes])]) diff --git a/m4/explicit_bzero.m4 b/m4/explicit_bzero.m4 index d77ec5a3a5..8c86d69e05 100644 --- a/m4/explicit_bzero.m4 +++ b/m4/explicit_bzero.m4 @@ -5,7 +5,7 @@ =20 AC_DEFUN([gl_FUNC_EXPLICIT_BZERO], [ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) =20 dnl Persuade glibc to declare explicit_bzero. AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/fcntl_h.m4 b/m4/fcntl_h.m4 index e63a82f10a..aba44735d1 100644 --- a/m4/fcntl_h.m4 +++ b/m4/fcntl_h.m4 @@ -1,4 +1,4 @@ -# serial 17 +# serial 20 # Configure fcntl.h. dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation @@ -7,7 +7,7 @@ =20 dnl Written by Paul Eggert. =20 -AC_DEFUN([gl_FCNTL_H], +AC_DEFUN_ONCE([gl_FCNTL_H], [ AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) AC_REQUIRE([gl_FCNTL_O_FLAGS]) @@ -26,25 +26,40 @@ AC_DEFUN ]], [fcntl openat]) ]) =20 +# gl_FCNTL_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_FCNTL_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAULTS= ], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CREAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCNTL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_FCNTL_H_MODULE_INDICATOR_DEFAUL= TS]) + AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) +]) + AC_DEFUN([gl_FCNTL_H_DEFAULTS], [ - GNULIB_CREAT=3D0; AC_SUBST([GNULIB_CREAT]) - GNULIB_FCNTL=3D0; AC_SUBST([GNULIB_FCNTL]) - GNULIB_NONBLOCKING=3D0; AC_SUBST([GNULIB_NONBLOCKING]) - GNULIB_OPEN=3D0; AC_SUBST([GNULIB_OPEN]) - GNULIB_OPENAT=3D0; AC_SUBST([GNULIB_OPENAT]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_CREAT=3D1; AC_SUBST([GNULIB_MDA_CREAT]) - GNULIB_MDA_OPEN=3D1; AC_SUBST([GNULIB_MDA_OPEN]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCNTL=3D1; AC_SUBST([HAVE_FCNTL]) HAVE_OPENAT=3D1; AC_SUBST([HAVE_OPENAT]) diff --git a/m4/free.m4 b/m4/free.m4 index d671376b0b..a7923b9059 100644 --- a/m4/free.m4 +++ b/m4/free.m4 @@ -1,4 +1,4 @@ -# free.m4 serial 5 +# free.m4 serial 6 # Copyright (C) 2003-2005, 2009-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -40,7 +40,10 @@ AC_DEFUN ]) =20 case $gl_cv_func_free_preserves_errno in - *yes) ;; + *yes) + AC_DEFINE([HAVE_FREE_POSIX], [1], + [Define if the 'free' function is guaranteed to preserve errno.]) + ;; *) REPLACE_FREE=3D1 ;; esac ]) diff --git a/m4/gettimeofday.m4 b/m4/gettimeofday.m4 index 3c20081574..37c54404bb 100644 --- a/m4/gettimeofday.m4 +++ b/m4/gettimeofday.m4 @@ -1,4 +1,4 @@ -# serial 28 +# serial 29 =20 # Copyright (C) 2001-2003, 2005, 2007, 2009-2021 Free Software Foundatio= n, Inc. # This file is free software; the Free Software Foundation @@ -9,10 +9,10 @@ =20 AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [ - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H]) + AC_REQUIRE([gl_SYS_TIME_H]) AC_CHECK_FUNCS_ONCE([gettimeofday]) =20 gl_gettimeofday_timezone=3Dvoid diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index f2eff10de6..bfa1645db2 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 63 +# gnulib-common.m4 serial 66 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -357,6 +357,16 @@ AC_DEFUN export LIBC_FATAL_STDERR_ ]) =20 +# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename]) +# gl_MODULE_INDICATOR_INIT_VARIABLE([variablename], [initialvalue]) +# initializes the shell variable that indicates the presence of the give= n module +# as a C preprocessor expression. +AC_DEFUN([gl_MODULE_INDICATOR_INIT_VARIABLE], +[ + GL_MODULE_INDICATOR_PREFIX[]_[$1]=3Dm4_if([$2], , [0], [$2]) + AC_SUBST(GL_MODULE_INDICATOR_PREFIX[]_[$1]) +]) + # gl_MODULE_INDICATOR_CONDITION # expands to a C preprocessor expression that evaluates to 1 or 0, depen= ding # whether a gnulib module that has been requested shall be considered pr= esent @@ -369,9 +379,9 @@ m4_define AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], [ gl_MODULE_INDICATOR_SET_VARIABLE_AUX( - [GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], + [GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]m4_translit([[$1]], + [abcdefghijklmnop= qrstuvwxyz./-], + [ABCDEFGHIJKLMNOP= QRSTUVWXYZ___])], [gl_MODULE_INDICATOR_CONDITION]) ]) =20 @@ -656,6 +666,72 @@ AC_DEFUN ]) ]) =20 +# gl_CC_ALLOW_WARNINGS +# sets and substitutes a variable GL_CFLAG_ALLOW_WARNINGS, to a $(CC) op= tion +# that reverts a preceding '-Werror' option, if available. +# This is expected to be '-Wno-error' on gcc, clang (except clang/MSVC),= xlclang +# and empty otherwise. +AC_DEFUN([gl_CC_ALLOW_WARNINGS], +[ + AC_REQUIRE([AC_PROG_CC]) + AC_CACHE_CHECK([for C compiler option to allow warnings], + [gl_cv_cc_wallow], + [rm -f conftest* + echo 'int dummy;' > conftest.c + AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest= 1.err]) >/dev/null + AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c= 2>conftest2.err]) >/dev/null + dnl Test the number of error output lines, because AIX xlc accepts = the + dnl option '-Wno-error', just to produce a warning + dnl "Option -Wno-error was incorrectly specified. The option will b= e ignored." + dnl afterwards. + if test $? =3D 0 && test `wc -l < conftest1.err` =3D `wc -l < conft= est2.err`; then + gl_cv_cc_wallow=3D'-Wno-error' + else + gl_cv_cc_wallow=3Dnone + fi + rm -f conftest* + ]) + case "$gl_cv_cc_wallow" in + none) GL_CFLAG_ALLOW_WARNINGS=3D'' ;; + *) GL_CFLAG_ALLOW_WARNINGS=3D"$gl_cv_cc_wallow" ;; + esac + AC_SUBST([GL_CFLAG_ALLOW_WARNINGS]) +]) + +# gl_CXX_ALLOW_WARNINGS +# sets and substitutes a variable GL_CXXFLAG_ALLOW_WARNINGS, to a $(CC) = option +# that reverts a preceding '-Werror' option, if available. +AC_DEFUN([gl_CXX_ALLOW_WARNINGS], +[ + dnl Requires AC_PROG_CXX or gl_PROG_ANSI_CXX. + if test -n "$CXX" && test "$CXX" !=3D no; then + AC_CACHE_CHECK([for C++ compiler option to allow warnings], + [gl_cv_cxx_wallow], + [rm -f conftest* + echo 'int dummy;' > conftest.cc + AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>c= onftest1.err]) >/dev/null + AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conf= test.cc 2>conftest2.err]) >/dev/null + dnl Test the number of error output lines, because AIX xlC accept= s the + dnl option '-Wno-error', just to produce a warning + dnl "Option -Wno-error was incorrectly specified. The option will= be ignored." + dnl afterwards. + if test $? =3D 0 && test `wc -l < conftest1.err` =3D `wc -l < con= ftest2.err`; then + gl_cv_cxx_wallow=3D'-Wno-error' + else + gl_cv_cxx_wallow=3Dnone + fi + rm -f conftest* + ]) + case "$gl_cv_cxx_wallow" in + none) GL_CXXFLAG_ALLOW_WARNINGS=3D'' ;; + *) GL_CXXFLAG_ALLOW_WARNINGS=3D"$gl_cv_cxx_wallow" ;; + esac + else + GL_CXXFLAG_ALLOW_WARNINGS=3D'' + fi + AC_SUBST([GL_CXXFLAG_ALLOW_WARNINGS]) +]) + dnl Expands to some code for use in .c programs that, on native Windows,= defines dnl the Microsoft deprecated alias function names to the underscore-pref= ixed dnl actual function names. With this macro, these function names are ava= ilable diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index 05e7faa993..fa6a0e2d07 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -121,6 +121,7 @@ AC_DEFUN # Code from module inttypes-incomplete: # Code from module largefile: AC_REQUIRE([AC_SYS_LARGEFILE]) + AC_REQUIRE([gl_YEAR2038_EARLY]) # Code from module lchmod: # Code from module libc-config: # Code from module libgmp: @@ -147,6 +148,8 @@ AC_DEFUN # Code from module rawmemchr: # Code from module readlink: # Code from module readlinkat: + # Code from module realloc-gnu: + # Code from module realloc-posix: # Code from module regex: # Code from module root-uid: # Code from module scratch_buffer: @@ -189,6 +192,7 @@ AC_DEFUN # Code from module u64: # Code from module unistd: # Code from module unlocked-io: + # Code from module unlocked-io-internal: # Code from module update-copyright: # Code from module utimens: # Code from module utimensat: @@ -213,6 +217,8 @@ AC_DEFUN m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) m4_pushdef([gl_LIBSOURCES_LIST], []) m4_pushdef([gl_LIBSOURCES_DIR], []) + m4_pushdef([GL_MACRO_PREFIX], [gl]) + m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) gl_COMMON gl_source_base=3D'lib' gl_FUNC_ACL @@ -245,6 +251,7 @@ AC_DEFUN gl_SHA512 gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE gl_DIRENT_H + gl_DIRENT_H_REQUIRE_DEFAULTS gl_DOUBLE_SLASH_ROOT gl_FUNC_DUP2 if test $REPLACE_DUP2 =3D 1; then @@ -282,6 +289,7 @@ AC_DEFUN fi gl_FCNTL_MODULE_INDICATOR([fcntl]) gl_FCNTL_H + gl_FCNTL_H_REQUIRE_DEFAULTS gl_FUNC_FDOPENDIR if test $HAVE_FDOPENDIR =3D 0 || test $REPLACE_FDOPENDIR =3D 1; then AC_LIBOBJ([fdopendir]) @@ -337,10 +345,10 @@ AC_DEFUN if test $REPLACE_GETOPT =3D 1; then AC_LIBOBJ([getopt]) AC_LIBOBJ([getopt1]) - dnl Arrange for unistd.h to include getopt.h. - GNULIB_GL_UNISTD_H_GETOPT=3D1 + dnl Define the substituted variable GNULIB_UNISTD_H_GETOPT to 1. + gl_UNISTD_H_REQUIRE_DEFAULTS + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT], [1]) fi - AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) gl_UNISTD_MODULE_INDICATOR([getopt-posix]) AC_REQUIRE([AC_CANONICAL_HOST]) gl_FUNC_GETRANDOM @@ -357,6 +365,7 @@ AC_DEFUN gl_SYS_TIME_MODULE_INDICATOR([gettimeofday]) gl_IEEE754_H gl_INTTYPES_INCOMPLETE + gl_INTTYPES_H_REQUIRE_DEFAULTS AC_REQUIRE([gl_LARGEFILE]) gl___INLINE gl_LIBGMP @@ -444,22 +453,50 @@ AC_DEFUN fi gl_STRING_MODULE_INDICATOR([sigdescr_np]) gl_SIGNAL_H + gl_SIGNAL_H_REQUIRE_DEFAULTS gl_TYPE_SOCKLEN_T gt_TYPE_SSIZE_T gl_STAT_TIME gl_STAT_BIRTHTIME gl_STDALIGN_H gl_STDDEF_H + gl_STDDEF_H_REQUIRE_DEFAULTS gl_STDINT_H gl_STDIO_H + gl_STDIO_H_REQUIRE_DEFAULTS + dnl No need to create extra modules for these functions. Everyone who = uses + dnl likely needs them. + gl_STDIO_MODULE_INDICATOR([fscanf]) + gl_MODULE_INDICATOR([fscanf]) + gl_STDIO_MODULE_INDICATOR([scanf]) + gl_MODULE_INDICATOR([scanf]) + gl_STDIO_MODULE_INDICATOR([fgetc]) + gl_STDIO_MODULE_INDICATOR([getc]) + gl_STDIO_MODULE_INDICATOR([getchar]) + gl_STDIO_MODULE_INDICATOR([fgets]) + gl_STDIO_MODULE_INDICATOR([fread]) + dnl No need to create extra modules for these functions. Everyone who = uses + dnl likely needs them. + gl_STDIO_MODULE_INDICATOR([fprintf]) + gl_STDIO_MODULE_INDICATOR([printf]) + gl_STDIO_MODULE_INDICATOR([vfprintf]) + gl_STDIO_MODULE_INDICATOR([vprintf]) + gl_STDIO_MODULE_INDICATOR([fputc]) + gl_STDIO_MODULE_INDICATOR([putc]) + gl_STDIO_MODULE_INDICATOR([putchar]) + gl_STDIO_MODULE_INDICATOR([fputs]) + gl_STDIO_MODULE_INDICATOR([puts]) + gl_STDIO_MODULE_INDICATOR([fwrite]) gl_STDLIB_H + gl_STDLIB_H_REQUIRE_DEFAULTS gl_FUNC_STPCPY if test $HAVE_STPCPY =3D 0; then AC_LIBOBJ([stpcpy]) gl_PREREQ_STPCPY fi gl_STRING_MODULE_INDICATOR([stpcpy]) - gl_HEADER_STRING_H + gl_STRING_H + gl_STRING_H_REQUIRE_DEFAULTS gl_FUNC_STRNLEN if test $HAVE_DECL_STRNLEN =3D 0 || test $REPLACE_STRNLEN =3D 1; then AC_LIBOBJ([strnlen]) @@ -477,19 +514,25 @@ AC_DEFUN AC_LIBOBJ([symlink]) fi gl_UNISTD_MODULE_INDICATOR([symlink]) - gl_HEADER_SYS_RANDOM + gl_SYS_RANDOM_H + gl_SYS_RANDOM_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P - AC_REQUIRE([gl_HEADER_SYS_SELECT]) + gl_SYS_SELECT_H + gl_SYS_SELECT_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P - gl_HEADER_SYS_STAT_H + gl_SYS_STAT_H + gl_SYS_STAT_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P - gl_HEADER_SYS_TIME_H + gl_SYS_TIME_H + gl_SYS_TIME_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_SYS_TYPES_H + gl_SYS_TYPES_H_REQUIRE_DEFAULTS AC_PROG_MKDIR_P gl_FUNC_GEN_TEMPNAME gl_MODULE_INDICATOR([tempname]) - gl_HEADER_TIME_H + gl_TIME_H + gl_TIME_H_REQUIRE_DEFAULTS gl_TIME_R if test $HAVE_LOCALTIME_R =3D 0 || test $REPLACE_LOCALTIME_R =3D 1; th= en AC_LIBOBJ([time_r]) @@ -510,6 +553,17 @@ AC_DEFUN gl_TIMER_TIME gl_TIMESPEC gl_UNISTD_H + gl_UNISTD_H_REQUIRE_DEFAULTS + AC_DEFINE([GNULIB_STDIO_SINGLE_THREAD], [1], + [Define to 1 if you want the FILE stream functions getc, putc, etc. + to use unlocked I/O if available, throughout the package. + Unlocked I/O can improve performance, sometimes dramatically. + But unlocked I/O is safe only in single-threaded programs, + as well as in multithreaded programs for which you can guarantee th= at + every FILE stream, including stdin, stdout, stderr, is used only + in a single thread.]) + AC_DEFINE([USE_UNLOCKED_IO], [GNULIB_STDIO_SINGLE_THREAD], + [An alias of GNULIB_STDIO_SINGLE_THREAD.]) gl_FUNC_GLIBC_UNLOCKED_IO gl_FUNC_UTIMENSAT if test $HAVE_UTIMENSAT =3D 0 || test $REPLACE_UTIMENSAT =3D 1; then @@ -527,12 +581,13 @@ AC_DEFUN gl_gnulib_enabled_getgroups=3Dfalse gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=3Dfalse gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=3Dfalse - gl_gnulib_enabled_idx=3Dfalse gl_gnulib_enabled_lchmod=3Dfalse gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=3Dfalse gl_gnulib_enabled_open=3Dfalse gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=3Dfalse gl_gnulib_enabled_rawmemchr=3Dfalse + gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=3Dfalse + gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=3Dfalse gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c=3Dfalse gl_gnulib_enabled_scratch_buffer=3Dfalse gl_gnulib_enabled_strtoll=3Dfalse @@ -571,6 +626,7 @@ AC_DEFUN func_gl_gnulib_m4code_dynarray () { if ! $gl_gnulib_enabled_dynarray; then + AC_PROG_MKDIR_P gl_gnulib_enabled_dynarray=3Dtrue fi } @@ -641,16 +697,10 @@ AC_DEFUN func_gl_gnulib_m4code_getgroups fi if test $HAVE_GROUP_MEMBER =3D 0; then - func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec + func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b fi fi } - func_gl_gnulib_m4code_idx () - { - if ! $gl_gnulib_enabled_idx; then - gl_gnulib_enabled_idx=3Dtrue - fi - } func_gl_gnulib_m4code_lchmod () { if ! $gl_gnulib_enabled_lchmod; then @@ -707,6 +757,31 @@ AC_DEFUN gl_gnulib_enabled_rawmemchr=3Dtrue fi } + func_gl_gnulib_m4code_d3b2383720ee0e541357aa2aac598e2b () + { + if ! $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b; then + gl_FUNC_REALLOC_GNU + if test $REPLACE_REALLOC =3D 1; then + AC_LIBOBJ([realloc]) + fi + gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b=3Dtrue + func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 + fi + } + func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 () + { + if ! $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4; then + gl_FUNC_REALLOC_POSIX + if test $REPLACE_REALLOC =3D 1; then + AC_LIBOBJ([realloc]) + fi + gl_STDLIB_MODULE_INDICATOR([realloc-posix]) + gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=3Dtrue + if test $REPLACE_REALLOC =3D 1; then + func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec + fi + fi + } func_gl_gnulib_m4code_6099e9737f757db36c47fa9d9f02e88c () { if ! $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c; then @@ -716,14 +791,16 @@ AC_DEFUN func_gl_gnulib_m4code_scratch_buffer () { if ! $gl_gnulib_enabled_scratch_buffer; then + AC_PROG_MKDIR_P gl_gnulib_enabled_scratch_buffer=3Dtrue + func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 fi } func_gl_gnulib_m4code_strtoll () { if ! $gl_gnulib_enabled_strtoll; then gl_FUNC_STRTOLL - if test $HAVE_STRTOLL =3D 0; then + if test $HAVE_STRTOLL =3D 0 || test $REPLACE_STRTOLL =3D 1; then AC_LIBOBJ([strtoll]) gl_PREREQ_STRTOLL fi @@ -747,9 +824,6 @@ AC_DEFUN if test $HAVE_CANONICALIZE_FILE_NAME =3D 0 || test $REPLACE_CANONICALI= ZE_FILE_NAME =3D 1; then func_gl_gnulib_m4code_925677f0343de64b89a9f0c790b4104c fi - if test $HAVE_CANONICALIZE_FILE_NAME =3D 0 || test $REPLACE_CANONICALI= ZE_FILE_NAME =3D 1; then - func_gl_gnulib_m4code_idx - fi if test $HAVE_CANONICALIZE_FILE_NAME =3D 0 || test $REPLACE_CANONICALI= ZE_FILE_NAME =3D 1; then func_gl_gnulib_m4code_rawmemchr fi @@ -813,9 +887,6 @@ AC_DEFUN if { test $HAVE_DECL_STRTOIMAX =3D 0 || test $REPLACE_STRTOIMAX =3D 1;= } && test $ac_cv_type_long_long_int =3D yes; then func_gl_gnulib_m4code_strtoll fi - if test $HAVE_TIMEZONE_T =3D 0; then - func_gl_gnulib_m4code_idx - fi if test $HAVE_TIMEGM =3D 0 || test $REPLACE_TIMEGM =3D 1; then func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 fi @@ -839,12 +910,13 @@ AC_DEFUN AM_CONDITIONAL([gl_GNULIB_ENABLED_getgroups], [$gl_gnulib_enabled_getg= roups]) AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [= $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [= $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1]) - AM_CONDITIONAL([gl_GNULIB_ENABLED_idx], [$gl_gnulib_enabled_idx]) AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod]= ) AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [= $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31]) AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open]) AM_CONDITIONAL([gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7], [= $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7]) AM_CONDITIONAL([gl_GNULIB_ENABLED_rawmemchr], [$gl_gnulib_enabled_rawm= emchr]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b], [= $gl_gnulib_enabled_d3b2383720ee0e541357aa2aac598e2b]) + AM_CONDITIONAL([gl_GNULIB_ENABLED_61bcaca76b3e6f9ae55d57a1c3193bc4], [= $gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4]) AM_CONDITIONAL([gl_GNULIB_ENABLED_6099e9737f757db36c47fa9d9f02e88c], [= $gl_gnulib_enabled_6099e9737f757db36c47fa9d9f02e88c]) AM_CONDITIONAL([gl_GNULIB_ENABLED_scratch_buffer], [$gl_gnulib_enabled= _scratch_buffer]) AM_CONDITIONAL([gl_GNULIB_ENABLED_strtoll], [$gl_gnulib_enabled_strtol= l]) @@ -862,6 +934,8 @@ AC_DEFUN m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES,= not found])]) ]) + m4_popdef([GL_MODULE_INDICATOR_PREFIX]) + m4_popdef([GL_MACRO_PREFIX]) m4_popdef([gl_LIBSOURCES_DIR]) m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) @@ -888,6 +962,8 @@ AC_DEFUN m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) m4_pushdef([gltests_LIBSOURCES_LIST], []) m4_pushdef([gltests_LIBSOURCES_DIR], []) + m4_pushdef([GL_MACRO_PREFIX], [gltests]) + m4_pushdef([GL_MODULE_INDICATOR_PREFIX], [GL]) gl_COMMON gl_source_base=3D'tests' changequote(,)dnl @@ -909,6 +985,8 @@ AC_DEFUN m4_if(m4_sysval, [0], [], [AC_FATAL([expected source file, required through AC_LIBSOURCES,= not found])]) ]) + m4_popdef([GL_MODULE_INDICATOR_PREFIX]) + m4_popdef([GL_MACRO_PREFIX]) m4_popdef([gltests_LIBSOURCES_DIR]) m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) @@ -1130,6 +1208,7 @@ AC_DEFUN lib/rawmemchr.valgrind lib/readlink.c lib/readlinkat.c + lib/realloc.c lib/regcomp.c lib/regex.c lib/regex.h @@ -1250,6 +1329,7 @@ AC_DEFUN m4/libgmp.m4 m4/limits-h.m4 m4/lstat.m4 + m4/malloc.m4 m4/manywarnings-c++.m4 m4/manywarnings.m4 m4/mbstate_t.m4 @@ -1276,6 +1356,7 @@ AC_DEFUN m4/rawmemchr.m4 m4/readlink.m4 m4/readlinkat.m4 + m4/realloc.m4 m4/regex.m4 m4/sha1.m4 m4/sha256.m4 @@ -1322,5 +1403,6 @@ AC_DEFUN m4/warnings.m4 m4/wchar_t.m4 m4/wint_t.m4 + m4/year2038.m4 m4/zzgnulib.m4 ]) diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 index f56e94a888..64b1de5c42 100644 --- a/m4/inttypes.m4 +++ b/m4/inttypes.m4 @@ -1,4 +1,4 @@ -# inttypes.m4 serial 32 +# inttypes.m4 serial 35 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,7 +7,7 @@ dnl From Derek Price, Bruno Haible. dnl Test whether is supported or must be substituted. =20 -AC_DEFUN([gl_INTTYPES_H], +AC_DEFUN_ONCE([gl_INTTYPES_H], [ AC_REQUIRE([gl_INTTYPES_INCOMPLETE]) gl_INTTYPES_PRI_SCN @@ -136,19 +136,34 @@ AC_DEFUN AC_SUBST([$1]) ]) =20 +# gl_INTTYPES_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_INTTYPES_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_INTTYPES_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEFAU= LTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXABS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_IMAXDIV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOIMAX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUMAX]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_INTTYPES_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_INTTYPES_H_DEFAULTS]) +]) + AC_DEFUN([gl_INTTYPES_H_DEFAULTS], [ - GNULIB_IMAXABS=3D0; AC_SUBST([GNULIB_IMAXABS]) - GNULIB_IMAXDIV=3D0; AC_SUBST([GNULIB_IMAXDIV]) - GNULIB_STRTOIMAX=3D0; AC_SUBST([GNULIB_STRTOIMAX]) - GNULIB_STRTOUMAX=3D0; AC_SUBST([GNULIB_STRTOUMAX]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_IMAXABS=3D1; AC_SUBST([HAVE_DECL_IMAXABS]) HAVE_DECL_IMAXDIV=3D1; AC_SUBST([HAVE_DECL_IMAXDIV]) diff --git a/m4/largefile.m4 b/m4/largefile.m4 index cadb16dc97..fbde5e6647 100644 --- a/m4/largefile.m4 +++ b/m4/largefile.m4 @@ -22,7 +22,8 @@ AC_DEFUN esac ]) =20 -# The following implementation works around a problem in autoconf <=3D 2= =2E69; +# Work around a problem in Autoconf through at least 2.71 on glibc 2.34+= +# with _TIME_BITS. Also, work around a problem in autoconf <=3D 2.69: # AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,= # or configures them incorrectly in some cases. m4_version_prereq([2.70], [], [ @@ -40,6 +41,7 @@ m4_define && LARGE_OFF_T % 2147483647 =3D=3D 1) ? 1 : -1]];[]dnl ]) +])# m4_version_prereq 2.70 =20 =20 # _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, @@ -54,7 +56,8 @@ m4_define [AC_LANG_PROGRAM([$5], [$6])], [$3=3Dno; break]) m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( - [AC_LANG_PROGRAM([#define $1 $2 + [AC_LANG_PROGRAM([#undef $1 +#define $1 $2 $5], [$6])], [$3=3D$2; break]) $3=3Dunknown @@ -80,9 +83,8 @@ m4_define AC_DEFUN([AC_SYS_LARGEFILE], [AC_ARG_ENABLE(largefile, [ --disable-largefile omit support for large files])= -if test "$enable_largefile" !=3D no; then - - AC_CACHE_CHECK([for special C compiler options needed for large files]= , +AS_IF([test "$enable_largefile" !=3D no], + [AC_CACHE_CHECK([for special C compiler options needed for large files]= , ac_cv_sys_largefile_CC, [ac_cv_sys_largefile_CC=3Dno if test "$GCC" !=3D yes; then @@ -107,15 +109,15 @@ AC_DEFUN ac_cv_sys_file_offset_bits, [Number of bits in a file offset, on hosts where this is settable.],= [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - if test $ac_cv_sys_file_offset_bits =3D unknown; then - _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, - ac_cv_sys_large_files, - [Define for large files, on AIX-style hosts.], - [_AC_SYS_LARGEFILE_TEST_INCLUDES]) - fi -fi + AS_CASE([$ac_cv_sys_file_offset_bits], + [unknown], + [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1], + [ac_cv_sys_large_files], + [Define for large files, on AIX-style hosts.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES])], + [64], + [gl_YEAR2038_BODY([])])]) ])# AC_SYS_LARGEFILE -])# m4_version_prereq 2.70 =20 # Enable large files on systems where this is implemented by Gnulib, not= by the # system headers. diff --git a/m4/malloc.m4 b/m4/malloc.m4 new file mode 100644 index 0000000000..972e808ab7 --- /dev/null +++ b/m4/malloc.m4 @@ -0,0 +1,174 @@ +# malloc.m4 serial 27 +dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# This is adapted with modifications from upstream Autoconf here: +# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/funct= ions.m4?id=3Dv2.70#n949 +AC_DEFUN([_AC_FUNC_MALLOC_IF], +[ + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CACHE_CHECK([whether malloc (0) returns nonnull], + [ac_cv_func_malloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[void *p =3D malloc (0); + int result =3D !p; + free (p); + return result;]]) + ], + [ac_cv_func_malloc_0_nonnull=3Dyes], + [ac_cv_func_malloc_0_nonnull=3Dno], + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | gnu* | *-musl* | midnightbsd* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_malloc_0_nonnull=3D"guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_malloc_0_nonnull=3D"$gl_cross_guess_normal" ;; + esac + ]) + ]) + AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2]) +])# _AC_FUNC_MALLOC_IF + +# gl_FUNC_MALLOC_GNU +# ------------------ +# Replace malloc if it is not compatible with GNU libc. +AC_DEFUN([gl_FUNC_MALLOC_GNU], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) + if test $REPLACE_MALLOC =3D 0; then + _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC=3D1]) + fi +]) + +# gl_FUNC_MALLOC_PTRDIFF +# ---------------------- +# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX, +# and replace malloc otherwise. +AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF]) + test "$gl_cv_malloc_ptrdiff" =3D yes || REPLACE_MALLOC=3D1 +]) + +# Test whether malloc, realloc, calloc refuse to create objects +# larger than what can be expressed in ptrdiff_t. +# Set gl_cv_func_malloc_gnu to yes or no accordingly. +AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF], +[ + AC_CACHE_CHECK([whether malloc is ptrdiff_t safe], + [gl_cv_malloc_ptrdiff], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[/* 64-bit ptrdiff_t is so wide that no practical platform + can exceed it. */ + #define WIDE_PTRDIFF (PTRDIFF_MAX >> 31 >> 31 !=3D 0) + + /* On rare machines where size_t fits in ptrdiff_t there + is no problem. */ + #define NARROW_SIZE (SIZE_MAX <=3D PTRDIFF_MAX) + + /* glibc 2.30 and later malloc refuses to exceed ptrdiff_t + bounds even on 32-bit platforms. We don't know which + non-glibc systems are safe. */ + #define KNOWN_SAFE (2 < __GLIBC__ + (30 <=3D __GLIBC_MINOR__= )) + + #if WIDE_PTRDIFF || NARROW_SIZE || KNOWN_SAFE + return 0; + #else + #error "malloc might not be ptrdiff_t safe" + syntax error + #endif + ]])], + [gl_cv_malloc_ptrdiff=3Dyes], + [gl_cv_malloc_ptrdiff=3Dno]) + ]) +]) + +# gl_FUNC_MALLOC_POSIX +# -------------------- +# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it= +# fails, and doesn't mess up with ptrdiff_t overflow), and replace +# malloc if it is not. +AC_DEFUN([gl_FUNC_MALLOC_POSIX], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF]) + AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) + if test "$gl_cv_func_malloc_posix" =3D yes; then + AC_DEFINE([HAVE_MALLOC_POSIX], [1], + [Define if malloc, realloc, and calloc set errno on allocation fai= lure.]) + else + REPLACE_MALLOC=3D1 + fi +]) + +# Test whether malloc, realloc, calloc set errno to ENOMEM on failure. +# Set gl_cv_func_malloc_posix to yes or no accordingly. +AC_DEFUN([gl_CHECK_MALLOC_POSIX], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_CACHE_CHECK([whether malloc, realloc, calloc set errno on failure],= + [gl_cv_func_malloc_posix], + [ + dnl It is too dangerous to try to allocate a large amount of memor= y: + dnl some systems go to their knees when you do that. So assume tha= t + dnl all Unix implementations of the function set errno on failure,= + dnl except on those platforms where we have seen 'test-malloc-gnu'= , + dnl 'test-realloc-gnu', 'test-calloc-gnu' fail. + case "$host_os" in + mingw*) + gl_cv_func_malloc_posix=3Dno ;; + irix* | solaris*) + dnl On IRIX 6.5, the three functions return NULL with errno un= set + dnl when the argument is larger than PTRDIFF_MAX. + dnl On Solaris 11.3, the three functions return NULL with errn= o set + dnl to EAGAIN, not ENOMEM, when the argument is larger than + dnl PTRDIFF_MAX. + dnl Here is a test program: +m4_divert_push([KILL]) +#include +#include +#include +#define ptrdiff_t long +#ifndef PTRDIFF_MAX +# define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1))= - 1)) +#endif + +int main () +{ + void *p; + + fprintf (stderr, "PTRDIFF_MAX =3D %lu\n", (unsigned long) PTRDIFF_MAX)= ; + + errno =3D 0; + p =3D malloc ((unsigned long) PTRDIFF_MAX + 1); + fprintf (stderr, "p=3D%p errno=3D%d\n", p, errno); + + errno =3D 0; + p =3D calloc (PTRDIFF_MAX / 2 + 1, 2); + fprintf (stderr, "p=3D%p errno=3D%d\n", p, errno); + + errno =3D 0; + p =3D realloc (NULL, (unsigned long) PTRDIFF_MAX + 1); + fprintf (stderr, "p=3D%p errno=3D%d\n", p, errno); + + return 0; +} +m4_divert_pop([KILL]) + gl_cv_func_malloc_posix=3Dno ;; + *) + gl_cv_func_malloc_posix=3Dyes ;; + esac + ]) +]) diff --git a/m4/memmem.m4 b/m4/memmem.m4 index e2a785f48d..6dac766128 100644 --- a/m4/memmem.m4 +++ b/m4/memmem.m4 @@ -1,4 +1,4 @@ -# memmem.m4 serial 27 +# memmem.m4 serial 29 dnl Copyright (C) 2002-2004, 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,7 +10,7 @@ AC_DEFUN dnl Persuade glibc to declare memmem(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([memmem]) if test $ac_cv_func_memmem =3D yes; then HAVE_MEMMEM=3D1 @@ -50,6 +50,7 @@ AC_DEFUN dnl Assume that it works on all other platforms (even if not li= near). AC_EGREP_CPP([Lucky user], [ +#include /* for __GNU_LIBRARY__ */ #ifdef __GNU_LIBRARY__ #include #if ((__GLIBC__ =3D=3D 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9)= \ diff --git a/m4/mempcpy.m4 b/m4/mempcpy.m4 index c5ee2af8cc..f9d9ec8f30 100644 --- a/m4/mempcpy.m4 +++ b/m4/mempcpy.m4 @@ -1,4 +1,4 @@ -# mempcpy.m4 serial 11 +# mempcpy.m4 serial 12 dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -13,7 +13,7 @@ AC_DEFUN dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([mempcpy]) if test $ac_cv_func_mempcpy =3D no; then HAVE_MEMPCPY=3D0 diff --git a/m4/memrchr.m4 b/m4/memrchr.m4 index d0c05896e5..40f61c5ac0 100644 --- a/m4/memrchr.m4 +++ b/m4/memrchr.m4 @@ -1,4 +1,4 @@ -# memrchr.m4 serial 10 +# memrchr.m4 serial 11 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -10,7 +10,7 @@ AC_DEFUN dnl Persuade glibc to declare memrchr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_DECLS_ONCE([memrchr]) if test $ac_cv_have_decl_memrchr =3D no; then HAVE_DECL_MEMRCHR=3D0 diff --git a/m4/mktime.m4 b/m4/mktime.m4 index 245649e774..721189af56 100644 --- a/m4/mktime.m4 +++ b/m4/mktime.m4 @@ -1,4 +1,4 @@ -# serial 35 +# serial 36 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -255,7 +255,7 @@ AC_DEFUN dnl Main macro of module 'mktime'. AC_DEFUN([gl_FUNC_MKTIME], [ - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) =20 diff --git a/m4/pselect.m4 b/m4/pselect.m4 index 538fe7dc12..9de63baf99 100644 --- a/m4/pselect.m4 +++ b/m4/pselect.m4 @@ -1,4 +1,4 @@ -# pselect.m4 serial 9 +# pselect.m4 serial 10 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 AC_DEFUN([gl_FUNC_PSELECT], [ - AC_REQUIRE([gl_HEADER_SYS_SELECT]) + AC_REQUIRE([gl_SYS_SELECT_H]) AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles AC_CHECK_FUNCS_ONCE([pselect]) diff --git a/m4/pthread_sigmask.m4 b/m4/pthread_sigmask.m4 index eb4c784965..ff7fa9610e 100644 --- a/m4/pthread_sigmask.m4 +++ b/m4/pthread_sigmask.m4 @@ -1,4 +1,4 @@ -# pthread_sigmask.m4 serial 19 +# pthread_sigmask.m4 serial 21 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -111,9 +111,9 @@ AC_DEFUN AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles =20 - dnl On FreeBSD 6.4, HP-UX 11.31, Solaris 9, in programs that are not= linked - dnl with -lpthread, the pthread_sigmask() function always returns 0 = and has - dnl no effect. + dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in pro= grams + dnl that are not linked with -lpthread, the pthread_sigmask() functi= on + dnl always returns 0 and has no effect. if test -z "$LIB_PTHREAD_SIGMASK"; then case " $LIBS " in *' -pthread '*) ;; @@ -138,7 +138,7 @@ AC_DEFUN [ changequote(,)dnl case "$host_os" in - freebsd* | hpux* | solaris | solaris2.[2-9]*) + freebsd* | midnightbsd* | hpux* | solaris | solaris2.= [2-9]*) gl_cv_func_pthread_sigmask_in_libc_works=3D"guessin= g no";; *) gl_cv_func_pthread_sigmask_in_libc_works=3D"guessin= g yes";; diff --git a/m4/rawmemchr.m4 b/m4/rawmemchr.m4 index f92846543c..452fab18f1 100644 --- a/m4/rawmemchr.m4 +++ b/m4/rawmemchr.m4 @@ -1,4 +1,4 @@ -# rawmemchr.m4 serial 2 +# rawmemchr.m4 serial 3 dnl Copyright (C) 2003, 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,7 @@ AC_DEFUN dnl Persuade glibc to declare rawmemchr(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([rawmemchr]) if test $ac_cv_func_rawmemchr =3D no; then HAVE_RAWMEMCHR=3D0 diff --git a/m4/realloc.m4 b/m4/realloc.m4 new file mode 100644 index 0000000000..0abc4185ed --- /dev/null +++ b/m4/realloc.m4 @@ -0,0 +1,63 @@ +# realloc.m4 serial 24 +dnl Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# This is adapted with modifications from upstream Autoconf here: +# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/funct= ions.m4?id=3Dv2.70#n1455 +AC_DEFUN([_AC_FUNC_REALLOC_IF], +[ + AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles + AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull], + [ac_cv_func_realloc_0_nonnull], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + ]], + [[void *p =3D realloc (0, 0); + int result =3D !p; + free (p); + return result;]]) + ], + [ac_cv_func_realloc_0_nonnull=3Dyes], + [ac_cv_func_realloc_0_nonnull=3Dno], + [case "$host_os" in + # Guess yes on platforms where we know the result. + *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ + | gnu* | *-musl* | midnightbsd* \ + | hpux* | solaris* | cygwin* | mingw* | msys* ) + ac_cv_func_realloc_0_nonnull=3D"guessing yes" ;; + # If we don't know, obey --enable-cross-guesses. + *) ac_cv_func_realloc_0_nonnull=3D"$gl_cross_guess_normal" ;; + esac + ]) + ]) + AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2]) +])# AC_FUNC_REALLOC + +# gl_FUNC_REALLOC_GNU +# ------------------- +# Replace realloc if it is not compatible with GNU libc. +AC_DEFUN([gl_FUNC_REALLOC_GNU], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_REALLOC_POSIX]) + if test $REPLACE_REALLOC =3D 0; then + _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC=3D1]) + fi +])# gl_FUNC_REALLOC_GNU + +# gl_FUNC_REALLOC_POSIX +# --------------------- +# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when i= t +# fails, and doesn't mess up with ptrdiff_t overflow), +# and replace realloc if it is not. +AC_DEFUN([gl_FUNC_REALLOC_POSIX], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) + if test $REPLACE_MALLOC =3D 1; then + REPLACE_REALLOC=3D1 + fi +]) diff --git a/m4/regex.m4 b/m4/regex.m4 index 850c572228..1c7e562f6c 100644 --- a/m4/regex.m4 +++ b/m4/regex.m4 @@ -1,4 +1,4 @@ -# serial 71 +# serial 73 =20 # Copyright (C) 1996-2001, 2003-2021 Free Software Foundation, Inc. # @@ -246,7 +246,7 @@ AC_DEFUN & ~RE_CONTEXT_INVALID_DUP & ~RE_NO_EMPTY_RANGES); memset (®ex, 0, sizeof regex); - s =3D re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex)= ; + s =3D re_compile_pattern ("[[:alnum:]_-]\\\\+\$", 16, ®ex= ); if (s) result |=3D 32; else @@ -264,14 +264,50 @@ AC_DEFUN back reference. */ re_set_syntax (RE_SYNTAX_POSIX_EGREP); memset (®ex, 0, sizeof regex); - s =3D re_compile_pattern ("0|()0|\\1|0", 10, ®ex); + s =3D re_compile_pattern ("0|()0|\\\\1|0", 10, ®ex); if (!s) - result |=3D 64; + { + memset (®s, 0, sizeof regs); + i =3D re_search (®ex, "x", 1, 0, 1, ®s); + if (i !=3D -1) + result |=3D 64; + if (0 <=3D i) + { + free (regs.start); + free (regs.end); + } + regfree (®ex); + } else { if (strcmp (s, "Invalid back reference")) result |=3D 64; + } + + /* glibc bug 11053. */ + re_set_syntax (RE_SYNTAX_POSIX_BASIC); + memset (®ex, 0, sizeof regex); + static char const pat_sub2[] =3D "\\\\(a*\\\\)*a*\\\\1"; + s =3D re_compile_pattern (pat_sub2, sizeof pat_sub2 - 1, &re= gex); + if (s) + result |=3D 64; + else + { + memset (®s, 0, sizeof regs); + static char const data[] =3D "a"; + int datalen =3D sizeof data - 1; + i =3D re_search (®ex, data, datalen, 0, datalen, ®= s); + if (i !=3D 0) + result |=3D 64; + else if (regs.num_regs < 2) + result |=3D 64; + else if (! (regs.start[0] =3D=3D 0 && regs.end[0] =3D=3D= 1)) + result |=3D 64; + else if (! (regs.start[1] =3D=3D 0 && regs.end[1] =3D=3D= 0)) + result |=3D 64; regfree (®ex); + free (regs.start); + free (regs.end); } =20 #if 0 diff --git a/m4/sigdescr_np.m4 b/m4/sigdescr_np.m4 index f6fa63140c..17c22506cc 100644 --- a/m4/sigdescr_np.m4 +++ b/m4/sigdescr_np.m4 @@ -1,4 +1,4 @@ -# sigdescr_np.m4 serial 1 +# sigdescr_np.m4 serial 2 dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -9,7 +9,7 @@ AC_DEFUN dnl Persuade glibc to declare sigdescr_np(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([sigdescr_np]) if test $ac_cv_func_sigdescr_np =3D no; then HAVE_SIGDESCR_NP=3D0 diff --git a/m4/signal_h.m4 b/m4/signal_h.m4 index ff9f0251fd..8b938809b7 100644 --- a/m4/signal_h.m4 +++ b/m4/signal_h.m4 @@ -1,10 +1,10 @@ -# signal_h.m4 serial 19 +# signal_h.m4 serial 22 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_SIGNAL_H], +AC_DEFUN_ONCE([gl_SIGNAL_H], [ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) AC_REQUIRE([gl_CHECK_TYPE_SIGSET_T]) @@ -52,22 +52,37 @@ AC_DEFUN fi ]) =20 +# gl_SIGNAL_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SIGNAL_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SIGNAL_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SIGMASK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAISE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNAL_H_SIGPIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGPROCMASK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGACTION]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) +]) + AC_DEFUN([gl_SIGNAL_H_DEFAULTS], [ - GNULIB_PTHREAD_SIGMASK=3D0; AC_SUBST([GNULIB_PTHREAD_SIGMASK]) - GNULIB_RAISE=3D0; AC_SUBST([GNULIB_RAISE]) - GNULIB_SIGNAL_H_SIGPIPE=3D0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE]) - GNULIB_SIGPROCMASK=3D0; AC_SUBST([GNULIB_SIGPROCMASK]) - GNULIB_SIGACTION=3D0; AC_SUBST([GNULIB_SIGACTION]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_POSIX_SIGNALBLOCKING=3D1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING]) HAVE_PTHREAD_SIGMASK=3D1; AC_SUBST([HAVE_PTHREAD_SIGMASK]) diff --git a/m4/stdalign.m4 b/m4/stdalign.m4 index 8dcb634d55..e22d7f78c0 100644 --- a/m4/stdalign.m4 +++ b/m4/stdalign.m4 @@ -13,7 +13,8 @@ AC_DEFUN [gl_cv_header_working_stdalign_h], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[#include + [[#include + #include #include =20 /* Test that alignof yields a result consistent with offseto= f. @@ -32,6 +33,7 @@ AC_DEFUN /* Test _Alignas only on platforms where gnulib can help. *= / #if \ ((defined __cplusplus && 201103 <=3D __cplusplus) \ + || (__TINYC__ && defined __attribute__) \ || (defined __APPLE__ && defined __MACH__ \ ? 4 < __GNUC__ + (1 <=3D __GNUC_MINOR__) \ : __GNUC__) \ diff --git a/m4/stddef_h.m4 b/m4/stddef_h.m4 index cd666c4a58..1303d2e06c 100644 --- a/m4/stddef_h.m4 +++ b/m4/stddef_h.m4 @@ -1,4 +1,4 @@ -# stddef_h.m4 serial 9 +# stddef_h.m4 serial 11 dnl Copyright (C) 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 dnl A placeholder for , for platforms that have issues. =20 -AC_DEFUN([gl_STDDEF_H], +AC_DEFUN_ONCE([gl_STDDEF_H], [ AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) AC_REQUIRE([gt_TYPE_WCHAR_T]) @@ -68,13 +68,28 @@ AC_DEFUN fi ]) =20 +# gl_STDDEF_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STDDEF_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STDDEF_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAULT= S], [ + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STDDEF_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) +]) + AC_DEFUN([gl_STDDEF_H_DEFAULTS], [ dnl Assume proper GNU behavior unless another module says otherwise. diff --git a/m4/stdint.m4 b/m4/stdint.m4 index a785b44ed1..2eb1652d8e 100644 --- a/m4/stdint.m4 +++ b/m4/stdint.m4 @@ -1,4 +1,4 @@ -# stdint.m4 serial 58 +# stdint.m4 serial 60 dnl Copyright (C) 2001-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -170,7 +170,7 @@ AC_DEFUN_ONCE PTRDIFF_MIN =3D=3D TYPE_MINIMUM (ptrdiff_t) && PTRDIFF_MAX =3D=3D TYPE_MAXIMUM (ptrdiff_t) ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ + /* Detect bug in FreeBSD 6.0/ia64 and FreeBSD 13.0/arm64. */ int check_SIG_ATOMIC: SIG_ATOMIC_MIN =3D=3D TYPE_MINIMUM (sig_atomic_t) && SIG_ATOMIC_MAX =3D=3D TYPE_MAXIMUM (sig_atomic_t) @@ -527,7 +527,7 @@ AC_DEFUN dnl requirement that wint_t is "unchanged by default argument promotio= ns". dnl In this case gnulib's and override wint_t. dnl Set the variable BITSIZEOF_WINT_T accordingly. - if test $GNULIB_OVERRIDES_WINT_T =3D 1; then + if test $GNULIBHEADERS_OVERRIDE_WINT_T =3D 1; then BITSIZEOF_WINT_T=3D32 fi ]) diff --git a/m4/stdio_h.m4 b/m4/stdio_h.m4 index 4c3f24acca..e704383862 100644 --- a/m4/stdio_h.m4 +++ b/m4/stdio_h.m4 @@ -1,11 +1,12 @@ -# stdio_h.m4 serial 52 +# stdio_h.m4 serial 56 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_STDIO_H], +AC_DEFUN_ONCE([gl_STDIO_H], [ + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) AH_VERBATIM([MINGW_ANSI_STDIO], [/* Use GNU style printf and scanf. */ #ifndef __USE_MINGW_ANSI_STDIO @@ -13,7 +14,6 @@ AC_DEFUN #endif ]) AC_DEFINE([__USE_MINGW_ANSI_STDIO]) - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) gl_NEXT_HEADERS([stdio.h]) =20 dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and @@ -40,17 +40,6 @@ AC_DEFUN attribute "__gnu_printf__" instead of "__printf__"]) fi =20 - dnl No need to create extra modules for these functions. Everyone who = uses - dnl likely needs them. - GNULIB_FSCANF=3D1 - gl_MODULE_INDICATOR([fscanf]) - GNULIB_SCANF=3D1 - gl_MODULE_INDICATOR([scanf]) - GNULIB_FGETC=3D1 - GNULIB_GETC=3D1 - GNULIB_GETCHAR=3D1 - GNULIB_FGETS=3D1 - GNULIB_FREAD=3D1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-= read.c" dnl "expected source file, required through AC_LIBSOURCES, not found".= It is dnl also an optimization, to avoid performing a configure check whose = result @@ -64,18 +53,6 @@ AC_DEFUN fi ]) =20 - dnl No need to create extra modules for these functions. Everyone who = uses - dnl likely needs them. - GNULIB_FPRINTF=3D1 - GNULIB_PRINTF=3D1 - GNULIB_VFPRINTF=3D1 - GNULIB_VPRINTF=3D1 - GNULIB_FPUTC=3D1 - GNULIB_PUTC=3D1 - GNULIB_PUTCHAR=3D1 - GNULIB_FPUTS=3D1 - GNULIB_PUTS=3D1 - GNULIB_FWRITE=3D1 dnl This ifdef is necessary to avoid an error "missing file lib/stdio-= write.c" dnl "expected source file, required through AC_LIBSOURCES, not found".= It is dnl also an optimization, to avoid performing a configure check whose = result @@ -116,77 +93,92 @@ AC_DEFUN fi ]) =20 +# gl_STDIO_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STDIO_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS= ], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCLOSE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFLUSH]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FGETS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPURGE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FPUTS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREAD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREOPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSEEKO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELLO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FWRITE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCHAR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDELIM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLINE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PCLOSE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PERROR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POPEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTCHAR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REMOVE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAMEAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SNPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_NONBLOCKING]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_SIGPIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TMPFILE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VASPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFSCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSCANF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VDPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSNPRINTF]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSPRINTF_POSIX]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCLOSEALL], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FDOPEN], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FILENO], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETW], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTW], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TEMPNAM], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAUL= TS]) + AC_REQUIRE([gl_STDIO_H_DEFAULTS]) +]) + AC_DEFUN([gl_STDIO_H_DEFAULTS], [ - GNULIB_DPRINTF=3D0; AC_SUBST([GNULIB_DPRINTF]) - GNULIB_FCLOSE=3D0; AC_SUBST([GNULIB_FCLOSE]) - GNULIB_FDOPEN=3D0; AC_SUBST([GNULIB_FDOPEN]) - GNULIB_FFLUSH=3D0; AC_SUBST([GNULIB_FFLUSH]) - GNULIB_FGETC=3D0; AC_SUBST([GNULIB_FGETC]) - GNULIB_FGETS=3D0; AC_SUBST([GNULIB_FGETS]) - GNULIB_FOPEN=3D0; AC_SUBST([GNULIB_FOPEN]) - GNULIB_FPRINTF=3D0; AC_SUBST([GNULIB_FPRINTF]) - GNULIB_FPRINTF_POSIX=3D0; AC_SUBST([GNULIB_FPRINTF_POSIX]) - GNULIB_FPURGE=3D0; AC_SUBST([GNULIB_FPURGE]) - GNULIB_FPUTC=3D0; AC_SUBST([GNULIB_FPUTC]) - GNULIB_FPUTS=3D0; AC_SUBST([GNULIB_FPUTS]) - GNULIB_FREAD=3D0; AC_SUBST([GNULIB_FREAD]) - GNULIB_FREOPEN=3D0; AC_SUBST([GNULIB_FREOPEN]) - GNULIB_FSCANF=3D0; AC_SUBST([GNULIB_FSCANF]) - GNULIB_FSEEK=3D0; AC_SUBST([GNULIB_FSEEK]) - GNULIB_FSEEKO=3D0; AC_SUBST([GNULIB_FSEEKO]) - GNULIB_FTELL=3D0; AC_SUBST([GNULIB_FTELL]) - GNULIB_FTELLO=3D0; AC_SUBST([GNULIB_FTELLO]) - GNULIB_FWRITE=3D0; AC_SUBST([GNULIB_FWRITE]) - GNULIB_GETC=3D0; AC_SUBST([GNULIB_GETC]) - GNULIB_GETCHAR=3D0; AC_SUBST([GNULIB_GETCHAR]) - GNULIB_GETDELIM=3D0; AC_SUBST([GNULIB_GETDELIM]) - GNULIB_GETLINE=3D0; AC_SUBST([GNULIB_GETLINE]) - GNULIB_OBSTACK_PRINTF=3D0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) - GNULIB_OBSTACK_PRINTF_POSIX=3D0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX= ]) - GNULIB_PCLOSE=3D0; AC_SUBST([GNULIB_PCLOSE]) - GNULIB_PERROR=3D0; AC_SUBST([GNULIB_PERROR]) - GNULIB_POPEN=3D0; AC_SUBST([GNULIB_POPEN]) - GNULIB_PRINTF=3D0; AC_SUBST([GNULIB_PRINTF]) - GNULIB_PRINTF_POSIX=3D0; AC_SUBST([GNULIB_PRINTF_POSIX]) - GNULIB_PUTC=3D0; AC_SUBST([GNULIB_PUTC]) - GNULIB_PUTCHAR=3D0; AC_SUBST([GNULIB_PUTCHAR]) - GNULIB_PUTS=3D0; AC_SUBST([GNULIB_PUTS]) - GNULIB_REMOVE=3D0; AC_SUBST([GNULIB_REMOVE]) - GNULIB_RENAME=3D0; AC_SUBST([GNULIB_RENAME]) - GNULIB_RENAMEAT=3D0; AC_SUBST([GNULIB_RENAMEAT]) - GNULIB_SCANF=3D0; AC_SUBST([GNULIB_SCANF]) - GNULIB_SNPRINTF=3D0; AC_SUBST([GNULIB_SNPRINTF]) - GNULIB_SPRINTF_POSIX=3D0; AC_SUBST([GNULIB_SPRINTF_POSIX]) - GNULIB_STDIO_H_NONBLOCKING=3D0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]= ) - GNULIB_STDIO_H_SIGPIPE=3D0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) - GNULIB_TMPFILE=3D0; AC_SUBST([GNULIB_TMPFILE]) - GNULIB_VASPRINTF=3D0; AC_SUBST([GNULIB_VASPRINTF]) - GNULIB_VFSCANF=3D0; AC_SUBST([GNULIB_VFSCANF]) - GNULIB_VSCANF=3D0; AC_SUBST([GNULIB_VSCANF]) - GNULIB_VDPRINTF=3D0; AC_SUBST([GNULIB_VDPRINTF]) - GNULIB_VFPRINTF=3D0; AC_SUBST([GNULIB_VFPRINTF]) - GNULIB_VFPRINTF_POSIX=3D0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) - GNULIB_VPRINTF=3D0; AC_SUBST([GNULIB_VPRINTF]) - GNULIB_VPRINTF_POSIX=3D0; AC_SUBST([GNULIB_VPRINTF_POSIX]) - GNULIB_VSNPRINTF=3D0; AC_SUBST([GNULIB_VSNPRINTF]) - GNULIB_VSPRINTF_POSIX=3D0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_FCLOSEALL=3D1; AC_SUBST([GNULIB_MDA_FCLOSEALL]) - GNULIB_MDA_FDOPEN=3D1; AC_SUBST([GNULIB_MDA_FDOPEN]) - GNULIB_MDA_FILENO=3D1; AC_SUBST([GNULIB_MDA_FILENO]) - GNULIB_MDA_GETW=3D1; AC_SUBST([GNULIB_MDA_GETW]) - GNULIB_MDA_PUTW=3D1; AC_SUBST([GNULIB_MDA_PUTW]) - GNULIB_MDA_TEMPNAM=3D1; AC_SUBST([GNULIB_MDA_TEMPNAM]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_FCLOSEALL=3D1; AC_SUBST([HAVE_DECL_FCLOSEALL]) HAVE_DECL_FPURGE=3D1; AC_SUBST([HAVE_DECL_FPURGE]) diff --git a/m4/stdlib_h.m4 b/m4/stdlib_h.m4 index 5a02972e05..9c1d1c76c1 100644 --- a/m4/stdlib_h.m4 +++ b/m4/stdlib_h.m4 @@ -1,10 +1,10 @@ -# stdlib_h.m4 serial 55 +# stdlib_h.m4 serial 63 dnl Copyright (C) 2007-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_STDLIB_H], +AC_DEFUN_ONCE([gl_STDLIB_H], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) gl_NEXT_HEADERS([stdlib.h]) @@ -28,7 +28,7 @@ AC_DEFUN posix_memalign posix_openpt ptsname ptsname_r qsort_r random random_r reallocarray realpath rpmatch secure_getenv setenv setstate setstate_r srandom srandom_r - strtod strtold strtoll strtoull unlockpt unsetenv]) + strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv]) =20 AC_REQUIRE([AC_C_RESTRICT]) =20 @@ -46,61 +46,78 @@ AC_DEFUN fi ]) =20 +# gl_STDLIB_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STDLIB_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMPS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKSTEMPS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_MEMALIGN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POSIX_OPENPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_QSORT_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SECURE_GETENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOUL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOULL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYSTEM_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLOCKPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNSETENV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOMB]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ECVT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCVT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GCVT], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKTEMP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_PUTENV], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) +]) + AC_DEFUN([gl_STDLIB_H_DEFAULTS], [ - GNULIB__EXIT=3D0; AC_SUBST([GNULIB__EXIT]) - GNULIB_ALIGNED_ALLOC=3D0; AC_SUBST([GNULIB_ALIGNED_ALLOC]) - GNULIB_ATOLL=3D0; AC_SUBST([GNULIB_ATOLL]) - GNULIB_CALLOC_POSIX=3D0; AC_SUBST([GNULIB_CALLOC_POSIX]) - GNULIB_CANONICALIZE_FILE_NAME=3D0; AC_SUBST([GNULIB_CANONICALIZE_FILE= _NAME]) - GNULIB_FREE_POSIX=3D0; AC_SUBST([GNULIB_FREE_POSIX]) - GNULIB_GETLOADAVG=3D0; AC_SUBST([GNULIB_GETLOADAVG]) - GNULIB_GETSUBOPT=3D0; AC_SUBST([GNULIB_GETSUBOPT]) - GNULIB_GRANTPT=3D0; AC_SUBST([GNULIB_GRANTPT]) - GNULIB_MALLOC_POSIX=3D0; AC_SUBST([GNULIB_MALLOC_POSIX]) - GNULIB_MBTOWC=3D0; AC_SUBST([GNULIB_MBTOWC]) - GNULIB_MKDTEMP=3D0; AC_SUBST([GNULIB_MKDTEMP]) - GNULIB_MKOSTEMP=3D0; AC_SUBST([GNULIB_MKOSTEMP]) - GNULIB_MKOSTEMPS=3D0; AC_SUBST([GNULIB_MKOSTEMPS]) - GNULIB_MKSTEMP=3D0; AC_SUBST([GNULIB_MKSTEMP]) - GNULIB_MKSTEMPS=3D0; AC_SUBST([GNULIB_MKSTEMPS]) - GNULIB_POSIX_MEMALIGN=3D0;AC_SUBST([GNULIB_POSIX_MEMALIGN]) - GNULIB_POSIX_OPENPT=3D0; AC_SUBST([GNULIB_POSIX_OPENPT]) - GNULIB_PTSNAME=3D0; AC_SUBST([GNULIB_PTSNAME]) - GNULIB_PTSNAME_R=3D0; AC_SUBST([GNULIB_PTSNAME_R]) - GNULIB_PUTENV=3D0; AC_SUBST([GNULIB_PUTENV]) - GNULIB_QSORT_R=3D0; AC_SUBST([GNULIB_QSORT_R]) - GNULIB_RANDOM=3D0; AC_SUBST([GNULIB_RANDOM]) - GNULIB_RANDOM_R=3D0; AC_SUBST([GNULIB_RANDOM_R]) - GNULIB_REALLOCARRAY=3D0; AC_SUBST([GNULIB_REALLOCARRAY]) - GNULIB_REALLOC_POSIX=3D0; AC_SUBST([GNULIB_REALLOC_POSIX]) - GNULIB_REALPATH=3D0; AC_SUBST([GNULIB_REALPATH]) - GNULIB_RPMATCH=3D0; AC_SUBST([GNULIB_RPMATCH]) - GNULIB_SECURE_GETENV=3D0; AC_SUBST([GNULIB_SECURE_GETENV]) - GNULIB_SETENV=3D0; AC_SUBST([GNULIB_SETENV]) - GNULIB_STRTOD=3D0; AC_SUBST([GNULIB_STRTOD]) - GNULIB_STRTOLD=3D0; AC_SUBST([GNULIB_STRTOLD]) - GNULIB_STRTOLL=3D0; AC_SUBST([GNULIB_STRTOLL]) - GNULIB_STRTOULL=3D0; AC_SUBST([GNULIB_STRTOULL]) - GNULIB_SYSTEM_POSIX=3D0; AC_SUBST([GNULIB_SYSTEM_POSIX]) - GNULIB_UNLOCKPT=3D0; AC_SUBST([GNULIB_UNLOCKPT]) - GNULIB_UNSETENV=3D0; AC_SUBST([GNULIB_UNSETENV]) - GNULIB_WCTOMB=3D0; AC_SUBST([GNULIB_WCTOMB]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_ECVT=3D1; AC_SUBST([GNULIB_MDA_ECVT]) - GNULIB_MDA_FCVT=3D1; AC_SUBST([GNULIB_MDA_FCVT]) - GNULIB_MDA_GCVT=3D1; AC_SUBST([GNULIB_MDA_GCVT]) - GNULIB_MDA_MKTEMP=3D1; AC_SUBST([GNULIB_MDA_MKTEMP]) - GNULIB_MDA_PUTENV=3D1; AC_SUBST([GNULIB_MDA_PUTENV]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE__EXIT=3D1; AC_SUBST([HAVE__EXIT]) HAVE_ALIGNED_ALLOC=3D1; AC_SUBST([HAVE_ALIGNED_ALLOC]) @@ -137,8 +154,10 @@ AC_DEFUN HAVE_SETSTATE=3D1; AC_SUBST([HAVE_SETSTATE]) HAVE_DECL_SETSTATE=3D1; AC_SUBST([HAVE_DECL_SETSTATE]) HAVE_STRTOD=3D1; AC_SUBST([HAVE_STRTOD]) + HAVE_STRTOL=3D1; AC_SUBST([HAVE_STRTOL]) HAVE_STRTOLD=3D1; AC_SUBST([HAVE_STRTOLD]) HAVE_STRTOLL=3D1; AC_SUBST([HAVE_STRTOLL]) + HAVE_STRTOUL=3D1; AC_SUBST([HAVE_STRTOUL]) HAVE_STRTOULL=3D1; AC_SUBST([HAVE_STRTOULL]) HAVE_STRUCT_RANDOM_DATA=3D1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) HAVE_SYS_LOADAVG_H=3D0; AC_SUBST([HAVE_SYS_LOADAVG_H]) @@ -160,11 +179,16 @@ AC_DEFUN REPLACE_RANDOM=3D0; AC_SUBST([REPLACE_RANDOM]) REPLACE_RANDOM_R=3D0; AC_SUBST([REPLACE_RANDOM_R]) REPLACE_REALLOC=3D0; AC_SUBST([REPLACE_REALLOC]) + REPLACE_REALLOCARRAY=3D0; AC_SUBST([REPLACE_REALLOCARRAY]) REPLACE_REALPATH=3D0; AC_SUBST([REPLACE_REALPATH]) REPLACE_SETENV=3D0; AC_SUBST([REPLACE_SETENV]) REPLACE_SETSTATE=3D0; AC_SUBST([REPLACE_SETSTATE]) REPLACE_STRTOD=3D0; AC_SUBST([REPLACE_STRTOD]) + REPLACE_STRTOL=3D0; AC_SUBST([REPLACE_STRTOL]) REPLACE_STRTOLD=3D0; AC_SUBST([REPLACE_STRTOLD]) + REPLACE_STRTOLL=3D0; AC_SUBST([REPLACE_STRTOLL]) + REPLACE_STRTOUL=3D0; AC_SUBST([REPLACE_STRTOUL]) + REPLACE_STRTOULL=3D0; AC_SUBST([REPLACE_STRTOULL]) REPLACE_UNSETENV=3D0; AC_SUBST([REPLACE_UNSETENV]) REPLACE_WCTOMB=3D0; AC_SUBST([REPLACE_WCTOMB]) ]) diff --git a/m4/stpcpy.m4 b/m4/stpcpy.m4 index 28db4f45df..eb44f03adb 100644 --- a/m4/stpcpy.m4 +++ b/m4/stpcpy.m4 @@ -1,4 +1,4 @@ -# stpcpy.m4 serial 8 +# stpcpy.m4 serial 9 dnl Copyright (C) 2002, 2007, 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -12,7 +12,7 @@ AC_DEFUN dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. AC_REQUIRE([AC_C_RESTRICT]) =20 - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) AC_CHECK_FUNCS([stpcpy]) if test $ac_cv_func_stpcpy =3D no; then HAVE_STPCPY=3D0 diff --git a/m4/string_h.m4 b/m4/string_h.m4 index a4cc5b4378..80d1e58753 100644 --- a/m4/string_h.m4 +++ b/m4/string_h.m4 @@ -5,20 +5,15 @@ # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. =20 -# serial 29 +# serial 32 =20 # Written by Paul Eggert. =20 -AC_DEFUN([gl_HEADER_STRING_H], +AC_DEFUN_ONCE([gl_STRING_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_STRING_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_BODY], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. + AC_REQUIRE([gl_STRING_H_DEFAULTS]) gl_NEXT_HEADERS([string.h]) =20 dnl Check for declarations of anything we want to poison if the @@ -33,62 +28,77 @@ AC_DEFUN AC_REQUIRE([AC_C_RESTRICT]) ]) =20 +# gl_STRING_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_STRING_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_STRING_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 -AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXPLICIT_BZERO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFSLL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMMEM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMPCPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMRCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNLEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPBRK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCASESTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOK_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSLEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNLEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRCHR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASECMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNCASECMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPCASECMP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCASESTR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCSPN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSPBRK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSPN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOK_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERRORNAME_NP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGABBREV_NP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGDESCR_NP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSIGNAL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRVERSCMP]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MEMCCPY], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_STRDUP], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_STRING_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) +]) + +AC_DEFUN([gl_STRING_H_DEFAULTS], [ - GNULIB_EXPLICIT_BZERO=3D0; AC_SUBST([GNULIB_EXPLICIT_BZERO]) - GNULIB_FFSL=3D0; AC_SUBST([GNULIB_FFSL]) - GNULIB_FFSLL=3D0; AC_SUBST([GNULIB_FFSLL]) - GNULIB_MEMCHR=3D0; AC_SUBST([GNULIB_MEMCHR]) - GNULIB_MEMMEM=3D0; AC_SUBST([GNULIB_MEMMEM]) - GNULIB_MEMPCPY=3D0; AC_SUBST([GNULIB_MEMPCPY]) - GNULIB_MEMRCHR=3D0; AC_SUBST([GNULIB_MEMRCHR]) - GNULIB_RAWMEMCHR=3D0; AC_SUBST([GNULIB_RAWMEMCHR]) - GNULIB_STPCPY=3D0; AC_SUBST([GNULIB_STPCPY]) - GNULIB_STPNCPY=3D0; AC_SUBST([GNULIB_STPNCPY]) - GNULIB_STRCHRNUL=3D0; AC_SUBST([GNULIB_STRCHRNUL]) - GNULIB_STRDUP=3D0; AC_SUBST([GNULIB_STRDUP]) - GNULIB_STRNCAT=3D0; AC_SUBST([GNULIB_STRNCAT]) - GNULIB_STRNDUP=3D0; AC_SUBST([GNULIB_STRNDUP]) - GNULIB_STRNLEN=3D0; AC_SUBST([GNULIB_STRNLEN]) - GNULIB_STRPBRK=3D0; AC_SUBST([GNULIB_STRPBRK]) - GNULIB_STRSEP=3D0; AC_SUBST([GNULIB_STRSEP]) - GNULIB_STRSTR=3D0; AC_SUBST([GNULIB_STRSTR]) - GNULIB_STRCASESTR=3D0; AC_SUBST([GNULIB_STRCASESTR]) - GNULIB_STRTOK_R=3D0; AC_SUBST([GNULIB_STRTOK_R]) - GNULIB_MBSLEN=3D0; AC_SUBST([GNULIB_MBSLEN]) - GNULIB_MBSNLEN=3D0; AC_SUBST([GNULIB_MBSNLEN]) - GNULIB_MBSCHR=3D0; AC_SUBST([GNULIB_MBSCHR]) - GNULIB_MBSRCHR=3D0; AC_SUBST([GNULIB_MBSRCHR]) - GNULIB_MBSSTR=3D0; AC_SUBST([GNULIB_MBSSTR]) - GNULIB_MBSCASECMP=3D0; AC_SUBST([GNULIB_MBSCASECMP]) - GNULIB_MBSNCASECMP=3D0; AC_SUBST([GNULIB_MBSNCASECMP]) - GNULIB_MBSPCASECMP=3D0; AC_SUBST([GNULIB_MBSPCASECMP]) - GNULIB_MBSCASESTR=3D0; AC_SUBST([GNULIB_MBSCASESTR]) - GNULIB_MBSCSPN=3D0; AC_SUBST([GNULIB_MBSCSPN]) - GNULIB_MBSPBRK=3D0; AC_SUBST([GNULIB_MBSPBRK]) - GNULIB_MBSSPN=3D0; AC_SUBST([GNULIB_MBSSPN]) - GNULIB_MBSSEP=3D0; AC_SUBST([GNULIB_MBSSEP]) - GNULIB_MBSTOK_R=3D0; AC_SUBST([GNULIB_MBSTOK_R]) - GNULIB_STRERROR=3D0; AC_SUBST([GNULIB_STRERROR]) - GNULIB_STRERROR_R=3D0; AC_SUBST([GNULIB_STRERROR_R]) - GNULIB_STRERRORNAME_NP=3D0; AC_SUBST([GNULIB_STRERRORNAME_NP]) - GNULIB_SIGABBREV_NP=3D0; AC_SUBST([GNULIB_SIGABBREV_NP]) - GNULIB_SIGDESCR_NP=3D0; AC_SUBST([GNULIB_SIGDESCR_NP]) - GNULIB_STRSIGNAL=3D0; AC_SUBST([GNULIB_STRSIGNAL]) - GNULIB_STRVERSCMP=3D0; AC_SUBST([GNULIB_STRVERSCMP]) HAVE_MBSLEN=3D0; AC_SUBST([HAVE_MBSLEN]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_MEMCCPY=3D1; AC_SUBST([GNULIB_MDA_MEMCCPY]) - GNULIB_MDA_STRDUP=3D1; AC_SUBST([GNULIB_MDA_STRDUP]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_EXPLICIT_BZERO=3D1; AC_SUBST([HAVE_EXPLICIT_BZERO]) HAVE_FFSL=3D1; AC_SUBST([HAVE_FFSL]) diff --git a/m4/strnlen.m4 b/m4/strnlen.m4 index bb9a680fdc..1d4f10616e 100644 --- a/m4/strnlen.m4 +++ b/m4/strnlen.m4 @@ -1,4 +1,4 @@ -# strnlen.m4 serial 13 +# strnlen.m4 serial 14 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2021 Free Software Foundati= on, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -7,7 +7,7 @@ =20 AC_DEFUN([gl_FUNC_STRNLEN], [ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_REQUIRE([gl_STRING_H_DEFAULTS]) =20 dnl Persuade glibc to declare strnlen(). AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/strtoll.m4 b/m4/strtoll.m4 index d2c9e5310d..14455dc3db 100644 --- a/m4/strtoll.m4 +++ b/m4/strtoll.m4 @@ -1,4 +1,4 @@ -# strtoll.m4 serial 8 +# strtoll.m4 serial 9 dnl Copyright (C) 2002, 2004, 2006, 2008-2021 Free Software Foundation, = Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,8 +7,40 @@ AC_DEFUN([gl_FUNC_STRTOLL], [ AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) AC_CHECK_FUNCS([strtoll]) - if test $ac_cv_func_strtoll =3D no; then + if test $ac_cv_func_strtoll =3D yes; then + AC_CACHE_CHECK([whether strtoll works], + [gl_cv_func_strtoll_works], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[int result =3D 0; + char *term; + /* This test fails on Minix and native Windows. */ + { + const char input[] =3D "0x"; + (void) strtoll (input, &term, 16); + if (term !=3D input + 1) + result |=3D 1; + } + return result; + ]]) + ], + [gl_cv_func_strtoll_works=3Dyes], + [gl_cv_func_strtoll_works=3Dno], + [case "$host_os" in + # Guess no on native Windows. + mingw*) gl_cv_func_strtoll_works=3D"guessing no" ;; + *) gl_cv_func_strtoll_works=3D"$gl_cross_guess_normal" = ;; + esac + ]) + ]) + case "$gl_cv_func_strtoll_works" in + *yes) ;; + *) REPLACE_STRTOLL=3D1 ;; + esac + else HAVE_STRTOLL=3D0 fi ]) diff --git a/m4/sys_random_h.m4 b/m4/sys_random_h.m4 index 45e0469ba0..37bc31606b 100644 --- a/m4/sys_random_h.m4 +++ b/m4/sys_random_h.m4 @@ -1,10 +1,10 @@ -# sys_random_h.m4 serial 5 +# sys_random_h.m4 serial 8 dnl Copyright (C) 2020-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_HEADER_SYS_RANDOM], +AC_DEFUN_ONCE([gl_SYS_RANDOM_H], [ AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) dnl is always overridden, because of GNULIB_POSIXCHECK.= @@ -35,18 +35,33 @@ AC_DEFUN [getrandom]) ]) =20 +# gl_SYS_RANDOM_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_RANDOM_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_RANDOM_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_RANDOM_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_DEF= AULTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETRANDOM]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_RANDOM_H_MODULE_INDICATOR_D= EFAULTS]) + AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_RANDOM_H_DEFAULTS], [ - GNULIB_GETRANDOM=3D0; AC_SUBST([GNULIB_GETRANDOM]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_GETRANDOM=3D1; AC_SUBST([HAVE_GETRANDOM]) REPLACE_GETRANDOM=3D0; AC_SUBST([REPLACE_GETRANDOM]) diff --git a/m4/sys_select_h.m4 b/m4/sys_select_h.m4 index 4b33d312e5..2e7d140dee 100644 --- a/m4/sys_select_h.m4 +++ b/m4/sys_select_h.m4 @@ -1,13 +1,13 @@ -# sys_select_h.m4 serial 20 +# sys_select_h.m4 serial 23 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. =20 -AC_DEFUN([gl_HEADER_SYS_SELECT], +AC_DEFUN_ONCE([gl_SYS_SELECT_H], [ - AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) + AC_REQUIRE([AC_C_RESTRICT]) AC_CACHE_CHECK([whether is self-contained], [gl_cv_header_sys_select_h_selfcontained], [ @@ -75,19 +75,34 @@ AC_DEFUN ]], [pselect select]) ]) =20 +# gl_SYS_SELECT_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_SELECT_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_SELECT_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_SELECT_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_DEF= AULTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PSELECT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SELECT]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SELECT_H_MODULE_INDICATOR_D= EFAULTS]) + AC_REQUIRE([gl_SYS_SELECT_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_SELECT_H_DEFAULTS], [ - GNULIB_PSELECT=3D0; AC_SUBST([GNULIB_PSELECT]) - GNULIB_SELECT=3D0; AC_SUBST([GNULIB_SELECT]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_PSELECT=3D1; AC_SUBST([HAVE_PSELECT]) REPLACE_PSELECT=3D0; AC_SUBST([REPLACE_PSELECT]) diff --git a/m4/sys_socket_h.m4 b/m4/sys_socket_h.m4 index 503cb9668b..5676a0d217 100644 --- a/m4/sys_socket_h.m4 +++ b/m4/sys_socket_h.m4 @@ -1,4 +1,4 @@ -# sys_socket_h.m4 serial 25 +# sys_socket_h.m4 serial 28 dnl Copyright (C) 2005-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 dnl From Simon Josefsson. =20 -AC_DEFUN([gl_HEADER_SYS_SOCKET], +AC_DEFUN_ONCE([gl_SYS_SOCKET_H], [ AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) AC_REQUIRE([AC_CANONICAL_HOST]) @@ -156,32 +156,47 @@ AC_DEFUN AC_SUBST([HAVE_WS2TCPIP_H]) ]) =20 +# gl_SYS_SOCKET_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_SOCKET_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_SOCKET_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_SOCKET_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_DEF= AULTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SOCKET]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CONNECT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BIND]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPEERNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSOCKOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LISTEN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SEND]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RECVFROM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SENDTO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETSOCKOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SHUTDOWN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCEPT4]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_SOCKET_H_MODULE_INDICATOR_D= EFAULTS]) + AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS], [ - GNULIB_SOCKET=3D0; AC_SUBST([GNULIB_SOCKET]) - GNULIB_CONNECT=3D0; AC_SUBST([GNULIB_CONNECT]) - GNULIB_ACCEPT=3D0; AC_SUBST([GNULIB_ACCEPT]) - GNULIB_BIND=3D0; AC_SUBST([GNULIB_BIND]) - GNULIB_GETPEERNAME=3D0; AC_SUBST([GNULIB_GETPEERNAME]) - GNULIB_GETSOCKNAME=3D0; AC_SUBST([GNULIB_GETSOCKNAME]) - GNULIB_GETSOCKOPT=3D0; AC_SUBST([GNULIB_GETSOCKOPT]) - GNULIB_LISTEN=3D0; AC_SUBST([GNULIB_LISTEN]) - GNULIB_RECV=3D0; AC_SUBST([GNULIB_RECV]) - GNULIB_SEND=3D0; AC_SUBST([GNULIB_SEND]) - GNULIB_RECVFROM=3D0; AC_SUBST([GNULIB_RECVFROM]) - GNULIB_SENDTO=3D0; AC_SUBST([GNULIB_SENDTO]) - GNULIB_SETSOCKOPT=3D0; AC_SUBST([GNULIB_SETSOCKOPT]) - GNULIB_SHUTDOWN=3D0; AC_SUBST([GNULIB_SHUTDOWN]) - GNULIB_ACCEPT4=3D0; AC_SUBST([GNULIB_ACCEPT4]) HAVE_STRUCT_SOCKADDR_STORAGE=3D1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORA= GE]) HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=3D1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY= ]) diff --git a/m4/sys_stat_h.m4 b/m4/sys_stat_h.m4 index 23cbdd28eb..ac91d425bb 100644 --- a/m4/sys_stat_h.m4 +++ b/m4/sys_stat_h.m4 @@ -1,4 +1,4 @@ -# sys_stat_h.m4 serial 38 -*- Autoconf -*- +# sys_stat_h.m4 serial 41 -*- Autoconf -*- dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -7,7 +7,7 @@ dnl From Eric Blake. dnl Provide a GNU-like . =20 -AC_DEFUN([gl_HEADER_SYS_STAT_H], +AC_DEFUN_ONCE([gl_SYS_STAT_H], [ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) =20 @@ -52,38 +52,53 @@ AC_DEFUN AC_REQUIRE([AC_C_RESTRICT]) ]) =20 +# gl_SYS_STAT_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_STAT_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_STAT_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEFAU= LTS], [ + gl_UNISTD_H_REQUIRE_DEFAULTS dnl for REPLACE_FCHDIR + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHMODAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSTATAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FUTIMENS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUMASK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHMOD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSTAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDIRAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFO]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKFIFOAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNOD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKNODAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UTIMENSAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OVERRIDES_STRUCT_STAT]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHMOD], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_MKDIR], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UMASK], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_STAT_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_FCHMODAT=3D0; AC_SUBST([GNULIB_FCHMODAT]) - GNULIB_FSTAT=3D0; AC_SUBST([GNULIB_FSTAT]) - GNULIB_FSTATAT=3D0; AC_SUBST([GNULIB_FSTATAT]) - GNULIB_FUTIMENS=3D0; AC_SUBST([GNULIB_FUTIMENS]) - GNULIB_GETUMASK=3D0; AC_SUBST([GNULIB_GETUMASK]) - GNULIB_LCHMOD=3D0; AC_SUBST([GNULIB_LCHMOD]) - GNULIB_LSTAT=3D0; AC_SUBST([GNULIB_LSTAT]) - GNULIB_MKDIR=3D0; AC_SUBST([GNULIB_MKDIR]) - GNULIB_MKDIRAT=3D0; AC_SUBST([GNULIB_MKDIRAT]) - GNULIB_MKFIFO=3D0; AC_SUBST([GNULIB_MKFIFO]) - GNULIB_MKFIFOAT=3D0; AC_SUBST([GNULIB_MKFIFOAT]) - GNULIB_MKNOD=3D0; AC_SUBST([GNULIB_MKNOD]) - GNULIB_MKNODAT=3D0; AC_SUBST([GNULIB_MKNODAT]) - GNULIB_STAT=3D0; AC_SUBST([GNULIB_STAT]) - GNULIB_UTIMENSAT=3D0; AC_SUBST([GNULIB_UTIMENSAT]) - GNULIB_OVERRIDES_STRUCT_STAT=3D0; AC_SUBST([GNULIB_OVERRIDES_STRUCT_ST= AT]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_CHMOD=3D1; AC_SUBST([GNULIB_MDA_CHMOD]) - GNULIB_MDA_MKDIR=3D1; AC_SUBST([GNULIB_MDA_MKDIR]) - GNULIB_MDA_UMASK=3D1; AC_SUBST([GNULIB_MDA_UMASK]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_FCHMODAT=3D1; AC_SUBST([HAVE_FCHMODAT]) HAVE_FSTATAT=3D1; AC_SUBST([HAVE_FSTATAT]) diff --git a/m4/sys_time_h.m4 b/m4/sys_time_h.m4 index 64f133d513..c425a9639a 100644 --- a/m4/sys_time_h.m4 +++ b/m4/sys_time_h.m4 @@ -1,5 +1,5 @@ # Configure a replacement for . -# serial 9 +# serial 12 =20 # Copyright (C) 2007, 2009-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation @@ -8,18 +8,13 @@ =20 # Written by Paul Eggert and Martin Lambers. =20 -AC_DEFUN([gl_HEADER_SYS_TIME_H], +AC_DEFUN_ONCE([gl_SYS_TIME_H], [ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=3D0 statemen= t dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=3D1 dnl statements that occur in other macros. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], -[ + AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) AC_CHECK_HEADERS_ONCE([sys/time.h]) gl_CHECK_NEXT_HEADERS([sys/time.h]) =20 @@ -89,18 +84,33 @@ AC_DEFUN ]], [gettimeofday]) ]) =20 +# gl_SYS_TIME_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_SYS_TIME_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 -AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_TIME_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEFAU= LTS], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETTIMEOFDAY]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TIME_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_SYS_TIME_H_DEFAULTS]) +]) + +AC_DEFUN([gl_SYS_TIME_H_DEFAULTS], [ - GNULIB_GETTIMEOFDAY=3D0; AC_SUBST([GNULIB_GETTIMEOFDAY]) dnl Assume POSIX behavior unless another module says otherwise. HAVE_GETTIMEOFDAY=3D1; AC_SUBST([HAVE_GETTIMEOFDAY]) HAVE_STRUCT_TIMEVAL=3D1; AC_SUBST([HAVE_STRUCT_TIMEVAL]) diff --git a/m4/sys_types_h.m4 b/m4/sys_types_h.m4 index 2172c836d9..6dd6fee10c 100644 --- a/m4/sys_types_h.m4 +++ b/m4/sys_types_h.m4 @@ -1,4 +1,4 @@ -# sys_types_h.m4 serial 11 +# sys_types_h.m4 serial 13 dnl Copyright (C) 2011-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,10 +6,11 @@ =20 AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ + AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) + dnl Use sane struct stat types in OpenVMS 8.2 and later. AC_DEFINE([_USE_STD_STAT], 1, [For standard stat data types on VMS.]) =20 - AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h]) =20 dnl Ensure the type pid_t gets defined. @@ -30,6 +31,17 @@ AC_DEFUN_ONCE AC_SUBST([WINDOWS_STAT_INODES]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_SYS_TYPES_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEFAU= LTS], [ + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_SYS_TYPE_H_MODULE_INDICATOR_DEF= AULTS]) + AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) +]) + AC_DEFUN([gl_SYS_TYPES_H_DEFAULTS], [ ]) diff --git a/m4/time_h.m4 b/m4/time_h.m4 index b6a1aa3bc0..b57474b48b 100644 --- a/m4/time_h.m4 +++ b/m4/time_h.m4 @@ -2,7 +2,7 @@ =20 # Copyright (C) 2000-2001, 2003-2007, 2009-2021 Free Software Foundation= , Inc. =20 -# serial 15 +# serial 18 =20 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -10,16 +10,11 @@ =20 # Written by Paul Eggert and Jim Meyering. =20 -AC_DEFUN([gl_HEADER_TIME_H], +AC_DEFUN_ONCE([gl_TIME_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_BODY], -[ - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. + AC_REQUIRE([gl_TIME_H_DEFAULTS]) =20 gl_NEXT_HEADERS([time.h]) AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) @@ -111,30 +106,45 @@ AC_DEFUN AC_SUBST([UNISTD_H_DEFINES_STRUCT_TIMESPEC]) ]) =20 +# gl_TIME_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_TIME_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_TIME_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 -AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULTS]= , [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TZSET], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_TIME_H_MODULE_INDICATOR_DEFAULT= S]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) +]) + +AC_DEFUN([gl_TIME_H_DEFAULTS], [ - GNULIB_CTIME=3D0; AC_SUBST([GNULIB_CTIME]) - GNULIB_MKTIME=3D0; AC_SUBST([GNULIB_MKTIME]) - GNULIB_LOCALTIME=3D0; AC_SUBST([GNULIB_LOCALTIME]) - GNULIB_NANOSLEEP=3D0; AC_SUBST([GNULIB_NANOSLEEP]) - GNULIB_STRFTIME=3D0; AC_SUBST([GNULIB_STRFTIME]) - GNULIB_STRPTIME=3D0; AC_SUBST([GNULIB_STRPTIME]) - GNULIB_TIMEGM=3D0; AC_SUBST([GNULIB_TIMEGM]) - GNULIB_TIMESPEC_GET=3D0; AC_SUBST([GNULIB_TIMESPEC_GET= ]) - GNULIB_TIME_R=3D0; AC_SUBST([GNULIB_TIME_R]) - GNULIB_TIME_RZ=3D0; AC_SUBST([GNULIB_TIME_RZ]) - GNULIB_TZSET=3D0; AC_SUBST([GNULIB_TZSET]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_TZSET=3D1; AC_SUBST([GNULIB_MDA_TZSET]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_DECL_LOCALTIME_R=3D1; AC_SUBST([HAVE_DECL_LOCALTIME= _R]) HAVE_NANOSLEEP=3D1; AC_SUBST([HAVE_NANOSLEEP]) diff --git a/m4/time_r.m4 b/m4/time_r.m4 index 713e93ac26..2d49b64f12 100644 --- a/m4/time_r.m4 +++ b/m4/time_r.m4 @@ -12,7 +12,7 @@ AC_DEFUN dnl Persuade glibc and Solaris to declare localtime_r. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) =20 - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([AC_C_RESTRICT]) =20 dnl Some systems don't declare localtime_r() and gmtime_r() if _REENTR= ANT is diff --git a/m4/time_rz.m4 b/m4/time_rz.m4 index 34ef0bab4b..c5e85dc625 100644 --- a/m4/time_rz.m4 +++ b/m4/time_rz.m4 @@ -10,7 +10,7 @@ AC_DEFUN([gl_TIME_RZ], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([AC_STRUCT_TIMEZONE]) =20 # On Mac OS X 10.6, localtime loops forever with some time_t values. diff --git a/m4/timegm.m4 b/m4/timegm.m4 index 098c857e7f..58123beb0c 100644 --- a/m4/timegm.m4 +++ b/m4/timegm.m4 @@ -1,4 +1,4 @@ -# timegm.m4 serial 12 +# timegm.m4 serial 13 dnl Copyright (C) 2003, 2007, 2009-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,7 +6,7 @@ =20 AC_DEFUN([gl_FUNC_TIMEGM], [ - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) + AC_REQUIRE([gl_TIME_H_DEFAULTS]) AC_REQUIRE([gl_FUNC_MKTIME_WORKS]) REPLACE_TIMEGM=3D0 AC_CHECK_FUNCS_ONCE([timegm]) diff --git a/m4/unistd_h.m4 b/m4/unistd_h.m4 index 0f26fb908d..0ce4ea4511 100644 --- a/m4/unistd_h.m4 +++ b/m4/unistd_h.m4 @@ -1,4 +1,4 @@ -# unistd_h.m4 serial 85 +# unistd_h.m4 serial 89 dnl Copyright (C) 2006-2021 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -6,10 +6,10 @@ =20 dnl Written by Simon Josefsson, Bruno Haible. =20 -AC_DEFUN([gl_UNISTD_H], +AC_DEFUN_ONCE([gl_UNISTD_H], [ - dnl Use AC_REQUIRE here, so that the default behavior below is expande= d - dnl once only, before all statements that occur in other macros. + dnl Ensure to expand the default settings once only, before all statem= ents + dnl that occur in other macros. AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) =20 gl_CHECK_NEXT_HEADERS([unistd.h]) @@ -59,100 +59,116 @@ AC_DEFUN fi ]) =20 +# gl_UNISTD_MODULE_INDICATOR([modulename]) +# sets the shell variable that indicates the presence of the given modul= e +# to a C preprocessor expression that will evaluate to 1. +# This macro invocation must not occur in macros that are AC_REQUIREd. AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [ - dnl Use AC_REQUIRE here, so that the default settings are expanded onc= e only. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) + dnl Ensure to expand the default settings once only. + gl_UNISTD_H_REQUIRE_DEFAULTS gl_MODULE_INDICATOR_SET_VARIABLE([$1]) dnl Define it also as a C macro, for the benefit of the unit tests. gl_MODULE_INDICATOR_FOR_TESTS([$1]) ]) =20 +# Initializes the default values for AC_SUBSTed shell variables. +# This macro must not be AC_REQUIREd. It must only be invoked, and only= +# outside of macros or in macros that are not AC_REQUIREd. +AC_DEFUN([gl_UNISTD_H_REQUIRE_DEFAULTS], +[ + m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAULT= S], [ + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ACCESS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CHOWN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CLOSE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_COPY_FILE_RANGE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP2]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUP3]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ENVIRON]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EUIDACCESS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECLP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECV]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_EXECVPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FACCESSAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCHOWNAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDATASYNC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FSYNC]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTRUNCATE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCWD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDOMAINNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDTABLESIZE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETENTROPY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETGROUPS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETHOSTNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOGIN_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETOPT_POSIX]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAGESIZE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPASS]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETUSERSHELL]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GROUP_MEMBER]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISATTY]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LCHOWN]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LSEEK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PIPE2]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PREAD]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PWRITE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READ]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_READLINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RMDIR]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETHOSTNAME]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SLEEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SYMLINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCATE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TTYNAME_R]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_GETOPT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_NONBLOCKING]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNISTD_H_SIGPIPE]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINK]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNLINKAT]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_USLEEP]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WRITE]) + dnl Support Microsoft deprecated alias function names by default. + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ACCESS], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CHDIR], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CLOSE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_DUP2], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECL], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECLP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECV], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVP], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_EXECVPE], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETCWD], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_GETPID], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_ISATTY], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LSEEK], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_READ], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_RMDIR], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_SWAB], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_UNLINK], [1]) + gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WRITE], [1]) + ]) + m4_require(GL_MODULE_INDICATOR_PREFIX[_UNISTD_H_MODULE_INDICATOR_DEFAU= LTS]) + AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) +]) + AC_DEFUN([gl_UNISTD_H_DEFAULTS], [ - GNULIB_ACCESS=3D0; AC_SUBST([GNULIB_ACCESS]) - GNULIB_CHDIR=3D0; AC_SUBST([GNULIB_CHDIR]) - GNULIB_CHOWN=3D0; AC_SUBST([GNULIB_CHOWN]) - GNULIB_CLOSE=3D0; AC_SUBST([GNULIB_CLOSE]) - GNULIB_COPY_FILE_RANGE=3D0; AC_SUBST([GNULIB_COPY_FILE_RANGE]) - GNULIB_DUP=3D0; AC_SUBST([GNULIB_DUP]) - GNULIB_DUP2=3D0; AC_SUBST([GNULIB_DUP2]) - GNULIB_DUP3=3D0; AC_SUBST([GNULIB_DUP3]) - GNULIB_ENVIRON=3D0; AC_SUBST([GNULIB_ENVIRON]) - GNULIB_EUIDACCESS=3D0; AC_SUBST([GNULIB_EUIDACCESS]) - GNULIB_EXECL=3D0; AC_SUBST([GNULIB_EXECL]) - GNULIB_EXECLE=3D0; AC_SUBST([GNULIB_EXECLE]) - GNULIB_EXECLP=3D0; AC_SUBST([GNULIB_EXECLP]) - GNULIB_EXECV=3D0; AC_SUBST([GNULIB_EXECV]) - GNULIB_EXECVE=3D0; AC_SUBST([GNULIB_EXECVE]) - GNULIB_EXECVP=3D0; AC_SUBST([GNULIB_EXECVP]) - GNULIB_EXECVPE=3D0; AC_SUBST([GNULIB_EXECVPE]) - GNULIB_FACCESSAT=3D0; AC_SUBST([GNULIB_FACCESSAT]) - GNULIB_FCHDIR=3D0; AC_SUBST([GNULIB_FCHDIR]) - GNULIB_FCHOWNAT=3D0; AC_SUBST([GNULIB_FCHOWNAT]) - GNULIB_FDATASYNC=3D0; AC_SUBST([GNULIB_FDATASYNC]) - GNULIB_FSYNC=3D0; AC_SUBST([GNULIB_FSYNC]) - GNULIB_FTRUNCATE=3D0; AC_SUBST([GNULIB_FTRUNCATE]) - GNULIB_GETCWD=3D0; AC_SUBST([GNULIB_GETCWD]) - GNULIB_GETDOMAINNAME=3D0; AC_SUBST([GNULIB_GETDOMAINNAME]) - GNULIB_GETDTABLESIZE=3D0; AC_SUBST([GNULIB_GETDTABLESIZE]) - GNULIB_GETENTROPY=3D0; AC_SUBST([GNULIB_GETENTROPY]) - GNULIB_GETGROUPS=3D0; AC_SUBST([GNULIB_GETGROUPS]) - GNULIB_GETHOSTNAME=3D0; AC_SUBST([GNULIB_GETHOSTNAME]) - GNULIB_GETLOGIN=3D0; AC_SUBST([GNULIB_GETLOGIN]) - GNULIB_GETLOGIN_R=3D0; AC_SUBST([GNULIB_GETLOGIN_R]) - GNULIB_GETOPT_POSIX=3D0; AC_SUBST([GNULIB_GETOPT_POSIX]) - GNULIB_GETPAGESIZE=3D0; AC_SUBST([GNULIB_GETPAGESIZE]) - GNULIB_GETPASS=3D0; AC_SUBST([GNULIB_GETPASS]) - GNULIB_GETUSERSHELL=3D0; AC_SUBST([GNULIB_GETUSERSHELL]) - GNULIB_GROUP_MEMBER=3D0; AC_SUBST([GNULIB_GROUP_MEMBER]) - GNULIB_ISATTY=3D0; AC_SUBST([GNULIB_ISATTY]) - GNULIB_LCHOWN=3D0; AC_SUBST([GNULIB_LCHOWN]) - GNULIB_LINK=3D0; AC_SUBST([GNULIB_LINK]) - GNULIB_LINKAT=3D0; AC_SUBST([GNULIB_LINKAT]) - GNULIB_LSEEK=3D0; AC_SUBST([GNULIB_LSEEK]) - GNULIB_PIPE=3D0; AC_SUBST([GNULIB_PIPE]) - GNULIB_PIPE2=3D0; AC_SUBST([GNULIB_PIPE2]) - GNULIB_PREAD=3D0; AC_SUBST([GNULIB_PREAD]) - GNULIB_PWRITE=3D0; AC_SUBST([GNULIB_PWRITE]) - GNULIB_READ=3D0; AC_SUBST([GNULIB_READ]) - GNULIB_READLINK=3D0; AC_SUBST([GNULIB_READLINK]) - GNULIB_READLINKAT=3D0; AC_SUBST([GNULIB_READLINKAT]) - GNULIB_RMDIR=3D0; AC_SUBST([GNULIB_RMDIR]) - GNULIB_SETHOSTNAME=3D0; AC_SUBST([GNULIB_SETHOSTNAME]) - GNULIB_SLEEP=3D0; AC_SUBST([GNULIB_SLEEP]) - GNULIB_SYMLINK=3D0; AC_SUBST([GNULIB_SYMLINK]) - GNULIB_SYMLINKAT=3D0; AC_SUBST([GNULIB_SYMLINKAT]) - GNULIB_TRUNCATE=3D0; AC_SUBST([GNULIB_TRUNCATE]) - GNULIB_TTYNAME_R=3D0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_NONBLOCKING=3D0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING= ]) - GNULIB_UNISTD_H_SIGPIPE=3D0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) - GNULIB_UNLINK=3D0; AC_SUBST([GNULIB_UNLINK]) - GNULIB_UNLINKAT=3D0; AC_SUBST([GNULIB_UNLINKAT]) - GNULIB_USLEEP=3D0; AC_SUBST([GNULIB_USLEEP]) - GNULIB_WRITE=3D0; AC_SUBST([GNULIB_WRITE]) - dnl Support Microsoft deprecated alias function names by default. - GNULIB_MDA_ACCESS=3D1; AC_SUBST([GNULIB_MDA_ACCESS]) - GNULIB_MDA_CHDIR=3D1; AC_SUBST([GNULIB_MDA_CHDIR]) - GNULIB_MDA_CLOSE=3D1; AC_SUBST([GNULIB_MDA_CLOSE]) - GNULIB_MDA_DUP=3D1; AC_SUBST([GNULIB_MDA_DUP]) - GNULIB_MDA_DUP2=3D1; AC_SUBST([GNULIB_MDA_DUP2]) - GNULIB_MDA_EXECL=3D1; AC_SUBST([GNULIB_MDA_EXECL]) - GNULIB_MDA_EXECLE=3D1; AC_SUBST([GNULIB_MDA_EXECLE]) - GNULIB_MDA_EXECLP=3D1; AC_SUBST([GNULIB_MDA_EXECLP]) - GNULIB_MDA_EXECV=3D1; AC_SUBST([GNULIB_MDA_EXECV]) - GNULIB_MDA_EXECVE=3D1; AC_SUBST([GNULIB_MDA_EXECVE]) - GNULIB_MDA_EXECVP=3D1; AC_SUBST([GNULIB_MDA_EXECVP]) - GNULIB_MDA_EXECVPE=3D1; AC_SUBST([GNULIB_MDA_EXECVPE]) - GNULIB_MDA_GETCWD=3D1; AC_SUBST([GNULIB_MDA_GETCWD]) - GNULIB_MDA_GETPID=3D1; AC_SUBST([GNULIB_MDA_GETPID]) - GNULIB_MDA_ISATTY=3D1; AC_SUBST([GNULIB_MDA_ISATTY]) - GNULIB_MDA_LSEEK=3D1; AC_SUBST([GNULIB_MDA_LSEEK]) - GNULIB_MDA_READ=3D1; AC_SUBST([GNULIB_MDA_READ]) - GNULIB_MDA_RMDIR=3D1; AC_SUBST([GNULIB_MDA_RMDIR]) - GNULIB_MDA_SWAB=3D1; AC_SUBST([GNULIB_MDA_SWAB]) - GNULIB_MDA_UNLINK=3D1; AC_SUBST([GNULIB_MDA_UNLINK]) - GNULIB_MDA_WRITE=3D1; AC_SUBST([GNULIB_MDA_WRITE]) dnl Assume proper GNU behavior unless another module says otherwise. HAVE_CHOWN=3D1; AC_SUBST([HAVE_CHOWN]) HAVE_COPY_FILE_RANGE=3D1; AC_SUBST([HAVE_COPY_FILE_RANGE]) diff --git a/m4/unlocked-io.m4 b/m4/unlocked-io.m4 index a2dc8a144a..b689020ff4 100644 --- a/m4/unlocked-io.m4 +++ b/m4/unlocked-io.m4 @@ -1,4 +1,4 @@ -# unlocked-io.m4 serial 15 +# unlocked-io.m4 serial 16 =20 # Copyright (C) 1998-2006, 2009-2021 Free Software Foundation, Inc. # @@ -16,11 +16,6 @@ =20 AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], [ - AC_DEFINE([USE_UNLOCKED_IO], [1], - [Define to 1 if you want getc etc. to use unlocked I/O if available.= - Unlocked I/O can improve performance in unithreaded apps, - but it is not safe for multithreaded apps.]) - dnl Persuade glibc and Solaris to declare dnl fgets_unlocked(), fputs_unlocked() etc. AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) diff --git a/m4/year2038.m4 b/m4/year2038.m4 new file mode 100644 index 0000000000..ad7f303581 --- /dev/null +++ b/m4/year2038.m4 @@ -0,0 +1,112 @@ +# year2038.m4 serial 5 +dnl Copyright (C) 2017-2021 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Attempt to ensure that 'time_t' is a 64-bit type +dnl and that the functions time(), stat(), etc. return 64-bit times. + +AC_DEFUN([gl_YEAR2038_EARLY], +[ + AC_REQUIRE([AC_CANONICAL_HOST]) + case "$host_os" in + mingw*) + AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1], + [For 64-bit time_t on 32-bit mingw.]) + ;; + esac +]) + +# gl_YEAR2038_TEST_INCLUDES +# ------------------------- +AC_DEFUN([gl_YEAR2038_TEST_INCLUDES], +[[ + #include + /* Check that time_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_TIME_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ + #define LARGE_TIME_T (((time_t) 1 << 31 << 31) - 1 + ((time_t) 1 << 31= << 31)) + int verify_time_t_range[(LARGE_TIME_T % 2147483629 =3D=3D 721 + && LARGE_TIME_T % 2147483647 =3D=3D 1) + ? 1 : -1]; +]]) + +# gl_YEAR2038_BODY(REQUIRE-64-BIT) +---------------------------------- +AC_DEFUN([gl_YEAR2038_BODY], +[ + AC_ARG_ENABLE([year2038], + [ --disable-year2038 omit support for timestamps past the year = 2038]) + AS_IF([test "$enable_year2038" !=3D no], + [ + dnl On many systems, time_t is already a 64-bit type. + dnl On those systems where time_t is still 32-bit, it requires kernel + dnl and libc support to make it 64-bit. For glibc 2.34 and later on Li= nux, + dnl defining _TIME_BITS=3D64 and _FILE_OFFSET_BITS=3D64 is needed on x= 86 and ARM. + dnl + dnl On native Windows, the system include files define types __time32_= t + dnl and __time64_t. By default, time_t is an alias of + dnl - __time32_t on 32-bit mingw, + dnl - __time64_t on 64-bit mingw and on MSVC (since MSVC 8). + dnl But when compiling with -D__MINGW_USE_VC2005_COMPAT, time_t is an + dnl alias of __time64_t. + dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of= + dnl __time32_t. + AC_CACHE_CHECK([for 64-bit time_t], [gl_cv_type_time_t_64], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])], + [gl_cv_type_time_t_64=3Dyes], [gl_cv_type_time_t_64=3Dno]) + ]) + if test "$gl_cv_type_time_t_64" =3D no; then + AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=3D64], + [gl_cv_type_time_t_bits_macro], + [AC_COMPILE_IFELSE( + [AC_LANG_SOURCE([[#define _TIME_BITS 64 + #define _FILE_OFFSET_BITS 64 + ]gl_YEAR2038_TEST_INCLUDES])], + [gl_cv_type_time_t_bits_macro=3Dyes], + [gl_cv_type_time_t_bits_macro=3Dno]) + ]) + if test "$gl_cv_type_time_t_bits_macro" =3D yes; then + AC_DEFINE([_TIME_BITS], [64], + [Number of bits in a timestamp, on hosts where this is settable.= ]) + dnl AC_SYS_LARGFILE also defines this; it's OK if we do too. + AC_DEFINE([_FILE_OFFSET_BITS], [64], + [Number of bits in a file offset, on hosts where this is settabl= e.]) + gl_cv_type_time_t_64=3Dyes + fi + fi + if test $gl_cv_type_time_t_64 =3D no; then + AC_COMPILE_IFELSE( + [AC_LANG_SOURCE( + [[#ifdef _USE_32BIT_TIME_T + int ok; + #else + error fail + #endif + ]])], + [AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type. Rem= ove _USE_32BIT_TIME_T from the compiler flags.])], + [# If not cross-compiling and $1 says we should check, + # and 'touch' works with a large timestamp, then evidently 64-bit= time_t + # is desired and supported, so fail and ask the builder to fix th= e + # problem. Otherwise, just warn the builder. + m4_ifval([$1], + [if test $cross_compiling =3D no \ + && TZ=3DUTC0 touch -t 210602070628.16 conftest.time 2>/dev/= null; then + rm -f conftest.time + AC_MSG_FAILURE([This package requires a 64-bit 'time_t' type= , which your system appears to support. You might try configuring with 'C= PPFLAGS=3D"-m64" LDFLAGS=3D"-m64"'. To build with a 32-bit time_t anyway = (not recommended), configure with '--disable-year2038'.]) + fi]) + if test "$gl_warned_about_64_bit_time_t" !=3D yes; then + AC_MSG_WARN([This package requires a 64-bit 'time_t' type if th= ere is any way to access timestamps outside the year range 1901-2038 on y= our platform. Perhaps you should configure with 'CPPFLAGS=3D"-m64" LDFLAG= S=3D"-m64"'?]) + gl_warned_about_64_bit_time_t=3Dyes + fi + ]) + fi]) +]) + +AC_DEFUN([gl_YEAR2038], +[ + gl_YEAR2038_BODY([require-64-bit]) +]) --=20 2.31.1 --------------E4BEEE2CBC36A509D278BC92 Content-Type: text/x-patch; charset=UTF-8; name="0003-By-hand-fixes-for-update-from-Gnulib.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0003-By-hand-fixes-for-update-from-Gnulib.patch" =46rom 309269585d1d1b884543e33c802d21b9c9c39888 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Jul 2021 16:11:16 -0700 Subject: [PATCH 3/4] By-hand fixes for update from Gnulib * .gitignore: Add lib/malloc/*.gl.h. * admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h directly from Gnulib, without worrying about Gnulib modules, as these files are special cases. (AVOIDED_MODULES): Remove malloc-posix. * lib/af_alg.h, lib/save-cwd.h: Copy from Gnulib. * lib/gnulib.mk.in, lib/gnulib-comp.m4: Regenerate. * lib/malloc.c: New file, copied from Gnulib. * lib/malloca.c, lib/malloca.h: * m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4: Remove. These are either no longer present in Gnulib, or are no longer needed by modules that Emacs uses. --- .gitignore | 1 + INSTALL | 7 ++- admin/merge-gnulib | 5 +- etc/NEWS | 6 +++ lib/af_alg.h | 18 +++---- lib/gnulib.mk.in | 15 +++++- lib/malloc.c | 51 +++++++++++++++++++ lib/malloca.c | 106 -------------------------------------- lib/malloca.h | 123 --------------------------------------------- lib/save-cwd.h | 4 +- m4/close-stream.m4 | 11 ---- m4/glibc21.m4 | 34 ------------- m4/gnulib-comp.m4 | 25 +++++++++ m4/malloca.m4 | 14 ------ 14 files changed, 117 insertions(+), 303 deletions(-) create mode 100644 lib/malloc.c delete mode 100644 lib/malloca.c delete mode 100644 lib/malloca.h delete mode 100644 m4/close-stream.m4 delete mode 100644 m4/glibc21.m4 delete mode 100644 m4/malloca.m4 diff --git a/.gitignore b/.gitignore index fcbc9cd7f4..00d0599b63 100644 --- a/.gitignore +++ b/.gitignore @@ -65,6 +65,7 @@ lib/ieee754.h lib/inttypes.h lib/libgnu.a lib/limits.h +lib/malloc/*.gl.h lib/signal.h lib/std*.h !lib/std*.in.h diff --git a/INSTALL b/INSTALL index b6f681a153..8c036f2e60 100644 --- a/INSTALL +++ b/INSTALL @@ -322,8 +322,11 @@ Use --without-toolkit-scroll-bars to disable Motif o= r Xaw3d scroll bars. Use --without-xim to inhibit the default use of X Input Methods. In this case, the X resource useXIM can be used to turn on use of XIM. =20 -Use --disable-largefile to omit support for files larger than 2GB on -systems which support that. +Use --disable-largefile to omit support for files larger than 2GB, and +--disable-year2038 to omit support for timestamps past the year 2038, +on systems which allow omitting such support. This may help when +linking Emacs to a library with an ABI that requires a particular +width for off_t or for time_t. =20 Use --without-sound to disable sound support. =20 diff --git a/admin/merge-gnulib b/admin/merge-gnulib index c12e83dd2f..10cc73aa73 100755 --- a/admin/merge-gnulib +++ b/admin/merge-gnulib @@ -50,7 +50,7 @@ GNULIB_MODULES=3D =20 AVOIDED_MODULES=3D' btowc close dup fchdir fstat langinfo lock - malloc-posix mbrtowc mbsinit memchr mkdir msvc-inval msvc-nothrow nl_l= anginfo + mbrtowc mbsinit memchr mkdir msvc-inval msvc-nothrow nl_langinfo openat-die opendir pthread-h raise save-cwd select setenv sigprocmask stat stdarg stdbool threadlib tzset unsetenv utime utime-h @@ -118,5 +118,8 @@ avoided_flags=3D "$gnulib_srcdir"/build-aux/install-sh \ "$gnulib_srcdir"/build-aux/move-if-change \ "$src"build-aux && +cp -- "$gnulib_srcdir"/lib/af_alg.h \ + "$gnulib_srcdir"/lib/save-cwd.h \ + "$src"lib && { test -z "$src" || cd "$src"; } && ./autogen.sh diff --git a/etc/NEWS b/etc/NEWS index f1502a8e0e..6aaf56f0f0 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -78,6 +78,12 @@ It was declared obsolete in Emacs 27.1. This was only ever relevant when building from a repository checkout. This now requires makeinfo, which is part of the texinfo package. =20 +--- +** There is a new configure option '--disable-year2038' to omit +support for 64-bit timestamps on platforms like GNU/Linux ARM where +time_t is traditionally 32-bit. This may be helpful when linking +Emacs to a library with ABI requiring 32-bit time_t. + --- ** Support for building with '-fcheck-pointer-bounds' has been removed. GCC has withdrawn the '-fcheck-pointer-bounds' option and support for diff --git a/lib/af_alg.h b/lib/af_alg.h index 4c5854cc99..f0fe7fc055 100644 --- a/lib/af_alg.h +++ b/lib/af_alg.h @@ -1,18 +1,18 @@ /* af_alg.h - Compute message digests from file streams and buffers. - Copyright (C) 2018-2020 Free Software Foundation, Inc. + Copyright (C) 2018-2021 Free Software Foundation, Inc. =20 - This program is free software; you can redistribute it and/or modify = it - under the terms of the GNU General Public License as published by the= - Free Software Foundation; either version 2, or (at your option) any - later version. + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. =20 - This program is distributed in the hope that it will be useful, + This file is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. =20 - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ =20 /* Written by Matteo Croce , 2018. Documentation by Bruno Haible , 2018. */ diff --git a/lib/gnulib.mk.in b/lib/gnulib.mk.in index 6ac22124ed..0e61fcb112 100644 --- a/lib/gnulib.mk.in +++ b/lib/gnulib.mk.in @@ -41,7 +41,6 @@ # --avoid=3Dfstat \ # --avoid=3Dlanginfo \ # --avoid=3Dlock \ -# --avoid=3Dmalloc-posix \ # --avoid=3Dmbrtowc \ # --avoid=3Dmbsinit \ # --avoid=3Dmemchr \ @@ -1197,6 +1196,7 @@ gl_GNULIB_ENABLED_cloexec =3D @gl_GNULIB_ENABLED_cl= oexec@ gl_GNULIB_ENABLED_d3b2383720ee0e541357aa2aac598e2b =3D @gl_GNULIB_ENABLE= D_d3b2383720ee0e541357aa2aac598e2b@ gl_GNULIB_ENABLED_dirfd =3D @gl_GNULIB_ENABLED_dirfd@ gl_GNULIB_ENABLED_dynarray =3D @gl_GNULIB_ENABLED_dynarray@ +gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866 =3D @gl_GNULIB_ENABLE= D_ef455225c00f5049c808c2eda3e76866@ gl_GNULIB_ENABLED_euidaccess =3D @gl_GNULIB_ENABLED_euidaccess@ gl_GNULIB_ENABLED_getdtablesize =3D @gl_GNULIB_ENABLED_getdtablesize@ gl_GNULIB_ENABLED_getgroups =3D @gl_GNULIB_ENABLED_getgroups@ @@ -2277,6 +2277,19 @@ EXTRA_libgnu_a_SOURCES +=3D lstat.c endif ## end gnulib module lstat =20 +## begin gnulib module malloc-posix +ifeq (,$(OMIT_GNULIB_MODULE_malloc-posix)) + +ifneq (,$(gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866)) + +endif +EXTRA_DIST +=3D malloc.c + +EXTRA_libgnu_a_SOURCES +=3D malloc.c + +endif +## end gnulib module malloc-posix + ## begin gnulib module memmem-simple ifeq (,$(OMIT_GNULIB_MODULE_memmem-simple)) =20 diff --git a/lib/malloc.c b/lib/malloc.c new file mode 100644 index 0000000000..0d8b3596ca --- /dev/null +++ b/lib/malloc.c @@ -0,0 +1,51 @@ +/* malloc() function that is glibc compatible. + + Copyright (C) 1997-1998, 2006-2007, 2009-2021 Free Software Foundatio= n, Inc. + + This file is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This file is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public Lice= nse + along with this program. If not, see = =2E */ + +/* written by Jim Meyering and Bruno Haible */ + +#define _GL_USE_STDLIB_ALLOC 1 +#include + +#include + +#include + +#include "xalloc-oversized.h" + +/* Allocate an N-byte block of memory from the heap, even if N is 0. */= + +void * +rpl_malloc (size_t n) +{ + if (n =3D=3D 0) + n =3D 1; + + if (xalloc_oversized (n, 1)) + { + errno =3D ENOMEM; + return NULL; + } + + void *result =3D malloc (n); + +#if !HAVE_MALLOC_POSIX + if (result =3D=3D NULL) + errno =3D ENOMEM; +#endif + + return result; +} diff --git a/lib/malloca.c b/lib/malloca.c deleted file mode 100644 index d68d233dcb..0000000000 --- a/lib/malloca.c +++ /dev/null @@ -1,106 +0,0 @@ -/* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2021 Free Software Foundation, - Inc. - Written by Bruno Haible , 2003, 2018. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include - -/* Specification. */ -#include "malloca.h" - -#include "verify.h" - -/* The speed critical point in this file is freea() applied to an alloca= () - result: it must be fast, to match the speed of alloca(). The speed o= f - mmalloca() and freea() in the other case are not critical, because th= ey - are only invoked for big memory sizes. - Here we use a bit in the address as an indicator, an idea by Ond=C5=99= ej B=C3=ADlka. - malloca() can return three types of pointers: - - Pointers =E2=89=A1 0 mod 2*sa_alignment_max come from stack alloc= ation. - - Pointers =E2=89=A1 sa_alignment_max mod 2*sa_alignment_max come f= rom heap - allocation. - - NULL comes from a failed heap allocation. */ - -/* Type for holding very small pointer differences. */ -typedef unsigned char small_t; -/* Verify that it is wide enough. */ -verify (2 * sa_alignment_max - 1 <=3D (small_t) -1); - -void * -mmalloca (size_t n) -{ -#if HAVE_ALLOCA - /* Allocate one more word, used to determine the address to pass to fr= eea(), - and room for the alignment =E2=89=A1 sa_alignment_max mod 2*sa_alig= nment_max. */ - size_t nplus =3D n + sizeof (small_t) + 2 * sa_alignment_max - 1; - - if (nplus >=3D n) - { - char *mem =3D (char *) malloc (nplus); - - if (mem !=3D NULL) - { - char *p =3D - (char *)((((uintptr_t)mem + sizeof (small_t) + sa_alignment_= max - 1) - & ~(uintptr_t)(2 * sa_alignment_max - 1)) - + sa_alignment_max); - /* Here p >=3D mem + sizeof (small_t), - and p <=3D mem + sizeof (small_t) + 2 * sa_alignment_max - = 1 - hence p + n <=3D mem + nplus. - So, the memory range [p, p+n) lies in the allocated memory = range - [mem, mem + nplus). */ - ((small_t *) p)[-1] =3D p - mem; - /* p =E2=89=A1 sa_alignment_max mod 2*sa_alignment_max. */ - return p; - } - } - /* Out of memory. */ - return NULL; -#else -# if !MALLOC_0_IS_NONNULL - if (n =3D=3D 0) - n =3D 1; -# endif - return malloc (n); -#endif -} - -#if HAVE_ALLOCA -void -freea (void *p) -{ - /* Check argument. */ - if ((uintptr_t) p & (sa_alignment_max - 1)) - { - /* p was not the result of a malloca() call. Invalid argument. *= / - abort (); - } - /* Determine whether p was a non-NULL pointer returned by mmalloca(). = */ - if ((uintptr_t) p & sa_alignment_max) - { - void *mem =3D (char *) p - ((small_t *) p)[-1]; - free (mem); - } -} -#endif - -/* - * Hey Emacs! - * Local Variables: - * coding: utf-8 - * End: - */ diff --git a/lib/malloca.h b/lib/malloca.h deleted file mode 100644 index a04e54593f..0000000000 --- a/lib/malloca.h +++ /dev/null @@ -1,123 +0,0 @@ -/* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2021 Free Software Foundation, Inc. - Written by Bruno Haible , 2003. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see .= */ - -#ifndef _MALLOCA_H -#define _MALLOCA_H - -#include -#include -#include -#include - -#include "xalloc-oversized.h" - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call - alloca(N); otherwise it returns NULL. It either returns N bytes of - memory allocated on the stack, that lasts until the function returns,= - or NULL. - Use of safe_alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns. -*/ -#if HAVE_ALLOCA -/* The OS usually guarantees only one guard page at the bottom of the st= ack, - and a page size can be as small as 4096 bytes. So we cannot safely - allocate anything larger than 4096 bytes. Also care for the possibil= ity - of a few compiler-allocated temporary stack slots. - This must be a macro, not a function. */ -# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) -#else -# define safe_alloca(N) ((void) (N), NULL) -#endif - -/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of - memory allocated on the stack, that must be freed using freea() befor= e - the function returns. Upon failure, it returns NULL. */ -#if HAVE_ALLOCA -# define malloca(N) \ - ((N) < 4032 - (2 * sa_alignment_max - 1) = \ - ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max = - 1) \ - + (2 * sa_alignment_max - 1)) = \ - & ~(uintptr_t)(2 * sa_alignment_max - 1)) = \ - : mmalloca (N)) -#else -# define malloca(N) \ - mmalloca (N) -#endif -extern void * mmalloca (size_t n); - -/* Free a block of memory allocated through malloca(). */ -#if HAVE_ALLOCA -extern void freea (void *p); -#else -# define freea free -#endif - -/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). - It allocates an array of N objects, each with S bytes of memory, - on the stack. S must be positive and N must be nonnegative. - The array must be freed using freea() before the function returns. *= / -#define nmalloca(n, s) (xalloc_oversized (n, s) ? NULL : malloca ((n) * = (s))) - - -#ifdef __cplusplus -} -#endif - - -/* ------------------- Auxiliary, non-public definitions ---------------= ---- */ - -/* Determine the alignment of a type at compile time. */ -#if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__ -# define sa_alignof __alignof__ -#elif defined __cplusplus - template struct sa_alignof_helper { char __slot1; type __= slot2; }; -# define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) -#elif defined __hpux - /* Work around a HP-UX 10.20 cc bug with enums constants defined as of= fsetof - values. */ -# define sa_alignof(type) (sizeof (type) <=3D 4 ? 4 : 8) -#elif defined _AIX - /* Work around an AIX 3.2.5 xlc bug with enums constants defined as of= fsetof - values. */ -# define sa_alignof(type) (sizeof (type) <=3D 4 ? 4 : 8) -#else -# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2;= }, __slot2) -#endif - -enum -{ -/* The desired alignment of memory allocations is the maximum alignment - among all elementary types. */ - sa_alignment_long =3D sa_alignof (long), - sa_alignment_double =3D sa_alignof (double), - sa_alignment_longlong =3D sa_alignof (long long), - sa_alignment_longdouble =3D sa_alignof (long double), - sa_alignment_max =3D ((sa_alignment_long - 1) | (sa_alignment_double -= 1) - | (sa_alignment_longlong - 1) - | (sa_alignment_longdouble - 1) - ) + 1 -}; - -#endif /* _MALLOCA_H */ diff --git a/lib/save-cwd.h b/lib/save-cwd.h index e1e69eceaf..3cefba58c0 100644 --- a/lib/save-cwd.h +++ b/lib/save-cwd.h @@ -1,7 +1,7 @@ /* Save and restore current working directory. =20 - Copyright (C) 1995, 1997-1998, 2003, 2009-2021 Free Software - Foundation, Inc. + Copyright (C) 1995, 1997-1998, 2003, 2009-2021 Free Software Foundati= on, + Inc. =20 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/m4/close-stream.m4 b/m4/close-stream.m4 deleted file mode 100644 index feeb4eae5d..0000000000 --- a/m4/close-stream.m4 +++ /dev/null @@ -1,11 +0,0 @@ -#serial 4 -dnl Copyright (C) 2006-2007, 2009-2021 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -dnl Prerequisites of lib/close-stream.c. -AC_DEFUN([gl_CLOSE_STREAM], -[ - : -]) diff --git a/m4/glibc21.m4 b/m4/glibc21.m4 deleted file mode 100644 index 74a781aa1c..0000000000 --- a/m4/glibc21.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2021 Free Software -dnl Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer, or uClibc. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK([whether we are using the GNU C Library >=3D 2.1 or u= Clibc], - [ac_cv_gnu_library_2_1], - [AC_EGREP_CPP([Lucky], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ =3D=3D 2 && __GLIBC_MINOR__ >=3D 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif - ], - [ac_cv_gnu_library_2_1=3Dyes], - [ac_cv_gnu_library_2_1=3Dno]) - ] - ) - AC_SUBST([GLIBC21]) - GLIBC21=3D"$ac_cv_gnu_library_2_1" - ] -) diff --git a/m4/gnulib-comp.m4 b/m4/gnulib-comp.m4 index fa6a0e2d07..dd5bde8d79 100644 --- a/m4/gnulib-comp.m4 +++ b/m4/gnulib-comp.m4 @@ -127,6 +127,7 @@ AC_DEFUN # Code from module libgmp: # Code from module limits-h: # Code from module lstat: + # Code from module malloc-posix: # Code from module manywarnings: # Code from module memmem-simple: # Code from module mempcpy: @@ -582,6 +583,7 @@ AC_DEFUN gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36=3Dfalse gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1=3Dfalse gl_gnulib_enabled_lchmod=3Dfalse + gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=3Dfalse gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31=3Dfalse gl_gnulib_enabled_open=3Dfalse gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7=3Dfalse @@ -673,6 +675,9 @@ AC_DEFUN fi gl_UNISTD_MODULE_INDICATOR([getgroups]) gl_gnulib_enabled_getgroups=3Dtrue + if test $HAVE_GETGROUPS =3D 0 || test $REPLACE_GETGROUPS =3D 1; th= en + func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 + fi fi } func_gl_gnulib_m4code_be453cec5eecf5731a274f2de7f2db36 () @@ -713,6 +718,20 @@ AC_DEFUN gl_gnulib_enabled_lchmod=3Dtrue fi } + func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 () + { + if ! $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866; then + AC_REQUIRE([gl_FUNC_MALLOC_POSIX]) + if test $REPLACE_MALLOC =3D 1; then + AC_LIBOBJ([malloc]) + fi + gl_STDLIB_MODULE_INDICATOR([malloc-posix]) + gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866=3Dtrue + if test $REPLACE_MALLOC =3D 1; then + func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec + fi + fi + } func_gl_gnulib_m4code_5264294aa0a5557541b53c8c741f7f31 () { if ! $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31; then @@ -777,6 +796,9 @@ AC_DEFUN fi gl_STDLIB_MODULE_INDICATOR([realloc-posix]) gl_gnulib_enabled_61bcaca76b3e6f9ae55d57a1c3193bc4=3Dtrue + if test $REPLACE_REALLOC =3D 1; then + func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 + fi if test $REPLACE_REALLOC =3D 1; then func_gl_gnulib_m4code_682e609604ccaac6be382e4ee3a4eaec fi @@ -793,6 +815,7 @@ AC_DEFUN if ! $gl_gnulib_enabled_scratch_buffer; then AC_PROG_MKDIR_P gl_gnulib_enabled_scratch_buffer=3Dtrue + func_gl_gnulib_m4code_ef455225c00f5049c808c2eda3e76866 func_gl_gnulib_m4code_61bcaca76b3e6f9ae55d57a1c3193bc4 fi } @@ -911,6 +934,7 @@ AC_DEFUN AM_CONDITIONAL([gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36], [= $gl_gnulib_enabled_be453cec5eecf5731a274f2de7f2db36]) AM_CONDITIONAL([gl_GNULIB_ENABLED_a9786850e999ae65a836a6041e8e5ed1], [= $gl_gnulib_enabled_a9786850e999ae65a836a6041e8e5ed1]) AM_CONDITIONAL([gl_GNULIB_ENABLED_lchmod], [$gl_gnulib_enabled_lchmod]= ) + AM_CONDITIONAL([gl_GNULIB_ENABLED_ef455225c00f5049c808c2eda3e76866], [= $gl_gnulib_enabled_ef455225c00f5049c808c2eda3e76866]) AM_CONDITIONAL([gl_GNULIB_ENABLED_5264294aa0a5557541b53c8c741f7f31], [= $gl_gnulib_enabled_5264294aa0a5557541b53c8c741f7f31]) AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open]) AM_CONDITIONAL([gl_GNULIB_ENABLED_03e0aaad4cb89ca757653bd367a6ccb7], [= $gl_gnulib_enabled_03e0aaad4cb89ca757653bd367a6ccb7]) @@ -1170,6 +1194,7 @@ AC_DEFUN lib/libc-config.h lib/limits.in.h lib/lstat.c + lib/malloc.c lib/malloc/dynarray-skeleton.c lib/malloc/dynarray.h lib/malloc/dynarray_at_failure.c diff --git a/m4/malloca.m4 b/m4/malloca.m4 deleted file mode 100644 index 7ee33773d2..0000000000 --- a/m4/malloca.m4 +++ /dev/null @@ -1,14 +0,0 @@ -# malloca.m4 serial 2 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2021 Free Software -dnl Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MALLOCA], -[ - dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variab= les - dnl @ALLOCA@ and @LTALLOCA@. - dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies= =2E - AC_REQUIRE([gl_EEMALLOC]) -]) --=20 2.31.1 --------------E4BEEE2CBC36A509D278BC92 Content-Type: text/x-patch; charset=UTF-8; name="0004-Port-recent-Gnulib-changes-to-MS-Windows.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0004-Port-recent-Gnulib-changes-to-MS-Windows.patch" =46rom 4f8392f633cbd3b978c05b972983cfef82be4e7b Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 24 Jul 2021 16:11:16 -0700 Subject: [PATCH 4/4] Port recent Gnulib changes to MS-Windows MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_free-posix) (OMIT_GNULIB_MODULE_malloc-posix) (OMIT_GNULIB_MODULE_realloc-gnu) (OMIT_GNULIB_MODULE_realloc-posix): New macros, since we don=E2=80=99t want these modules on MS-Windows. * src/w32heap.c (heap_alloc, heap_realloc): New functions. (malloc_after_dump, realloc_after_dump, realloc_before_dump): Use them. --- nt/gnulib-cfg.mk | 4 ++++ src/w32heap.c | 42 ++++++++++++++++++++++++++---------------- 2 files changed, 30 insertions(+), 16 deletions(-) diff --git a/nt/gnulib-cfg.mk b/nt/gnulib-cfg.mk index c85b9150f0..f1f4c4c279 100644 --- a/nt/gnulib-cfg.mk +++ b/nt/gnulib-cfg.mk @@ -49,10 +49,14 @@ OMIT_GNULIB_MODULE_dirent =3D OMIT_GNULIB_MODULE_dirfd =3D true OMIT_GNULIB_MODULE_fcntl =3D true OMIT_GNULIB_MODULE_fcntl-h =3D true +OMIT_GNULIB_MODULE_free-posix =3D true OMIT_GNULIB_MODULE_fsusage =3D true OMIT_GNULIB_MODULE_inttypes-incomplete =3D true +OMIT_GNULIB_MODULE_malloc-posix =3D true OMIT_GNULIB_MODULE_open =3D true OMIT_GNULIB_MODULE_pipe2 =3D true +OMIT_GNULIB_MODULE_realloc-gnu =3D true +OMIT_GNULIB_MODULE_realloc-posix =3D true OMIT_GNULIB_MODULE_secure_getenv =3D true OMIT_GNULIB_MODULE_signal-h =3D true OMIT_GNULIB_MODULE_stdio =3D true diff --git a/src/w32heap.c b/src/w32heap.c index 0f228bfb22..a0d4c070be 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -189,6 +189,26 @@ #define MAX_BLOCKS 0x40 realloc_fn the_realloc_fn; free_fn the_free_fn; =20 +static void * +heap_alloc (size_t size) +{ + void *p =3D size <=3D PTRDIFF_MAX ? HeapAlloc (heap, 0, size | !size) = : NULL; + if (!p) + errno =3D ENOMEM; + return p; +} + +static void * +heap_realloc (void *ptr, size_t size) +{ + void *p =3D (size <=3D PTRDIFF_MAX + ? HeapReAlloc (heap, 0, ptr, size | !size) + : NULL); + if (!p) + errno =3D ENOMEM; + return p; +} + /* It doesn't seem to be useful to allocate from a file mapping. It would be if the memory was shared. https://stackoverflow.com/questions/307060/what-is-the-purpose-of-a= llocating-pages-in-the-pagefile-with-createfilemapping */ @@ -346,7 +366,7 @@ #define FREEABLE_P(addr) \ malloc_after_dump (size_t size) { /* Use the new private heap. */ - void *p =3D HeapAlloc (heap, 0, size); + void *p =3D heap_alloc (size); =20 /* After dump, keep track of the "brk value" for sbrk(0). */ if (p) @@ -356,8 +376,6 @@ malloc_after_dump (size_t size) if (new_brk > data_region_end) data_region_end =3D new_brk; } - else - errno =3D ENOMEM; return p; } =20 @@ -373,9 +391,7 @@ malloc_before_dump (size_t size) if (size < MaxBlockSize) { /* Use the private heap if possible. */ - p =3D HeapAlloc (heap, 0, size); - if (!p) - errno =3D ENOMEM; + p =3D heap_alloc (size); } else { @@ -433,18 +449,14 @@ realloc_after_dump (void *ptr, size_t size) if (FREEABLE_P (ptr)) { /* Reallocate the block since it lies in the new heap. */ - p =3D HeapReAlloc (heap, 0, ptr, size); - if (!p) - errno =3D ENOMEM; + p =3D heap_realloc (ptr, size); } else { /* If the block lies in the dumped data, do not free it. Only allocate a new one. */ - p =3D HeapAlloc (heap, 0, size); - if (!p) - errno =3D ENOMEM; - else if (ptr) + p =3D heap_alloc (size); + if (p && ptr) CopyMemory (p, ptr, size); } /* After dump, keep track of the "brk value" for sbrk(0). */ @@ -467,9 +479,7 @@ realloc_before_dump (void *ptr, size_t size) if (dumped_data < (unsigned char *)ptr && (unsigned char *)ptr < bc_limit && size <=3D MaxBlockSize) { - p =3D HeapReAlloc (heap, 0, ptr, size); - if (!p) - errno =3D ENOMEM; + p =3D heap_realloc (ptr, size); } else { --=20 2.31.1 --------------E4BEEE2CBC36A509D278BC92-- From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 06:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 33847@debbugs.gnu.org, larsi@gnus.org, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162719477430975 (code B ref 33847); Sun, 25 Jul 2021 06:33:01 +0000 Received: (at 33847) by debbugs.gnu.org; 25 Jul 2021 06:32:54 +0000 Received: from localhost ([127.0.0.1]:47394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7Xgz-00083W-KN for submit@debbugs.gnu.org; Sun, 25 Jul 2021 02:32:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7Xgx-00083J-SW for 33847@debbugs.gnu.org; Sun, 25 Jul 2021 02:32:53 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60228) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7Xgr-0004MN-RO; Sun, 25 Jul 2021 02:32:45 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4238 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7Xgr-0005mw-F9; Sun, 25 Jul 2021 02:32:45 -0400 Date: Sun, 25 Jul 2021 09:32:32 +0300 Message-Id: <83a6maykcf.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> (message from Paul Eggert on Sat, 24 Jul 2021 16:31:21 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> <83v950yv7i.fsf@gnu.org> <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: larsi@gnus.org, teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org > From: Paul Eggert > Date: Sat, 24 Jul 2021 16:31:21 -0700 > > In looking into this, I noticed that our current approach has another > problem, because admin/merge-gnulib avoids Gnulib's malloc-posix module > so that the Emacs build procedure need not worry about Gnulib's malloc > interposition on MS-Windows. However, Gnulib relies on the POSIX malloc > spec in its own use of malloc, so malloc-posix should be present in > Emacs; this is for the benefit of some platforms that are neither GNU > nor MS-Windows. > > What we should do is (A) have the Emacs tarball contain whatever Gnulib > memory-allocation modules Gnulib needs, (B) arrange for Gnulib's > memory-allocation modules to be inactive on MS-Windows, and (C) arrange > for Emacs's private implementation of malloc/realloc/free to be > GNU-compatible. Right. > Proposed patches attached to do all this. Patch 4/4 is the one needing > most scrutiny, since it involves MS-Windows which I don't use. Thanks, will review that shortly. > > Can you tell which Gnulib modules are affected by the new > > "--disable-year2038" option? > > No modules are affected by the --disable-year2038 option on MS-Windows. > > The --disable-year2038 option has an effect only on 32-bit GNU/Linux x86 > and ARM (glibc 2.34 and later). On these platforms, the option affects a > good many Gnulib modules as well as Emacs source code directly. This is > because the option affects anything that gets or sets a timestamp from > the OS. 'stat' syscalls, for example. > > As I understand it, MS-Windows switched to 64-bit time_t back in 2005 > (even on 32-bit platforms), and nowadays you have to explicitly request > 32-bit time_t (does anybody do that when building Emacs? I hope not). This is only mostly correct. It is true that MS-Windows switched to 64-bit time_t as the preferred method some time ago even on 32-bit versions of Windows. But to build an Emacs that will run on versions of Windows before the switch, which means all versions before XP, you _must_ compile with 32-bit time_t, because those older platforms simply don't have the 64-bit time_t variants of relevant libc functions in their C runtime DLL, so Emacs using 64-bit time_t will refuse to start on them. And since we still try to support those older systems, the 32-bit build of Emacs on Windows does use 32-bit time_t -- if it is built with mingw.org's MinGW (where time_t is a 32-bit type by default, so no need for any specific requests), because MinGW64 tossed the support for those older versions long ago, and thus even its 32-bit versions cannot be used to build an Emacs which will run on anything before Vista. > The --disable-year2038 option does not have any effect on MS-Windows, > because nobody has bothered to add support for that option on that > platform and I expect and hope that nobody ever will. So therefore my question seems to be even more important than I thought, and I'm still asking which Gnulib modules are affected by this, because I'd need to audit them carefully to see whether the 32-bit MS-Windows build with mingw.org's MinGW could be affected. Can you show the list of those modules (out of those which Emacs imports), so I could take a look at them? > Any Emacs executables built with the --disable-year2038 option on > GNU/Linux x86 or ARM will of course stop working after 2038, so it's not > an option I recommend. That's 17 years in the future, so it will be a real concern in about 15 years, I'd say. let's talk then ;-) Thanks. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 07:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 33847@debbugs.gnu.org, larsi@gnus.org, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.162719809012049 (code B ref 33847); Sun, 25 Jul 2021 07:29:02 +0000 Received: (at 33847) by debbugs.gnu.org; 25 Jul 2021 07:28:10 +0000 Received: from localhost ([127.0.0.1]:47465 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7YYP-00038D-Rm for submit@debbugs.gnu.org; Sun, 25 Jul 2021 03:28:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7YYN-00037h-Jk for 33847@debbugs.gnu.org; Sun, 25 Jul 2021 03:28:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60952) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7YYH-0000fX-Jm; Sun, 25 Jul 2021 03:27:57 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3730 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7YYH-0000zp-42; Sun, 25 Jul 2021 03:27:57 -0400 Date: Sun, 25 Jul 2021 10:27:43 +0300 Message-Id: <834kciyhsg.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> (message from Paul Eggert on Sat, 24 Jul 2021 16:31:21 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <27d2f2eb-8956-4088-f3ec-5ff6c2cf2e8f@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> <83v950yv7i.fsf@gnu.org> <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Cc: larsi@gnus.org, teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org > From: Paul Eggert > Date: Sat, 24 Jul 2021 16:31:21 -0700 > > From 4f8392f633cbd3b978c05b972983cfef82be4e7b Mon Sep 17 00:00:00 2001 > From: Paul Eggert > Date: Sat, 24 Jul 2021 16:11:16 -0700 > Subject: [PATCH 4/4] Port recent Gnulib changes to MS-Windows > MIME-Version: 1.0 > Content-Type: text/plain; charset=UTF-8 > Content-Transfer-Encoding: 8bit > > * nt/gnulib-cfg.mk (OMIT_GNULIB_MODULE_free-posix) > (OMIT_GNULIB_MODULE_malloc-posix) > (OMIT_GNULIB_MODULE_realloc-gnu) > (OMIT_GNULIB_MODULE_realloc-posix): > New macros, since we don’t want these modules on MS-Windows. > * src/w32heap.c (heap_alloc, heap_realloc): New functions. > (malloc_after_dump, realloc_after_dump, realloc_before_dump): > Use them. Thanks, this LGTM, but I have one minor request: > +static void * > +heap_alloc (size_t size) > +{ > + void *p = size <= PTRDIFF_MAX ? HeapAlloc (heap, 0, size | !size) : NULL; Please add a comment here to explain the rationale for the "size | !size" trick. > +static void * > +heap_realloc (void *ptr, size_t size) > +{ > + void *p = (size <= PTRDIFF_MAX > + ? HeapReAlloc (heap, 0, ptr, size | !size) Likewise here. Btw, HeapAlloc does return a non-NULL pointer if SIZE is zero, so I'm not sure the protection is needed. But it cannot hurt. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33847@debbugs.gnu.org, larsi@gnus.org, Gnulib bugs , teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.16272301371484 (code B ref 33847); Sun, 25 Jul 2021 16:23:02 +0000 Received: (at 33847) by debbugs.gnu.org; 25 Jul 2021 16:22:17 +0000 Received: from localhost ([127.0.0.1]:49252 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7gtN-0000Ns-Iv for submit@debbugs.gnu.org; Sun, 25 Jul 2021 12:22:17 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:45492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7gtJ-0000Nd-Ty for 33847@debbugs.gnu.org; Sun, 25 Jul 2021 12:22:16 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 543D11600C3; Sun, 25 Jul 2021 09:22:08 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8h88TGD9GaGo; Sun, 25 Jul 2021 09:22:07 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 4DAAD1600DB; Sun, 25 Jul 2021 09:22:07 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id alqqPcWoxHIB; Sun, 25 Jul 2021 09:22:07 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 18A211600C3; Sun, 25 Jul 2021 09:22:07 -0700 (PDT) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> <83v950yv7i.fsf@gnu.org> <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> <83a6maykcf.fsf@gnu.org> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: Date: Sun, 25 Jul 2021 09:22:06 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <83a6maykcf.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) On 7/24/21 11:32 PM, Eli Zaretskii wrote: >> No modules are affected by the --disable-year2038 option on MS-Windows= . It turns out that I was wrong about that. (I don't normally look at the=20 MS-Windows part of Gnulib and misunderstood some of the code I was=20 reading.) Please see gnulib/m4/year2038.m4 for details. This file is in=20 the patches I sent, or you can see it directly here: https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/year2038.m4 This code knows about MS-Windows, Mingw, _USE_32BIT_TIME_T,=20 __MINGW_USE_VC2005_COMPAT, and so forth, and attempts to do the right=20 thing. As near as I can make out it should work for the scenario you=20 describe, but I don't use MS-Windows so I could well be wrong. If I'm=20 wrong and this code doesn't do what you want, I suggest contacting=20 bug-gnulib to alert Bruno Haible, who wrote that part of the code. I'll=20 cc bug-gnulib so that Bruno sees this email. (Bruno, this discussion is=20 at .) Here's some more background. There are two Gnulib modules involved. The largefile module ensures that a program can open/stat/etc. all=20 files, by widening types like off_t, dev_t and time_t if necessary. If=20 it finds that time_t is narrower than what the system can support, it=20 attempts to widen time_t; if this attempt fails it issues a warning but=20 continues. The year2038 module is stricter: it insists that time_t be at least 64=20 bits and aborts 'configure' otherwise. (Strictly speaking, it should=20 insist only on at least 33 bits (or 32 bits unsigned); I suppose I=20 should look into fixing that.) The Emacs patches that I sent do not use the year2038 module, because I=20 expected that you wouldn't want to worry about the year 2038. The=20 year2038 module is used by GNU packages like coreutils where Y2038 is a=20 problem even now, due to the long lead times and lack of updatability on=20 systems that use these other GNU packages. > So therefore my question seems to be even more important than I > thought, and I'm still asking which Gnulib modules are affected by > this, because I'd need to audit them carefully to see whether the > 32-bit MS-Windows build with mingw.org's MinGW could be affected. There should be no need to audit, because Gnulib still supports=20 platforms that have only 32-bit time_t. Gnulib is agnostic about time_t width, and is supposed to work even if=20 time_t is 40 bits (which it is on a very few mainframes) or any other=20 width. We regularly test it only on 32- and 64-bit time_t, though. From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 25 Jul 2021 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Paul Eggert Cc: 33847@debbugs.gnu.org, larsi@gnus.org, bug-gnulib@gnu.org, teika@gmx.com, ulm@gentoo.org Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.16272309092710 (code B ref 33847); Sun, 25 Jul 2021 16:36:02 +0000 Received: (at 33847) by debbugs.gnu.org; 25 Jul 2021 16:35:09 +0000 Received: from localhost ([127.0.0.1]:49265 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7h5m-0000ha-6j for submit@debbugs.gnu.org; Sun, 25 Jul 2021 12:35:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m7h5j-0000h1-Dz for 33847@debbugs.gnu.org; Sun, 25 Jul 2021 12:35:04 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41668) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m7h5d-0002bq-Bi; Sun, 25 Jul 2021 12:34:57 -0400 Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1851 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m7h5c-00071c-Vl; Sun, 25 Jul 2021 12:34:57 -0400 Date: Sun, 25 Jul 2021 19:34:47 +0300 Message-Id: <83bl6qwdw8.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Paul Eggert on Sun, 25 Jul 2021 09:22:06 -0700) References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> <83v950yv7i.fsf@gnu.org> <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> <83a6maykcf.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Cc: larsi@gnus.org, teika@gmx.com, 33847@debbugs.gnu.org, ulm@gentoo.org, > Gnulib bugs > From: Paul Eggert > Date: Sun, 25 Jul 2021 09:22:06 -0700 > > On 7/24/21 11:32 PM, Eli Zaretskii wrote: > > >> No modules are affected by the --disable-year2038 option on MS-Windows. > > It turns out that I was wrong about that. (I don't normally look at the > MS-Windows part of Gnulib and misunderstood some of the code I was > reading.) Please see gnulib/m4/year2038.m4 for details. This file is in > the patches I sent, or you can see it directly here: > > https://git.savannah.gnu.org/cgit/gnulib.git/tree/m4/year2038.m4 > > This code knows about MS-Windows, Mingw, _USE_32BIT_TIME_T, > __MINGW_USE_VC2005_COMPAT, and so forth, and attempts to do the right > thing. As near as I can make out it should work for the scenario you > describe, but I don't use MS-Windows so I could well be wrong. If I'm > wrong and this code doesn't do what you want, I suggest contacting > bug-gnulib to alert Bruno Haible, who wrote that part of the code. I'll > cc bug-gnulib so that Bruno sees this email. (Bruno, this discussion is > at .) Thanks, I will take a look, although I now understand it isn't urgent, since Emacs doesn't (yet) use the year2038 module. > > So therefore my question seems to be even more important than I > > thought, and I'm still asking which Gnulib modules are affected by > > this, because I'd need to audit them carefully to see whether the > > 32-bit MS-Windows build with mingw.org's MinGW could be affected. > > There should be no need to audit, because Gnulib still supports > platforms that have only 32-bit time_t. > > Gnulib is agnostic about time_t width, and is supposed to work even if > time_t is 40 bits (which it is on a very few mainframes) or any other > width. We regularly test it only on 32- and 64-bit time_t, though. Thanks, that's good to know. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 04 02:38:44 2021 Received: (at control) by debbugs.gnu.org; 4 Oct 2021 06:38:44 +0000 Received: from localhost ([127.0.0.1]:35451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXHca-0002sB-4K for submit@debbugs.gnu.org; Mon, 04 Oct 2021 02:38:44 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43236) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXHcW-0002rf-9c for control@debbugs.gnu.org; Mon, 04 Oct 2021 02:38:41 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id EE28C160068 for ; Sun, 3 Oct 2021 23:38:34 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id Ur7u35e9dhp4 for ; Sun, 3 Oct 2021 23:38:34 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 62A9A1600DD for ; Sun, 3 Oct 2021 23:38:34 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id zbTccYTM29uL for ; Sun, 3 Oct 2021 23:38:34 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 462B3160068 for ; Sun, 3 Oct 2021 23:38:34 -0700 (PDT) To: control@debbugs.gnu.org From: Paul Eggert Subject: unarchive 33847 Organization: UCLA Computer Science Department Message-ID: Date: Sun, 3 Oct 2021 23:38:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) unarchive 33847 From unknown Sat Jun 14 05:16:24 2025 X-Loop: help-debbugs@gnu.org Subject: bug#33847: 27.0.50; emacsclient does not find server socket Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 04 Oct 2021 06:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Eli Zaretskii Cc: 33847@debbugs.gnu.org, Gnulib bugs , ulm@gentoo.org, Stefan Kangas , larsi@gnus.org, teika@gmx.com Received: via spool by 33847-submit@debbugs.gnu.org id=B33847.163332992713297 (code B ref 33847); Mon, 04 Oct 2021 06:46:02 +0000 Received: (at 33847) by debbugs.gnu.org; 4 Oct 2021 06:45:27 +0000 Received: from localhost ([127.0.0.1]:35461 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXHj5-0003S7-8X for submit@debbugs.gnu.org; Mon, 04 Oct 2021 02:45:27 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mXHj3-0003Ks-6J for 33847@debbugs.gnu.org; Mon, 04 Oct 2021 02:45:25 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id B9548160068; Sun, 3 Oct 2021 23:45:19 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id YC7Pdroxn7t4; Sun, 3 Oct 2021 23:45:18 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DD1AB1600DD; Sun, 3 Oct 2021 23:45:18 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id MDx7hEXmFdjY; Sun, 3 Oct 2021 23:45:18 -0700 (PDT) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AABD4160068; Sun, 3 Oct 2021 23:45:18 -0700 (PDT) From: Paul Eggert References: <8a6fc59c-08b3-e274-4fb1-74674c79540a@cs.ucla.edu> <87eeo27v6k.fsf@gnus.org> <83lfi79klf.fsf@gnu.org> <831rjya5yy.fsf@gnu.org> <8333533f-08ec-acd4-2fbf-f06e78591e98@cs.ucla.edu> <83v9h99awv.fsf@gnu.org> <878s1yjy20.fsf@gnus.org> <83lf5y2t78.fsf@gnu.org> <878s1yi8jc.fsf@gnus.org> <83h7gm2r4j.fsf@gnu.org> <87wnphe06g.fsf@gnus.org> <87r1fpdzuy.fsf@gnus.org> <838s1w1b7x.fsf@gnu.org> <5f457b50-c1bd-4856-33c7-f85edf111bd0@cs.ucla.edu> <83v950yv7i.fsf@gnu.org> <5d2f6394-2fc0-e20a-9018-0ea59f399ba2@cs.ucla.edu> <83a6maykcf.fsf@gnu.org> Organization: UCLA Computer Science Department Message-ID: <3bed4e3f-2a55-e33b-bb28-c4e0806960a1@cs.ucla.edu> Date: Sun, 3 Oct 2021 23:45:18 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.4 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.4 (---) I finally got around to installing into the emacs-28 branch the=20 emacsclient.c patch that was the first patch in my July 24 email,=20 archived here: https://debbugs.gnu.org/33847#161 I reworked that email's remaining patches (which updated from Gnulib),=20 and today posted the reworked versions into a later bug report, here: https://debbugs.gnu.org/50985#11 and I plan to follow up in that bug report.