From 7973e3623cabf9d1c5be71d6dc3be7aeed042f22 Mon Sep 17 00:00:00 2001 From: Roddy Rappaport Date: Fri, 6 Dec 2024 00:43:33 +0200 Subject: [PATCH 1/5] Modified freeze_modules to accept recursive modules with pyfile The pyfile that is specified in the module metadata wasn't allowed to be a folder. This is a problem to us, as the gdb module is not a single python file. These modifications allow people to add pyfile recursive dirs from non-Lib locations. Also modified deep_freeze.py to accept surrogates in text it receives. Not sure why it received surrogates though, something from pygments. --- Tools/build/deepfreeze.py | 2 +- Tools/build/freeze_modules.py | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Tools/build/deepfreeze.py b/Tools/build/deepfreeze.py index a11fe6a62811ab..f6fe57c4ec77e2 100644 --- a/Tools/build/deepfreeze.py +++ b/Tools/build/deepfreeze.py @@ -222,7 +222,7 @@ def generate_unicode(self, name: str, s: str) -> str: self.write(".compact = 1,") self.write(".ascii = 0,") self.write(".statically_allocated = 1,") - utf8 = s.encode('utf-8') + utf8 = s.encode('utf-8', 'surrogatepass') self.write(f'.utf8 = {make_string_literal(utf8)},') self.write(f'.utf8_length = {len(utf8)},') with self.block(f"._data =", ","): diff --git a/Tools/build/freeze_modules.py b/Tools/build/freeze_modules.py index 8b6e2c728a9b14..08cc3b5a13288c 100644 --- a/Tools/build/freeze_modules.py +++ b/Tools/build/freeze_modules.py @@ -321,11 +321,10 @@ def _parse_spec(spec, knownids=None, section=None): else: pyfile = _resolve_module(frozenid, ispkg=False) ispkg = True - elif pyfile: + elif pyfile and not os.path.isdir(pyfile): assert check_modname(frozenid), spec assert not knownids or frozenid not in knownids, spec assert check_modname(modname), spec - assert not os.path.isdir(pyfile), spec ispkg = False elif knownids and frozenid in knownids: assert check_modname(frozenid), spec @@ -333,7 +332,7 @@ def _parse_spec(spec, knownids=None, section=None): ispkg = False else: assert not modname or check_modname(modname), spec - resolved = iter(resolve_modules(frozenid)) + resolved = iter(resolve_modules(frozenid, pyfile if os.path.isdir(pyfile) else None)) frozenid, pyfile, ispkg = next(resolved) if not modname: modname = frozenid From b7a73140844ea30a05ab25203c740cdc67f6cc19 Mon Sep 17 00:00:00 2001 From: Roddy Rappaport Date: Fri, 6 Dec 2024 00:52:55 +0200 Subject: [PATCH 2/5] Moved GDB to external module --- Lib/gdb/FrameDecorator.py | 336 ----------- Lib/gdb/FrameIterator.py | 43 -- Lib/gdb/__init__.py | 310 ---------- Lib/gdb/command/__init__.py | 14 - Lib/gdb/command/explore.py | 784 ------------------------- Lib/gdb/command/frame_filters.py | 476 --------------- Lib/gdb/command/missing_debug.py | 227 ------- Lib/gdb/command/pretty_printers.py | 396 ------------- Lib/gdb/command/prompt.py | 65 -- Lib/gdb/command/type_printers.py | 126 ---- Lib/gdb/command/unwinders.py | 200 ------- Lib/gdb/command/xmethods.py | 271 --------- Lib/gdb/dap/__init__.py | 96 --- Lib/gdb/dap/breakpoint.py | 443 -------------- Lib/gdb/dap/bt.py | 149 ----- Lib/gdb/dap/disassemble.py | 96 --- Lib/gdb/dap/evaluate.py | 138 ----- Lib/gdb/dap/events.py | 287 --------- Lib/gdb/dap/frames.py | 149 ----- Lib/gdb/dap/io.py | 82 --- Lib/gdb/dap/launch.py | 82 --- Lib/gdb/dap/locations.py | 43 -- Lib/gdb/dap/memory.py | 43 -- Lib/gdb/dap/modules.py | 61 -- Lib/gdb/dap/next.py | 91 --- Lib/gdb/dap/pause.py | 22 - Lib/gdb/dap/scopes.py | 164 ------ Lib/gdb/dap/server.py | 515 ---------------- Lib/gdb/dap/sources.py | 105 ---- Lib/gdb/dap/startup.py | 216 ------- Lib/gdb/dap/state.py | 25 - Lib/gdb/dap/threads.py | 42 -- Lib/gdb/dap/typecheck.py | 88 --- Lib/gdb/dap/varref.py | 276 --------- Lib/gdb/disassembler.py | 173 ------ Lib/gdb/frames.py | 273 --------- Lib/gdb/function/__init__.py | 14 - Lib/gdb/function/as_string.py | 38 -- Lib/gdb/function/caller_is.py | 158 ----- Lib/gdb/function/strfns.py | 105 ---- Lib/gdb/missing_debug.py | 185 ------ Lib/gdb/printer/__init__.py | 14 - Lib/gdb/printer/bound_registers.py | 39 -- Lib/gdb/printing.py | 403 ------------- Lib/gdb/prompt.py | 164 ------ Lib/gdb/styling.py | 101 ---- Lib/gdb/types.py | 183 ------ Lib/gdb/unwinder.py | 140 ----- Lib/gdb/xmethod.py | 274 --------- Makefile.pre.in | 294 ---------- PCbuild/_freeze_module.vcxproj | 294 ---------- PCbuild/_freeze_module.vcxproj.filters | 147 ----- Python/frozen.c | 157 ----- Tools/build/freeze_modules.py | 6 +- 54 files changed, 4 insertions(+), 9619 deletions(-) delete mode 100644 Lib/gdb/FrameDecorator.py delete mode 100644 Lib/gdb/FrameIterator.py delete mode 100644 Lib/gdb/__init__.py delete mode 100644 Lib/gdb/command/__init__.py delete mode 100644 Lib/gdb/command/explore.py delete mode 100644 Lib/gdb/command/frame_filters.py delete mode 100644 Lib/gdb/command/missing_debug.py delete mode 100644 Lib/gdb/command/pretty_printers.py delete mode 100644 Lib/gdb/command/prompt.py delete mode 100644 Lib/gdb/command/type_printers.py delete mode 100644 Lib/gdb/command/unwinders.py delete mode 100644 Lib/gdb/command/xmethods.py delete mode 100644 Lib/gdb/dap/__init__.py delete mode 100644 Lib/gdb/dap/breakpoint.py delete mode 100644 Lib/gdb/dap/bt.py delete mode 100644 Lib/gdb/dap/disassemble.py delete mode 100644 Lib/gdb/dap/evaluate.py delete mode 100644 Lib/gdb/dap/events.py delete mode 100644 Lib/gdb/dap/frames.py delete mode 100644 Lib/gdb/dap/io.py delete mode 100644 Lib/gdb/dap/launch.py delete mode 100644 Lib/gdb/dap/locations.py delete mode 100644 Lib/gdb/dap/memory.py delete mode 100644 Lib/gdb/dap/modules.py delete mode 100644 Lib/gdb/dap/next.py delete mode 100644 Lib/gdb/dap/pause.py delete mode 100644 Lib/gdb/dap/scopes.py delete mode 100644 Lib/gdb/dap/server.py delete mode 100644 Lib/gdb/dap/sources.py delete mode 100644 Lib/gdb/dap/startup.py delete mode 100644 Lib/gdb/dap/state.py delete mode 100644 Lib/gdb/dap/threads.py delete mode 100644 Lib/gdb/dap/typecheck.py delete mode 100644 Lib/gdb/dap/varref.py delete mode 100644 Lib/gdb/disassembler.py delete mode 100644 Lib/gdb/frames.py delete mode 100644 Lib/gdb/function/__init__.py delete mode 100644 Lib/gdb/function/as_string.py delete mode 100644 Lib/gdb/function/caller_is.py delete mode 100644 Lib/gdb/function/strfns.py delete mode 100644 Lib/gdb/missing_debug.py delete mode 100644 Lib/gdb/printer/__init__.py delete mode 100644 Lib/gdb/printer/bound_registers.py delete mode 100644 Lib/gdb/printing.py delete mode 100644 Lib/gdb/prompt.py delete mode 100644 Lib/gdb/styling.py delete mode 100644 Lib/gdb/types.py delete mode 100644 Lib/gdb/unwinder.py delete mode 100644 Lib/gdb/xmethod.py diff --git a/Lib/gdb/FrameDecorator.py b/Lib/gdb/FrameDecorator.py deleted file mode 100644 index 82412de13f96c8..00000000000000 --- a/Lib/gdb/FrameDecorator.py +++ /dev/null @@ -1,336 +0,0 @@ -# Copyright (C) 2013-2024 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 . - -import gdb - - -class _FrameDecoratorBase(object): - """Base class of frame decorators.""" - - # 'base' can refer to a gdb.Frame or another frame decorator. In - # the latter case, the child class will have called the super - # method and _base will be an object conforming to the Frame Filter - # class. - def __init__(self, base): - self._base = base - - @staticmethod - def __is_limited_frame(frame): - """Internal utility to determine if the frame is special or - limited.""" - sal = frame.find_sal() - - if ( - not sal.symtab - or not sal.symtab.filename - or frame.type() == gdb.DUMMY_FRAME - or frame.type() == gdb.SIGTRAMP_FRAME - ): - return True - - return False - - def elided(self): - """Return any elided frames that this class might be - wrapping, or None.""" - if hasattr(self._base, "elided"): - return self._base.elided() - - return None - - def function(self): - """Return the name of the frame's function or an address of - the function of the frame. First determine if this is a - special frame. If not, try to determine filename from GDB's - frame internal function API. Finally, if a name cannot be - determined return the address. If this function returns an - address, GDB will attempt to determine the function name from - its internal minimal symbols store (for example, for inferiors - without debug-info).""" - - # Both gdb.Frame, and FrameDecorator have a method called - # "function", so determine which object this is. - if not isinstance(self._base, gdb.Frame): - if hasattr(self._base, "function"): - # If it is not a gdb.Frame, and there is already a - # "function" method, use that. - return self._base.function() - - frame = self.inferior_frame() - - if frame.type() == gdb.DUMMY_FRAME: - return "" - elif frame.type() == gdb.SIGTRAMP_FRAME: - return "" - - func = frame.name() - if not isinstance(func, str): - func = "???" - return func - - def address(self): - """Return the address of the frame's pc""" - - if hasattr(self._base, "address"): - return self._base.address() - - frame = self.inferior_frame() - return frame.pc() - - def frame_args(self): - """Return an iterable of frame arguments for this frame, if - any. The iterable object contains objects conforming with the - Symbol/Value interface. If there are no frame arguments, or - if this frame is deemed to be a special case, return None.""" - - if hasattr(self._base, "frame_args"): - return self._base.frame_args() - - frame = self.inferior_frame() - if self.__is_limited_frame(frame): - return None - - args = FrameVars(frame) - return args.fetch_frame_args() - - def frame_locals(self): - """Return an iterable of local variables for this frame, if - any. The iterable object contains objects conforming with the - Symbol/Value interface. If there are no frame locals, or if - this frame is deemed to be a special case, return None.""" - - if hasattr(self._base, "frame_locals"): - return self._base.frame_locals() - - frame = self.inferior_frame() - if self.__is_limited_frame(frame): - return None - - args = FrameVars(frame) - return args.fetch_frame_locals() - - def line(self): - """Return line number information associated with the frame's - pc. If symbol table/line information does not exist, or if - this frame is deemed to be a special case, return None""" - - if hasattr(self._base, "line"): - return self._base.line() - - frame = self.inferior_frame() - if self.__is_limited_frame(frame): - return None - - sal = frame.find_sal() - if sal: - return sal.line - else: - return None - - def inferior_frame(self): - """Return the gdb.Frame underpinning this frame decorator.""" - - # If 'base' is a frame decorator, we want to call its inferior - # frame method. If '_base' is a gdb.Frame, just return that. - if hasattr(self._base, "inferior_frame"): - return self._base.inferior_frame() - return self._base - - -class FrameDecorator(_FrameDecoratorBase): - """Basic implementation of a Frame Decorator - - This base frame decorator decorates a frame or another frame - decorator, and provides convenience methods. If this object is - wrapping a frame decorator, defer to that wrapped object's method - if it has one. This allows for frame decorators that have - sub-classed FrameDecorator object, but also wrap other frame - decorators on the same frame to correctly execute. - - E.g - - If the result of frame filters running means we have one gdb.Frame - wrapped by multiple frame decorators, all sub-classed from - FrameDecorator, the resulting hierarchy will be: - - Decorator1 - -- (wraps) Decorator2 - -- (wraps) FrameDecorator - -- (wraps) gdb.Frame - - In this case we have two frame decorators, both of which are - sub-classed from FrameDecorator. If Decorator1 just overrides the - 'function' method, then all of the other methods are carried out - by the super-class FrameDecorator. But Decorator2 may have - overriden other methods, so FrameDecorator will look at the - 'base' parameter and defer to that class's methods. And so on, - down the chain.""" - - def filename(self): - """Return the filename associated with this frame, detecting - and returning the appropriate library name is this is a shared - library.""" - - if hasattr(self._base, "filename"): - return self._base.filename() - - frame = self.inferior_frame() - sal = frame.find_sal() - if not sal.symtab or not sal.symtab.filename: - pc = frame.pc() - return gdb.solib_name(pc) - else: - return sal.symtab.filename - - -class DAPFrameDecorator(_FrameDecoratorBase): - """Like FrameDecorator, but has slightly different results - for the "filename" method.""" - - def filename(self): - """Return the filename associated with this frame, detecting - and returning the appropriate library name is this is a shared - library.""" - - if hasattr(self._base, "filename"): - return self._base.filename() - - frame = self.inferior_frame() - sal = frame.find_sal() - if sal.symtab is not None: - return sal.symtab.fullname() - return None - - def frame_locals(self): - """Return an iterable of local variables for this frame, if - any. The iterable object contains objects conforming with the - Symbol/Value interface. If there are no frame locals, or if - this frame is deemed to be a special case, return None.""" - - if hasattr(self._base, "frame_locals"): - return self._base.frame_locals() - - frame = self.inferior_frame() - args = FrameVars(frame) - return args.fetch_frame_locals(True) - - -class SymValueWrapper(object): - """A container class conforming to the Symbol/Value interface - which holds frame locals or frame arguments.""" - - # The FRAME argument is needed here because gdb.Symbol doesn't - # carry the block with it, and so read_var can't find symbols from - # outer (static link) frames. - def __init__(self, frame, symbol): - self.frame = frame - self.sym = symbol - - def value(self): - """Return the value associated with this symbol, or None""" - if self.frame is None: - return None - return self.frame.read_var(self.sym) - - def symbol(self): - """Return the symbol, or Python text, associated with this - symbol, or None""" - return self.sym - - -class FrameVars(object): - """Utility class to fetch and store frame local variables, or - frame arguments.""" - - def __init__(self, frame): - self.frame = frame - - def fetch_frame_locals(self, follow_link=False): - """Public utility method to fetch frame local variables for - the stored frame. Frame arguments are not fetched. If there - are no frame local variables, return an empty list.""" - lvars = [] - - frame = self.frame - try: - block = frame.block() - except RuntimeError: - block = None - - traversed_link = False - while block is not None: - if block.is_global or block.is_static: - break - for sym in block: - # Exclude arguments from the innermost function, but - # if we found and traversed a static link, just treat - # all such variables as "local". - if sym.is_argument: - if not traversed_link: - continue - elif not sym.is_variable: - # We use an 'elif' here because is_variable - # returns False for arguments as well. Anyway, - # don't include non-variables here. - continue - lvars.append(SymValueWrapper(frame, sym)) - - if block.function is not None: - if not follow_link: - break - # If the frame has a static link, follow it here. - traversed_link = True - frame = frame.static_link() - if frame is None: - break - try: - block = frame.block() - except RuntimeError: - block = None - else: - block = block.superblock - - return lvars - - def fetch_frame_args(self): - """Public utility method to fetch frame arguments for the - stored frame. Frame arguments are the only type fetched. If - there are no frame argument variables, return an empty list.""" - - args = [] - - try: - block = self.frame.block() - except RuntimeError: - block = None - - while block is not None: - if block.is_global or block.is_static: - break - for sym in block: - if not sym.is_argument: - continue - args.append(SymValueWrapper(None, sym)) - - # Stop when the function itself is seen, to avoid showing - # variables from outer functions in a nested function. - # Note that we don't traverse the static link for - # arguments, only for locals. - if block.function is not None: - break - - block = block.superblock - - return args diff --git a/Lib/gdb/FrameIterator.py b/Lib/gdb/FrameIterator.py deleted file mode 100644 index 75176c38e43b56..00000000000000 --- a/Lib/gdb/FrameIterator.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (C) 2013-2024 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 . - - -class FrameIterator(object): - """A gdb.Frame iterator. Iterates over gdb.Frames or objects that - conform to that interface.""" - - def __init__(self, frame_obj): - """Initialize a FrameIterator. - - Arguments: - frame_obj the starting frame.""" - - super(FrameIterator, self).__init__() - self.frame = frame_obj - - def __iter__(self): - return self - - def __next__(self): - """next implementation. - - Returns: - The next oldest frame.""" - - result = self.frame - if result is None: - raise StopIteration - self.frame = result.older() - return result diff --git a/Lib/gdb/__init__.py b/Lib/gdb/__init__.py deleted file mode 100644 index 6c3e2419a40119..00000000000000 --- a/Lib/gdb/__init__.py +++ /dev/null @@ -1,310 +0,0 @@ -# Copyright (C) 2010-2024 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 . - -import os -import signal -import sys -import threading -import traceback -from contextlib import contextmanager - -# Python 3 moved "reload" -if sys.version_info >= (3, 4): - from importlib import reload -else: - from imp import reload - -import _gdb - -# Note that two indicators are needed here to silence flake8. -from _gdb import * # noqa: F401,F403 - -# isort: split - -# Historically, gdb.events was always available, so ensure it's -# still available without an explicit import. -import _gdbevents as events - -sys.modules["gdb.events"] = events - - -class _GdbFile(object): - # These two are needed in Python 3 - encoding = "UTF-8" - errors = "strict" - - def __init__(self, stream): - self.stream = stream - - def close(self): - # Do nothing. - return None - - def isatty(self): - return False - - def writelines(self, iterable): - for line in iterable: - self.write(line) - - def flush(self): - _gdb.flush(stream=self.stream) - - def write(self, s): - _gdb.write(s, stream=self.stream) - - -sys.stdout = _GdbFile(_gdb.STDOUT) -sys.stderr = _GdbFile(_gdb.STDERR) - -# Default prompt hook does nothing. -prompt_hook = None - -# Ensure that sys.argv is set to something. -# We do not use PySys_SetArgvEx because it did not appear until 2.6.6. -sys.argv = [""] - -# Initial pretty printers. -pretty_printers = [] - -# Initial type printers. -type_printers = [] -# Initial xmethod matchers. -xmethods = [] -# Initial frame filters. -frame_filters = {} -# Initial frame unwinders. -frame_unwinders = [] -# Initial missing debug handlers. -missing_debug_handlers = [] - - -def _execute_unwinders(pending_frame): - """Internal function called from GDB to execute all unwinders. - - Runs each currently enabled unwinder until it finds the one that - can unwind given frame. - - Arguments: - pending_frame: gdb.PendingFrame instance. - - Returns: - Tuple with: - - [0] gdb.UnwindInfo instance - [1] Name of unwinder that claimed the frame (type `str`) - - or None, if no unwinder has claimed the frame. - """ - for objfile in objfiles(): - for unwinder in objfile.frame_unwinders: - if unwinder.enabled: - unwind_info = unwinder(pending_frame) - if unwind_info is not None: - return (unwind_info, unwinder.name) - - for unwinder in current_progspace().frame_unwinders: - if unwinder.enabled: - unwind_info = unwinder(pending_frame) - if unwind_info is not None: - return (unwind_info, unwinder.name) - - for unwinder in frame_unwinders: - if unwinder.enabled: - unwind_info = unwinder(pending_frame) - if unwind_info is not None: - return (unwind_info, unwinder.name) - - return None - - -# Convenience variable to GDB's python directory -PYTHONDIR = os.path.dirname(os.path.dirname(__file__)) - -# Auto-load all functions/commands. - -# Packages to auto-load. - -packages = ["function", "command", "printer"] - -# pkgutil.iter_modules is not available prior to Python 2.6. Instead, -# manually iterate the list, collating the Python files in each module -# path. Construct the module name, and import. - - -def _auto_load_packages(): - for package in packages: - location = os.path.join(os.path.dirname(__file__), package) - if os.path.exists(location): - py_files = filter( - lambda x: x.endswith(".py") and x != "__init__.py", os.listdir(location) - ) - - for py_file in py_files: - # Construct from foo.py, gdb.module.foo - modname = "%s.%s.%s" % (__name__, package, py_file[:-3]) - try: - if modname in sys.modules: - # reload modules with duplicate names - reload(__import__(modname)) - else: - __import__(modname) - except Exception: - sys.stderr.write(traceback.format_exc() + "\n") - - -_auto_load_packages() - - -def GdbSetPythonDirectory(dir): - """Update sys.path, reload gdb and auto-load packages.""" - global PYTHONDIR - - try: - sys.path.remove(PYTHONDIR) - except ValueError: - pass - sys.path.insert(0, dir) - - PYTHONDIR = dir - - # note that reload overwrites the gdb module without deleting existing - # attributes - reload(__import__(__name__)) - _auto_load_packages() - - -def current_progspace(): - "Return the current Progspace." - return _gdb.selected_inferior().progspace - - -def objfiles(): - "Return a sequence of the current program space's objfiles." - return current_progspace().objfiles() - - -def solib_name(addr): - """solib_name (Long) -> String.\n\ -Return the name of the shared library holding a given address, or None.""" - return current_progspace().solib_name(addr) - - -def block_for_pc(pc): - "Return the block containing the given pc value, or None." - return current_progspace().block_for_pc(pc) - - -def find_pc_line(pc): - """find_pc_line (pc) -> Symtab_and_line. - Return the gdb.Symtab_and_line object corresponding to the pc value.""" - return current_progspace().find_pc_line(pc) - - -def set_parameter(name, value): - """Set the GDB parameter NAME to VALUE.""" - # Handle the specific cases of None and booleans here, because - # gdb.parameter can return them, but they can't be passed to 'set' - # this way. - if value is None: - value = "unlimited" - elif isinstance(value, bool): - if value: - value = "on" - else: - value = "off" - _gdb.execute("set " + name + " " + str(value), to_string=True) - - -@contextmanager -def with_parameter(name, value): - """Temporarily set the GDB parameter NAME to VALUE. - Note that this is a context manager.""" - old_value = _gdb.parameter(name) - set_parameter(name, value) - try: - # Nothing that useful to return. - yield None - finally: - set_parameter(name, old_value) - - -@contextmanager -def blocked_signals(): - """A helper function that blocks and unblocks signals.""" - if not hasattr(signal, "pthread_sigmask"): - yield - return - - to_block = {signal.SIGCHLD, signal.SIGINT, signal.SIGALRM, signal.SIGWINCH} - old_mask = signal.pthread_sigmask(signal.SIG_BLOCK, to_block) - try: - yield None - finally: - signal.pthread_sigmask(signal.SIG_SETMASK, old_mask) - - -class Thread(threading.Thread): - """A GDB-specific wrapper around threading.Thread - - This wrapper ensures that the new thread blocks any signals that - must be delivered on GDB's main thread.""" - - def start(self): - # GDB requires that these be delivered to the main thread. We - # do this here to avoid any possible race with the creation of - # the new thread. The thread mask is inherited by new - # threads. - with blocked_signals(): - super().start() - - -def _handle_missing_debuginfo(objfile): - """Internal function called from GDB to execute missing debug - handlers. - - Run each of the currently registered, and enabled missing debug - handler objects for the current program space and then from the - global list. Stop after the first handler that returns a result - other than None. - - Arguments: - objfile: A gdb.Objfile for which GDB could not find any debug - information. - - Returns: - None: No debug information could be found for objfile. - False: A handler has done all it can with objfile, but no - debug information could be found. - True: Debug information might have been installed by a - handler, GDB should check again. - A string: This is the filename of a file containing the - required debug information. - """ - pspace = objfile.progspace - - for handler in pspace.missing_debug_handlers: - if handler.enabled: - result = handler(objfile) - if result is not None: - return result - - for handler in missing_debug_handlers: - if handler.enabled: - result = handler(objfile) - if result is not None: - return result - - return None diff --git a/Lib/gdb/command/__init__.py b/Lib/gdb/command/__init__.py deleted file mode 100644 index f1b13bd00f2348..00000000000000 --- a/Lib/gdb/command/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2010-2024 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 . diff --git a/Lib/gdb/command/explore.py b/Lib/gdb/command/explore.py deleted file mode 100644 index e359fa506fa5ab..00000000000000 --- a/Lib/gdb/command/explore.py +++ /dev/null @@ -1,784 +0,0 @@ -# GDB 'explore' command. -# Copyright (C) 2012-2024 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 . - -"""Implementation of the GDB 'explore' command using the GDB Python API.""" - -import gdb - - -class Explorer(object): - """Internal class which invokes other explorers.""" - - # This map is filled by the Explorer.init_env() function - type_code_to_explorer_map = {} - - _SCALAR_TYPE_LIST = ( - gdb.TYPE_CODE_CHAR, - gdb.TYPE_CODE_INT, - gdb.TYPE_CODE_BOOL, - gdb.TYPE_CODE_FLT, - gdb.TYPE_CODE_VOID, - gdb.TYPE_CODE_ENUM, - ) - - @staticmethod - def guard_expr(expr): - length = len(expr) - guard = False - - if expr[0] == "(" and expr[length - 1] == ")": - pass - else: - i = 0 - while i < length: - c = expr[i] - if ( - c == "_" - or ("a" <= c and c <= "z") - or ("A" <= c and c <= "Z") - or ("0" <= c and c <= "9") - ): - pass - else: - guard = True - break - i += 1 - - if guard: - return "(" + expr + ")" - else: - return expr - - @staticmethod - def explore_expr(expr, value, is_child): - """Main function to explore an expression value. - - Arguments: - expr: The expression string that is being explored. - value: The gdb.Value value of the expression. - is_child: Boolean value to indicate if the expression is a child. - An expression is a child if it is derived from the main - expression entered by the user. For example, if the user - entered an expression which evaluates to a struct, then - when exploring the fields of the struct, is_child is set - to True internally. - - Returns: - No return value. - """ - type_code = value.type.code - if type_code in Explorer.type_code_to_explorer_map: - explorer_class = Explorer.type_code_to_explorer_map[type_code] - while explorer_class.explore_expr(expr, value, is_child): - pass - else: - print("Explorer for type '%s' not yet available.\n" % str(value.type)) - - @staticmethod - def explore_type(name, datatype, is_child): - """Main function to explore a data type. - - Arguments: - name: The string representing the path to the data type being - explored. - datatype: The gdb.Type value of the data type being explored. - is_child: Boolean value to indicate if the name is a child. - A name is a child if it is derived from the main name - entered by the user. For example, if the user entered - the name of struct type, then when exploring the fields - of the struct, is_child is set to True internally. - - Returns: - No return value. - """ - type_code = datatype.code - if type_code in Explorer.type_code_to_explorer_map: - explorer_class = Explorer.type_code_to_explorer_map[type_code] - while explorer_class.explore_type(name, datatype, is_child): - pass - else: - print("Explorer for type '%s' not yet available.\n" % str(datatype)) - - @staticmethod - def init_env(): - """Initializes the Explorer environment. - This function should be invoked before starting any exploration. If - invoked before an exploration, it need not be invoked for subsequent - explorations. - """ - Explorer.type_code_to_explorer_map = { - gdb.TYPE_CODE_CHAR: ScalarExplorer, - gdb.TYPE_CODE_INT: ScalarExplorer, - gdb.TYPE_CODE_BOOL: ScalarExplorer, - gdb.TYPE_CODE_FLT: ScalarExplorer, - gdb.TYPE_CODE_VOID: ScalarExplorer, - gdb.TYPE_CODE_ENUM: ScalarExplorer, - gdb.TYPE_CODE_STRUCT: CompoundExplorer, - gdb.TYPE_CODE_UNION: CompoundExplorer, - gdb.TYPE_CODE_PTR: PointerExplorer, - gdb.TYPE_CODE_REF: ReferenceExplorer, - gdb.TYPE_CODE_RVALUE_REF: ReferenceExplorer, - gdb.TYPE_CODE_TYPEDEF: TypedefExplorer, - gdb.TYPE_CODE_ARRAY: ArrayExplorer, - } - - @staticmethod - def is_scalar_type(type): - """Checks whether a type is a scalar type. - A type is a scalar type of its type is - gdb.TYPE_CODE_CHAR or - gdb.TYPE_CODE_INT or - gdb.TYPE_CODE_BOOL or - gdb.TYPE_CODE_FLT or - gdb.TYPE_CODE_VOID or - gdb.TYPE_CODE_ENUM. - - Arguments: - type: The type to be checked. - - Returns: - 'True' if 'type' is a scalar type. 'False' otherwise. - """ - return type.code in Explorer._SCALAR_TYPE_LIST - - @staticmethod - def return_to_parent_value(): - """A utility function which prints that the current exploration session - is returning to the parent value. Useful when exploring values. - """ - print("\nReturning to parent value...\n") - - @staticmethod - def return_to_parent_value_prompt(): - """A utility function which prompts the user to press the 'enter' key - so that the exploration session can shift back to the parent value. - Useful when exploring values. - """ - input("\nPress enter to return to parent value: ") - - @staticmethod - def return_to_enclosing_type(): - """A utility function which prints that the current exploration session - is returning to the enclosing type. Useful when exploring types. - """ - print("\nReturning to enclosing type...\n") - - @staticmethod - def return_to_enclosing_type_prompt(): - """A utility function which prompts the user to press the 'enter' key - so that the exploration session can shift back to the enclosing type. - Useful when exploring types. - """ - input("\nPress enter to return to enclosing type: ") - - -class ScalarExplorer(object): - """Internal class used to explore scalar values.""" - - @staticmethod - def explore_expr(expr, value, is_child): - """Function to explore scalar values. - See Explorer.explore_expr and Explorer.is_scalar_type for more - information. - """ - print("'%s' is a scalar value of type '%s'." % (expr, value.type)) - print("%s = %s" % (expr, str(value))) - - if is_child: - Explorer.return_to_parent_value_prompt() - Explorer.return_to_parent_value() - - return False - - @staticmethod - def explore_type(name, datatype, is_child): - """Function to explore scalar types. - See Explorer.explore_type and Explorer.is_scalar_type for more - information. - """ - if datatype.code == gdb.TYPE_CODE_ENUM: - if is_child: - print("%s is of an enumerated type '%s'." % (name, str(datatype))) - else: - print("'%s' is an enumerated type." % name) - else: - if is_child: - print("%s is of a scalar type '%s'." % (name, str(datatype))) - else: - print("'%s' is a scalar type." % name) - - if is_child: - Explorer.return_to_enclosing_type_prompt() - Explorer.return_to_enclosing_type() - - return False - - -class PointerExplorer(object): - """Internal class used to explore pointer values.""" - - @staticmethod - def explore_expr(expr, value, is_child): - """Function to explore pointer values. - See Explorer.explore_expr for more information. - """ - print( - "'%s' is a pointer to a value of type '%s'" - % (expr, str(value.type.target())) - ) - option = input( - "Continue exploring it as a pointer to a single " "value [y/n]: " - ) - if option == "y": - deref_value = None - try: - deref_value = value.dereference() - str(deref_value) - except gdb.MemoryError: - print( - "'%s' a pointer pointing to an invalid memory " "location." % expr - ) - if is_child: - Explorer.return_to_parent_value_prompt() - return False - Explorer.explore_expr( - "*%s" % Explorer.guard_expr(expr), deref_value, is_child - ) - return False - - option = input("Continue exploring it as a pointer to an " "array [y/n]: ") - if option == "y": - while True: - index = 0 - try: - index = int( - input( - "Enter the index of the element you " - "want to explore in '%s': " % expr - ) - ) - except ValueError: - break - element_expr = "%s[%d]" % (Explorer.guard_expr(expr), index) - element = value[index] - try: - str(element) - except gdb.MemoryError: - print("Cannot read value at index %d." % index) - continue - Explorer.explore_expr(element_expr, element, True) - return False - - if is_child: - Explorer.return_to_parent_value() - return False - - @staticmethod - def explore_type(name, datatype, is_child): - """Function to explore pointer types. - See Explorer.explore_type for more information. - """ - target_type = datatype.target() - print("\n%s is a pointer to a value of type '%s'." % (name, str(target_type))) - - Explorer.explore_type("the pointee type of %s" % name, target_type, is_child) - return False - - -class ReferenceExplorer(object): - """Internal class used to explore reference (TYPE_CODE_REF) values.""" - - @staticmethod - def explore_expr(expr, value, is_child): - """Function to explore array values. - See Explorer.explore_expr for more information. - """ - referenced_value = value.referenced_value() - Explorer.explore_expr(expr, referenced_value, is_child) - return False - - @staticmethod - def explore_type(name, datatype, is_child): - """Function to explore pointer types. - See Explorer.explore_type for more information. - """ - target_type = datatype.target() - Explorer.explore_type(name, target_type, is_child) - return False - - -class ArrayExplorer(object): - """Internal class used to explore arrays.""" - - @staticmethod - def explore_expr(expr, value, is_child): - """Function to explore array values. - See Explorer.explore_expr for more information. - """ - target_type = value.type.target() - print("'%s' is an array of '%s'." % (expr, str(target_type))) - index = 0 - try: - index = int( - input( - "Enter the index of the element you want to " - "explore in '%s': " % expr - ) - ) - except ValueError: - if is_child: - Explorer.return_to_parent_value() - return False - - element = None - try: - element = value[index] - str(element) - except gdb.MemoryError: - print("Cannot read value at index %d." % index) - input("Press enter to continue... ") - return True - - Explorer.explore_expr( - "%s[%d]" % (Explorer.guard_expr(expr), index), element, True - ) - return True - - @staticmethod - def explore_type(name, datatype, is_child): - """Function to explore array types. - See Explorer.explore_type for more information. - """ - target_type = datatype.target() - print("%s is an array of '%s'." % (name, str(target_type))) - - Explorer.explore_type("the array element of %s" % name, target_type, is_child) - return False - - -class CompoundExplorer(object): - """Internal class used to explore struct, classes and unions.""" - - @staticmethod - def _print_fields(print_list): - """Internal function which prints the fields of a struct/class/union.""" - max_field_name_length = 0 - for pair in print_list: - if max_field_name_length < len(pair[0]): - max_field_name_length = len(pair[0]) - - for pair in print_list: - print(" %*s = %s" % (max_field_name_length, pair[0], pair[1])) - - @staticmethod - def _get_real_field_count(fields): - real_field_count = 0 - for field in fields: - if not field.artificial: - real_field_count = real_field_count + 1 - - return real_field_count - - @staticmethod - def explore_expr(expr, value, is_child): - """Function to explore structs/classes and union values. - See Explorer.explore_expr for more information. - """ - datatype = value.type - type_code = datatype.code - fields = datatype.fields() - - if type_code == gdb.TYPE_CODE_STRUCT: - type_desc = "struct/class" - else: - type_desc = "union" - - if CompoundExplorer._get_real_field_count(fields) == 0: - print( - "The value of '%s' is a %s of type '%s' with no fields." - % (expr, type_desc, str(value.type)) - ) - if is_child: - Explorer.return_to_parent_value_prompt() - return False - - print( - "The value of '%s' is a %s of type '%s' with the following " - "fields:\n" % (expr, type_desc, str(value.type)) - ) - - has_explorable_fields = False - choice_to_compound_field_map = {} - current_choice = 0 - print_list = [] - for field in fields: - if field.artificial: - continue - field_full_name = Explorer.guard_expr(expr) + "." + field.name - if field.is_base_class: - field_value = value.cast(field.type) - else: - field_value = value[field.name] - literal_value = "" - if type_code == gdb.TYPE_CODE_UNION: - literal_value = "" % ( - current_choice, - str(field.type), - ) - has_explorable_fields = True - else: - if Explorer.is_scalar_type(field.type): - literal_value = "%s .. (Value of type '%s')" % ( - str(field_value), - str(field.type), - ) - else: - if field.is_base_class: - field_desc = "base class" - else: - field_desc = "field" - literal_value = "" % ( - current_choice, - field_desc, - str(field.type), - ) - has_explorable_fields = True - - choice_to_compound_field_map[str(current_choice)] = ( - field_full_name, - field_value, - ) - current_choice = current_choice + 1 - - print_list.append((field.name, literal_value)) - - CompoundExplorer._print_fields(print_list) - print("") - - if has_explorable_fields: - choice = input("Enter the field number of choice: ") - if choice in choice_to_compound_field_map: - Explorer.explore_expr( - choice_to_compound_field_map[choice][0], - choice_to_compound_field_map[choice][1], - True, - ) - return True - else: - if is_child: - Explorer.return_to_parent_value() - else: - if is_child: - Explorer.return_to_parent_value_prompt() - - return False - - @staticmethod - def explore_type(name, datatype, is_child): - """Function to explore struct/class and union types. - See Explorer.explore_type for more information. - """ - type_code = datatype.code - type_desc = "" - if type_code == gdb.TYPE_CODE_STRUCT: - type_desc = "struct/class" - else: - type_desc = "union" - - fields = datatype.fields() - if CompoundExplorer._get_real_field_count(fields) == 0: - if is_child: - print( - "%s is a %s of type '%s' with no fields." - % (name, type_desc, str(datatype)) - ) - Explorer.return_to_enclosing_type_prompt() - else: - print("'%s' is a %s with no fields." % (name, type_desc)) - return False - - if is_child: - print( - "%s is a %s of type '%s' " - "with the following fields:\n" % (name, type_desc, str(datatype)) - ) - else: - print("'%s' is a %s with the following " "fields:\n" % (name, type_desc)) - - current_choice = 0 - choice_to_compound_field_map = {} - print_list = [] - for field in fields: - if field.artificial: - continue - if field.is_base_class: - field_desc = "base class" - else: - field_desc = "field" - rhs = "" % ( - current_choice, - field_desc, - str(field.type), - ) - print_list.append((field.name, rhs)) - choice_to_compound_field_map[str(current_choice)] = ( - field.name, - field.type, - field_desc, - ) - current_choice = current_choice + 1 - - CompoundExplorer._print_fields(print_list) - print("") - - if len(choice_to_compound_field_map) > 0: - choice = input("Enter the field number of choice: ") - if choice in choice_to_compound_field_map: - if is_child: - new_name = "%s '%s' of %s" % ( - choice_to_compound_field_map[choice][2], - choice_to_compound_field_map[choice][0], - name, - ) - else: - new_name = "%s '%s' of '%s'" % ( - choice_to_compound_field_map[choice][2], - choice_to_compound_field_map[choice][0], - name, - ) - Explorer.explore_type( - new_name, choice_to_compound_field_map[choice][1], True - ) - return True - else: - if is_child: - Explorer.return_to_enclosing_type() - else: - if is_child: - Explorer.return_to_enclosing_type_prompt() - - return False - - -class TypedefExplorer(object): - """Internal class used to explore values whose type is a typedef.""" - - @staticmethod - def explore_expr(expr, value, is_child): - """Function to explore typedef values. - See Explorer.explore_expr for more information. - """ - actual_type = value.type.strip_typedefs() - print( - "The value of '%s' is of type '%s' " - "which is a typedef of type '%s'" - % (expr, str(value.type), str(actual_type)) - ) - - Explorer.explore_expr(expr, value.cast(actual_type), is_child) - return False - - @staticmethod - def explore_type(name, datatype, is_child): - """Function to explore typedef types. - See Explorer.explore_type for more information. - """ - actual_type = datatype.strip_typedefs() - if is_child: - print( - "The type of %s is a typedef of type '%s'." % (name, str(actual_type)) - ) - else: - print("The type '%s' is a typedef of type '%s'." % (name, str(actual_type))) - - Explorer.explore_type(name, actual_type, is_child) - return False - - -class ExploreUtils(object): - """Internal class which provides utilities for the main command classes.""" - - @staticmethod - def check_args(name, arg_str): - """Utility to check if adequate number of arguments are passed to an - explore command. - - Arguments: - name: The name of the explore command. - arg_str: The argument string passed to the explore command. - - Returns: - True if adequate arguments are passed, false otherwise. - - Raises: - gdb.GdbError if adequate arguments are not passed. - """ - if len(arg_str) < 1: - raise gdb.GdbError("ERROR: '%s' requires an argument." % name) - return False - else: - return True - - @staticmethod - def get_type_from_str(type_str): - """A utility function to deduce the gdb.Type value from a string - representing the type. - - Arguments: - type_str: The type string from which the gdb.Type value should be - deduced. - - Returns: - The deduced gdb.Type value if possible, None otherwise. - """ - try: - # Assume the current language to be C/C++ and make a try. - return gdb.parse_and_eval("(%s *)0" % type_str).type.target() - except RuntimeError: - # If assumption of current language to be C/C++ was wrong, then - # lookup the type using the API. - try: - return gdb.lookup_type(type_str) - except RuntimeError: - return None - - @staticmethod - def get_value_from_str(value_str): - """A utility function to deduce the gdb.Value value from a string - representing the value. - - Arguments: - value_str: The value string from which the gdb.Value value should - be deduced. - - Returns: - The deduced gdb.Value value if possible, None otherwise. - """ - try: - return gdb.parse_and_eval(value_str) - except RuntimeError: - return None - - -class ExploreCommand(gdb.Command): - """Explore a value or a type valid in the current context. - - Usage: explore ARG - - - ARG is either a valid expression or a type name. - - At any stage of exploration, hit the return key (instead of a - choice, if any) to return to the enclosing type or value.""" - - def __init__(self): - super(ExploreCommand, self).__init__( - name="explore", command_class=gdb.COMMAND_DATA, prefix=True - ) - - def invoke(self, arg_str, from_tty): - if ExploreUtils.check_args("explore", arg_str) is False: - return - - # Check if it is a value - value = ExploreUtils.get_value_from_str(arg_str) - if value is not None: - Explorer.explore_expr(arg_str, value, False) - return - - # If it is not a value, check if it is a type - datatype = ExploreUtils.get_type_from_str(arg_str) - if datatype is not None: - Explorer.explore_type(arg_str, datatype, False) - return - - # If it is neither a value nor a type, raise an error. - raise gdb.GdbError( - ( - "'%s' neither evaluates to a value nor is a type " - "in the current context." % arg_str - ) - ) - - -class ExploreValueCommand(gdb.Command): - """Explore value of an expression valid in the current context. - - Usage: explore value ARG - - - ARG is a valid expression. - - At any stage of exploration, hit the return key (instead of a - choice, if any) to return to the enclosing value.""" - - def __init__(self): - super(ExploreValueCommand, self).__init__( - name="explore value", command_class=gdb.COMMAND_DATA - ) - - def invoke(self, arg_str, from_tty): - if ExploreUtils.check_args("explore value", arg_str) is False: - return - - value = ExploreUtils.get_value_from_str(arg_str) - if value is None: - raise gdb.GdbError( - ( - " '%s' does not evaluate to a value in the current " - "context." % arg_str - ) - ) - return - - Explorer.explore_expr(arg_str, value, False) - - -class ExploreTypeCommand(gdb.Command): - """Explore a type or the type of an expression. - - Usage: explore type ARG - - - ARG is a valid expression or a type name. - - At any stage of exploration, hit the return key (instead of a - choice, if any) to return to the enclosing type.""" - - def __init__(self): - super(ExploreTypeCommand, self).__init__( - name="explore type", command_class=gdb.COMMAND_DATA - ) - - def invoke(self, arg_str, from_tty): - if ExploreUtils.check_args("explore type", arg_str) is False: - return - - datatype = ExploreUtils.get_type_from_str(arg_str) - if datatype is not None: - Explorer.explore_type(arg_str, datatype, False) - return - - value = ExploreUtils.get_value_from_str(arg_str) - if value is not None: - print("'%s' is of type '%s'." % (arg_str, str(value.type))) - Explorer.explore_type(str(value.type), value.type, False) - return - - raise gdb.GdbError( - ("'%s' is not a type or value in the current " "context." % arg_str) - ) - - -Explorer.init_env() - -ExploreCommand() -ExploreValueCommand() -ExploreTypeCommand() diff --git a/Lib/gdb/command/frame_filters.py b/Lib/gdb/command/frame_filters.py deleted file mode 100644 index 4e1b3208d0ef70..00000000000000 --- a/Lib/gdb/command/frame_filters.py +++ /dev/null @@ -1,476 +0,0 @@ -# Frame-filter commands. -# Copyright (C) 2013-2024 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 . - -"""GDB commands for working with frame-filters.""" - -import sys - -import gdb -import gdb.frames - - -# GDB Commands. -class SetFilterPrefixCmd(gdb.Command): - """Prefix command for 'set' frame-filter related operations.""" - - def __init__(self): - super(SetFilterPrefixCmd, self).__init__( - "set frame-filter", gdb.COMMAND_OBSCURE, gdb.COMPLETE_NONE, True - ) - - -class ShowFilterPrefixCmd(gdb.Command): - """Prefix command for 'show' frame-filter related operations.""" - - def __init__(self): - super(ShowFilterPrefixCmd, self).__init__( - "show frame-filter", gdb.COMMAND_OBSCURE, gdb.COMPLETE_NONE, True - ) - - -class InfoFrameFilter(gdb.Command): - """List all registered Python frame-filters. - - Usage: info frame-filters""" - - def __init__(self): - super(InfoFrameFilter, self).__init__("info frame-filter", gdb.COMMAND_DATA) - - @staticmethod - def enabled_string(state): - """Return "Yes" if filter is enabled, otherwise "No".""" - if state: - return "Yes" - else: - return "No" - - def print_list(self, title, frame_filters, blank_line): - sorted_frame_filters = sorted( - frame_filters.items(), - key=lambda i: gdb.frames.get_priority(i[1]), - reverse=True, - ) - - if len(sorted_frame_filters) == 0: - return 0 - - print(title) - print(" Priority Enabled Name") - for frame_filter in sorted_frame_filters: - name = frame_filter[0] - try: - priority = "{:<8}".format(str(gdb.frames.get_priority(frame_filter[1]))) - enabled = "{:<7}".format( - self.enabled_string(gdb.frames.get_enabled(frame_filter[1])) - ) - print(" %s %s %s" % (priority, enabled, name)) - except Exception: - e = sys.exc_info()[1] - print(" Error printing filter '" + name + "': " + str(e)) - if blank_line: - print("") - return 1 - - def invoke(self, arg, from_tty): - any_printed = self.print_list("global frame-filters:", gdb.frame_filters, True) - - cp = gdb.current_progspace() - any_printed += self.print_list( - "progspace %s frame-filters:" % cp.filename, cp.frame_filters, True - ) - - for objfile in gdb.objfiles(): - any_printed += self.print_list( - "objfile %s frame-filters:" % objfile.filename, - objfile.frame_filters, - False, - ) - - if any_printed == 0: - print("No frame filters.") - - -# Internal enable/disable functions. - - -def _enable_parse_arg(cmd_name, arg): - """Internal worker function to take an argument from - enable/disable and return a tuple of arguments. - - Arguments: - cmd_name: Name of the command invoking this function. - args: The argument as a string. - - Returns: - A tuple containing the dictionary, and the argument, or just - the dictionary in the case of "all". - """ - - argv = gdb.string_to_argv(arg) - argc = len(argv) - if argc == 0: - raise gdb.GdbError(cmd_name + " requires an argument") - if argv[0] == "all": - if argc > 1: - raise gdb.GdbError( - cmd_name + ": with 'all' " "you may not specify a filter." - ) - elif argc != 2: - raise gdb.GdbError(cmd_name + " takes exactly two arguments.") - - return argv - - -def _do_enable_frame_filter(command_tuple, flag): - """Worker for enabling/disabling frame_filters. - - Arguments: - command_type: A tuple with the first element being the - frame filter dictionary, and the second being - the frame filter name. - flag: True for Enable, False for Disable. - """ - - list_op = command_tuple[0] - op_list = gdb.frames.return_list(list_op) - - if list_op == "all": - for item in op_list: - gdb.frames.set_enabled(item, flag) - else: - frame_filter = command_tuple[1] - try: - ff = op_list[frame_filter] - except KeyError: - msg = "frame-filter '" + str(frame_filter) + "' not found." - raise gdb.GdbError(msg) - - gdb.frames.set_enabled(ff, flag) - - -def _complete_frame_filter_list(text, word, all_flag): - """Worker for frame filter dictionary name completion. - - Arguments: - text: The full text of the command line. - word: The most recent word of the command line. - all_flag: Whether to include the word "all" in completion. - - Returns: - A list of suggested frame filter dictionary name completions - from text/word analysis. This list can be empty when there - are no suggestions for completion. - """ - if all_flag: - filter_locations = ["all", "global", "progspace"] - else: - filter_locations = ["global", "progspace"] - for objfile in gdb.objfiles(): - filter_locations.append(objfile.filename) - - # If the user just asked for completions with no completion - # hints, just return all the frame filter dictionaries we know - # about. - if text == "": - return filter_locations - - # Otherwise filter on what we know. - flist = filter(lambda x, y=text: x.startswith(y), filter_locations) - - # If we only have one completion, complete it and return it. - if len(flist) == 1: - flist[0] = flist[0][len(text) - len(word) :] - - # Otherwise, return an empty list, or a list of frame filter - # dictionaries that the previous filter operation returned. - return flist - - -def _complete_frame_filter_name(word, printer_dict): - """Worker for frame filter name completion. - - Arguments: - - word: The most recent word of the command line. - - printer_dict: The frame filter dictionary to search for frame - filter name completions. - - Returns: A list of suggested frame filter name completions - from word analysis of the frame filter dictionary. This list - can be empty when there are no suggestions for completion. - """ - - printer_keys = printer_dict.keys() - if word == "": - return printer_keys - - flist = filter(lambda x, y=word: x.startswith(y), printer_keys) - return flist - - -class EnableFrameFilter(gdb.Command): - """GDB command to enable the specified frame-filter. - - Usage: enable frame-filter DICTIONARY [NAME] - - DICTIONARY is the name of the frame filter dictionary on which to - operate. If dictionary is set to "all", perform operations on all - dictionaries. Named dictionaries are: "global" for the global - frame filter dictionary, "progspace" for the program space's frame - filter dictionary. If either all, or the two named dictionaries - are not specified, the dictionary name is assumed to be the name - of an "objfile" -- a shared library or an executable. - - NAME matches the name of the frame-filter to operate on.""" - - def __init__(self): - super(EnableFrameFilter, self).__init__("enable frame-filter", gdb.COMMAND_DATA) - - def complete(self, text, word): - """Completion function for both frame filter dictionary, and - frame filter name.""" - if text.count(" ") == 0: - return _complete_frame_filter_list(text, word, True) - else: - printer_list = gdb.frames.return_list(text.split()[0].rstrip()) - return _complete_frame_filter_name(word, printer_list) - - def invoke(self, arg, from_tty): - command_tuple = _enable_parse_arg("enable frame-filter", arg) - _do_enable_frame_filter(command_tuple, True) - - -class DisableFrameFilter(gdb.Command): - """GDB command to disable the specified frame-filter. - - Usage: disable frame-filter DICTIONARY [NAME] - - DICTIONARY is the name of the frame filter dictionary on which to - operate. If dictionary is set to "all", perform operations on all - dictionaries. Named dictionaries are: "global" for the global - frame filter dictionary, "progspace" for the program space's frame - filter dictionary. If either all, or the two named dictionaries - are not specified, the dictionary name is assumed to be the name - of an "objfile" -- a shared library or an executable. - - NAME matches the name of the frame-filter to operate on.""" - - def __init__(self): - super(DisableFrameFilter, self).__init__( - "disable frame-filter", gdb.COMMAND_DATA - ) - - def complete(self, text, word): - """Completion function for both frame filter dictionary, and - frame filter name.""" - if text.count(" ") == 0: - return _complete_frame_filter_list(text, word, True) - else: - printer_list = gdb.frames.return_list(text.split()[0].rstrip()) - return _complete_frame_filter_name(word, printer_list) - - def invoke(self, arg, from_tty): - command_tuple = _enable_parse_arg("disable frame-filter", arg) - _do_enable_frame_filter(command_tuple, False) - - -class SetFrameFilterPriority(gdb.Command): - """GDB command to set the priority of the specified frame-filter. - - Usage: set frame-filter priority DICTIONARY NAME PRIORITY - - DICTIONARY is the name of the frame filter dictionary on which to - operate. Named dictionaries are: "global" for the global frame - filter dictionary, "progspace" for the program space's framefilter - dictionary. If either of these two are not specified, the - dictionary name is assumed to be the name of an "objfile" -- a - shared library or an executable. - - NAME matches the name of the frame filter to operate on. - - PRIORITY is the an integer to assign the new priority to the frame - filter.""" - - def __init__(self): - super(SetFrameFilterPriority, self).__init__( - "set frame-filter " "priority", gdb.COMMAND_DATA - ) - - def _parse_pri_arg(self, arg): - """Internal worker to parse a priority from a tuple. - - Arguments: - arg: Tuple which contains the arguments from the command. - - Returns: - A tuple containing the dictionary, name and priority from - the arguments. - - Raises: - gdb.GdbError: An error parsing the arguments. - """ - - argv = gdb.string_to_argv(arg) - argc = len(argv) - if argc != 3: - print("set frame-filter priority " "takes exactly three arguments.") - return None - - return argv - - def _set_filter_priority(self, command_tuple): - """Internal worker for setting priority of frame-filters, by - parsing a tuple and calling _set_priority with the parsed - tuple. - - Arguments: - command_tuple: Tuple which contains the arguments from the - command. - """ - - list_op = command_tuple[0] - frame_filter = command_tuple[1] - - # GDB returns arguments as a string, so convert priority to - # a number. - priority = int(command_tuple[2]) - - op_list = gdb.frames.return_list(list_op) - - try: - ff = op_list[frame_filter] - except KeyError: - msg = "frame-filter '" + str(frame_filter) + "' not found." - raise gdb.GdbError(msg) - - gdb.frames.set_priority(ff, priority) - - def complete(self, text, word): - """Completion function for both frame filter dictionary, and - frame filter name.""" - if text.count(" ") == 0: - return _complete_frame_filter_list(text, word, False) - else: - printer_list = gdb.frames.return_list(text.split()[0].rstrip()) - return _complete_frame_filter_name(word, printer_list) - - def invoke(self, arg, from_tty): - command_tuple = self._parse_pri_arg(arg) - if command_tuple is not None: - self._set_filter_priority(command_tuple) - - -class ShowFrameFilterPriority(gdb.Command): - """GDB command to show the priority of the specified frame-filter. - - Usage: show frame-filter priority DICTIONARY NAME - - DICTIONARY is the name of the frame filter dictionary on which to - operate. Named dictionaries are: "global" for the global frame - filter dictionary, "progspace" for the program space's framefilter - dictionary. If either of these two are not specified, the - dictionary name is assumed to be the name of an "objfile" -- a - shared library or an executable. - - NAME matches the name of the frame-filter to operate on.""" - - def __init__(self): - super(ShowFrameFilterPriority, self).__init__( - "show frame-filter " "priority", gdb.COMMAND_DATA - ) - - def _parse_pri_arg(self, arg): - """Internal worker to parse a dictionary and name from a - tuple. - - Arguments: - arg: Tuple which contains the arguments from the command. - - Returns: - A tuple containing the dictionary, and frame filter name. - - Raises: - gdb.GdbError: An error parsing the arguments. - """ - - argv = gdb.string_to_argv(arg) - argc = len(argv) - if argc != 2: - print("show frame-filter priority " "takes exactly two arguments.") - return None - - return argv - - def get_filter_priority(self, frame_filters, name): - """Worker for retrieving the priority of frame_filters. - - Arguments: - frame_filters: Name of frame filter dictionary. - name: object to select printers. - - Returns: - The priority of the frame filter. - - Raises: - gdb.GdbError: A frame filter cannot be found. - """ - - op_list = gdb.frames.return_list(frame_filters) - - try: - ff = op_list[name] - except KeyError: - msg = "frame-filter '" + str(name) + "' not found." - raise gdb.GdbError(msg) - - return gdb.frames.get_priority(ff) - - def complete(self, text, word): - """Completion function for both frame filter dictionary, and - frame filter name.""" - - if text.count(" ") == 0: - return _complete_frame_filter_list(text, word, False) - else: - printer_list = gdb.frames.return_list(text.split()[0].rstrip()) - return _complete_frame_filter_name(word, printer_list) - - def invoke(self, arg, from_tty): - command_tuple = self._parse_pri_arg(arg) - if command_tuple is None: - return - filter_name = command_tuple[1] - list_name = command_tuple[0] - priority = self.get_filter_priority(list_name, filter_name) - print( - "Priority of filter '" - + filter_name - + "' in list '" - + list_name - + "' is: " - + str(priority) - ) - - -# Register commands -SetFilterPrefixCmd() -ShowFilterPrefixCmd() -InfoFrameFilter() -EnableFrameFilter() -DisableFrameFilter() -SetFrameFilterPriority() -ShowFrameFilterPriority() diff --git a/Lib/gdb/command/missing_debug.py b/Lib/gdb/command/missing_debug.py deleted file mode 100644 index 313b88cf8c31c0..00000000000000 --- a/Lib/gdb/command/missing_debug.py +++ /dev/null @@ -1,227 +0,0 @@ -# Missing debug related commands. -# -# Copyright 2023-2024 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 . - -import re - -import gdb - - -def validate_regexp(exp, idstring): - """Compile exp into a compiler regular expression object. - - Arguments: - exp: The string to compile into a re.Pattern object. - idstring: A string, what exp is a regexp for. - - Returns: - A re.Pattern object representing exp. - - Raises: - SyntaxError: If exp is an invalid regexp. - """ - try: - return re.compile(exp) - except SyntaxError: - raise SyntaxError("Invalid %s regexp: %s." % (idstring, exp)) - - -def parse_missing_debug_command_args(arg): - """Internal utility to parse missing debug handler command argv. - - Arguments: - arg: The arguments to the command. The format is: - [locus-regexp [name-regexp]] - - Returns: - A 2-tuple of compiled regular expressions. - - Raises: - SyntaxError: an error processing ARG - """ - argv = gdb.string_to_argv(arg) - argc = len(argv) - if argc > 2: - raise SyntaxError("Too many arguments.") - locus_regexp = "" - name_regexp = "" - if argc >= 1: - locus_regexp = argv[0] - if argc >= 2: - name_regexp = argv[1] - return ( - validate_regexp(locus_regexp, "locus"), - validate_regexp(name_regexp, "handler"), - ) - - -class InfoMissingDebugHanders(gdb.Command): - """GDB command to list missing debug handlers. - - Usage: info missing-debug-handlers [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression matching the location of the - handler. If it is omitted, all registered handlers from all - loci are listed. A locus can be 'global', 'progspace' to list - the handlers from the current progspace, or a regular expression - matching filenames of progspaces. - - NAME-REGEXP is a regular expression to filter missing debug - handler names. If this omitted for a specified locus, then all - registered handlers in the locus are listed. - """ - - def __init__(self): - super().__init__("info missing-debug-handlers", gdb.COMMAND_FILES) - - def list_handlers(self, title, handlers, name_re): - """Lists the missing debug handlers whose name matches regexp. - - Arguments: - title: The line to print before the list. - handlers: The list of the missing debug handlers. - name_re: handler name filter. - """ - if not handlers: - return - print(title) - for handler in handlers: - if name_re.match(handler.name): - print( - " %s%s" % (handler.name, "" if handler.enabled else " [disabled]") - ) - - def invoke(self, arg, from_tty): - locus_re, name_re = parse_missing_debug_command_args(arg) - - if locus_re.match("progspace") and locus_re.pattern != "": - cp = gdb.current_progspace() - self.list_handlers( - "Progspace %s:" % cp.filename, cp.missing_debug_handlers, name_re - ) - - for progspace in gdb.progspaces(): - filename = progspace.filename or "" - if locus_re.match(filename): - if filename == "": - if progspace == gdb.current_progspace(): - msg = "Current Progspace:" - else: - msg = "Progspace :" - else: - msg = "Progspace %s:" % filename - self.list_handlers( - msg, - progspace.missing_debug_handlers, - name_re, - ) - - # Print global handlers last, as these are invoked last. - if locus_re.match("global"): - self.list_handlers("Global:", gdb.missing_debug_handlers, name_re) - - -def do_enable_handler1(handlers, name_re, flag): - """Enable/disable missing debug handlers whose names match given regex. - - Arguments: - handlers: The list of missing debug handlers. - name_re: Handler name filter. - flag: A boolean indicating if we should enable or disable. - - Returns: - The number of handlers affected. - """ - total = 0 - for handler in handlers: - if name_re.match(handler.name) and handler.enabled != flag: - handler.enabled = flag - total += 1 - return total - - -def do_enable_handler(arg, flag): - """Enable or disable missing debug handlers.""" - (locus_re, name_re) = parse_missing_debug_command_args(arg) - total = 0 - if locus_re.match("global"): - total += do_enable_handler1(gdb.missing_debug_handlers, name_re, flag) - if locus_re.match("progspace") and locus_re.pattern != "": - total += do_enable_handler1( - gdb.current_progspace().missing_debug_handlers, name_re, flag - ) - for progspace in gdb.progspaces(): - filename = progspace.filename or "" - if locus_re.match(filename): - total += do_enable_handler1(progspace.missing_debug_handlers, name_re, flag) - print( - "%d missing debug handler%s %s" - % (total, "" if total == 1 else "s", "enabled" if flag else "disabled") - ) - - -class EnableMissingDebugHandler(gdb.Command): - """GDB command to enable missing debug handlers. - - Usage: enable missing-debug-handler [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression specifying the handlers to - enable. It can be 'global', 'progspace' for the current - progspace, or the filename for a file associated with a progspace. - - NAME_REGEXP is a regular expression to filter handler names. If - this omitted for a specified locus, then all registered handlers - in the locus are affected. - """ - - def __init__(self): - super().__init__("enable missing-debug-handler", gdb.COMMAND_FILES) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - do_enable_handler(arg, True) - - -class DisableMissingDebugHandler(gdb.Command): - """GDB command to disable missing debug handlers. - - Usage: disable missing-debug-handler [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression specifying the handlers to - enable. It can be 'global', 'progspace' for the current - progspace, or the filename for a file associated with a progspace. - - NAME_REGEXP is a regular expression to filter handler names. If - this omitted for a specified locus, then all registered handlers - in the locus are affected. - """ - - def __init__(self): - super().__init__("disable missing-debug-handler", gdb.COMMAND_FILES) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - do_enable_handler(arg, False) - - -def register_missing_debug_handler_commands(): - """Installs the missing debug handler commands.""" - InfoMissingDebugHanders() - EnableMissingDebugHandler() - DisableMissingDebugHandler() - - -register_missing_debug_handler_commands() diff --git a/Lib/gdb/command/pretty_printers.py b/Lib/gdb/command/pretty_printers.py deleted file mode 100644 index cb9b9f35f9f358..00000000000000 --- a/Lib/gdb/command/pretty_printers.py +++ /dev/null @@ -1,396 +0,0 @@ -# Pretty-printer commands. -# Copyright (C) 2010-2024 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 . - -"""GDB commands for working with pretty-printers.""" - -import copy -import re - -import gdb - - -def parse_printer_regexps(arg): - """Internal utility to parse a pretty-printer command argv. - - Arguments: - arg: The arguments to the command. The format is: - [object-regexp [name-regexp]]. - Individual printers in a collection are named as - printer-name;subprinter-name. - - Returns: - The result is a 3-tuple of compiled regular expressions, except that - the resulting compiled subprinter regexp is None if not provided. - - Raises: - SyntaxError: an error processing ARG - """ - - argv = gdb.string_to_argv(arg) - argc = len(argv) - object_regexp = "" # match everything - name_regexp = "" # match everything - subname_regexp = None - if argc > 3: - raise SyntaxError("too many arguments") - if argc >= 1: - object_regexp = argv[0] - if argc >= 2: - name_subname = argv[1].split(";", 1) - name_regexp = name_subname[0] - if len(name_subname) == 2: - subname_regexp = name_subname[1] - # That re.compile raises SyntaxError was determined empirically. - # We catch it and reraise it to provide a slightly more useful - # error message for the user. - try: - object_re = re.compile(object_regexp) - except SyntaxError: - raise SyntaxError("invalid object regexp: %s" % object_regexp) - try: - name_re = re.compile(name_regexp) - except SyntaxError: - raise SyntaxError("invalid name regexp: %s" % name_regexp) - if subname_regexp is not None: - try: - subname_re = re.compile(subname_regexp) - except SyntaxError: - raise SyntaxError("invalid subname regexp: %s" % subname_regexp) - else: - subname_re = None - return (object_re, name_re, subname_re) - - -def printer_enabled_p(printer): - """Internal utility to see if printer (or subprinter) is enabled.""" - if hasattr(printer, "enabled"): - return printer.enabled - else: - return True - - -class InfoPrettyPrinter(gdb.Command): - """GDB command to list all registered pretty-printers. - - Usage: info pretty-printer [OBJECT-REGEXP [NAME-REGEXP]] - - OBJECT-REGEXP is a regular expression matching the objects to list. - Objects are "global", the program space's file, and the objfiles within - that program space. - - NAME-REGEXP matches the name of the pretty-printer. - Individual printers in a collection are named as - printer-name;subprinter-name.""" - - def __init__(self): - super(InfoPrettyPrinter, self).__init__("info pretty-printer", gdb.COMMAND_DATA) - - @staticmethod - def enabled_string(printer): - """Return "" if PRINTER is enabled, otherwise " [disabled]".""" - if printer_enabled_p(printer): - return "" - else: - return " [disabled]" - - @staticmethod - def printer_name(printer): - """Return the printer's name.""" - if hasattr(printer, "name"): - return printer.name - if hasattr(printer, "__name__"): - return printer.__name__ - # This "shouldn't happen", but the public API allows for - # direct additions to the pretty-printer list, and we shouldn't - # crash because someone added a bogus printer. - # Plus we want to give the user a way to list unknown printers. - return "unknown" - - def list_pretty_printers(self, pretty_printers, name_re, subname_re): - """Print a list of pretty-printers.""" - # A potential enhancement is to provide an option to list printers in - # "lookup order" (i.e. unsorted). - sorted_pretty_printers = sorted( - copy.copy(pretty_printers), key=self.printer_name - ) - for printer in sorted_pretty_printers: - name = self.printer_name(printer) - enabled = self.enabled_string(printer) - if name_re.match(name): - print(" %s%s" % (name, enabled)) - if hasattr(printer, "subprinters") and printer.subprinters is not None: - sorted_subprinters = sorted( - copy.copy(printer.subprinters), key=self.printer_name - ) - for subprinter in sorted_subprinters: - if not subname_re or subname_re.match(subprinter.name): - print( - " %s%s" - % (subprinter.name, self.enabled_string(subprinter)) - ) - - def invoke1( - self, title, printer_list, obj_name_to_match, object_re, name_re, subname_re - ): - """Subroutine of invoke to simplify it.""" - if printer_list and object_re.match(obj_name_to_match): - print(title) - self.list_pretty_printers(printer_list, name_re, subname_re) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - (object_re, name_re, subname_re) = parse_printer_regexps(arg) - self.invoke1( - "global pretty-printers:", - gdb.pretty_printers, - "global", - object_re, - name_re, - subname_re, - ) - cp = gdb.current_progspace() - self.invoke1( - "progspace %s pretty-printers:" % cp.filename, - cp.pretty_printers, - "progspace", - object_re, - name_re, - subname_re, - ) - for objfile in gdb.objfiles(): - self.invoke1( - "objfile %s pretty-printers:" % objfile.filename, - objfile.pretty_printers, - objfile.filename, - object_re, - name_re, - subname_re, - ) - - -def count_enabled_printers(pretty_printers): - """Return a 2-tuple of number of enabled and total printers.""" - enabled = 0 - total = 0 - for printer in pretty_printers: - if hasattr(printer, "subprinters") and printer.subprinters is not None: - if printer_enabled_p(printer): - for subprinter in printer.subprinters: - if printer_enabled_p(subprinter): - enabled += 1 - total += len(printer.subprinters) - else: - if printer_enabled_p(printer): - enabled += 1 - total += 1 - return (enabled, total) - - -def count_all_enabled_printers(): - """Return a 2-tuble of the enabled state and total number of all printers. - This includes subprinters. - """ - enabled_count = 0 - total_count = 0 - (t_enabled, t_total) = count_enabled_printers(gdb.pretty_printers) - enabled_count += t_enabled - total_count += t_total - (t_enabled, t_total) = count_enabled_printers( - gdb.current_progspace().pretty_printers - ) - enabled_count += t_enabled - total_count += t_total - for objfile in gdb.objfiles(): - (t_enabled, t_total) = count_enabled_printers(objfile.pretty_printers) - enabled_count += t_enabled - total_count += t_total - return (enabled_count, total_count) - - -def pluralize(text, n, suffix="s"): - """Return TEXT pluralized if N != 1.""" - if n != 1: - return "%s%s" % (text, suffix) - else: - return text - - -def show_pretty_printer_enabled_summary(): - """Print the number of printers enabled/disabled. - We count subprinters individually. - """ - (enabled_count, total_count) = count_all_enabled_printers() - print("%d of %d printers enabled" % (enabled_count, total_count)) - - -def do_enable_pretty_printer_1(pretty_printers, name_re, subname_re, flag): - """Worker for enabling/disabling pretty-printers. - - Arguments: - pretty_printers: list of pretty-printers - name_re: regular-expression object to select printers - subname_re: regular expression object to select subprinters or None - if all are affected - flag: True for Enable, False for Disable - - Returns: - The number of printers affected. - This is just for informational purposes for the user. - """ - total = 0 - for printer in pretty_printers: - if ( - hasattr(printer, "name") - and name_re.match(printer.name) - or hasattr(printer, "__name__") - and name_re.match(printer.__name__) - ): - if hasattr(printer, "subprinters") and printer.subprinters is not None: - if not subname_re: - # Only record printers that change state. - if printer_enabled_p(printer) != flag: - for subprinter in printer.subprinters: - if printer_enabled_p(subprinter): - total += 1 - # NOTE: We preserve individual subprinter settings. - printer.enabled = flag - else: - # NOTE: Whether this actually disables the subprinter - # depends on whether the printer's lookup function supports - # the "enable" API. We can only assume it does. - for subprinter in printer.subprinters: - if subname_re.match(subprinter.name): - # Only record printers that change state. - if ( - printer_enabled_p(printer) - and printer_enabled_p(subprinter) != flag - ): - total += 1 - subprinter.enabled = flag - else: - # This printer has no subprinters. - # If the user does "disable pretty-printer .* .* foo" - # should we disable printers that don't have subprinters? - # How do we apply "foo" in this context? Since there is no - # "foo" subprinter it feels like we should skip this printer. - # There's still the issue of how to handle - # "disable pretty-printer .* .* .*", and every other variation - # that can match everything. For now punt and only support - # "disable pretty-printer .* .*" (i.e. subname is elided) - # to disable everything. - if not subname_re: - # Only record printers that change state. - if printer_enabled_p(printer) != flag: - total += 1 - printer.enabled = flag - return total - - -def do_enable_pretty_printer(arg, flag): - """Internal worker for enabling/disabling pretty-printers.""" - (object_re, name_re, subname_re) = parse_printer_regexps(arg) - - total = 0 - if object_re.match("global"): - total += do_enable_pretty_printer_1( - gdb.pretty_printers, name_re, subname_re, flag - ) - cp = gdb.current_progspace() - if object_re.match("progspace"): - total += do_enable_pretty_printer_1( - cp.pretty_printers, name_re, subname_re, flag - ) - for objfile in gdb.objfiles(): - if object_re.match(objfile.filename): - total += do_enable_pretty_printer_1( - objfile.pretty_printers, name_re, subname_re, flag - ) - - if flag: - state = "enabled" - else: - state = "disabled" - print("%d %s %s" % (total, pluralize("printer", total), state)) - - # Print the total list of printers currently enabled/disabled. - # This is to further assist the user in determining whether the result - # is expected. Since we use regexps to select it's useful. - show_pretty_printer_enabled_summary() - - -# Enable/Disable one or more pretty-printers. -# -# This is intended for use when a broken pretty-printer is shipped/installed -# and the user wants to disable that printer without disabling all the other -# printers. -# -# A useful addition would be -v (verbose) to show each printer affected. - - -class EnablePrettyPrinter(gdb.Command): - """GDB command to enable the specified pretty-printer. - - Usage: enable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]] - - OBJECT-REGEXP is a regular expression matching the objects to examine. - Objects are "global", the program space's file, and the objfiles within - that program space. - - NAME-REGEXP matches the name of the pretty-printer. - Individual printers in a collection are named as - printer-name;subprinter-name.""" - - def __init__(self): - super(EnablePrettyPrinter, self).__init__( - "enable pretty-printer", gdb.COMMAND_DATA - ) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - do_enable_pretty_printer(arg, True) - - -class DisablePrettyPrinter(gdb.Command): - """GDB command to disable the specified pretty-printer. - - Usage: disable pretty-printer [OBJECT-REGEXP [NAME-REGEXP]] - - OBJECT-REGEXP is a regular expression matching the objects to examine. - Objects are "global", the program space's file, and the objfiles within - that program space. - - NAME-REGEXP matches the name of the pretty-printer. - Individual printers in a collection are named as - printer-name;subprinter-name.""" - - def __init__(self): - super(DisablePrettyPrinter, self).__init__( - "disable pretty-printer", gdb.COMMAND_DATA - ) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - do_enable_pretty_printer(arg, False) - - -def register_pretty_printer_commands(): - """Call from a top level script to install the pretty-printer commands.""" - InfoPrettyPrinter() - EnablePrettyPrinter() - DisablePrettyPrinter() - - -register_pretty_printer_commands() diff --git a/Lib/gdb/command/prompt.py b/Lib/gdb/command/prompt.py deleted file mode 100644 index 2cfb25db30ccaa..00000000000000 --- a/Lib/gdb/command/prompt.py +++ /dev/null @@ -1,65 +0,0 @@ -# Extended prompt. -# Copyright (C) 2011-2024 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 . - -"""GDB command for working with extended prompts.""" - -import gdb -import gdb.prompt - - -class _ExtendedPrompt(gdb.Parameter): - """Set the extended prompt. - - Usage: set extended-prompt VALUE - - Substitutions are applied to VALUE to compute the real prompt. - - The currently defined substitutions are:""" - - # Add the prompt library's dynamically generated help to the - # __doc__ string. - __doc__ = __doc__ + "\n" + gdb.prompt.prompt_help() - - set_doc = "Set the extended prompt." - show_doc = "Show the extended prompt." - - def __init__(self): - super(_ExtendedPrompt, self).__init__( - "extended-prompt", gdb.COMMAND_SUPPORT, gdb.PARAM_STRING_NOESCAPE - ) - self.value = "" - self.hook_set = False - - def get_show_string(self, pvalue): - if self.value: - return "The extended prompt is: " + self.value - else: - return "The extended prompt is not set." - - def get_set_string(self): - if self.hook_set is False: - gdb.prompt_hook = self.before_prompt_hook - self.hook_set = True - return "" - - def before_prompt_hook(self, current): - if self.value: - return gdb.prompt.substitute_prompt(self.value) - else: - return None - - -_ExtendedPrompt() diff --git a/Lib/gdb/command/type_printers.py b/Lib/gdb/command/type_printers.py deleted file mode 100644 index a2be226850d6a7..00000000000000 --- a/Lib/gdb/command/type_printers.py +++ /dev/null @@ -1,126 +0,0 @@ -# Type printer commands. -# Copyright (C) 2010-2024 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 . - -import copy - -import gdb - -"""GDB commands for working with type-printers.""" - - -class InfoTypePrinter(gdb.Command): - """GDB command to list all registered type-printers. - - Usage: info type-printers""" - - def __init__(self): - super(InfoTypePrinter, self).__init__("info type-printers", gdb.COMMAND_DATA) - - def list_type_printers(self, type_printers): - """Print a list of type printers.""" - # A potential enhancement is to provide an option to list printers in - # "lookup order" (i.e. unsorted). - sorted_type_printers = sorted(copy.copy(type_printers), key=lambda x: x.name) - for printer in sorted_type_printers: - if printer.enabled: - enabled = "" - else: - enabled = " [disabled]" - print(" %s%s" % (printer.name, enabled)) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - sep = "" - for objfile in gdb.objfiles(): - if objfile.type_printers: - print("%sType printers for %s:" % (sep, objfile.filename)) - self.list_type_printers(objfile.type_printers) - sep = "\n" - if gdb.current_progspace().type_printers: - print("%sType printers for program space:" % sep) - self.list_type_printers(gdb.current_progspace().type_printers) - sep = "\n" - if gdb.type_printers: - print("%sGlobal type printers:" % sep) - self.list_type_printers(gdb.type_printers) - - -class _EnableOrDisableCommand(gdb.Command): - def __init__(self, setting, name): - super(_EnableOrDisableCommand, self).__init__(name, gdb.COMMAND_DATA) - self.setting = setting - - def set_some(self, name, printers): - result = False - for p in printers: - if name == p.name: - p.enabled = self.setting - result = True - return result - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - for name in arg.split(): - ok = False - for objfile in gdb.objfiles(): - if self.set_some(name, objfile.type_printers): - ok = True - if self.set_some(name, gdb.current_progspace().type_printers): - ok = True - if self.set_some(name, gdb.type_printers): - ok = True - if not ok: - print("No type printer named '%s'" % name) - - def add_some(self, result, word, printers): - for p in printers: - if p.name.startswith(word): - result.append(p.name) - - def complete(self, text, word): - result = [] - for objfile in gdb.objfiles(): - self.add_some(result, word, objfile.type_printers) - self.add_some(result, word, gdb.current_progspace().type_printers) - self.add_some(result, word, gdb.type_printers) - return result - - -class EnableTypePrinter(_EnableOrDisableCommand): - """GDB command to enable the specified type printer. - - Usage: enable type-printer NAME - - NAME is the name of the type-printer.""" - - def __init__(self): - super(EnableTypePrinter, self).__init__(True, "enable type-printer") - - -class DisableTypePrinter(_EnableOrDisableCommand): - """GDB command to disable the specified type-printer. - - Usage: disable type-printer NAME - - NAME is the name of the type-printer.""" - - def __init__(self): - super(DisableTypePrinter, self).__init__(False, "disable type-printer") - - -InfoTypePrinter() -EnableTypePrinter() -DisableTypePrinter() diff --git a/Lib/gdb/command/unwinders.py b/Lib/gdb/command/unwinders.py deleted file mode 100644 index b863b333aa0e57..00000000000000 --- a/Lib/gdb/command/unwinders.py +++ /dev/null @@ -1,200 +0,0 @@ -# Unwinder commands. -# Copyright 2015-2024 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 . - -import re - -import gdb - - -def validate_regexp(exp, idstring): - try: - return re.compile(exp) - except SyntaxError: - raise SyntaxError("Invalid %s regexp: %s." % (idstring, exp)) - - -def parse_unwinder_command_args(arg): - """Internal utility to parse unwinder command argv. - - Arguments: - arg: The arguments to the command. The format is: - [locus-regexp [name-regexp]] - - Returns: - A 2-tuple of compiled regular expressions. - - Raises: - SyntaxError: an error processing ARG - """ - - argv = gdb.string_to_argv(arg) - argc = len(argv) - if argc > 2: - raise SyntaxError("Too many arguments.") - locus_regexp = "" - name_regexp = "" - if argc >= 1: - locus_regexp = argv[0] - if argc >= 2: - name_regexp = argv[1] - return ( - validate_regexp(locus_regexp, "locus"), - validate_regexp(name_regexp, "unwinder"), - ) - - -class InfoUnwinder(gdb.Command): - """GDB command to list unwinders. - - Usage: info unwinder [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression matching the location of the - unwinder. If it is omitted, all registered unwinders from all - loci are listed. A locus can be 'global', 'progspace' to list - the unwinders from the current progspace, or a regular expression - matching filenames of objfiles. - - NAME-REGEXP is a regular expression to filter unwinder names. If - this omitted for a specified locus, then all registered unwinders - in the locus are listed.""" - - def __init__(self): - super(InfoUnwinder, self).__init__("info unwinder", gdb.COMMAND_STACK) - - def list_unwinders(self, title, unwinders, name_re): - """Lists the unwinders whose name matches regexp. - - Arguments: - title: The line to print before the list. - unwinders: The list of the unwinders. - name_re: unwinder name filter. - """ - if not unwinders: - return - print(title) - for unwinder in unwinders: - if name_re.match(unwinder.name): - print( - " %s%s" - % (unwinder.name, "" if unwinder.enabled else " [disabled]") - ) - - def invoke(self, arg, from_tty): - locus_re, name_re = parse_unwinder_command_args(arg) - if locus_re.match("global"): - self.list_unwinders("Global:", gdb.frame_unwinders, name_re) - if locus_re.match("progspace"): - cp = gdb.current_progspace() - self.list_unwinders( - "Progspace %s:" % cp.filename, cp.frame_unwinders, name_re - ) - for objfile in gdb.objfiles(): - if locus_re.match(objfile.filename): - self.list_unwinders( - "Objfile %s:" % objfile.filename, objfile.frame_unwinders, name_re - ) - - -def do_enable_unwinder1(unwinders, name_re, flag): - """Enable/disable unwinders whose names match given regex. - - Arguments: - unwinders: The list of unwinders. - name_re: Unwinder name filter. - flag: Enable/disable. - - Returns: - The number of unwinders affected. - """ - total = 0 - for unwinder in unwinders: - if name_re.match(unwinder.name): - unwinder.enabled = flag - total += 1 - return total - - -def do_enable_unwinder(arg, flag): - """Enable/disable unwinder(s).""" - (locus_re, name_re) = parse_unwinder_command_args(arg) - total = 0 - if locus_re.match("global"): - total += do_enable_unwinder1(gdb.frame_unwinders, name_re, flag) - if locus_re.match("progspace"): - total += do_enable_unwinder1( - gdb.current_progspace().frame_unwinders, name_re, flag - ) - for objfile in gdb.objfiles(): - if locus_re.match(objfile.filename): - total += do_enable_unwinder1(objfile.frame_unwinders, name_re, flag) - if total > 0: - gdb.invalidate_cached_frames() - print( - "%d unwinder%s %s" - % (total, "" if total == 1 else "s", "enabled" if flag else "disabled") - ) - - -class EnableUnwinder(gdb.Command): - """GDB command to enable unwinders. - - Usage: enable unwinder [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression specifying the unwinders to - enable. It can 'global', 'progspace', or the name of an objfile - within that progspace. - - NAME_REGEXP is a regular expression to filter unwinder names. If - this omitted for a specified locus, then all registered unwinders - in the locus are affected.""" - - def __init__(self): - super(EnableUnwinder, self).__init__("enable unwinder", gdb.COMMAND_STACK) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - do_enable_unwinder(arg, True) - - -class DisableUnwinder(gdb.Command): - """GDB command to disable the specified unwinder. - - Usage: disable unwinder [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression specifying the unwinders to - disable. It can 'global', 'progspace', or the name of an objfile - within that progspace. - - NAME_REGEXP is a regular expression to filter unwinder names. If - this omitted for a specified locus, then all registered unwinders - in the locus are affected.""" - - def __init__(self): - super(DisableUnwinder, self).__init__("disable unwinder", gdb.COMMAND_STACK) - - def invoke(self, arg, from_tty): - """GDB calls this to perform the command.""" - do_enable_unwinder(arg, False) - - -def register_unwinder_commands(): - """Installs the unwinder commands.""" - InfoUnwinder() - EnableUnwinder() - DisableUnwinder() - - -register_unwinder_commands() diff --git a/Lib/gdb/command/xmethods.py b/Lib/gdb/command/xmethods.py deleted file mode 100644 index f78622718585f1..00000000000000 --- a/Lib/gdb/command/xmethods.py +++ /dev/null @@ -1,271 +0,0 @@ -# Xmethod commands. -# Copyright 2013-2024 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 . - -import re - -import gdb - -"""GDB commands for working with xmethods.""" - - -def validate_xm_regexp(part_name, regexp): - try: - return re.compile(regexp) - except SyntaxError: - raise SyntaxError("Invalid %s regexp: %s", part_name, regexp) - - -def parse_xm_command_args(arg): - """Parses the arguments passed to a xmethod command. - - Arguments: - arg: The argument string passed to a xmethod command. - - Returns: - A 3-tuple: (, - , - ) - """ - argv = gdb.string_to_argv(arg) - argc = len(argv) - if argc > 2: - raise SyntaxError("Too many arguments to command.") - locus_regexp = "" - matcher_name_regexp = "" - xm_name_regexp = None - if argc >= 1: - locus_regexp = argv[0] - if argc == 2: - parts = argv[1].split(";", 1) - matcher_name_regexp = parts[0] - if len(parts) > 1: - xm_name_regexp = parts[1] - if xm_name_regexp: - name_re = validate_xm_regexp("xmethod name", xm_name_regexp) - else: - name_re = None - return ( - validate_xm_regexp("locus", locus_regexp), - validate_xm_regexp("matcher name", matcher_name_regexp), - name_re, - ) - - -def get_global_method_matchers(locus_re, matcher_re): - """Returns a dict of matching globally registered xmethods. - - Arguments: - locus_re: Even though only globally registered xmethods are - looked up, they will be looked up only if 'global' matches - LOCUS_RE. - matcher_re: The regular expression matching the names of xmethods. - - Returns: - A dict of matching globally registered xmethod matchers. The only - key in the dict will be 'global'. - """ - locus_str = "global" - xm_dict = {locus_str: []} - if locus_re.match("global"): - xm_dict[locus_str].extend([m for m in gdb.xmethods if matcher_re.match(m.name)]) - return xm_dict - - -def get_method_matchers_in_loci(loci, locus_re, matcher_re): - """Returns a dict of matching registered xmethods in the LOCI. - - Arguments: - loci: The list of loci to lookup matching xmethods in. - locus_re: If a locus is an objfile, then xmethod matchers will be - looked up in it only if its filename matches the regular - expression LOCUS_RE. If a locus is the current progspace, - then xmethod matchers will be looked up in it only if the - string "progspace" matches LOCUS_RE. - matcher_re: The regular expression to match the xmethod matcher - names. - - Returns: - A dict of matching xmethod matchers. The keys of the dict are the - filenames of the loci the xmethod matchers belong to. - """ - xm_dict = {} - for locus in loci: - if isinstance(locus, gdb.Progspace): - if not locus_re.match("progspace"): - continue - locus_type = "progspace" - else: - if not locus_re.match(locus.filename): - continue - locus_type = "objfile" - locus_str = "%s %s" % (locus_type, locus.filename) - xm_dict[locus_str] = [m for m in locus.xmethods if matcher_re.match(m.name)] - return xm_dict - - -def print_xm_info(xm_dict, name_re): - """Print a dictionary of xmethods.""" - - def get_status_string(m): - if not m.enabled: - return " [disabled]" - else: - return "" - - if not xm_dict: - return - for locus_str in xm_dict: - if not xm_dict[locus_str]: - continue - print("Xmethods in %s:" % locus_str) - for matcher in xm_dict[locus_str]: - print(" %s%s" % (matcher.name, get_status_string(matcher))) - if not matcher.methods: - continue - for m in matcher.methods: - if name_re is None or name_re.match(m.name): - print(" %s%s" % (m.name, get_status_string(m))) - - -def set_xm_status1(xm_dict, name_re, status): - """Set the status (enabled/disabled) of a dictionary of xmethods.""" - for locus_str, matchers in xm_dict.items(): - for matcher in matchers: - if not name_re: - # If the name regex is missing, then set the status of the - # matcher and move on. - matcher.enabled = status - continue - if not matcher.methods: - # The methods attribute could be None. Move on. - continue - for m in matcher.methods: - if name_re.match(m.name): - m.enabled = status - - -def set_xm_status(arg, status): - """Set the status (enabled/disabled) of xmethods matching ARG. - This is a helper function for enable/disable commands. ARG is the - argument string passed to the commands. - """ - locus_re, matcher_re, name_re = parse_xm_command_args(arg) - set_xm_status1(get_global_method_matchers(locus_re, matcher_re), name_re, status) - set_xm_status1( - get_method_matchers_in_loci([gdb.current_progspace()], locus_re, matcher_re), - name_re, - status, - ) - set_xm_status1( - get_method_matchers_in_loci(gdb.objfiles(), locus_re, matcher_re), - name_re, - status, - ) - - -class InfoXMethod(gdb.Command): - """GDB command to list registered xmethod matchers. - - Usage: info xmethod [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression matching the location of the - xmethod matchers. If it is omitted, all registered xmethod matchers - from all loci are listed. A locus could be 'global', a regular expression - matching the current program space's filename, or a regular expression - matching filenames of objfiles. Locus could be 'progspace' to specify that - only xmethods from the current progspace should be listed. - - NAME-REGEXP is a regular expression matching the names of xmethod - matchers. If this omitted for a specified locus, then all registered - xmethods in the locus are listed. To list only a certain xmethods - managed by a single matcher, the name regexp can be specified as - matcher-name-regexp;xmethod-name-regexp.""" - - def __init__(self): - super(InfoXMethod, self).__init__("info xmethod", gdb.COMMAND_DATA) - - def invoke(self, arg, from_tty): - locus_re, matcher_re, name_re = parse_xm_command_args(arg) - print_xm_info(get_global_method_matchers(locus_re, matcher_re), name_re) - print_xm_info( - get_method_matchers_in_loci( - [gdb.current_progspace()], locus_re, matcher_re - ), - name_re, - ) - print_xm_info( - get_method_matchers_in_loci(gdb.objfiles(), locus_re, matcher_re), name_re - ) - - -class EnableXMethod(gdb.Command): - """GDB command to enable a specified (group of) xmethod(s). - - Usage: enable xmethod [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression matching the location of the - xmethod matchers. If it is omitted, all registered xmethods matchers - from all loci are enabled. A locus could be 'global', a regular expression - matching the current program space's filename, or a regular expression - matching filenames of objfiles. Locus could be 'progspace' to specify that - only xmethods from the current progspace should be enabled. - - NAME-REGEXP is a regular expression matching the names of xmethods - within a given locus. If this omitted for a specified locus, then all - registered xmethod matchers in the locus are enabled. To enable only - a certain xmethods managed by a single matcher, the name regexp can be - specified as matcher-name-regexp;xmethod-name-regexp.""" - - def __init__(self): - super(EnableXMethod, self).__init__("enable xmethod", gdb.COMMAND_DATA) - - def invoke(self, arg, from_tty): - set_xm_status(arg, True) - - -class DisableXMethod(gdb.Command): - """GDB command to disable a specified (group of) xmethod(s). - - Usage: disable xmethod [LOCUS-REGEXP [NAME-REGEXP]] - - LOCUS-REGEXP is a regular expression matching the location of the - xmethod matchers. If it is omitted, all registered xmethod matchers - from all loci are disabled. A locus could be 'global', a regular - expression matching the current program space's filename, or a regular - expression filenames of objfiles. Locus could be 'progspace' to specify - that only xmethods from the current progspace should be disabled. - - NAME-REGEXP is a regular expression matching the names of xmethods - within a given locus. If this omitted for a specified locus, then all - registered xmethod matchers in the locus are disabled. To disable - only a certain xmethods managed by a single matcher, the name regexp - can be specified as matcher-name-regexp;xmethod-name-regexp.""" - - def __init__(self): - super(DisableXMethod, self).__init__("disable xmethod", gdb.COMMAND_DATA) - - def invoke(self, arg, from_tty): - set_xm_status(arg, False) - - -def register_xmethod_commands(): - """Installs the xmethod commands.""" - InfoXMethod() - EnableXMethod() - DisableXMethod() - - -register_xmethod_commands() diff --git a/Lib/gdb/dap/__init__.py b/Lib/gdb/dap/__init__.py deleted file mode 100644 index 51b95468a7026e..00000000000000 --- a/Lib/gdb/dap/__init__.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2022-2024 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 . - -import os - -# This must come before other DAP imports. -from . import startup - -# isort: split - -# Load modules that define commands. These imports intentionally -# ignore the unused import warning, as these modules are being loaded -# for their side effects -- namely, registering DAP commands with the -# server object. "F401" is the flake8 "imported but unused" code. -from . import breakpoint # noqa: F401 -from . import bt # noqa: F401 -from . import disassemble # noqa: F401 -from . import evaluate # noqa: F401 -from . import launch # noqa: F401 -from . import locations # noqa: F401 -from . import memory # noqa: F401 -from . import modules # noqa: F401 -from . import next # noqa: F401 -from . import pause # noqa: F401 -from . import scopes # noqa: F401 -from . import sources # noqa: F401 -from . import threads # noqa: F401 - -# isort: split -from .server import Server - - -def run(): - """Main entry point for the DAP server. - This is called by the GDB DAP interpreter.""" - startup.exec_and_log("set python print-stack full") - startup.exec_and_log("set pagination off") - - # We want to control gdb stdin and stdout entirely, so we dup - # them to new file descriptors. - saved_out = os.dup(1) - saved_in = os.dup(0) - # Make sure these are not inheritable. This is already the case - # for Unix, but not for Windows. - os.set_inheritable(saved_out, False) - os.set_inheritable(saved_in, False) - - # The new gdb (and inferior) stdin will just be /dev/null. For - # gdb, the "dap" interpreter also rewires the UI so that gdb - # doesn't try to read this (and thus see EOF and exit). - new_in = os.open(os.devnull, os.O_RDONLY) - os.dup2(new_in, 0, True) - os.close(new_in) - - # Make the new stdout be a pipe. This way the DAP code can easily - # read from the inferior and send OutputEvent to the client. - (rfd, wfd) = os.pipe() - os.set_inheritable(rfd, False) - os.dup2(wfd, 1, True) - # Also send stderr this way. - os.dup2(wfd, 2, True) - os.close(wfd) - - # Note the inferior output is opened in text mode. - global server - server = Server(open(saved_in, "rb"), open(saved_out, "wb"), open(rfd, "r")) - - -# Whether the interactive session has started. -session_started = False - - -def pre_command_loop(): - """DAP's pre_command_loop interpreter hook. This is called by the GDB DAP - interpreter.""" - global session_started - if not session_started: - # The pre_command_loop interpreter hook can be called several times. - # The first time it's called, it means we're starting an interactive - # session. - session_started = True - startup.thread_log("starting DAP server") - global server - startup.start_dap(server.main_loop) diff --git a/Lib/gdb/dap/breakpoint.py b/Lib/gdb/dap/breakpoint.py deleted file mode 100644 index e60265b2f69d83..00000000000000 --- a/Lib/gdb/dap/breakpoint.py +++ /dev/null @@ -1,443 +0,0 @@ -# Copyright 2022-2024 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 . - -import re -from contextlib import contextmanager - -# These are deprecated in 3.9, but required in older versions. -from typing import Optional, Sequence - -import gdb - -from .server import capability, request, send_event -from .sources import make_source -from .startup import DAPException, LogLevel, in_gdb_thread, log_stack, parse_and_eval -from .typecheck import type_check - -# True when suppressing new breakpoint events. -_suppress_bp = False - - -@contextmanager -def suppress_new_breakpoint_event(): - """Return a new context manager that suppresses new breakpoint events.""" - global _suppress_bp - saved = _suppress_bp - _suppress_bp = True - try: - yield None - finally: - _suppress_bp = saved - - -@in_gdb_thread -def _bp_modified(event): - global _suppress_bp - if not _suppress_bp: - send_event( - "breakpoint", - { - "reason": "changed", - "breakpoint": _breakpoint_descriptor(event), - }, - ) - - -@in_gdb_thread -def _bp_created(event): - global _suppress_bp - if not _suppress_bp: - send_event( - "breakpoint", - { - "reason": "new", - "breakpoint": _breakpoint_descriptor(event), - }, - ) - - -@in_gdb_thread -def _bp_deleted(event): - global _suppress_bp - if not _suppress_bp: - send_event( - "breakpoint", - { - "reason": "removed", - "breakpoint": _breakpoint_descriptor(event), - }, - ) - - -gdb.events.breakpoint_created.connect(_bp_created) -gdb.events.breakpoint_modified.connect(_bp_modified) -gdb.events.breakpoint_deleted.connect(_bp_deleted) - - -# Map from the breakpoint "kind" (like "function") to a second map, of -# breakpoints of that type. The second map uses the breakpoint spec -# as a key, and the gdb.Breakpoint itself as a value. This is used to -# implement the clearing behavior specified by the protocol, while -# allowing for reuse when a breakpoint can be kept. -breakpoint_map = {} - - -@in_gdb_thread -def _breakpoint_descriptor(bp): - "Return the Breakpoint object descriptor given a gdb Breakpoint." - result = { - "id": bp.number, - "verified": not bp.pending, - } - if bp.pending: - result["reason"] = "pending" - if bp.locations: - # Just choose the first location, because DAP doesn't allow - # multiple locations. See - # https://github.com/microsoft/debug-adapter-protocol/issues/13 - loc = bp.locations[0] - if loc.source: - (filename, line) = loc.source - if loc.fullname is not None: - filename = loc.fullname - - result.update( - { - "source": make_source(filename), - "line": line, - } - ) - - if loc.address: - result["instructionReference"] = hex(loc.address) - - return result - - -# Extract entries from a hash table and return a list of them. Each -# entry is a string. If a key of that name appears in the hash table, -# it is removed and pushed on the result list; if it does not appear, -# None is pushed on the list. -def _remove_entries(table, *names): - return [table.pop(name, None) for name in names] - - -# Helper function to set some breakpoints according to a list of -# specifications and a callback function to do the work of creating -# the breakpoint. -@in_gdb_thread -def _set_breakpoints_callback(kind, specs, creator): - global breakpoint_map - # Try to reuse existing breakpoints if possible. - if kind in breakpoint_map: - saved_map = breakpoint_map[kind] - else: - saved_map = {} - breakpoint_map[kind] = {} - result = [] - with suppress_new_breakpoint_event(): - for spec in specs: - # It makes sense to reuse a breakpoint even if the condition - # or ignore count differs, so remove these entries from the - # spec first. - (condition, hit_condition) = _remove_entries( - spec, "condition", "hitCondition" - ) - keyspec = frozenset(spec.items()) - - # Create or reuse a breakpoint. If asked, set the condition - # or the ignore count. Catch errors coming from gdb and - # report these as an "unverified" breakpoint. - bp = None - try: - if keyspec in saved_map: - bp = saved_map.pop(keyspec) - else: - bp = creator(**spec) - - bp.condition = condition - if hit_condition is None: - bp.ignore_count = 0 - else: - bp.ignore_count = int( - parse_and_eval(hit_condition, global_context=True) - ) - - # Reaching this spot means success. - breakpoint_map[kind][keyspec] = bp - result.append(_breakpoint_descriptor(bp)) - # Exceptions other than gdb.error are possible here. - except Exception as e: - # Don't normally want to see this, as it interferes with - # the test suite. - log_stack(LogLevel.FULL) - # Maybe the breakpoint was made but setting an attribute - # failed. We still want this to fail. - if bp is not None: - bp.delete() - # Breakpoint creation failed. - result.append( - { - "verified": False, - "reason": "failed", - "message": str(e), - } - ) - - # Delete any breakpoints that were not reused. - for entry in saved_map.values(): - entry.delete() - return result - - -class _PrintBreakpoint(gdb.Breakpoint): - def __init__(self, logMessage, **args): - super().__init__(**args) - # Split the message up for easier processing. - self.message = re.split("{(.*?)}", logMessage) - - def stop(self): - output = "" - for idx, item in enumerate(self.message): - if idx % 2 == 0: - # Even indices are plain text. - output += item - else: - # Odd indices are expressions to substitute. The {} - # have already been stripped by the placement of the - # regex capture in the 'split' call. - try: - # No real need to use the DAP parse_and_eval here. - val = gdb.parse_and_eval(item) - output += str(val) - except Exception as e: - output += "<" + str(e) + ">" - send_event( - "output", - { - "category": "console", - "output": output, - }, - ) - # Do not stop. - return False - - -# Set a single breakpoint or a log point. Returns the new breakpoint. -# Note that not every spec will pass logMessage, so here we use a -# default. -@in_gdb_thread -def _set_one_breakpoint(*, logMessage=None, **args): - if logMessage is not None: - return _PrintBreakpoint(logMessage, **args) - else: - return gdb.Breakpoint(**args) - - -# Helper function to set ordinary breakpoints according to a list of -# specifications. -@in_gdb_thread -def _set_breakpoints(kind, specs): - return _set_breakpoints_callback(kind, specs, _set_one_breakpoint) - - -# A helper function that rewrites a SourceBreakpoint into the internal -# form passed to the creator. This function also allows for -# type-checking of each SourceBreakpoint. -@type_check -def _rewrite_src_breakpoint( - *, - # This is a Source but we don't type-check it. - source, - line: int, - condition: Optional[str] = None, - hitCondition: Optional[str] = None, - logMessage: Optional[str] = None, - **args, -): - return { - "source": source["path"], - "line": line, - "condition": condition, - "hitCondition": hitCondition, - "logMessage": logMessage, - } - - -@request("setBreakpoints") -@capability("supportsHitConditionalBreakpoints") -@capability("supportsConditionalBreakpoints") -@capability("supportsLogPoints") -def set_breakpoint(*, source, breakpoints: Sequence = (), **args): - if "path" not in source: - result = [] - else: - # Setting 'source' in BP avoids any Python error if BP already - # has a 'source' parameter. Setting this isn't in the spec, - # but it is better to be safe. See PR dap/30820. - specs = [] - for bp in breakpoints: - bp["source"] = source - specs.append(_rewrite_src_breakpoint(**bp)) - # Be sure to include the path in the key, so that we only - # clear out breakpoints coming from this same source. - key = "source:" + source["path"] - result = _set_breakpoints(key, specs) - return { - "breakpoints": result, - } - - -# A helper function that rewrites a FunctionBreakpoint into the -# internal form passed to the creator. This function also allows for -# type-checking of each FunctionBreakpoint. -@type_check -def _rewrite_fn_breakpoint( - *, - name: str, - condition: Optional[str] = None, - hitCondition: Optional[str] = None, - **args, -): - return { - "function": name, - "condition": condition, - "hitCondition": hitCondition, - } - - -@request("setFunctionBreakpoints") -@capability("supportsFunctionBreakpoints") -def set_fn_breakpoint(*, breakpoints: Sequence, **args): - specs = [_rewrite_fn_breakpoint(**bp) for bp in breakpoints] - return { - "breakpoints": _set_breakpoints("function", specs), - } - - -# A helper function that rewrites an InstructionBreakpoint into the -# internal form passed to the creator. This function also allows for -# type-checking of each InstructionBreakpoint. -@type_check -def _rewrite_insn_breakpoint( - *, - instructionReference: str, - offset: Optional[int] = None, - condition: Optional[str] = None, - hitCondition: Optional[str] = None, - **args, -): - # There's no way to set an explicit address breakpoint from - # Python, so we rely on "spec" instead. - val = "*" + instructionReference - if offset is not None: - val = val + " + " + str(offset) - return { - "spec": val, - "condition": condition, - "hitCondition": hitCondition, - } - - -@request("setInstructionBreakpoints") -@capability("supportsInstructionBreakpoints") -def set_insn_breakpoints( - *, breakpoints: Sequence, offset: Optional[int] = None, **args -): - specs = [_rewrite_insn_breakpoint(**bp) for bp in breakpoints] - return { - "breakpoints": _set_breakpoints("instruction", specs), - } - - -@in_gdb_thread -def _catch_exception(filterId, **args): - if filterId in ("assert", "exception", "throw", "rethrow", "catch"): - cmd = "-catch-" + filterId - else: - raise DAPException("Invalid exception filterID: " + str(filterId)) - result = gdb.execute_mi(cmd) - # A little lame that there's no more direct way. - for bp in gdb.breakpoints(): - if bp.number == result["bkptno"]: - return bp - # Not a DAPException because this is definitely unexpected. - raise Exception("Could not find catchpoint after creating") - - -@in_gdb_thread -def _set_exception_catchpoints(filter_options): - return _set_breakpoints_callback("exception", filter_options, _catch_exception) - - -# A helper function that rewrites an ExceptionFilterOptions into the -# internal form passed to the creator. This function also allows for -# type-checking of each ExceptionFilterOptions. -@type_check -def _rewrite_exception_breakpoint( - *, - filterId: str, - condition: Optional[str] = None, - # Note that exception breakpoints do not support a hit count. - **args, -): - return { - "filterId": filterId, - "condition": condition, - } - - -@request("setExceptionBreakpoints") -@capability("supportsExceptionFilterOptions") -@capability( - "exceptionBreakpointFilters", - ( - { - "filter": "assert", - "label": "Ada assertions", - "supportsCondition": True, - }, - { - "filter": "exception", - "label": "Ada exceptions", - "supportsCondition": True, - }, - { - "filter": "throw", - "label": "C++ exceptions, when thrown", - "supportsCondition": True, - }, - { - "filter": "rethrow", - "label": "C++ exceptions, when re-thrown", - "supportsCondition": True, - }, - { - "filter": "catch", - "label": "C++ exceptions, when caught", - "supportsCondition": True, - }, - ), -) -def set_exception_breakpoints( - *, filters: Sequence[str], filterOptions: Sequence = (), **args -): - # Convert the 'filters' to the filter-options style. - options = [{"filterId": filter} for filter in filters] - options.extend(filterOptions) - options = [_rewrite_exception_breakpoint(**bp) for bp in options] - return { - "breakpoints": _set_exception_catchpoints(options), - } diff --git a/Lib/gdb/dap/bt.py b/Lib/gdb/dap/bt.py deleted file mode 100644 index 668bcc7ce238d8..00000000000000 --- a/Lib/gdb/dap/bt.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 2022-2024 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 . - -# This is deprecated in 3.9, but required in older versions. -from typing import Optional - -import gdb - -from .frames import dap_frame_generator -from .modules import module_id -from .scopes import symbol_value -from .server import capability, request -from .sources import make_source -from .startup import in_gdb_thread -from .state import set_thread -from .typecheck import type_check -from .varref import apply_format - - -# Helper function to compute parameter information for a stack frame. -@in_gdb_thread -def _compute_parameters(frame, stack_format): - arg_iter = frame.frame_args() - if arg_iter is None: - return "" - result = [] - for arg in arg_iter: - desc = [] - name, val = symbol_value(arg, frame) - # We don't try to use any particular language's syntax for the - # output here. - if stack_format["parameterTypes"]: - desc.append("[" + str(val.type) + "]") - if stack_format["parameterNames"]: - desc.append(name) - # If both the name and the value are requested, insert an - # '=' for clarity. - if stack_format["parameterValues"]: - desc.append("=") - if stack_format["parameterValues"]: - desc.append(val.format_string(summary=True)) - result.append(" ".join(desc)) - return ", ".join(result) - - -# Helper function to compute a stack trace. -@in_gdb_thread -def _backtrace(thread_id, levels, startFrame, stack_format): - with apply_format(stack_format): - set_thread(thread_id) - frames = [] - frame_iter = dap_frame_generator(startFrame, levels, stack_format["includeAll"]) - for frame_id, current_frame in frame_iter: - pc = current_frame.address() - # The stack frame format affects the name, so we build it up - # piecemeal and assign it at the end. - name = current_frame.function() - # The meaning of StackFrameFormat.parameters was clarified - # in https://github.com/microsoft/debug-adapter-protocol/issues/411. - if stack_format["parameters"] and ( - stack_format["parameterTypes"] - or stack_format["parameterNames"] - or stack_format["parameterValues"] - ): - name += "(" + _compute_parameters(current_frame, stack_format) + ")" - newframe = { - "id": frame_id, - # This must always be supplied, but we will set it - # correctly later if that is possible. - "line": 0, - # GDB doesn't support columns. - "column": 0, - "instructionPointerReference": hex(pc), - } - line = current_frame.line() - if line is not None: - newframe["line"] = line - if stack_format["line"]: - name += ", line " + str(line) - objfile = gdb.current_progspace().objfile_for_address(pc) - if objfile is not None: - newframe["moduleId"] = module_id(objfile) - if stack_format["module"]: - name += ", module " + objfile.username - filename = current_frame.filename() - if filename is not None: - newframe["source"] = make_source(filename) - newframe["name"] = name - frames.append(newframe) - # Note that we do not calculate totalFrames here. Its absence - # tells the client that it may simply ask for frames until a - # response yields fewer frames than requested. - return { - "stackFrames": frames, - } - - -# A helper function that checks the types of the elements of a -# StackFrameFormat, and converts this to a dict where all the members -# are set. This simplifies the implementation code a bit. -@type_check -def check_stack_frame( - *, - # Note that StackFrameFormat extends ValueFormat, which is why - # "hex" appears here. - hex: Optional[bool] = False, - parameters: Optional[bool] = False, - parameterTypes: Optional[bool] = False, - parameterNames: Optional[bool] = False, - parameterValues: Optional[bool] = False, - line: Optional[bool] = False, - module: Optional[bool] = False, - includeAll: Optional[bool] = False, - **rest -): - return { - "hex": hex, - "parameters": parameters, - "parameterTypes": parameterTypes, - "parameterNames": parameterNames, - "parameterValues": parameterValues, - "line": line, - "module": module, - "includeAll": includeAll, - } - - -@request("stackTrace") -@capability("supportsDelayedStackTraceLoading") -def stacktrace( - *, levels: int = 0, startFrame: int = 0, threadId: int, format=None, **extra -): - # It's simpler if the format is always set. - if format is None: - format = {} - format = check_stack_frame(**format) - return _backtrace(threadId, levels, startFrame, format) diff --git a/Lib/gdb/dap/disassemble.py b/Lib/gdb/dap/disassemble.py deleted file mode 100644 index d65790a40b0eeb..00000000000000 --- a/Lib/gdb/dap/disassemble.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2022-2024 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 . - -import gdb - -from .server import capability, request -from .sources import make_source - - -# This tracks labels associated with a disassembly request and helps -# with updating individual instructions. -class _BlockTracker: - def __init__(self): - # Map from PC to symbol names. A given PC is assumed to have - # just one label -- DAP wouldn't let us return multiple labels - # anyway. - self.labels = {} - # List of blocks that have already been handled. Note that - # blocks aren't hashable so a set is not used. - self.blocks = [] - - # Add a gdb.Block and its superblocks, ignoring the static and - # global block. BLOCK can also be None, which is ignored. - def add_block(self, block): - while block is not None: - if block.is_static or block.is_global or block in self.blocks: - return - self.blocks.append(block) - if block.function is not None: - self.labels[block.start] = block.function.name - for sym in block: - if sym.addr_class == gdb.SYMBOL_LOC_LABEL: - self.labels[int(sym.value())] = sym.name - block = block.superblock - - # Add PC to this tracker. Update RESULT as appropriate with - # information about the source and any label. - def add_pc(self, pc, result): - self.add_block(gdb.block_for_pc(pc)) - if pc in self.labels: - result["symbol"] = self.labels[pc] - sal = gdb.find_pc_line(pc) - if sal.symtab is not None: - if sal.line != 0: - result["line"] = sal.line - if sal.symtab.filename is not None: - # The spec says this can be omitted in some - # situations, but it's a little simpler to just always - # supply it. - result["location"] = make_source(sal.symtab.filename) - - -@request("disassemble") -@capability("supportsDisassembleRequest") -def disassemble( - *, - memoryReference: str, - offset: int = 0, - instructionOffset: int = 0, - instructionCount: int, - **extra -): - pc = int(memoryReference, 0) + offset - inf = gdb.selected_inferior() - try: - arch = gdb.selected_frame().architecture() - except gdb.error: - # Maybe there was no frame. - arch = inf.architecture() - tracker = _BlockTracker() - result = [] - total_count = instructionOffset + instructionCount - for elt in arch.disassemble(pc, count=total_count)[instructionOffset:]: - mem = inf.read_memory(elt["addr"], elt["length"]) - insn = { - "address": hex(elt["addr"]), - "instruction": elt["asm"], - "instructionBytes": mem.hex(), - } - tracker.add_pc(elt["addr"], insn) - result.append(insn) - return { - "instructions": result, - } diff --git a/Lib/gdb/dap/evaluate.py b/Lib/gdb/dap/evaluate.py deleted file mode 100644 index 34843f423d8394..00000000000000 --- a/Lib/gdb/dap/evaluate.py +++ /dev/null @@ -1,138 +0,0 @@ -# Copyright 2022-2024 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 . - -# This is deprecated in 3.9, but required in older versions. -from typing import Optional - -import gdb - -from .frames import select_frame -from .server import capability, client_bool_capability, request -from .startup import DAPException, in_gdb_thread, parse_and_eval -from .varref import VariableReference, apply_format, find_variable - - -class EvaluateResult(VariableReference): - def __init__(self, value): - super().__init__(None, value, "result") - - -# Helper function to evaluate an expression in a certain frame. -@in_gdb_thread -def _evaluate(expr, frame_id, value_format): - with apply_format(value_format): - global_context = True - if frame_id is not None: - select_frame(frame_id) - global_context = False - val = parse_and_eval(expr, global_context=global_context) - ref = EvaluateResult(val) - return ref.to_object() - - -# Like _evaluate but ensure that the expression cannot cause side -# effects. -@in_gdb_thread -def _eval_for_hover(expr, frame_id, value_format): - with gdb.with_parameter("may-write-registers", "off"): - with gdb.with_parameter("may-write-memory", "off"): - with gdb.with_parameter("may-call-functions", "off"): - return _evaluate(expr, frame_id, value_format) - - -class _SetResult(VariableReference): - def __init__(self, value): - super().__init__(None, value, "value") - - -# Helper function to evaluate a gdb command in a certain frame. -@in_gdb_thread -def _repl(command, frame_id): - if frame_id is not None: - select_frame(frame_id) - val = gdb.execute(command, from_tty=True, to_string=True) - return { - "result": val, - "variablesReference": 0, - } - - -@request("evaluate") -@capability("supportsEvaluateForHovers") -@capability("supportsValueFormattingOptions") -def eval_request( - *, - expression: str, - frameId: Optional[int] = None, - context: str = "variables", - format=None, - **args, -): - if context in ("watch", "variables"): - # These seem to be expression-like. - return _evaluate(expression, frameId, format) - elif context == "hover": - return _eval_for_hover(expression, frameId, format) - elif context == "repl": - # Ignore the format for repl evaluation. - return _repl(expression, frameId) - else: - raise DAPException('unknown evaluate context "' + context + '"') - - -@request("variables") -# Note that we ignore the 'filter' field. That seems to be -# specific to javascript. -def variables( - *, variablesReference: int, start: int = 0, count: int = 0, format=None, **args -): - # This behavior was clarified here: - # https://github.com/microsoft/debug-adapter-protocol/pull/394 - if not client_bool_capability("supportsVariablePaging"): - start = 0 - count = 0 - with apply_format(format): - var = find_variable(variablesReference) - children = var.fetch_children(start, count) - return {"variables": [x.to_object() for x in children]} - - -@capability("supportsSetExpression") -@request("setExpression") -def set_expression( - *, expression: str, value: str, frameId: Optional[int] = None, format=None, **args -): - with apply_format(format): - global_context = True - if frameId is not None: - select_frame(frameId) - global_context = False - lhs = parse_and_eval(expression, global_context=global_context) - rhs = parse_and_eval(value, global_context=global_context) - lhs.assign(rhs) - return _SetResult(lhs).to_object() - - -@capability("supportsSetVariable") -@request("setVariable") -def set_variable( - *, variablesReference: int, name: str, value: str, format=None, **args -): - with apply_format(format): - var = find_variable(variablesReference) - lhs = var.find_child_by_name(name) - rhs = parse_and_eval(value) - lhs.assign(rhs) - return lhs.to_object() diff --git a/Lib/gdb/dap/events.py b/Lib/gdb/dap/events.py deleted file mode 100644 index 276d3145b9aa2e..00000000000000 --- a/Lib/gdb/dap/events.py +++ /dev/null @@ -1,287 +0,0 @@ -# Copyright 2022-2024 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 . - -import gdb - -from .modules import is_module, make_module -from .scopes import set_finish_value -from .server import send_event -from .startup import exec_and_log, in_gdb_thread, log - -# True when the inferior is thought to be running, False otherwise. -# This may be accessed from any thread, which can be racy. However, -# this unimportant because this global is only used for the -# 'notStopped' response, which itself is inherently racy. -inferior_running = False - - -@in_gdb_thread -def _on_exit(event): - global inferior_running - inferior_running = False - code = 0 - if hasattr(event, "exit_code"): - code = event.exit_code - send_event( - "exited", - { - "exitCode": code, - }, - ) - send_event("terminated") - - -# When None, a "process" event has already been sent. When a string, -# it is the "startMethod" for that event. -_process_event_kind = None - - -@in_gdb_thread -def send_process_event_once(): - global _process_event_kind - if _process_event_kind is not None: - inf = gdb.selected_inferior() - is_local = inf.connection.type == "native" - data = { - "isLocalProcess": is_local, - "startMethod": _process_event_kind, - # Could emit 'pointerSize' here too if we cared to. - } - if inf.progspace.filename: - data["name"] = inf.progspace.filename - if is_local: - data["systemProcessId"] = inf.pid - send_event("process", data) - _process_event_kind = None - - -@in_gdb_thread -def expect_process(reason): - """Indicate that DAP is starting or attaching to a process. - - REASON is the "startMethod" to include in the "process" event. - """ - global _process_event_kind - _process_event_kind = reason - - -@in_gdb_thread -def thread_event(event, reason): - send_process_event_once() - send_event( - "thread", - { - "reason": reason, - "threadId": event.inferior_thread.global_num, - }, - ) - - -@in_gdb_thread -def _new_thread(event): - global inferior_running - inferior_running = True - thread_event(event, "started") - - -@in_gdb_thread -def _thread_exited(event): - thread_event(event, "exited") - - -@in_gdb_thread -def _new_objfile(event): - if is_module(event.new_objfile): - send_event( - "module", - { - "reason": "new", - "module": make_module(event.new_objfile), - }, - ) - - -@in_gdb_thread -def _objfile_removed(event): - send_process_event_once() - if is_module(event.objfile): - send_event( - "module", - { - "reason": "removed", - "module": make_module(event.objfile), - }, - ) - - -_suppress_cont = False - - -@in_gdb_thread -def _cont(event): - global inferior_running - inferior_running = True - global _suppress_cont - if _suppress_cont: - log("_suppress_cont case") - _suppress_cont = False - else: - send_event( - "continued", - { - "threadId": gdb.selected_thread().global_num, - "allThreadsContinued": True, - }, - ) - - -_expected_stop_reason = None - - -@in_gdb_thread -def expect_stop(reason: str): - """Indicate that the next stop should be for REASON.""" - global _expected_stop_reason - _expected_stop_reason = reason - - -_expected_pause = False - - -@in_gdb_thread -def exec_and_expect_stop(cmd, expected_pause=False): - """A wrapper for exec_and_log that sets the continue-suppression flag. - - When EXPECTED_PAUSE is True, a stop that looks like a pause (e.g., - a SIGINT) will be reported as "pause" instead. - """ - global _expected_pause - _expected_pause = expected_pause - global _suppress_cont - # If we're expecting a pause, then we're definitely not - # continuing. - _suppress_cont = not expected_pause - # FIXME if the call fails should we clear _suppress_cont? - exec_and_log(cmd) - - -# Map from gdb stop reasons to DAP stop reasons. Some of these can't -# be seen ordinarily in DAP -- only if the client lets the user toggle -# some settings (e.g. stop-on-solib-events) or enter commands (e.g., -# 'until'). -stop_reason_map = { - "breakpoint-hit": "breakpoint", - "watchpoint-trigger": "data breakpoint", - "read-watchpoint-trigger": "data breakpoint", - "access-watchpoint-trigger": "data breakpoint", - "function-finished": "step", - "location-reached": "step", - "watchpoint-scope": "data breakpoint", - "end-stepping-range": "step", - "exited-signalled": "exited", - "exited": "exited", - "exited-normally": "exited", - "signal-received": "signal", - "solib-event": "solib", - "fork": "fork", - "vfork": "vfork", - "syscall-entry": "syscall-entry", - "syscall-return": "syscall-return", - "exec": "exec", - "no-history": "no-history", -} - - -@in_gdb_thread -def _on_stop(event): - global inferior_running - inferior_running = False - - log("entering _on_stop: " + repr(event)) - if hasattr(event, "details"): - log(" details: " + repr(event.details)) - obj = { - "threadId": gdb.selected_thread().global_num, - "allThreadsStopped": True, - } - if isinstance(event, gdb.BreakpointEvent): - obj["hitBreakpointIds"] = [x.number for x in event.breakpoints] - if hasattr(event, "details") and "finish-value" in event.details: - set_finish_value(event.details["finish-value"]) - - global _expected_pause - global _expected_stop_reason - if _expected_stop_reason is not None: - obj["reason"] = _expected_stop_reason - _expected_stop_reason = None - elif "reason" not in event.details: - # This can only really happen via a "repl" evaluation of - # something like "attach". In this case just emit a generic - # stop. - obj["reason"] = "stopped" - elif ( - _expected_pause - and event.details["reason"] == "signal-received" - and event.details["signal-name"] in ("SIGINT", "SIGSTOP") - ): - obj["reason"] = "pause" - else: - global stop_reason_map - obj["reason"] = stop_reason_map[event.details["reason"]] - _expected_pause = False - send_event("stopped", obj) - - -# This keeps a bit of state between the start of an inferior call and -# the end. If the inferior was already running when the call started -# (as can happen if a breakpoint condition calls a function), then we -# do not want to emit 'continued' or 'stop' events for the call. Note -# that, for some reason, gdb.events.cont does not fire for an infcall. -_infcall_was_running = False - - -@in_gdb_thread -def _on_inferior_call(event): - global _infcall_was_running - global inferior_running - if isinstance(event, gdb.InferiorCallPreEvent): - _infcall_was_running = inferior_running - if not _infcall_was_running: - _cont(None) - else: - # If the inferior is already marked as stopped here, then that - # means that the call caused some other stop, and we don't - # want to double-report it. - if not _infcall_was_running and inferior_running: - inferior_running = False - obj = { - "threadId": gdb.selected_thread().global_num, - "allThreadsStopped": True, - # DAP says any string is ok. - "reason": "function call", - } - global _expected_pause - _expected_pause = False - send_event("stopped", obj) - - -gdb.events.stop.connect(_on_stop) -gdb.events.exited.connect(_on_exit) -gdb.events.new_thread.connect(_new_thread) -gdb.events.thread_exited.connect(_thread_exited) -gdb.events.cont.connect(_cont) -gdb.events.new_objfile.connect(_new_objfile) -gdb.events.free_objfile.connect(_objfile_removed) -gdb.events.inferior_call.connect(_on_inferior_call) diff --git a/Lib/gdb/dap/frames.py b/Lib/gdb/dap/frames.py deleted file mode 100644 index 07a4e3ea793d22..00000000000000 --- a/Lib/gdb/dap/frames.py +++ /dev/null @@ -1,149 +0,0 @@ -# Copyright 2022-2024 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 . - -import itertools - -import gdb -from gdb.frames import frame_iterator - -from .startup import in_gdb_thread - -# A list of all the frames we've reported. A frame's index in the -# list is its ID. We don't use a hash here because frames are not -# hashable. -_all_frames = [] - - -# Map from a global thread ID to a memoizing frame iterator. -_iter_map = {} - - -# Clear all the frame IDs. -@in_gdb_thread -def _clear_frame_ids(evt): - global _all_frames - _all_frames = [] - global _iter_map - _iter_map = {} - - -# Clear the frame ID map whenever the inferior runs. -gdb.events.cont.connect(_clear_frame_ids) - - -@in_gdb_thread -def frame_for_id(id): - """Given a frame identifier ID, return the corresponding frame.""" - global _all_frames - return _all_frames[id] - - -@in_gdb_thread -def select_frame(id): - """Given a frame identifier ID, select the corresponding frame.""" - frame = frame_for_id(id) - frame.inferior_frame().select() - - -# A simple memoizing iterator. Note that this is not very robust. -# For example, you can't start two copies of the iterator and then -# alternate fetching items from each. Instead, it implements just -# what is needed for the current callers. -class _MemoizingIterator: - def __init__(self, iterator): - self.iterator = iterator - self.seen = [] - - def __iter__(self): - # First the memoized items. - for item in self.seen: - yield item - # Now memoize new items. - for item in self.iterator: - self.seen.append(item) - yield item - - -# A generator that fetches frames and pairs them with a frame ID. It -# yields tuples of the form (ID, ELIDED, FRAME), where ID is the -# generated ID, ELIDED is a boolean indicating if the frame should be -# elided, and FRAME is the frame itself. This approach lets us -# memoize the result and assign consistent IDs, independent of how -# "includeAll" is set in the request. -@in_gdb_thread -def _frame_id_generator(): - try: - base_iterator = frame_iterator(gdb.newest_frame(), 0, -1) - except gdb.error: - base_iterator = () - - # Helper function to assign an ID to a frame. - def get_id(frame): - global _all_frames - num = len(_all_frames) - _all_frames.append(frame) - return num - - def yield_frames(iterator, for_elided): - for frame in iterator: - # Unfortunately the frame filter docs don't describe - # whether the elided frames conceptually come before or - # after the eliding frame. Here we choose after. - yield (get_id(frame), for_elided, frame) - - elided = frame.elided() - if elided is not None: - yield from yield_frames(frame.elided(), True) - - yield from yield_frames(base_iterator, False) - - -# Return the memoizing frame iterator for the selected thread. -@in_gdb_thread -def _get_frame_iterator(): - thread_id = gdb.selected_thread().global_num - global _iter_map - if thread_id not in _iter_map: - _iter_map[thread_id] = _MemoizingIterator(_frame_id_generator()) - return _iter_map[thread_id] - - -# A helper function that creates an iterable that returns (ID, FRAME) -# pairs. It uses the memoizing frame iterator, but also handles the -# "includeAll" member of StackFrameFormat. -@in_gdb_thread -def dap_frame_generator(frame_low, levels, include_all): - """A generator that yields identifiers and frames. - - Each element is a pair of the form (ID, FRAME). - ID is the internally-assigned frame ID. - FRAME is a FrameDecorator of some kind. - - Arguments are as to the stackTrace request.""" - - base_iterator = _get_frame_iterator() - - if not include_all: - base_iterator = itertools.filterfalse(lambda item: item[1], base_iterator) - - if levels == 0: - # Zero means all remaining frames. - frame_high = None - else: - frame_high = frame_low + levels - base_iterator = itertools.islice(base_iterator, frame_low, frame_high) - - for ident, _, frame in base_iterator: - yield (ident, frame) diff --git a/Lib/gdb/dap/io.py b/Lib/gdb/dap/io.py deleted file mode 100644 index 03031a72393e72..00000000000000 --- a/Lib/gdb/dap/io.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2022-2024 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 . - -import json - -from .startup import LogLevel, log, log_stack, start_thread - - -def read_json(stream): - """Read a JSON-RPC message from STREAM. - The decoded object is returned. - None is returned on EOF.""" - try: - # First read and parse the header. - content_length = None - while True: - line = stream.readline() - # If the line is empty, we hit EOF. - if len(line) == 0: - log("EOF") - return None - line = line.strip() - if line == b"": - break - if line.startswith(b"Content-Length:"): - line = line[15:].strip() - content_length = int(line) - continue - log("IGNORED: <<<%s>>>" % line) - data = bytes() - while len(data) < content_length: - new_data = stream.read(content_length - len(data)) - # Maybe we hit EOF. - if len(new_data) == 0: - log("EOF after reading the header") - return None - data += new_data - return json.loads(data) - except OSError: - # Reading can also possibly throw an exception. Treat this as - # EOF. - log_stack(LogLevel.FULL) - return None - - -def start_json_writer(stream, queue): - """Start the JSON writer thread. - It will read objects from QUEUE and write them to STREAM, - following the JSON-RPC protocol.""" - - def _json_writer(): - seq = 1 - while True: - obj = queue.get() - if obj is None: - # This is an exit request. The stream is already - # flushed, so all that's left to do is request an - # exit. - break - obj["seq"] = seq - seq = seq + 1 - encoded = json.dumps(obj) - body_bytes = encoded.encode("utf-8") - header = "Content-Length: " + str(len(body_bytes)) + "\r\n\r\n" - header_bytes = header.encode("ASCII") - stream.write(header_bytes) - stream.write(body_bytes) - stream.flush() - - return start_thread("JSON writer", _json_writer) diff --git a/Lib/gdb/dap/launch.py b/Lib/gdb/dap/launch.py deleted file mode 100644 index 2674e02eac3f9f..00000000000000 --- a/Lib/gdb/dap/launch.py +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 2022-2024 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 . - -# These are deprecated in 3.9, but required in older versions. -from typing import Mapping, Optional, Sequence - -import gdb - -from .events import exec_and_expect_stop, expect_process, expect_stop -from .server import capability, request -from .startup import DAPException, exec_and_log - - -# Any parameters here are necessarily extensions -- DAP requires this -# from implementations. Any additions or changes here should be -# documented in the gdb manual. -@request("launch", response=False) -def launch( - *, - program: Optional[str] = None, - cwd: Optional[str] = None, - args: Sequence[str] = (), - env: Optional[Mapping[str, str]] = None, - stopAtBeginningOfMainSubprogram: bool = False, - **extra, -): - if cwd is not None: - exec_and_log("cd " + cwd) - if program is not None: - exec_and_log("file " + program) - inf = gdb.selected_inferior() - if stopAtBeginningOfMainSubprogram: - main = inf.main_name - if main is not None: - exec_and_log("tbreak " + main) - inf.arguments = args - if env is not None: - inf.clear_env() - for name, value in env.items(): - inf.set_env(name, value) - expect_process("process") - exec_and_expect_stop("run") - - -@request("attach") -def attach( - *, - program: Optional[str] = None, - pid: Optional[int] = None, - target: Optional[str] = None, - **args, -): - if program is not None: - exec_and_log("file " + program) - if pid is not None: - cmd = "attach " + str(pid) - elif target is not None: - cmd = "target remote " + target - else: - raise DAPException("attach requires either 'pid' or 'target'") - expect_process("attach") - expect_stop("attach") - exec_and_log(cmd) - - -@capability("supportsConfigurationDoneRequest") -@request("configurationDone") -def config_done(**args): - # Nothing to do. - return None diff --git a/Lib/gdb/dap/locations.py b/Lib/gdb/dap/locations.py deleted file mode 100644 index 92e68f5e23593e..00000000000000 --- a/Lib/gdb/dap/locations.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 2023-2024 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 . - -# This is deprecated in 3.9, but required in older versions. -from typing import Optional - -import gdb - -from .server import capability, request -from .sources import decode_source - - -# Note that the spec says that the arguments to this are optional. -# However, calling this without arguments is nonsensical. This is -# discussed in: -# https://github.com/microsoft/debug-adapter-protocol/issues/266 -# This points out that fixing this would be an incompatibility but -# goes on to propose "if arguments property is missing, debug adapters -# should return an error". -@request("breakpointLocations") -@capability("supportsBreakpointLocationsRequest") -def breakpoint_locations(*, source, line: int, endLine: Optional[int] = None, **extra): - if endLine is None: - endLine = line - filename = decode_source(source) - lines = set() - for entry in gdb.execute_mi("-symbol-list-lines", filename)["lines"]: - this_line = entry["line"] - if this_line >= line and this_line <= endLine: - lines.add(this_line) - return {"breakpoints": [{"line": x} for x in sorted(lines)]} diff --git a/Lib/gdb/dap/memory.py b/Lib/gdb/dap/memory.py deleted file mode 100644 index 4aa499633ec8c0..00000000000000 --- a/Lib/gdb/dap/memory.py +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 2023-2024 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 . - -import base64 - -import gdb - -from .server import capability, request -from .startup import DAPException - - -@request("readMemory") -@capability("supportsReadMemoryRequest") -def read_memory(*, memoryReference: str, offset: int = 0, count: int, **extra): - addr = int(memoryReference, 0) + offset - try: - buf = gdb.selected_inferior().read_memory(addr, count) - except MemoryError as e: - raise DAPException("Out of memory") from e - return { - "address": hex(addr), - "data": base64.b64encode(buf).decode("ASCII"), - } - - -@request("writeMemory") -@capability("supportsWriteMemoryRequest") -def write_memory(*, memoryReference: str, offset: int = 0, data: str, **extra): - addr = int(memoryReference, 0) + offset - buf = base64.b64decode(data) - gdb.selected_inferior().write_memory(addr, buf) diff --git a/Lib/gdb/dap/modules.py b/Lib/gdb/dap/modules.py deleted file mode 100644 index 69e5a40d55aa69..00000000000000 --- a/Lib/gdb/dap/modules.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2023-2024 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 . - -import gdb - -from .server import capability, request -from .startup import in_gdb_thread - - -@in_gdb_thread -def module_id(objfile): - """Return the module ID for the objfile.""" - return objfile.username - - -@in_gdb_thread -def is_module(objfile): - """Return True if OBJFILE represents a valid Module.""" - return objfile.is_valid() and objfile.owner is None - - -@in_gdb_thread -def make_module(objf): - """Return a Module representing the objfile OBJF. - - The objfile must pass the 'is_module' test.""" - result = { - "id": module_id(objf), - "name": objf.username, - } - if objf.is_file: - result["path"] = objf.filename - return result - - -@capability("supportsModulesRequest") -@request("modules") -def modules(*, startModule: int = 0, moduleCount: int = 0, **args): - # Don't count invalid objfiles or separate debug objfiles. - objfiles = [x for x in gdb.objfiles() if is_module(x)] - if moduleCount == 0: - # Use all items. - last = len(objfiles) - else: - last = startModule + moduleCount - return { - "modules": [make_module(x) for x in objfiles[startModule:last]], - "totalModules": len(objfiles), - } diff --git a/Lib/gdb/dap/next.py b/Lib/gdb/dap/next.py deleted file mode 100644 index 1dc1d6dd74d192..00000000000000 --- a/Lib/gdb/dap/next.py +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 2022-2024 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 . - -import gdb - -from .events import exec_and_expect_stop -from .server import capability, request, send_gdb, send_gdb_with_response -from .startup import in_gdb_thread -from .state import set_thread - - -# Helper function to set the current thread and the scheduler-locking -# mode. Returns True if scheduler-locking was successfully set to -# 'on', False in all other cases, including error. When SELECT is -# True, also select that thread's newest frame. -@in_gdb_thread -def _handle_thread_step(thread_id, single_thread, select=False): - # Ensure we're going to step the correct thread. - set_thread(thread_id) - if single_thread: - result = True - arg = "on" - else: - result = False - arg = "off" - try: - # This can fail, depending on the target, so catch the error - # and report to our caller. We can't use exec_and_log because - # that does not propagate exceptions. - gdb.execute("set scheduler-locking " + arg, from_tty=True, to_string=True) - except gdb.error: - result = False - # Other DAP code may select a frame, and the "finish" command uses - # the selected frame. - if select: - gdb.newest_frame().select() - return result - - -@request("next", response=False) -def next( - *, threadId: int, singleThread: bool = False, granularity: str = "statement", **args -): - _handle_thread_step(threadId, singleThread) - cmd = "next" - if granularity == "instruction": - cmd += "i" - exec_and_expect_stop(cmd) - - -@capability("supportsSteppingGranularity") -@capability("supportsSingleThreadExecutionRequests") -@request("stepIn", response=False) -def step_in( - *, threadId: int, singleThread: bool = False, granularity: str = "statement", **args -): - _handle_thread_step(threadId, singleThread) - cmd = "step" - if granularity == "instruction": - cmd += "i" - exec_and_expect_stop(cmd) - - -@request("stepOut", response=False) -def step_out(*, threadId: int, singleThread: bool = False, **args): - _handle_thread_step(threadId, singleThread, True) - exec_and_expect_stop("finish") - - -# This is a server-side request because it is funny: it wants to -# 'continue' but also return a result, which precludes using -# response=False. Using 'continue &' would mostly work ok, but this -# yields races when a stop occurs before the response is sent back to -# the client. -@request("continue", on_dap_thread=True) -def continue_request(*, threadId: int, singleThread: bool = False, **args): - locked = send_gdb_with_response(lambda: _handle_thread_step(threadId, singleThread)) - send_gdb(lambda: exec_and_expect_stop("continue")) - return {"allThreadsContinued": not locked} diff --git a/Lib/gdb/dap/pause.py b/Lib/gdb/dap/pause.py deleted file mode 100644 index d874a607a8128e..00000000000000 --- a/Lib/gdb/dap/pause.py +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright 2022-2024 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 . - -from .events import exec_and_expect_stop -from .server import request - - -@request("pause", response=False, expect_stopped=False) -def pause(**args): - exec_and_expect_stop("interrupt -a", True) diff --git a/Lib/gdb/dap/scopes.py b/Lib/gdb/dap/scopes.py deleted file mode 100644 index 8cd860141d619b..00000000000000 --- a/Lib/gdb/dap/scopes.py +++ /dev/null @@ -1,164 +0,0 @@ -# Copyright 2022-2024 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 . - -import gdb - -from .frames import frame_for_id -from .server import request -from .startup import in_gdb_thread -from .varref import BaseReference - -# Map DAP frame IDs to scopes. This ensures that scopes are re-used. -frame_to_scope = {} - - -# If the most recent stop was due to a 'finish', and the return value -# could be computed, then this holds that value. Otherwise it holds -# None. -_last_return_value = None - - -# When the inferior is re-started, we erase all scope references. See -# the section "Lifetime of Objects References" in the spec. -@in_gdb_thread -def clear_scopes(event): - global frame_to_scope - frame_to_scope = {} - global _last_return_value - _last_return_value = None - - -gdb.events.cont.connect(clear_scopes) - - -@in_gdb_thread -def set_finish_value(val): - """Set the current 'finish' value on a stop.""" - global _last_return_value - _last_return_value = val - - -# A helper function to compute the value of a symbol. SYM is either a -# gdb.Symbol, or an object implementing the SymValueWrapper interface. -# FRAME is a frame wrapper, as produced by a frame filter. Returns a -# tuple of the form (NAME, VALUE), where NAME is the symbol's name and -# VALUE is a gdb.Value. -@in_gdb_thread -def symbol_value(sym, frame): - inf_frame = frame.inferior_frame() - # Make sure to select the frame first. Ideally this would not - # be needed, but this is a way to set the current language - # properly so that language-dependent APIs will work. - inf_frame.select() - name = str(sym.symbol()) - val = sym.value() - if val is None: - # No synthetic value, so must read the symbol value - # ourselves. - val = sym.symbol().value(inf_frame) - elif not isinstance(val, gdb.Value): - val = gdb.Value(val) - return (name, val) - - -class _ScopeReference(BaseReference): - def __init__(self, name, hint, frame, var_list): - super().__init__(name) - self.hint = hint - self.frame = frame - self.inf_frame = frame.inferior_frame() - self.func = frame.function() - self.line = frame.line() - # VAR_LIST might be any kind of iterator, but it's convenient - # here if it is just a collection. - self.var_list = tuple(var_list) - - def to_object(self): - result = super().to_object() - result["presentationHint"] = self.hint - # How would we know? - result["expensive"] = False - result["namedVariables"] = self.child_count() - if self.line is not None: - result["line"] = self.line - # FIXME construct a Source object - return result - - def has_children(self): - return True - - def child_count(self): - return len(self.var_list) - - @in_gdb_thread - def fetch_one_child(self, idx): - return symbol_value(self.var_list[idx], self.frame) - - -# A _ScopeReference that prepends the most recent return value. Note -# that this object is only created if such a value actually exists. -class _FinishScopeReference(_ScopeReference): - def __init__(self, *args): - super().__init__(*args) - - def child_count(self): - return super().child_count() + 1 - - def fetch_one_child(self, idx): - if idx == 0: - global _last_return_value - return ("(return)", _last_return_value) - return super().fetch_one_child(idx - 1) - - -class _RegisterReference(_ScopeReference): - def __init__(self, name, frame): - super().__init__( - name, "registers", frame, frame.inferior_frame().architecture().registers() - ) - - @in_gdb_thread - def fetch_one_child(self, idx): - return ( - self.var_list[idx].name, - self.inf_frame.read_register(self.var_list[idx]), - ) - - -@request("scopes") -def scopes(*, frameId: int, **extra): - global _last_return_value - global frame_to_scope - if frameId in frame_to_scope: - scopes = frame_to_scope[frameId] - else: - frame = frame_for_id(frameId) - scopes = [] - # Make sure to handle the None case as well as the empty - # iterator case. - args = tuple(frame.frame_args() or ()) - if args: - scopes.append(_ScopeReference("Arguments", "arguments", frame, args)) - has_return_value = frameId == 0 and _last_return_value is not None - # Make sure to handle the None case as well as the empty - # iterator case. - locs = tuple(frame.frame_locals() or ()) - if has_return_value: - scopes.append(_FinishScopeReference("Locals", "locals", frame, locs)) - elif locs: - scopes.append(_ScopeReference("Locals", "locals", frame, locs)) - scopes.append(_RegisterReference("Registers", frame)) - frame_to_scope[frameId] = scopes - return {"scopes": [x.to_object() for x in scopes]} diff --git a/Lib/gdb/dap/server.py b/Lib/gdb/dap/server.py deleted file mode 100644 index 7eb87177710bbb..00000000000000 --- a/Lib/gdb/dap/server.py +++ /dev/null @@ -1,515 +0,0 @@ -# Copyright 2022-2024 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 . - -import functools -import heapq -import inspect -import json -import threading -from contextlib import contextmanager - -import gdb - -from .io import read_json, start_json_writer -from .startup import ( - DAPException, - DAPQueue, - LogLevel, - exec_and_log, - in_dap_thread, - in_gdb_thread, - log, - log_stack, - start_thread, - thread_log, -) -from .typecheck import type_check - -# Map capability names to values. -_capabilities = {} - -# Map command names to callables. -_commands = {} - -# The global server. -_server = None - - -# A subclass of Exception that is used solely for reporting that a -# request needs the inferior to be stopped, but it is not stopped. -class NotStoppedException(Exception): - pass - - -# This is used to handle cancellation requests. It tracks all the -# needed state, so that we can cancel both requests that are in flight -# as well as queued requests. -class CancellationHandler: - def __init__(self): - # Methods on this class acquire this lock before proceeding. - self.lock = threading.Lock() - # The request currently being handled, or None. - self.in_flight_dap_thread = None - self.in_flight_gdb_thread = None - self.reqs = [] - - def starting(self, req): - """Call at the start of the given request.""" - with self.lock: - self.in_flight_dap_thread = req - - def done(self, req): - """Indicate that the request is done.""" - with self.lock: - self.in_flight_dap_thread = None - - def cancel(self, req): - """Call to cancel a request. - - If the request has already finished, this is ignored. - If the request is in flight, it is interrupted. - If the request has not yet been seen, the cancellation is queued.""" - with self.lock: - if req == self.in_flight_gdb_thread: - gdb.interrupt() - else: - # We don't actually ignore the request here, but in - # the 'starting' method. This way we don't have to - # track as much state. Also, this implementation has - # the weird property that a request can be cancelled - # before it is even sent. It didn't seem worthwhile - # to try to check for this. - heapq.heappush(self.reqs, req) - - @contextmanager - def interruptable_region(self, req): - """Return a new context manager that sets in_flight_gdb_thread to - REQ.""" - if req is None: - # No request is handled in the region, just execute the region. - yield - return - try: - with self.lock: - # If the request is cancelled, don't execute the region. - while len(self.reqs) > 0 and self.reqs[0] <= req: - if heapq.heappop(self.reqs) == req: - raise KeyboardInterrupt() - # Request is being handled by the gdb thread. - self.in_flight_gdb_thread = req - # Execute region. This may be interrupted by gdb.interrupt. - yield - finally: - with self.lock: - # Request is no longer handled by the gdb thread. - self.in_flight_gdb_thread = None - - -class Server: - """The DAP server class.""" - - def __init__(self, in_stream, out_stream, child_stream): - self.in_stream = in_stream - self.out_stream = out_stream - self.child_stream = child_stream - self.delayed_events = [] - # This queue accepts JSON objects that are then sent to the - # DAP client. Writing is done in a separate thread to avoid - # blocking the read loop. - self.write_queue = DAPQueue() - # Reading is also done in a separate thread, and a queue of - # requests is kept. - self.read_queue = DAPQueue() - self.done = False - self.canceller = CancellationHandler() - global _server - _server = self - - # Treat PARAMS as a JSON-RPC request and perform its action. - # PARAMS is just a dictionary from the JSON. - @in_dap_thread - def _handle_command(self, params): - req = params["seq"] - result = { - "request_seq": req, - "type": "response", - "command": params["command"], - } - try: - self.canceller.starting(req) - if "arguments" in params: - args = params["arguments"] - else: - args = {} - global _commands - body = _commands[params["command"]](**args) - if body is not None: - result["body"] = body - result["success"] = True - except NotStoppedException: - # This is an expected exception, and the result is clearly - # visible in the log, so do not log it. - result["success"] = False - result["message"] = "notStopped" - except KeyboardInterrupt: - # This can only happen when a request has been canceled. - result["success"] = False - result["message"] = "cancelled" - except DAPException as e: - # Don't normally want to see this, as it interferes with - # the test suite. - log_stack(LogLevel.FULL) - result["success"] = False - result["message"] = str(e) - except BaseException as e: - log_stack() - result["success"] = False - result["message"] = str(e) - self.canceller.done(req) - return result - - # Read inferior output and sends OutputEvents to the client. It - # is run in its own thread. - def _read_inferior_output(self): - while True: - line = self.child_stream.readline() - self.send_event( - "output", - { - "category": "stdout", - "output": line, - }, - ) - - # Send OBJ to the client, logging first if needed. - def _send_json(self, obj): - log("WROTE: <<<" + json.dumps(obj) + ">>>") - self.write_queue.put(obj) - - # This is run in a separate thread and simply reads requests from - # the client and puts them into a queue. A separate thread is - # used so that 'cancel' requests can be handled -- the DAP thread - # will normally block, waiting for each request to complete. - def _reader_thread(self): - while True: - cmd = read_json(self.in_stream) - if cmd is None: - break - log("READ: <<<" + json.dumps(cmd) + ">>>") - # Be extra paranoid about the form here. If anything is - # missing, it will be put in the queue and then an error - # issued by ordinary request processing. - if ( - "command" in cmd - and cmd["command"] == "cancel" - and "arguments" in cmd - # gdb does not implement progress, so there's no need - # to check for progressId. - and "requestId" in cmd["arguments"] - ): - self.canceller.cancel(cmd["arguments"]["requestId"]) - self.read_queue.put(cmd) - # When we hit EOF, signal it with None. - self.read_queue.put(None) - - @in_dap_thread - def main_loop(self): - """The main loop of the DAP server.""" - # Before looping, start the thread that writes JSON to the - # client, and the thread that reads output from the inferior. - start_thread("output reader", self._read_inferior_output) - json_writer = start_json_writer(self.out_stream, self.write_queue) - start_thread("JSON reader", self._reader_thread) - while not self.done: - cmd = self.read_queue.get() - # A None value here means the reader hit EOF. - if cmd is None: - break - result = self._handle_command(cmd) - self._send_json(result) - events = self.delayed_events - self.delayed_events = [] - for event, body in events: - self.send_event(event, body) - # Got the terminate request. This is handled by the - # JSON-writing thread, so that we can ensure that all - # responses are flushed to the client before exiting. - self.write_queue.put(None) - json_writer.join() - send_gdb("quit") - - @in_dap_thread - def send_event_later(self, event, body=None): - """Send a DAP event back to the client, but only after the - current request has completed.""" - self.delayed_events.append((event, body)) - - # Note that this does not need to be run in any particular thread, - # because it just creates an object and writes it to a thread-safe - # queue. - def send_event(self, event, body=None): - """Send an event to the DAP client. - EVENT is the name of the event, a string. - BODY is the body of the event, an arbitrary object.""" - obj = { - "type": "event", - "event": event, - } - if body is not None: - obj["body"] = body - self._send_json(obj) - - def shutdown(self): - """Request that the server shut down.""" - # Just set a flag. This operation is complicated because we - # want to write the result of the request before exiting. See - # main_loop. - self.done = True - - -def send_event(event, body=None): - """Send an event to the DAP client. - EVENT is the name of the event, a string. - BODY is the body of the event, an arbitrary object.""" - global _server - _server.send_event(event, body) - - -# A helper decorator that checks whether the inferior is running. -def _check_not_running(func): - @functools.wraps(func) - def check(*args, **kwargs): - # Import this as late as possible. This is done to avoid - # circular imports. - from .events import inferior_running - - if inferior_running: - raise NotStoppedException() - return func(*args, **kwargs) - - return check - - -def request( - name: str, - *, - response: bool = True, - on_dap_thread: bool = False, - expect_stopped: bool = True -): - """A decorator for DAP requests. - - This registers the function as the implementation of the DAP - request NAME. By default, the function is invoked in the gdb - thread, and its result is returned as the 'body' of the DAP - response. - - Some keyword arguments are provided as well: - - If RESPONSE is False, the result of the function will not be - waited for and no 'body' will be in the response. - - If ON_DAP_THREAD is True, the function will be invoked in the DAP - thread. When ON_DAP_THREAD is True, RESPONSE may not be False. - - If EXPECT_STOPPED is True (the default), then the request will - fail with the 'notStopped' reason if it is processed while the - inferior is running. When EXPECT_STOPPED is False, the request - will proceed regardless of the inferior's state. - """ - - # Validate the parameters. - assert not on_dap_thread or response - - def wrap(func): - code = func.__code__ - # We don't permit requests to have positional arguments. - try: - assert code.co_posonlyargcount == 0 - except AttributeError: - # Attribute co_posonlyargcount is supported starting python 3.8. - pass - assert code.co_argcount == 0 - # A request must have a **args parameter. - assert code.co_flags & inspect.CO_VARKEYWORDS - - # Type-check the calls. - func = type_check(func) - - # Verify that the function is run on the correct thread. - if on_dap_thread: - cmd = in_dap_thread(func) - else: - func = in_gdb_thread(func) - - if response: - - def sync_call(**args): - return send_gdb_with_response(lambda: func(**args)) - - cmd = sync_call - else: - - def non_sync_call(**args): - return send_gdb(lambda: func(**args)) - - cmd = non_sync_call - - # If needed, check that the inferior is not running. This - # wrapping is done last, so the check is done first, before - # trying to dispatch the request to another thread. - if expect_stopped: - cmd = _check_not_running(cmd) - - global _commands - assert name not in _commands - _commands[name] = cmd - return cmd - - return wrap - - -def capability(name, value=True): - """A decorator that indicates that the wrapper function implements - the DAP capability NAME.""" - - def wrap(func): - global _capabilities - assert name not in _capabilities - _capabilities[name] = value - return func - - return wrap - - -def client_bool_capability(name): - """Return the value of a boolean client capability. - - If the capability was not specified, or did not have boolean type, - False is returned.""" - global _server - if name in _server.config and isinstance(_server.config[name], bool): - return _server.config[name] - return False - - -@request("initialize", on_dap_thread=True) -def initialize(**args): - global _server, _capabilities - _server.config = args - _server.send_event_later("initialized") - return _capabilities.copy() - - -@request("terminate", expect_stopped=False) -@capability("supportsTerminateRequest") -def terminate(**args): - exec_and_log("kill") - - -@request("disconnect", on_dap_thread=True, expect_stopped=False) -@capability("supportTerminateDebuggee") -def disconnect(*, terminateDebuggee: bool = False, **args): - if terminateDebuggee: - send_gdb_with_response("kill") - _server.shutdown() - - -@request("cancel", on_dap_thread=True, expect_stopped=False) -@capability("supportsCancelRequest") -def cancel(**args): - # If a 'cancel' request can actually be satisfied, it will be - # handled specially in the reader thread. However, in order to - # construct a proper response, the request is also added to the - # command queue and so ends up here. Additionally, the spec says: - # The cancel request may return an error if it could not cancel - # an operation but a client should refrain from presenting this - # error to end users. - # ... which gdb takes to mean that it is fine for all cancel - # requests to report success. - return None - - -class Invoker(object): - """A simple class that can invoke a gdb command.""" - - def __init__(self, cmd): - self.cmd = cmd - - # This is invoked in the gdb thread to run the command. - @in_gdb_thread - def __call__(self): - exec_and_log(self.cmd) - - -class Cancellable(object): - - def __init__(self, fn, result_q=None): - self.fn = fn - self.result_q = result_q - with _server.canceller.lock: - self.req = _server.canceller.in_flight_dap_thread - - # This is invoked in the gdb thread to run self.fn. - @in_gdb_thread - def __call__(self): - try: - with _server.canceller.interruptable_region(self.req): - val = self.fn() - if self.result_q is not None: - self.result_q.put(val) - except (Exception, KeyboardInterrupt) as e: - if self.result_q is not None: - # Pass result or exception to caller. - self.result_q.put(e) - elif isinstance(e, KeyboardInterrupt): - # Fn was cancelled. - pass - else: - # Exception happened. Ignore and log it. - err_string = "%s, %s" % (e, type(e)) - thread_log("caught exception: " + err_string) - log_stack() - - -def send_gdb(cmd): - """Send CMD to the gdb thread. - CMD can be either a function or a string. - If it is a string, it is passed to gdb.execute.""" - if isinstance(cmd, str): - cmd = Invoker(cmd) - - # Post the event and don't wait for the result. - gdb.post_event(Cancellable(cmd)) - - -def send_gdb_with_response(fn): - """Send FN to the gdb thread and return its result. - If FN is a string, it is passed to gdb.execute and None is - returned as the result. - If FN throws an exception, this function will throw the - same exception in the calling thread. - """ - if isinstance(fn, str): - fn = Invoker(fn) - - # Post the event and wait for the result in result_q. - result_q = DAPQueue() - gdb.post_event(Cancellable(fn, result_q)) - val = result_q.get() - - if isinstance(val, (Exception, KeyboardInterrupt)): - raise val - return val diff --git a/Lib/gdb/dap/sources.py b/Lib/gdb/dap/sources.py deleted file mode 100644 index ad0c913c8c1fd3..00000000000000 --- a/Lib/gdb/dap/sources.py +++ /dev/null @@ -1,105 +0,0 @@ -# Copyright 2023-2024 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 . - -import os - -import gdb - -from .server import capability, request -from .startup import DAPException, in_gdb_thread - -# The next available source reference ID. Must be greater than 0. -_next_source = 1 - -# Map from full paths to Source dictionaries. -_source_map = {} - -# Map from a source reference ID back to the same Source that is -# stored in _source_map. -_id_map = {} - - -@in_gdb_thread -def make_source(fullname, filename=None): - """Return the Source for a given file name. - - FULLNAME is the full name. This is used as the key. - FILENAME is the base name; if None (the default), then it is - computed from FULLNAME. - """ - global _source_map - if fullname in _source_map: - result = _source_map[fullname] - else: - if filename is None: - filename = os.path.basename(fullname) - - result = { - "name": filename, - "path": fullname, - } - - if not os.path.exists(fullname): - global _next_source - result["sourceReference"] = _next_source - - global _id_map - _id_map[_next_source] = result - _next_source += 1 - - _source_map[fullname] = result - return result - - -@in_gdb_thread -def decode_source(source): - """Decode a Source object. - - Finds and returns the filename of a given Source object.""" - if "path" in source: - return source["path"] - if "sourceReference" not in source: - raise DAPException("either 'path' or 'sourceReference' must appear in Source") - ref = source["sourceReference"] - global _id_map - if ref not in _id_map: - raise DAPException("no sourceReference " + str(ref)) - return _id_map[ref]["path"] - - -@request("loadedSources") -@capability("supportsLoadedSourcesRequest") -def loaded_sources(**extra): - result = [] - for elt in gdb.execute_mi("-file-list-exec-source-files")["files"]: - result.append(make_source(elt["fullname"], elt["file"])) - return { - "sources": result, - } - - -@request("source") -def source(*, source=None, sourceReference: int, **extra): - # The 'sourceReference' parameter is required by the spec, but is - # for backward compatibility, which I take to mean that the - # 'source' is preferred. - if source is None: - source = {"sourceReference": sourceReference} - filename = decode_source(source) - with open(filename) as f: - content = f.read() - return { - "content": content, - } diff --git a/Lib/gdb/dap/startup.py b/Lib/gdb/dap/startup.py deleted file mode 100644 index 58591c00b97dda..00000000000000 --- a/Lib/gdb/dap/startup.py +++ /dev/null @@ -1,216 +0,0 @@ -# Copyright 2022-2024 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 . - -# Do not import other gdbdap modules here -- this module must come -# first. -import functools -import queue -import sys -import threading -import traceback -from enum import IntEnum, auto - -import gdb - -# Adapt to different Queue types. This is exported for use in other -# modules as well. -if sys.version_info[0] == 3 and sys.version_info[1] <= 6: - DAPQueue = queue.Queue -else: - DAPQueue = queue.SimpleQueue - - -# The GDB thread, aka the main thread. -_gdb_thread = threading.current_thread() - - -# The DAP thread. -_dap_thread = None - - -# "Known" exceptions are wrapped in a DAP exception, so that, by -# default, only rogue exceptions are logged -- this is then used by -# the test suite. -class DAPException(Exception): - pass - - -# Wrapper for gdb.parse_and_eval that turns exceptions into -# DAPException. -def parse_and_eval(expression, global_context=False): - try: - return gdb.parse_and_eval(expression, global_context=global_context) - except Exception as e: - # Be sure to preserve the summary, as this can propagate to - # the client. - raise DAPException(str(e)) from e - - -def start_thread(name, target, args=()): - """Start a new thread, invoking TARGET with *ARGS there. - This is a helper function that ensures that any GDB signals are - correctly blocked.""" - - def thread_wrapper(*args): - # Catch any exception, and log it. If we let it escape here, it'll be - # printed in gdb_stderr, which is not safe to access from anywhere but - # gdb's main thread. - try: - target(*args) - except Exception as err: - err_string = "%s, %s" % (err, type(err)) - thread_log("caught exception: " + err_string) - log_stack() - finally: - # Log when a thread terminates. - thread_log("terminating") - - result = gdb.Thread(name=name, target=thread_wrapper, args=args, daemon=True) - result.start() - return result - - -def start_dap(target): - """Start the DAP thread and invoke TARGET there.""" - exec_and_log("set breakpoint pending on") - - # Functions in this thread contain assertions that check for this - # global, so we must set it before letting these functions run. - def really_start_dap(): - global _dap_thread - _dap_thread = threading.current_thread() - target() - - # Note: unlike _dap_thread, dap_thread is a local variable. - dap_thread = start_thread("DAP", really_start_dap) - - def _on_gdb_exiting(event): - thread_log("joining DAP thread ...") - dap_thread.join() - thread_log("joining DAP thread done") - - gdb.events.gdb_exiting.connect(_on_gdb_exiting) - - -def in_gdb_thread(func): - """A decorator that asserts that FUNC must be run in the GDB thread.""" - - @functools.wraps(func) - def ensure_gdb_thread(*args, **kwargs): - assert threading.current_thread() is _gdb_thread - return func(*args, **kwargs) - - return ensure_gdb_thread - - -def in_dap_thread(func): - """A decorator that asserts that FUNC must be run in the DAP thread.""" - - @functools.wraps(func) - def ensure_dap_thread(*args, **kwargs): - assert threading.current_thread() is _dap_thread - return func(*args, **kwargs) - - return ensure_dap_thread - - -# Logging levels. -class LogLevel(IntEnum): - DEFAULT = auto() - FULL = auto() - - -class LogLevelParam(gdb.Parameter): - """DAP logging level.""" - - set_doc = "Set the DAP logging level." - show_doc = "Show the DAP logging level." - - def __init__(self): - super().__init__( - "debug dap-log-level", gdb.COMMAND_MAINTENANCE, gdb.PARAM_ZUINTEGER - ) - self.value = LogLevel.DEFAULT - - -_log_level = LogLevelParam() - - -class LoggingParam(gdb.Parameter): - """Whether DAP logging is enabled.""" - - set_doc = "Set the DAP logging status." - show_doc = "Show the DAP logging status." - - lock = threading.Lock() - log_file = None - - def __init__(self): - super().__init__( - "debug dap-log-file", gdb.COMMAND_MAINTENANCE, gdb.PARAM_OPTIONAL_FILENAME - ) - self.value = None - - def get_set_string(self): - with dap_log.lock: - # Close any existing log file, no matter what. - if self.log_file is not None: - self.log_file.close() - self.log_file = None - if self.value is not None: - self.log_file = open(self.value, "w") - return "" - - -dap_log = LoggingParam() - - -def log(something, level=LogLevel.DEFAULT): - """Log SOMETHING to the log file, if logging is enabled.""" - with dap_log.lock: - if dap_log.log_file is not None and level <= _log_level.value: - print(something, file=dap_log.log_file) - dap_log.log_file.flush() - - -def thread_log(something, level=LogLevel.DEFAULT): - """Log SOMETHING to the log file, if logging is enabled, and prefix - the thread name.""" - if threading.current_thread() is _gdb_thread: - thread_name = "GDB main" - else: - thread_name = threading.current_thread().name - log(thread_name + ": " + something, level) - - -def log_stack(level=LogLevel.DEFAULT): - """Log a stack trace to the log file, if logging is enabled.""" - with dap_log.lock: - if dap_log.log_file is not None and level <= _log_level.value: - traceback.print_exc(file=dap_log.log_file) - dap_log.log_file.flush() - - -@in_gdb_thread -def exec_and_log(cmd): - """Execute the gdb command CMD. - If logging is enabled, log the command and its output.""" - log("+++ " + cmd) - try: - output = gdb.execute(cmd, from_tty=True, to_string=True) - if output != "": - log(">>> " + output) - except gdb.error: - log_stack() diff --git a/Lib/gdb/dap/state.py b/Lib/gdb/dap/state.py deleted file mode 100644 index 57ae355f45ed45..00000000000000 --- a/Lib/gdb/dap/state.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2022-2024 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 . - -from .startup import exec_and_log, in_gdb_thread, log - - -@in_gdb_thread -def set_thread(thread_id): - """Set the current thread to THREAD_ID.""" - if thread_id == 0: - log("+++ Thread == 0 +++") - else: - exec_and_log("thread " + str(thread_id)) diff --git a/Lib/gdb/dap/threads.py b/Lib/gdb/dap/threads.py deleted file mode 100644 index e65495b41dbe98..00000000000000 --- a/Lib/gdb/dap/threads.py +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2022-2024 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 . - -import gdb - -from .server import request - - -def _thread_name(thr): - if thr.name is not None: - return thr.name - if thr.details is not None: - return thr.details - return None - - -@request("threads") -def threads(**args): - result = [] - for thr in gdb.selected_inferior().threads(): - one_result = { - "id": thr.global_num, - } - name = _thread_name(thr) - if name is not None: - one_result["name"] = name - result.append(one_result) - return { - "threads": result, - } diff --git a/Lib/gdb/dap/typecheck.py b/Lib/gdb/dap/typecheck.py deleted file mode 100644 index 55896cccb064ff..00000000000000 --- a/Lib/gdb/dap/typecheck.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2023-2024 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 . - -# A simple runtime type checker. - -import collections.abc -import functools -import typing - - -# 'isinstance' won't work in general for type variables, so we -# implement the subset that is needed by DAP. -def _check_instance(value, typevar): - base = typing.get_origin(typevar) - if base is None: - return isinstance(value, typevar) - arg_types = typing.get_args(typevar) - if base == collections.abc.Mapping or base == typing.Mapping: - if not isinstance(value, collections.abc.Mapping): - return False - assert len(arg_types) == 2 - (keytype, valuetype) = arg_types - return all( - _check_instance(k, keytype) and _check_instance(v, valuetype) - for k, v in value.items() - ) - elif base == collections.abc.Sequence or base == typing.Sequence: - # In some places we simply use 'Sequence' without arguments. - if not isinstance(value, base): - return False - if len(arg_types) == 0: - return True - assert len(arg_types) == 1 - arg_type = arg_types[0] - return all(_check_instance(item, arg_type) for item in value) - elif base == typing.Union: - return any(_check_instance(value, arg_type) for arg_type in arg_types) - raise TypeError("unsupported type variable '" + str(typevar) + "'") - - -def type_check(func): - """A decorator that checks FUNC's argument types at runtime.""" - - # The type checker relies on 'typing.get_origin', which was added - # in Python 3.8. (It also relies on 'typing.get_args', but that - # was added at the same time.) - if not hasattr(typing, "get_origin"): - return func - - hints = typing.get_type_hints(func) - # We don't check the return type, but we allow it in case someone - # wants to use it on a function definition. - if "return" in hints: - del hints["return"] - - # Note that keyword-only is fine for our purposes, because this is - # only used for DAP requests, and those are always called this - # way. - @functools.wraps(func) - def check_arguments(**kwargs): - for key in hints: - # The argument might not be passed in; we could type-check - # any default value here, but it seems fine to just rely - # on the code being correct -- the main goal of this - # checking is to verify JSON coming from the client. - if key in kwargs and not _check_instance(kwargs[key], hints[key]): - raise TypeError( - "value for '" - + key - + "' does not have expected type '" - + str(hints[key]) - + "'" - ) - return func(**kwargs) - - return check_arguments diff --git a/Lib/gdb/dap/varref.py b/Lib/gdb/dap/varref.py deleted file mode 100644 index 57e84a1676e2a3..00000000000000 --- a/Lib/gdb/dap/varref.py +++ /dev/null @@ -1,276 +0,0 @@ -# Copyright 2023-2024 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 . - -from abc import ABC, abstractmethod -from collections import defaultdict -from contextlib import contextmanager - -import gdb - -from .server import client_bool_capability -from .startup import DAPException, in_gdb_thread - -# A list of all the variable references created during this pause. -all_variables = [] - - -# When the inferior is re-started, we erase all variable references. -# See the section "Lifetime of Objects References" in the spec. -@in_gdb_thread -def clear_vars(event): - global all_variables - all_variables = [] - - -gdb.events.cont.connect(clear_vars) - - -# A null context manager. Python supplies one, starting in 3.7. -@contextmanager -def _null(**ignore): - yield - - -@in_gdb_thread -def apply_format(value_format): - """Temporarily apply the DAP ValueFormat. - - This returns a new context manager that applies the given DAP - ValueFormat object globally, then restores gdb's state when finished.""" - if value_format is not None and "hex" in value_format and value_format["hex"]: - return gdb.with_parameter("output-radix", 16) - return _null() - - -class BaseReference(ABC): - """Represent a variable or a scope. - - This class is just a base class, some methods must be implemented in - subclasses. - - The 'ref' field can be used as the variablesReference in the protocol. - """ - - @in_gdb_thread - def __init__(self, name): - """Create a new variable reference with the given name. - - NAME is a string or None. None means this does not have a - name, e.g., the result of expression evaluation.""" - - global all_variables - all_variables.append(self) - self.ref = len(all_variables) - self.name = name - self.reset_children() - - @in_gdb_thread - def to_object(self): - """Return a dictionary that describes this object for DAP. - - The resulting object is a starting point that can be filled in - further. See the Scope or Variable types in the spec""" - result = {"variablesReference": self.ref if self.has_children() else 0} - if self.name is not None: - result["name"] = str(self.name) - return result - - @abstractmethod - def has_children(self): - """Return True if this object has children.""" - return False - - def reset_children(self): - """Reset any cached information about the children of this object.""" - # A list of all the children. Each child is a BaseReference - # of some kind. - self.children = None - # Map from the name of a child to a BaseReference. - self.by_name = {} - # Keep track of how many duplicates there are of a given name, - # so that unique names can be generated. Map from base name - # to a count. - self.name_counts = defaultdict(lambda: 1) - - @abstractmethod - def fetch_one_child(self, index): - """Fetch one child of this variable. - - INDEX is the index of the child to fetch. - This should return a tuple of the form (NAME, VALUE), where - NAME is the name of the variable, and VALUE is a gdb.Value.""" - return - - @abstractmethod - def child_count(self): - """Return the number of children of this variable.""" - return - - # Helper method to compute the final name for a child whose base - # name is given. Updates the name_counts map. This is used to - # handle shadowing -- in DAP, the adapter is responsible for - # making sure that all the variables in a a given container have - # unique names. See - # https://github.com/microsoft/debug-adapter-protocol/issues/141 - # and - # https://github.com/microsoft/debug-adapter-protocol/issues/149 - def _compute_name(self, name): - if name in self.by_name: - self.name_counts[name] += 1 - # In theory there's no safe way to compute a name, because - # a pretty-printer might already be generating names of - # that form. In practice I think we should not worry too - # much. - name = name + " #" + str(self.name_counts[name]) - return name - - @in_gdb_thread - def fetch_children(self, start, count): - """Fetch children of this variable. - - START is the starting index. - COUNT is the number to return, with 0 meaning return all. - Returns an iterable of some kind.""" - if count == 0: - count = self.child_count() - if self.children is None: - self.children = [None] * self.child_count() - for idx in range(start, start + count): - if self.children[idx] is None: - (name, value) = self.fetch_one_child(idx) - name = self._compute_name(name) - var = VariableReference(name, value) - self.children[idx] = var - self.by_name[name] = var - yield self.children[idx] - - @in_gdb_thread - def find_child_by_name(self, name): - """Find a child of this variable, given its name. - - Returns the value of the child, or throws if not found.""" - # A lookup by name can only be done using names previously - # provided to the client, so we can simply rely on the by-name - # map here. - if name in self.by_name: - return self.by_name[name] - raise DAPException("no variable named '" + name + "'") - - -class VariableReference(BaseReference): - """Concrete subclass of BaseReference that handles gdb.Value.""" - - def __init__(self, name, value, result_name="value"): - """Initializer. - - NAME is the name of this reference, see superclass. - VALUE is a gdb.Value that holds the value. - RESULT_NAME can be used to change how the simple string result - is emitted in the result dictionary.""" - super().__init__(name) - self.result_name = result_name - self.value = value - self._update_value() - - # Internal method to update local data when the value changes. - def _update_value(self): - self.reset_children() - self.printer = gdb.printing.make_visualizer(self.value) - self.child_cache = None - if self.has_children(): - self.count = -1 - else: - self.count = None - - def assign(self, value): - """Assign VALUE to this object and update.""" - self.value.assign(value) - self._update_value() - - def has_children(self): - return hasattr(self.printer, "children") - - def cache_children(self): - if self.child_cache is None: - # This discards all laziness. This could be improved - # slightly by lazily evaluating children, but because this - # code also generally needs to know the number of - # children, it probably wouldn't help much. Note that - # this is only needed with legacy (non-ValuePrinter) - # printers. - self.child_cache = list(self.printer.children()) - return self.child_cache - - def child_count(self): - if self.count is None: - return None - if self.count == -1: - num_children = None - if isinstance(self.printer, gdb.ValuePrinter) and hasattr( - self.printer, "num_children" - ): - num_children = self.printer.num_children() - if num_children is None: - num_children = len(self.cache_children()) - self.count = num_children - return self.count - - def to_object(self): - result = super().to_object() - result[self.result_name] = str(self.printer.to_string()) - num_children = self.child_count() - if num_children is not None: - if ( - hasattr(self.printer, "display_hint") - and self.printer.display_hint() == "array" - ): - result["indexedVariables"] = num_children - else: - result["namedVariables"] = num_children - if client_bool_capability("supportsMemoryReferences"): - # https://github.com/microsoft/debug-adapter-protocol/issues/414 - # changed DAP to allow memory references for any of the - # variable response requests, and to lift the restriction - # to pointer-to-function from Variable. - if self.value.type.strip_typedefs().code == gdb.TYPE_CODE_PTR: - result["memoryReference"] = hex(int(self.value)) - if client_bool_capability("supportsVariableType"): - result["type"] = str(self.value.type) - return result - - @in_gdb_thread - def fetch_one_child(self, idx): - if isinstance(self.printer, gdb.ValuePrinter) and hasattr( - self.printer, "child" - ): - (name, val) = self.printer.child(idx) - else: - (name, val) = self.cache_children()[idx] - # A pretty-printer can return something other than a - # gdb.Value, but it must be convertible. - if not isinstance(val, gdb.Value): - val = gdb.Value(val) - return (name, val) - - -@in_gdb_thread -def find_variable(ref): - """Given a variable reference, return the corresponding variable object.""" - global all_variables - # Variable references are offset by 1. - ref = ref - 1 - if ref < 0 or ref > len(all_variables): - raise DAPException("invalid variablesReference") - return all_variables[ref] diff --git a/Lib/gdb/disassembler.py b/Lib/gdb/disassembler.py deleted file mode 100644 index 72d311b117f20d..00000000000000 --- a/Lib/gdb/disassembler.py +++ /dev/null @@ -1,173 +0,0 @@ -# Copyright (C) 2021-2024 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 . - -"""Disassembler related module.""" - -import _gdb.disassembler - -# Re-export everything from the _gdb.disassembler module, which is -# defined within GDB's C++ code. Note that two indicators are needed -# here to silence flake8. -from _gdb.disassembler import * # noqa: F401,F403 - -import gdb - -# Module global dictionary of gdb.disassembler.Disassembler objects. -# The keys of this dictionary are bfd architecture names, or the -# special value None. -# -# When a request to disassemble comes in we first lookup the bfd -# architecture name from the gdbarch, if that name exists in this -# dictionary then we use that Disassembler object. -# -# If there's no architecture specific disassembler then we look for -# the key None in this dictionary, and if that key exists, we use that -# disassembler. -# -# If none of the above checks found a suitable disassembler, then no -# disassembly is performed in Python. -_disassemblers_dict = {} - - -class Disassembler(object): - """A base class from which all user implemented disassemblers must - inherit.""" - - def __init__(self, name): - """Constructor. Takes a name, which should be a string, which can be - used to identify this disassembler in diagnostic messages.""" - self.name = name - - def __call__(self, info): - """A default implementation of __call__. All sub-classes must - override this method. Calling this default implementation will throw - a NotImplementedError exception.""" - raise NotImplementedError("Disassembler.__call__") - - -def register_disassembler(disassembler, architecture=None): - """Register a disassembler. DISASSEMBLER is a sub-class of - gdb.disassembler.Disassembler. ARCHITECTURE is either None or a - string, the name of an architecture known to GDB. - - DISASSEMBLER is registered as a disassembler for ARCHITECTURE, or - all architectures when ARCHITECTURE is None. - - Returns the previous disassembler registered with this - ARCHITECTURE value. - """ - - if not isinstance(disassembler, Disassembler) and disassembler is not None: - raise TypeError("disassembler should sub-class gdb.disassembler.Disassembler") - - old = None - if architecture in _disassemblers_dict: - old = _disassemblers_dict[architecture] - del _disassemblers_dict[architecture] - if disassembler is not None: - _disassemblers_dict[architecture] = disassembler - - # Call the private _set_enabled function within the - # _gdb.disassembler module. This function sets a global flag - # within GDB's C++ code that enables or dissables the Python - # disassembler functionality, this improves performance of the - # disassembler by avoiding unneeded calls into Python when we know - # that no disassemblers are registered. - _gdb.disassembler._set_enabled(len(_disassemblers_dict) > 0) - return old - - -def _print_insn(info): - """This function is called by GDB when it wants to disassemble an - instruction. INFO describes the instruction to be - disassembled.""" - - def lookup_disassembler(arch): - name = arch.name() - if name is None: - return None - if name in _disassemblers_dict: - return _disassemblers_dict[name] - if None in _disassemblers_dict: - return _disassemblers_dict[None] - return None - - disassembler = lookup_disassembler(info.architecture) - if disassembler is None: - return None - return disassembler(info) - - -class maint_info_py_disassemblers_cmd(gdb.Command): - """ - List all registered Python disassemblers. - - List the name of all registered Python disassemblers, next to the - name of the architecture for which the disassembler is registered. - - The global Python disassembler is listed next to the string - 'GLOBAL'. - - The disassembler that matches the architecture of the currently - selected inferior will be marked, this is an indication of which - disassembler will be invoked if any disassembly is performed in - the current inferior. - """ - - def __init__(self): - super().__init__("maintenance info python-disassemblers", gdb.COMMAND_USER) - - def invoke(self, args, from_tty): - # If no disassemblers are registered, tell the user. - if len(_disassemblers_dict) == 0: - print("No Python disassemblers registered.") - return - - # Figure out the longest architecture name, so we can - # correctly format the table of results. - longest_arch_name = 0 - for architecture in _disassemblers_dict: - if architecture is not None: - name = _disassemblers_dict[architecture].name - if len(name) > longest_arch_name: - longest_arch_name = len(name) - - # Figure out the name of the current architecture. There - # should always be a current inferior, but if, somehow, there - # isn't, then leave curr_arch as the empty string, which will - # not then match agaisnt any architecture in the dictionary. - curr_arch = "" - if gdb.selected_inferior() is not None: - curr_arch = gdb.selected_inferior().architecture().name() - - # Now print the dictionary of registered disassemblers out to - # the user. - match_tag = "\t(Matches current architecture)" - fmt_len = max(longest_arch_name, len("Architecture")) - format_string = "{:" + str(fmt_len) + "s} {:s}" - print(format_string.format("Architecture", "Disassember Name")) - for architecture in _disassemblers_dict: - if architecture is not None: - name = _disassemblers_dict[architecture].name - if architecture == curr_arch: - name += match_tag - match_tag = "" - print(format_string.format(architecture, name)) - if None in _disassemblers_dict: - name = _disassemblers_dict[None].name + match_tag - print(format_string.format("GLOBAL", name)) - - -maint_info_py_disassemblers_cmd() diff --git a/Lib/gdb/frames.py b/Lib/gdb/frames.py deleted file mode 100644 index a3be80c72a0565..00000000000000 --- a/Lib/gdb/frames.py +++ /dev/null @@ -1,273 +0,0 @@ -# Frame-filter commands. -# Copyright (C) 2013-2024 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 . - -"""Internal functions for working with frame-filters.""" - -import collections -import itertools - -import gdb -from gdb.FrameDecorator import DAPFrameDecorator, FrameDecorator -from gdb.FrameIterator import FrameIterator - - -def get_priority(filter_item): - """Internal worker function to return the frame-filter's priority - from a frame filter object. This is a fail free function as it is - used in sorting and filtering. If a badly implemented frame - filter does not implement the priority attribute, return zero - (otherwise sorting/filtering will fail and prevent other frame - filters from executing). - - Arguments: - filter_item: An object conforming to the frame filter - interface. - - Returns: - The priority of the frame filter from the "priority" - attribute, or zero. - """ - # Do not fail here, as the sort will fail. If a filter has not - # (incorrectly) set a priority, set it to zero. - return getattr(filter_item, "priority", 0) - - -def set_priority(filter_item, priority): - """Internal worker function to set the frame-filter's priority. - - Arguments: - filter_item: An object conforming to the frame filter - interface. - priority: The priority to assign as an integer. - """ - - filter_item.priority = priority - - -def get_enabled(filter_item): - """Internal worker function to return a filter's enabled state - from a frame filter object. This is a fail free function as it is - used in sorting and filtering. If a badly implemented frame - filter does not implement the enabled attribute, return False - (otherwise sorting/filtering will fail and prevent other frame - filters from executing). - - Arguments: - filter_item: An object conforming to the frame filter - interface. - - Returns: - The enabled state of the frame filter from the "enabled" - attribute, or False. - """ - - # If the filter class is badly implemented when called from the - # Python filter command, do not cease filter operations, just set - # enabled to False. - return getattr(filter_item, "enabled", False) - - -def set_enabled(filter_item, state): - """Internal Worker function to set the frame-filter's enabled - state. - - Arguments: - filter_item: An object conforming to the frame filter - interface. - state: True or False, depending on desired state. - """ - - filter_item.enabled = state - - -def return_list(name): - """Internal Worker function to return the frame filter - dictionary, depending on the name supplied as an argument. If the - name is not "all", "global" or "progspace", it is assumed to name - an object-file. - - Arguments: - name: The name of the list, as specified by GDB user commands. - - Returns: - A dictionary object for a single specified dictionary, or a - list containing all the items for "all" - - Raises: - gdb.GdbError: A dictionary of that name cannot be found. - """ - - # If all dictionaries are wanted in the case of "all" we - # cannot return a combined dictionary as keys() may clash in - # between different dictionaries. As we just want all the frame - # filters to enable/disable them all, just return the combined - # items() as a chained iterator of dictionary values. - if name == "all": - glob = gdb.frame_filters.values() - prog = gdb.current_progspace().frame_filters.values() - return_iter = itertools.chain(glob, prog) - for objfile in gdb.objfiles(): - return_iter = itertools.chain(return_iter, objfile.frame_filters.values()) - - return return_iter - - if name == "global": - return gdb.frame_filters - else: - if name == "progspace": - cp = gdb.current_progspace() - return cp.frame_filters - else: - for objfile in gdb.objfiles(): - if name == objfile.filename: - return objfile.frame_filters - - msg = "Cannot find frame-filter dictionary for '" + name + "'" - raise gdb.GdbError(msg) - - -def _sort_list(): - """Internal Worker function to merge all known frame-filter - lists, prune any filters with the state set to "disabled", and - sort the list on the frame-filter's "priority" attribute. - - Returns: - sorted_list: A sorted, pruned list of frame filters to - execute. - """ - - all_filters = return_list("all") - sorted_frame_filters = sorted(all_filters, key=get_priority, reverse=True) - - sorted_frame_filters = filter(get_enabled, sorted_frame_filters) - - return sorted_frame_filters - - -# Internal function that implements frame_iterator and -# execute_frame_filters. If DAP_SEMANTICS is True, then this will -# always return an iterator and will wrap frames in DAPFrameDecorator. -def _frame_iterator(frame, frame_low, frame_high, dap_semantics): - # Get a sorted list of frame filters. - sorted_list = list(_sort_list()) - - # Check to see if there are any frame-filters. If not, just - # return None and let default backtrace printing occur. - if not dap_semantics and len(sorted_list) == 0: - return None - - frame_iterator = FrameIterator(frame) - - # Apply a basic frame decorator to all gdb.Frames. This unifies - # the interface. - if dap_semantics: - decorator = DAPFrameDecorator - else: - decorator = FrameDecorator - frame_iterator = map(decorator, frame_iterator) - - for ff in sorted_list: - frame_iterator = ff.filter(frame_iterator) - - # Slicing - - # Is this a slice from the end of the backtrace, ie bt -2? - if frame_low < 0: - count = 0 - slice_length = abs(frame_low) - # We cannot use MAXLEN argument for deque as it is 2.6 onwards - # and some GDB versions might be < 2.6. - sliced = collections.deque() - - for frame_item in frame_iterator: - if count >= slice_length: - sliced.popleft() - count = count + 1 - sliced.append(frame_item) - - return iter(sliced) - - # -1 for frame_high means until the end of the backtrace. Set to - # None if that is the case, to indicate to itertools.islice to - # slice to the end of the iterator. - if frame_high == -1: - frame_high = None - else: - # As frames start from 0, add one to frame_high so islice - # correctly finds the end - frame_high = frame_high + 1 - - sliced = itertools.islice(frame_iterator, frame_low, frame_high) - - return sliced - - -def frame_iterator(frame, frame_low, frame_high): - """Helper function that will execute the chain of frame filters. - Each filter is executed in priority order. After the execution - completes, slice the iterator to frame_low - frame_high range. An - iterator is always returned. The iterator will always yield - frame decorator objects, but note that these decorators have - slightly different semantics from the ordinary ones: they will - always return a fully-qualified 'filename' (if possible) and will - never substitute the objfile name. - - Arguments: - frame: The initial frame. - - frame_low: The low range of the slice, counting from 0. If - this is a negative integer then it indicates a backward slice - (ie bt -4) which counts backward from the last frame in the - backtrace. - - frame_high: The high range of the slice, inclusive. If this - is -1 then it indicates all frames until the end of the stack - from frame_low. - - Returns: - frame_iterator: The sliced iterator after all frame - filters have had a chance to execute. - """ - - return _frame_iterator(frame, frame_low, frame_high, True) - - -def execute_frame_filters(frame, frame_low, frame_high): - """Internal function called from GDB that will execute the chain - of frame filters. Each filter is executed in priority order. - After the execution completes, slice the iterator to frame_low - - frame_high range. - - Arguments: - frame: The initial frame. - - frame_low: The low range of the slice, counting from 0. If - this is a negative integer then it indicates a backward slice - (ie bt -4) which counts backward from the last frame in the - backtrace. - - frame_high: The high range of the slice, inclusive. If this - is -1 then it indicates all frames until the end of the stack - from frame_low. - - Returns: - frame_iterator: The sliced iterator after all frame - filters have had a chance to execute, or None if no frame - filters are registered. - - """ - - return _frame_iterator(frame, frame_low, frame_high, False) diff --git a/Lib/gdb/function/__init__.py b/Lib/gdb/function/__init__.py deleted file mode 100644 index 4b64bc31b5bf99..00000000000000 --- a/Lib/gdb/function/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2012-2024 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 . diff --git a/Lib/gdb/function/as_string.py b/Lib/gdb/function/as_string.py deleted file mode 100644 index a255fff6402447..00000000000000 --- a/Lib/gdb/function/as_string.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright (C) 2016-2024 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 . - -import gdb - - -class _AsString(gdb.Function): - """Return the string representation of a value. - - Usage: $_as_string (VALUE) - - Arguments: - - VALUE: any value - - Returns: - The string representation of the value.""" - - def __init__(self): - super(_AsString, self).__init__("_as_string") - - def invoke(self, val): - return str(val) - - -_AsString() diff --git a/Lib/gdb/function/caller_is.py b/Lib/gdb/function/caller_is.py deleted file mode 100644 index bacd8c0ef8b33b..00000000000000 --- a/Lib/gdb/function/caller_is.py +++ /dev/null @@ -1,158 +0,0 @@ -# Caller-is functions. -# Copyright (C) 2008-2024 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 . - -import re - -import gdb - - -class CallerIs(gdb.Function): - """Check the calling function's name. - - Usage: $_caller_is (NAME [, NUMBER-OF-FRAMES]) - - Arguments: - - NAME: The name of the function to search for. - - NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently - selected frame to compare with. If the value is greater than the depth of - the stack from that point then the result is False. - The default is 1. - - Returns: - True if the function's name at the specified frame is equal to NAME.""" - - def __init__(self): - super(CallerIs, self).__init__("_caller_is") - - def invoke(self, name, nframes=1): - if nframes < 0: - raise ValueError("nframes must be >= 0") - frame = gdb.selected_frame() - while nframes > 0: - frame = frame.older() - if frame is None: - return False - nframes = nframes - 1 - return frame.name() == name.string() - - -class CallerMatches(gdb.Function): - """Compare the calling function's name with a regexp. - - Usage: $_caller_matches (REGEX [, NUMBER-OF-FRAMES]) - - Arguments: - - REGEX: The regular expression to compare the function's name with. - - NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently - selected frame to compare with. If the value is greater than the depth of - the stack from that point then the result is False. - The default is 1. - - Returns: - True if the function's name at the specified frame matches REGEX.""" - - def __init__(self): - super(CallerMatches, self).__init__("_caller_matches") - - def invoke(self, name, nframes=1): - if nframes < 0: - raise ValueError("nframes must be >= 0") - frame = gdb.selected_frame() - while nframes > 0: - frame = frame.older() - if frame is None: - return False - nframes = nframes - 1 - return re.match(name.string(), frame.name()) is not None - - -class AnyCallerIs(gdb.Function): - """Check all calling function's names. - - Usage: $_any_caller_is (NAME [, NUMBER-OF-FRAMES]) - - Arguments: - - NAME: The name of the function to search for. - - NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently - selected frame to compare with. If the value is greater than the depth of - the stack from that point then the result is False. - The default is 1. - - Returns: - True if any function's name is equal to NAME.""" - - def __init__(self): - super(AnyCallerIs, self).__init__("_any_caller_is") - - def invoke(self, name, nframes=1): - if nframes < 0: - raise ValueError("nframes must be >= 0") - frame = gdb.selected_frame() - while nframes >= 0: - if frame.name() == name.string(): - return True - frame = frame.older() - if frame is None: - return False - nframes = nframes - 1 - return False - - -class AnyCallerMatches(gdb.Function): - """Compare all calling function's names with a regexp. - - Usage: $_any_caller_matches (REGEX [, NUMBER-OF-FRAMES]) - - Arguments: - - REGEX: The regular expression to compare the function's name with. - - NUMBER-OF-FRAMES: How many stack frames to traverse back from the currently - selected frame to compare with. If the value is greater than the depth of - the stack from that point then the result is False. - The default is 1. - - Returns: - True if any function's name matches REGEX.""" - - def __init__(self): - super(AnyCallerMatches, self).__init__("_any_caller_matches") - - def invoke(self, name, nframes=1): - if nframes < 0: - raise ValueError("nframes must be >= 0") - frame = gdb.selected_frame() - name_re = re.compile(name.string()) - while nframes >= 0: - if name_re.match(frame.name()) is not None: - return True - frame = frame.older() - if frame is None: - return False - nframes = nframes - 1 - return False - - -CallerIs() -CallerMatches() -AnyCallerIs() -AnyCallerMatches() diff --git a/Lib/gdb/function/strfns.py b/Lib/gdb/function/strfns.py deleted file mode 100644 index 90c9ceab8679db..00000000000000 --- a/Lib/gdb/function/strfns.py +++ /dev/null @@ -1,105 +0,0 @@ -# Useful gdb string convenience functions. -# Copyright (C) 2012-2024 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 . - -"""$_memeq, $_strlen, $_streq, $_regex""" - -import re - -import gdb - - -class _MemEq(gdb.Function): - """$_memeq - compare bytes of memory. - - Usage: $_memeq (A, B, LEN) - - Returns: - True if LEN bytes at A and B compare equally.""" - - def __init__(self): - super(_MemEq, self).__init__("_memeq") - - def invoke(self, a, b, length): - if length < 0: - raise ValueError("length must be non-negative") - if length == 0: - return True - # The argument(s) to vector are [low_bound,]high_bound. - byte_vector = gdb.lookup_type("char").vector(length - 1) - ptr_byte_vector = byte_vector.pointer() - a_ptr = a.reinterpret_cast(ptr_byte_vector) - b_ptr = b.reinterpret_cast(ptr_byte_vector) - return a_ptr.dereference() == b_ptr.dereference() - - -class _StrLen(gdb.Function): - """$_strlen - compute string length. - - Usage: $_strlen (A) - - Returns: - Length of string A, assumed to be a string in the current language.""" - - def __init__(self): - super(_StrLen, self).__init__("_strlen") - - def invoke(self, a): - s = a.string() - return len(s) - - -class _StrEq(gdb.Function): - """$_streq - check string equality. - - Usage: $_streq (A, B) - - Returns: - True if A and B are identical strings in the current language. - - Example (amd64-linux): - catch syscall open - cond $bpnum $_streq((char*) $rdi, "foo")""" - - def __init__(self): - super(_StrEq, self).__init__("_streq") - - def invoke(self, a, b): - return a.string() == b.string() - - -class _RegEx(gdb.Function): - """$_regex - check if a string matches a regular expression. - - Usage: $_regex (STRING, REGEX) - - Returns: - True if string STRING (in the current language) matches the - regular expression REGEX.""" - - def __init__(self): - super(_RegEx, self).__init__("_regex") - - def invoke(self, string, regex): - s = string.string() - r = re.compile(regex.string()) - return bool(r.match(s)) - - -# GDB will import us automagically via gdb/__init__.py. -_MemEq() -_StrLen() -_StrEq() -_RegEx() diff --git a/Lib/gdb/missing_debug.py b/Lib/gdb/missing_debug.py deleted file mode 100644 index 6d57462c185bdd..00000000000000 --- a/Lib/gdb/missing_debug.py +++ /dev/null @@ -1,185 +0,0 @@ -# Copyright (C) 2023-2024 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 . - -""" -MissingDebugHandler base class, and register_handler function. -""" - -import sys - -import gdb - -if sys.version_info >= (3, 7): - # Functions str.isascii() and str.isalnum are available starting Python - # 3.7. - def isascii(ch): - return ch.isascii() - - def isalnum(ch): - return ch.isalnum() - -else: - # Fall back to curses.ascii.isascii() and curses.ascii.isalnum() for - # earlier versions. - from curses.ascii import isalnum, isascii - - -def _validate_name(name): - """Validate a missing debug handler name string. - - If name is valid as a missing debug handler name, then this - function does nothing. If name is not valid then an exception is - raised. - - Arguments: - name: A string, the name of a missing debug handler. - - Returns: - Nothing. - - Raises: - ValueError: If name is invalid as a missing debug handler - name. - """ - for ch in name: - if not isascii(ch) or not (isalnum(ch) or ch in "_-"): - raise ValueError("invalid character '%s' in handler name: %s" % (ch, name)) - - -class MissingDebugHandler(object): - """Base class for missing debug handlers written in Python. - - A missing debug handler has a single method __call__ along with - the read/write attribute enabled, and a read-only attribute name. - - Attributes: - name: Read-only attribute, the name of this handler. - enabled: When true this handler is enabled. - """ - - def __init__(self, name): - """Constructor. - - Args: - name: An identifying name for this handler. - - Raises: - TypeError: name is not a string. - ValueError: name contains invalid characters. - """ - - if not isinstance(name, str): - raise TypeError("incorrect type for name: %s" % type(name)) - - _validate_name(name) - - self._name = name - self._enabled = True - - @property - def name(self): - return self._name - - @property - def enabled(self): - return self._enabled - - @enabled.setter - def enabled(self, value): - if not isinstance(value, bool): - raise TypeError("incorrect type for enabled attribute: %s" % type(value)) - self._enabled = value - - def __call__(self, objfile): - """GDB handle missing debug information for an objfile. - - Arguments: - objfile: A gdb.Objfile for which GDB could not find any - debug information. - - Returns: - True: GDB should try again to locate the debug information - for objfile, the handler may have installed the - missing information. - False: GDB should move on without the debug information - for objfile. - A string: GDB should load the file at the given path; it - contains the debug information for objfile. - None: This handler can't help with objfile. GDB should - try any other registered handlers. - """ - raise NotImplementedError("MissingDebugHandler.__call__()") - - -def register_handler(locus, handler, replace=False): - """Register handler in given locus. - - The handler is prepended to the locus's missing debug handlers - list. The name of handler should be unique (or replace must be - True). - - Arguments: - locus: Either a progspace, or None (in which case the unwinder - is registered globally). - handler: An object of a gdb.MissingDebugHandler subclass. - - replace: If True, replaces existing handler with the same name - within locus. Otherwise, raises RuntimeException if - unwinder with the same name already exists. - - Returns: - Nothing. - - Raises: - RuntimeError: The name of handler is not unique. - TypeError: Bad locus type. - AttributeError: Required attributes of handler are missing. - """ - - if locus is None: - if gdb.parameter("verbose"): - gdb.write("Registering global %s handler ...\n" % handler.name) - locus = gdb - elif isinstance(locus, gdb.Progspace): - if gdb.parameter("verbose"): - gdb.write( - "Registering %s handler for %s ...\n" % (handler.name, locus.filename) - ) - else: - raise TypeError("locus should be gdb.Progspace or None") - - # Some sanity checks on HANDLER. Calling getattr will raise an - # exception if the attribute doesn't exist, which is what we want. - # These checks are not exhaustive; we don't check the attributes - # have the correct types, or the method has the correct signature, - # but this should catch some basic mistakes. - getattr(handler, "name") - getattr(handler, "enabled") - call_method = getattr(handler, "__call__") - if not callable(call_method): - raise AttributeError( - "'%s' object's '__call__' attribute is not callable" - % type(handler).__name__ - ) - - i = 0 - for needle in locus.missing_debug_handlers: - if needle.name == handler.name: - if replace: - del locus.missing_debug_handlers[i] - else: - raise RuntimeError("Handler %s already exists." % handler.name) - i += 1 - locus.missing_debug_handlers.insert(0, handler) diff --git a/Lib/gdb/printer/__init__.py b/Lib/gdb/printer/__init__.py deleted file mode 100644 index 6692044897b5c3..00000000000000 --- a/Lib/gdb/printer/__init__.py +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright (C) 2014-2024 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 . diff --git a/Lib/gdb/printer/bound_registers.py b/Lib/gdb/printer/bound_registers.py deleted file mode 100644 index d00b455ddb9796..00000000000000 --- a/Lib/gdb/printer/bound_registers.py +++ /dev/null @@ -1,39 +0,0 @@ -# Pretty-printers for bounds registers. -# Copyright (C) 2013-2024 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 . - -import gdb -import gdb.printing - - -class MpxBound128Printer(gdb.ValuePrinter): - """Adds size field to a mpx __gdb_builtin_type_bound128 type.""" - - def __init__(self, val): - self.__val = val - - def to_string(self): - upper = self.__val["ubound"] - lower = self.__val["lbound"] - size = upper - lower - if size > -1: - size = size + 1 - result = "{lbound = %s, ubound = %s} : size %s" % (lower, upper, size) - return result - - -gdb.printing.add_builtin_pretty_printer( - "mpx_bound128", "^builtin_type_bound128", MpxBound128Printer -) diff --git a/Lib/gdb/printing.py b/Lib/gdb/printing.py deleted file mode 100644 index 55ba43585eca13..00000000000000 --- a/Lib/gdb/printing.py +++ /dev/null @@ -1,403 +0,0 @@ -# Pretty-printer utilities. -# Copyright (C) 2010-2024 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 . - -"""Utilities for working with pretty-printers.""" - -import itertools -import re - -import gdb -import gdb.types - - -class PrettyPrinter(object): - """A basic pretty-printer. - - Attributes: - name: A unique string among all printers for the context in which - it is defined (objfile, progspace, or global(gdb)), and should - meaningfully describe what can be pretty-printed. - E.g., "StringPiece" or "protobufs". - subprinters: An iterable object with each element having a `name' - attribute, and, potentially, "enabled" attribute. - Or this is None if there are no subprinters. - enabled: A boolean indicating if the printer is enabled. - - Subprinters are for situations where "one" pretty-printer is actually a - collection of several printers. E.g., The libstdc++ pretty-printer has - a pretty-printer for each of several different types, based on regexps. - """ - - # While one might want to push subprinters into the subclass, it's - # present here to formalize such support to simplify - # commands/pretty_printers.py. - - def __init__(self, name, subprinters=None): - self.name = name - self.subprinters = subprinters - self.enabled = True - - def __call__(self, val): - # The subclass must define this. - raise NotImplementedError("PrettyPrinter __call__") - - -class SubPrettyPrinter(object): - """Baseclass for sub-pretty-printers. - - Sub-pretty-printers needn't use this, but it formalizes what's needed. - - Attributes: - name: The name of the subprinter. - enabled: A boolean indicating if the subprinter is enabled. - """ - - def __init__(self, name): - self.name = name - self.enabled = True - - -def register_pretty_printer(obj, printer, replace=False): - """Register pretty-printer PRINTER with OBJ. - - The printer is added to the front of the search list, thus one can override - an existing printer if one needs to. Use a different name when overriding - an existing printer, otherwise an exception will be raised; multiple - printers with the same name are disallowed. - - Arguments: - obj: Either an objfile, progspace, or None (in which case the printer - is registered globally). - printer: Either a function of one argument (old way) or any object - which has attributes: name, enabled, __call__. - replace: If True replace any existing copy of the printer. - Otherwise if the printer already exists raise an exception. - - Returns: - Nothing. - - Raises: - TypeError: A problem with the type of the printer. - ValueError: The printer's name contains a semicolon ";". - RuntimeError: A printer with the same name is already registered. - - If the caller wants the printer to be listable and disableable, it must - follow the PrettyPrinter API. This applies to the old way (functions) too. - If printer is an object, __call__ is a method of two arguments: - self, and the value to be pretty-printed. See PrettyPrinter. - """ - - # Watch for both __name__ and name. - # Functions get the former for free, but we don't want to use an - # attribute named __foo__ for pretty-printers-as-objects. - # If printer has both, we use `name'. - if not hasattr(printer, "__name__") and not hasattr(printer, "name"): - raise TypeError("printer missing attribute: name") - if hasattr(printer, "name") and not hasattr(printer, "enabled"): - raise TypeError("printer missing attribute: enabled") - if not hasattr(printer, "__call__"): - raise TypeError("printer missing attribute: __call__") - - if hasattr(printer, "name"): - name = printer.name - else: - name = printer.__name__ - if obj is None or obj is gdb: - if gdb.parameter("verbose"): - gdb.write("Registering global %s pretty-printer ...\n" % name) - obj = gdb - else: - if gdb.parameter("verbose"): - gdb.write( - "Registering %s pretty-printer for %s ...\n" % (name, obj.filename) - ) - - # Printers implemented as functions are old-style. In order to not risk - # breaking anything we do not check __name__ here. - if hasattr(printer, "name"): - if not isinstance(printer.name, str): - raise TypeError("printer name is not a string") - # If printer provides a name, make sure it doesn't contain ";". - # Semicolon is used by the info/enable/disable pretty-printer commands - # to delimit subprinters. - if printer.name.find(";") >= 0: - raise ValueError("semicolon ';' in printer name") - # Also make sure the name is unique. - # Alas, we can't do the same for functions and __name__, they could - # all have a canonical name like "lookup_function". - # PERF: gdb records printers in a list, making this inefficient. - i = 0 - for p in obj.pretty_printers: - if hasattr(p, "name") and p.name == printer.name: - if replace: - del obj.pretty_printers[i] - break - else: - raise RuntimeError( - "pretty-printer already registered: %s" % printer.name - ) - i = i + 1 - - obj.pretty_printers.insert(0, printer) - - -class RegexpCollectionPrettyPrinter(PrettyPrinter): - """Class for implementing a collection of regular-expression based pretty-printers. - - Intended usage: - - pretty_printer = RegexpCollectionPrettyPrinter("my_library") - pretty_printer.add_printer("myclass1", "^myclass1$", MyClass1Printer) - ... - pretty_printer.add_printer("myclassN", "^myclassN$", MyClassNPrinter) - register_pretty_printer(obj, pretty_printer) - """ - - class RegexpSubprinter(SubPrettyPrinter): - def __init__(self, name, regexp, gen_printer): - super(RegexpCollectionPrettyPrinter.RegexpSubprinter, self).__init__(name) - self.regexp = regexp - self.gen_printer = gen_printer - self.compiled_re = re.compile(regexp) - - def __init__(self, name): - super(RegexpCollectionPrettyPrinter, self).__init__(name, []) - - def add_printer(self, name, regexp, gen_printer): - """Add a printer to the list. - - The printer is added to the end of the list. - - Arguments: - name: The name of the subprinter. - regexp: The regular expression, as a string. - gen_printer: A function/method that given a value returns an - object to pretty-print it. - - Returns: - Nothing. - """ - - # NOTE: A previous version made the name of each printer the regexp. - # That makes it awkward to pass to the enable/disable commands (it's - # cumbersome to make a regexp of a regexp). So now the name is a - # separate parameter. - - self.subprinters.append(self.RegexpSubprinter(name, regexp, gen_printer)) - - def __call__(self, val): - """Lookup the pretty-printer for the provided value.""" - - # Get the type name. - typename = gdb.types.get_basic_type(val.type).tag - if not typename: - typename = val.type.name - if not typename: - return None - - # Iterate over table of type regexps to determine - # if a printer is registered for that type. - # Return an instantiation of the printer if found. - for printer in self.subprinters: - if printer.enabled and printer.compiled_re.search(typename): - return printer.gen_printer(val) - - # Cannot find a pretty printer. Return None. - return None - - -# A helper class for printing enum types. This class is instantiated -# with a list of enumerators to print a particular Value. -class _EnumInstance(gdb.ValuePrinter): - def __init__(self, enumerators, val): - self.__enumerators = enumerators - self.__val = val - - def to_string(self): - flag_list = [] - v = int(self.__val) - any_found = False - for e_name, e_value in self.__enumerators: - if v & e_value != 0: - flag_list.append(e_name) - v = v & ~e_value - any_found = True - if not any_found or v != 0: - # Leftover value. - flag_list.append("" % v) - return "0x%x [%s]" % (int(self.__val), " | ".join(flag_list)) - - -class FlagEnumerationPrinter(PrettyPrinter): - """A pretty-printer which can be used to print a flag-style enumeration. - A flag-style enumeration is one where the enumerators are or'd - together to create values. The new printer will print these - symbolically using '|' notation. The printer must be registered - manually. This printer is most useful when an enum is flag-like, - but has some overlap. GDB's built-in printing will not handle - this case, but this printer will attempt to.""" - - def __init__(self, enum_type): - super(FlagEnumerationPrinter, self).__init__(enum_type) - self.initialized = False - - def __call__(self, val): - if not self.initialized: - self.initialized = True - flags = gdb.lookup_type(self.name) - self.enumerators = [] - for field in flags.fields(): - self.enumerators.append((field.name, field.enumval)) - # Sorting the enumerators by value usually does the right - # thing. - self.enumerators.sort(key=lambda x: x[1]) - - if self.enabled: - return _EnumInstance(self.enumerators, val) - else: - return None - - -class NoOpScalarPrinter(gdb.ValuePrinter): - """A no-op pretty printer that wraps a scalar value.""" - - def __init__(self, value): - self.__value = value - - def to_string(self): - return self.__value.format_string(raw=True) - - -class NoOpPointerReferencePrinter(gdb.ValuePrinter): - """A no-op pretty printer that wraps a pointer or reference.""" - - def __init__(self, value): - self.__value = value - - def to_string(self): - return self.__value.format_string(deref_refs=False) - - def num_children(self): - return 1 - - def child(self, i): - return "value", self.__value.referenced_value() - - def children(self): - yield "value", self.__value.referenced_value() - - -class NoOpArrayPrinter(gdb.ValuePrinter): - """A no-op pretty printer that wraps an array value.""" - - def __init__(self, ty, value): - self.__value = value - (low, high) = ty.range() - # In Ada, an array can have an index type that is a - # non-contiguous enum. In this case the indexing must be done - # by using the indices into the enum type, not the underlying - # integer values. - range_type = ty.fields()[0].type - if range_type.target().code == gdb.TYPE_CODE_ENUM: - e_values = range_type.target().fields() - # Drop any values before LOW. - e_values = itertools.dropwhile(lambda x: x.enumval < low, e_values) - # Drop any values after HIGH. - e_values = itertools.takewhile(lambda x: x.enumval <= high, e_values) - low = 0 - high = len(list(e_values)) - 1 - self.__low = low - self.__high = high - - def to_string(self): - return "" - - def display_hint(self): - return "array" - - def num_children(self): - return self.__high - self.__low + 1 - - def child(self, i): - return (self.__low + i, self.__value[self.__low + i]) - - def children(self): - for i in range(self.__low, self.__high + 1): - yield (i, self.__value[i]) - - -class NoOpStructPrinter(gdb.ValuePrinter): - """A no-op pretty printer that wraps a struct or union value.""" - - def __init__(self, ty, value): - self.__ty = ty - self.__value = value - - def to_string(self): - return "" - - def children(self): - for field in self.__ty.fields(): - if hasattr(field, "bitpos") and field.name is not None: - yield (field.name, self.__value[field]) - - -def make_visualizer(value): - """Given a gdb.Value, wrap it in a pretty-printer. - - If a pretty-printer is found by the usual means, it is returned. - Otherwise, VALUE will be wrapped in a no-op visualizer.""" - - result = gdb.default_visualizer(value) - if result is not None: - # Found a pretty-printer. - pass - else: - ty = value.type.strip_typedefs() - if ty.is_string_like: - result = NoOpScalarPrinter(value) - elif ty.code == gdb.TYPE_CODE_ARRAY: - result = NoOpArrayPrinter(ty, value) - elif ty.is_array_like: - value = value.to_array() - ty = value.type.strip_typedefs() - result = NoOpArrayPrinter(ty, value) - elif ty.code in (gdb.TYPE_CODE_STRUCT, gdb.TYPE_CODE_UNION): - result = NoOpStructPrinter(ty, value) - elif ty.code in ( - gdb.TYPE_CODE_PTR, - gdb.TYPE_CODE_REF, - gdb.TYPE_CODE_RVALUE_REF, - ): - result = NoOpPointerReferencePrinter(value) - else: - result = NoOpScalarPrinter(value) - return result - - -# Builtin pretty-printers. -# The set is defined as empty, and files in printing/*.py add their printers -# to this with add_builtin_pretty_printer. - -_builtin_pretty_printers = RegexpCollectionPrettyPrinter("builtin") - -register_pretty_printer(None, _builtin_pretty_printers) - -# Add a builtin pretty-printer. - - -def add_builtin_pretty_printer(name, regexp, printer): - _builtin_pretty_printers.add_printer(name, regexp, printer) diff --git a/Lib/gdb/prompt.py b/Lib/gdb/prompt.py deleted file mode 100644 index 4ad38e4567aa5c..00000000000000 --- a/Lib/gdb/prompt.py +++ /dev/null @@ -1,164 +0,0 @@ -# Extended prompt utilities. -# Copyright (C) 2011-2024 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 . - -""" Extended prompt library functions.""" - -import os - -import gdb - - -def _prompt_pwd(ignore): - "The current working directory." - return os.getcwd() - - -def _prompt_object_attr(func, what, attr, nattr): - """Internal worker for fetching GDB attributes.""" - if attr is None: - attr = nattr - try: - obj = func() - except gdb.error: - return "" % what - if hasattr(obj, attr): - result = getattr(obj, attr) - if callable(result): - result = result() - return result - else: - return "" % (attr, what) - - -def _prompt_frame(attr): - "The selected frame; an argument names a frame parameter." - return _prompt_object_attr(gdb.selected_frame, "frame", attr, "name") - - -def _prompt_thread(attr): - "The selected thread; an argument names a thread parameter." - return _prompt_object_attr(gdb.selected_thread, "thread", attr, "num") - - -def _prompt_version(attr): - "The version of GDB." - return gdb.VERSION - - -def _prompt_esc(attr): - "The ESC character." - return "\033" - - -def _prompt_bs(attr): - "A backslash." - return "\\" - - -def _prompt_n(attr): - "A newline." - return "\n" - - -def _prompt_r(attr): - "A carriage return." - return "\r" - - -def _prompt_param(attr): - "A parameter's value; the argument names the parameter." - return gdb.parameter(attr) - - -def _prompt_noprint_begin(attr): - "Begins a sequence of non-printing characters." - return "\001" - - -def _prompt_noprint_end(attr): - "Ends a sequence of non-printing characters." - return "\002" - - -prompt_substitutions = { - "e": _prompt_esc, - "\\": _prompt_bs, - "n": _prompt_n, - "r": _prompt_r, - "v": _prompt_version, - "w": _prompt_pwd, - "f": _prompt_frame, - "t": _prompt_thread, - "p": _prompt_param, - "[": _prompt_noprint_begin, - "]": _prompt_noprint_end, -} - - -def prompt_help(): - """Generate help dynamically from the __doc__ strings of attribute - functions.""" - - result = "" - keys = sorted(prompt_substitutions.keys()) - for key in keys: - result += " \\%s\t%s\n" % (key, prompt_substitutions[key].__doc__) - result += """ -A substitution can be used in a simple form, like "\\f". -An argument can also be passed to it, like "\\f{name}". -The meaning of the argument depends on the particular substitution.""" - return result - - -def substitute_prompt(prompt): - "Perform substitutions on PROMPT." - - result = "" - plen = len(prompt) - i = 0 - while i < plen: - if prompt[i] == "\\": - i = i + 1 - if i >= plen: - break - cmdch = prompt[i] - - if cmdch in prompt_substitutions: - cmd = prompt_substitutions[cmdch] - - if i + 1 < plen and prompt[i + 1] == "{": - j = i + 1 - while j < plen and prompt[j] != "}": - j = j + 1 - # Just ignore formatting errors. - if j >= plen or prompt[j] != "}": - arg = None - else: - arg = prompt[i + 2 : j] - i = j - else: - arg = None - result += str(cmd(arg)) - else: - # Unrecognized escapes are turned into the escaped - # character itself. - result += prompt[i] - else: - result += prompt[i] - - i = i + 1 - - return result diff --git a/Lib/gdb/styling.py b/Lib/gdb/styling.py deleted file mode 100644 index 1c5394e479b1d2..00000000000000 --- a/Lib/gdb/styling.py +++ /dev/null @@ -1,101 +0,0 @@ -# Styling related hooks. -# Copyright (C) 2010-2024 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 . - -"""Utilities for styling.""" - -import gdb - -try: - from pygments import formatters, highlight, lexers - from pygments.filters import TokenMergeFilter - from pygments.token import Comment, Error, Text - - _formatter = None - - def get_formatter(): - global _formatter - if _formatter is None: - _formatter = formatters.TerminalFormatter() - return _formatter - - def colorize(filename, contents): - # Don't want any errors. - try: - lexer = lexers.get_lexer_for_filename(filename, stripnl=False) - formatter = get_formatter() - return highlight(contents, lexer, formatter).encode( - gdb.host_charset(), "backslashreplace" - ) - except Exception: - return None - - class HandleNasmComments(TokenMergeFilter): - @staticmethod - def fix_comments(lexer, stream): - in_comment = False - for ttype, value in stream: - if ttype is Error and value == "#": - in_comment = True - if in_comment: - if ttype is Text and value == "\n": - in_comment = False - else: - ttype = Comment.Single - yield ttype, value - - def filter(self, lexer, stream): - f = HandleNasmComments.fix_comments - return super().filter(lexer, f(lexer, stream)) - - _asm_lexers = {} - - def __get_asm_lexer(gdbarch): - lexer_type = "asm" - try: - # For an i386 based architecture, in 'intel' mode, use the nasm - # lexer. - flavor = gdb.parameter("disassembly-flavor") - if flavor == "intel" and gdbarch.name()[:4] == "i386": - lexer_type = "nasm" - except Exception: - # If GDB is built without i386 support then attempting to fetch - # the 'disassembly-flavor' parameter will throw an error, which we - # ignore. - pass - - global _asm_lexers - if lexer_type not in _asm_lexers: - _asm_lexers[lexer_type] = lexers.get_lexer_by_name(lexer_type) - _asm_lexers[lexer_type].add_filter(HandleNasmComments()) - _asm_lexers[lexer_type].add_filter("raiseonerror") - return _asm_lexers[lexer_type] - - def colorize_disasm(content, gdbarch): - # Don't want any errors. - try: - lexer = __get_asm_lexer(gdbarch) - formatter = get_formatter() - return highlight(content, lexer, formatter).rstrip().encode() - except Exception: - return content - -except ImportError: - - def colorize(filename, contents): - return None - - def colorize_disasm(content, gdbarch): - return None diff --git a/Lib/gdb/types.py b/Lib/gdb/types.py deleted file mode 100644 index b4af59c105b0f0..00000000000000 --- a/Lib/gdb/types.py +++ /dev/null @@ -1,183 +0,0 @@ -# Type utilities. -# Copyright (C) 2010-2024 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 . - -"""Utilities for working with gdb.Types.""" - -import gdb - - -def get_basic_type(type_): - """Return the "basic" type of a type. - - Arguments: - type_: The type to reduce to its basic type. - - Returns: - type_ with const/volatile is stripped away, - and typedefs/references converted to the underlying type. - """ - - while ( - type_.code == gdb.TYPE_CODE_REF - or type_.code == gdb.TYPE_CODE_RVALUE_REF - or type_.code == gdb.TYPE_CODE_TYPEDEF - ): - if type_.code == gdb.TYPE_CODE_REF or type_.code == gdb.TYPE_CODE_RVALUE_REF: - type_ = type_.target() - else: - type_ = type_.strip_typedefs() - return type_.unqualified() - - -def has_field(type_, field): - """Return True if a type has the specified field. - - Arguments: - type_: The type to examine. - It must be one of gdb.TYPE_CODE_STRUCT, gdb.TYPE_CODE_UNION. - field: The name of the field to look up. - - Returns: - True if the field is present either in type_ or any baseclass. - - Raises: - TypeError: The type is not a struct or union. - """ - - type_ = get_basic_type(type_) - if type_.code != gdb.TYPE_CODE_STRUCT and type_.code != gdb.TYPE_CODE_UNION: - raise TypeError("not a struct or union") - for f in type_.fields(): - if f.is_base_class: - if has_field(f.type, field): - return True - else: - # NOTE: f.name could be None - if f.name == field: - return True - return False - - -def make_enum_dict(enum_type): - """Return a dictionary from a program's enum type. - - Arguments: - enum_type: The enum to compute the dictionary for. - - Returns: - The dictionary of the enum. - - Raises: - TypeError: The type is not an enum. - """ - - if enum_type.code != gdb.TYPE_CODE_ENUM: - raise TypeError("not an enum type") - enum_dict = {} - for field in enum_type.fields(): - # The enum's value is stored in "enumval". - enum_dict[field.name] = field.enumval - return enum_dict - - -def deep_items(type_): - """Return an iterator that recursively traverses anonymous fields. - - Arguments: - type_: The type to traverse. It should be one of - gdb.TYPE_CODE_STRUCT or gdb.TYPE_CODE_UNION. - - Returns: - an iterator similar to gdb.Type.iteritems(), i.e., it returns - pairs of key, value, but for any anonymous struct or union - field that field is traversed recursively, depth-first. - """ - for k, v in type_.iteritems(): - if k: - yield k, v - else: - for i in deep_items(v.type): - yield i - - -class TypePrinter(object): - """The base class for type printers. - - Instances of this type can be used to substitute type names during - 'ptype'. - - A type printer must have at least 'name' and 'enabled' attributes, - and supply an 'instantiate' method. - - The 'instantiate' method must either return None, or return an - object which has a 'recognize' method. This method must accept a - gdb.Type argument and either return None, meaning that the type - was not recognized, or a string naming the type. - """ - - def __init__(self, name): - self.name = name - self.enabled = True - - def instantiate(self): - return None - - -# Helper function for computing the list of type recognizers. -def _get_some_type_recognizers(result, plist): - for printer in plist: - if printer.enabled: - inst = printer.instantiate() - if inst is not None: - result.append(inst) - return None - - -def get_type_recognizers(): - "Return a list of the enabled type recognizers for the current context." - result = [] - - # First try the objfiles. - for objfile in gdb.objfiles(): - _get_some_type_recognizers(result, objfile.type_printers) - # Now try the program space. - _get_some_type_recognizers(result, gdb.current_progspace().type_printers) - # Finally, globals. - _get_some_type_recognizers(result, gdb.type_printers) - - return result - - -def apply_type_recognizers(recognizers, type_obj): - """Apply the given list of type recognizers to the type TYPE_OBJ. - If any recognizer in the list recognizes TYPE_OBJ, returns the name - given by the recognizer. Otherwise, this returns None.""" - for r in recognizers: - result = r.recognize(type_obj) - if result is not None: - return result - return None - - -def register_type_printer(locus, printer): - """Register a type printer. - PRINTER is the type printer instance. - LOCUS is either an objfile, a program space, or None, indicating - global registration.""" - - if locus is None: - locus = gdb - locus.type_printers.insert(0, printer) diff --git a/Lib/gdb/unwinder.py b/Lib/gdb/unwinder.py deleted file mode 100644 index bb0db79a198306..00000000000000 --- a/Lib/gdb/unwinder.py +++ /dev/null @@ -1,140 +0,0 @@ -# Copyright (C) 2015-2024 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 . - -"""Unwinder class and register_unwinder function.""" - -import gdb - - -class Unwinder(object): - """Base class (or a template) for frame unwinders written in Python. - - An unwinder has a single method __call__ and the attributes - described below. - - Attributes: - name: The name of the unwinder. - enabled: A boolean indicating whether the unwinder is enabled. - """ - - def __init__(self, name): - """Constructor. - - Args: - name: An identifying name for the unwinder. - """ - - if not isinstance(name, str): - raise TypeError("incorrect type for name: %s" % type(name)) - - self._name = name - self._enabled = True - - @property - def name(self): - return self._name - - @property - def enabled(self): - return self._enabled - - @enabled.setter - def enabled(self, value): - if not isinstance(value, bool): - raise TypeError("incorrect type for enabled attribute: %s" % type(value)) - self._enabled = value - gdb.invalidate_cached_frames() - - def __call__(self, pending_frame): - """GDB calls this method to unwind a frame. - - Arguments: - pending_frame: gdb.PendingFrame instance. - - Returns: - gdb.UnwindInfo instance. - """ - raise NotImplementedError("Unwinder __call__.") - - -class FrameId(object): - """A Frame-ID class for use when creating gdb.UnwindInfo objects. - - Attributes (all read-only): - pc: Program counter value. - sp: The stack-pointer value. - special: An alternative stack-pointer value, can be None.""" - - def __init__(self, sp, pc, special=None): - self._sp = sp - self._pc = pc - self._special = special - - @property - def sp(self): - return self._sp - - @property - def pc(self): - return self._pc - - @property - def special(self): - return self._special - - -def register_unwinder(locus, unwinder, replace=False): - """Register unwinder in given locus. - - The unwinder is prepended to the locus's unwinders list. Unwinder - name should be unique. - - Arguments: - locus: Either an objfile, progspace, or None (in which case - the unwinder is registered globally). - unwinder: An object of a gdb.Unwinder subclass - replace: If True, replaces existing unwinder with the same name. - Otherwise, raises exception if unwinder with the same - name already exists. - - Returns: - Nothing. - - Raises: - RuntimeError: Unwinder name is not unique - TypeError: Bad locus type - """ - if locus is None: - if gdb.parameter("verbose"): - gdb.write("Registering global %s unwinder ...\n" % unwinder.name) - locus = gdb - elif isinstance(locus, gdb.Objfile) or isinstance(locus, gdb.Progspace): - if gdb.parameter("verbose"): - gdb.write( - "Registering %s unwinder for %s ...\n" % (unwinder.name, locus.filename) - ) - else: - raise TypeError("locus should be gdb.Objfile or gdb.Progspace or None") - - i = 0 - for needle in locus.frame_unwinders: - if needle.name == unwinder.name: - if replace: - del locus.frame_unwinders[i] - else: - raise RuntimeError("Unwinder %s already exists." % unwinder.name) - i += 1 - locus.frame_unwinders.insert(0, unwinder) - gdb.invalidate_cached_frames() diff --git a/Lib/gdb/xmethod.py b/Lib/gdb/xmethod.py deleted file mode 100644 index c98402d271f590..00000000000000 --- a/Lib/gdb/xmethod.py +++ /dev/null @@ -1,274 +0,0 @@ -# Python side of the support for xmethods. -# Copyright (C) 2013-2024 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 . - -"""Utilities for defining xmethods""" - -import re - -import gdb - - -class XMethod(object): - """Base class (or a template) for an xmethod description. - - Currently, the description requires only the 'name' and 'enabled' - attributes. Description objects are managed by 'XMethodMatcher' - objects (see below). Note that this is only a template for the - interface of the XMethodMatcher.methods objects. One could use - this class or choose to use an object which supports this exact same - interface. Also, an XMethodMatcher can choose not use it 'methods' - attribute. In such cases this class (or an equivalent) is not used. - - Attributes: - name: The name of the xmethod. - enabled: A boolean indicating if the xmethod is enabled. - """ - - def __init__(self, name): - self.name = name - self.enabled = True - - -class XMethodMatcher(object): - """Abstract base class for matching an xmethod. - - When looking for xmethods, GDB invokes the `match' method of a - registered xmethod matcher to match the object type and method name. - The `match' method in concrete classes derived from this class should - return an `XMethodWorker' object, or a list of `XMethodWorker' - objects if there is a match (see below for 'XMethodWorker' class). - - Attributes: - name: The name of the matcher. - enabled: A boolean indicating if the matcher is enabled. - methods: A sequence of objects of type 'XMethod', or objects - which have at least the attributes of an 'XMethod' object. - This list is used by the 'enable'/'disable'/'info' commands to - enable/disable/list the xmethods registered with GDB. See - the 'match' method below to know how this sequence is used. - This attribute is None if the matcher chooses not have any - xmethods managed by it. - """ - - def __init__(self, name): - """ - Args: - name: An identifying name for the xmethod or the group of - xmethods returned by the `match' method. - """ - self.name = name - self.enabled = True - self.methods = None - - def match(self, class_type, method_name): - """Match class type and method name. - - In derived classes, it should return an XMethodWorker object, or a - sequence of 'XMethodWorker' objects. Only those xmethod workers - whose corresponding 'XMethod' descriptor object is enabled should be - returned. - - Args: - class_type: The class type (gdb.Type object) to match. - method_name: The name (string) of the method to match. - """ - raise NotImplementedError("XMethodMatcher match") - - -class XMethodWorker(object): - """Base class for all xmethod workers defined in Python. - - An xmethod worker is an object which matches the method arguments, and - invokes the method when GDB wants it to. Internally, GDB first invokes the - 'get_arg_types' method to perform overload resolution. If GDB selects to - invoke this Python xmethod, then it invokes it via the overridden - '__call__' method. The 'get_result_type' method is used to implement - 'ptype' on the xmethod. - - Derived classes should override the 'get_arg_types', 'get_result_type' - and '__call__' methods. - """ - - def get_arg_types(self): - """Return arguments types of an xmethod. - - A sequence of gdb.Type objects corresponding to the arguments of the - xmethod are returned. If the xmethod takes no arguments, then 'None' - or an empty sequence is returned. If the xmethod takes only a single - argument, then a gdb.Type object or a sequence with a single gdb.Type - element is returned. - """ - raise NotImplementedError("XMethodWorker get_arg_types") - - def get_result_type(self, *args): - """Return the type of the result of the xmethod. - - Args: - args: Arguments to the method. Each element of the tuple is a - gdb.Value object. The first element is the 'this' pointer - value. These are the same arguments passed to '__call__'. - - Returns: - A gdb.Type object representing the type of the result of the - xmethod. - """ - raise NotImplementedError("XMethodWorker get_result_type") - - def __call__(self, *args): - """Invoke the xmethod. - - Args: - args: Arguments to the method. Each element of the tuple is a - gdb.Value object. The first element is the 'this' pointer - value. - - Returns: - A gdb.Value corresponding to the value returned by the xmethod. - Returns 'None' if the method does not return anything. - """ - raise NotImplementedError("XMethodWorker __call__") - - -class SimpleXMethodMatcher(XMethodMatcher): - """A utility class to implement simple xmethod mathers and workers. - - See the __init__ method below for information on how instances of this - class can be used. - - For simple classes and methods, one can choose to use this class. For - complex xmethods, which need to replace/implement template methods on - possibly template classes, one should implement their own xmethod - matchers and workers. See py-xmethods.py in testsuite/gdb.python - directory of the GDB source tree for examples. - """ - - class SimpleXMethodWorker(XMethodWorker): - def __init__(self, method_function, arg_types): - self._arg_types = arg_types - self._method_function = method_function - - def get_arg_types(self): - return self._arg_types - - def __call__(self, *args): - return self._method_function(*args) - - def __init__( - self, name, class_matcher, method_matcher, method_function, *arg_types - ): - """ - Args: - name: Name of the xmethod matcher. - class_matcher: A regular expression used to match the name of the - class whose method this xmethod is implementing/replacing. - method_matcher: A regular expression used to match the name of the - method this xmethod is implementing/replacing. - method_function: A Python callable which would be called via the - 'invoke' method of the worker returned by the objects of this - class. This callable should accept the object (*this) as the - first argument followed by the rest of the arguments to the - method. All arguments to this function should be gdb.Value - objects. - arg_types: The gdb.Type objects corresponding to the arguments that - this xmethod takes. It can be None, or an empty sequence, - or a single gdb.Type object, or a sequence of gdb.Type objects. - """ - XMethodMatcher.__init__(self, name) - assert callable(method_function), ( - "The 'method_function' argument to 'SimpleXMethodMatcher' " - "__init__ method should be a callable." - ) - self._method_function = method_function - self._class_matcher = class_matcher - self._method_matcher = method_matcher - self._arg_types = arg_types - - def match(self, class_type, method_name): - cm = re.match(self._class_matcher, str(class_type.unqualified().tag)) - mm = re.match(self._method_matcher, method_name) - if cm and mm: - return SimpleXMethodMatcher.SimpleXMethodWorker( - self._method_function, self._arg_types - ) - - -# A helper function for register_xmethod_matcher which returns an error -# object if MATCHER is not having the requisite attributes in the proper -# format. - - -def _validate_xmethod_matcher(matcher): - if not hasattr(matcher, "match"): - return TypeError("Xmethod matcher is missing method: match") - if not hasattr(matcher, "name"): - return TypeError("Xmethod matcher is missing attribute: name") - if not hasattr(matcher, "enabled"): - return TypeError("Xmethod matcher is missing attribute: enabled") - if not isinstance(matcher.name, str): - return TypeError("Attribute 'name' of xmethod matcher is not a " "string") - if matcher.name.find(";") >= 0: - return ValueError("Xmethod matcher name cannot contain ';' in it") - - -# A helper function for register_xmethod_matcher which looks up an -# xmethod matcher with NAME in LOCUS. Returns the index of the xmethod -# matcher in 'xmethods' sequence attribute of the LOCUS. If NAME is not -# found in LOCUS, then -1 is returned. - - -def _lookup_xmethod_matcher(locus, name): - for i in range(0, len(locus.xmethods)): - if locus.xmethods[i].name == name: - return i - return -1 - - -def register_xmethod_matcher(locus, matcher, replace=False): - """Registers a xmethod matcher MATCHER with a LOCUS. - - Arguments: - locus: The locus in which the xmethods should be registered. - It can be 'None' to indicate that the xmethods should be - registered globally. Or, it could be a gdb.Objfile or a - gdb.Progspace object in which the xmethods should be - registered. - matcher: The xmethod matcher to register with the LOCUS. It - should be an instance of 'XMethodMatcher' class. - replace: If True, replace any existing xmethod matcher with the - same name in the locus. Otherwise, if a matcher with the same name - exists in the locus, raise an exception. - """ - err = _validate_xmethod_matcher(matcher) - if err: - raise err - if not locus: - locus = gdb - if locus == gdb: - locus_name = "global" - else: - locus_name = locus.filename - index = _lookup_xmethod_matcher(locus, matcher.name) - if index >= 0: - if replace: - del locus.xmethods[index] - else: - raise RuntimeError( - "Xmethod matcher already registered with " - "%s: %s" % (locus_name, matcher.name) - ) - if gdb.parameter("verbose"): - gdb.write("Registering xmethod matcher '%s' with %s' ...\n") - locus.xmethods.insert(0, matcher) diff --git a/Makefile.pre.in b/Makefile.pre.in index 5870155841052a..59eafa918d0cc0 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1458,55 +1458,6 @@ FROZEN_FILES_IN = \ Lib/zoneinfo/_common.py \ Lib/zoneinfo/_tzpath.py \ Lib/zoneinfo/_zoneinfo.py \ - Lib/gdb/__init__.py \ - Lib/gdb/FrameDecorator.py \ - Lib/gdb/FrameIterator.py \ - Lib/gdb/command/__init__.py \ - Lib/gdb/command/explore.py \ - Lib/gdb/command/frame_filters.py \ - Lib/gdb/command/missing_debug.py \ - Lib/gdb/command/pretty_printers.py \ - Lib/gdb/command/prompt.py \ - Lib/gdb/command/type_printers.py \ - Lib/gdb/command/unwinders.py \ - Lib/gdb/command/xmethods.py \ - Lib/gdb/dap/__init__.py \ - Lib/gdb/dap/breakpoint.py \ - Lib/gdb/dap/bt.py \ - Lib/gdb/dap/disassemble.py \ - Lib/gdb/dap/evaluate.py \ - Lib/gdb/dap/events.py \ - Lib/gdb/dap/frames.py \ - Lib/gdb/dap/io.py \ - Lib/gdb/dap/launch.py \ - Lib/gdb/dap/locations.py \ - Lib/gdb/dap/memory.py \ - Lib/gdb/dap/modules.py \ - Lib/gdb/dap/next.py \ - Lib/gdb/dap/pause.py \ - Lib/gdb/dap/scopes.py \ - Lib/gdb/dap/server.py \ - Lib/gdb/dap/sources.py \ - Lib/gdb/dap/startup.py \ - Lib/gdb/dap/state.py \ - Lib/gdb/dap/threads.py \ - Lib/gdb/dap/typecheck.py \ - Lib/gdb/dap/varref.py \ - Lib/gdb/disassembler.py \ - Lib/gdb/frames.py \ - Lib/gdb/function/__init__.py \ - Lib/gdb/function/as_string.py \ - Lib/gdb/function/caller_is.py \ - Lib/gdb/function/strfns.py \ - Lib/gdb/missing_debug.py \ - Lib/gdb/printer/__init__.py \ - Lib/gdb/printer/bound_registers.py \ - Lib/gdb/printing.py \ - Lib/gdb/prompt.py \ - Lib/gdb/styling.py \ - Lib/gdb/types.py \ - Lib/gdb/unwinder.py \ - Lib/gdb/xmethod.py \ Lib/_sitebuiltins.py \ Lib/site.py \ Lib/runpy.py \ @@ -1867,55 +1818,6 @@ FROZEN_FILES_OUT = \ Python/frozen_modules/zoneinfo._common.h \ Python/frozen_modules/zoneinfo._tzpath.h \ Python/frozen_modules/zoneinfo._zoneinfo.h \ - Python/frozen_modules/gdb.h \ - Python/frozen_modules/gdb.FrameDecorator.h \ - Python/frozen_modules/gdb.FrameIterator.h \ - Python/frozen_modules/gdb.command.h \ - Python/frozen_modules/gdb.command.explore.h \ - Python/frozen_modules/gdb.command.frame_filters.h \ - Python/frozen_modules/gdb.command.missing_debug.h \ - Python/frozen_modules/gdb.command.pretty_printers.h \ - Python/frozen_modules/gdb.command.prompt.h \ - Python/frozen_modules/gdb.command.type_printers.h \ - Python/frozen_modules/gdb.command.unwinders.h \ - Python/frozen_modules/gdb.command.xmethods.h \ - Python/frozen_modules/gdb.dap.h \ - Python/frozen_modules/gdb.dap.breakpoint.h \ - Python/frozen_modules/gdb.dap.bt.h \ - Python/frozen_modules/gdb.dap.disassemble.h \ - Python/frozen_modules/gdb.dap.evaluate.h \ - Python/frozen_modules/gdb.dap.events.h \ - Python/frozen_modules/gdb.dap.frames.h \ - Python/frozen_modules/gdb.dap.io.h \ - Python/frozen_modules/gdb.dap.launch.h \ - Python/frozen_modules/gdb.dap.locations.h \ - Python/frozen_modules/gdb.dap.memory.h \ - Python/frozen_modules/gdb.dap.modules.h \ - Python/frozen_modules/gdb.dap.next.h \ - Python/frozen_modules/gdb.dap.pause.h \ - Python/frozen_modules/gdb.dap.scopes.h \ - Python/frozen_modules/gdb.dap.server.h \ - Python/frozen_modules/gdb.dap.sources.h \ - Python/frozen_modules/gdb.dap.startup.h \ - Python/frozen_modules/gdb.dap.state.h \ - Python/frozen_modules/gdb.dap.threads.h \ - Python/frozen_modules/gdb.dap.typecheck.h \ - Python/frozen_modules/gdb.dap.varref.h \ - Python/frozen_modules/gdb.disassembler.h \ - Python/frozen_modules/gdb.frames.h \ - Python/frozen_modules/gdb.function.h \ - Python/frozen_modules/gdb.function.as_string.h \ - Python/frozen_modules/gdb.function.caller_is.h \ - Python/frozen_modules/gdb.function.strfns.h \ - Python/frozen_modules/gdb.missing_debug.h \ - Python/frozen_modules/gdb.printer.h \ - Python/frozen_modules/gdb.printer.bound_registers.h \ - Python/frozen_modules/gdb.printing.h \ - Python/frozen_modules/gdb.prompt.h \ - Python/frozen_modules/gdb.styling.h \ - Python/frozen_modules/gdb.types.h \ - Python/frozen_modules/gdb.unwinder.h \ - Python/frozen_modules/gdb.xmethod.h \ Python/frozen_modules/_sitebuiltins.h \ Python/frozen_modules/site.h \ Python/frozen_modules/runpy.h \ @@ -2995,153 +2897,6 @@ Python/frozen_modules/zoneinfo._tzpath.h: Lib/zoneinfo/_tzpath.py $(FREEZE_MODUL Python/frozen_modules/zoneinfo._zoneinfo.h: Lib/zoneinfo/_zoneinfo.py $(FREEZE_MODULE_DEPS) $(FREEZE_MODULE) zoneinfo._zoneinfo $(srcdir)/Lib/zoneinfo/_zoneinfo.py Python/frozen_modules/zoneinfo._zoneinfo.h -Python/frozen_modules/gdb.h: Lib/gdb/__init__.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb $(srcdir)/Lib/gdb/__init__.py Python/frozen_modules/gdb.h - -Python/frozen_modules/gdb.FrameDecorator.h: Lib/gdb/FrameDecorator.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.FrameDecorator $(srcdir)/Lib/gdb/FrameDecorator.py Python/frozen_modules/gdb.FrameDecorator.h - -Python/frozen_modules/gdb.FrameIterator.h: Lib/gdb/FrameIterator.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.FrameIterator $(srcdir)/Lib/gdb/FrameIterator.py Python/frozen_modules/gdb.FrameIterator.h - -Python/frozen_modules/gdb.command.h: Lib/gdb/command/__init__.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command $(srcdir)/Lib/gdb/command/__init__.py Python/frozen_modules/gdb.command.h - -Python/frozen_modules/gdb.command.explore.h: Lib/gdb/command/explore.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.explore $(srcdir)/Lib/gdb/command/explore.py Python/frozen_modules/gdb.command.explore.h - -Python/frozen_modules/gdb.command.frame_filters.h: Lib/gdb/command/frame_filters.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.frame_filters $(srcdir)/Lib/gdb/command/frame_filters.py Python/frozen_modules/gdb.command.frame_filters.h - -Python/frozen_modules/gdb.command.missing_debug.h: Lib/gdb/command/missing_debug.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.missing_debug $(srcdir)/Lib/gdb/command/missing_debug.py Python/frozen_modules/gdb.command.missing_debug.h - -Python/frozen_modules/gdb.command.pretty_printers.h: Lib/gdb/command/pretty_printers.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.pretty_printers $(srcdir)/Lib/gdb/command/pretty_printers.py Python/frozen_modules/gdb.command.pretty_printers.h - -Python/frozen_modules/gdb.command.prompt.h: Lib/gdb/command/prompt.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.prompt $(srcdir)/Lib/gdb/command/prompt.py Python/frozen_modules/gdb.command.prompt.h - -Python/frozen_modules/gdb.command.type_printers.h: Lib/gdb/command/type_printers.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.type_printers $(srcdir)/Lib/gdb/command/type_printers.py Python/frozen_modules/gdb.command.type_printers.h - -Python/frozen_modules/gdb.command.unwinders.h: Lib/gdb/command/unwinders.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.unwinders $(srcdir)/Lib/gdb/command/unwinders.py Python/frozen_modules/gdb.command.unwinders.h - -Python/frozen_modules/gdb.command.xmethods.h: Lib/gdb/command/xmethods.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.command.xmethods $(srcdir)/Lib/gdb/command/xmethods.py Python/frozen_modules/gdb.command.xmethods.h - -Python/frozen_modules/gdb.dap.h: Lib/gdb/dap/__init__.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap $(srcdir)/Lib/gdb/dap/__init__.py Python/frozen_modules/gdb.dap.h - -Python/frozen_modules/gdb.dap.breakpoint.h: Lib/gdb/dap/breakpoint.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.breakpoint $(srcdir)/Lib/gdb/dap/breakpoint.py Python/frozen_modules/gdb.dap.breakpoint.h - -Python/frozen_modules/gdb.dap.bt.h: Lib/gdb/dap/bt.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.bt $(srcdir)/Lib/gdb/dap/bt.py Python/frozen_modules/gdb.dap.bt.h - -Python/frozen_modules/gdb.dap.disassemble.h: Lib/gdb/dap/disassemble.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.disassemble $(srcdir)/Lib/gdb/dap/disassemble.py Python/frozen_modules/gdb.dap.disassemble.h - -Python/frozen_modules/gdb.dap.evaluate.h: Lib/gdb/dap/evaluate.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.evaluate $(srcdir)/Lib/gdb/dap/evaluate.py Python/frozen_modules/gdb.dap.evaluate.h - -Python/frozen_modules/gdb.dap.events.h: Lib/gdb/dap/events.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.events $(srcdir)/Lib/gdb/dap/events.py Python/frozen_modules/gdb.dap.events.h - -Python/frozen_modules/gdb.dap.frames.h: Lib/gdb/dap/frames.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.frames $(srcdir)/Lib/gdb/dap/frames.py Python/frozen_modules/gdb.dap.frames.h - -Python/frozen_modules/gdb.dap.io.h: Lib/gdb/dap/io.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.io $(srcdir)/Lib/gdb/dap/io.py Python/frozen_modules/gdb.dap.io.h - -Python/frozen_modules/gdb.dap.launch.h: Lib/gdb/dap/launch.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.launch $(srcdir)/Lib/gdb/dap/launch.py Python/frozen_modules/gdb.dap.launch.h - -Python/frozen_modules/gdb.dap.locations.h: Lib/gdb/dap/locations.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.locations $(srcdir)/Lib/gdb/dap/locations.py Python/frozen_modules/gdb.dap.locations.h - -Python/frozen_modules/gdb.dap.memory.h: Lib/gdb/dap/memory.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.memory $(srcdir)/Lib/gdb/dap/memory.py Python/frozen_modules/gdb.dap.memory.h - -Python/frozen_modules/gdb.dap.modules.h: Lib/gdb/dap/modules.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.modules $(srcdir)/Lib/gdb/dap/modules.py Python/frozen_modules/gdb.dap.modules.h - -Python/frozen_modules/gdb.dap.next.h: Lib/gdb/dap/next.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.next $(srcdir)/Lib/gdb/dap/next.py Python/frozen_modules/gdb.dap.next.h - -Python/frozen_modules/gdb.dap.pause.h: Lib/gdb/dap/pause.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.pause $(srcdir)/Lib/gdb/dap/pause.py Python/frozen_modules/gdb.dap.pause.h - -Python/frozen_modules/gdb.dap.scopes.h: Lib/gdb/dap/scopes.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.scopes $(srcdir)/Lib/gdb/dap/scopes.py Python/frozen_modules/gdb.dap.scopes.h - -Python/frozen_modules/gdb.dap.server.h: Lib/gdb/dap/server.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.server $(srcdir)/Lib/gdb/dap/server.py Python/frozen_modules/gdb.dap.server.h - -Python/frozen_modules/gdb.dap.sources.h: Lib/gdb/dap/sources.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.sources $(srcdir)/Lib/gdb/dap/sources.py Python/frozen_modules/gdb.dap.sources.h - -Python/frozen_modules/gdb.dap.startup.h: Lib/gdb/dap/startup.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.startup $(srcdir)/Lib/gdb/dap/startup.py Python/frozen_modules/gdb.dap.startup.h - -Python/frozen_modules/gdb.dap.state.h: Lib/gdb/dap/state.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.state $(srcdir)/Lib/gdb/dap/state.py Python/frozen_modules/gdb.dap.state.h - -Python/frozen_modules/gdb.dap.threads.h: Lib/gdb/dap/threads.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.threads $(srcdir)/Lib/gdb/dap/threads.py Python/frozen_modules/gdb.dap.threads.h - -Python/frozen_modules/gdb.dap.typecheck.h: Lib/gdb/dap/typecheck.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.typecheck $(srcdir)/Lib/gdb/dap/typecheck.py Python/frozen_modules/gdb.dap.typecheck.h - -Python/frozen_modules/gdb.dap.varref.h: Lib/gdb/dap/varref.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.dap.varref $(srcdir)/Lib/gdb/dap/varref.py Python/frozen_modules/gdb.dap.varref.h - -Python/frozen_modules/gdb.disassembler.h: Lib/gdb/disassembler.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.disassembler $(srcdir)/Lib/gdb/disassembler.py Python/frozen_modules/gdb.disassembler.h - -Python/frozen_modules/gdb.frames.h: Lib/gdb/frames.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.frames $(srcdir)/Lib/gdb/frames.py Python/frozen_modules/gdb.frames.h - -Python/frozen_modules/gdb.function.h: Lib/gdb/function/__init__.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.function $(srcdir)/Lib/gdb/function/__init__.py Python/frozen_modules/gdb.function.h - -Python/frozen_modules/gdb.function.as_string.h: Lib/gdb/function/as_string.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.function.as_string $(srcdir)/Lib/gdb/function/as_string.py Python/frozen_modules/gdb.function.as_string.h - -Python/frozen_modules/gdb.function.caller_is.h: Lib/gdb/function/caller_is.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.function.caller_is $(srcdir)/Lib/gdb/function/caller_is.py Python/frozen_modules/gdb.function.caller_is.h - -Python/frozen_modules/gdb.function.strfns.h: Lib/gdb/function/strfns.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.function.strfns $(srcdir)/Lib/gdb/function/strfns.py Python/frozen_modules/gdb.function.strfns.h - -Python/frozen_modules/gdb.missing_debug.h: Lib/gdb/missing_debug.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.missing_debug $(srcdir)/Lib/gdb/missing_debug.py Python/frozen_modules/gdb.missing_debug.h - -Python/frozen_modules/gdb.printer.h: Lib/gdb/printer/__init__.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.printer $(srcdir)/Lib/gdb/printer/__init__.py Python/frozen_modules/gdb.printer.h - -Python/frozen_modules/gdb.printer.bound_registers.h: Lib/gdb/printer/bound_registers.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.printer.bound_registers $(srcdir)/Lib/gdb/printer/bound_registers.py Python/frozen_modules/gdb.printer.bound_registers.h - -Python/frozen_modules/gdb.printing.h: Lib/gdb/printing.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.printing $(srcdir)/Lib/gdb/printing.py Python/frozen_modules/gdb.printing.h - -Python/frozen_modules/gdb.prompt.h: Lib/gdb/prompt.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.prompt $(srcdir)/Lib/gdb/prompt.py Python/frozen_modules/gdb.prompt.h - -Python/frozen_modules/gdb.styling.h: Lib/gdb/styling.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.styling $(srcdir)/Lib/gdb/styling.py Python/frozen_modules/gdb.styling.h - -Python/frozen_modules/gdb.types.h: Lib/gdb/types.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.types $(srcdir)/Lib/gdb/types.py Python/frozen_modules/gdb.types.h - -Python/frozen_modules/gdb.unwinder.h: Lib/gdb/unwinder.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.unwinder $(srcdir)/Lib/gdb/unwinder.py Python/frozen_modules/gdb.unwinder.h - -Python/frozen_modules/gdb.xmethod.h: Lib/gdb/xmethod.py $(FREEZE_MODULE_DEPS) - $(FREEZE_MODULE) gdb.xmethod $(srcdir)/Lib/gdb/xmethod.py Python/frozen_modules/gdb.xmethod.h - Python/frozen_modules/_sitebuiltins.h: Lib/_sitebuiltins.py $(FREEZE_MODULE_DEPS) $(FREEZE_MODULE) _sitebuiltins $(srcdir)/Lib/_sitebuiltins.py Python/frozen_modules/_sitebuiltins.h @@ -3530,55 +3285,6 @@ $(DEEPFREEZE_C): $(DEEPFREEZE_DEPS) Python/frozen_modules/zoneinfo._common.h:zoneinfo._common \ Python/frozen_modules/zoneinfo._tzpath.h:zoneinfo._tzpath \ Python/frozen_modules/zoneinfo._zoneinfo.h:zoneinfo._zoneinfo \ - Python/frozen_modules/gdb.h:gdb \ - Python/frozen_modules/gdb.FrameDecorator.h:gdb.FrameDecorator \ - Python/frozen_modules/gdb.FrameIterator.h:gdb.FrameIterator \ - Python/frozen_modules/gdb.command.h:gdb.command \ - Python/frozen_modules/gdb.command.explore.h:gdb.command.explore \ - Python/frozen_modules/gdb.command.frame_filters.h:gdb.command.frame_filters \ - Python/frozen_modules/gdb.command.missing_debug.h:gdb.command.missing_debug \ - Python/frozen_modules/gdb.command.pretty_printers.h:gdb.command.pretty_printers \ - Python/frozen_modules/gdb.command.prompt.h:gdb.command.prompt \ - Python/frozen_modules/gdb.command.type_printers.h:gdb.command.type_printers \ - Python/frozen_modules/gdb.command.unwinders.h:gdb.command.unwinders \ - Python/frozen_modules/gdb.command.xmethods.h:gdb.command.xmethods \ - Python/frozen_modules/gdb.dap.h:gdb.dap \ - Python/frozen_modules/gdb.dap.breakpoint.h:gdb.dap.breakpoint \ - Python/frozen_modules/gdb.dap.bt.h:gdb.dap.bt \ - Python/frozen_modules/gdb.dap.disassemble.h:gdb.dap.disassemble \ - Python/frozen_modules/gdb.dap.evaluate.h:gdb.dap.evaluate \ - Python/frozen_modules/gdb.dap.events.h:gdb.dap.events \ - Python/frozen_modules/gdb.dap.frames.h:gdb.dap.frames \ - Python/frozen_modules/gdb.dap.io.h:gdb.dap.io \ - Python/frozen_modules/gdb.dap.launch.h:gdb.dap.launch \ - Python/frozen_modules/gdb.dap.locations.h:gdb.dap.locations \ - Python/frozen_modules/gdb.dap.memory.h:gdb.dap.memory \ - Python/frozen_modules/gdb.dap.modules.h:gdb.dap.modules \ - Python/frozen_modules/gdb.dap.next.h:gdb.dap.next \ - Python/frozen_modules/gdb.dap.pause.h:gdb.dap.pause \ - Python/frozen_modules/gdb.dap.scopes.h:gdb.dap.scopes \ - Python/frozen_modules/gdb.dap.server.h:gdb.dap.server \ - Python/frozen_modules/gdb.dap.sources.h:gdb.dap.sources \ - Python/frozen_modules/gdb.dap.startup.h:gdb.dap.startup \ - Python/frozen_modules/gdb.dap.state.h:gdb.dap.state \ - Python/frozen_modules/gdb.dap.threads.h:gdb.dap.threads \ - Python/frozen_modules/gdb.dap.typecheck.h:gdb.dap.typecheck \ - Python/frozen_modules/gdb.dap.varref.h:gdb.dap.varref \ - Python/frozen_modules/gdb.disassembler.h:gdb.disassembler \ - Python/frozen_modules/gdb.frames.h:gdb.frames \ - Python/frozen_modules/gdb.function.h:gdb.function \ - Python/frozen_modules/gdb.function.as_string.h:gdb.function.as_string \ - Python/frozen_modules/gdb.function.caller_is.h:gdb.function.caller_is \ - Python/frozen_modules/gdb.function.strfns.h:gdb.function.strfns \ - Python/frozen_modules/gdb.missing_debug.h:gdb.missing_debug \ - Python/frozen_modules/gdb.printer.h:gdb.printer \ - Python/frozen_modules/gdb.printer.bound_registers.h:gdb.printer.bound_registers \ - Python/frozen_modules/gdb.printing.h:gdb.printing \ - Python/frozen_modules/gdb.prompt.h:gdb.prompt \ - Python/frozen_modules/gdb.styling.h:gdb.styling \ - Python/frozen_modules/gdb.types.h:gdb.types \ - Python/frozen_modules/gdb.unwinder.h:gdb.unwinder \ - Python/frozen_modules/gdb.xmethod.h:gdb.xmethod \ Python/frozen_modules/_sitebuiltins.h:_sitebuiltins \ Python/frozen_modules/site.h:site \ Python/frozen_modules/runpy.h:runpy \ diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj index d09be9bed81f83..a45d6f615c5983 100644 --- a/PCbuild/_freeze_module.vcxproj +++ b/PCbuild/_freeze_module.vcxproj @@ -2011,251 +2011,6 @@ $(IntDir)zoneinfo._zoneinfo.g.h $(PySourcePath)Python\frozen_modules\zoneinfo._zoneinfo.h - - gdb - $(IntDir)gdb.g.h - $(PySourcePath)Python\frozen_modules\gdb.h - - - gdb.FrameDecorator - $(IntDir)gdb.FrameDecorator.g.h - $(PySourcePath)Python\frozen_modules\gdb.FrameDecorator.h - - - gdb.FrameIterator - $(IntDir)gdb.FrameIterator.g.h - $(PySourcePath)Python\frozen_modules\gdb.FrameIterator.h - - - gdb.command - $(IntDir)gdb.command.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.h - - - gdb.command.explore - $(IntDir)gdb.command.explore.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.explore.h - - - gdb.command.frame_filters - $(IntDir)gdb.command.frame_filters.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.frame_filters.h - - - gdb.command.missing_debug - $(IntDir)gdb.command.missing_debug.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.missing_debug.h - - - gdb.command.pretty_printers - $(IntDir)gdb.command.pretty_printers.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.pretty_printers.h - - - gdb.command.prompt - $(IntDir)gdb.command.prompt.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.prompt.h - - - gdb.command.type_printers - $(IntDir)gdb.command.type_printers.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.type_printers.h - - - gdb.command.unwinders - $(IntDir)gdb.command.unwinders.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.unwinders.h - - - gdb.command.xmethods - $(IntDir)gdb.command.xmethods.g.h - $(PySourcePath)Python\frozen_modules\gdb.command.xmethods.h - - - gdb.dap - $(IntDir)gdb.dap.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.h - - - gdb.dap.breakpoint - $(IntDir)gdb.dap.breakpoint.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.breakpoint.h - - - gdb.dap.bt - $(IntDir)gdb.dap.bt.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.bt.h - - - gdb.dap.disassemble - $(IntDir)gdb.dap.disassemble.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.disassemble.h - - - gdb.dap.evaluate - $(IntDir)gdb.dap.evaluate.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.evaluate.h - - - gdb.dap.events - $(IntDir)gdb.dap.events.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.events.h - - - gdb.dap.frames - $(IntDir)gdb.dap.frames.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.frames.h - - - gdb.dap.io - $(IntDir)gdb.dap.io.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.io.h - - - gdb.dap.launch - $(IntDir)gdb.dap.launch.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.launch.h - - - gdb.dap.locations - $(IntDir)gdb.dap.locations.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.locations.h - - - gdb.dap.memory - $(IntDir)gdb.dap.memory.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.memory.h - - - gdb.dap.modules - $(IntDir)gdb.dap.modules.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.modules.h - - - gdb.dap.next - $(IntDir)gdb.dap.next.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.next.h - - - gdb.dap.pause - $(IntDir)gdb.dap.pause.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.pause.h - - - gdb.dap.scopes - $(IntDir)gdb.dap.scopes.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.scopes.h - - - gdb.dap.server - $(IntDir)gdb.dap.server.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.server.h - - - gdb.dap.sources - $(IntDir)gdb.dap.sources.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.sources.h - - - gdb.dap.startup - $(IntDir)gdb.dap.startup.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.startup.h - - - gdb.dap.state - $(IntDir)gdb.dap.state.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.state.h - - - gdb.dap.threads - $(IntDir)gdb.dap.threads.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.threads.h - - - gdb.dap.typecheck - $(IntDir)gdb.dap.typecheck.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.typecheck.h - - - gdb.dap.varref - $(IntDir)gdb.dap.varref.g.h - $(PySourcePath)Python\frozen_modules\gdb.dap.varref.h - - - gdb.disassembler - $(IntDir)gdb.disassembler.g.h - $(PySourcePath)Python\frozen_modules\gdb.disassembler.h - - - gdb.frames - $(IntDir)gdb.frames.g.h - $(PySourcePath)Python\frozen_modules\gdb.frames.h - - - gdb.function - $(IntDir)gdb.function.g.h - $(PySourcePath)Python\frozen_modules\gdb.function.h - - - gdb.function.as_string - $(IntDir)gdb.function.as_string.g.h - $(PySourcePath)Python\frozen_modules\gdb.function.as_string.h - - - gdb.function.caller_is - $(IntDir)gdb.function.caller_is.g.h - $(PySourcePath)Python\frozen_modules\gdb.function.caller_is.h - - - gdb.function.strfns - $(IntDir)gdb.function.strfns.g.h - $(PySourcePath)Python\frozen_modules\gdb.function.strfns.h - - - gdb.missing_debug - $(IntDir)gdb.missing_debug.g.h - $(PySourcePath)Python\frozen_modules\gdb.missing_debug.h - - - gdb.printer - $(IntDir)gdb.printer.g.h - $(PySourcePath)Python\frozen_modules\gdb.printer.h - - - gdb.printer.bound_registers - $(IntDir)gdb.printer.bound_registers.g.h - $(PySourcePath)Python\frozen_modules\gdb.printer.bound_registers.h - - - gdb.printing - $(IntDir)gdb.printing.g.h - $(PySourcePath)Python\frozen_modules\gdb.printing.h - - - gdb.prompt - $(IntDir)gdb.prompt.g.h - $(PySourcePath)Python\frozen_modules\gdb.prompt.h - - - gdb.styling - $(IntDir)gdb.styling.g.h - $(PySourcePath)Python\frozen_modules\gdb.styling.h - - - gdb.types - $(IntDir)gdb.types.g.h - $(PySourcePath)Python\frozen_modules\gdb.types.h - - - gdb.unwinder - $(IntDir)gdb.unwinder.g.h - $(PySourcePath)Python\frozen_modules\gdb.unwinder.h - - - gdb.xmethod - $(IntDir)gdb.xmethod.g.h - $(PySourcePath)Python\frozen_modules\gdb.xmethod.h - _sitebuiltins $(IntDir)_sitebuiltins.g.h @@ -2677,55 +2432,6 @@ "$(PySourcePath)Python\frozen_modules\zoneinfo._common.h:zoneinfo._common" ^ "$(PySourcePath)Python\frozen_modules\zoneinfo._tzpath.h:zoneinfo._tzpath" ^ "$(PySourcePath)Python\frozen_modules\zoneinfo._zoneinfo.h:zoneinfo._zoneinfo" ^ - "$(PySourcePath)Python\frozen_modules\gdb.h:gdb" ^ - "$(PySourcePath)Python\frozen_modules\gdb.FrameDecorator.h:gdb.FrameDecorator" ^ - "$(PySourcePath)Python\frozen_modules\gdb.FrameIterator.h:gdb.FrameIterator" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.h:gdb.command" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.explore.h:gdb.command.explore" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.frame_filters.h:gdb.command.frame_filters" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.missing_debug.h:gdb.command.missing_debug" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.pretty_printers.h:gdb.command.pretty_printers" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.prompt.h:gdb.command.prompt" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.type_printers.h:gdb.command.type_printers" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.unwinders.h:gdb.command.unwinders" ^ - "$(PySourcePath)Python\frozen_modules\gdb.command.xmethods.h:gdb.command.xmethods" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.h:gdb.dap" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.breakpoint.h:gdb.dap.breakpoint" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.bt.h:gdb.dap.bt" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.disassemble.h:gdb.dap.disassemble" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.evaluate.h:gdb.dap.evaluate" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.events.h:gdb.dap.events" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.frames.h:gdb.dap.frames" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.io.h:gdb.dap.io" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.launch.h:gdb.dap.launch" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.locations.h:gdb.dap.locations" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.memory.h:gdb.dap.memory" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.modules.h:gdb.dap.modules" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.next.h:gdb.dap.next" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.pause.h:gdb.dap.pause" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.scopes.h:gdb.dap.scopes" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.server.h:gdb.dap.server" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.sources.h:gdb.dap.sources" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.startup.h:gdb.dap.startup" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.state.h:gdb.dap.state" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.threads.h:gdb.dap.threads" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.typecheck.h:gdb.dap.typecheck" ^ - "$(PySourcePath)Python\frozen_modules\gdb.dap.varref.h:gdb.dap.varref" ^ - "$(PySourcePath)Python\frozen_modules\gdb.disassembler.h:gdb.disassembler" ^ - "$(PySourcePath)Python\frozen_modules\gdb.frames.h:gdb.frames" ^ - "$(PySourcePath)Python\frozen_modules\gdb.function.h:gdb.function" ^ - "$(PySourcePath)Python\frozen_modules\gdb.function.as_string.h:gdb.function.as_string" ^ - "$(PySourcePath)Python\frozen_modules\gdb.function.caller_is.h:gdb.function.caller_is" ^ - "$(PySourcePath)Python\frozen_modules\gdb.function.strfns.h:gdb.function.strfns" ^ - "$(PySourcePath)Python\frozen_modules\gdb.missing_debug.h:gdb.missing_debug" ^ - "$(PySourcePath)Python\frozen_modules\gdb.printer.h:gdb.printer" ^ - "$(PySourcePath)Python\frozen_modules\gdb.printer.bound_registers.h:gdb.printer.bound_registers" ^ - "$(PySourcePath)Python\frozen_modules\gdb.printing.h:gdb.printing" ^ - "$(PySourcePath)Python\frozen_modules\gdb.prompt.h:gdb.prompt" ^ - "$(PySourcePath)Python\frozen_modules\gdb.styling.h:gdb.styling" ^ - "$(PySourcePath)Python\frozen_modules\gdb.types.h:gdb.types" ^ - "$(PySourcePath)Python\frozen_modules\gdb.unwinder.h:gdb.unwinder" ^ - "$(PySourcePath)Python\frozen_modules\gdb.xmethod.h:gdb.xmethod" ^ "$(PySourcePath)Python\frozen_modules\_sitebuiltins.h:_sitebuiltins" ^ "$(PySourcePath)Python\frozen_modules\site.h:site" ^ "$(PySourcePath)Python\frozen_modules\runpy.h:runpy" ^ diff --git a/PCbuild/_freeze_module.vcxproj.filters b/PCbuild/_freeze_module.vcxproj.filters index 42719f754258c1..5cb335e2d9e80a 100644 --- a/PCbuild/_freeze_module.vcxproj.filters +++ b/PCbuild/_freeze_module.vcxproj.filters @@ -1488,153 +1488,6 @@ Python Files - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - - - Python Files - Python Files diff --git a/Python/frozen.c b/Python/frozen.c index fb3769e481295d..10acf10ed93970 100644 --- a/Python/frozen.c +++ b/Python/frozen.c @@ -394,55 +394,6 @@ #include "frozen_modules/zoneinfo._common.h" #include "frozen_modules/zoneinfo._tzpath.h" #include "frozen_modules/zoneinfo._zoneinfo.h" -#include "frozen_modules/gdb.h" -#include "frozen_modules/gdb.FrameDecorator.h" -#include "frozen_modules/gdb.FrameIterator.h" -#include "frozen_modules/gdb.command.h" -#include "frozen_modules/gdb.command.explore.h" -#include "frozen_modules/gdb.command.frame_filters.h" -#include "frozen_modules/gdb.command.missing_debug.h" -#include "frozen_modules/gdb.command.pretty_printers.h" -#include "frozen_modules/gdb.command.prompt.h" -#include "frozen_modules/gdb.command.type_printers.h" -#include "frozen_modules/gdb.command.unwinders.h" -#include "frozen_modules/gdb.command.xmethods.h" -#include "frozen_modules/gdb.dap.h" -#include "frozen_modules/gdb.dap.breakpoint.h" -#include "frozen_modules/gdb.dap.bt.h" -#include "frozen_modules/gdb.dap.disassemble.h" -#include "frozen_modules/gdb.dap.evaluate.h" -#include "frozen_modules/gdb.dap.events.h" -#include "frozen_modules/gdb.dap.frames.h" -#include "frozen_modules/gdb.dap.io.h" -#include "frozen_modules/gdb.dap.launch.h" -#include "frozen_modules/gdb.dap.locations.h" -#include "frozen_modules/gdb.dap.memory.h" -#include "frozen_modules/gdb.dap.modules.h" -#include "frozen_modules/gdb.dap.next.h" -#include "frozen_modules/gdb.dap.pause.h" -#include "frozen_modules/gdb.dap.scopes.h" -#include "frozen_modules/gdb.dap.server.h" -#include "frozen_modules/gdb.dap.sources.h" -#include "frozen_modules/gdb.dap.startup.h" -#include "frozen_modules/gdb.dap.state.h" -#include "frozen_modules/gdb.dap.threads.h" -#include "frozen_modules/gdb.dap.typecheck.h" -#include "frozen_modules/gdb.dap.varref.h" -#include "frozen_modules/gdb.disassembler.h" -#include "frozen_modules/gdb.frames.h" -#include "frozen_modules/gdb.function.h" -#include "frozen_modules/gdb.function.as_string.h" -#include "frozen_modules/gdb.function.caller_is.h" -#include "frozen_modules/gdb.function.strfns.h" -#include "frozen_modules/gdb.missing_debug.h" -#include "frozen_modules/gdb.printer.h" -#include "frozen_modules/gdb.printer.bound_registers.h" -#include "frozen_modules/gdb.printing.h" -#include "frozen_modules/gdb.prompt.h" -#include "frozen_modules/gdb.styling.h" -#include "frozen_modules/gdb.types.h" -#include "frozen_modules/gdb.unwinder.h" -#include "frozen_modules/gdb.xmethod.h" #include "frozen_modules/_sitebuiltins.h" #include "frozen_modules/site.h" #include "frozen_modules/runpy.h" @@ -806,55 +757,6 @@ extern PyObject *_Py_get_zoneinfo_toplevel(void); extern PyObject *_Py_get_zoneinfo__common_toplevel(void); extern PyObject *_Py_get_zoneinfo__tzpath_toplevel(void); extern PyObject *_Py_get_zoneinfo__zoneinfo_toplevel(void); -extern PyObject *_Py_get_gdb_toplevel(void); -extern PyObject *_Py_get_gdb_FrameDecorator_toplevel(void); -extern PyObject *_Py_get_gdb_FrameIterator_toplevel(void); -extern PyObject *_Py_get_gdb_command_toplevel(void); -extern PyObject *_Py_get_gdb_command_explore_toplevel(void); -extern PyObject *_Py_get_gdb_command_frame_filters_toplevel(void); -extern PyObject *_Py_get_gdb_command_missing_debug_toplevel(void); -extern PyObject *_Py_get_gdb_command_pretty_printers_toplevel(void); -extern PyObject *_Py_get_gdb_command_prompt_toplevel(void); -extern PyObject *_Py_get_gdb_command_type_printers_toplevel(void); -extern PyObject *_Py_get_gdb_command_unwinders_toplevel(void); -extern PyObject *_Py_get_gdb_command_xmethods_toplevel(void); -extern PyObject *_Py_get_gdb_dap_toplevel(void); -extern PyObject *_Py_get_gdb_dap_breakpoint_toplevel(void); -extern PyObject *_Py_get_gdb_dap_bt_toplevel(void); -extern PyObject *_Py_get_gdb_dap_disassemble_toplevel(void); -extern PyObject *_Py_get_gdb_dap_evaluate_toplevel(void); -extern PyObject *_Py_get_gdb_dap_events_toplevel(void); -extern PyObject *_Py_get_gdb_dap_frames_toplevel(void); -extern PyObject *_Py_get_gdb_dap_io_toplevel(void); -extern PyObject *_Py_get_gdb_dap_launch_toplevel(void); -extern PyObject *_Py_get_gdb_dap_locations_toplevel(void); -extern PyObject *_Py_get_gdb_dap_memory_toplevel(void); -extern PyObject *_Py_get_gdb_dap_modules_toplevel(void); -extern PyObject *_Py_get_gdb_dap_next_toplevel(void); -extern PyObject *_Py_get_gdb_dap_pause_toplevel(void); -extern PyObject *_Py_get_gdb_dap_scopes_toplevel(void); -extern PyObject *_Py_get_gdb_dap_server_toplevel(void); -extern PyObject *_Py_get_gdb_dap_sources_toplevel(void); -extern PyObject *_Py_get_gdb_dap_startup_toplevel(void); -extern PyObject *_Py_get_gdb_dap_state_toplevel(void); -extern PyObject *_Py_get_gdb_dap_threads_toplevel(void); -extern PyObject *_Py_get_gdb_dap_typecheck_toplevel(void); -extern PyObject *_Py_get_gdb_dap_varref_toplevel(void); -extern PyObject *_Py_get_gdb_disassembler_toplevel(void); -extern PyObject *_Py_get_gdb_frames_toplevel(void); -extern PyObject *_Py_get_gdb_function_toplevel(void); -extern PyObject *_Py_get_gdb_function_as_string_toplevel(void); -extern PyObject *_Py_get_gdb_function_caller_is_toplevel(void); -extern PyObject *_Py_get_gdb_function_strfns_toplevel(void); -extern PyObject *_Py_get_gdb_missing_debug_toplevel(void); -extern PyObject *_Py_get_gdb_printer_toplevel(void); -extern PyObject *_Py_get_gdb_printer_bound_registers_toplevel(void); -extern PyObject *_Py_get_gdb_printing_toplevel(void); -extern PyObject *_Py_get_gdb_prompt_toplevel(void); -extern PyObject *_Py_get_gdb_styling_toplevel(void); -extern PyObject *_Py_get_gdb_types_toplevel(void); -extern PyObject *_Py_get_gdb_unwinder_toplevel(void); -extern PyObject *_Py_get_gdb_xmethod_toplevel(void); extern PyObject *_Py_get__sitebuiltins_toplevel(void); extern PyObject *_Py_get_site_toplevel(void); extern PyObject *_Py_get_runpy_toplevel(void); @@ -1243,60 +1145,6 @@ static const struct _frozen stdlib_modules[] = { {"zoneinfo._common", _Py_M__zoneinfo__common, (int)sizeof(_Py_M__zoneinfo__common), false, GET_CODE(zoneinfo__common)}, {"zoneinfo._tzpath", _Py_M__zoneinfo__tzpath, (int)sizeof(_Py_M__zoneinfo__tzpath), false, GET_CODE(zoneinfo__tzpath)}, {"zoneinfo._zoneinfo", _Py_M__zoneinfo__zoneinfo, (int)sizeof(_Py_M__zoneinfo__zoneinfo), false, GET_CODE(zoneinfo__zoneinfo)}, - {"gdb", _Py_M__gdb, (int)sizeof(_Py_M__gdb), true, GET_CODE(gdb)}, - {"gdb.FrameDecorator", _Py_M__gdb_FrameDecorator, (int)sizeof(_Py_M__gdb_FrameDecorator), false, GET_CODE(gdb_FrameDecorator)}, - {"gdb.FrameIterator", _Py_M__gdb_FrameIterator, (int)sizeof(_Py_M__gdb_FrameIterator), false, GET_CODE(gdb_FrameIterator)}, - {"gdb.__init__", _Py_M__gdb, (int)sizeof(_Py_M__gdb), false, GET_CODE(gdb)}, - {"gdb.command", _Py_M__gdb_command, (int)sizeof(_Py_M__gdb_command), true, GET_CODE(gdb_command)}, - {"gdb.command.__init__", _Py_M__gdb_command, (int)sizeof(_Py_M__gdb_command), false, GET_CODE(gdb_command)}, - {"gdb.command.explore", _Py_M__gdb_command_explore, (int)sizeof(_Py_M__gdb_command_explore), false, GET_CODE(gdb_command_explore)}, - {"gdb.command.frame_filters", _Py_M__gdb_command_frame_filters, (int)sizeof(_Py_M__gdb_command_frame_filters), false, GET_CODE(gdb_command_frame_filters)}, - {"gdb.command.missing_debug", _Py_M__gdb_command_missing_debug, (int)sizeof(_Py_M__gdb_command_missing_debug), false, GET_CODE(gdb_command_missing_debug)}, - {"gdb.command.pretty_printers", _Py_M__gdb_command_pretty_printers, (int)sizeof(_Py_M__gdb_command_pretty_printers), false, GET_CODE(gdb_command_pretty_printers)}, - {"gdb.command.prompt", _Py_M__gdb_command_prompt, (int)sizeof(_Py_M__gdb_command_prompt), false, GET_CODE(gdb_command_prompt)}, - {"gdb.command.type_printers", _Py_M__gdb_command_type_printers, (int)sizeof(_Py_M__gdb_command_type_printers), false, GET_CODE(gdb_command_type_printers)}, - {"gdb.command.unwinders", _Py_M__gdb_command_unwinders, (int)sizeof(_Py_M__gdb_command_unwinders), false, GET_CODE(gdb_command_unwinders)}, - {"gdb.command.xmethods", _Py_M__gdb_command_xmethods, (int)sizeof(_Py_M__gdb_command_xmethods), false, GET_CODE(gdb_command_xmethods)}, - {"gdb.dap", _Py_M__gdb_dap, (int)sizeof(_Py_M__gdb_dap), true, GET_CODE(gdb_dap)}, - {"gdb.dap.__init__", _Py_M__gdb_dap, (int)sizeof(_Py_M__gdb_dap), false, GET_CODE(gdb_dap)}, - {"gdb.dap.breakpoint", _Py_M__gdb_dap_breakpoint, (int)sizeof(_Py_M__gdb_dap_breakpoint), false, GET_CODE(gdb_dap_breakpoint)}, - {"gdb.dap.bt", _Py_M__gdb_dap_bt, (int)sizeof(_Py_M__gdb_dap_bt), false, GET_CODE(gdb_dap_bt)}, - {"gdb.dap.disassemble", _Py_M__gdb_dap_disassemble, (int)sizeof(_Py_M__gdb_dap_disassemble), false, GET_CODE(gdb_dap_disassemble)}, - {"gdb.dap.evaluate", _Py_M__gdb_dap_evaluate, (int)sizeof(_Py_M__gdb_dap_evaluate), false, GET_CODE(gdb_dap_evaluate)}, - {"gdb.dap.events", _Py_M__gdb_dap_events, (int)sizeof(_Py_M__gdb_dap_events), false, GET_CODE(gdb_dap_events)}, - {"gdb.dap.frames", _Py_M__gdb_dap_frames, (int)sizeof(_Py_M__gdb_dap_frames), false, GET_CODE(gdb_dap_frames)}, - {"gdb.dap.io", _Py_M__gdb_dap_io, (int)sizeof(_Py_M__gdb_dap_io), false, GET_CODE(gdb_dap_io)}, - {"gdb.dap.launch", _Py_M__gdb_dap_launch, (int)sizeof(_Py_M__gdb_dap_launch), false, GET_CODE(gdb_dap_launch)}, - {"gdb.dap.locations", _Py_M__gdb_dap_locations, (int)sizeof(_Py_M__gdb_dap_locations), false, GET_CODE(gdb_dap_locations)}, - {"gdb.dap.memory", _Py_M__gdb_dap_memory, (int)sizeof(_Py_M__gdb_dap_memory), false, GET_CODE(gdb_dap_memory)}, - {"gdb.dap.modules", _Py_M__gdb_dap_modules, (int)sizeof(_Py_M__gdb_dap_modules), false, GET_CODE(gdb_dap_modules)}, - {"gdb.dap.next", _Py_M__gdb_dap_next, (int)sizeof(_Py_M__gdb_dap_next), false, GET_CODE(gdb_dap_next)}, - {"gdb.dap.pause", _Py_M__gdb_dap_pause, (int)sizeof(_Py_M__gdb_dap_pause), false, GET_CODE(gdb_dap_pause)}, - {"gdb.dap.scopes", _Py_M__gdb_dap_scopes, (int)sizeof(_Py_M__gdb_dap_scopes), false, GET_CODE(gdb_dap_scopes)}, - {"gdb.dap.server", _Py_M__gdb_dap_server, (int)sizeof(_Py_M__gdb_dap_server), false, GET_CODE(gdb_dap_server)}, - {"gdb.dap.sources", _Py_M__gdb_dap_sources, (int)sizeof(_Py_M__gdb_dap_sources), false, GET_CODE(gdb_dap_sources)}, - {"gdb.dap.startup", _Py_M__gdb_dap_startup, (int)sizeof(_Py_M__gdb_dap_startup), false, GET_CODE(gdb_dap_startup)}, - {"gdb.dap.state", _Py_M__gdb_dap_state, (int)sizeof(_Py_M__gdb_dap_state), false, GET_CODE(gdb_dap_state)}, - {"gdb.dap.threads", _Py_M__gdb_dap_threads, (int)sizeof(_Py_M__gdb_dap_threads), false, GET_CODE(gdb_dap_threads)}, - {"gdb.dap.typecheck", _Py_M__gdb_dap_typecheck, (int)sizeof(_Py_M__gdb_dap_typecheck), false, GET_CODE(gdb_dap_typecheck)}, - {"gdb.dap.varref", _Py_M__gdb_dap_varref, (int)sizeof(_Py_M__gdb_dap_varref), false, GET_CODE(gdb_dap_varref)}, - {"gdb.disassembler", _Py_M__gdb_disassembler, (int)sizeof(_Py_M__gdb_disassembler), false, GET_CODE(gdb_disassembler)}, - {"gdb.frames", _Py_M__gdb_frames, (int)sizeof(_Py_M__gdb_frames), false, GET_CODE(gdb_frames)}, - {"gdb.function", _Py_M__gdb_function, (int)sizeof(_Py_M__gdb_function), true, GET_CODE(gdb_function)}, - {"gdb.function.__init__", _Py_M__gdb_function, (int)sizeof(_Py_M__gdb_function), false, GET_CODE(gdb_function)}, - {"gdb.function.as_string", _Py_M__gdb_function_as_string, (int)sizeof(_Py_M__gdb_function_as_string), false, GET_CODE(gdb_function_as_string)}, - {"gdb.function.caller_is", _Py_M__gdb_function_caller_is, (int)sizeof(_Py_M__gdb_function_caller_is), false, GET_CODE(gdb_function_caller_is)}, - {"gdb.function.strfns", _Py_M__gdb_function_strfns, (int)sizeof(_Py_M__gdb_function_strfns), false, GET_CODE(gdb_function_strfns)}, - {"gdb.missing_debug", _Py_M__gdb_missing_debug, (int)sizeof(_Py_M__gdb_missing_debug), false, GET_CODE(gdb_missing_debug)}, - {"gdb.printer", _Py_M__gdb_printer, (int)sizeof(_Py_M__gdb_printer), true, GET_CODE(gdb_printer)}, - {"gdb.printer.__init__", _Py_M__gdb_printer, (int)sizeof(_Py_M__gdb_printer), false, GET_CODE(gdb_printer)}, - {"gdb.printer.bound_registers", _Py_M__gdb_printer_bound_registers, (int)sizeof(_Py_M__gdb_printer_bound_registers), false, GET_CODE(gdb_printer_bound_registers)}, - {"gdb.printing", _Py_M__gdb_printing, (int)sizeof(_Py_M__gdb_printing), false, GET_CODE(gdb_printing)}, - {"gdb.prompt", _Py_M__gdb_prompt, (int)sizeof(_Py_M__gdb_prompt), false, GET_CODE(gdb_prompt)}, - {"gdb.styling", _Py_M__gdb_styling, (int)sizeof(_Py_M__gdb_styling), false, GET_CODE(gdb_styling)}, - {"gdb.types", _Py_M__gdb_types, (int)sizeof(_Py_M__gdb_types), false, GET_CODE(gdb_types)}, - {"gdb.unwinder", _Py_M__gdb_unwinder, (int)sizeof(_Py_M__gdb_unwinder), false, GET_CODE(gdb_unwinder)}, - {"gdb.xmethod", _Py_M__gdb_xmethod, (int)sizeof(_Py_M__gdb_xmethod), false, GET_CODE(gdb_xmethod)}, /* stdlib - startup, with site */ {"_sitebuiltins", _Py_M___sitebuiltins, (int)sizeof(_Py_M___sitebuiltins), false, GET_CODE(_sitebuiltins)}, @@ -1348,11 +1196,6 @@ static const struct _module_alias aliases[] = { {"zipfile.__init__", "', '', - '', - ]), + ] + [module_str for module_str in EXTRA_FROZEN_MODULES.split(";") if len(module_str) > 0] + ), ('stdlib - startup, with site', [ '_sitebuiltins', 'site', From 5122648442cb6eb066c34ba90b42e51d7f195674 Mon Sep 17 00:00:00 2001 From: Roddy Rappaport Date: Wed, 8 Jan 2025 00:53:32 +0200 Subject: [PATCH 3/5] Added option for disabling module checks in configure Changed the package check macro to check for config variable before using pkg-config. This allows us to disable unwanted modules in the future. This required a regeneration of the autoconf files. Because the autoconf files are relatively old at this point and were not created with the same autoconf version, a lot of changes have been made. --- aclocal.m4 | 8 +- configure | 6926 ++++++++++++++++++++++++++++++------------------- pyconfig.h.in | 574 ++-- 3 files changed, 4525 insertions(+), 2983 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index 09ae5d1aa8a608..2b295c65a8cb7e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -421,8 +421,12 @@ AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $2]) -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) +if test "x$pkg_check_module_$1" != "xno"; then + _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) + _PKG_CONFIG([$1][_LIBS], [libs], [$2]) +else + pkg_failed=untried +fi m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. diff --git a/configure b/configure index 1c75810d9e8c4b..502bd83378a454 100755 --- a/configure +++ b/configure @@ -1,11 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for python 3.12. +# Generated by GNU Autoconf 2.72 for python 3.12. # # Report bugs to . # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, # Inc. # # @@ -17,7 +17,6 @@ # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -26,12 +25,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -103,7 +103,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -133,15 +133,14 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 + as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: @@ -149,12 +148,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop - case \`(set -o) 2>/dev/null\` in #( +else case e in #( + e) case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi " @@ -172,8 +172,9 @@ as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : -else \$as_nop - exitcode=1; echo positional parameters were not saved. +else case e in #( + e) exitcode=1; echo positional parameters were not saved. ;; +esac fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) @@ -187,14 +188,15 @@ test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes -else $as_nop - as_have_required=no +else case e in #( + e) as_have_required=no ;; +esac fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do @@ -227,12 +229,13 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - if { test -f "$SHELL" || test -f "$SHELL.exe"; } && +else case e in #( + e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes -fi +fi ;; +esac fi @@ -254,7 +257,7 @@ case $- in # (((( esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail -# out after a failed `exec'. +# out after a failed 'exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi @@ -274,7 +277,8 @@ $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 -fi +fi ;; +esac fi fi SHELL=${CONFIG_SHELL-/bin/sh} @@ -313,14 +317,6 @@ as_fn_exit () as_fn_set_status $1 exit $1 } # as_fn_exit -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_mkdir_p # ------------- @@ -389,11 +385,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -407,21 +404,14 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith -# as_fn_nop -# --------- -# Do nothing but, unlike ":", preserve the value of $?. -as_fn_nop () -{ - return $? -} -as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- @@ -495,6 +485,8 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits /[$]LINENO/= ' <$as_myself | sed ' + t clear + :clear s/[$]LINENO.*/&-/ t lineno b @@ -543,7 +535,6 @@ esac as_echo='printf %s\n' as_echo_n='printf %s' - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file @@ -555,9 +546,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -582,10 +573,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated test -n "$DJDIR" || exec 7<&0 /dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1302,7 +1295,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: \`$ac_useropt'" + as_fn_error $? "invalid feature name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1515,7 +1508,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1531,7 +1524,7 @@ do ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: \`$ac_useropt'" + as_fn_error $? "invalid package name: '$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1561,8 +1554,8 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" + -*) as_fn_error $? "unrecognized option: '$ac_option' +Try '$0 --help' for more information" ;; *=*) @@ -1570,7 +1563,7 @@ Try \`$0 --help' for more information" # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: '$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1620,7 +1613,7 @@ do as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done -# There might be people who depend on the old broken behavior: `$host' +# There might be people who depend on the old broken behavior: '$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias @@ -1688,7 +1681,7 @@ if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` @@ -1716,7 +1709,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures python 3.12 to adapt to many kinds of systems. +'configure' configures python 3.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1730,11 +1723,11 @@ Configuration: --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages + -q, --quiet, --silent do not print 'checking ...' messages --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' + -C, --config-cache alias for '--cache-file=config.cache' -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] + --srcdir=DIR find the sources in DIR [configure dir or '..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @@ -1742,10 +1735,10 @@ Installation directories: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. +By default, 'make install' will install all the files in +'$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify +an installation prefix other than '$ac_default_prefix' using '--prefix', +for instance '--prefix=\$HOME'. For better control, use the options below. @@ -2003,7 +1996,7 @@ Some influential environment variables: C compiler flags for LIBB2, overriding pkg-config LIBB2_LIBS linker flags for LIBB2, overriding pkg-config -Use these variables to override the choices made by `configure' or to help +Use these variables to override the choices made by 'configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . @@ -2071,9 +2064,9 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF python configure 3.12 -generated by GNU Autoconf 2.71 +generated by GNU Autoconf 2.72 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -2112,11 +2105,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } && test -s conftest.$ac_objext then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -2150,11 +2144,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval @@ -2173,8 +2168,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> @@ -2182,10 +2177,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2225,11 +2222,12 @@ printf "%s\n" "$ac_try_echo"; } >&5 } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 ;; +esac fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would @@ -2271,12 +2269,13 @@ printf "%s\n" "$ac_try_echo"; } >&5 test $ac_status = 0; }; } then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: program exited with status $ac_status" >&5 +else case e in #( + e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=$ac_status + ac_retval=$ac_status ;; +esac fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno @@ -2296,8 +2295,8 @@ printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @@ -2327,12 +2326,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - eval "$3=yes" +else case e in #( + e) eval "$3=yes" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2386,18 +2387,19 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid; break -else $as_nop - as_fn_arith $ac_mid + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int @@ -2432,20 +2434,23 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_lo=$ac_mid; break -else $as_nop - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val + as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done -else $as_nop - ac_lo= ac_hi= +else case e in #( + e) ac_lo= ac_hi= ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext # Binary search between lo and hi bounds. @@ -2468,8 +2473,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_hi=$ac_mid -else $as_nop - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val +else case e in #( + e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done @@ -2517,8 +2523,9 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : echo >>conftest.val; read $3 &6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (void); below. */ #include #undef $2 @@ -2560,7 +2567,7 @@ else $as_nop #ifdef __cplusplus extern "C" #endif -char $2 (); +char $2 (void); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ @@ -2579,11 +2586,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2605,8 +2614,8 @@ printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 -else $as_nop - as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` +else case e in #( + e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2630,12 +2639,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$3=yes" -else $as_nop - eval "$3=no" +else case e in #( + e) eval "$3=no" ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS - + ;; +esac fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2656,8 +2667,8 @@ printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2673,8 +2684,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int @@ -2690,12 +2701,15 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$4=yes" -else $as_nop - eval "$4=no" +else case e in #( + e) eval "$4=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -2728,7 +2742,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by python $as_me 3.12, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -2974,10 +2988,10 @@ esac printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } fi done @@ -3013,9 +3027,7 @@ struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; +static char *e (char **p, int i) { return p[i]; } @@ -3029,6 +3041,21 @@ static char *f (char * (*g) (char **, int), char **p, ...) return s; } +/* C89 style stringification. */ +#define noexpand_stringify(a) #a +const char *stringified = noexpand_stringify(arbitrary+token=sequence); + +/* C89 style token pasting. Exercises some of the corner cases that + e.g. old MSVC gets wrong, but not very hard. */ +#define noexpand_concat(a,b) a##b +#define expand_concat(a,b) noexpand_concat(a,b) +extern int vA; +extern int vbee; +#define aye A +#define bee B +int *pvA = &expand_concat(v,aye); +int *pvbee = &noexpand_concat(v,bee); + /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated @@ -3056,16 +3083,19 @@ ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' -// Does the compiler advertise C99 conformance? +/* Does the compiler advertise C99 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif +// See if C++-style comments work. + #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); +extern void free (void *); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare @@ -3115,7 +3145,6 @@ typedef const char *ccp; static inline int test_restrict (ccp restrict text) { - // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) @@ -3181,6 +3210,8 @@ ac_c_conftest_c99_main=' ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; + // Work around memory leak warnings. + free (ia); // Check named initializers. struct named_init ni = { @@ -3202,7 +3233,7 @@ ac_c_conftest_c99_main=' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' -// Does the compiler advertise C11 conformance? +/* Does the compiler advertise C11 conformance? */ #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif @@ -3396,8 +3427,9 @@ IFS=$as_save_IFS if $as_found then : -else $as_nop - as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; +esac fi @@ -3425,12 +3457,12 @@ for ac_var in $ac_precious_vars; do eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 +printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -3439,18 +3471,18 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 +printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 +printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 +printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 +printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. @@ -3466,11 +3498,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi done if $ac_cache_corrupted; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' + as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## @@ -3521,8 +3553,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_HAS_GIT+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$HAS_GIT"; then +else case e in #( + e) if test -n "$HAS_GIT"; then ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3545,7 +3577,8 @@ done IFS=$as_save_IFS test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found" -fi +fi ;; +esac fi HAS_GIT=$ac_cv_prog_HAS_GIT if test -n "$HAS_GIT"; then @@ -3587,15 +3620,16 @@ printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_build_alias=$build_alias +else case e in #( + e) ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$ac_cv_build" >&6; } @@ -3622,14 +3656,15 @@ printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "x$host_alias" = x; then +else case e in #( + e) if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$ac_cv_host" >&6; } @@ -3693,8 +3728,8 @@ fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_build_python" >&5 printf "%s\n" "$with_build_python" >&6; } -else $as_nop - +else case e in #( + e) if test "x$cross_compiling" = xyes then : as_fn_error $? "Cross compiling requires --with-build-python" "$LINENO" 5 @@ -3703,7 +3738,8 @@ fi PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E' PYTHON_FOR_FREEZE="./_bootstrap_python" - + ;; +esac fi @@ -3723,15 +3759,16 @@ then : FREEZE_MODULE_DEPS='$(FREEZE_MODULE_BOOTSTRAP_DEPS)' PYTHON_FOR_BUILD_DEPS='' -else $as_nop - +else case e in #( + e) FREEZE_MODULE_BOOTSTRAP='./Programs/_freeze_module' FREEZE_MODULE_BOOTSTRAP_DEPS="Programs/_freeze_module" FREEZE_MODULE='$(PYTHON_FOR_FREEZE) $(srcdir)/Programs/_freeze_module.py' FREEZE_MODULE_DEPS="_bootstrap_python \$(srcdir)/Programs/_freeze_module.py" PYTHON_FOR_BUILD_DEPS='$(BUILDPYTHON)' - + ;; +esac fi @@ -3748,8 +3785,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PYTHON_FOR_REGEN+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$PYTHON_FOR_REGEN"; then +else case e in #( + e) if test -n "$PYTHON_FOR_REGEN"; then ac_cv_prog_PYTHON_FOR_REGEN="$PYTHON_FOR_REGEN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3771,7 +3808,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi PYTHON_FOR_REGEN=$ac_cv_prog_PYTHON_FOR_REGEN if test -n "$PYTHON_FOR_REGEN"; then @@ -3853,9 +3891,10 @@ CONFIG_ARGS="$ac_configure_args" if test ${with_pkg_config+y} then : withval=$with_pkg_config; -else $as_nop - with_pkg_config=check - +else case e in #( + e) with_pkg_config=check + ;; +esac fi case $with_pkg_config in #( @@ -3882,8 +3921,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else $as_nop - case $PKG_CONFIG in +else case e in #( + e) case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; @@ -3908,6 +3947,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG @@ -3930,8 +3970,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_PKG_CONFIG in +else case e in #( + e) case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; @@ -3956,6 +3996,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG @@ -4047,11 +4088,12 @@ then : esac -else $as_nop - +else case e in #( + e) UNIVERSALSDK= enable_universalsdk= - + ;; +esac fi if test -n "${UNIVERSALSDK}" @@ -4112,12 +4154,13 @@ then : PYTHONFRAMEWORKDIR=${withval}.framework PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'` -else $as_nop - +else case e in #( + e) PYTHONFRAMEWORK=Python PYTHONFRAMEWORKDIR=Python.framework PYTHONFRAMEWORKIDENTIFIER=org.python.python - + ;; +esac fi # Check whether --enable-framework was given. @@ -4211,8 +4254,8 @@ then : esac -else $as_nop - +else case e in #( + e) PYTHONFRAMEWORK= PYTHONFRAMEWORKDIR=no-framework PYTHONFRAMEWORKPREFIX= @@ -4229,7 +4272,8 @@ else $as_nop fi enable_framework= - + ;; +esac fi @@ -4516,8 +4560,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_HAS_XCRUN+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$HAS_XCRUN"; then +else case e in #( + e) if test -n "$HAS_XCRUN"; then ac_cv_prog_HAS_XCRUN="$HAS_XCRUN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4540,7 +4584,8 @@ done IFS=$as_save_IFS test -z "$ac_cv_prog_HAS_XCRUN" && ac_cv_prog_HAS_XCRUN="missing" -fi +fi ;; +esac fi HAS_XCRUN=$ac_cv_prog_HAS_XCRUN if test -n "$HAS_XCRUN"; then @@ -4643,8 +4688,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4666,7 +4711,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4688,8 +4734,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4711,7 +4757,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4746,8 +4793,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4769,7 +4816,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4791,8 +4839,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no @@ -4831,7 +4879,8 @@ if test $ac_prog_rejected = yes; then ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4855,8 +4904,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4878,7 +4927,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -4904,8 +4954,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4927,7 +4977,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -4965,8 +5016,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CC"; then +else case e in #( + e) if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -4988,7 +5039,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CC=$ac_cv_prog_CC if test -n "$CC"; then @@ -5010,8 +5062,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CC"; then +else case e in #( + e) if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5033,7 +5085,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then @@ -5062,10 +5115,10 @@ fi fi -test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -5137,8 +5190,8 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' + # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. +# So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. @@ -5158,7 +5211,7 @@ do ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' + # safe: cross compilers may not add the suffix if given an '-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. @@ -5169,8 +5222,9 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop - ac_file='' +else case e in #( + e) ac_file='' ;; +esac fi if test -z "$ac_file" then : @@ -5179,13 +5233,14 @@ printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +See 'config.log' for more details" "$LINENO" 5; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } @@ -5209,10 +5264,10 @@ printf "%s\n" "$ac_try_echo"; } >&5 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. + # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) +# catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will +# work properly (i.e., refer to 'conftest.exe'), while it won't with +# 'rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in @@ -5222,11 +5277,12 @@ for ac_file in conftest.exe conftest conftest.*; do * ) break;; esac done -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -5242,6 +5298,8 @@ int main (void) { FILE *f = fopen ("conftest.out", "w"); + if (!f) + return 1; return ferror (f) || fclose (f) != 0; ; @@ -5281,26 +5339,27 @@ printf "%s\n" "$ac_try_echo"; } >&5 if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } +If you meant to cross compile, use '--host'. +See 'config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +rm -f conftest.$ac_ext conftest$ac_cv_exeext \ + conftest.o conftest.obj conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5332,16 +5391,18 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else case e in #( + e) printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext +rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } @@ -5352,8 +5413,8 @@ printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5370,12 +5431,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes -else $as_nop - ac_compiler_gnu=no +else case e in #( + e) ac_compiler_gnu=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } @@ -5393,8 +5456,8 @@ printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_c_werror_flag=$ac_c_werror_flag +else case e in #( + e) ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" @@ -5412,8 +5475,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes -else $as_nop - CFLAGS="" +else case e in #( + e) CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5428,8 +5491,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - ac_c_werror_flag=$ac_save_c_werror_flag +else case e in #( + e) ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5446,12 +5509,15 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag + ac_c_werror_flag=$ac_save_c_werror_flag ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } @@ -5478,8 +5544,8 @@ printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c11=no +else case e in #( + e) ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5496,25 +5562,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c11" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } - CC="$CC $ac_cv_prog_cc_c11" + CC="$CC $ac_cv_prog_cc_c11" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 - ac_prog_cc_stdc=c11 + ac_prog_cc_stdc=c11 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -5524,8 +5593,8 @@ printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c99=no +else case e in #( + e) ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5542,25 +5611,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c99" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } - CC="$CC $ac_cv_prog_cc_c99" + CC="$CC $ac_cv_prog_cc_c99" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 - ac_prog_cc_stdc=c99 + ac_prog_cc_stdc=c99 ;; +esac fi fi if test x$ac_prog_cc_stdc = xno @@ -5570,8 +5642,8 @@ printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_prog_cc_c89=no +else case e in #( + e) ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5588,25 +5660,28 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext -CC=$ac_save_CC +CC=$ac_save_CC ;; +esac fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } -else $as_nop - if test "x$ac_cv_prog_cc_c89" = x +else case e in #( + e) if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } - CC="$CC $ac_cv_prog_cc_c89" + CC="$CC $ac_cv_prog_cc_c89" ;; +esac fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 - ac_prog_cc_stdc=c89 + ac_prog_cc_stdc=c89 ;; +esac fi fi @@ -5631,8 +5706,8 @@ if test -z "$CPP"; then if test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 -else $as_nop - # Double quotes because $CC needs to be expanded +else case e in #( + e) # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp do ac_preproc_ok=false @@ -5650,9 +5725,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5666,15 +5742,16 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : @@ -5683,7 +5760,8 @@ fi done ac_cv_prog_CPP=$CPP - + ;; +esac fi CPP=$ac_cv_prog_CPP else @@ -5706,9 +5784,10 @@ _ACEOF if ac_fn_c_try_cpp "$LINENO" then : -else $as_nop - # Broken: fails on valid input. -continue +else case e in #( + e) # Broken: fails on valid input. +continue ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext @@ -5722,24 +5801,26 @@ if ac_fn_c_try_cpp "$LINENO" then : # Broken: success on invalid input. continue -else $as_nop - # Passes both tests. +else case e in #( + e) # Passes both tests. ac_preproc_ok=: -break +break ;; +esac fi rm -f conftest.err conftest.i conftest.$ac_ext done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +# Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok then : -else $as_nop - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } ;; +esac fi ac_ext=c @@ -5753,8 +5834,8 @@ printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -z "$GREP"; then +else case e in #( + e) if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -5773,9 +5854,10 @@ do as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in +case `"$ac_path_GREP" --version 2>&1` in #( *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5810,7 +5892,8 @@ IFS=$as_save_IFS else ac_cv_path_GREP=$GREP fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } @@ -5822,8 +5905,8 @@ printf %s "checking for a sed that does not truncate output... " >&6; } if test ${ac_cv_path_SED+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ +else case e in #( + e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done @@ -5848,9 +5931,10 @@ do as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in +case `"$ac_path_SED" --version 2>&1` in #( *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5885,7 +5969,8 @@ IFS=$as_save_IFS else ac_cv_path_SED=$SED fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 printf "%s\n" "$ac_cv_path_SED" >&6; } @@ -5897,8 +5982,8 @@ printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 -else $as_nop - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 +else case e in #( + e) if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then @@ -5920,9 +6005,10 @@ do as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in +case `"$ac_path_EGREP" --version 2>&1` in #( *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +#( *) ac_count=0 printf %s 0123456789 >"conftest.in" @@ -5958,12 +6044,15 @@ else ac_cv_path_EGREP=$EGREP fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" + EGREP_TRADITIONAL=$EGREP + ac_cv_path_EGREP_TRADITIONAL=$EGREP { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CC compiler name" >&5 @@ -5971,8 +6060,8 @@ printf %s "checking for CC compiler name... " >&6; } if test ${ac_cv_cc_name+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat > conftest.c <&5 printf "%s\n" "$ac_cv_cc_name" >&6; } @@ -6044,8 +6134,8 @@ printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } if test ${ac_cv_safe_to_define___extensions__+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 @@ -6061,10 +6151,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_safe_to_define___extensions__=yes -else $as_nop - ac_cv_safe_to_define___extensions__=no +else case e in #( + e) ac_cv_safe_to_define___extensions__=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } @@ -6074,8 +6166,8 @@ printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } if test ${ac_cv_should_define__xopen_source+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_should_define__xopen_source=no +else case e in #( + e) ac_cv_should_define__xopen_source=no if test $ac_cv_header_wchar_h = yes then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6094,8 +6186,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 500 @@ -6113,10 +6205,12 @@ if ac_fn_c_try_compile "$LINENO" then : ac_cv_should_define__xopen_source=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } @@ -6141,6 +6235,8 @@ printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h + printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h @@ -6160,8 +6256,9 @@ then : printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h -else $as_nop - MINIX= +else case e in #( + e) MINIX= ;; +esac fi if test $ac_cv_safe_to_define___extensions__ = yes then : @@ -6189,8 +6286,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $CXX in +else case e in #( + e) case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. ;; @@ -6215,6 +6312,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi CXX=$ac_cv_path_CXX @@ -6237,8 +6335,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_CXX in +else case e in #( + e) case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. ;; @@ -6263,6 +6361,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX @@ -6297,8 +6396,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $CXX in +else case e in #( + e) case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. ;; @@ -6323,6 +6422,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi CXX=$ac_cv_path_CXX @@ -6345,8 +6445,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_CXX in +else case e in #( + e) case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. ;; @@ -6371,6 +6471,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX @@ -6405,8 +6506,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $CXX in +else case e in #( + e) case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. ;; @@ -6431,6 +6532,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi CXX=$ac_cv_path_CXX @@ -6453,8 +6555,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_CXX in +else case e in #( + e) case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. ;; @@ -6479,6 +6581,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX @@ -6513,8 +6616,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $CXX in +else case e in #( + e) case $CXX in [\\/]* | ?:[\\/]*) ac_cv_path_CXX="$CXX" # Let the user override the test with a path. ;; @@ -6539,6 +6642,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi CXX=$ac_cv_path_CXX @@ -6561,8 +6665,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_CXX in +else case e in #( + e) case $ac_pt_CXX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path. ;; @@ -6587,6 +6691,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_CXX=$ac_cv_path_ac_pt_CXX @@ -6631,8 +6736,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$CXX"; then +else case e in #( + e) if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6654,7 +6759,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then @@ -6680,8 +6786,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_CXX"; then +else case e in #( + e) if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -6703,7 +6809,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then @@ -7044,8 +7151,8 @@ printf %s "checking for -Wl,--no-as-needed... " >&6; } if test ${ac_cv_wl_no_as_needed+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) save_LDFLAGS="$LDFLAGS" as_fn_append LDFLAGS " -Wl,--no-as-needed" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -7063,14 +7170,16 @@ if ac_fn_c_try_link "$LINENO" then : NO_AS_NEEDED="-Wl,--no-as-needed" ac_cv_wl_no_as_needed=yes -else $as_nop - NO_AS_NEEDED="" - ac_cv_wl_no_as_needed=no +else case e in #( + e) NO_AS_NEEDED="" + ac_cv_wl_no_as_needed=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wl_no_as_needed" >&5 printf "%s\n" "$ac_cv_wl_no_as_needed" >&6; } @@ -7148,19 +7257,21 @@ then : ;; esac -else $as_nop - +else case e in #( + e) as_fn_error $? "--with-emscripten-target only applies to Emscripten" "$LINENO" 5 - + ;; +esac fi -else $as_nop - +else case e in #( + e) if test "x$ac_sys_system" = xEmscripten then : ac_sys_emscripten_target=browser fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_sys_emscripten_target" >&5 @@ -7182,10 +7293,11 @@ then : ;; esac -else $as_nop - +else case e in #( + e) enable_wasm_dynamic_linking=missing - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_wasm_dynamic_linking" >&5 @@ -7207,10 +7319,11 @@ then : ;; esac -else $as_nop - +else case e in #( + e) enable_wasm_pthreads=missing - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_wasm_pthreads" >&5 @@ -7233,8 +7346,8 @@ then : ;; esac -else $as_nop - +else case e in #( + e) case $ac_sys_system/$ac_sys_emscripten_target in #( Emscripten/browser*) : EXEEXT=.js ;; #( @@ -7246,7 +7359,8 @@ else $as_nop EXEEXT= ;; esac - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5 @@ -7419,9 +7533,10 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; }; fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } ;; +esac fi @@ -7444,8 +7559,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : -else $as_nop - enable_profiling=no +else case e in #( + e) enable_profiling=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -7561,8 +7677,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_NODE+y} then : printf %s "(cached) " >&6 -else $as_nop - case $NODE in +else case e in #( + e) case $NODE in [\\/]* | ?:[\\/]*) ac_cv_path_NODE="$NODE" # Let the user override the test with a path. ;; @@ -7587,6 +7703,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi NODE=$ac_cv_path_NODE @@ -7609,8 +7726,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_NODE+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_NODE in +else case e in #( + e) case $ac_pt_NODE in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_NODE="$ac_pt_NODE" # Let the user override the test with a path. ;; @@ -7635,6 +7752,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_NODE=$ac_cv_path_ac_pt_NODE @@ -7669,14 +7787,15 @@ printf %s "checking for node --experimental-wasm-bigint... " >&6; } if test ${ac_cv_tool_node_wasm_bigint+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if $NODE -v --experimental-wasm-bigint > /dev/null 2>&1; then ac_cv_tool_node_wasm_bigint=yes else ac_cv_tool_node_wasm_bigint=no fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tool_node_wasm_bigint" >&5 printf "%s\n" "$ac_cv_tool_node_wasm_bigint" >&6; } @@ -7697,14 +7816,15 @@ printf %s "checking for node --experimental-wasm-bulk-memory... " >&6; } if test ${ac_cv_tool_node_wasm_bulk_memory+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if $NODE -v --experimental-wasm-bulk-memory > /dev/null 2>&1; then ac_cv_tool_node_wasm_bulk_memory=yes else ac_cv_tool_node_wasm_bulk_memory=no fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tool_node_wasm_bulk_memory" >&5 printf "%s\n" "$ac_cv_tool_node_wasm_bulk_memory" >&6; } @@ -7784,8 +7904,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$AR"; then +else case e in #( + e) if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7807,7 +7927,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi AR=$ac_cv_prog_AR if test -n "$AR"; then @@ -7833,8 +7954,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_AR"; then +else case e in #( + e) if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -7856,7 +7977,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then @@ -7921,8 +8043,8 @@ if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS @@ -7976,7 +8098,8 @@ esac IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir - + ;; +esac fi if test ${ac_cv_path_install+y}; then INSTALL=$ac_cv_path_install @@ -8006,8 +8129,8 @@ if test -z "$MKDIR_P"; then if test ${ac_cv_path_mkdir+y} then : printf %s "(cached) " >&6 -else $as_nop - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +else case e in #( + e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS @@ -8021,7 +8144,7 @@ do as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + *'BusyBox '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext break 3;; @@ -8030,18 +8153,17 @@ do done done IFS=$as_save_IFS - + ;; +esac fi test -d ./--version && rmdir ./--version if test ${ac_cv_path_mkdir+y}; then MKDIR_P="$ac_cv_path_mkdir -p" else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" + # As a last resort, use plain mkdir -p, + # in the hope it doesn't have the bugs of ancient mkdir. + MKDIR_P='mkdir -p' fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 @@ -8081,9 +8203,10 @@ printf "%s\n" "yes" >&6; }; else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }; Py_DEBUG='false' fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -8096,9 +8219,10 @@ printf %s "checking for --with-trace-refs... " >&6; } if test ${with_trace_refs+y} then : withval=$with_trace_refs; -else $as_nop - with_trace_refs=no - +else case e in #( + e) with_trace_refs=no + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_trace_refs" >&5 @@ -8119,9 +8243,10 @@ printf %s "checking for --enable-pystats... " >&6; } if test ${enable_pystats+y} then : enableval=$enable_pystats; -else $as_nop - enable_pystats=no - +else case e in #( + e) enable_pystats=no + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_pystats" >&5 @@ -8184,9 +8309,10 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }; fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -8205,8 +8331,8 @@ printf %s "checking whether C compiler accepts -fno-semantic-interposition... " if test ${ax_cv_check_cflags__Werror__fno_semantic_interposition+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -Werror -fno-semantic-interposition" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8223,11 +8349,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ax_cv_check_cflags__Werror__fno_semantic_interposition=yes -else $as_nop - ax_cv_check_cflags__Werror__fno_semantic_interposition=no +else case e in #( + e) ax_cv_check_cflags__Werror__fno_semantic_interposition=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags + CFLAGS=$ax_check_save_flags ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags__Werror__fno_semantic_interposition" >&5 printf "%s\n" "$ax_cv_check_cflags__Werror__fno_semantic_interposition" >&6; } @@ -8237,8 +8365,9 @@ then : CFLAGS_NODIST="$CFLAGS_NODIST -fno-semantic-interposition" LDFLAGS_NODIST="$LDFLAGS_NODIST -fno-semantic-interposition" -else $as_nop - : +else case e in #( + e) : ;; +esac fi ;; @@ -8321,9 +8450,10 @@ printf "%s\n" "no" >&6; } ;; esac -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi if test "$Py_LTO" = 'true' ; then @@ -8335,8 +8465,8 @@ printf %s "checking whether C compiler accepts -flto=thin... " >&6; } if test ${ax_cv_check_cflags___flto_thin+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -flto=thin" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8353,19 +8483,22 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ax_cv_check_cflags___flto_thin=yes -else $as_nop - ax_cv_check_cflags___flto_thin=no +else case e in #( + e) ax_cv_check_cflags___flto_thin=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags + CFLAGS=$ax_check_save_flags ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___flto_thin" >&5 printf "%s\n" "$ax_cv_check_cflags___flto_thin" >&6; } if test "x$ax_cv_check_cflags___flto_thin" = xyes then : LDFLAGS_NOLTO="-flto=thin" -else $as_nop - LDFLAGS_NOLTO="-flto" +else case e in #( + e) LDFLAGS_NOLTO="-flto" ;; +esac fi @@ -8377,8 +8510,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_LLVM_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - case $LLVM_AR in +else case e in #( + e) case $LLVM_AR in [\\/]* | ?:[\\/]*) ac_cv_path_LLVM_AR="$LLVM_AR" # Let the user override the test with a path. ;; @@ -8403,6 +8536,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi LLVM_AR=$ac_cv_path_LLVM_AR @@ -8425,8 +8559,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_LLVM_AR+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_LLVM_AR in +else case e in #( + e) case $ac_pt_LLVM_AR in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_LLVM_AR="$ac_pt_LLVM_AR" # Let the user override the test with a path. ;; @@ -8451,6 +8585,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_LLVM_AR=$ac_cv_path_ac_pt_LLVM_AR @@ -8515,8 +8650,8 @@ printf %s "checking whether C compiler accepts -flto=thin... " >&6; } if test ${ax_cv_check_cflags___flto_thin+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -flto=thin" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8533,11 +8668,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ax_cv_check_cflags___flto_thin=yes -else $as_nop - ax_cv_check_cflags___flto_thin=no +else case e in #( + e) ax_cv_check_cflags___flto_thin=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags + CFLAGS=$ax_check_save_flags ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___flto_thin" >&5 printf "%s\n" "$ax_cv_check_cflags___flto_thin" >&6; } @@ -8547,12 +8684,13 @@ then : LTOFLAGS="-flto=thin -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto" LTOCFLAGS="-flto=thin" -else $as_nop - +else case e in #( + e) LTOFLAGS="-flto -Wl,-export_dynamic -Wl,-object_path_lto,\"\$@\".lto" LTOCFLAGS="-flto" - + ;; +esac fi else @@ -8569,8 +8707,8 @@ printf %s "checking whether C compiler accepts -flto=thin... " >&6; } if test ${ax_cv_check_cflags___flto_thin+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -flto=thin" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8587,19 +8725,22 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ax_cv_check_cflags___flto_thin=yes -else $as_nop - ax_cv_check_cflags___flto_thin=no +else case e in #( + e) ax_cv_check_cflags___flto_thin=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags + CFLAGS=$ax_check_save_flags ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___flto_thin" >&5 printf "%s\n" "$ax_cv_check_cflags___flto_thin" >&6; } if test "x$ax_cv_check_cflags___flto_thin" = xyes then : LTOFLAGS="-flto=thin" -else $as_nop - LTOFLAGS="-flto" +else case e in #( + e) LTOFLAGS="-flto" ;; +esac fi else @@ -8659,8 +8800,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_LLVM_PROFDATA+y} then : printf %s "(cached) " >&6 -else $as_nop - case $LLVM_PROFDATA in +else case e in #( + e) case $LLVM_PROFDATA in [\\/]* | ?:[\\/]*) ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path. ;; @@ -8685,6 +8826,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA @@ -8707,8 +8849,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_LLVM_PROFDATA+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_LLVM_PROFDATA in +else case e in #( + e) case $ac_pt_LLVM_PROFDATA in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_LLVM_PROFDATA="$ac_pt_LLVM_PROFDATA" # Let the user override the test with a path. ;; @@ -8733,6 +8875,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_LLVM_PROFDATA=$ac_cv_path_ac_pt_LLVM_PROFDATA @@ -8846,9 +8989,10 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }; fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -8865,8 +9009,8 @@ printf %s "checking whether C compiler accepts -fno-reorder-blocks-and-partition if test ${ax_cv_check_cflags___fno_reorder_blocks_and_partition+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -fno-reorder-blocks-and-partition" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8883,11 +9027,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ax_cv_check_cflags___fno_reorder_blocks_and_partition=yes -else $as_nop - ax_cv_check_cflags___fno_reorder_blocks_and_partition=no +else case e in #( + e) ax_cv_check_cflags___fno_reorder_blocks_and_partition=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags + CFLAGS=$ax_check_save_flags ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fno_reorder_blocks_and_partition" >&5 printf "%s\n" "$ax_cv_check_cflags___fno_reorder_blocks_and_partition" >&6; } @@ -8896,8 +9042,9 @@ then : CFLAGS_NODIST="$CFLAGS_NODIST -fno-reorder-blocks-and-partition" -else $as_nop - : +else case e in #( + e) : ;; +esac fi @@ -8917,8 +9064,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_LLVM_BOLT+y} then : printf %s "(cached) " >&6 -else $as_nop - case $LLVM_BOLT in +else case e in #( + e) case $LLVM_BOLT in [\\/]* | ?:[\\/]*) ac_cv_path_LLVM_BOLT="$LLVM_BOLT" # Let the user override the test with a path. ;; @@ -8943,6 +9090,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi LLVM_BOLT=$ac_cv_path_LLVM_BOLT @@ -8965,8 +9113,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_LLVM_BOLT+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_LLVM_BOLT in +else case e in #( + e) case $ac_pt_LLVM_BOLT in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_LLVM_BOLT="$ac_pt_LLVM_BOLT" # Let the user override the test with a path. ;; @@ -8991,6 +9139,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_LLVM_BOLT=$ac_cv_path_ac_pt_LLVM_BOLT @@ -9034,8 +9183,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MERGE_FDATA+y} then : printf %s "(cached) " >&6 -else $as_nop - case $MERGE_FDATA in +else case e in #( + e) case $MERGE_FDATA in [\\/]* | ?:[\\/]*) ac_cv_path_MERGE_FDATA="$MERGE_FDATA" # Let the user override the test with a path. ;; @@ -9060,6 +9209,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi MERGE_FDATA=$ac_cv_path_MERGE_FDATA @@ -9082,8 +9232,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_MERGE_FDATA+y} then : printf %s "(cached) " >&6 -else $as_nop - case $ac_pt_MERGE_FDATA in +else case e in #( + e) case $ac_pt_MERGE_FDATA in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_MERGE_FDATA="$ac_pt_MERGE_FDATA" # Let the user override the test with a path. ;; @@ -9108,6 +9258,7 @@ done IFS=$as_save_IFS ;; +esac ;; esac fi ac_pt_MERGE_FDATA=$ac_cv_path_ac_pt_MERGE_FDATA @@ -9206,8 +9357,8 @@ printf %s "checking if $CC supports -fstrict-overflow and -fno-strict-overflow.. if test ${ac_cv_cc_supports_fstrict_overflow+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -9221,12 +9372,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_cc_supports_fstrict_overflow=yes -else $as_nop - ac_cv_cc_supports_fstrict_overflow=no - +else case e in #( + e) ac_cv_cc_supports_fstrict_overflow=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_fstrict_overflow" >&5 printf "%s\n" "$ac_cv_cc_supports_fstrict_overflow" >&6; } @@ -9236,9 +9389,10 @@ if test "x$ac_cv_cc_supports_fstrict_overflow" = xyes then : STRICT_OVERFLOW_CFLAGS="-fstrict-overflow" NO_STRICT_OVERFLOW_CFLAGS="-fno-strict-overflow" -else $as_nop - STRICT_OVERFLOW_CFLAGS="" - NO_STRICT_OVERFLOW_CFLAGS="" +else case e in #( + e) STRICT_OVERFLOW_CFLAGS="" + NO_STRICT_OVERFLOW_CFLAGS="" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-strict-overflow" >&5 @@ -9254,9 +9408,10 @@ then : printf "%s\n" "$as_me: WARNING: --with-strict-overflow=yes requires a compiler that supports -fstrict-overflow" >&2;} fi -else $as_nop - with_strict_overflow=no - +else case e in #( + e) with_strict_overflow=no + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_strict_overflow" >&5 @@ -9270,8 +9425,8 @@ printf %s "checking if $CC supports -Og optimization level... " >&6; } if test ${ac_cv_cc_supports_og+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9289,13 +9444,15 @@ then : ac_cv_cc_supports_og=yes -else $as_nop - +else case e in #( + e) ac_cv_cc_supports_og=no - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_og" >&5 printf "%s\n" "$ac_cv_cc_supports_og" >&6; } @@ -9356,8 +9513,9 @@ case $ac_sys_system in #( if test "x$Py_DEBUG" = xyes then : wasm_debug=yes -else $as_nop - wasm_debug=no +else case e in #( + e) wasm_debug=no ;; +esac fi as_fn_append LDFLAGS_NODIST " -sALLOW_MEMORY_GROWTH -sTOTAL_MEMORY=20971520" @@ -9415,10 +9573,11 @@ then : as_fn_append LDFLAGS_NODIST " -sASSERTIONS" as_fn_append LINKFORSHARED " $WASM_LINKFORSHARED_DEBUG" -else $as_nop - +else case e in #( + e) as_fn_append LINKFORSHARED " -O2 -g0" - + ;; +esac fi ;; #( WASI) : @@ -9491,8 +9650,9 @@ UNIVERSAL_ARCH_FLAGS= if test "x$with_strict_overflow" = xyes then : BASECFLAGS="$BASECFLAGS $STRICT_OVERFLOW_CFLAGS" -else $as_nop - BASECFLAGS="$BASECFLAGS $NO_STRICT_OVERFLOW_CFLAGS" +else case e in #( + e) BASECFLAGS="$BASECFLAGS $NO_STRICT_OVERFLOW_CFLAGS" ;; +esac fi case $GCC in @@ -9506,8 +9666,8 @@ printf %s "checking if we can add -Wextra... " >&6; } if test ${ac_cv_enable_extra_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wextra -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9524,12 +9684,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_enable_extra_warning=yes -else $as_nop - ac_cv_enable_extra_warning=no +else case e in #( + e) ac_cv_enable_extra_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_extra_warning" >&5 printf "%s\n" "$ac_cv_enable_extra_warning" >&6; } @@ -9552,8 +9714,8 @@ printf %s "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; if test ${ac_cv_no_strict_aliasing+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9589,19 +9751,22 @@ then : ac_cv_no_strict_aliasing=no -else $as_nop - +else case e in #( + e) ac_cv_no_strict_aliasing=yes - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop - +else case e in #( + e) ac_cv_no_strict_aliasing=no - + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5 printf "%s\n" "$ac_cv_no_strict_aliasing" >&6; } @@ -9624,8 +9789,8 @@ printf %s "checking if we can disable $CC unused-result warning... " >&6; } if test ${ac_cv_disable_unused_result_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wunused-result -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9642,12 +9807,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_disable_unused_result_warning=yes -else $as_nop - ac_cv_disable_unused_result_warning=no +else case e in #( + e) ac_cv_disable_unused_result_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5 printf "%s\n" "$ac_cv_disable_unused_result_warning" >&6; } @@ -9669,8 +9836,8 @@ printf %s "checking if we can disable $CC unused-parameter warning... " >&6; } if test ${ac_cv_disable_unused_parameter_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wunused-parameter -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9687,12 +9854,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_disable_unused_parameter_warning=yes -else $as_nop - ac_cv_disable_unused_parameter_warning=no +else case e in #( + e) ac_cv_disable_unused_parameter_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_parameter_warning" >&5 printf "%s\n" "$ac_cv_disable_unused_parameter_warning" >&6; } @@ -9710,8 +9879,8 @@ printf %s "checking if we can disable $CC int-conversion warning... " >&6; } if test ${ac_cv_disable_int_conversion_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wint-conversion -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9728,12 +9897,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_disable_int_conversion_warning=yes -else $as_nop - ac_cv_disable_int_conversion_warning=no +else case e in #( + e) ac_cv_disable_int_conversion_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_int_conversion_warning" >&5 printf "%s\n" "$ac_cv_disable_int_conversion_warning" >&6; } @@ -9751,8 +9922,8 @@ printf %s "checking if we can disable $CC missing-field-initializers warning... if test ${ac_cv_disable_missing_field_initializers_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wmissing-field-initializers -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9769,12 +9940,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_disable_missing_field_initializers_warning=yes -else $as_nop - ac_cv_disable_missing_field_initializers_warning=no +else case e in #( + e) ac_cv_disable_missing_field_initializers_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_missing_field_initializers_warning" >&5 printf "%s\n" "$ac_cv_disable_missing_field_initializers_warning" >&6; } @@ -9792,8 +9965,8 @@ printf %s "checking if we can enable $CC sign-compare warning... " >&6; } if test ${ac_cv_enable_sign_compare_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wsign-compare -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9810,12 +9983,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_enable_sign_compare_warning=yes -else $as_nop - ac_cv_enable_sign_compare_warning=no +else case e in #( + e) ac_cv_enable_sign_compare_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_sign_compare_warning" >&5 printf "%s\n" "$ac_cv_enable_sign_compare_warning" >&6; } @@ -9833,8 +10008,8 @@ printf %s "checking if we can enable $CC unreachable-code warning... " >&6; } if test ${ac_cv_enable_unreachable_code_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wunreachable-code -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9851,12 +10026,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_enable_unreachable_code_warning=yes -else $as_nop - ac_cv_enable_unreachable_code_warning=no +else case e in #( + e) ac_cv_enable_unreachable_code_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_unreachable_code_warning" >&5 printf "%s\n" "$ac_cv_enable_unreachable_code_warning" >&6; } @@ -9885,8 +10062,8 @@ printf %s "checking if we can enable $CC strict-prototypes warning... " >&6; } if test ${ac_cv_enable_strict_prototypes_warning+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) py_cflags=$CFLAGS as_fn_append CFLAGS " -Wstrict-prototypes -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9903,12 +10080,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_enable_strict_prototypes_warning=yes -else $as_nop - ac_cv_enable_strict_prototypes_warning=no +else case e in #( + e) ac_cv_enable_strict_prototypes_warning=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$py_cflags - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_strict_prototypes_warning" >&5 printf "%s\n" "$ac_cv_enable_strict_prototypes_warning" >&6; } @@ -9926,8 +10105,8 @@ printf %s "checking if we can make implicit function declaration an error in $CC if test ${ac_cv_enable_implicit_function_declaration_error+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9945,12 +10124,14 @@ then : ac_cv_enable_implicit_function_declaration_error=yes -else $as_nop - +else case e in #( + e) ac_cv_enable_implicit_function_declaration_error=no - + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_implicit_function_declaration_error" >&5 printf "%s\n" "$ac_cv_enable_implicit_function_declaration_error" >&6; } @@ -9968,8 +10149,8 @@ printf %s "checking if we can use visibility in $CC... " >&6; } if test ${ac_cv_enable_visibility+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9987,12 +10168,14 @@ then : ac_cv_enable_visibility=yes -else $as_nop - +else case e in #( + e) ac_cv_enable_visibility=no - + ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_enable_visibility" >&5 printf "%s\n" "$ac_cv_enable_visibility" >&6; } @@ -10169,11 +10352,12 @@ if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } as_fn_error $? "check config.log and use the '--with-universal-archs' option" "$LINENO" 5 - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -10229,12 +10413,12 @@ printf %s "checking whether pthreads are available without options... " >&6; } if test ${ac_cv_pthread_is_default+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_pthread_is_default=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10258,14 +10442,17 @@ then : ac_cv_kthread=no ac_cv_pthread=no -else $as_nop - ac_cv_pthread_is_default=no +else case e in #( + e) ac_cv_pthread_is_default=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5 printf "%s\n" "$ac_cv_pthread_is_default" >&6; } @@ -10285,14 +10472,14 @@ printf %s "checking whether $CC accepts -Kpthread... " >&6; } if test ${ac_cv_kpthread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_cc="$CC" +else case e in #( + e) ac_save_cc="$CC" CC="$CC -Kpthread" if test "$cross_compiling" = yes then : ac_cv_kpthread=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10312,14 +10499,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_kpthread=yes -else $as_nop - ac_cv_kpthread=no +else case e in #( + e) ac_cv_kpthread=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -CC="$ac_save_cc" +CC="$ac_save_cc" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5 printf "%s\n" "$ac_cv_kpthread" >&6; } @@ -10337,14 +10527,14 @@ printf %s "checking whether $CC accepts -Kthread... " >&6; } if test ${ac_cv_kthread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_cc="$CC" +else case e in #( + e) ac_save_cc="$CC" CC="$CC -Kthread" if test "$cross_compiling" = yes then : ac_cv_kthread=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10364,14 +10554,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_kthread=yes -else $as_nop - ac_cv_kthread=no +else case e in #( + e) ac_cv_kthread=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -CC="$ac_save_cc" +CC="$ac_save_cc" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5 printf "%s\n" "$ac_cv_kthread" >&6; } @@ -10389,14 +10582,14 @@ printf %s "checking whether $CC accepts -pthread... " >&6; } if test ${ac_cv_pthread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_cc="$CC" +else case e in #( + e) ac_save_cc="$CC" CC="$CC -pthread" if test "$cross_compiling" = yes then : ac_cv_pthread=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -10416,14 +10609,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_pthread=yes -else $as_nop - ac_cv_pthread=no +else case e in #( + e) ac_cv_pthread=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi -CC="$ac_save_cc" +CC="$ac_save_cc" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5 printf "%s\n" "$ac_cv_pthread" >&6; } @@ -10438,8 +10634,8 @@ printf %s "checking whether $CXX also accepts flags for thread support... " >&6; if test ${ac_cv_cxx_thread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_cxx="$CXX" +else case e in #( + e) ac_save_cxx="$CXX" if test "$ac_cv_kpthread" = "yes" then @@ -10470,7 +10666,8 @@ then fi rm -fr conftest* fi -CXX="$ac_save_cxx" +CXX="$ac_save_cxx" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5 printf "%s\n" "$ac_cv_cxx_thread" >&6; } @@ -10985,14 +11182,14 @@ fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do - as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` + as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> @@ -11009,10 +11206,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" -else $as_nop - eval "$as_ac_Header=no" +else case e in #( + e) eval "$as_ac_Header=no" ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 @@ -11020,7 +11219,7 @@ printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_hdr" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1 _ACEOF ac_header_dirent=$ac_hdr; break @@ -11034,15 +11233,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -11073,11 +11278,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -11094,15 +11301,21 @@ printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char opendir (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char opendir (void); int main (void) { @@ -11133,11 +11346,13 @@ done if test ${ac_cv_search_opendir+y} then : -else $as_nop - ac_cv_search_opendir=no +else case e in #( + e) ac_cv_search_opendir=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$ac_cv_search_opendir" >&6; } @@ -11308,28 +11523,164 @@ fi # checks for typedefs +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 +printf %s "checking for egrep -e... " >&6; } +if test ${ac_cv_path_EGREP_TRADITIONAL+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in grep ggrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_TRADITIONAL_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then + : + fi +else + ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL +fi + + if test "$ac_cv_path_EGREP_TRADITIONAL" +then : + ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" +else case e in #( + e) if test -z "$EGREP_TRADITIONAL"; then + ac_path_EGREP_TRADITIONAL_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_prog in egrep + do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue +# Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. + # Check for GNU $ac_path_EGREP_TRADITIONAL +case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( +*GNU*) + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; +#( +*) + ac_count=0 + printf %s 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" + "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" + ac_path_EGREP_TRADITIONAL_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_TRADITIONAL_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL +fi + ;; +esac +fi ;; +esac +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 +printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } + EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5 printf %s "checking for clock_t in time.h... " >&6; } if test ${ac_cv_clock_t_time_h+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "clock_t" >/dev/null 2>&1 + $EGREP_TRADITIONAL "clock_t" >/dev/null 2>&1 then : ac_cv_clock_t_time_h=yes -else $as_nop - ac_cv_clock_t_time_h=no +else case e in #( + e) ac_cv_clock_t_time_h=no ;; +esac fi rm -rf conftest* - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_clock_t_time_h" >&5 printf "%s\n" "$ac_cv_clock_t_time_h" >&6; } @@ -11347,8 +11698,8 @@ printf %s "checking for makedev... " >&6; } if test ${ac_cv_func_makedev+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11373,12 +11724,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_makedev=yes -else $as_nop - ac_cv_func_makedev=no +else case e in #( + e) ac_cv_func_makedev=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_makedev" >&5 printf "%s\n" "$ac_cv_func_makedev" >&6; } @@ -11398,8 +11751,8 @@ printf %s "checking for le64toh... " >&6; } if test ${ac_cv_func_le64toh+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -11422,12 +11775,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_le64toh=yes -else $as_nop - ac_cv_func_le64toh=no +else case e in #( + e) ac_cv_func_le64toh=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_le64toh" >&5 printf "%s\n" "$ac_cv_func_le64toh" >&6; } @@ -11477,20 +11832,22 @@ ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" if test "x$ac_cv_type_mode_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define mode_t int" >>confdefs.h - + ;; +esac fi ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define off_t long int" >>confdefs.h - + ;; +esac fi @@ -11499,8 +11856,8 @@ fi if test "x$ac_cv_type_pid_t" = xyes then : -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ @@ -11519,14 +11876,16 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' -else $as_nop - ac_pid_type='__int64' +else case e in #( + e) ac_pid_type='__int64' ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h - + ;; +esac fi @@ -11537,42 +11896,33 @@ ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define size_t unsigned int" >>confdefs.h - + ;; +esac fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 -printf %s "checking for uid_t in sys/types.h... " >&6; } -if test ${ac_cv_type_uid_t+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "uid_t" >/dev/null 2>&1 +ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default" +if test "x$ac_cv_type_uid_t" = xyes then : - ac_cv_type_uid_t=yes -else $as_nop - ac_cv_type_uid_t=no -fi -rm -rf conftest* - -fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 -printf "%s\n" "$ac_cv_type_uid_t" >&6; } -if test $ac_cv_type_uid_t = no; then +else case e in #( + e) printf "%s\n" "#define uid_t int" >>confdefs.h + ;; +esac +fi +ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default" +if test "x$ac_cv_type_gid_t" = xyes +then : +else case e in #( + e) printf "%s\n" "#define gid_t int" >>confdefs.h - + ;; +esac fi @@ -11597,28 +11947,30 @@ fi # ANSI C requires sizeof(char) == 1, so no need to check it # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_int" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_int" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } @@ -11630,28 +11982,30 @@ printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } @@ -11668,22 +12022,24 @@ printf %s "checking alignment of long... " >&6; } if test ${ac_cv_alignof_long+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_long" "$ac_includes_default typedef struct { char x; long y; } ac__type_alignof_;" then : -else $as_nop - if test "$ac_cv_type_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of long -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_alignof_long=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_long" >&5 printf "%s\n" "$ac_cv_alignof_long" >&6; } @@ -11695,28 +12051,30 @@ printf "%s\n" "#define ALIGNOF_LONG $ac_cv_alignof_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_long_long" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_long_long" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } @@ -11728,28 +12086,30 @@ printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 printf %s "checking size of void *... " >&6; } if test ${ac_cv_sizeof_void_p+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_void_p" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_void_p" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } @@ -11761,28 +12121,30 @@ printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_short" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_short" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf "%s\n" "$ac_cv_sizeof_short" >&6; } @@ -11794,28 +12156,30 @@ printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of float" >&5 printf %s "checking size of float... " >&6; } if test ${ac_cv_sizeof_float+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (float))" "ac_cv_sizeof_float" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_float" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_float" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (float) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_float=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5 printf "%s\n" "$ac_cv_sizeof_float" >&6; } @@ -11827,28 +12191,30 @@ printf "%s\n" "#define SIZEOF_FLOAT $ac_cv_sizeof_float" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 printf %s "checking size of double... " >&6; } if test ${ac_cv_sizeof_double+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_double" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_double" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (double) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_double=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 printf "%s\n" "$ac_cv_sizeof_double" >&6; } @@ -11860,28 +12226,30 @@ printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5 printf %s "checking size of fpos_t... " >&6; } if test ${ac_cv_sizeof_fpos_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (fpos_t))" "ac_cv_sizeof_fpos_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_fpos_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_fpos_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (fpos_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_fpos_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5 printf "%s\n" "$ac_cv_sizeof_fpos_t" >&6; } @@ -11893,28 +12261,30 @@ printf "%s\n" "#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 printf %s "checking size of size_t... " >&6; } if test ${ac_cv_sizeof_size_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_size_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_size_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } @@ -11931,22 +12301,24 @@ printf %s "checking alignment of size_t... " >&6; } if test ${ac_cv_alignof_size_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_size_t" "$ac_includes_default typedef struct { char x; size_t y; } ac__type_alignof_;" then : -else $as_nop - if test "$ac_cv_type_size_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_size_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of size_t -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_alignof_size_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_size_t" >&5 printf "%s\n" "$ac_cv_alignof_size_t" >&6; } @@ -11958,28 +12330,30 @@ printf "%s\n" "#define ALIGNOF_SIZE_T $ac_cv_alignof_size_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5 printf %s "checking size of pid_t... " >&6; } if test ${ac_cv_sizeof_pid_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_pid_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_pid_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (pid_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_pid_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5 printf "%s\n" "$ac_cv_sizeof_pid_t" >&6; } @@ -11991,28 +12365,30 @@ printf "%s\n" "#define SIZEOF_PID_T $ac_cv_sizeof_pid_t" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5 printf %s "checking size of uintptr_t... " >&6; } if test ${ac_cv_sizeof_uintptr_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (uintptr_t))" "ac_cv_sizeof_uintptr_t" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_uintptr_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_uintptr_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (uintptr_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_uintptr_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5 printf "%s\n" "$ac_cv_sizeof_uintptr_t" >&6; } @@ -12029,22 +12405,24 @@ printf %s "checking alignment of max_align_t... " >&6; } if test ${ac_cv_alignof_max_align_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_max_align_t" "$ac_includes_default +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) offsetof (ac__type_alignof_, y)" "ac_cv_alignof_max_align_t" "$ac_includes_default typedef struct { char x; max_align_t y; } ac__type_alignof_;" then : -else $as_nop - if test "$ac_cv_type_max_align_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_max_align_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute alignment of max_align_t -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_alignof_max_align_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_alignof_max_align_t" >&5 printf "%s\n" "$ac_cv_alignof_max_align_t" >&6; } @@ -12061,8 +12439,8 @@ printf %s "checking for long double... " >&6; } if test ${ac_cv_type_long_double+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$GCC" = yes; then +else case e in #( + e) if test "$GCC" = yes; then ac_cv_type_long_double=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12085,11 +12463,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_type_long_double=yes -else $as_nop - ac_cv_type_long_double=no +else case e in #( + e) ac_cv_type_long_double=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5 printf "%s\n" "$ac_cv_type_long_double" >&6; } @@ -12101,28 +12481,30 @@ printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5 printf %s "checking size of long double... " >&6; } if test ${ac_cv_sizeof_long_double+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type_long_double" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_long_double" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long double) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_double=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5 printf "%s\n" "$ac_cv_sizeof_long_double" >&6; } @@ -12135,28 +12517,30 @@ printf "%s\n" "#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double" >>confdefs. # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5 printf %s "checking size of _Bool... " >&6; } if test ${ac_cv_sizeof__Bool+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default" +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default" then : -else $as_nop - if test "$ac_cv_type__Bool" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type__Bool" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (_Bool) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof__Bool=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5 printf "%s\n" "$ac_cv_sizeof__Bool" >&6; } @@ -12169,15 +12553,15 @@ printf "%s\n" "#define SIZEOF__BOOL $ac_cv_sizeof__Bool" >>confdefs.h # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 printf %s "checking size of off_t... " >&6; } if test ${ac_cv_sizeof_off_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" " +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" " #ifdef HAVE_SYS_TYPES_H #include #endif @@ -12185,17 +12569,19 @@ else $as_nop " then : -else $as_nop - if test "$ac_cv_type_off_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_off_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } @@ -12230,24 +12616,25 @@ printf "%s\n" "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 printf %s "checking size of time_t... " >&6; } if test ${ac_cv_sizeof_time_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" " +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" " #ifdef HAVE_SYS_TYPES_H #include #endif @@ -12258,17 +12645,19 @@ else $as_nop " then : -else $as_nop - if test "$ac_cv_type_time_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_time_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (time_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_time_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } @@ -12294,8 +12683,8 @@ printf %s "checking for pthread_t... " >&6; } if test ${ac_cv_have_pthread_t+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12312,11 +12701,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_have_pthread_t=yes -else $as_nop - ac_cv_have_pthread_t=no +else case e in #( + e) ac_cv_have_pthread_t=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pthread_t" >&5 printf "%s\n" "$ac_cv_have_pthread_t" >&6; } @@ -12325,15 +12716,15 @@ then : # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5 printf %s "checking size of pthread_t... " >&6; } if test ${ac_cv_sizeof_pthread_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" " +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" " #ifdef HAVE_PTHREAD_H #include #endif @@ -12341,17 +12732,19 @@ else $as_nop " then : -else $as_nop - if test "$ac_cv_type_pthread_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_pthread_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (pthread_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_pthread_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5 printf "%s\n" "$ac_cv_sizeof_pthread_t" >&6; } @@ -12368,29 +12761,31 @@ fi # This checking will be unnecessary after removing deprecated TLS API. # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of pthread_key_t" >&5 printf %s "checking size of pthread_key_t... " >&6; } if test ${ac_cv_sizeof_pthread_key_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_key_t))" "ac_cv_sizeof_pthread_key_t" "#include " then : -else $as_nop - if test "$ac_cv_type_pthread_key_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_pthread_key_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (pthread_key_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_pthread_key_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_key_t" >&5 printf "%s\n" "$ac_cv_sizeof_pthread_key_t" >&6; } @@ -12405,8 +12800,8 @@ printf %s "checking whether pthread_key_t is compatible with int... " >&6; } if test ${ac_cv_pthread_key_t_is_arithmetic_type+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$ac_cv_sizeof_pthread_key_t" -eq "$ac_cv_sizeof_int" ; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -12422,15 +12817,17 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_pthread_key_t_is_arithmetic_type=yes -else $as_nop - ac_cv_pthread_key_t_is_arithmetic_type=no - +else case e in #( + e) ac_cv_pthread_key_t_is_arithmetic_type=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext else ac_cv_pthread_key_t_is_arithmetic_type=no fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_key_t_is_arithmetic_type" >&5 printf "%s\n" "$ac_cv_pthread_key_t_is_arithmetic_type" >&6; } @@ -12489,9 +12886,10 @@ printf "%s\n" "yes" >&6; }; else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; }; DSYMUTIL= fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -12503,8 +12901,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DSYMUTIL_PATH+y} then : printf %s "(cached) " >&6 -else $as_nop - case $DSYMUTIL_PATH in +else case e in #( + e) case $DSYMUTIL_PATH in [\\/]* | ?:[\\/]*) ac_cv_path_DSYMUTIL_PATH="$DSYMUTIL_PATH" # Let the user override the test with a path. ;; @@ -12530,6 +12928,7 @@ IFS=$as_save_IFS test -z "$ac_cv_path_DSYMUTIL_PATH" && ac_cv_path_DSYMUTIL_PATH="not found" ;; +esac ;; esac fi DSYMUTIL_PATH=$ac_cv_path_DSYMUTIL_PATH @@ -12577,9 +12976,10 @@ LDFLAGS="-fsanitize=address $LDFLAGS" # ASan works by controlling memory allocation, our own malloc interferes. with_pymalloc="no" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -12597,8 +12997,8 @@ printf %s "checking whether C compiler accepts -fsanitize=memory... " >&6; } if test ${ax_cv_check_cflags___fsanitize_memory+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -fsanitize=memory" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -12615,11 +13015,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ax_cv_check_cflags___fsanitize_memory=yes -else $as_nop - ax_cv_check_cflags___fsanitize_memory=no +else case e in #( + e) ax_cv_check_cflags___fsanitize_memory=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - CFLAGS=$ax_check_save_flags + CFLAGS=$ax_check_save_flags ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___fsanitize_memory" >&5 printf "%s\n" "$ax_cv_check_cflags___fsanitize_memory" >&6; } @@ -12629,16 +13031,18 @@ then : BASECFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 -fno-omit-frame-pointer $BASECFLAGS" LDFLAGS="-fsanitize=memory -fsanitize-memory-track-origins=2 $LDFLAGS" -else $as_nop - as_fn_error $? "The selected compiler doesn't support memory sanitizer" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "The selected compiler doesn't support memory sanitizer" "$LINENO" 5 ;; +esac fi # MSan works by controlling memory allocation, our own malloc interferes. with_pymalloc="no" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -12655,12 +13059,13 @@ BASECFLAGS="-fsanitize=undefined $BASECFLAGS" LDFLAGS="-fsanitize=undefined $LDFLAGS" with_ubsan="yes" -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } with_ubsan="no" - + ;; +esac fi @@ -12677,12 +13082,13 @@ BASECFLAGS="-fsanitize=thread $BASECFLAGS" LDFLAGS="-fsanitize=thread $LDFLAGS" with_tsan="yes" -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } with_tsan="no" - + ;; +esac fi @@ -13058,16 +13464,22 @@ printf %s "checking for sendfile in -lsendfile... " >&6; } if test ${ac_cv_lib_sendfile_sendfile+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsendfile $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sendfile (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sendfile (void); int main (void) { @@ -13079,12 +13491,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sendfile_sendfile=yes -else $as_nop - ac_cv_lib_sendfile_sendfile=no +else case e in #( + e) ac_cv_lib_sendfile_sendfile=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5 printf "%s\n" "$ac_cv_lib_sendfile_sendfile" >&6; } @@ -13101,16 +13515,22 @@ printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dlopen (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dlopen (void); int main (void) { @@ -13122,12 +13542,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes -else $as_nop - ac_cv_lib_dl_dlopen=no +else case e in #( + e) ac_cv_lib_dl_dlopen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } @@ -13144,16 +13566,22 @@ printf %s "checking for shl_load in -ldld... " >&6; } if test ${ac_cv_lib_dld_shl_load+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char shl_load (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char shl_load (void); int main (void) { @@ -13165,12 +13593,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dld_shl_load=yes -else $as_nop - ac_cv_lib_dld_shl_load=no +else case e in #( + e) ac_cv_lib_dld_shl_load=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 printf "%s\n" "$ac_cv_lib_dld_shl_load" >&6; } @@ -13198,12 +13628,12 @@ then : for ac_func in uuid_create uuid_enc_be do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF have_uuid=yes LIBUUID_CFLAGS=${LIBUUID_CFLAGS-""} @@ -13225,7 +13655,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for uuid >= 2.20" >&5 printf %s "checking for uuid >= 2.20... " >&6; } -if test -n "$LIBUUID_CFLAGS"; then +if test "x$pkg_check_module_LIBUUID" != "xno"; then + if test -n "$LIBUUID_CFLAGS"; then pkg_cv_LIBUUID_CFLAGS="$LIBUUID_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -13242,7 +13673,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBUUID_LIBS"; then + if test -n "$LIBUUID_LIBS"; then pkg_cv_LIBUUID_LIBS="$LIBUUID_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -13259,6 +13690,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -13301,16 +13735,22 @@ printf %s "checking for uuid_generate_time in -luuid... " >&6; } if test ${ac_cv_lib_uuid_uuid_generate_time+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char uuid_generate_time (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_generate_time (void); int main (void) { @@ -13322,12 +13762,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_uuid_uuid_generate_time=yes -else $as_nop - ac_cv_lib_uuid_uuid_generate_time=no +else case e in #( + e) ac_cv_lib_uuid_uuid_generate_time=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time" >&5 printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time" >&6; } @@ -13344,16 +13786,22 @@ printf %s "checking for uuid_generate_time_safe in -luuid... " >&6; } if test ${ac_cv_lib_uuid_uuid_generate_time_safe+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char uuid_generate_time_safe (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_generate_time_safe (void); int main (void) { @@ -13365,12 +13813,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_uuid_uuid_generate_time_safe=yes -else $as_nop - ac_cv_lib_uuid_uuid_generate_time_safe=no +else case e in #( + e) ac_cv_lib_uuid_uuid_generate_time_safe=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time_safe" >&5 printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time_safe" >&6; } @@ -13427,16 +13877,22 @@ printf %s "checking for uuid_generate_time in -luuid... " >&6; } if test ${ac_cv_lib_uuid_uuid_generate_time+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char uuid_generate_time (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_generate_time (void); int main (void) { @@ -13448,12 +13904,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_uuid_uuid_generate_time=yes -else $as_nop - ac_cv_lib_uuid_uuid_generate_time=no +else case e in #( + e) ac_cv_lib_uuid_uuid_generate_time=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time" >&5 printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time" >&6; } @@ -13470,16 +13928,22 @@ printf %s "checking for uuid_generate_time_safe in -luuid... " >&6; } if test ${ac_cv_lib_uuid_uuid_generate_time_safe+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char uuid_generate_time_safe (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char uuid_generate_time_safe (void); int main (void) { @@ -13491,12 +13955,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_uuid_uuid_generate_time_safe=yes -else $as_nop - ac_cv_lib_uuid_uuid_generate_time_safe=no +else case e in #( + e) ac_cv_lib_uuid_uuid_generate_time_safe=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate_time_safe" >&5 printf "%s\n" "$ac_cv_lib_uuid_uuid_generate_time_safe" >&6; } @@ -13583,15 +14049,21 @@ printf %s "checking for library containing sem_init... " >&6; } if test ${ac_cv_search_sem_init+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sem_init (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sem_init (void); int main (void) { @@ -13622,11 +14094,13 @@ done if test ${ac_cv_search_sem_init+y} then : -else $as_nop - ac_cv_search_sem_init=no +else case e in #( + e) ac_cv_search_sem_init=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5 printf "%s\n" "$ac_cv_search_sem_init" >&6; } @@ -13644,16 +14118,22 @@ printf %s "checking for textdomain in -lintl... " >&6; } if test ${ac_cv_lib_intl_textdomain+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char textdomain (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char textdomain (void); int main (void) { @@ -13665,12 +14145,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_intl_textdomain=yes -else $as_nop - ac_cv_lib_intl_textdomain=no +else case e in #( + e) ac_cv_lib_intl_textdomain=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5 printf "%s\n" "$ac_cv_lib_intl_textdomain" >&6; } @@ -13709,11 +14191,12 @@ printf "%s\n" "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -13738,12 +14221,12 @@ printf %s "checking aligned memory access is required... " >&6; } if test ${ac_cv_aligned_required+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_aligned_required=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) @@ -13762,14 +14245,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_aligned_required=no -else $as_nop - ac_cv_aligned_required=yes +else case e in #( + e) ac_cv_aligned_required=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_aligned_required" >&5 printf "%s\n" "$ac_cv_aligned_required" >&6; } @@ -13809,9 +14295,10 @@ case "$withval" in ;; esac -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5 -printf "%s\n" "default" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default" >&5 +printf "%s\n" "default" >&6; } ;; +esac fi @@ -13849,10 +14336,11 @@ printf "%s\n" "\"$withval\"" >&6; } ;; esac -else $as_nop - validate_tzpath "$TZPATH" +else case e in #( + e) validate_tzpath "$TZPATH" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: \"$TZPATH\"" >&5 -printf "%s\n" "\"$TZPATH\"" >&6; } +printf "%s\n" "\"$TZPATH\"" >&6; } ;; +esac fi @@ -13863,16 +14351,22 @@ printf %s "checking for t_open in -lnsl... " >&6; } if test ${ac_cv_lib_nsl_t_open+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char t_open (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char t_open (void); int main (void) { @@ -13884,12 +14378,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nsl_t_open=yes -else $as_nop - ac_cv_lib_nsl_t_open=no +else case e in #( + e) ac_cv_lib_nsl_t_open=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; } @@ -13903,16 +14399,22 @@ printf %s "checking for socket in -lsocket... " >&6; } if test ${ac_cv_lib_socket_socket+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char socket (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char socket (void); int main (void) { @@ -13924,12 +14426,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_socket=yes -else $as_nop - ac_cv_lib_socket_socket=no +else case e in #( + e) ac_cv_lib_socket_socket=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 printf "%s\n" "$ac_cv_lib_socket_socket" >&6; } @@ -13946,16 +14450,22 @@ printf %s "checking for socket in -lnetwork... " >&6; } if test ${ac_cv_lib_network_socket+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lnetwork $LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char socket (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char socket (void); int main (void) { @@ -13967,12 +14477,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_network_socket=yes -else $as_nop - ac_cv_lib_network_socket=no +else case e in #( + e) ac_cv_lib_network_socket=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5 printf "%s\n" "$ac_cv_lib_network_socket" >&6; } @@ -13995,9 +14507,10 @@ then : printf "%s\n" "$withval" >&6; } LIBS="$withval $LIBS" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -14009,8 +14522,9 @@ printf %s "checking for --with-system-expat... " >&6; } if test ${with_system_expat+y} then : withval=$with_system_expat; -else $as_nop - with_system_expat="no" +else case e in #( + e) with_system_expat="no" ;; +esac fi @@ -14024,12 +14538,13 @@ then : LIBEXPAT_LDFLAGS=${LIBEXPAT_LDFLAGS-"-lexpat"} LIBEXPAT_INTERNAL= -else $as_nop - +else case e in #( + e) LIBEXPAT_CFLAGS="-I\$(srcdir)/Modules/expat" LIBEXPAT_LDFLAGS="-lm \$(LIBEXPAT_A)" LIBEXPAT_INTERNAL="\$(LIBEXPAT_HEADERS) \$(LIBEXPAT_A)" - + ;; +esac fi @@ -14055,16 +14570,22 @@ printf %s "checking for ffi_call in -lffi... " >&6; } if test ${ac_cv_lib_ffi_ffi_call+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lffi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char ffi_call (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char ffi_call (void); int main (void) { @@ -14076,12 +14597,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ffi_ffi_call=yes -else $as_nop - ac_cv_lib_ffi_ffi_call=no +else case e in #( + e) ac_cv_lib_ffi_ffi_call=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5 printf "%s\n" "$ac_cv_lib_ffi_ffi_call" >&6; } @@ -14114,7 +14637,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libffi" >&5 printf %s "checking for libffi... " >&6; } -if test -n "$LIBFFI_CFLAGS"; then +if test "x$pkg_check_module_LIBFFI" != "xno"; then + if test -n "$LIBFFI_CFLAGS"; then pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -14131,7 +14655,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBFFI_LIBS"; then + if test -n "$LIBFFI_LIBS"; then pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -14148,6 +14672,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -14186,16 +14713,22 @@ printf %s "checking for ffi_call in -lffi... " >&6; } if test ${ac_cv_lib_ffi_ffi_call+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lffi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char ffi_call (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char ffi_call (void); int main (void) { @@ -14207,12 +14740,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ffi_ffi_call=yes -else $as_nop - ac_cv_lib_ffi_ffi_call=no +else case e in #( + e) ac_cv_lib_ffi_ffi_call=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5 printf "%s\n" "$ac_cv_lib_ffi_ffi_call" >&6; } @@ -14223,8 +14758,9 @@ then : LIBFFI_CFLAGS=${LIBFFI_CFLAGS-""} LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"} -else $as_nop - have_libffi=no +else case e in #( + e) have_libffi=no ;; +esac fi @@ -14259,16 +14795,22 @@ printf %s "checking for ffi_call in -lffi... " >&6; } if test ${ac_cv_lib_ffi_ffi_call+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lffi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char ffi_call (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char ffi_call (void); int main (void) { @@ -14280,12 +14822,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ffi_ffi_call=yes -else $as_nop - ac_cv_lib_ffi_ffi_call=no +else case e in #( + e) ac_cv_lib_ffi_ffi_call=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ffi_ffi_call" >&5 printf "%s\n" "$ac_cv_lib_ffi_ffi_call" >&6; } @@ -14296,8 +14840,9 @@ then : LIBFFI_CFLAGS=${LIBFFI_CFLAGS-""} LIBFFI_LIBS=${LIBFFI_LIBS-"-lffi"} -else $as_nop - have_libffi=no +else case e in #( + e) have_libffi=no ;; +esac fi @@ -14366,8 +14911,8 @@ printf %s "checking for ffi_prep_cif_var... " >&6; } if test ${ac_cv_func_ffi_prep_cif_var+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -14381,11 +14926,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_ffi_prep_cif_var=yes -else $as_nop - ac_cv_func_ffi_prep_cif_var=no +else case e in #( + e) ac_cv_func_ffi_prep_cif_var=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ffi_prep_cif_var" >&5 printf "%s\n" "$ac_cv_func_ffi_prep_cif_var" >&6; } @@ -14405,8 +14952,8 @@ printf %s "checking for ffi_prep_closure_loc... " >&6; } if test ${ac_cv_func_ffi_prep_closure_loc+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -14420,11 +14967,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_ffi_prep_closure_loc=yes -else $as_nop - ac_cv_func_ffi_prep_closure_loc=no +else case e in #( + e) ac_cv_func_ffi_prep_closure_loc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ffi_prep_closure_loc" >&5 printf "%s\n" "$ac_cv_func_ffi_prep_closure_loc" >&6; } @@ -14444,8 +14993,8 @@ printf %s "checking for ffi_closure_alloc... " >&6; } if test ${ac_cv_func_ffi_closure_alloc+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -14459,11 +15008,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_ffi_closure_alloc=yes -else $as_nop - ac_cv_func_ffi_closure_alloc=no +else case e in #( + e) ac_cv_func_ffi_closure_alloc=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ffi_closure_alloc" >&5 printf "%s\n" "$ac_cv_func_ffi_closure_alloc" >&6; } @@ -14494,8 +15045,9 @@ printf %s "checking for --with-system-libmpdec... " >&6; } if test ${with_system_libmpdec+y} then : withval=$with_system_libmpdec; -else $as_nop - with_system_libmpdec="no" +else case e in #( + e) with_system_libmpdec="no" ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5 @@ -14508,8 +15060,8 @@ then : LIBMPDEC_LDFLAGS=${LIBMPDEC_LDFLAGS-"-lmpdec"} LIBMPDEC_INTERNAL= -else $as_nop - +else case e in #( + e) LIBMPDEC_CFLAGS="-I\$(srcdir)/Modules/_decimal/libmpdec" LIBMPDEC_LDFLAGS="-lm \$(LIBMPDEC_A)" LIBMPDEC_INTERNAL="\$(LIBMPDEC_HEADERS) \$(LIBMPDEC_A)" @@ -14520,7 +15072,8 @@ then : as_fn_append LIBMPDEC_CFLAGS " -DTEST_COVERAGE" fi - + ;; +esac fi @@ -14534,8 +15087,9 @@ printf %s "checking for --with-decimal-contextvar... " >&6; } if test ${with_decimal_contextvar+y} then : withval=$with_decimal_contextvar; -else $as_nop - with_decimal_contextvar="yes" +else case e in #( + e) with_decimal_contextvar="yes" ;; +esac fi @@ -14632,7 +15186,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5 printf %s "checking for libnsl... " >&6; } -if test -n "$LIBNSL_CFLAGS"; then +if test "x$pkg_check_module_LIBNSL" != "xno"; then + if test -n "$LIBNSL_CFLAGS"; then pkg_cv_LIBNSL_CFLAGS="$LIBNSL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -14649,7 +15204,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBNSL_LIBS"; then + if test -n "$LIBNSL_LIBS"; then pkg_cv_LIBNSL_LIBS="$LIBNSL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -14666,6 +15221,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -14699,15 +15257,21 @@ printf %s "checking for library containing yp_match... " >&6; } if test ${ac_cv_search_yp_match+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char yp_match (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char yp_match (void); int main (void) { @@ -14738,11 +15302,13 @@ done if test ${ac_cv_search_yp_match+y} then : -else $as_nop - ac_cv_search_yp_match=no +else case e in #( + e) ac_cv_search_yp_match=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_match" >&5 printf "%s\n" "$ac_cv_search_yp_match" >&6; } @@ -14751,8 +15317,9 @@ if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_nis=yes -else $as_nop - have_nis=no +else case e in #( + e) have_nis=no ;; +esac fi @@ -14789,15 +15356,21 @@ printf %s "checking for library containing yp_match... " >&6; } if test ${ac_cv_search_yp_match+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char yp_match (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char yp_match (void); int main (void) { @@ -14828,11 +15401,13 @@ done if test ${ac_cv_search_yp_match+y} then : -else $as_nop - ac_cv_search_yp_match=no +else case e in #( + e) ac_cv_search_yp_match=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yp_match" >&5 printf "%s\n" "$ac_cv_search_yp_match" >&6; } @@ -14841,8 +15416,9 @@ if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_nis=yes -else $as_nop - have_nis=no +else case e in #( + e) have_nis=no ;; +esac fi @@ -14925,7 +15501,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3 >= 3.7.15" >&5 printf %s "checking for sqlite3 >= 3.7.15... " >&6; } -if test -n "$LIBSQLITE3_CFLAGS"; then +if test "x$pkg_check_module_LIBSQLITE3" != "xno"; then + if test -n "$LIBSQLITE3_CFLAGS"; then pkg_cv_LIBSQLITE3_CFLAGS="$LIBSQLITE3_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -14942,7 +15519,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBSQLITE3_LIBS"; then + if test -n "$LIBSQLITE3_LIBS"; then pkg_cv_LIBSQLITE3_LIBS="$LIBSQLITE3_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -14959,6 +15536,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -15046,16 +15626,22 @@ printf %s "checking for sqlite3_bind_double in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_bind_double+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_bind_double (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_bind_double (void); int main (void) { @@ -15067,12 +15653,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_bind_double=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_bind_double=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_bind_double=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_bind_double" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_bind_double" >&6; } @@ -15082,10 +15670,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15095,16 +15684,22 @@ printf %s "checking for sqlite3_column_decltype in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_column_decltype+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_column_decltype (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_column_decltype (void); int main (void) { @@ -15116,12 +15711,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_column_decltype=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_column_decltype=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_column_decltype=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_column_decltype" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_column_decltype" >&6; } @@ -15131,10 +15728,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15144,16 +15742,22 @@ printf %s "checking for sqlite3_column_double in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_column_double+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_column_double (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_column_double (void); int main (void) { @@ -15165,12 +15769,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_column_double=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_column_double=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_column_double=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_column_double" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_column_double" >&6; } @@ -15180,10 +15786,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15193,16 +15800,22 @@ printf %s "checking for sqlite3_complete in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_complete+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_complete (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_complete (void); int main (void) { @@ -15214,12 +15827,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_complete=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_complete=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_complete=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_complete" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_complete" >&6; } @@ -15229,10 +15844,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15242,16 +15858,22 @@ printf %s "checking for sqlite3_progress_handler in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_progress_handler+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_progress_handler (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_progress_handler (void); int main (void) { @@ -15263,12 +15885,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_progress_handler=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_progress_handler=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_progress_handler=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_progress_handler" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_progress_handler" >&6; } @@ -15278,10 +15902,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15291,16 +15916,22 @@ printf %s "checking for sqlite3_result_double in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_result_double+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_result_double (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_result_double (void); int main (void) { @@ -15312,12 +15943,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_result_double=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_result_double=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_result_double=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_result_double" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_result_double" >&6; } @@ -15327,10 +15960,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15340,16 +15974,22 @@ printf %s "checking for sqlite3_set_authorizer in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_set_authorizer+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_set_authorizer (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_set_authorizer (void); int main (void) { @@ -15361,12 +16001,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_set_authorizer=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_set_authorizer=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_set_authorizer=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_set_authorizer" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_set_authorizer" >&6; } @@ -15376,10 +16018,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15389,16 +16032,22 @@ printf %s "checking for sqlite3_trace_v2 in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_trace_v2+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_trace_v2 (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_trace_v2 (void); int main (void) { @@ -15410,12 +16059,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_trace_v2=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_trace_v2=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_trace_v2=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_trace_v2" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_trace_v2" >&6; } @@ -15425,8 +16076,8 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_trace in -lsqlite3" >&5 @@ -15434,16 +16085,22 @@ printf %s "checking for sqlite3_trace in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_trace+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_trace (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_trace (void); int main (void) { @@ -15455,12 +16112,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_trace=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_trace=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_trace=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_trace" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_trace" >&6; } @@ -15470,15 +16129,17 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi - + ;; +esac fi @@ -15488,16 +16149,22 @@ printf %s "checking for sqlite3_value_double in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_value_double+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_value_double (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_value_double (void); int main (void) { @@ -15509,12 +16176,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_value_double=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_value_double=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_value_double=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_value_double" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_value_double" >&6; } @@ -15524,10 +16193,11 @@ then : LIBS="-lsqlite3 $LIBS" -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi @@ -15536,16 +16206,22 @@ printf %s "checking for sqlite3_load_extension in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_load_extension+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_load_extension (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_load_extension (void); int main (void) { @@ -15557,21 +16233,24 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_load_extension=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_load_extension=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_load_extension=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_load_extension" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_load_extension" >&6; } if test "x$ac_cv_lib_sqlite3_sqlite3_load_extension" = xyes then : have_sqlite3_load_extension=yes -else $as_nop - have_sqlite3_load_extension=no - +else case e in #( + e) have_sqlite3_load_extension=no + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sqlite3_serialize in -lsqlite3" >&5 @@ -15579,16 +16258,22 @@ printf %s "checking for sqlite3_serialize in -lsqlite3... " >&6; } if test ${ac_cv_lib_sqlite3_sqlite3_serialize+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lsqlite3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char sqlite3_serialize (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_serialize (void); int main (void) { @@ -15600,12 +16285,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sqlite3_sqlite3_serialize=yes -else $as_nop - ac_cv_lib_sqlite3_sqlite3_serialize=no +else case e in #( + e) ac_cv_lib_sqlite3_sqlite3_serialize=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_serialize" >&5 printf "%s\n" "$ac_cv_lib_sqlite3_sqlite3_serialize" >&6; } @@ -15619,10 +16306,11 @@ printf "%s\n" "#define PY_SQLITE_HAVE_SERIALIZE 1" >>confdefs.h fi -else $as_nop - +else case e in #( + e) have_supported_sqlite3=no - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -15650,22 +16338,24 @@ printf "%s\n" "n/a" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your version of SQLite does not support loadable extensions" >&5 printf "%s\n" "$as_me: WARNING: Your version of SQLite does not support loadable extensions" >&2;} -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define PY_SQLITE_ENABLE_LOAD_EXTENSION 1" >>confdefs.h - + ;; +esac fi -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi @@ -15689,7 +16379,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $_QUERY" >&5 printf %s "checking for $_QUERY... " >&6; } -if test -n "$TCLTK_CFLAGS"; then +if test "x$pkg_check_module_TCLTK" != "xno"; then + if test -n "$TCLTK_CFLAGS"; then pkg_cv_TCLTK_CFLAGS="$TCLTK_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -15706,7 +16397,7 @@ fi else pkg_failed=untried fi -if test -n "$TCLTK_LIBS"; then + if test -n "$TCLTK_LIBS"; then pkg_cv_TCLTK_LIBS="$TCLTK_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -15723,6 +16414,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -15786,7 +16480,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for x11" >&5 printf %s "checking for x11... " >&6; } -if test -n "$X11_CFLAGS"; then +if test "x$pkg_check_module_X11" != "xno"; then + if test -n "$X11_CFLAGS"; then pkg_cv_X11_CFLAGS="$X11_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -15803,7 +16498,7 @@ fi else pkg_failed=untried fi -if test -n "$X11_LIBS"; then + if test -n "$X11_LIBS"; then pkg_cv_X11_LIBS="$X11_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -15820,6 +16515,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -15853,8 +16551,8 @@ See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -15864,7 +16562,7 @@ and X11_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else X11_CFLAGS=$pkg_cv_X11_CFLAGS X11_LIBS=$pkg_cv_X11_LIBS @@ -15932,10 +16630,11 @@ then : have_tcltk=yes as_fn_append TCLTK_CFLAGS " -Wno-strict-prototypes -DWITH_APPINIT=1" -else $as_nop - +else case e in #( + e) have_tcltk=no - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -15969,16 +16668,22 @@ printf %s "checking for gdbm_open in -lgdbm... " >&6; } if test ${ac_cv_lib_gdbm_gdbm_open+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lgdbm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char gdbm_open (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char gdbm_open (void); int main (void) { @@ -15990,12 +16695,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_gdbm_gdbm_open=yes -else $as_nop - ac_cv_lib_gdbm_gdbm_open=no +else case e in #( + e) ac_cv_lib_gdbm_gdbm_open=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gdbm_gdbm_open" >&5 printf "%s\n" "$ac_cv_lib_gdbm_gdbm_open" >&6; } @@ -16005,13 +16712,15 @@ then : have_gdbm=yes GDBM_LIBS=${GDBM_LIBS-"-lgdbm"} -else $as_nop - have_gdbm=no +else case e in #( + e) have_gdbm=no ;; +esac fi -else $as_nop - have_gdbm=no +else case e in #( + e) have_gdbm=no ;; +esac fi done @@ -16041,15 +16750,21 @@ printf %s "checking for library containing dbm_open... " >&6; } if test ${ac_cv_search_dbm_open+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dbm_open (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (void); int main (void) { @@ -16080,11 +16795,13 @@ done if test ${ac_cv_search_dbm_open+y} then : -else $as_nop - ac_cv_search_dbm_open=no +else case e in #( + e) ac_cv_search_dbm_open=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5 printf "%s\n" "$ac_cv_search_dbm_open" >&6; } @@ -16133,18 +16850,20 @@ printf "%s\n" "$have_ndbm ($dbm_ndbm)" >&6; } if test ${ac_cv_header_gdbm_slash_ndbm_h+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ac_fn_c_check_header_compile "$LINENO" "gdbm/ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" if test "x$ac_cv_header_gdbm_ndbm_h" = xyes then : ac_cv_header_gdbm_slash_ndbm_h=yes -else $as_nop - ac_cv_header_gdbm_slash_ndbm_h=no - +else case e in #( + e) ac_cv_header_gdbm_slash_ndbm_h=no + ;; +esac fi - + ;; +esac fi if test "x$ac_cv_header_gdbm_slash_ndbm_h" = xyes @@ -16160,18 +16879,20 @@ fi if test ${ac_cv_header_gdbm_dash_ndbm_h+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ac_fn_c_check_header_compile "$LINENO" "gdbm-ndbm.h" "ac_cv_header_gdbm_ndbm_h" "$ac_includes_default" if test "x$ac_cv_header_gdbm_ndbm_h" = xyes then : ac_cv_header_gdbm_dash_ndbm_h=yes -else $as_nop - ac_cv_header_gdbm_dash_ndbm_h=no - +else case e in #( + e) ac_cv_header_gdbm_dash_ndbm_h=no + ;; +esac fi - + ;; +esac fi if test "x$ac_cv_header_gdbm_dash_ndbm_h" = xyes @@ -16197,15 +16918,21 @@ printf %s "checking for library containing dbm_open... " >&6; } if test ${ac_cv_search_dbm_open+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char dbm_open (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char dbm_open (void); int main (void) { @@ -16236,11 +16963,13 @@ done if test ${ac_cv_search_dbm_open+y} then : -else $as_nop - ac_cv_search_dbm_open=no +else case e in #( + e) ac_cv_search_dbm_open=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dbm_open" >&5 printf "%s\n" "$ac_cv_search_dbm_open" >&6; } @@ -16249,8 +16978,9 @@ if test "$ac_res" != no then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_gdbm_compat=yes -else $as_nop - have_gdbm_compat=no +else case e in #( + e) have_gdbm_compat=no ;; +esac fi @@ -16276,8 +17006,8 @@ printf %s "checking for libdb... " >&6; } if test ${ac_cv_have_libdb+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) save_CFLAGS=$CFLAGS save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS @@ -16306,8 +17036,9 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_have_libdb=yes -else $as_nop - ac_cv_have_libdb=no +else case e in #( + e) ac_cv_have_libdb=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -16318,7 +17049,8 @@ LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_libdb" >&5 printf "%s\n" "$ac_cv_have_libdb" >&6; } @@ -16343,8 +17075,9 @@ printf %s "checking for --with-dbmliborder... " >&6; } if test ${with_dbmliborder+y} then : withval=$with_dbmliborder; -else $as_nop - with_dbmliborder=gdbm:ndbm:bdb +else case e in #( + e) with_dbmliborder=gdbm:ndbm:bdb ;; +esac fi @@ -16465,11 +17198,12 @@ yes _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : unistd_defines_pthreads=yes -else $as_nop - unistd_defines_pthreads=no +else case e in #( + e) unistd_defines_pthreads=no ;; +esac fi rm -rf conftest* @@ -16509,8 +17243,8 @@ then : printf "%s\n" "yes" >&6; } posix_threads=yes -else $as_nop - +else case e in #( + e) LIBS=$_libs ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach" if test "x$ac_cv_func_pthread_detach" = xyes @@ -16518,23 +17252,29 @@ then : posix_threads=yes -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 printf %s "checking for pthread_create in -lpthreads... " >&6; } if test ${ac_cv_lib_pthreads_pthread_create+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpthreads $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char pthread_create (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (void); int main (void) { @@ -16546,12 +17286,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthreads_pthread_create=yes -else $as_nop - ac_cv_lib_pthreads_pthread_create=no +else case e in #( + e) ac_cv_lib_pthreads_pthread_create=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; } @@ -16561,23 +17303,29 @@ then : posix_threads=yes LIBS="$LIBS -lpthreads" -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 printf %s "checking for pthread_create in -lc_r... " >&6; } if test ${ac_cv_lib_c_r_pthread_create+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char pthread_create (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (void); int main (void) { @@ -16589,12 +17337,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_c_r_pthread_create=yes -else $as_nop - ac_cv_lib_c_r_pthread_create=no +else case e in #( + e) ac_cv_lib_c_r_pthread_create=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 printf "%s\n" "$ac_cv_lib_c_r_pthread_create" >&6; } @@ -16604,23 +17354,29 @@ then : posix_threads=yes LIBS="$LIBS -lc_r" -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5 printf %s "checking for __pthread_create_system in -lpthread... " >&6; } if test ${ac_cv_lib_pthread___pthread_create_system+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char __pthread_create_system (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char __pthread_create_system (void); int main (void) { @@ -16632,12 +17388,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread___pthread_create_system=yes -else $as_nop - ac_cv_lib_pthread___pthread_create_system=no +else case e in #( + e) ac_cv_lib_pthread___pthread_create_system=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5 printf "%s\n" "$ac_cv_lib_pthread___pthread_create_system" >&6; } @@ -16647,23 +17405,29 @@ then : posix_threads=yes LIBS="$LIBS -lpthread" -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5 printf %s "checking for pthread_create in -lcma... " >&6; } if test ${ac_cv_lib_cma_pthread_create+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lcma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char pthread_create (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char pthread_create (void); int main (void) { @@ -16675,12 +17439,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_cma_pthread_create=yes -else $as_nop - ac_cv_lib_cma_pthread_create=no +else case e in #( + e) ac_cv_lib_cma_pthread_create=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5 printf "%s\n" "$ac_cv_lib_cma_pthread_create" >&6; } @@ -16690,8 +17456,8 @@ then : posix_threads=yes LIBS="$LIBS -lcma" -else $as_nop - +else case e in #( + e) case $ac_sys_system in #( WASI) : posix_threads=stub ;; #( @@ -16699,17 +17465,23 @@ else $as_nop as_fn_error $? "could not find pthreads on your system" "$LINENO" 5 ;; esac - + ;; +esac fi - + ;; +esac fi - + ;; +esac fi - + ;; +esac fi - + ;; +esac fi - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -16719,16 +17491,22 @@ printf %s "checking for usconfig in -lmpc... " >&6; } if test ${ac_cv_lib_mpc_usconfig+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lmpc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char usconfig (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char usconfig (void); int main (void) { @@ -16740,12 +17518,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_mpc_usconfig=yes -else $as_nop - ac_cv_lib_mpc_usconfig=no +else case e in #( + e) ac_cv_lib_mpc_usconfig=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5 printf "%s\n" "$ac_cv_lib_mpc_usconfig" >&6; } @@ -16791,12 +17571,12 @@ printf %s "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; } if test ${ac_cv_pthread_system_supported+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_pthread_system_supported=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -16816,14 +17596,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_pthread_system_supported=yes -else $as_nop - ac_cv_pthread_system_supported=no +else case e in #( + e) ac_cv_pthread_system_supported=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5 printf "%s\n" "$ac_cv_pthread_system_supported" >&6; } @@ -16887,8 +17670,8 @@ printf "%s\n" "yes" >&6; } ipv6=yes ;; esac -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* AF_INET6 available check */ @@ -16907,10 +17690,11 @@ then : ipv6=yes -else $as_nop - +else case e in #( + e) ipv6=no - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext @@ -16950,12 +17734,13 @@ then : printf "%s\n" "yes" >&6; } ipv6=yes -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ipv6=no - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -16964,7 +17749,8 @@ if test "$ipv6" = "yes"; then printf "%s\n" "#define ENABLE_IPV6 1" >>confdefs.h fi - + ;; +esac fi @@ -16988,7 +17774,7 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : ipv6type=$i fi @@ -17005,7 +17791,7 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : ipv6type=$i; ipv6lib=inet6 @@ -17025,7 +17811,7 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : ipv6type=$i; ipv6trylibc=yes @@ -17059,7 +17845,7 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : ipv6type=$i; ipv6lib=inet6; @@ -17078,7 +17864,7 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : ipv6type=$i; ipv6lib=v6; @@ -17098,7 +17884,7 @@ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1 + $EGREP_TRADITIONAL "yes" >/dev/null 2>&1 then : ipv6type=$i; ipv6lib=inet6; @@ -17128,10 +17914,11 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: using libc" >&5 printf "%s\n" "$as_me: using libc" >&6;} -else $as_nop - +else case e in #( + e) as_fn_error $? "No $ipv6lib library found; cannot continue. You need to fetch lib$ipv6lib.a from appropriate ipv6 kit and compile beforehand." "$LINENO" 5 - + ;; +esac fi fi fi @@ -17142,8 +17929,8 @@ printf %s "checking CAN_RAW_FD_FRAMES... " >&6; } if test ${ac_cv_can_raw_fd_frames+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* CAN_RAW_FD_FRAMES available check */ @@ -17159,11 +17946,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_can_raw_fd_frames=yes -else $as_nop - ac_cv_can_raw_fd_frames=no +else case e in #( + e) ac_cv_can_raw_fd_frames=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_fd_frames" >&5 printf "%s\n" "$ac_cv_can_raw_fd_frames" >&6; } @@ -17181,8 +17970,8 @@ printf %s "checking for CAN_RAW_JOIN_FILTERS... " >&6; } if test ${ac_cv_can_raw_join_filters+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -17198,11 +17987,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_can_raw_join_filters=yes -else $as_nop - ac_cv_can_raw_join_filters=no +else case e in #( + e) ac_cv_can_raw_join_filters=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_can_raw_join_filters" >&5 printf "%s\n" "$ac_cv_can_raw_join_filters" >&6; } @@ -17327,9 +18118,10 @@ printf %s "checking for --with-valgrind... " >&6; } if test ${with_valgrind+y} then : withval=$with_valgrind; -else $as_nop - with_valgrind=no - +else case e in #( + e) with_valgrind=no + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5 @@ -17341,9 +18133,10 @@ then : printf "%s\n" "#define WITH_VALGRIND 1" >>confdefs.h -else $as_nop - as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 - +else case e in #( + e) as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5 + ;; +esac fi OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" @@ -17357,8 +18150,9 @@ printf %s "checking for --with-dtrace... " >&6; } if test ${with_dtrace+y} then : withval=$with_dtrace; -else $as_nop - with_dtrace=no +else case e in #( + e) with_dtrace=no ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5 @@ -17381,8 +18175,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_DTRACE+y} then : printf %s "(cached) " >&6 -else $as_nop - case $DTRACE in +else case e in #( + e) case $DTRACE in [\\/]* | ?:[\\/]*) ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path. ;; @@ -17408,6 +18202,7 @@ IFS=$as_save_IFS test -z "$ac_cv_path_DTRACE" && ac_cv_path_DTRACE="not found" ;; +esac ;; esac fi DTRACE=$ac_cv_path_DTRACE @@ -17437,12 +18232,13 @@ printf %s "checking whether DTrace probes require linking... " >&6; } if test ${ac_cv_dtrace_link+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_dtrace_link=no +else case e in #( + e) ac_cv_dtrace_link=no echo 'BEGIN{}' > conftest.d "$DTRACE" $DFLAGS -G -s conftest.d -o conftest.o > /dev/null 2>&1 && \ ac_cv_dtrace_link=yes - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dtrace_link" >&5 printf "%s\n" "$ac_cv_dtrace_link" >&6; } @@ -18652,8 +19448,8 @@ printf %s "checking for $CC options needed to detect all undeclared functions... if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_save_CFLAGS=$CFLAGS +else case e in #( + e) ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" @@ -18672,8 +19468,8 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : -else $as_nop - # This test program should compile successfully. +else case e in #( + e) # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the @@ -18701,26 +19497,29 @@ then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' -else $as_nop - ac_cv_c_undeclared_builtin_options=$ac_arg +else case e in #( + e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; +esac fi break fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins -See \`config.log' for more details" "$LINENO" 5; } ;; #( +See 'config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : @@ -18746,8 +19545,8 @@ printf %s "checking for chroot... " >&6; } if test ${ac_cv_func_chroot+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -18761,11 +19560,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_chroot=yes -else $as_nop - ac_cv_func_chroot=no +else case e in #( + e) ac_cv_func_chroot=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chroot" >&5 printf "%s\n" "$ac_cv_func_chroot" >&6; } @@ -18785,8 +19586,8 @@ printf %s "checking for link... " >&6; } if test ${ac_cv_func_link+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -18800,11 +19601,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_link=yes -else $as_nop - ac_cv_func_link=no +else case e in #( + e) ac_cv_func_link=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_link" >&5 printf "%s\n" "$ac_cv_func_link" >&6; } @@ -18824,8 +19627,8 @@ printf %s "checking for symlink... " >&6; } if test ${ac_cv_func_symlink+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -18839,11 +19642,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_symlink=yes -else $as_nop - ac_cv_func_symlink=no +else case e in #( + e) ac_cv_func_symlink=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_symlink" >&5 printf "%s\n" "$ac_cv_func_symlink" >&6; } @@ -18863,8 +19668,8 @@ printf %s "checking for fchdir... " >&6; } if test ${ac_cv_func_fchdir+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -18878,11 +19683,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_fchdir=yes -else $as_nop - ac_cv_func_fchdir=no +else case e in #( + e) ac_cv_func_fchdir=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fchdir" >&5 printf "%s\n" "$ac_cv_func_fchdir" >&6; } @@ -18902,8 +19709,8 @@ printf %s "checking for fsync... " >&6; } if test ${ac_cv_func_fsync+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -18917,11 +19724,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_fsync=yes -else $as_nop - ac_cv_func_fsync=no +else case e in #( + e) ac_cv_func_fsync=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fsync" >&5 printf "%s\n" "$ac_cv_func_fsync" >&6; } @@ -18941,8 +19750,8 @@ printf %s "checking for fdatasync... " >&6; } if test ${ac_cv_func_fdatasync+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -18956,11 +19765,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_fdatasync=yes -else $as_nop - ac_cv_func_fdatasync=no +else case e in #( + e) ac_cv_func_fdatasync=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fdatasync" >&5 printf "%s\n" "$ac_cv_func_fdatasync" >&6; } @@ -18980,8 +19791,8 @@ printf %s "checking for epoll_create... " >&6; } if test ${ac_cv_func_epoll_create+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -18995,11 +19806,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_epoll_create=yes -else $as_nop - ac_cv_func_epoll_create=no +else case e in #( + e) ac_cv_func_epoll_create=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create" >&5 printf "%s\n" "$ac_cv_func_epoll_create" >&6; } @@ -19019,8 +19832,8 @@ printf %s "checking for epoll_create1... " >&6; } if test ${ac_cv_func_epoll_create1+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19034,11 +19847,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_epoll_create1=yes -else $as_nop - ac_cv_func_epoll_create1=no +else case e in #( + e) ac_cv_func_epoll_create1=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_epoll_create1" >&5 printf "%s\n" "$ac_cv_func_epoll_create1" >&6; } @@ -19058,8 +19873,8 @@ printf %s "checking for kqueue... " >&6; } if test ${ac_cv_func_kqueue+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19076,11 +19891,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_kqueue=yes -else $as_nop - ac_cv_func_kqueue=no +else case e in #( + e) ac_cv_func_kqueue=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_kqueue" >&5 printf "%s\n" "$ac_cv_func_kqueue" >&6; } @@ -19100,8 +19917,8 @@ printf %s "checking for prlimit... " >&6; } if test ${ac_cv_func_prlimit+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19118,11 +19935,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_prlimit=yes -else $as_nop - ac_cv_func_prlimit=no +else case e in #( + e) ac_cv_func_prlimit=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_prlimit" >&5 printf "%s\n" "$ac_cv_func_prlimit" >&6; } @@ -19143,8 +19962,8 @@ printf %s "checking for _dyld_shared_cache_contains_path... " >&6; } if test ${ac_cv_func__dyld_shared_cache_contains_path+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19158,11 +19977,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func__dyld_shared_cache_contains_path=yes -else $as_nop - ac_cv_func__dyld_shared_cache_contains_path=no +else case e in #( + e) ac_cv_func__dyld_shared_cache_contains_path=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func__dyld_shared_cache_contains_path" >&5 printf "%s\n" "$ac_cv_func__dyld_shared_cache_contains_path" >&6; } @@ -19183,8 +20004,8 @@ printf %s "checking for memfd_create... " >&6; } if test ${ac_cv_func_memfd_create+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_MMAN_H @@ -19205,11 +20026,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_memfd_create=yes -else $as_nop - ac_cv_func_memfd_create=no +else case e in #( + e) ac_cv_func_memfd_create=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memfd_create" >&5 printf "%s\n" "$ac_cv_func_memfd_create" >&6; } @@ -19230,8 +20053,8 @@ printf %s "checking for eventfd... " >&6; } if test ${ac_cv_func_eventfd+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_EVENTFD_H @@ -19249,11 +20072,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_eventfd=yes -else $as_nop - ac_cv_func_eventfd=no +else case e in #( + e) ac_cv_func_eventfd=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_eventfd" >&5 printf "%s\n" "$ac_cv_func_eventfd" >&6; } @@ -19280,8 +20105,8 @@ printf %s "checking for ctermid_r... " >&6; } if test ${ac_cv_func_ctermid_r+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19295,11 +20120,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_ctermid_r=yes -else $as_nop - ac_cv_func_ctermid_r=no +else case e in #( + e) ac_cv_func_ctermid_r=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_ctermid_r" >&5 printf "%s\n" "$ac_cv_func_ctermid_r" >&6; } @@ -19318,8 +20145,8 @@ printf %s "checking for flock declaration... " >&6; } if test ${ac_cv_flock_decl+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19334,12 +20161,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_flock_decl=yes -else $as_nop - ac_cv_flock_decl=no - +else case e in #( + e) ac_cv_flock_decl=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5 printf "%s\n" "$ac_cv_flock_decl" >&6; } @@ -19353,22 +20182,28 @@ if test "x$ac_cv_func_flock" = xyes then : printf "%s\n" "#define HAVE_FLOCK 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5 printf %s "checking for flock in -lbsd... " >&6; } if test ${ac_cv_lib_bsd_flock+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char flock (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char flock (void); int main (void) { @@ -19380,12 +20215,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bsd_flock=yes -else $as_nop - ac_cv_lib_bsd_flock=no +else case e in #( + e) ac_cv_lib_bsd_flock=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5 printf "%s\n" "$ac_cv_lib_bsd_flock" >&6; } @@ -19393,7 +20230,8 @@ if test "x$ac_cv_lib_bsd_flock" = xyes then : FCNTL_LIBS="-lbsd" fi - + ;; +esac fi done @@ -19406,8 +20244,8 @@ printf %s "checking for getpagesize... " >&6; } if test ${ac_cv_func_getpagesize+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19421,11 +20259,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_getpagesize=yes -else $as_nop - ac_cv_func_getpagesize=no +else case e in #( + e) ac_cv_func_getpagesize=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpagesize" >&5 printf "%s\n" "$ac_cv_func_getpagesize" >&6; } @@ -19444,8 +20284,8 @@ printf %s "checking for broken unsetenv... " >&6; } if test ${ac_cv_broken_unsetenv+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -19459,12 +20299,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_broken_unsetenv=no -else $as_nop - ac_cv_broken_unsetenv=yes - +else case e in #( + e) ac_cv_broken_unsetenv=yes + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_unsetenv" >&5 printf "%s\n" "$ac_cv_broken_unsetenv" >&6; } @@ -19486,8 +20328,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_TRUE+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$TRUE"; then +else case e in #( + e) if test -n "$TRUE"; then ac_cv_prog_TRUE="$TRUE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -19509,7 +20351,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi TRUE=$ac_cv_prog_TRUE if test -n "$TRUE"; then @@ -19531,16 +20374,22 @@ printf %s "checking for inet_aton in -lc... " >&6; } if test ${ac_cv_lib_c_inet_aton+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char inet_aton (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char inet_aton (void); int main (void) { @@ -19552,34 +20401,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_c_inet_aton=yes -else $as_nop - ac_cv_lib_c_inet_aton=no +else case e in #( + e) ac_cv_lib_c_inet_aton=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5 printf "%s\n" "$ac_cv_lib_c_inet_aton" >&6; } if test "x$ac_cv_lib_c_inet_aton" = xyes then : $ac_cv_prog_TRUE -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5 printf %s "checking for inet_aton in -lresolv... " >&6; } if test ${ac_cv_lib_resolv_inet_aton+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char inet_aton (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char inet_aton (void); int main (void) { @@ -19591,12 +20448,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_resolv_inet_aton=yes -else $as_nop - ac_cv_lib_resolv_inet_aton=no +else case e in #( + e) ac_cv_lib_resolv_inet_aton=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5 printf "%s\n" "$ac_cv_lib_resolv_inet_aton" >&6; } @@ -19608,7 +20467,8 @@ then : fi - + ;; +esac fi @@ -19619,12 +20479,12 @@ printf %s "checking for chflags... " >&6; } if test ${ac_cv_have_chflags+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_have_chflags=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19640,14 +20500,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_have_chflags=yes -else $as_nop - ac_cv_have_chflags=no +else case e in #( + e) ac_cv_have_chflags=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5 printf "%s\n" "$ac_cv_have_chflags" >&6; } @@ -19656,8 +20519,9 @@ if test "$ac_cv_have_chflags" = cross ; then if test "x$ac_cv_func_chflags" = xyes then : ac_cv_have_chflags="yes" -else $as_nop - ac_cv_have_chflags="no" +else case e in #( + e) ac_cv_have_chflags="no" ;; +esac fi fi @@ -19672,12 +20536,12 @@ printf %s "checking for lchflags... " >&6; } if test ${ac_cv_have_lchflags+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_have_lchflags=cross -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -19693,14 +20557,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_have_lchflags=yes -else $as_nop - ac_cv_have_lchflags=no +else case e in #( + e) ac_cv_have_lchflags=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5 printf "%s\n" "$ac_cv_have_lchflags" >&6; } @@ -19709,8 +20576,9 @@ if test "$ac_cv_have_lchflags" = cross ; then if test "x$ac_cv_func_lchflags" = xyes then : ac_cv_have_lchflags="yes" -else $as_nop - ac_cv_have_lchflags="no" +else case e in #( + e) ac_cv_have_lchflags="no" ;; +esac fi fi @@ -19741,7 +20609,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib >= 1.2.0" >&5 printf %s "checking for zlib >= 1.2.0... " >&6; } -if test -n "$ZLIB_CFLAGS"; then +if test "x$pkg_check_module_ZLIB" != "xno"; then + if test -n "$ZLIB_CFLAGS"; then pkg_cv_ZLIB_CFLAGS="$ZLIB_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -19758,7 +20627,7 @@ fi else pkg_failed=untried fi -if test -n "$ZLIB_LIBS"; then + if test -n "$ZLIB_LIBS"; then pkg_cv_ZLIB_LIBS="$ZLIB_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -19775,6 +20644,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -19817,16 +20689,22 @@ printf %s "checking for gzread in -lz... " >&6; } if test ${ac_cv_lib_z_gzread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char gzread (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char gzread (void); int main (void) { @@ -19838,27 +20716,31 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_z_gzread=yes -else $as_nop - ac_cv_lib_z_gzread=no +else case e in #( + e) ac_cv_lib_z_gzread=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 printf "%s\n" "$ac_cv_lib_z_gzread" >&6; } if test "x$ac_cv_lib_z_gzread" = xyes then : have_zlib=yes -else $as_nop - have_zlib=no +else case e in #( + e) have_zlib=no ;; +esac fi LIBS=$py_check_lib_save_LIBS -else $as_nop - have_zlib=no +else case e in #( + e) have_zlib=no ;; +esac fi done @@ -19873,16 +20755,22 @@ printf %s "checking for inflateCopy in -lz... " >&6; } if test ${ac_cv_lib_z_inflateCopy+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char inflateCopy (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char inflateCopy (void); int main (void) { @@ -19894,12 +20782,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_z_inflateCopy=yes -else $as_nop - ac_cv_lib_z_inflateCopy=no +else case e in #( + e) ac_cv_lib_z_inflateCopy=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; } @@ -19946,16 +20836,22 @@ printf %s "checking for gzread in -lz... " >&6; } if test ${ac_cv_lib_z_gzread+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char gzread (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char gzread (void); int main (void) { @@ -19967,27 +20863,31 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_z_gzread=yes -else $as_nop - ac_cv_lib_z_gzread=no +else case e in #( + e) ac_cv_lib_z_gzread=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_gzread" >&5 printf "%s\n" "$ac_cv_lib_z_gzread" >&6; } if test "x$ac_cv_lib_z_gzread" = xyes then : have_zlib=yes -else $as_nop - have_zlib=no +else case e in #( + e) have_zlib=no ;; +esac fi LIBS=$py_check_lib_save_LIBS -else $as_nop - have_zlib=no +else case e in #( + e) have_zlib=no ;; +esac fi done @@ -20002,16 +20902,22 @@ printf %s "checking for inflateCopy in -lz... " >&6; } if test ${ac_cv_lib_z_inflateCopy+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char inflateCopy (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char inflateCopy (void); int main (void) { @@ -20023,12 +20929,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_z_inflateCopy=yes -else $as_nop - ac_cv_lib_z_inflateCopy=no +else case e in #( + e) ac_cv_lib_z_inflateCopy=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5 printf "%s\n" "$ac_cv_lib_z_inflateCopy" >&6; } @@ -20089,7 +20997,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bzip2" >&5 printf %s "checking for bzip2... " >&6; } -if test -n "$BZIP2_CFLAGS"; then +if test "x$pkg_check_module_BZIP2" != "xno"; then + if test -n "$BZIP2_CFLAGS"; then pkg_cv_BZIP2_CFLAGS="$BZIP2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -20106,7 +21015,7 @@ fi else pkg_failed=untried fi -if test -n "$BZIP2_LIBS"; then + if test -n "$BZIP2_LIBS"; then pkg_cv_BZIP2_LIBS="$BZIP2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -20123,6 +21032,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -20164,16 +21076,22 @@ printf %s "checking for BZ2_bzCompress in -lbz2... " >&6; } if test ${ac_cv_lib_bz2_BZ2_bzCompress+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char BZ2_bzCompress (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char BZ2_bzCompress (void); int main (void) { @@ -20185,25 +21103,29 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bz2_BZ2_bzCompress=yes -else $as_nop - ac_cv_lib_bz2_BZ2_bzCompress=no +else case e in #( + e) ac_cv_lib_bz2_BZ2_bzCompress=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 printf "%s\n" "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes then : have_bzip2=yes -else $as_nop - have_bzip2=no +else case e in #( + e) have_bzip2=no ;; +esac fi -else $as_nop - have_bzip2=no +else case e in #( + e) have_bzip2=no ;; +esac fi done @@ -20246,16 +21168,22 @@ printf %s "checking for BZ2_bzCompress in -lbz2... " >&6; } if test ${ac_cv_lib_bz2_BZ2_bzCompress+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lbz2 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char BZ2_bzCompress (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char BZ2_bzCompress (void); int main (void) { @@ -20267,25 +21195,29 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bz2_BZ2_bzCompress=yes -else $as_nop - ac_cv_lib_bz2_BZ2_bzCompress=no +else case e in #( + e) ac_cv_lib_bz2_BZ2_bzCompress=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bz2_BZ2_bzCompress" >&5 printf "%s\n" "$ac_cv_lib_bz2_BZ2_bzCompress" >&6; } if test "x$ac_cv_lib_bz2_BZ2_bzCompress" = xyes then : have_bzip2=yes -else $as_nop - have_bzip2=no +else case e in #( + e) have_bzip2=no ;; +esac fi -else $as_nop - have_bzip2=no +else case e in #( + e) have_bzip2=no ;; +esac fi done @@ -20317,7 +21249,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 printf %s "checking for liblzma... " >&6; } -if test -n "$LIBLZMA_CFLAGS"; then +if test "x$pkg_check_module_LIBLZMA" != "xno"; then + if test -n "$LIBLZMA_CFLAGS"; then pkg_cv_LIBLZMA_CFLAGS="$LIBLZMA_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -20334,7 +21267,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBLZMA_LIBS"; then + if test -n "$LIBLZMA_LIBS"; then pkg_cv_LIBLZMA_LIBS="$LIBLZMA_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -20351,6 +21284,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -20392,16 +21328,22 @@ printf %s "checking for lzma_easy_encoder in -llzma... " >&6; } if test ${ac_cv_lib_lzma_lzma_easy_encoder+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-llzma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char lzma_easy_encoder (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char lzma_easy_encoder (void); int main (void) { @@ -20413,25 +21355,29 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_lzma_lzma_easy_encoder=yes -else $as_nop - ac_cv_lib_lzma_lzma_easy_encoder=no +else case e in #( + e) ac_cv_lib_lzma_lzma_easy_encoder=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 printf "%s\n" "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes then : have_liblzma=yes -else $as_nop - have_liblzma=no +else case e in #( + e) have_liblzma=no ;; +esac fi -else $as_nop - have_liblzma=no +else case e in #( + e) have_liblzma=no ;; +esac fi done @@ -20474,16 +21420,22 @@ printf %s "checking for lzma_easy_encoder in -llzma... " >&6; } if test ${ac_cv_lib_lzma_lzma_easy_encoder+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-llzma $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char lzma_easy_encoder (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char lzma_easy_encoder (void); int main (void) { @@ -20495,25 +21447,29 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_lzma_lzma_easy_encoder=yes -else $as_nop - ac_cv_lib_lzma_lzma_easy_encoder=no +else case e in #( + e) ac_cv_lib_lzma_lzma_easy_encoder=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lzma_lzma_easy_encoder" >&5 printf "%s\n" "$ac_cv_lib_lzma_lzma_easy_encoder" >&6; } if test "x$ac_cv_lib_lzma_lzma_easy_encoder" = xyes then : have_liblzma=yes -else $as_nop - have_liblzma=no +else case e in #( + e) have_liblzma=no ;; +esac fi -else $as_nop - have_liblzma=no +else case e in #( + e) have_liblzma=no ;; +esac fi done @@ -20549,8 +21505,8 @@ printf %s "checking for hstrerror... " >&6; } if test ${ac_cv_func_hstrerror+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -20564,11 +21520,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_hstrerror=yes -else $as_nop - ac_cv_func_hstrerror=no +else case e in #( + e) ac_cv_func_hstrerror=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_hstrerror" >&5 printf "%s\n" "$ac_cv_func_hstrerror" >&6; } @@ -20588,8 +21546,8 @@ printf %s "checking for getservbyname... " >&6; } if test ${ac_cv_func_getservbyname+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -20603,11 +21561,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_getservbyname=yes -else $as_nop - ac_cv_func_getservbyname=no +else case e in #( + e) ac_cv_func_getservbyname=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyname" >&5 printf "%s\n" "$ac_cv_func_getservbyname" >&6; } @@ -20627,8 +21587,8 @@ printf %s "checking for getservbyport... " >&6; } if test ${ac_cv_func_getservbyport+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -20642,11 +21602,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_getservbyport=yes -else $as_nop - ac_cv_func_getservbyport=no +else case e in #( + e) ac_cv_func_getservbyport=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getservbyport" >&5 printf "%s\n" "$ac_cv_func_getservbyport" >&6; } @@ -20666,8 +21628,8 @@ printf %s "checking for gethostbyname... " >&6; } if test ${ac_cv_func_gethostbyname+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -20681,11 +21643,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_gethostbyname=yes -else $as_nop - ac_cv_func_gethostbyname=no +else case e in #( + e) ac_cv_func_gethostbyname=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyname" >&5 printf "%s\n" "$ac_cv_func_gethostbyname" >&6; } @@ -20705,8 +21669,8 @@ printf %s "checking for gethostbyaddr... " >&6; } if test ${ac_cv_func_gethostbyaddr+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -20720,11 +21684,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_gethostbyaddr=yes -else $as_nop - ac_cv_func_gethostbyaddr=no +else case e in #( + e) ac_cv_func_gethostbyaddr=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_gethostbyaddr" >&5 printf "%s\n" "$ac_cv_func_gethostbyaddr" >&6; } @@ -20744,8 +21710,8 @@ printf %s "checking for getprotobyname... " >&6; } if test ${ac_cv_func_getprotobyname+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -20759,11 +21725,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_getprotobyname=yes -else $as_nop - ac_cv_func_getprotobyname=no +else case e in #( + e) ac_cv_func_getprotobyname=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getprotobyname" >&5 printf "%s\n" "$ac_cv_func_getprotobyname" >&6; } @@ -20786,8 +21754,8 @@ printf %s "checking for inet_aton... " >&6; } if test ${ac_cv_func_inet_aton+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -20806,11 +21774,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_inet_aton=yes -else $as_nop - ac_cv_func_inet_aton=no +else case e in #( + e) ac_cv_func_inet_aton=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_aton" >&5 printf "%s\n" "$ac_cv_func_inet_aton" >&6; } @@ -20830,8 +21800,8 @@ printf %s "checking for inet_ntoa... " >&6; } if test ${ac_cv_func_inet_ntoa+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -20850,11 +21820,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_inet_ntoa=yes -else $as_nop - ac_cv_func_inet_ntoa=no +else case e in #( + e) ac_cv_func_inet_ntoa=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_ntoa" >&5 printf "%s\n" "$ac_cv_func_inet_ntoa" >&6; } @@ -20874,8 +21846,8 @@ printf %s "checking for inet_pton... " >&6; } if test ${ac_cv_func_inet_pton+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -20894,11 +21866,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_inet_pton=yes -else $as_nop - ac_cv_func_inet_pton=no +else case e in #( + e) ac_cv_func_inet_pton=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_inet_pton" >&5 printf "%s\n" "$ac_cv_func_inet_pton" >&6; } @@ -20918,8 +21892,8 @@ printf %s "checking for getpeername... " >&6; } if test ${ac_cv_func_getpeername+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -20938,11 +21912,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_getpeername=yes -else $as_nop - ac_cv_func_getpeername=no +else case e in #( + e) ac_cv_func_getpeername=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpeername" >&5 printf "%s\n" "$ac_cv_func_getpeername" >&6; } @@ -20962,8 +21938,8 @@ printf %s "checking for getsockname... " >&6; } if test ${ac_cv_func_getsockname+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -20982,11 +21958,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_getsockname=yes -else $as_nop - ac_cv_func_getsockname=no +else case e in #( + e) ac_cv_func_getsockname=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getsockname" >&5 printf "%s\n" "$ac_cv_func_getsockname" >&6; } @@ -21006,8 +21984,8 @@ printf %s "checking for accept... " >&6; } if test ${ac_cv_func_accept+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21026,11 +22004,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_accept=yes -else $as_nop - ac_cv_func_accept=no +else case e in #( + e) ac_cv_func_accept=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_accept" >&5 printf "%s\n" "$ac_cv_func_accept" >&6; } @@ -21050,8 +22030,8 @@ printf %s "checking for bind... " >&6; } if test ${ac_cv_func_bind+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21070,11 +22050,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_bind=yes -else $as_nop - ac_cv_func_bind=no +else case e in #( + e) ac_cv_func_bind=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_bind" >&5 printf "%s\n" "$ac_cv_func_bind" >&6; } @@ -21094,8 +22076,8 @@ printf %s "checking for connect... " >&6; } if test ${ac_cv_func_connect+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21114,11 +22096,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_connect=yes -else $as_nop - ac_cv_func_connect=no +else case e in #( + e) ac_cv_func_connect=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_connect" >&5 printf "%s\n" "$ac_cv_func_connect" >&6; } @@ -21138,8 +22122,8 @@ printf %s "checking for listen... " >&6; } if test ${ac_cv_func_listen+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21158,11 +22142,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_listen=yes -else $as_nop - ac_cv_func_listen=no +else case e in #( + e) ac_cv_func_listen=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_listen" >&5 printf "%s\n" "$ac_cv_func_listen" >&6; } @@ -21182,8 +22168,8 @@ printf %s "checking for recvfrom... " >&6; } if test ${ac_cv_func_recvfrom+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21202,11 +22188,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_recvfrom=yes -else $as_nop - ac_cv_func_recvfrom=no +else case e in #( + e) ac_cv_func_recvfrom=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_recvfrom" >&5 printf "%s\n" "$ac_cv_func_recvfrom" >&6; } @@ -21226,8 +22214,8 @@ printf %s "checking for sendto... " >&6; } if test ${ac_cv_func_sendto+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21246,11 +22234,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_sendto=yes -else $as_nop - ac_cv_func_sendto=no +else case e in #( + e) ac_cv_func_sendto=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sendto" >&5 printf "%s\n" "$ac_cv_func_sendto" >&6; } @@ -21270,8 +22260,8 @@ printf %s "checking for setsockopt... " >&6; } if test ${ac_cv_func_setsockopt+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21290,11 +22280,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_setsockopt=yes -else $as_nop - ac_cv_func_setsockopt=no +else case e in #( + e) ac_cv_func_setsockopt=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setsockopt" >&5 printf "%s\n" "$ac_cv_func_setsockopt" >&6; } @@ -21314,8 +22306,8 @@ printf %s "checking for socket... " >&6; } if test ${ac_cv_func_socket+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21334,11 +22326,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_socket=yes -else $as_nop - ac_cv_func_socket=no +else case e in #( + e) ac_cv_func_socket=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socket" >&5 printf "%s\n" "$ac_cv_func_socket" >&6; } @@ -21360,8 +22354,8 @@ printf %s "checking for setgroups... " >&6; } if test ${ac_cv_func_setgroups+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -21380,11 +22374,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_setgroups=yes -else $as_nop - ac_cv_func_setgroups=no +else case e in #( + e) ac_cv_func_setgroups=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setgroups" >&5 printf "%s\n" "$ac_cv_func_setgroups" >&6; } @@ -21408,22 +22404,28 @@ if test "x$ac_cv_func_openpty" = xyes then : printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 printf %s "checking for openpty in -lutil... " >&6; } if test ${ac_cv_lib_util_openpty+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char openpty (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char openpty (void); int main (void) { @@ -21435,12 +22437,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_util_openpty=yes -else $as_nop - ac_cv_lib_util_openpty=no +else case e in #( + e) ac_cv_lib_util_openpty=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 printf "%s\n" "$ac_cv_lib_util_openpty" >&6; } @@ -21448,22 +22452,28 @@ if test "x$ac_cv_lib_util_openpty" = xyes then : printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h LIBS="$LIBS -lutil" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5 printf %s "checking for openpty in -lbsd... " >&6; } if test ${ac_cv_lib_bsd_openpty+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char openpty (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char openpty (void); int main (void) { @@ -21475,12 +22485,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bsd_openpty=yes -else $as_nop - ac_cv_lib_bsd_openpty=no +else case e in #( + e) ac_cv_lib_bsd_openpty=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5 printf "%s\n" "$ac_cv_lib_bsd_openpty" >&6; } @@ -21489,9 +22501,11 @@ then : printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h LIBS="$LIBS -lbsd" fi - + ;; +esac fi - + ;; +esac fi done @@ -21500,15 +22514,21 @@ printf %s "checking for library containing login_tty... " >&6; } if test ${ac_cv_search_login_tty+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char login_tty (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char login_tty (void); int main (void) { @@ -21539,11 +22559,13 @@ done if test ${ac_cv_search_login_tty+y} then : -else $as_nop - ac_cv_search_login_tty=no +else case e in #( + e) ac_cv_search_login_tty=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login_tty" >&5 printf "%s\n" "$ac_cv_search_login_tty" >&6; } @@ -21565,22 +22587,28 @@ if test "x$ac_cv_func_forkpty" = xyes then : printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5 printf %s "checking for forkpty in -lutil... " >&6; } if test ${ac_cv_lib_util_forkpty+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char forkpty (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char forkpty (void); int main (void) { @@ -21592,12 +22620,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_util_forkpty=yes -else $as_nop - ac_cv_lib_util_forkpty=no +else case e in #( + e) ac_cv_lib_util_forkpty=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5 printf "%s\n" "$ac_cv_lib_util_forkpty" >&6; } @@ -21605,22 +22635,28 @@ if test "x$ac_cv_lib_util_forkpty" = xyes then : printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h LIBS="$LIBS -lutil" -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5 printf %s "checking for forkpty in -lbsd... " >&6; } if test ${ac_cv_lib_bsd_forkpty+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char forkpty (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char forkpty (void); int main (void) { @@ -21632,12 +22668,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_bsd_forkpty=yes -else $as_nop - ac_cv_lib_bsd_forkpty=no +else case e in #( + e) ac_cv_lib_bsd_forkpty=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5 printf "%s\n" "$ac_cv_lib_bsd_forkpty" >&6; } @@ -21646,9 +22684,11 @@ then : printf "%s\n" "#define HAVE_FORKPTY 1" >>confdefs.h LIBS="$LIBS -lbsd" fi - + ;; +esac fi - + ;; +esac fi done @@ -21697,13 +22737,14 @@ if test "x$ac_cv_func_dup2" = xyes then : printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h -else $as_nop - case " $LIBOBJS " in +else case e in #( + e) case " $LIBOBJS " in *" dup2.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS dup2.$ac_objext" ;; esac - + ;; +esac fi @@ -21785,7 +22826,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libxcrypt >= 3.1.1" >&5 printf %s "checking for libxcrypt >= 3.1.1... " >&6; } -if test -n "$LIBCRYPT_CFLAGS"; then +if test "x$pkg_check_module_LIBCRYPT" != "xno"; then + if test -n "$LIBCRYPT_CFLAGS"; then pkg_cv_LIBCRYPT_CFLAGS="$LIBCRYPT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -21802,7 +22844,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBCRYPT_LIBS"; then + if test -n "$LIBCRYPT_LIBS"; then pkg_cv_LIBCRYPT_LIBS="$LIBCRYPT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -21819,6 +22861,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -21851,15 +22896,21 @@ printf %s "checking for library containing crypt_r... " >&6; } if test ${ac_cv_search_crypt_r+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char crypt_r (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char crypt_r (void); int main (void) { @@ -21890,11 +22941,13 @@ done if test ${ac_cv_search_crypt_r+y} then : -else $as_nop - ac_cv_search_crypt_r=no +else case e in #( + e) ac_cv_search_crypt_r=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 printf "%s\n" "$ac_cv_search_crypt_r" >&6; } @@ -21937,15 +22990,21 @@ printf %s "checking for library containing crypt_r... " >&6; } if test ${ac_cv_search_crypt_r+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char crypt_r (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char crypt_r (void); int main (void) { @@ -21976,11 +23035,13 @@ done if test ${ac_cv_search_crypt_r+y} then : -else $as_nop - ac_cv_search_crypt_r=no +else case e in #( + e) ac_cv_search_crypt_r=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_crypt_r" >&5 printf "%s\n" "$ac_cv_search_crypt_r" >&6; } @@ -22032,8 +23093,8 @@ printf %s "checking for crypt or crypt_r... " >&6; } if test ${ac_cv_crypt_crypt+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22062,12 +23123,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_crypt_crypt=yes -else $as_nop - ac_cv_crypt_crypt=no +else case e in #( + e) ac_cv_crypt_crypt=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_crypt_crypt" >&5 printf "%s\n" "$ac_cv_crypt_crypt" >&6; } @@ -22087,23 +23150,29 @@ if test "x$ac_cv_func_clock_gettime" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_gettime (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char clock_gettime (void); int main (void) { @@ -22115,12 +23184,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes -else $as_nop - ac_cv_lib_rt_clock_gettime=no +else case e in #( + e) ac_cv_lib_rt_clock_gettime=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$ac_cv_lib_rt_clock_gettime" >&6; } @@ -22136,7 +23207,8 @@ printf "%s\n" "#define TIMEMODULE_LIB rt" >>confdefs.h fi - + ;; +esac fi done @@ -22149,23 +23221,29 @@ if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5 printf %s "checking for clock_getres in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_getres+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_getres (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char clock_getres (void); int main (void) { @@ -22177,12 +23255,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_getres=yes -else $as_nop - ac_cv_lib_rt_clock_getres=no +else case e in #( + e) ac_cv_lib_rt_clock_getres=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5 printf "%s\n" "$ac_cv_lib_rt_clock_getres" >&6; } @@ -22194,7 +23274,8 @@ then : fi - + ;; +esac fi done @@ -22207,23 +23288,29 @@ if test "x$ac_cv_func_clock_settime" = xyes then : printf "%s\n" "#define HAVE_CLOCK_SETTIME 1" >>confdefs.h -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_settime in -lrt" >&5 printf %s "checking for clock_settime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_settime+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_settime (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char clock_settime (void); int main (void) { @@ -22235,12 +23322,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_settime=yes -else $as_nop - ac_cv_lib_rt_clock_settime=no +else case e in #( + e) ac_cv_lib_rt_clock_settime=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_settime" >&5 printf "%s\n" "$ac_cv_lib_rt_clock_settime" >&6; } @@ -22252,7 +23341,8 @@ then : fi - + ;; +esac fi done @@ -22265,23 +23355,29 @@ if test "x$ac_cv_func_clock_nanosleep" = xyes then : printf "%s\n" "#define HAVE_CLOCK_NANOSLEEP 1" >>confdefs.h -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_nanosleep in -lrt" >&5 printf %s "checking for clock_nanosleep in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_nanosleep+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char clock_nanosleep (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char clock_nanosleep (void); int main (void) { @@ -22293,12 +23389,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_nanosleep=yes -else $as_nop - ac_cv_lib_rt_clock_nanosleep=no +else case e in #( + e) ac_cv_lib_rt_clock_nanosleep=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_nanosleep" >&5 printf "%s\n" "$ac_cv_lib_rt_clock_nanosleep" >&6; } @@ -22310,7 +23408,8 @@ then : fi - + ;; +esac fi done @@ -22323,23 +23422,29 @@ if test "x$ac_cv_func_nanosleep" = xyes then : printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nanosleep in -lrt" >&5 printf %s "checking for nanosleep in -lrt... " >&6; } if test ${ac_cv_lib_rt_nanosleep+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char nanosleep (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char nanosleep (void); int main (void) { @@ -22351,12 +23456,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_nanosleep=yes -else $as_nop - ac_cv_lib_rt_nanosleep=no +else case e in #( + e) ac_cv_lib_rt_nanosleep=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_nanosleep" >&5 printf "%s\n" "$ac_cv_lib_rt_nanosleep" >&6; } @@ -22368,7 +23475,8 @@ then : fi - + ;; +esac fi done @@ -22378,8 +23486,8 @@ printf %s "checking for major, minor, and makedev... " >&6; } if test ${ac_cv_device_macros+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22405,12 +23513,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_device_macros=yes -else $as_nop - ac_cv_device_macros=no +else case e in #( + e) ac_cv_device_macros=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_device_macros" >&5 printf "%s\n" "$ac_cv_device_macros" >&6; } @@ -22434,8 +23544,8 @@ printf %s "checking for getaddrinfo... " >&6; } if test ${ac_cv_func_getaddrinfo+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -22455,12 +23565,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_getaddrinfo=yes -else $as_nop - ac_cv_func_getaddrinfo=no +else case e in #( + e) ac_cv_func_getaddrinfo=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getaddrinfo" >&5 printf "%s\n" "$ac_cv_func_getaddrinfo" >&6; } @@ -22473,8 +23585,8 @@ printf %s "checking getaddrinfo bug... " >&6; } if test ${ac_cv_buggy_getaddrinfo+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : if test "${enable_ipv6+set}" = set; then @@ -22482,8 +23594,8 @@ if test "${enable_ipv6+set}" = set; then else ac_cv_buggy_getaddrinfo=yes fi -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -22579,13 +23691,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_buggy_getaddrinfo=no -else $as_nop - ac_cv_buggy_getaddrinfo=yes +else case e in #( + e) ac_cv_buggy_getaddrinfo=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5 printf "%s\n" "$ac_cv_buggy_getaddrinfo" >&6; } @@ -22621,8 +23736,8 @@ printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -22640,10 +23755,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_tm=time.h -else $as_nop - ac_cv_struct_tm=sys/time.h +else case e in #( + e) ac_cv_struct_tm=sys/time.h ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } @@ -22675,8 +23792,9 @@ else if test "x$ac_cv_have_decl_tzname" = xyes then : ac_have_decl=1 -else $as_nop - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h @@ -22685,8 +23803,8 @@ printf %s "checking for tzname... " >&6; } if test ${ac_cv_var_tzname+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !HAVE_DECL_TZNAME @@ -22704,11 +23822,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_var_tzname=yes -else $as_nop - ac_cv_var_tzname=no +else case e in #( + e) ac_cv_var_tzname=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 printf "%s\n" "$ac_cv_var_tzname" >&6; } @@ -22815,8 +23935,8 @@ printf %s "checking for time.h that defines altzone... " >&6; } if test ${ac_cv_header_time_altzone+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -22831,11 +23951,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_header_time_altzone=yes -else $as_nop - ac_cv_header_time_altzone=no +else case e in #( + e) ac_cv_header_time_altzone=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5 printf "%s\n" "$ac_cv_header_time_altzone" >&6; } @@ -22850,8 +23972,8 @@ printf %s "checking for addrinfo... " >&6; } if test ${ac_cv_struct_addrinfo+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -22865,10 +23987,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_addrinfo=yes -else $as_nop - ac_cv_struct_addrinfo=no +else case e in #( + e) ac_cv_struct_addrinfo=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5 printf "%s\n" "$ac_cv_struct_addrinfo" >&6; } @@ -22883,8 +24007,8 @@ printf %s "checking for sockaddr_storage... " >&6; } if test ${ac_cv_struct_sockaddr_storage+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include @@ -22900,10 +24024,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_sockaddr_storage=yes -else $as_nop - ac_cv_struct_sockaddr_storage=no +else case e in #( + e) ac_cv_struct_sockaddr_storage=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 printf "%s\n" "$ac_cv_struct_sockaddr_storage" >&6; } @@ -22918,8 +24044,8 @@ printf %s "checking for sockaddr_alg... " >&6; } if test ${ac_cv_struct_sockaddr_alg+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include @@ -22936,10 +24062,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_sockaddr_alg=yes -else $as_nop - ac_cv_struct_sockaddr_alg=no +else case e in #( + e) ac_cv_struct_sockaddr_alg=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_alg" >&5 printf "%s\n" "$ac_cv_struct_sockaddr_alg" >&6; } @@ -22956,8 +24084,8 @@ printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -23021,10 +24149,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_const=yes -else $as_nop - ac_cv_c_const=no +else case e in #( + e) ac_cv_c_const=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } @@ -23040,8 +24170,8 @@ printf %s "checking for working signed char... " >&6; } if test ${ac_cv_working_signed_char_c+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23056,11 +24186,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_working_signed_char_c=yes -else $as_nop - ac_cv_working_signed_char_c=no +else case e in #( + e) ac_cv_working_signed_char_c=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_signed_char_c" >&5 printf "%s\n" "$ac_cv_working_signed_char_c" >&6; } @@ -23078,8 +24210,8 @@ printf %s "checking for prototypes... " >&6; } if test ${ac_cv_function_prototypes+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(int x) { return 0; } @@ -23094,11 +24226,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_function_prototypes=yes -else $as_nop - ac_cv_function_prototypes=no +else case e in #( + e) ac_cv_function_prototypes=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_function_prototypes" >&5 printf "%s\n" "$ac_cv_function_prototypes" >&6; } @@ -23120,8 +24254,8 @@ printf %s "checking for socketpair... " >&6; } if test ${ac_cv_func_socketpair+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -23138,11 +24272,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_func_socketpair=yes -else $as_nop - ac_cv_func_socketpair=no +else case e in #( + e) ac_cv_func_socketpair=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_socketpair" >&5 printf "%s\n" "$ac_cv_func_socketpair" >&6; } @@ -23162,8 +24298,8 @@ printf %s "checking if sockaddr has sa_len member... " >&6; } if test ${ac_cv_struct_sockaddr_sa_len+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -23180,11 +24316,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_struct_sockaddr_sa_len=yes -else $as_nop - ac_cv_struct_sockaddr_sa_len=no +else case e in #( + e) ac_cv_struct_sockaddr_sa_len=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_sa_len" >&5 printf "%s\n" "$ac_cv_struct_sockaddr_sa_len" >&6; } @@ -23241,8 +24379,8 @@ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5 @@ -23279,8 +24417,8 @@ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5 @@ -23315,23 +24453,26 @@ printf "%s\n" "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$OLD_CFLAGS -else $as_nop - +else case e in #( + e) ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes then : @@ -23339,7 +24480,8 @@ then : fi - + ;; +esac fi @@ -23356,22 +24498,28 @@ ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control" if test "x$ac_cv_func___fpu_control" = xyes then : -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5 printf %s "checking for __fpu_control in -lieee... " >&6; } if test ${ac_cv_lib_ieee___fpu_control+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char __fpu_control (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char __fpu_control (void); int main (void) { @@ -23383,12 +24531,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ieee___fpu_control=yes -else $as_nop - ac_cv_lib_ieee___fpu_control=no +else case e in #( + e) ac_cv_lib_ieee___fpu_control=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5 printf "%s\n" "$ac_cv_lib_ieee___fpu_control" >&6; } @@ -23400,7 +24550,8 @@ then : fi - + ;; +esac fi @@ -23427,9 +24578,10 @@ then LIBM=$withval printf "%s\n" "set LIBM=\"$withval\"" >&6; } else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5 fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 -printf "%s\n" "default LIBM=\"$LIBM\"" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5 +printf "%s\n" "default LIBM=\"$LIBM\"" >&6; } ;; +esac fi @@ -23452,9 +24604,10 @@ then LIBC=$withval printf "%s\n" "set LIBC=\"$withval\"" >&6; } else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5 fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 -printf "%s\n" "default LIBC=\"$LIBC\"" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5 +printf "%s\n" "default LIBC=\"$LIBC\"" >&6; } ;; +esac fi @@ -23468,8 +24621,8 @@ printf %s "checking for x64 gcc inline assembler... " >&6; } if test ${ac_cv_gcc_asm_for_x64+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23486,12 +24639,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_gcc_asm_for_x64=yes -else $as_nop - ac_cv_gcc_asm_for_x64=no +else case e in #( + e) ac_cv_gcc_asm_for_x64=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x64" >&5 printf "%s\n" "$ac_cv_gcc_asm_for_x64" >&6; } @@ -23514,8 +24669,8 @@ printf %s "checking whether float word ordering is bigendian... " >&6; } if test ${ax_cv_c_float_words_bigendian+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) ax_cv_c_float_words_bigendian=unknown cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23543,7 +24698,8 @@ fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ax_cv_c_float_words_bigendian" >&5 printf "%s\n" "$ax_cv_c_float_words_bigendian" >&6; } @@ -23602,8 +24758,8 @@ printf %s "checking whether we can use gcc inline assembler to get and set x87 c if test ${ac_cv_gcc_asm_for_x87+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23622,12 +24778,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_gcc_asm_for_x87=yes -else $as_nop - ac_cv_gcc_asm_for_x87=no +else case e in #( + e) ac_cv_gcc_asm_for_x87=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_x87" >&5 printf "%s\n" "$ac_cv_gcc_asm_for_x87" >&6; } @@ -23645,8 +24803,8 @@ printf %s "checking whether we can use gcc inline assembler to get and set mc688 if test ${ac_cv_gcc_asm_for_mc68881+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23665,12 +24823,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_gcc_asm_for_mc68881=yes -else $as_nop - ac_cv_gcc_asm_for_mc68881=no +else case e in #( + e) ac_cv_gcc_asm_for_mc68881=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gcc_asm_for_mc68881" >&5 printf "%s\n" "$ac_cv_gcc_asm_for_mc68881" >&6; } @@ -23693,16 +24853,16 @@ printf %s "checking for x87-style double rounding... " >&6; } if test ${ac_cv_x87_double_rounding+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) # $BASECFLAGS may affect the result ac_save_cc="$CC" CC="$CC $BASECFLAGS" if test "$cross_compiling" = yes then : ac_cv_x87_double_rounding=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -23728,15 +24888,18 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_x87_double_rounding=no -else $as_nop - ac_cv_x87_double_rounding=yes +else case e in #( + e) ac_cv_x87_double_rounding=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi CC="$ac_save_cc" - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5 printf "%s\n" "$ac_cv_x87_double_rounding" >&6; } @@ -23760,17 +24923,18 @@ LIBS="$LIBS $LIBM" for ac_func in acosh asinh atanh erf erfc expm1 log1p log2 do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF -else $as_nop - as_fn_error $? "Python requires C99 compatible libm" "$LINENO" 5 - +else case e in #( + e) as_fn_error $? "Python requires C99 compatible libm" "$LINENO" 5 + ;; +esac fi done @@ -23781,12 +24945,12 @@ printf %s "checking whether POSIX semaphores are enabled... " >&6; } if test ${ac_cv_posix_semaphores_enabled+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_posix_semaphores_enabled=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23812,14 +24976,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_posix_semaphores_enabled=yes -else $as_nop - ac_cv_posix_semaphores_enabled=no +else case e in #( + e) ac_cv_posix_semaphores_enabled=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5 printf "%s\n" "$ac_cv_posix_semaphores_enabled" >&6; } @@ -23837,12 +25004,12 @@ printf %s "checking for broken sem_getvalue... " >&6; } if test ${ac_cv_broken_sem_getvalue+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_broken_sem_getvalue=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -23872,14 +25039,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_broken_sem_getvalue=no -else $as_nop - ac_cv_broken_sem_getvalue=yes +else case e in #( + e) ac_cv_broken_sem_getvalue=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5 printf "%s\n" "$ac_cv_broken_sem_getvalue" >&6; } @@ -23897,8 +25067,9 @@ ac_fn_check_decl "$LINENO" "RTLD_LAZY" "ac_cv_have_decl_RTLD_LAZY" "#include
>confdefs.h ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include @@ -23906,8 +25077,9 @@ ac_fn_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include >confdefs.h ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include @@ -23915,8 +25087,9 @@ ac_fn_check_decl "$LINENO" "RTLD_GLOBAL" "ac_cv_have_decl_RTLD_GLOBAL" "#include if test "x$ac_cv_have_decl_RTLD_GLOBAL" = xyes then : ac_have_decl=1 -else $as_nop - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi printf "%s\n" "#define HAVE_DECL_RTLD_GLOBAL $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include @@ -23924,8 +25097,9 @@ ac_fn_check_decl "$LINENO" "RTLD_LOCAL" "ac_cv_have_decl_RTLD_LOCAL" "#include < if test "x$ac_cv_have_decl_RTLD_LOCAL" = xyes then : ac_have_decl=1 -else $as_nop - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi printf "%s\n" "#define HAVE_DECL_RTLD_LOCAL $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#include @@ -23933,8 +25107,9 @@ ac_fn_check_decl "$LINENO" "RTLD_NODELETE" "ac_cv_have_decl_RTLD_NODELETE" "#inc if test "x$ac_cv_have_decl_RTLD_NODELETE" = xyes then : ac_have_decl=1 -else $as_nop - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi printf "%s\n" "#define HAVE_DECL_RTLD_NODELETE $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include @@ -23942,8 +25117,9 @@ ac_fn_check_decl "$LINENO" "RTLD_NOLOAD" "ac_cv_have_decl_RTLD_NOLOAD" "#include if test "x$ac_cv_have_decl_RTLD_NOLOAD" = xyes then : ac_have_decl=1 -else $as_nop - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi printf "%s\n" "#define HAVE_DECL_RTLD_NOLOAD $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#include @@ -23951,8 +25127,9 @@ ac_fn_check_decl "$LINENO" "RTLD_DEEPBIND" "ac_cv_have_decl_RTLD_DEEPBIND" "#inc if test "x$ac_cv_have_decl_RTLD_DEEPBIND" = xyes then : ac_have_decl=1 -else $as_nop - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi printf "%s\n" "#define HAVE_DECL_RTLD_DEEPBIND $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include @@ -23960,8 +25137,9 @@ ac_fn_check_decl "$LINENO" "RTLD_MEMBER" "ac_cv_have_decl_RTLD_MEMBER" "#include if test "x$ac_cv_have_decl_RTLD_MEMBER" = xyes then : ac_have_decl=1 -else $as_nop - ac_have_decl=0 +else case e in #( + e) ac_have_decl=0 ;; +esac fi printf "%s\n" "#define HAVE_DECL_RTLD_MEMBER $ac_have_decl" >>confdefs.h @@ -23988,9 +25166,10 @@ printf "%s\n" "$enable_big_digits" >&6; } printf "%s\n" "#define PYLONG_BITS_IN_DIGIT $enable_big_digits" >>confdefs.h -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 -printf "%s\n" "no value specified" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 +printf "%s\n" "no value specified" >&6; } ;; +esac fi @@ -24004,9 +25183,10 @@ printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h wchar_h="yes" -else $as_nop - wchar_h="no" - +else case e in #( + e) wchar_h="no" + ;; +esac fi @@ -24015,29 +25195,31 @@ if test "$wchar_h" = yes then # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects -# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 printf %s "checking size of wchar_t... " >&6; } if test ${ac_cv_sizeof_wchar_t+y} then : printf %s "(cached) " >&6 -else $as_nop - if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include +else case e in #( + e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include " then : -else $as_nop - if test "$ac_cv_type_wchar_t" = yes; then - { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +else case e in #( + e) if test "$ac_cv_type_wchar_t" = yes; then + { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 +printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (wchar_t) -See \`config.log' for more details" "$LINENO" 5; } +See 'config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_wchar_t=0 - fi + fi ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; } @@ -24058,13 +25240,13 @@ printf %s "checking whether wchar_t is signed... " >&6; } if test ${ac_cv_wchar_t_signed+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_wchar_t_signed=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -24078,13 +25260,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_wchar_t_signed=yes -else $as_nop - ac_cv_wchar_t_signed=no +else case e in #( + e) ac_cv_wchar_t_signed=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5 printf "%s\n" "$ac_cv_wchar_t_signed" >&6; } @@ -24128,8 +25313,8 @@ printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_cv_c_bigendian=unknown +else case e in #( + e) ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -24175,8 +25360,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext int main (void) { -#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ - && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ && LITTLE_ENDIAN) bogus endian macros #endif @@ -24207,8 +25392,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -24252,8 +25438,9 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes -else $as_nop - ac_cv_c_bigendian=no +else case e in #( + e) ac_cv_c_bigendian=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi @@ -24280,22 +25467,23 @@ unsigned short int ascii_mm[] = int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } - extern int foo; - -int -main (void) -{ -return use_ascii (foo) == use_ebcdic (foo); - ; - return 0; -} + int + main (int argc, char **argv) + { + /* Intimidate the compiler so that it does not + optimize the arrays away. */ + char *p = argv[0]; + ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; + ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; + return use_ascii (argc) == use_ebcdic (*p); + } _ACEOF -if ac_fn_c_try_compile "$LINENO" +if ac_fn_c_try_link "$LINENO" then : - if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then ac_cv_c_bigendian=yes fi - if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else @@ -24304,9 +25492,10 @@ then : fi fi fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam \ + conftest$ac_exeext conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -24329,14 +25518,17 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_c_bigendian=no -else $as_nop - ac_cv_c_bigendian=yes +else case e in #( + e) ac_cv_c_bigendian=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - fi + fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } @@ -24440,9 +25632,10 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -24473,9 +25666,10 @@ else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } ;; +esac fi @@ -24486,13 +25680,13 @@ printf %s "checking whether right shift extends the sign bit... " >&6; } if test ${ac_cv_rshift_extends_sign+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_rshift_extends_sign=yes -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(void) @@ -24504,13 +25698,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_rshift_extends_sign=yes -else $as_nop - ac_cv_rshift_extends_sign=no +else case e in #( + e) ac_cv_rshift_extends_sign=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5 printf "%s\n" "$ac_cv_rshift_extends_sign" >&6; } @@ -24527,8 +25724,8 @@ printf %s "checking for getc_unlocked() and friends... " >&6; } if test ${ac_cv_have_getc_unlocked+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -24548,11 +25745,13 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_have_getc_unlocked=yes -else $as_nop - ac_cv_have_getc_unlocked=no +else case e in #( + e) ac_cv_have_getc_unlocked=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ - conftest$ac_exeext conftest.$ac_ext + conftest$ac_exeext conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5 printf "%s\n" "$ac_cv_have_getc_unlocked" >&6; } @@ -24583,9 +25782,10 @@ then : ;; esac -else $as_nop - with_readline=readline - +else case e in #( + e) with_readline=readline + ;; +esac fi @@ -24597,7 +25797,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for readline" >&5 printf %s "checking for readline... " >&6; } -if test -n "$LIBREADLINE_CFLAGS"; then +if test "x$pkg_check_module_LIBREADLINE" != "xno"; then + if test -n "$LIBREADLINE_CFLAGS"; then pkg_cv_LIBREADLINE_CFLAGS="$LIBREADLINE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -24614,7 +25815,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBREADLINE_LIBS"; then + if test -n "$LIBREADLINE_LIBS"; then pkg_cv_LIBREADLINE_LIBS="$LIBREADLINE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -24631,6 +25832,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -24672,16 +25876,22 @@ printf %s "checking for readline in -lreadline... " >&6; } if test ${ac_cv_lib_readline_readline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char readline (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char readline (void); int main (void) { @@ -24693,12 +25903,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_readline_readline=yes -else $as_nop - ac_cv_lib_readline_readline=no +else case e in #( + e) ac_cv_lib_readline_readline=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 printf "%s\n" "$ac_cv_lib_readline_readline" >&6; } @@ -24709,13 +25921,15 @@ then : READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""} READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"} -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi done @@ -24751,16 +25965,22 @@ printf %s "checking for readline in -lreadline... " >&6; } if test ${ac_cv_lib_readline_readline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char readline (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char readline (void); int main (void) { @@ -24772,12 +25992,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_readline_readline=yes -else $as_nop - ac_cv_lib_readline_readline=no +else case e in #( + e) ac_cv_lib_readline_readline=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 printf "%s\n" "$ac_cv_lib_readline_readline" >&6; } @@ -24788,13 +26010,15 @@ then : READLINE_CFLAGS=${LIBREADLINE_CFLAGS-""} READLINE_LIBS=${LIBREADLINE_LIBS-"-lreadline"} -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi done @@ -24828,7 +26052,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libedit" >&5 printf %s "checking for libedit... " >&6; } -if test -n "$LIBEDIT_CFLAGS"; then +if test "x$pkg_check_module_LIBEDIT" != "xno"; then + if test -n "$LIBEDIT_CFLAGS"; then pkg_cv_LIBEDIT_CFLAGS="$LIBEDIT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -24845,7 +26070,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBEDIT_LIBS"; then + if test -n "$LIBEDIT_LIBS"; then pkg_cv_LIBEDIT_LIBS="$LIBEDIT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -24862,6 +26087,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -24903,16 +26131,22 @@ printf %s "checking for readline in -ledit... " >&6; } if test ${ac_cv_lib_edit_readline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ledit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char readline (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char readline (void); int main (void) { @@ -24924,12 +26158,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_edit_readline=yes -else $as_nop - ac_cv_lib_edit_readline=no +else case e in #( + e) ac_cv_lib_edit_readline=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5 printf "%s\n" "$ac_cv_lib_edit_readline" >&6; } @@ -24942,13 +26178,15 @@ then : READLINE_CFLAGS=${LIBEDIT_CFLAGS-""} READLINE_LIBS=${LIBEDIT_LIBS-"-ledit"} -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi done @@ -24984,16 +26222,22 @@ printf %s "checking for readline in -ledit... " >&6; } if test ${ac_cv_lib_edit_readline+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-ledit $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char readline (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char readline (void); int main (void) { @@ -25005,12 +26249,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_edit_readline=yes -else $as_nop - ac_cv_lib_edit_readline=no +else case e in #( + e) ac_cv_lib_edit_readline=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5 printf "%s\n" "$ac_cv_lib_edit_readline" >&6; } @@ -25023,13 +26269,15 @@ then : READLINE_CFLAGS=${LIBEDIT_CFLAGS-""} READLINE_LIBS=${LIBEDIT_LIBS-"-ledit"} -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi -else $as_nop - with_readline=no +else case e in #( + e) with_readline=no ;; +esac fi done @@ -25067,8 +26315,8 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)" >&5 printf "%s\n" "$with_readline (CFLAGS: $READLINE_CFLAGS, LIBS: $READLINE_LIBS)" >&6; } @@ -25129,8 +26377,8 @@ printf %s "checking for rl_pre_input_hook in -l$LIBREADLINE... " >&6; } if test ${ac_cv_readline_rl_pre_input_hook+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25153,13 +26401,15 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_readline_rl_pre_input_hook=yes -else $as_nop - ac_cv_readline_rl_pre_input_hook=no - +else case e in #( + e) ac_cv_readline_rl_pre_input_hook=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_pre_input_hook" >&5 printf "%s\n" "$ac_cv_readline_rl_pre_input_hook" >&6; } @@ -25178,8 +26428,8 @@ printf %s "checking for rl_completion_display_matches_hook in -l$LIBREADLINE... if test ${ac_cv_readline_rl_completion_display_matches_hook+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25202,13 +26452,15 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_readline_rl_completion_display_matches_hook=yes -else $as_nop - ac_cv_readline_rl_completion_display_matches_hook=no - +else case e in #( + e) ac_cv_readline_rl_completion_display_matches_hook=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_completion_display_matches_hook" >&5 printf "%s\n" "$ac_cv_readline_rl_completion_display_matches_hook" >&6; } @@ -25227,8 +26479,8 @@ printf %s "checking for rl_resize_terminal in -l$LIBREADLINE... " >&6; } if test ${ac_cv_readline_rl_resize_terminal+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25251,13 +26503,15 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_readline_rl_resize_terminal=yes -else $as_nop - ac_cv_readline_rl_resize_terminal=no - +else case e in #( + e) ac_cv_readline_rl_resize_terminal=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_resize_terminal" >&5 printf "%s\n" "$ac_cv_readline_rl_resize_terminal" >&6; } @@ -25276,8 +26530,8 @@ printf %s "checking for rl_completion_matches in -l$LIBREADLINE... " >&6; } if test ${ac_cv_readline_rl_completion_matches+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25300,13 +26554,15 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_readline_rl_completion_matches=yes -else $as_nop - ac_cv_readline_rl_completion_matches=no - +else case e in #( + e) ac_cv_readline_rl_completion_matches=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_rl_completion_matches" >&5 printf "%s\n" "$ac_cv_readline_rl_completion_matches" >&6; } @@ -25344,8 +26600,8 @@ printf %s "checking for append_history in -l$LIBREADLINE... " >&6; } if test ${ac_cv_readline_append_history+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -25368,13 +26624,15 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_readline_append_history=yes -else $as_nop - ac_cv_readline_append_history=no - +else case e in #( + e) ac_cv_readline_append_history=no + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_readline_append_history" >&5 printf "%s\n" "$ac_cv_readline_append_history" >&6; } @@ -25413,7 +26671,8 @@ CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5 @@ -25421,13 +26680,13 @@ printf %s "checking for broken nice()... " >&6; } if test ${ac_cv_broken_nice+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_broken_nice=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -25444,13 +26703,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_broken_nice=yes -else $as_nop - ac_cv_broken_nice=no +else case e in #( + e) ac_cv_broken_nice=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5 printf "%s\n" "$ac_cv_broken_nice" >&6; } @@ -25466,12 +26728,12 @@ printf %s "checking for broken poll()... " >&6; } if test ${ac_cv_broken_poll+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_broken_poll=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -25497,13 +26759,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_broken_poll=yes -else $as_nop - ac_cv_broken_poll=no +else case e in #( + e) ac_cv_broken_poll=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5 printf "%s\n" "$ac_cv_broken_poll" >&6; } @@ -25520,13 +26785,13 @@ printf %s "checking for working tzset()... " >&6; } if test ${ac_cv_working_tzset+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_working_tzset=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -25596,13 +26861,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_working_tzset=yes -else $as_nop - ac_cv_working_tzset=no +else case e in #( + e) ac_cv_working_tzset=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5 printf "%s\n" "$ac_cv_working_tzset" >&6; } @@ -25619,8 +26887,8 @@ printf %s "checking for tv_nsec in struct stat... " >&6; } if test ${ac_cv_stat_tv_nsec+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -25637,10 +26905,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_stat_tv_nsec=yes -else $as_nop - ac_cv_stat_tv_nsec=no +else case e in #( + e) ac_cv_stat_tv_nsec=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5 printf "%s\n" "$ac_cv_stat_tv_nsec" >&6; } @@ -25657,8 +26927,8 @@ printf %s "checking for tv_nsec2 in struct stat... " >&6; } if test ${ac_cv_stat_tv_nsec2+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -25675,10 +26945,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_stat_tv_nsec2=yes -else $as_nop - ac_cv_stat_tv_nsec2=no +else case e in #( + e) ac_cv_stat_tv_nsec2=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5 printf "%s\n" "$ac_cv_stat_tv_nsec2" >&6; } @@ -25716,7 +26988,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncursesw" >&5 printf %s "checking for ncursesw... " >&6; } -if test -n "$CURSES_CFLAGS"; then +if test "x$pkg_check_module_CURSES" != "xno"; then + if test -n "$CURSES_CFLAGS"; then pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -25733,7 +27006,7 @@ fi else pkg_failed=untried fi -if test -n "$CURSES_LIBS"; then + if test -n "$CURSES_LIBS"; then pkg_cv_CURSES_LIBS="$CURSES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -25750,6 +27023,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -25782,16 +27058,22 @@ printf %s "checking for initscr in -lncursesw... " >&6; } if test ${ac_cv_lib_ncursesw_initscr+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lncursesw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char initscr (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (void); int main (void) { @@ -25803,12 +27085,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ncursesw_initscr=yes -else $as_nop - ac_cv_lib_ncursesw_initscr=no +else case e in #( + e) ac_cv_lib_ncursesw_initscr=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_initscr" >&5 printf "%s\n" "$ac_cv_lib_ncursesw_initscr" >&6; } @@ -25846,16 +27130,22 @@ printf %s "checking for initscr in -lncursesw... " >&6; } if test ${ac_cv_lib_ncursesw_initscr+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lncursesw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char initscr (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (void); int main (void) { @@ -25867,12 +27157,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ncursesw_initscr=yes -else $as_nop - ac_cv_lib_ncursesw_initscr=no +else case e in #( + e) ac_cv_lib_ncursesw_initscr=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_initscr" >&5 printf "%s\n" "$ac_cv_lib_ncursesw_initscr" >&6; } @@ -25916,7 +27208,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ncurses" >&5 printf %s "checking for ncurses... " >&6; } -if test -n "$CURSES_CFLAGS"; then +if test "x$pkg_check_module_CURSES" != "xno"; then + if test -n "$CURSES_CFLAGS"; then pkg_cv_CURSES_CFLAGS="$CURSES_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -25933,7 +27226,7 @@ fi else pkg_failed=untried fi -if test -n "$CURSES_LIBS"; then + if test -n "$CURSES_LIBS"; then pkg_cv_CURSES_LIBS="$CURSES_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -25950,6 +27243,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -25982,16 +27278,22 @@ printf %s "checking for initscr in -lncurses... " >&6; } if test ${ac_cv_lib_ncurses_initscr+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char initscr (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (void); int main (void) { @@ -26003,12 +27305,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ncurses_initscr=yes -else $as_nop - ac_cv_lib_ncurses_initscr=no +else case e in #( + e) ac_cv_lib_ncurses_initscr=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 printf "%s\n" "$ac_cv_lib_ncurses_initscr" >&6; } @@ -26044,16 +27348,22 @@ printf %s "checking for initscr in -lncurses... " >&6; } if test ${ac_cv_lib_ncurses_initscr+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char initscr (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char initscr (void); int main (void) { @@ -26065,12 +27375,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_ncurses_initscr=yes -else $as_nop - ac_cv_lib_ncurses_initscr=no +else case e in #( + e) ac_cv_lib_ncurses_initscr=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 printf "%s\n" "$ac_cv_lib_ncurses_initscr" >&6; } @@ -26123,11 +27435,12 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_curses (CFLAGS: $CURSES_CFLAGS, LIBS: $CURSES_LIBS)" >&5 printf "%s\n" "$have_curses (CFLAGS: $CURSES_CFLAGS, LIBS: $CURSES_LIBS)" >&6; } - + ;; +esac fi ac_fn_c_check_header_compile "$LINENO" "panel.h" "ac_cv_header_panel_h" "$ac_includes_default" @@ -26151,7 +27464,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for panelw" >&5 printf %s "checking for panelw... " >&6; } -if test -n "$PANEL_CFLAGS"; then +if test "x$pkg_check_module_PANEL" != "xno"; then + if test -n "$PANEL_CFLAGS"; then pkg_cv_PANEL_CFLAGS="$PANEL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -26168,7 +27482,7 @@ fi else pkg_failed=untried fi -if test -n "$PANEL_LIBS"; then + if test -n "$PANEL_LIBS"; then pkg_cv_PANEL_LIBS="$PANEL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -26185,6 +27499,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -26217,16 +27534,22 @@ printf %s "checking for update_panels in -lpanelw... " >&6; } if test ${ac_cv_lib_panelw_update_panels+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpanelw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char update_panels (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char update_panels (void); int main (void) { @@ -26238,12 +27561,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_panelw_update_panels=yes -else $as_nop - ac_cv_lib_panelw_update_panels=no +else case e in #( + e) ac_cv_lib_panelw_update_panels=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_panelw_update_panels" >&5 printf "%s\n" "$ac_cv_lib_panelw_update_panels" >&6; } @@ -26279,16 +27604,22 @@ printf %s "checking for update_panels in -lpanelw... " >&6; } if test ${ac_cv_lib_panelw_update_panels+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpanelw $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char update_panels (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char update_panels (void); int main (void) { @@ -26300,12 +27631,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_panelw_update_panels=yes -else $as_nop - ac_cv_lib_panelw_update_panels=no +else case e in #( + e) ac_cv_lib_panelw_update_panels=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_panelw_update_panels" >&5 printf "%s\n" "$ac_cv_lib_panelw_update_panels" >&6; } @@ -26347,7 +27680,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for panel" >&5 printf %s "checking for panel... " >&6; } -if test -n "$PANEL_CFLAGS"; then +if test "x$pkg_check_module_PANEL" != "xno"; then + if test -n "$PANEL_CFLAGS"; then pkg_cv_PANEL_CFLAGS="$PANEL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -26364,7 +27698,7 @@ fi else pkg_failed=untried fi -if test -n "$PANEL_LIBS"; then + if test -n "$PANEL_LIBS"; then pkg_cv_PANEL_LIBS="$PANEL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -26381,6 +27715,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -26413,16 +27750,22 @@ printf %s "checking for update_panels in -lpanel... " >&6; } if test ${ac_cv_lib_panel_update_panels+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpanel $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char update_panels (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char update_panels (void); int main (void) { @@ -26434,12 +27777,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_panel_update_panels=yes -else $as_nop - ac_cv_lib_panel_update_panels=no +else case e in #( + e) ac_cv_lib_panel_update_panels=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_panel_update_panels" >&5 printf "%s\n" "$ac_cv_lib_panel_update_panels" >&6; } @@ -26475,16 +27820,22 @@ printf %s "checking for update_panels in -lpanel... " >&6; } if test ${ac_cv_lib_panel_update_panels+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_check_lib_save_LIBS=$LIBS +else case e in #( + e) ac_check_lib_save_LIBS=$LIBS LIBS="-lpanel $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char update_panels (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char update_panels (void); int main (void) { @@ -26496,12 +27847,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_panel_update_panels=yes -else $as_nop - ac_cv_lib_panel_update_panels=no +else case e in #( + e) ac_cv_lib_panel_update_panels=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS +LIBS=$ac_check_lib_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_panel_update_panels" >&5 printf "%s\n" "$ac_cv_lib_panel_update_panels" >&6; } @@ -26546,11 +27899,12 @@ then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)" >&5 printf "%s\n" "$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)" >&6; } - + ;; +esac fi # first curses header check @@ -26579,8 +27933,8 @@ printf %s "checking whether mvwdelch is an expression... " >&6; } if test ${ac_cv_mvwdelch_is_expression+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26597,10 +27951,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_mvwdelch_is_expression=yes -else $as_nop - ac_cv_mvwdelch_is_expression=no +else case e in #( + e) ac_cv_mvwdelch_is_expression=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5 printf "%s\n" "$ac_cv_mvwdelch_is_expression" >&6; } @@ -26621,8 +27977,8 @@ printf %s "checking whether WINDOW has _flags... " >&6; } if test ${ac_cv_window_has_flags+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define NCURSES_OPAQUE 0 @@ -26642,10 +27998,12 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_window_has_flags=yes -else $as_nop - ac_cv_window_has_flags=no +else case e in #( + e) ac_cv_window_has_flags=no ;; +esac fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5 printf "%s\n" "$ac_cv_window_has_flags" >&6; } @@ -26667,8 +28025,8 @@ printf %s "checking for curses function is_pad... " >&6; } if test ${ac_cv_lib_curses_is_pad+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26686,11 +28044,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_is_pad=yes -else $as_nop - ac_cv_lib_curses_is_pad=no +else case e in #( + e) ac_cv_lib_curses_is_pad=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_is_pad" >&5 printf "%s\n" "$ac_cv_lib_curses_is_pad" >&6; } @@ -26710,8 +28070,8 @@ printf %s "checking for curses function is_term_resized... " >&6; } if test ${ac_cv_lib_curses_is_term_resized+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26729,11 +28089,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_is_term_resized=yes -else $as_nop - ac_cv_lib_curses_is_term_resized=no +else case e in #( + e) ac_cv_lib_curses_is_term_resized=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_is_term_resized" >&5 printf "%s\n" "$ac_cv_lib_curses_is_term_resized" >&6; } @@ -26753,8 +28115,8 @@ printf %s "checking for curses function resize_term... " >&6; } if test ${ac_cv_lib_curses_resize_term+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26772,11 +28134,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_resize_term=yes -else $as_nop - ac_cv_lib_curses_resize_term=no +else case e in #( + e) ac_cv_lib_curses_resize_term=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_resize_term" >&5 printf "%s\n" "$ac_cv_lib_curses_resize_term" >&6; } @@ -26796,8 +28160,8 @@ printf %s "checking for curses function resizeterm... " >&6; } if test ${ac_cv_lib_curses_resizeterm+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26815,11 +28179,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_resizeterm=yes -else $as_nop - ac_cv_lib_curses_resizeterm=no +else case e in #( + e) ac_cv_lib_curses_resizeterm=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_resizeterm" >&5 printf "%s\n" "$ac_cv_lib_curses_resizeterm" >&6; } @@ -26839,8 +28205,8 @@ printf %s "checking for curses function immedok... " >&6; } if test ${ac_cv_lib_curses_immedok+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26858,11 +28224,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_immedok=yes -else $as_nop - ac_cv_lib_curses_immedok=no +else case e in #( + e) ac_cv_lib_curses_immedok=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_immedok" >&5 printf "%s\n" "$ac_cv_lib_curses_immedok" >&6; } @@ -26882,8 +28250,8 @@ printf %s "checking for curses function syncok... " >&6; } if test ${ac_cv_lib_curses_syncok+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26901,11 +28269,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_syncok=yes -else $as_nop - ac_cv_lib_curses_syncok=no +else case e in #( + e) ac_cv_lib_curses_syncok=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_syncok" >&5 printf "%s\n" "$ac_cv_lib_curses_syncok" >&6; } @@ -26925,8 +28295,8 @@ printf %s "checking for curses function wchgat... " >&6; } if test ${ac_cv_lib_curses_wchgat+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26944,11 +28314,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_wchgat=yes -else $as_nop - ac_cv_lib_curses_wchgat=no +else case e in #( + e) ac_cv_lib_curses_wchgat=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_wchgat" >&5 printf "%s\n" "$ac_cv_lib_curses_wchgat" >&6; } @@ -26968,8 +28340,8 @@ printf %s "checking for curses function filter... " >&6; } if test ${ac_cv_lib_curses_filter+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -26987,11 +28359,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_filter=yes -else $as_nop - ac_cv_lib_curses_filter=no +else case e in #( + e) ac_cv_lib_curses_filter=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_filter" >&5 printf "%s\n" "$ac_cv_lib_curses_filter" >&6; } @@ -27011,8 +28385,8 @@ printf %s "checking for curses function has_key... " >&6; } if test ${ac_cv_lib_curses_has_key+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -27030,11 +28404,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_has_key=yes -else $as_nop - ac_cv_lib_curses_has_key=no +else case e in #( + e) ac_cv_lib_curses_has_key=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_has_key" >&5 printf "%s\n" "$ac_cv_lib_curses_has_key" >&6; } @@ -27054,8 +28430,8 @@ printf %s "checking for curses function typeahead... " >&6; } if test ${ac_cv_lib_curses_typeahead+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -27073,11 +28449,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_typeahead=yes -else $as_nop - ac_cv_lib_curses_typeahead=no +else case e in #( + e) ac_cv_lib_curses_typeahead=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_typeahead" >&5 printf "%s\n" "$ac_cv_lib_curses_typeahead" >&6; } @@ -27097,8 +28475,8 @@ printf %s "checking for curses function use_env... " >&6; } if test ${ac_cv_lib_curses_use_env+y} then : printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int @@ -27116,11 +28494,13 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_lib_curses_use_env=yes -else $as_nop - ac_cv_lib_curses_use_env=no +else case e in #( + e) ac_cv_lib_curses_use_env=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_use_env" >&5 printf "%s\n" "$ac_cv_lib_curses_use_env" >&6; } @@ -27160,14 +28540,15 @@ printf %s "checking for /dev/ptmx... " >&6; } if test ${ac_cv_file__dev_ptmx+y} then : printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && +else case e in #( + e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/ptmx"; then ac_cv_file__dev_ptmx=yes else ac_cv_file__dev_ptmx=no -fi +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5 printf "%s\n" "$ac_cv_file__dev_ptmx" >&6; } @@ -27186,14 +28567,15 @@ printf %s "checking for /dev/ptc... " >&6; } if test ${ac_cv_file__dev_ptc+y} then : printf %s "(cached) " >&6 -else $as_nop - test "$cross_compiling" = yes && +else case e in #( + e) test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/ptc"; then ac_cv_file__dev_ptc=yes else ac_cv_file__dev_ptc=no -fi +fi ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5 printf "%s\n" "$ac_cv_file__dev_ptc" >&6; } @@ -27225,10 +28607,11 @@ ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " if test "x$ac_cv_type_socklen_t" = xyes then : -else $as_nop - +else case e in #( + e) printf "%s\n" "#define socklen_t int" >>confdefs.h - + ;; +esac fi @@ -27237,12 +28620,12 @@ printf %s "checking for broken mbstowcs... " >&6; } if test ${ac_cv_broken_mbstowcs+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : ac_cv_broken_mbstowcs=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -27259,13 +28642,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_broken_mbstowcs=no -else $as_nop - ac_cv_broken_mbstowcs=yes +else case e in #( + e) ac_cv_broken_mbstowcs=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5 printf "%s\n" "$ac_cv_broken_mbstowcs" >&6; } @@ -27301,9 +28687,10 @@ printf "%s\n" "#define USE_COMPUTED_GOTOS 0" >>confdefs.h printf "%s\n" "no" >&6; } fi -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 -printf "%s\n" "no value specified" >&6; } +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5 +printf "%s\n" "no value specified" >&6; } ;; +esac fi @@ -27312,16 +28699,16 @@ printf %s "checking whether $CC supports computed gotos... " >&6; } if test ${ac_cv_computed_gotos+y} then : printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes +else case e in #( + e) if test "$cross_compiling" = yes then : if test "${with_computed_gotos+set}" = set; then ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos" else ac_cv_computed_gotos=no fi -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main(int argc, char **argv) @@ -27339,13 +28726,16 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : ac_cv_computed_gotos=yes -else $as_nop - ac_cv_computed_gotos=no +else case e in #( + e) ac_cv_computed_gotos=no ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5 printf "%s\n" "$ac_cv_computed_gotos" >&6; } @@ -27408,8 +28798,8 @@ printf %s "checking for -O2... " >&6; } if test ${ac_cv_compile_o2+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) saved_cflags="$CFLAGS" CFLAGS="-O2" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -27426,12 +28816,14 @@ _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_compile_o2=yes -else $as_nop - ac_cv_compile_o2=no +else case e in #( + e) ac_cv_compile_o2=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$saved_cflags" - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_compile_o2" >&5 printf "%s\n" "$ac_cv_compile_o2" >&6; } @@ -27448,8 +28840,8 @@ fi if test "$cross_compiling" = yes then : have_glibc_memmove_bug=undefined -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -27471,11 +28863,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : have_glibc_memmove_bug=no -else $as_nop - have_glibc_memmove_bug=yes +else case e in #( + e) have_glibc_memmove_bug=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi CFLAGS="$saved_cflags" @@ -27500,8 +28894,8 @@ printf %s "checking for gcc ipa-pure-const bug... " >&6; } if test "$cross_compiling" = yes then : have_ipa_pure_const_bug=undefined -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ __attribute__((noinline)) int @@ -27524,11 +28918,13 @@ _ACEOF if ac_fn_c_try_run "$LINENO" then : have_ipa_pure_const_bug=no -else $as_nop - have_ipa_pure_const_bug=yes +else case e in #( + e) have_ipa_pure_const_bug=yes ;; +esac fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext + conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +esac fi CFLAGS="$saved_cflags" @@ -27549,8 +28945,8 @@ printf %s "checking for stdatomic.h... " >&6; } if test ${ac_cv_header_stdatomic_h+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27570,12 +28966,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_header_stdatomic_h=yes -else $as_nop - ac_cv_header_stdatomic_h=no +else case e in #( + e) ac_cv_header_stdatomic_h=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdatomic_h" >&5 printf "%s\n" "$ac_cv_header_stdatomic_h" >&6; } @@ -27595,8 +28993,8 @@ printf %s "checking for builtin __atomic_load_n and __atomic_store_n functions.. if test ${ac_cv_builtin_atomic+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27613,12 +29011,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_builtin_atomic=yes -else $as_nop - ac_cv_builtin_atomic=no +else case e in #( + e) ac_cv_builtin_atomic=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_builtin_atomic" >&5 printf "%s\n" "$ac_cv_builtin_atomic" >&6; } @@ -27640,8 +29040,8 @@ printf %s "checking for ensurepip... " >&6; } if test ${with_ensurepip+y} then : withval=$with_ensurepip; -else $as_nop - +else case e in #( + e) case $ac_sys_system in #( Emscripten) : with_ensurepip=no ;; #( @@ -27651,7 +29051,8 @@ else $as_nop with_ensurepip=upgrade ;; esac - + ;; +esac fi case $with_ensurepip in #( @@ -27674,8 +29075,8 @@ printf %s "checking if the dirent structure of a d_type field... " >&6; } if test ${ac_cv_dirent_d_type+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27692,12 +29093,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_dirent_d_type=yes -else $as_nop - ac_cv_dirent_d_type=no +else case e in #( + e) ac_cv_dirent_d_type=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_dirent_d_type" >&5 printf "%s\n" "$ac_cv_dirent_d_type" >&6; } @@ -27717,8 +29120,8 @@ printf %s "checking for the Linux getrandom() syscall... " >&6; } if test ${ac_cv_getrandom_syscall+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27742,12 +29145,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_getrandom_syscall=yes -else $as_nop - ac_cv_getrandom_syscall=no +else case e in #( + e) ac_cv_getrandom_syscall=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_getrandom_syscall" >&5 printf "%s\n" "$ac_cv_getrandom_syscall" >&6; } @@ -27768,8 +29173,8 @@ printf %s "checking for the getrandom() function... " >&6; } if test ${ac_cv_func_getrandom+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -27791,12 +29196,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_func_getrandom=yes -else $as_nop - ac_cv_func_getrandom=no +else case e in #( + e) ac_cv_func_getrandom=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getrandom" >&5 printf "%s\n" "$ac_cv_func_getrandom" >&6; } @@ -27824,15 +29231,21 @@ printf %s "checking for library containing shm_open... " >&6; } if test ${ac_cv_search_shm_open+y} then : printf %s "(cached) " >&6 -else $as_nop - ac_func_search_save_LIBS=$LIBS +else case e in #( + e) ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -char shm_open (); + builtin and then its argument prototype would still apply. + The 'extern "C"' is for builds by C++ compilers; + although this is not generally supported in C code supporting it here + has little cost and some practical benefit (sr 110532). */ +#ifdef __cplusplus +extern "C" +#endif +char shm_open (void); int main (void) { @@ -27863,11 +29276,13 @@ done if test ${ac_cv_search_shm_open+y} then : -else $as_nop - ac_cv_search_shm_open=no +else case e in #( + e) ac_cv_search_shm_open=no ;; +esac fi rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS +LIBS=$ac_func_search_save_LIBS ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shm_open" >&5 printf "%s\n" "$ac_cv_search_shm_open" >&6; } @@ -27895,16 +29310,17 @@ fi for ac_func in shm_open shm_unlink do : - as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` + as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | sed "$as_sed_sh"` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes" then : cat >>confdefs.h <<_ACEOF -#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `printf "%s\n" "HAVE_$ac_func" | sed "$as_sed_cpp"` 1 _ACEOF have_posix_shmem=yes -else $as_nop - have_posix_shmem=no +else case e in #( + e) have_posix_shmem=no ;; +esac fi done @@ -27933,8 +29349,8 @@ then : ;; esac -else $as_nop - +else case e in #( + e) # if pkg-config is installed and openssl has installed a .pc file, # then use that information and don't search ssldirs if test -n "$ac_tool_prefix"; then @@ -27945,8 +29361,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$PKG_CONFIG"; then +else case e in #( + e) if test -n "$PKG_CONFIG"; then ac_cv_prog_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -27968,7 +29384,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi PKG_CONFIG=$ac_cv_prog_PKG_CONFIG if test -n "$PKG_CONFIG"; then @@ -27990,8 +29407,8 @@ printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_PKG_CONFIG+y} then : printf %s "(cached) " >&6 -else $as_nop - if test -n "$ac_ct_PKG_CONFIG"; then +else case e in #( + e) if test -n "$ac_ct_PKG_CONFIG"; then ac_cv_prog_ac_ct_PKG_CONFIG="$ac_ct_PKG_CONFIG" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -28013,7 +29430,8 @@ done done IFS=$as_save_IFS -fi +fi ;; +esac fi ac_ct_PKG_CONFIG=$ac_cv_prog_ac_ct_PKG_CONFIG if test -n "$ac_ct_PKG_CONFIG"; then @@ -28053,7 +29471,8 @@ fi ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr" fi - + ;; +esac fi @@ -28116,12 +29535,13 @@ then : printf "%s\n" "yes" >&6; } have_openssl=yes -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } have_openssl=no - + ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext @@ -28140,15 +29560,16 @@ then : rpath_arg="-Wl,--enable-new-dtags,-rpath=" -else $as_nop - +else case e in #( + e) if test "$ac_sys_system" = "Darwin" then rpath_arg="-Wl,-rpath," else rpath_arg="-Wl,-rpath=" fi - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for --with-openssl-rpath" >&5 @@ -28158,9 +29579,10 @@ printf %s "checking for --with-openssl-rpath... " >&6; } if test ${with_openssl_rpath+y} then : withval=$with_openssl_rpath; -else $as_nop - with_openssl_rpath=no - +else case e in #( + e) with_openssl_rpath=no + ;; +esac fi case $with_openssl_rpath in #( @@ -28186,8 +29608,9 @@ then : OPENSSL_RPATH="$with_openssl_rpath" OPENSSL_LDFLAGS_RPATH="${rpath_arg}$with_openssl_rpath" -else $as_nop - as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5 +else case e in #( + e) as_fn_error $? "--with-openssl-rpath \"$with_openssl_rpath\" is not a directory" "$LINENO" 5 ;; +esac fi ;; @@ -28250,8 +29673,8 @@ printf %s "checking whether OpenSSL provides required ssl module APIs... " >&6; if test ${ac_cv_working_openssl_ssl+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -28281,12 +29704,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_working_openssl_ssl=yes -else $as_nop - ac_cv_working_openssl_ssl=no +else case e in #( + e) ac_cv_working_openssl_ssl=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_openssl_ssl" >&5 printf "%s\n" "$ac_cv_working_openssl_ssl" >&6; } @@ -28313,8 +29738,8 @@ printf %s "checking whether OpenSSL provides required hashlib module APIs... " > if test ${ac_cv_working_openssl_hashlib+y} then : printf %s "(cached) " >&6 -else $as_nop - +else case e in #( + e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -28341,12 +29766,14 @@ _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_working_openssl_hashlib=yes -else $as_nop - ac_cv_working_openssl_hashlib=no +else case e in #( + e) ac_cv_working_openssl_hashlib=no ;; +esac fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_openssl_hashlib" >&5 printf "%s\n" "$ac_cv_working_openssl_hashlib" >&6; } @@ -28388,13 +29815,14 @@ case "$withval" in ;; esac -else $as_nop - +else case e in #( + e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: python" >&5 printf "%s\n" "python" >&6; } printf "%s\n" "#define PY_SSL_DEFAULT_CIPHERS 1" >>confdefs.h - + ;; +esac fi @@ -28420,8 +29848,9 @@ then : ;; esac -else $as_nop - with_builtin_hashlib_hashes=$default_hashlib_hashes +else case e in #( + e) with_builtin_hashlib_hashes=$default_hashlib_hashes ;; +esac fi @@ -28459,7 +29888,8 @@ pkg_failed=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libb2" >&5 printf %s "checking for libb2... " >&6; } -if test -n "$LIBB2_CFLAGS"; then +if test "x$pkg_check_module_LIBB2" != "xno"; then + if test -n "$LIBB2_CFLAGS"; then pkg_cv_LIBB2_CFLAGS="$LIBB2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -28476,7 +29906,7 @@ fi else pkg_failed=untried fi -if test -n "$LIBB2_LIBS"; then + if test -n "$LIBB2_LIBS"; then pkg_cv_LIBB2_LIBS="$LIBB2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ @@ -28493,6 +29923,9 @@ fi else pkg_failed=untried fi +else + pkg_failed=untried +fi @@ -28544,12 +29977,13 @@ then : if test "x$enable_test_modules" = xyes then : TEST_MODULES=yes -else $as_nop - TEST_MODULES=no +else case e in #( + e) TEST_MODULES=no ;; +esac fi -else $as_nop - +else case e in #( + e) case $ac_sys_system/$ac_sys_emscripten_target in #( Emscripten/browser*) : TEST_MODULES=no ;; #( @@ -28557,7 +29991,8 @@ else $as_nop TEST_MODULES=yes ;; esac - + ;; +esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $TEST_MODULES" >&5 @@ -29165,11 +30600,13 @@ then : if test "$ac_cv_func_sem_unlink" = "yes" then : py_cv_module__multiprocessing=yes -else $as_nop - py_cv_module__multiprocessing=missing +else case e in #( + e) py_cv_module__multiprocessing=missing ;; +esac fi -else $as_nop - py_cv_module__multiprocessing=disabled +else case e in #( + e) py_cv_module__multiprocessing=disabled ;; +esac fi fi @@ -29203,11 +30640,13 @@ then : if test "$have_posix_shmem" = "yes" then : py_cv_module__posixshmem=yes -else $as_nop - py_cv_module__posixshmem=missing +else case e in #( + e) py_cv_module__posixshmem=missing ;; +esac fi -else $as_nop - py_cv_module__posixshmem=disabled +else case e in #( + e) py_cv_module__posixshmem=disabled ;; +esac fi fi @@ -29354,11 +30793,13 @@ then : if test "$ac_cv_header_sys_ioctl_h" = "yes" -a "$ac_cv_header_fcntl_h" = "yes" then : py_cv_module_fcntl=yes -else $as_nop - py_cv_module_fcntl=missing +else case e in #( + e) py_cv_module_fcntl=missing ;; +esac fi -else $as_nop - py_cv_module_fcntl=disabled +else case e in #( + e) py_cv_module_fcntl=disabled ;; +esac fi fi @@ -29392,11 +30833,13 @@ then : if test "$ac_cv_header_sys_mman_h" = "yes" -a "$ac_cv_header_sys_stat_h" = "yes" then : py_cv_module_mmap=yes -else $as_nop - py_cv_module_mmap=missing +else case e in #( + e) py_cv_module_mmap=missing ;; +esac fi -else $as_nop - py_cv_module_mmap=disabled +else case e in #( + e) py_cv_module_mmap=disabled ;; +esac fi fi @@ -29430,11 +30873,13 @@ then : if test "$ac_cv_header_sys_socket_h" = "yes" -a "$ac_cv_header_sys_types_h" = "yes" -a "$ac_cv_header_netinet_in_h" = "yes" then : py_cv_module__socket=yes -else $as_nop - py_cv_module__socket=missing +else case e in #( + e) py_cv_module__socket=missing ;; +esac fi -else $as_nop - py_cv_module__socket=disabled +else case e in #( + e) py_cv_module__socket=disabled ;; +esac fi fi @@ -29469,11 +30914,13 @@ then : if test "$ac_cv_func_getgrgid" = yes -o "$ac_cv_func_getgrgid_r" = yes then : py_cv_module_grp=yes -else $as_nop - py_cv_module_grp=missing +else case e in #( + e) py_cv_module_grp=missing ;; +esac fi -else $as_nop - py_cv_module_grp=disabled +else case e in #( + e) py_cv_module_grp=disabled ;; +esac fi fi @@ -29507,11 +30954,13 @@ then : if test "$ac_cv_header_linux_soundcard_h" = yes -o "$ac_cv_header_sys_soundcard_h" = yes then : py_cv_module_ossaudiodev=yes -else $as_nop - py_cv_module_ossaudiodev=missing +else case e in #( + e) py_cv_module_ossaudiodev=missing ;; +esac fi -else $as_nop - py_cv_module_ossaudiodev=disabled +else case e in #( + e) py_cv_module_ossaudiodev=disabled ;; +esac fi fi @@ -29545,11 +30994,13 @@ then : if test "$ac_cv_func_getpwuid" = yes -o "$ac_cv_func_getpwuid_r" = yes then : py_cv_module_pwd=yes -else $as_nop - py_cv_module_pwd=missing +else case e in #( + e) py_cv_module_pwd=missing ;; +esac fi -else $as_nop - py_cv_module_pwd=disabled +else case e in #( + e) py_cv_module_pwd=disabled ;; +esac fi fi @@ -29583,11 +31034,13 @@ then : if test "$ac_cv_header_sys_resource_h" = yes then : py_cv_module_resource=yes -else $as_nop - py_cv_module_resource=missing +else case e in #( + e) py_cv_module_resource=missing ;; +esac fi -else $as_nop - py_cv_module_resource=disabled +else case e in #( + e) py_cv_module_resource=disabled ;; +esac fi fi @@ -29621,11 +31074,13 @@ then : if true then : py_cv_module__scproxy=yes -else $as_nop - py_cv_module__scproxy=missing +else case e in #( + e) py_cv_module__scproxy=missing ;; +esac fi -else $as_nop - py_cv_module__scproxy=disabled +else case e in #( + e) py_cv_module__scproxy=disabled ;; +esac fi fi @@ -29659,11 +31114,13 @@ then : if test "$ac_cv_func_getspent" = yes -o "$ac_cv_func_getspnam" = yes then : py_cv_module_spwd=yes -else $as_nop - py_cv_module_spwd=missing +else case e in #( + e) py_cv_module_spwd=missing ;; +esac fi -else $as_nop - py_cv_module_spwd=disabled +else case e in #( + e) py_cv_module_spwd=disabled ;; +esac fi fi @@ -29697,11 +31154,13 @@ then : if test "$ac_cv_header_syslog_h" = yes then : py_cv_module_syslog=yes -else $as_nop - py_cv_module_syslog=missing +else case e in #( + e) py_cv_module_syslog=missing ;; +esac fi -else $as_nop - py_cv_module_syslog=disabled +else case e in #( + e) py_cv_module_syslog=disabled ;; +esac fi fi @@ -29735,11 +31194,13 @@ then : if test "$ac_cv_header_termios_h" = yes then : py_cv_module_termios=yes -else $as_nop - py_cv_module_termios=missing +else case e in #( + e) py_cv_module_termios=missing ;; +esac fi -else $as_nop - py_cv_module_termios=disabled +else case e in #( + e) py_cv_module_termios=disabled ;; +esac fi fi @@ -29774,11 +31235,13 @@ then : if test "$ac_cv_header_sys_time_h" = "yes" then : py_cv_module_pyexpat=yes -else $as_nop - py_cv_module_pyexpat=missing +else case e in #( + e) py_cv_module_pyexpat=missing ;; +esac fi -else $as_nop - py_cv_module_pyexpat=disabled +else case e in #( + e) py_cv_module_pyexpat=disabled ;; +esac fi fi @@ -29812,11 +31275,13 @@ then : if true then : py_cv_module__elementtree=yes -else $as_nop - py_cv_module__elementtree=missing +else case e in #( + e) py_cv_module__elementtree=missing ;; +esac fi -else $as_nop - py_cv_module__elementtree=disabled +else case e in #( + e) py_cv_module__elementtree=disabled ;; +esac fi fi @@ -30027,11 +31492,13 @@ then : if true then : py_cv_module__md5=yes -else $as_nop - py_cv_module__md5=missing +else case e in #( + e) py_cv_module__md5=missing ;; +esac fi -else $as_nop - py_cv_module__md5=disabled +else case e in #( + e) py_cv_module__md5=disabled ;; +esac fi fi @@ -30065,11 +31532,13 @@ then : if true then : py_cv_module__sha1=yes -else $as_nop - py_cv_module__sha1=missing +else case e in #( + e) py_cv_module__sha1=missing ;; +esac fi -else $as_nop - py_cv_module__sha1=disabled +else case e in #( + e) py_cv_module__sha1=disabled ;; +esac fi fi @@ -30103,11 +31572,13 @@ then : if true then : py_cv_module__sha2=yes -else $as_nop - py_cv_module__sha2=missing +else case e in #( + e) py_cv_module__sha2=missing ;; +esac fi -else $as_nop - py_cv_module__sha2=disabled +else case e in #( + e) py_cv_module__sha2=disabled ;; +esac fi fi @@ -30141,11 +31612,13 @@ then : if true then : py_cv_module__sha3=yes -else $as_nop - py_cv_module__sha3=missing +else case e in #( + e) py_cv_module__sha3=missing ;; +esac fi -else $as_nop - py_cv_module__sha3=disabled +else case e in #( + e) py_cv_module__sha3=disabled ;; +esac fi fi @@ -30179,11 +31652,13 @@ then : if true then : py_cv_module__blake2=yes -else $as_nop - py_cv_module__blake2=missing +else case e in #( + e) py_cv_module__blake2=missing ;; +esac fi -else $as_nop - py_cv_module__blake2=disabled +else case e in #( + e) py_cv_module__blake2=disabled ;; +esac fi fi @@ -30218,11 +31693,13 @@ then : if test "$ac_cv_crypt_crypt" = yes then : py_cv_module__crypt=yes -else $as_nop - py_cv_module__crypt=missing +else case e in #( + e) py_cv_module__crypt=missing ;; +esac fi -else $as_nop - py_cv_module__crypt=disabled +else case e in #( + e) py_cv_module__crypt=disabled ;; +esac fi fi @@ -30256,11 +31733,13 @@ then : if test "$have_libffi" = yes then : py_cv_module__ctypes=yes -else $as_nop - py_cv_module__ctypes=missing +else case e in #( + e) py_cv_module__ctypes=missing ;; +esac fi -else $as_nop - py_cv_module__ctypes=disabled +else case e in #( + e) py_cv_module__ctypes=disabled ;; +esac fi fi @@ -30294,11 +31773,13 @@ then : if test "$have_curses" != "no" then : py_cv_module__curses=yes -else $as_nop - py_cv_module__curses=missing +else case e in #( + e) py_cv_module__curses=missing ;; +esac fi -else $as_nop - py_cv_module__curses=disabled +else case e in #( + e) py_cv_module__curses=disabled ;; +esac fi fi @@ -30333,11 +31814,13 @@ then : if test "$have_panel" != "no" then : py_cv_module__curses_panel=yes -else $as_nop - py_cv_module__curses_panel=missing +else case e in #( + e) py_cv_module__curses_panel=missing ;; +esac fi -else $as_nop - py_cv_module__curses_panel=disabled +else case e in #( + e) py_cv_module__curses_panel=disabled ;; +esac fi fi @@ -30372,11 +31855,13 @@ then : if true then : py_cv_module__decimal=yes -else $as_nop - py_cv_module__decimal=missing +else case e in #( + e) py_cv_module__decimal=missing ;; +esac fi -else $as_nop - py_cv_module__decimal=disabled +else case e in #( + e) py_cv_module__decimal=disabled ;; +esac fi fi @@ -30410,11 +31895,13 @@ then : if test "$have_dbm" != "no" then : py_cv_module__dbm=yes -else $as_nop - py_cv_module__dbm=missing +else case e in #( + e) py_cv_module__dbm=missing ;; +esac fi -else $as_nop - py_cv_module__dbm=disabled +else case e in #( + e) py_cv_module__dbm=disabled ;; +esac fi fi @@ -30448,11 +31935,13 @@ then : if test "$have_gdbm" = yes then : py_cv_module__gdbm=yes -else $as_nop - py_cv_module__gdbm=missing +else case e in #( + e) py_cv_module__gdbm=missing ;; +esac fi -else $as_nop - py_cv_module__gdbm=disabled +else case e in #( + e) py_cv_module__gdbm=disabled ;; +esac fi fi @@ -30486,11 +31975,13 @@ then : if test "$have_nis" = yes -a "$ac_cv_header_rpc_rpc_h" = yes then : py_cv_module_nis=yes -else $as_nop - py_cv_module_nis=missing +else case e in #( + e) py_cv_module_nis=missing ;; +esac fi -else $as_nop - py_cv_module_nis=disabled +else case e in #( + e) py_cv_module_nis=disabled ;; +esac fi fi @@ -30524,11 +32015,13 @@ then : if test "$with_readline" != "no" then : py_cv_module_readline=yes -else $as_nop - py_cv_module_readline=missing +else case e in #( + e) py_cv_module_readline=missing ;; +esac fi -else $as_nop - py_cv_module_readline=disabled +else case e in #( + e) py_cv_module_readline=disabled ;; +esac fi fi @@ -30562,11 +32055,13 @@ then : if test "$have_supported_sqlite3" = "yes" then : py_cv_module__sqlite3=yes -else $as_nop - py_cv_module__sqlite3=missing +else case e in #( + e) py_cv_module__sqlite3=missing ;; +esac fi -else $as_nop - py_cv_module__sqlite3=disabled +else case e in #( + e) py_cv_module__sqlite3=disabled ;; +esac fi fi @@ -30600,11 +32095,13 @@ then : if test "$have_tcltk" = "yes" then : py_cv_module__tkinter=yes -else $as_nop - py_cv_module__tkinter=missing +else case e in #( + e) py_cv_module__tkinter=missing ;; +esac fi -else $as_nop - py_cv_module__tkinter=disabled +else case e in #( + e) py_cv_module__tkinter=disabled ;; +esac fi fi @@ -30638,11 +32135,13 @@ then : if test "$have_uuid" = "yes" then : py_cv_module__uuid=yes -else $as_nop - py_cv_module__uuid=missing +else case e in #( + e) py_cv_module__uuid=missing ;; +esac fi -else $as_nop - py_cv_module__uuid=disabled +else case e in #( + e) py_cv_module__uuid=disabled ;; +esac fi fi @@ -30677,11 +32176,13 @@ then : if test "$have_zlib" = yes then : py_cv_module_zlib=yes -else $as_nop - py_cv_module_zlib=missing +else case e in #( + e) py_cv_module_zlib=missing ;; +esac fi -else $as_nop - py_cv_module_zlib=disabled +else case e in #( + e) py_cv_module_zlib=disabled ;; +esac fi fi @@ -30737,11 +32238,13 @@ then : if test "$have_bzip2" = yes then : py_cv_module__bz2=yes -else $as_nop - py_cv_module__bz2=missing +else case e in #( + e) py_cv_module__bz2=missing ;; +esac fi -else $as_nop - py_cv_module__bz2=disabled +else case e in #( + e) py_cv_module__bz2=disabled ;; +esac fi fi @@ -30775,11 +32278,13 @@ then : if test "$have_liblzma" = yes then : py_cv_module__lzma=yes -else $as_nop - py_cv_module__lzma=missing +else case e in #( + e) py_cv_module__lzma=missing ;; +esac fi -else $as_nop - py_cv_module__lzma=disabled +else case e in #( + e) py_cv_module__lzma=disabled ;; +esac fi fi @@ -30814,11 +32319,13 @@ then : if test "$ac_cv_working_openssl_ssl" = yes then : py_cv_module__ssl=yes -else $as_nop - py_cv_module__ssl=missing +else case e in #( + e) py_cv_module__ssl=missing ;; +esac fi -else $as_nop - py_cv_module__ssl=disabled +else case e in #( + e) py_cv_module__ssl=disabled ;; +esac fi fi @@ -30852,11 +32359,13 @@ then : if test "$ac_cv_working_openssl_hashlib" = yes then : py_cv_module__hashlib=yes -else $as_nop - py_cv_module__hashlib=missing +else case e in #( + e) py_cv_module__hashlib=missing ;; +esac fi -else $as_nop - py_cv_module__hashlib=disabled +else case e in #( + e) py_cv_module__hashlib=disabled ;; +esac fi fi @@ -30891,11 +32400,13 @@ then : if true then : py_cv_module__testcapi=yes -else $as_nop - py_cv_module__testcapi=missing +else case e in #( + e) py_cv_module__testcapi=missing ;; +esac fi -else $as_nop - py_cv_module__testcapi=disabled +else case e in #( + e) py_cv_module__testcapi=disabled ;; +esac fi fi @@ -30929,11 +32440,13 @@ then : if true then : py_cv_module__testclinic=yes -else $as_nop - py_cv_module__testclinic=missing +else case e in #( + e) py_cv_module__testclinic=missing ;; +esac fi -else $as_nop - py_cv_module__testclinic=disabled +else case e in #( + e) py_cv_module__testclinic=disabled ;; +esac fi fi @@ -30967,11 +32480,13 @@ then : if true then : py_cv_module__testinternalcapi=yes -else $as_nop - py_cv_module__testinternalcapi=missing +else case e in #( + e) py_cv_module__testinternalcapi=missing ;; +esac fi -else $as_nop - py_cv_module__testinternalcapi=disabled +else case e in #( + e) py_cv_module__testinternalcapi=disabled ;; +esac fi fi @@ -31005,11 +32520,13 @@ then : if true then : py_cv_module__testbuffer=yes -else $as_nop - py_cv_module__testbuffer=missing +else case e in #( + e) py_cv_module__testbuffer=missing ;; +esac fi -else $as_nop - py_cv_module__testbuffer=disabled +else case e in #( + e) py_cv_module__testbuffer=disabled ;; +esac fi fi @@ -31043,11 +32560,13 @@ then : if test "$ac_cv_func_dlopen" = yes then : py_cv_module__testimportmultiple=yes -else $as_nop - py_cv_module__testimportmultiple=missing +else case e in #( + e) py_cv_module__testimportmultiple=missing ;; +esac fi -else $as_nop - py_cv_module__testimportmultiple=disabled +else case e in #( + e) py_cv_module__testimportmultiple=disabled ;; +esac fi fi @@ -31081,11 +32600,13 @@ then : if test "$ac_cv_func_dlopen" = yes then : py_cv_module__testmultiphase=yes -else $as_nop - py_cv_module__testmultiphase=missing +else case e in #( + e) py_cv_module__testmultiphase=missing ;; +esac fi -else $as_nop - py_cv_module__testmultiphase=disabled +else case e in #( + e) py_cv_module__testmultiphase=disabled ;; +esac fi fi @@ -31119,11 +32640,13 @@ then : if true then : py_cv_module_xxsubtype=yes -else $as_nop - py_cv_module_xxsubtype=missing +else case e in #( + e) py_cv_module_xxsubtype=missing ;; +esac fi -else $as_nop - py_cv_module_xxsubtype=disabled +else case e in #( + e) py_cv_module_xxsubtype=disabled ;; +esac fi fi @@ -31157,11 +32680,13 @@ then : if true then : py_cv_module__xxtestfuzz=yes -else $as_nop - py_cv_module__xxtestfuzz=missing +else case e in #( + e) py_cv_module__xxtestfuzz=missing ;; +esac fi -else $as_nop - py_cv_module__xxtestfuzz=disabled +else case e in #( + e) py_cv_module__xxtestfuzz=disabled ;; +esac fi fi @@ -31195,11 +32720,13 @@ then : if test "$have_libffi" = yes -a "$ac_cv_func_dlopen" = yes then : py_cv_module__ctypes_test=yes -else $as_nop - py_cv_module__ctypes_test=missing +else case e in #( + e) py_cv_module__ctypes_test=missing ;; +esac fi -else $as_nop - py_cv_module__ctypes_test=disabled +else case e in #( + e) py_cv_module__ctypes_test=disabled ;; +esac fi fi @@ -31234,11 +32761,13 @@ then : if test "$ac_cv_func_dlopen" = yes then : py_cv_module_xxlimited=yes -else $as_nop - py_cv_module_xxlimited=missing +else case e in #( + e) py_cv_module_xxlimited=missing ;; +esac fi -else $as_nop - py_cv_module_xxlimited=disabled +else case e in #( + e) py_cv_module_xxlimited=disabled ;; +esac fi fi @@ -31272,11 +32801,13 @@ then : if test "$ac_cv_func_dlopen" = yes then : py_cv_module_xxlimited_35=yes -else $as_nop - py_cv_module_xxlimited_35=missing +else case e in #( + e) py_cv_module_xxlimited_35=missing ;; +esac fi -else $as_nop - py_cv_module_xxlimited_35=disabled +else case e in #( + e) py_cv_module_xxlimited_35=disabled ;; +esac fi fi @@ -31320,8 +32851,8 @@ cat >confcache <<\_ACEOF # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the +# 'ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* 'ac_cv_foo' will be assigned the # following values. _ACEOF @@ -31351,14 +32882,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote + # 'set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) - # `set' quotes correctly as required by POSIX, so do not add quotes. + # 'set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | @@ -31781,7 +33312,6 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh @@ -31790,12 +33320,13 @@ then : # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop - case `(set -o) 2>/dev/null` in #( +else case e in #( + e) case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; +esac ;; esac fi @@ -31867,7 +33398,7 @@ IFS=$as_save_IFS ;; esac -# We did not find ourselves, most probably we were run as `sh COMMAND' +# We did not find ourselves, most probably we were run as 'sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 @@ -31896,7 +33427,6 @@ as_fn_error () } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -31936,11 +33466,12 @@ then : { eval $1+=\$2 }' -else $as_nop - as_fn_append () +else case e in #( + e) as_fn_append () { eval $1=\$$1\$2 - } + } ;; +esac fi # as_fn_append # as_fn_arith ARG... @@ -31954,11 +33485,12 @@ then : { as_val=$(( $* )) }' -else $as_nop - as_fn_arith () +else case e in #( + e) as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` - } + } ;; +esac fi # as_fn_arith @@ -32041,9 +33573,9 @@ if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -pR'. + # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. + # In both cases, we have to default to 'cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then @@ -32124,10 +33656,12 @@ as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. -as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" +as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" +as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated # Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" +as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" +as_tr_sh="eval sed '$as_sed_sh'" # deprecated exec 6>&1 @@ -32143,7 +33677,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # values after options handling. ac_log=" This file was extended by python $as_me 3.12, which was -generated by GNU Autoconf 2.71. Invocation command line was +generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -32174,7 +33708,7 @@ _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions +'$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. @@ -32207,10 +33741,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ python config.status 3.12 -configured by $0, generated by GNU Autoconf 2.71, +configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2023 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -32271,8 +33805,8 @@ do ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; + as_fn_error $? "ambiguous option: '$1' +Try '$0 --help' for more information.";; --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ @@ -32280,8 +33814,8 @@ Try \`$0 --help' for more information.";; ac_cs_silent=: ;; # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; + -*) as_fn_error $? "unrecognized option: '$1' +Try '$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; @@ -32342,7 +33876,7 @@ do "Modules/Setup.stdlib") CONFIG_FILES="$CONFIG_FILES Modules/Setup.stdlib" ;; "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;; - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; esac done @@ -32361,7 +33895,7 @@ fi # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. +# after its creation but before its name has been assigned to '$tmp'. $debug || { tmp= ac_tmp= @@ -32385,7 +33919,7 @@ ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. +# This happens for instance with './config.status config.h'. if test -n "$CONFIG_FILES"; then @@ -32543,13 +34077,13 @@ fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. +# This happens for instance with './config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF -# Transform confdefs.h into an awk script `defines.awk', embedded as +# Transform confdefs.h into an awk script 'defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. @@ -32659,7 +34193,7 @@ do esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -32681,19 +34215,19 @@ do -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. + # because $ac_f cannot contain ':'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done - # Let's still pretend it is `configure' which instantiates (i.e., don't + # Let's still pretend it is 'configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` @@ -32826,7 +34360,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 esac _ACEOF -# Neutralize VPATH when `$srcdir' = `.'. +# Neutralize VPATH when '$srcdir' = '.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 @@ -32857,9 +34391,9 @@ test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" diff --git a/pyconfig.h.in b/pyconfig.h.in index 6d370f6664c10c..ea2ea581557139 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -16,13 +16,13 @@ support for AIX C++ shared extension modules. */ #undef AIX_GENUINE_CPLUSPLUS -/* The normal alignment of `long', in bytes. */ +/* The normal alignment of 'long', in bytes. */ #undef ALIGNOF_LONG -/* The normal alignment of `max_align_t', in bytes. */ +/* The normal alignment of 'max_align_t', in bytes. */ #undef ALIGNOF_MAX_ALIGN_T -/* The normal alignment of `size_t', in bytes. */ +/* The normal alignment of 'size_t', in bytes. */ #undef ALIGNOF_SIZE_T /* Alternative SOABI used in debug build to load C extensions built in release @@ -57,16 +57,16 @@ /* Define if you have the 'accept' function. */ #undef HAVE_ACCEPT -/* Define to 1 if you have the `accept4' function. */ +/* Define to 1 if you have the 'accept4' function. */ #undef HAVE_ACCEPT4 -/* Define to 1 if you have the `acosh' function. */ +/* Define to 1 if you have the 'acosh' function. */ #undef HAVE_ACOSH /* struct addrinfo (netdb.h) */ #undef HAVE_ADDRINFO -/* Define to 1 if you have the `alarm' function. */ +/* Define to 1 if you have the 'alarm' function. */ #undef HAVE_ALARM /* Define if aligned memory access is required */ @@ -78,19 +78,19 @@ /* Define this if your time.h defines altzone. */ #undef HAVE_ALTZONE -/* Define to 1 if you have the `asinh' function. */ +/* Define to 1 if you have the 'asinh' function. */ #undef HAVE_ASINH /* Define to 1 if you have the header file. */ #undef HAVE_ASM_TYPES_H -/* Define to 1 if you have the `atanh' function. */ +/* Define to 1 if you have the 'atanh' function. */ #undef HAVE_ATANH /* Define if you have the 'bind' function. */ #undef HAVE_BIND -/* Define to 1 if you have the `bind_textdomain_codeset' function. */ +/* Define to 1 if you have the 'bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the header file. */ @@ -133,37 +133,37 @@ /* Define to 1 if you have the 'chflags' function. */ #undef HAVE_CHFLAGS -/* Define to 1 if you have the `chmod' function. */ +/* Define to 1 if you have the 'chmod' function. */ #undef HAVE_CHMOD -/* Define to 1 if you have the `chown' function. */ +/* Define to 1 if you have the 'chown' function. */ #undef HAVE_CHOWN /* Define if you have the 'chroot' function. */ #undef HAVE_CHROOT -/* Define to 1 if you have the `clock' function. */ +/* Define to 1 if you have the 'clock' function. */ #undef HAVE_CLOCK -/* Define to 1 if you have the `clock_getres' function. */ +/* Define to 1 if you have the 'clock_getres' function. */ #undef HAVE_CLOCK_GETRES -/* Define to 1 if you have the `clock_gettime' function. */ +/* Define to 1 if you have the 'clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME -/* Define to 1 if you have the `clock_nanosleep' function. */ +/* Define to 1 if you have the 'clock_nanosleep' function. */ #undef HAVE_CLOCK_NANOSLEEP -/* Define to 1 if you have the `clock_settime' function. */ +/* Define to 1 if you have the 'clock_settime' function. */ #undef HAVE_CLOCK_SETTIME -/* Define to 1 if you have the `close_range' function. */ +/* Define to 1 if you have the 'close_range' function. */ #undef HAVE_CLOSE_RANGE /* Define if the C compiler supports computed gotos. */ #undef HAVE_COMPUTED_GOTOS -/* Define to 1 if you have the `confstr' function. */ +/* Define to 1 if you have the 'confstr' function. */ #undef HAVE_CONFSTR /* Define to 1 if you have the header file. */ @@ -172,7 +172,7 @@ /* Define if you have the 'connect' function. */ #undef HAVE_CONNECT -/* Define to 1 if you have the `copy_file_range' function. */ +/* Define to 1 if you have the 'copy_file_range' function. */ #undef HAVE_COPY_FILE_RANGE /* Define to 1 if you have the header file. */ @@ -181,7 +181,7 @@ /* Define if you have the crypt_r() function. */ #undef HAVE_CRYPT_R -/* Define to 1 if you have the `ctermid' function. */ +/* Define to 1 if you have the 'ctermid' function. */ #undef HAVE_CTERMID /* Define if you have the 'ctermid_r' function. */ @@ -226,39 +226,39 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DB_H -/* Define to 1 if you have the declaration of `RTLD_DEEPBIND', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_DEEPBIND', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_DEEPBIND -/* Define to 1 if you have the declaration of `RTLD_GLOBAL', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_GLOBAL', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_GLOBAL -/* Define to 1 if you have the declaration of `RTLD_LAZY', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_LAZY', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_LAZY -/* Define to 1 if you have the declaration of `RTLD_LOCAL', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_LOCAL', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_LOCAL -/* Define to 1 if you have the declaration of `RTLD_MEMBER', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_MEMBER', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_MEMBER -/* Define to 1 if you have the declaration of `RTLD_NODELETE', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_NODELETE', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_NODELETE -/* Define to 1 if you have the declaration of `RTLD_NOLOAD', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_NOLOAD', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_NOLOAD -/* Define to 1 if you have the declaration of `RTLD_NOW', and to 0 if you +/* Define to 1 if you have the declaration of 'RTLD_NOW', and to 0 if you don't. */ #undef HAVE_DECL_RTLD_NOW -/* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. +/* Define to 1 if you have the declaration of 'tzname', and to 0 if you don't. */ #undef HAVE_DECL_TZNAME @@ -277,7 +277,7 @@ /* Define to 1 if the dirent structure has a d_type field */ #undef HAVE_DIRENT_D_TYPE -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_DIRENT_H @@ -287,16 +287,16 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the `dlopen' function. */ +/* Define to 1 if you have the 'dlopen' function. */ #undef HAVE_DLOPEN -/* Define to 1 if you have the `dup' function. */ +/* Define to 1 if you have the 'dup' function. */ #undef HAVE_DUP -/* Define to 1 if you have the `dup2' function. */ +/* Define to 1 if you have the 'dup2' function. */ #undef HAVE_DUP2 -/* Define to 1 if you have the `dup3' function. */ +/* Define to 1 if you have the 'dup3' function. */ #undef HAVE_DUP3 /* Define if you have the '_dyld_shared_cache_contains_path' function. */ @@ -317,10 +317,10 @@ /* Define if you have the 'epoll_create1' function. */ #undef HAVE_EPOLL_CREATE1 -/* Define to 1 if you have the `erf' function. */ +/* Define to 1 if you have the 'erf' function. */ #undef HAVE_ERF -/* Define to 1 if you have the `erfc' function. */ +/* Define to 1 if you have the 'erfc' function. */ #undef HAVE_ERFC /* Define to 1 if you have the header file. */ @@ -329,34 +329,34 @@ /* Define if you have the 'eventfd' function. */ #undef HAVE_EVENTFD -/* Define to 1 if you have the `execv' function. */ +/* Define to 1 if you have the 'execv' function. */ #undef HAVE_EXECV -/* Define to 1 if you have the `explicit_bzero' function. */ +/* Define to 1 if you have the 'explicit_bzero' function. */ #undef HAVE_EXPLICIT_BZERO -/* Define to 1 if you have the `explicit_memset' function. */ +/* Define to 1 if you have the 'explicit_memset' function. */ #undef HAVE_EXPLICIT_MEMSET -/* Define to 1 if you have the `expm1' function. */ +/* Define to 1 if you have the 'expm1' function. */ #undef HAVE_EXPM1 -/* Define to 1 if you have the `faccessat' function. */ +/* Define to 1 if you have the 'faccessat' function. */ #undef HAVE_FACCESSAT /* Define if you have the 'fchdir' function. */ #undef HAVE_FCHDIR -/* Define to 1 if you have the `fchmod' function. */ +/* Define to 1 if you have the 'fchmod' function. */ #undef HAVE_FCHMOD -/* Define to 1 if you have the `fchmodat' function. */ +/* Define to 1 if you have the 'fchmodat' function. */ #undef HAVE_FCHMODAT -/* Define to 1 if you have the `fchown' function. */ +/* Define to 1 if you have the 'fchown' function. */ #undef HAVE_FCHOWN -/* Define to 1 if you have the `fchownat' function. */ +/* Define to 1 if you have the 'fchownat' function. */ #undef HAVE_FCHOWNAT /* Define to 1 if you have the header file. */ @@ -365,13 +365,13 @@ /* Define if you have the 'fdatasync' function. */ #undef HAVE_FDATASYNC -/* Define to 1 if you have the `fdopendir' function. */ +/* Define to 1 if you have the 'fdopendir' function. */ #undef HAVE_FDOPENDIR -/* Define to 1 if you have the `fdwalk' function. */ +/* Define to 1 if you have the 'fdwalk' function. */ #undef HAVE_FDWALK -/* Define to 1 if you have the `fexecve' function. */ +/* Define to 1 if you have the 'fexecve' function. */ #undef HAVE_FEXECVE /* Define if you have the 'ffi_closure_alloc' function. */ @@ -383,58 +383,58 @@ /* Define if you have the 'ffi_prep_closure_loc' function. */ #undef HAVE_FFI_PREP_CLOSURE_LOC -/* Define to 1 if you have the `flock' function. */ +/* Define to 1 if you have the 'flock' function. */ #undef HAVE_FLOCK -/* Define to 1 if you have the `fork' function. */ +/* Define to 1 if you have the 'fork' function. */ #undef HAVE_FORK -/* Define to 1 if you have the `fork1' function. */ +/* Define to 1 if you have the 'fork1' function. */ #undef HAVE_FORK1 -/* Define to 1 if you have the `forkpty' function. */ +/* Define to 1 if you have the 'forkpty' function. */ #undef HAVE_FORKPTY -/* Define to 1 if you have the `fpathconf' function. */ +/* Define to 1 if you have the 'fpathconf' function. */ #undef HAVE_FPATHCONF -/* Define to 1 if you have the `fseek64' function. */ +/* Define to 1 if you have the 'fseek64' function. */ #undef HAVE_FSEEK64 -/* Define to 1 if you have the `fseeko' function. */ +/* Define to 1 if you have the 'fseeko' function. */ #undef HAVE_FSEEKO -/* Define to 1 if you have the `fstatat' function. */ +/* Define to 1 if you have the 'fstatat' function. */ #undef HAVE_FSTATAT -/* Define to 1 if you have the `fstatvfs' function. */ +/* Define to 1 if you have the 'fstatvfs' function. */ #undef HAVE_FSTATVFS /* Define if you have the 'fsync' function. */ #undef HAVE_FSYNC -/* Define to 1 if you have the `ftell64' function. */ +/* Define to 1 if you have the 'ftell64' function. */ #undef HAVE_FTELL64 -/* Define to 1 if you have the `ftello' function. */ +/* Define to 1 if you have the 'ftello' function. */ #undef HAVE_FTELLO -/* Define to 1 if you have the `ftime' function. */ +/* Define to 1 if you have the 'ftime' function. */ #undef HAVE_FTIME -/* Define to 1 if you have the `ftruncate' function. */ +/* Define to 1 if you have the 'ftruncate' function. */ #undef HAVE_FTRUNCATE -/* Define to 1 if you have the `futimens' function. */ +/* Define to 1 if you have the 'futimens' function. */ #undef HAVE_FUTIMENS -/* Define to 1 if you have the `futimes' function. */ +/* Define to 1 if you have the 'futimes' function. */ #undef HAVE_FUTIMES -/* Define to 1 if you have the `futimesat' function. */ +/* Define to 1 if you have the 'futimesat' function. */ #undef HAVE_FUTIMESAT -/* Define to 1 if you have the `gai_strerror' function. */ +/* Define to 1 if you have the 'gai_strerror' function. */ #undef HAVE_GAI_STRERROR /* Define if we can use gcc inline assembler to get and set mc68881 fpcr */ @@ -465,37 +465,37 @@ /* Define this if you have flockfile(), getc_unlocked(), and funlockfile() */ #undef HAVE_GETC_UNLOCKED -/* Define to 1 if you have the `getegid' function. */ +/* Define to 1 if you have the 'getegid' function. */ #undef HAVE_GETEGID -/* Define to 1 if you have the `getentropy' function. */ +/* Define to 1 if you have the 'getentropy' function. */ #undef HAVE_GETENTROPY -/* Define to 1 if you have the `geteuid' function. */ +/* Define to 1 if you have the 'geteuid' function. */ #undef HAVE_GETEUID -/* Define to 1 if you have the `getgid' function. */ +/* Define to 1 if you have the 'getgid' function. */ #undef HAVE_GETGID -/* Define to 1 if you have the `getgrgid' function. */ +/* Define to 1 if you have the 'getgrgid' function. */ #undef HAVE_GETGRGID -/* Define to 1 if you have the `getgrgid_r' function. */ +/* Define to 1 if you have the 'getgrgid_r' function. */ #undef HAVE_GETGRGID_R -/* Define to 1 if you have the `getgrnam_r' function. */ +/* Define to 1 if you have the 'getgrnam_r' function. */ #undef HAVE_GETGRNAM_R -/* Define to 1 if you have the `getgrouplist' function. */ +/* Define to 1 if you have the 'getgrouplist' function. */ #undef HAVE_GETGROUPLIST -/* Define to 1 if you have the `getgroups' function. */ +/* Define to 1 if you have the 'getgroups' function. */ #undef HAVE_GETGROUPS /* Define if you have the 'gethostbyaddr' function. */ #undef HAVE_GETHOSTBYADDR -/* Define to 1 if you have the `gethostbyname' function. */ +/* Define to 1 if you have the 'gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define this if you have some version of gethostbyname_r() */ @@ -510,19 +510,19 @@ /* Define this if you have the 6-arg version of gethostbyname_r(). */ #undef HAVE_GETHOSTBYNAME_R_6_ARG -/* Define to 1 if you have the `gethostname' function. */ +/* Define to 1 if you have the 'gethostname' function. */ #undef HAVE_GETHOSTNAME -/* Define to 1 if you have the `getitimer' function. */ +/* Define to 1 if you have the 'getitimer' function. */ #undef HAVE_GETITIMER -/* Define to 1 if you have the `getloadavg' function. */ +/* Define to 1 if you have the 'getloadavg' function. */ #undef HAVE_GETLOADAVG -/* Define to 1 if you have the `getlogin' function. */ +/* Define to 1 if you have the 'getlogin' function. */ #undef HAVE_GETLOGIN -/* Define to 1 if you have the `getnameinfo' function. */ +/* Define to 1 if you have the 'getnameinfo' function. */ #undef HAVE_GETNAMEINFO /* Define if you have the 'getpagesize' function. */ @@ -531,34 +531,34 @@ /* Define if you have the 'getpeername' function. */ #undef HAVE_GETPEERNAME -/* Define to 1 if you have the `getpgid' function. */ +/* Define to 1 if you have the 'getpgid' function. */ #undef HAVE_GETPGID -/* Define to 1 if you have the `getpgrp' function. */ +/* Define to 1 if you have the 'getpgrp' function. */ #undef HAVE_GETPGRP -/* Define to 1 if you have the `getpid' function. */ +/* Define to 1 if you have the 'getpid' function. */ #undef HAVE_GETPID -/* Define to 1 if you have the `getppid' function. */ +/* Define to 1 if you have the 'getppid' function. */ #undef HAVE_GETPPID -/* Define to 1 if you have the `getpriority' function. */ +/* Define to 1 if you have the 'getpriority' function. */ #undef HAVE_GETPRIORITY /* Define if you have the 'getprotobyname' function. */ #undef HAVE_GETPROTOBYNAME -/* Define to 1 if you have the `getpwent' function. */ +/* Define to 1 if you have the 'getpwent' function. */ #undef HAVE_GETPWENT -/* Define to 1 if you have the `getpwnam_r' function. */ +/* Define to 1 if you have the 'getpwnam_r' function. */ #undef HAVE_GETPWNAM_R -/* Define to 1 if you have the `getpwuid' function. */ +/* Define to 1 if you have the 'getpwuid' function. */ #undef HAVE_GETPWUID -/* Define to 1 if you have the `getpwuid_r' function. */ +/* Define to 1 if you have the 'getpwuid_r' function. */ #undef HAVE_GETPWUID_R /* Define to 1 if the getrandom() function is available */ @@ -567,13 +567,13 @@ /* Define to 1 if the Linux getrandom() syscall is available */ #undef HAVE_GETRANDOM_SYSCALL -/* Define to 1 if you have the `getresgid' function. */ +/* Define to 1 if you have the 'getresgid' function. */ #undef HAVE_GETRESGID -/* Define to 1 if you have the `getresuid' function. */ +/* Define to 1 if you have the 'getresuid' function. */ #undef HAVE_GETRESUID -/* Define to 1 if you have the `getrusage' function. */ +/* Define to 1 if you have the 'getrusage' function. */ #undef HAVE_GETRUSAGE /* Define if you have the 'getservbyname' function. */ @@ -582,22 +582,22 @@ /* Define if you have the 'getservbyport' function. */ #undef HAVE_GETSERVBYPORT -/* Define to 1 if you have the `getsid' function. */ +/* Define to 1 if you have the 'getsid' function. */ #undef HAVE_GETSID /* Define if you have the 'getsockname' function. */ #undef HAVE_GETSOCKNAME -/* Define to 1 if you have the `getspent' function. */ +/* Define to 1 if you have the 'getspent' function. */ #undef HAVE_GETSPENT -/* Define to 1 if you have the `getspnam' function. */ +/* Define to 1 if you have the 'getspnam' function. */ #undef HAVE_GETSPNAM -/* Define to 1 if you have the `getuid' function. */ +/* Define to 1 if you have the 'getuid' function. */ #undef HAVE_GETUID -/* Define to 1 if you have the `getwd' function. */ +/* Define to 1 if you have the 'getwd' function. */ #undef HAVE_GETWD /* Define if glibc has incorrect _FORTIFY_SOURCE wrappers for memmove and @@ -616,7 +616,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_IEEEFP_H -/* Define to 1 if you have the `if_nameindex' function. */ +/* Define to 1 if you have the 'if_nameindex' function. */ #undef HAVE_IF_NAMEINDEX /* Define if you have the 'inet_aton' function. */ @@ -628,7 +628,7 @@ /* Define if you have the 'inet_pton' function. */ #undef HAVE_INET_PTON -/* Define to 1 if you have the `initgroups' function. */ +/* Define to 1 if you have the 'initgroups' function. */ #undef HAVE_INITGROUPS /* Define to 1 if you have the header file. */ @@ -640,10 +640,10 @@ /* Define if gcc has the ipa-pure-const bug. */ #undef HAVE_IPA_PURE_CONST_BUG -/* Define to 1 if you have the `kill' function. */ +/* Define to 1 if you have the 'kill' function. */ #undef HAVE_KILL -/* Define to 1 if you have the `killpg' function. */ +/* Define to 1 if you have the 'killpg' function. */ #undef HAVE_KILLPG /* Define if you have the 'kqueue' function. */ @@ -661,10 +661,10 @@ /* Define to 1 if you have the 'lchflags' function. */ #undef HAVE_LCHFLAGS -/* Define to 1 if you have the `lchmod' function. */ +/* Define to 1 if you have the 'lchmod' function. */ #undef HAVE_LCHMOD -/* Define to 1 if you have the `lchown' function. */ +/* Define to 1 if you have the 'lchown' function. */ #undef HAVE_LCHOWN /* Define to 1 if you want to build _blake2 module with libb2 */ @@ -673,25 +673,25 @@ /* Define to 1 if you have the `db' library (-ldb). */ #undef HAVE_LIBDB -/* Define to 1 if you have the `dl' library (-ldl). */ +/* Define to 1 if you have the 'dl' library (-ldl). */ #undef HAVE_LIBDL -/* Define to 1 if you have the `dld' library (-ldld). */ +/* Define to 1 if you have the 'dld' library (-ldld). */ #undef HAVE_LIBDLD -/* Define to 1 if you have the `ieee' library (-lieee). */ +/* Define to 1 if you have the 'ieee' library (-lieee). */ #undef HAVE_LIBIEEE /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H -/* Define to 1 if you have the `resolv' library (-lresolv). */ +/* Define to 1 if you have the 'resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV -/* Define to 1 if you have the `sendfile' library (-lsendfile). */ +/* Define to 1 if you have the 'sendfile' library (-lsendfile). */ #undef HAVE_LIBSENDFILE -/* Define to 1 if you have the `sqlite3' library (-lsqlite3). */ +/* Define to 1 if you have the 'sqlite3' library (-lsqlite3). */ #undef HAVE_LIBSQLITE3 /* Define to 1 if you have the header file. */ @@ -700,7 +700,7 @@ /* Define if you have the 'link' function. */ #undef HAVE_LINK -/* Define to 1 if you have the `linkat' function. */ +/* Define to 1 if you have the 'linkat' function. */ #undef HAVE_LINKAT /* Define to 1 if you have the header file. */ @@ -757,73 +757,73 @@ /* Define if you have the 'listen' function. */ #undef HAVE_LISTEN -/* Define to 1 if you have the `lockf' function. */ +/* Define to 1 if you have the 'lockf' function. */ #undef HAVE_LOCKF -/* Define to 1 if you have the `log1p' function. */ +/* Define to 1 if you have the 'log1p' function. */ #undef HAVE_LOG1P -/* Define to 1 if you have the `log2' function. */ +/* Define to 1 if you have the 'log2' function. */ #undef HAVE_LOG2 /* Define to 1 if you have the `login_tty' function. */ #undef HAVE_LOGIN_TTY -/* Define to 1 if the system has the type `long double'. */ +/* Define to 1 if the system has the type 'long double'. */ #undef HAVE_LONG_DOUBLE -/* Define to 1 if you have the `lstat' function. */ +/* Define to 1 if you have the 'lstat' function. */ #undef HAVE_LSTAT -/* Define to 1 if you have the `lutimes' function. */ +/* Define to 1 if you have the 'lutimes' function. */ #undef HAVE_LUTIMES /* Define to 1 if you have the header file. */ #undef HAVE_LZMA_H -/* Define to 1 if you have the `madvise' function. */ +/* Define to 1 if you have the 'madvise' function. */ #undef HAVE_MADVISE /* Define this if you have the makedev macro. */ #undef HAVE_MAKEDEV -/* Define to 1 if you have the `mbrtowc' function. */ +/* Define to 1 if you have the 'mbrtowc' function. */ #undef HAVE_MBRTOWC /* Define if you have the 'memfd_create' function. */ #undef HAVE_MEMFD_CREATE -/* Define to 1 if you have the `memrchr' function. */ +/* Define to 1 if you have the 'memrchr' function. */ #undef HAVE_MEMRCHR /* Define to 1 if you have the header file. */ #undef HAVE_MINIX_CONFIG_H -/* Define to 1 if you have the `mkdirat' function. */ +/* Define to 1 if you have the 'mkdirat' function. */ #undef HAVE_MKDIRAT -/* Define to 1 if you have the `mkfifo' function. */ +/* Define to 1 if you have the 'mkfifo' function. */ #undef HAVE_MKFIFO -/* Define to 1 if you have the `mkfifoat' function. */ +/* Define to 1 if you have the 'mkfifoat' function. */ #undef HAVE_MKFIFOAT -/* Define to 1 if you have the `mknod' function. */ +/* Define to 1 if you have the 'mknod' function. */ #undef HAVE_MKNOD -/* Define to 1 if you have the `mknodat' function. */ +/* Define to 1 if you have the 'mknodat' function. */ #undef HAVE_MKNODAT -/* Define to 1 if you have the `mktime' function. */ +/* Define to 1 if you have the 'mktime' function. */ #undef HAVE_MKTIME -/* Define to 1 if you have the `mmap' function. */ +/* Define to 1 if you have the 'mmap' function. */ #undef HAVE_MMAP -/* Define to 1 if you have the `mremap' function. */ +/* Define to 1 if you have the 'mremap' function. */ #undef HAVE_MREMAP -/* Define to 1 if you have the `nanosleep' function. */ +/* Define to 1 if you have the 'nanosleep' function. */ #undef HAVE_NANOSLEEP /* Define to 1 if you have the `ncursesw' library. */ @@ -835,7 +835,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NDBM_H -/* Define to 1 if you have the header file, and it defines `DIR'. */ +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ @@ -856,65 +856,65 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_H -/* Define to 1 if you have the `nice' function. */ +/* Define to 1 if you have the 'nice' function. */ #undef HAVE_NICE /* Define if the internal form of wchar_t in non-Unicode locales is not Unicode. */ #undef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION -/* Define to 1 if you have the `openat' function. */ +/* Define to 1 if you have the 'openat' function. */ #undef HAVE_OPENAT -/* Define to 1 if you have the `opendir' function. */ +/* Define to 1 if you have the 'opendir' function. */ #undef HAVE_OPENDIR -/* Define to 1 if you have the `openpty' function. */ +/* Define to 1 if you have the 'openpty' function. */ #undef HAVE_OPENPTY /* Define to 1 if you have the header file. */ #undef HAVE_PANEL_H -/* Define to 1 if you have the `pathconf' function. */ +/* Define to 1 if you have the 'pathconf' function. */ #undef HAVE_PATHCONF -/* Define to 1 if you have the `pause' function. */ +/* Define to 1 if you have the 'pause' function. */ #undef HAVE_PAUSE -/* Define to 1 if you have the `pipe' function. */ +/* Define to 1 if you have the 'pipe' function. */ #undef HAVE_PIPE -/* Define to 1 if you have the `pipe2' function. */ +/* Define to 1 if you have the 'pipe2' function. */ #undef HAVE_PIPE2 -/* Define to 1 if you have the `plock' function. */ +/* Define to 1 if you have the 'plock' function. */ #undef HAVE_PLOCK -/* Define to 1 if you have the `poll' function. */ +/* Define to 1 if you have the 'poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_POLL_H -/* Define to 1 if you have the `posix_fadvise' function. */ +/* Define to 1 if you have the 'posix_fadvise' function. */ #undef HAVE_POSIX_FADVISE -/* Define to 1 if you have the `posix_fallocate' function. */ +/* Define to 1 if you have the 'posix_fallocate' function. */ #undef HAVE_POSIX_FALLOCATE -/* Define to 1 if you have the `posix_spawn' function. */ +/* Define to 1 if you have the 'posix_spawn' function. */ #undef HAVE_POSIX_SPAWN -/* Define to 1 if you have the `posix_spawnp' function. */ +/* Define to 1 if you have the 'posix_spawnp' function. */ #undef HAVE_POSIX_SPAWNP -/* Define to 1 if you have the `pread' function. */ +/* Define to 1 if you have the 'pread' function. */ #undef HAVE_PREAD -/* Define to 1 if you have the `preadv' function. */ +/* Define to 1 if you have the 'preadv' function. */ #undef HAVE_PREADV -/* Define to 1 if you have the `preadv2' function. */ +/* Define to 1 if you have the 'preadv2' function. */ #undef HAVE_PREADV2 /* Define if you have the 'prlimit' function. */ @@ -926,25 +926,25 @@ /* Define if your compiler supports function prototype */ #undef HAVE_PROTOTYPES -/* Define to 1 if you have the `pthread_condattr_setclock' function. */ +/* Define to 1 if you have the 'pthread_condattr_setclock' function. */ #undef HAVE_PTHREAD_CONDATTR_SETCLOCK /* Defined for Solaris 2.6 bug in pthread header. */ #undef HAVE_PTHREAD_DESTRUCTOR -/* Define to 1 if you have the `pthread_getcpuclockid' function. */ +/* Define to 1 if you have the 'pthread_getcpuclockid' function. */ #undef HAVE_PTHREAD_GETCPUCLOCKID /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H -/* Define to 1 if you have the `pthread_init' function. */ +/* Define to 1 if you have the 'pthread_init' function. */ #undef HAVE_PTHREAD_INIT -/* Define to 1 if you have the `pthread_kill' function. */ +/* Define to 1 if you have the 'pthread_kill' function. */ #undef HAVE_PTHREAD_KILL -/* Define to 1 if you have the `pthread_sigmask' function. */ +/* Define to 1 if you have the 'pthread_sigmask' function. */ #undef HAVE_PTHREAD_SIGMASK /* Define if platform requires stubbed pthreads support */ @@ -953,34 +953,34 @@ /* Define to 1 if you have the header file. */ #undef HAVE_PTY_H -/* Define to 1 if you have the `pwrite' function. */ +/* Define to 1 if you have the 'pwrite' function. */ #undef HAVE_PWRITE -/* Define to 1 if you have the `pwritev' function. */ +/* Define to 1 if you have the 'pwritev' function. */ #undef HAVE_PWRITEV -/* Define to 1 if you have the `pwritev2' function. */ +/* Define to 1 if you have the 'pwritev2' function. */ #undef HAVE_PWRITEV2 /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H -/* Define to 1 if you have the `readlink' function. */ +/* Define to 1 if you have the 'readlink' function. */ #undef HAVE_READLINK -/* Define to 1 if you have the `readlinkat' function. */ +/* Define to 1 if you have the 'readlinkat' function. */ #undef HAVE_READLINKAT -/* Define to 1 if you have the `readv' function. */ +/* Define to 1 if you have the 'readv' function. */ #undef HAVE_READV -/* Define to 1 if you have the `realpath' function. */ +/* Define to 1 if you have the 'realpath' function. */ #undef HAVE_REALPATH /* Define if you have the 'recvfrom' function. */ #undef HAVE_RECVFROM -/* Define to 1 if you have the `renameat' function. */ +/* Define to 1 if you have the 'renameat' function. */ #undef HAVE_RENAMEAT /* Define if readline supports append_history */ @@ -1013,154 +1013,154 @@ /* Define to 1 if you have the header file. */ #undef HAVE_RPC_RPC_H -/* Define to 1 if you have the `rtpSpawn' function. */ +/* Define to 1 if you have the 'rtpSpawn' function. */ #undef HAVE_RTPSPAWN -/* Define to 1 if you have the `sched_get_priority_max' function. */ +/* Define to 1 if you have the 'sched_get_priority_max' function. */ #undef HAVE_SCHED_GET_PRIORITY_MAX /* Define to 1 if you have the header file. */ #undef HAVE_SCHED_H -/* Define to 1 if you have the `sched_rr_get_interval' function. */ +/* Define to 1 if you have the 'sched_rr_get_interval' function. */ #undef HAVE_SCHED_RR_GET_INTERVAL -/* Define to 1 if you have the `sched_setaffinity' function. */ +/* Define to 1 if you have the 'sched_setaffinity' function. */ #undef HAVE_SCHED_SETAFFINITY -/* Define to 1 if you have the `sched_setparam' function. */ +/* Define to 1 if you have the 'sched_setparam' function. */ #undef HAVE_SCHED_SETPARAM -/* Define to 1 if you have the `sched_setscheduler' function. */ +/* Define to 1 if you have the 'sched_setscheduler' function. */ #undef HAVE_SCHED_SETSCHEDULER -/* Define to 1 if you have the `sem_clockwait' function. */ +/* Define to 1 if you have the 'sem_clockwait' function. */ #undef HAVE_SEM_CLOCKWAIT -/* Define to 1 if you have the `sem_getvalue' function. */ +/* Define to 1 if you have the 'sem_getvalue' function. */ #undef HAVE_SEM_GETVALUE -/* Define to 1 if you have the `sem_open' function. */ +/* Define to 1 if you have the 'sem_open' function. */ #undef HAVE_SEM_OPEN -/* Define to 1 if you have the `sem_timedwait' function. */ +/* Define to 1 if you have the 'sem_timedwait' function. */ #undef HAVE_SEM_TIMEDWAIT -/* Define to 1 if you have the `sem_unlink' function. */ +/* Define to 1 if you have the 'sem_unlink' function. */ #undef HAVE_SEM_UNLINK -/* Define to 1 if you have the `sendfile' function. */ +/* Define to 1 if you have the 'sendfile' function. */ #undef HAVE_SENDFILE /* Define if you have the 'sendto' function. */ #undef HAVE_SENDTO -/* Define to 1 if you have the `setegid' function. */ +/* Define to 1 if you have the 'setegid' function. */ #undef HAVE_SETEGID -/* Define to 1 if you have the `seteuid' function. */ +/* Define to 1 if you have the 'seteuid' function. */ #undef HAVE_SETEUID -/* Define to 1 if you have the `setgid' function. */ +/* Define to 1 if you have the 'setgid' function. */ #undef HAVE_SETGID /* Define if you have the 'setgroups' function. */ #undef HAVE_SETGROUPS -/* Define to 1 if you have the `sethostname' function. */ +/* Define to 1 if you have the 'sethostname' function. */ #undef HAVE_SETHOSTNAME -/* Define to 1 if you have the `setitimer' function. */ +/* Define to 1 if you have the 'setitimer' function. */ #undef HAVE_SETITIMER /* Define to 1 if you have the header file. */ #undef HAVE_SETJMP_H -/* Define to 1 if you have the `setlocale' function. */ +/* Define to 1 if you have the 'setlocale' function. */ #undef HAVE_SETLOCALE -/* Define to 1 if you have the `setns' function. */ +/* Define to 1 if you have the 'setns' function. */ #undef HAVE_SETNS -/* Define to 1 if you have the `setpgid' function. */ +/* Define to 1 if you have the 'setpgid' function. */ #undef HAVE_SETPGID -/* Define to 1 if you have the `setpgrp' function. */ +/* Define to 1 if you have the 'setpgrp' function. */ #undef HAVE_SETPGRP -/* Define to 1 if you have the `setpriority' function. */ +/* Define to 1 if you have the 'setpriority' function. */ #undef HAVE_SETPRIORITY -/* Define to 1 if you have the `setregid' function. */ +/* Define to 1 if you have the 'setregid' function. */ #undef HAVE_SETREGID -/* Define to 1 if you have the `setresgid' function. */ +/* Define to 1 if you have the 'setresgid' function. */ #undef HAVE_SETRESGID -/* Define to 1 if you have the `setresuid' function. */ +/* Define to 1 if you have the 'setresuid' function. */ #undef HAVE_SETRESUID -/* Define to 1 if you have the `setreuid' function. */ +/* Define to 1 if you have the 'setreuid' function. */ #undef HAVE_SETREUID -/* Define to 1 if you have the `setsid' function. */ +/* Define to 1 if you have the 'setsid' function. */ #undef HAVE_SETSID /* Define if you have the 'setsockopt' function. */ #undef HAVE_SETSOCKOPT -/* Define to 1 if you have the `setuid' function. */ +/* Define to 1 if you have the 'setuid' function. */ #undef HAVE_SETUID -/* Define to 1 if you have the `setvbuf' function. */ +/* Define to 1 if you have the 'setvbuf' function. */ #undef HAVE_SETVBUF /* Define to 1 if you have the header file. */ #undef HAVE_SHADOW_H -/* Define to 1 if you have the `shm_open' function. */ +/* Define to 1 if you have the 'shm_open' function. */ #undef HAVE_SHM_OPEN -/* Define to 1 if you have the `shm_unlink' function. */ +/* Define to 1 if you have the 'shm_unlink' function. */ #undef HAVE_SHM_UNLINK -/* Define to 1 if you have the `shutdown' function. */ +/* Define to 1 if you have the 'shutdown' function. */ #undef HAVE_SHUTDOWN -/* Define to 1 if you have the `sigaction' function. */ +/* Define to 1 if you have the 'sigaction' function. */ #undef HAVE_SIGACTION -/* Define to 1 if you have the `sigaltstack' function. */ +/* Define to 1 if you have the 'sigaltstack' function. */ #undef HAVE_SIGALTSTACK -/* Define to 1 if you have the `sigfillset' function. */ +/* Define to 1 if you have the 'sigfillset' function. */ #undef HAVE_SIGFILLSET -/* Define to 1 if `si_band' is a member of `siginfo_t'. */ +/* Define to 1 if 'si_band' is a member of 'siginfo_t'. */ #undef HAVE_SIGINFO_T_SI_BAND -/* Define to 1 if you have the `siginterrupt' function. */ +/* Define to 1 if you have the 'siginterrupt' function. */ #undef HAVE_SIGINTERRUPT /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H -/* Define to 1 if you have the `sigpending' function. */ +/* Define to 1 if you have the 'sigpending' function. */ #undef HAVE_SIGPENDING -/* Define to 1 if you have the `sigrelse' function. */ +/* Define to 1 if you have the 'sigrelse' function. */ #undef HAVE_SIGRELSE -/* Define to 1 if you have the `sigtimedwait' function. */ +/* Define to 1 if you have the 'sigtimedwait' function. */ #undef HAVE_SIGTIMEDWAIT -/* Define to 1 if you have the `sigwait' function. */ +/* Define to 1 if you have the 'sigwait' function. */ #undef HAVE_SIGWAIT -/* Define to 1 if you have the `sigwaitinfo' function. */ +/* Define to 1 if you have the 'sigwaitinfo' function. */ #undef HAVE_SIGWAITINFO -/* Define to 1 if you have the `snprintf' function. */ +/* Define to 1 if you have the 'snprintf' function. */ #undef HAVE_SNPRINTF /* struct sockaddr_alg (linux/if_alg.h) */ @@ -1181,13 +1181,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SPAWN_H -/* Define to 1 if you have the `splice' function. */ +/* Define to 1 if you have the 'splice' function. */ #undef HAVE_SPLICE /* Define if your compiler provides ssize_t */ #undef HAVE_SSIZE_T -/* Define to 1 if you have the `statvfs' function. */ +/* Define to 1 if you have the 'statvfs' function. */ #undef HAVE_STATVFS /* Define if you have struct stat.st_mtim.tv_nsec */ @@ -1208,7 +1208,7 @@ /* Has stdatomic.h with atomic_int and atomic_uintptr_t */ #undef HAVE_STD_ATOMIC -/* Define to 1 if you have the `strftime' function. */ +/* Define to 1 if you have the 'strftime' function. */ #undef HAVE_STRFTIME /* Define to 1 if you have the header file. */ @@ -1217,52 +1217,52 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* Define to 1 if you have the `strlcpy' function. */ +/* Define to 1 if you have the 'strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H -/* Define to 1 if you have the `strsignal' function. */ +/* Define to 1 if you have the 'strsignal' function. */ #undef HAVE_STRSIGNAL -/* Define to 1 if `pw_gecos' is a member of `struct passwd'. */ +/* Define to 1 if 'pw_gecos' is a member of 'struct passwd'. */ #undef HAVE_STRUCT_PASSWD_PW_GECOS -/* Define to 1 if `pw_passwd' is a member of `struct passwd'. */ +/* Define to 1 if 'pw_passwd' is a member of 'struct passwd'. */ #undef HAVE_STRUCT_PASSWD_PW_PASSWD -/* Define to 1 if `st_birthtime' is a member of `struct stat'. */ +/* Define to 1 if 'st_birthtime' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BIRTHTIME -/* Define to 1 if `st_blksize' is a member of `struct stat'. */ +/* Define to 1 if 'st_blksize' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLKSIZE -/* Define to 1 if `st_blocks' is a member of `struct stat'. */ +/* Define to 1 if 'st_blocks' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_BLOCKS -/* Define to 1 if `st_flags' is a member of `struct stat'. */ +/* Define to 1 if 'st_flags' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_FLAGS -/* Define to 1 if `st_gen' is a member of `struct stat'. */ +/* Define to 1 if 'st_gen' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_GEN -/* Define to 1 if `st_rdev' is a member of `struct stat'. */ +/* Define to 1 if 'st_rdev' is a member of 'struct stat'. */ #undef HAVE_STRUCT_STAT_ST_RDEV -/* Define to 1 if `tm_zone' is a member of `struct tm'. */ +/* Define to 1 if 'tm_zone' is a member of 'struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define if you have the 'symlink' function. */ #undef HAVE_SYMLINK -/* Define to 1 if you have the `symlinkat' function. */ +/* Define to 1 if you have the 'symlinkat' function. */ #undef HAVE_SYMLINKAT -/* Define to 1 if you have the `sync' function. */ +/* Define to 1 if you have the 'sync' function. */ #undef HAVE_SYNC -/* Define to 1 if you have the `sysconf' function. */ +/* Define to 1 if you have the 'sysconf' function. */ #undef HAVE_SYSCONF /* Define to 1 if you have the header file. */ @@ -1271,7 +1271,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H -/* Define to 1 if you have the `system' function. */ +/* Define to 1 if you have the 'system' function. */ #undef HAVE_SYSTEM /* Define to 1 if you have the header file. */ @@ -1286,7 +1286,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DEVPOLL_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_DIR_H @@ -1329,7 +1329,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MODEM_H -/* Define to 1 if you have the header file, and it defines `DIR'. +/* Define to 1 if you have the header file, and it defines 'DIR'. */ #undef HAVE_SYS_NDIR_H @@ -1399,13 +1399,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_XATTR_H -/* Define to 1 if you have the `tcgetpgrp' function. */ +/* Define to 1 if you have the 'tcgetpgrp' function. */ #undef HAVE_TCGETPGRP -/* Define to 1 if you have the `tcsetpgrp' function. */ +/* Define to 1 if you have the 'tcsetpgrp' function. */ #undef HAVE_TCSETPGRP -/* Define to 1 if you have the `tempnam' function. */ +/* Define to 1 if you have the 'tempnam' function. */ #undef HAVE_TEMPNAM /* Define to 1 if you have the header file. */ @@ -1414,48 +1414,48 @@ /* Define to 1 if you have the header file. */ #undef HAVE_TERM_H -/* Define to 1 if you have the `timegm' function. */ +/* Define to 1 if you have the 'timegm' function. */ #undef HAVE_TIMEGM -/* Define to 1 if you have the `times' function. */ +/* Define to 1 if you have the 'times' function. */ #undef HAVE_TIMES -/* Define to 1 if you have the `tmpfile' function. */ +/* Define to 1 if you have the 'tmpfile' function. */ #undef HAVE_TMPFILE -/* Define to 1 if you have the `tmpnam' function. */ +/* Define to 1 if you have the 'tmpnam' function. */ #undef HAVE_TMPNAM -/* Define to 1 if you have the `tmpnam_r' function. */ +/* Define to 1 if you have the 'tmpnam_r' function. */ #undef HAVE_TMPNAM_R -/* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use - `HAVE_STRUCT_TM_TM_ZONE' instead. */ +/* Define to 1 if your 'struct tm' has 'tm_zone'. Deprecated, use + 'HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE -/* Define to 1 if you have the `truncate' function. */ +/* Define to 1 if you have the 'truncate' function. */ #undef HAVE_TRUNCATE -/* Define to 1 if you have the `ttyname' function. */ +/* Define to 1 if you have the 'ttyname' function. */ #undef HAVE_TTYNAME -/* Define to 1 if you don't have `tm_zone' but do have the external array - `tzname'. */ +/* Define to 1 if you don't have 'tm_zone' but do have the external array + 'tzname'. */ #undef HAVE_TZNAME -/* Define to 1 if you have the `umask' function. */ +/* Define to 1 if you have the 'umask' function. */ #undef HAVE_UMASK -/* Define to 1 if you have the `uname' function. */ +/* Define to 1 if you have the 'uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H -/* Define to 1 if you have the `unlinkat' function. */ +/* Define to 1 if you have the 'unlinkat' function. */ #undef HAVE_UNLINKAT -/* Define to 1 if you have the `unshare' function. */ +/* Define to 1 if you have the 'unshare' function. */ #undef HAVE_UNSHARE /* Define if you have a useable wchar_t type defined in wchar.h; useable means @@ -1466,10 +1466,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UTIL_H -/* Define to 1 if you have the `utimensat' function. */ +/* Define to 1 if you have the 'utimensat' function. */ #undef HAVE_UTIMENSAT -/* Define to 1 if you have the `utimes' function. */ +/* Define to 1 if you have the 'utimes' function. */ #undef HAVE_UTIMES /* Define to 1 if you have the header file. */ @@ -1478,10 +1478,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UTMP_H -/* Define to 1 if you have the `uuid_create' function. */ +/* Define to 1 if you have the 'uuid_create' function. */ #undef HAVE_UUID_CREATE -/* Define to 1 if you have the `uuid_enc_be' function. */ +/* Define to 1 if you have the 'uuid_enc_be' function. */ #undef HAVE_UUID_ENC_BE /* Define if uuid_generate_time_safe() exists. */ @@ -1493,44 +1493,44 @@ /* Define to 1 if you have the header file. */ #undef HAVE_UUID_UUID_H -/* Define to 1 if you have the `vfork' function. */ +/* Define to 1 if you have the 'vfork' function. */ #undef HAVE_VFORK -/* Define to 1 if you have the `wait' function. */ +/* Define to 1 if you have the 'wait' function. */ #undef HAVE_WAIT -/* Define to 1 if you have the `wait3' function. */ +/* Define to 1 if you have the 'wait3' function. */ #undef HAVE_WAIT3 -/* Define to 1 if you have the `wait4' function. */ +/* Define to 1 if you have the 'wait4' function. */ #undef HAVE_WAIT4 -/* Define to 1 if you have the `waitid' function. */ +/* Define to 1 if you have the 'waitid' function. */ #undef HAVE_WAITID -/* Define to 1 if you have the `waitpid' function. */ +/* Define to 1 if you have the 'waitpid' function. */ #undef HAVE_WAITPID /* Define if the compiler provides a wchar.h header file. */ #undef HAVE_WCHAR_H -/* Define to 1 if you have the `wcscoll' function. */ +/* Define to 1 if you have the 'wcscoll' function. */ #undef HAVE_WCSCOLL -/* Define to 1 if you have the `wcsftime' function. */ +/* Define to 1 if you have the 'wcsftime' function. */ #undef HAVE_WCSFTIME -/* Define to 1 if you have the `wcsxfrm' function. */ +/* Define to 1 if you have the 'wcsxfrm' function. */ #undef HAVE_WCSXFRM -/* Define to 1 if you have the `wmemcmp' function. */ +/* Define to 1 if you have the 'wmemcmp' function. */ #undef HAVE_WMEMCMP /* Define if tzset() actually switches the local timezone in a meaningful way. */ #undef HAVE_WORKING_TZSET -/* Define to 1 if you have the `writev' function. */ +/* Define to 1 if you have the 'writev' function. */ #undef HAVE_WRITEV /* Define if the zlib library has inflateCopy */ @@ -1539,14 +1539,14 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ZLIB_H -/* Define to 1 if you have the `_getpty' function. */ +/* Define to 1 if you have the '_getpty' function. */ #undef HAVE__GETPTY -/* Define to 1 if `major', `minor', and `makedev' are declared in . +/* Define to 1 if 'major', 'minor', and 'makedev' are declared in . */ #undef MAJOR_IN_MKDEV -/* Define to 1 if `major', `minor', and `makedev' are declared in +/* Define to 1 if 'major', 'minor', and 'makedev' are declared in . */ #undef MAJOR_IN_SYSMACROS @@ -1636,58 +1636,58 @@ /* Define if i>>j for signed int i does not extend the sign bit when i < 0 */ #undef SIGNED_RIGHT_SHIFT_ZERO_FILLS -/* The size of `double', as computed by sizeof. */ +/* The size of 'double', as computed by sizeof. */ #undef SIZEOF_DOUBLE -/* The size of `float', as computed by sizeof. */ +/* The size of 'float', as computed by sizeof. */ #undef SIZEOF_FLOAT -/* The size of `fpos_t', as computed by sizeof. */ +/* The size of 'fpos_t', as computed by sizeof. */ #undef SIZEOF_FPOS_T -/* The size of `int', as computed by sizeof. */ +/* The size of 'int', as computed by sizeof. */ #undef SIZEOF_INT -/* The size of `long', as computed by sizeof. */ +/* The size of 'long', as computed by sizeof. */ #undef SIZEOF_LONG -/* The size of `long double', as computed by sizeof. */ +/* The size of 'long double', as computed by sizeof. */ #undef SIZEOF_LONG_DOUBLE -/* The size of `long long', as computed by sizeof. */ +/* The size of 'long long', as computed by sizeof. */ #undef SIZEOF_LONG_LONG -/* The size of `off_t', as computed by sizeof. */ +/* The size of 'off_t', as computed by sizeof. */ #undef SIZEOF_OFF_T -/* The size of `pid_t', as computed by sizeof. */ +/* The size of 'pid_t', as computed by sizeof. */ #undef SIZEOF_PID_T -/* The size of `pthread_key_t', as computed by sizeof. */ +/* The size of 'pthread_key_t', as computed by sizeof. */ #undef SIZEOF_PTHREAD_KEY_T -/* The size of `pthread_t', as computed by sizeof. */ +/* The size of 'pthread_t', as computed by sizeof. */ #undef SIZEOF_PTHREAD_T -/* The size of `short', as computed by sizeof. */ +/* The size of 'short', as computed by sizeof. */ #undef SIZEOF_SHORT -/* The size of `size_t', as computed by sizeof. */ +/* The size of 'size_t', as computed by sizeof. */ #undef SIZEOF_SIZE_T -/* The size of `time_t', as computed by sizeof. */ +/* The size of 'time_t', as computed by sizeof. */ #undef SIZEOF_TIME_T -/* The size of `uintptr_t', as computed by sizeof. */ +/* The size of 'uintptr_t', as computed by sizeof. */ #undef SIZEOF_UINTPTR_T -/* The size of `void *', as computed by sizeof. */ +/* The size of 'void *', as computed by sizeof. */ #undef SIZEOF_VOID_P -/* The size of `wchar_t', as computed by sizeof. */ +/* The size of 'wchar_t', as computed by sizeof. */ #undef SIZEOF_WCHAR_T -/* The size of `_Bool', as computed by sizeof. */ +/* The size of '_Bool', as computed by sizeof. */ #undef SIZEOF__BOOL /* Define to 1 if you have the ANSI C header files. */ @@ -1703,13 +1703,13 @@ /* Library needed by timemodule.c: librt may be needed for clock_gettime() */ #undef TIMEMODULE_LIB -/* Define to 1 if your declares `struct tm'. */ +/* Define to 1 if your declares 'struct tm'. */ #undef TM_IN_SYS_TIME /* Define if you want to use computed gotos in ceval.c. */ #undef USE_COMPUTED_GOTOS -/* Enable extensions on AIX 3, Interix. */ +/* Enable extensions on AIX, Interix, z/OS. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif @@ -1770,11 +1770,15 @@ #ifndef __STDC_WANT_IEC_60559_DFP_EXT__ # undef __STDC_WANT_IEC_60559_DFP_EXT__ #endif +/* Enable extensions specified by C23 Annex F. */ +#ifndef __STDC_WANT_IEC_60559_EXT__ +# undef __STDC_WANT_IEC_60559_EXT__ +#endif /* Enable extensions specified by ISO/IEC TS 18661-4:2015. */ #ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__ # undef __STDC_WANT_IEC_60559_FUNCS_EXT__ #endif -/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */ +/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */ #ifndef __STDC_WANT_IEC_60559_TYPES_EXT__ # undef __STDC_WANT_IEC_60559_TYPES_EXT__ #endif @@ -1903,16 +1907,16 @@ /* Define to 'long' if doesn't define. */ #undef clock_t -/* Define to empty if `const' does not conform to ANSI C. */ +/* Define to empty if 'const' does not conform to ANSI C. */ #undef const -/* Define to `int' if doesn't define. */ +/* Define as 'int' if doesn't define. */ #undef gid_t -/* Define to `int' if does not define. */ +/* Define to 'int' if does not define. */ #undef mode_t -/* Define to `long int' if does not define. */ +/* Define to 'long int' if does not define. */ #undef off_t /* Define as a signed integer type capable of holding a process identifier. */ @@ -1921,13 +1925,13 @@ /* Define to empty if the keyword does not work. */ #undef signed -/* Define to `unsigned int' if does not define. */ +/* Define as 'unsigned int' if doesn't define. */ #undef size_t /* Define to `int' if does not define. */ #undef socklen_t -/* Define to `int' if doesn't define. */ +/* Define as 'int' if doesn't define. */ #undef uid_t From 9839e0f87a1ea088929e208094a8902217517d3f Mon Sep 17 00:00:00 2001 From: Roddy Rappaport Date: Wed, 8 Jan 2025 20:25:46 +0200 Subject: [PATCH 4/5] Added sha2 to static library --- Modules/Setup.stdlib.in | 2 +- config.site-static | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in index b7468a8a2a16a4..fc940823671106 100644 --- a/Modules/Setup.stdlib.in +++ b/Modules/Setup.stdlib.in @@ -78,7 +78,7 @@ # hashing builtins, can be disabled with --without-builtin-hashlib-hashes @MODULE__MD5_TRUE@_md5 md5module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_MD5.c -D_BSD_SOURCE -D_DEFAULT_SOURCE @MODULE__SHA1_TRUE@_sha1 sha1module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA1.c -D_BSD_SOURCE -D_DEFAULT_SOURCE -@MODULE__SHA2_TRUE@_sha2 sha2module.c -I$(srcdir)/Modules/_hacl/include Modules/_hacl/libHacl_Hash_SHA2.a +@MODULE__SHA2_TRUE@_sha2 sha2module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA2.c -D_BSD_SOURCE -D_DEFAULT_SOURCE @MODULE__SHA3_TRUE@_sha3 sha3module.c -I$(srcdir)/Modules/_hacl/include _hacl/Hacl_Hash_SHA3.c -D_BSD_SOURCE -D_DEFAULT_SOURCE @MODULE__BLAKE2_TRUE@_blake2 _blake2/blake2module.c _blake2/blake2b_impl.c _blake2/blake2s_impl.c diff --git a/config.site-static b/config.site-static index 84577d53c7afa8..da9d1561cdbfb3 100644 --- a/config.site-static +++ b/config.site-static @@ -9,5 +9,4 @@ py_cv_module_zlib=n/a py_cv_module_binascii=n/a py_cv_module_xxlimited=n/a py_cv_module_pyexpat=n/a -py_cv_module__sha2=n/a py_cv_module__crypt=n/a From 74ab74654b867a6e1c3b2af3ccf6b7b74b0e9a9b Mon Sep 17 00:00:00 2001 From: Roddy Rappaport Date: Thu, 2 Jan 2025 20:20:52 +0200 Subject: [PATCH 5/5] Deleted explicitly frozen modules & Added pygments dependencies We use the external environment variable for getting the necessary libraries for GDB, so they have been removed from statically being included in the frozen modules file. --- Tools/build/freeze_modules.py | 149 +--------------------------------- config.site-static | 8 +- 2 files changed, 11 insertions(+), 146 deletions(-) diff --git a/Tools/build/freeze_modules.py b/Tools/build/freeze_modules.py index 055372f5eb7694..555d9bd0ed5a45 100644 --- a/Tools/build/freeze_modules.py +++ b/Tools/build/freeze_modules.py @@ -53,153 +53,12 @@ # (You can delete entries from here down to the end of the list.) ('stdlib - startup, without site (python -S)', [ 'abc', - '_aix_support', - 'antigravity', - 'argparse', - 'ast', - 'base64', - 'bdb', - 'bisect', - 'calendar', - 'cmd', 'codecs', - 'codeop', - 'code', - '', - '_collections_abc', - 'colorsys', - '_compat_pickle', - 'compileall', - '_compression', - '', - 'configparser', - 'contextlib', - 'contextvars', - 'copy', - 'copyreg', - 'cProfile', - 'csv', - 'dataclasses', - 'datetime', - '', - 'decimal', - 'difflib', - 'dis', - '', - '', - 'enum', - 'filecmp', - 'fileinput', - 'fnmatch', - 'fractions', - 'ftplib', - 'functools', - '__future__', - 'genericpath', - 'getopt', - 'getpass', - 'gettext', - 'glob', - 'graphlib', - 'gzip', - 'hashlib', - 'heapq', - 'hmac', - 'imaplib', - '', - 'inspect', + # For now we do not freeze the encodings, due # to the noise all + # those extra modules add to the text printed during the build. + # (See https://github.com/python/cpython/pull/28398#pullrequestreview-756856469.) + #'', 'io', - 'ipaddress', - '', - 'keyword', - 'linecache', - 'locale', - '', - 'lzma', - '_markupbase', - 'mimetypes', - 'modulefinder', - '', - 'netrc', - 'ntpath', - 'nturl2path', - 'numbers', - 'opcode', - 'operator', - 'optparse', - 'os', - '_osx_support', - 'pathlib', - 'pdb', - '<__phello__.**.*>', - 'pickle', - 'pickletools', - 'pkgutil', - 'platform', - 'plistlib', - 'poplib', - 'posixpath', - 'pprint', - 'profile', - 'pstats', - 'pty', - '_py_abc', - 'pyclbr', - 'py_compile', - '_pydatetime', - '_pydecimal', - '_pyio', - '_pylong', - 'queue', - 'quopri', - 'random', - '', - 'reprlib', - 'rlcompleter', - 'sched', - 'selectors', - 'shelve', - 'shlex', - 'shutil', - 'signal', - 'smtplib', - 'socket', - 'socketserver', - 'statistics', - 'stat', - 'stringprep', - 'string', - '_strptime', - 'struct', - 'subprocess', - 'symtable', - 'sysconfig', - 'tabnanny', - 'tempfile', - 'textwrap', - 'this', - '_threading_local', - 'threading', - 'timeit', - 'tokenize', - 'token', - '', - 'traceback', - 'tracemalloc', - 'trace', - 'tty', - 'types', - 'typing', - 'uuid', - 'warnings', - 'wave', - 'weakref', - '_weakrefset', - 'webbrowser', - '', - 'zipapp', - '', - '', ] + [module_str for module_str in EXTRA_FROZEN_MODULES.split(";") if len(module_str) > 0] ), ('stdlib - startup, with site', [ diff --git a/config.site-static b/config.site-static index da9d1561cdbfb3..7f314448340cdb 100644 --- a/config.site-static +++ b/config.site-static @@ -1,12 +1,18 @@ ac_cv_buggy_getaddrinfo=no ac_cv_file__dev_ptmx=yes ac_cv_file__dev_ptc=no +ac_cv_header_zlib_h=no + +# Custom flag that we added to configure, causes the check for zstd to automatically +# fail and mark the library as missing. This is so that it wouldn't try to dynamically +# link to it when linking python/gdb. +pkg_check_module_ZLIB=no + py_cv_module__decimal=n/a py_cv_module__ctypes=n/a py_cv_module__curses=n/a py_cv_module__curses_panel=n/a py_cv_module_zlib=n/a -py_cv_module_binascii=n/a py_cv_module_xxlimited=n/a py_cv_module_pyexpat=n/a py_cv_module__crypt=n/a