From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1028) id F16EC3858D1E; Thu, 21 Jul 2022 00:12:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F16EC3858D1E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Kevin Buettner To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Wrap python_write_bytecode with HAVE_PYTHON ifdef X-Act-Checkin: binutils-gdb X-Git-Author: Kevin Buettner X-Git-Refname: refs/heads/master X-Git-Oldrev: 2637e8bb1ad92733464488af4c0621cc8851e215 X-Git-Newrev: 0679db296682575b4d34fc8686fbbeb305b283e9 Message-Id: <20220721001247.F16EC3858D1E@sourceware.org> Date: Thu, 21 Jul 2022 00:12:47 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2022 00:12:48 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D0679db296682= 575b4d34fc8686fbbeb305b283e9 commit 0679db296682575b4d34fc8686fbbeb305b283e9 Author: Kevin Buettner Date: Wed Jul 20 17:00:24 2022 -0700 Wrap python_write_bytecode with HAVE_PYTHON ifdef =20 This commit fixes a build error on machines lacking python headers and/or libraries. Diff: --- gdb/python/python.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/python/python.c b/gdb/python/python.c index c719e3dc90c..8fa935c8286 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1855,6 +1855,7 @@ show_python_dont_write_bytecode (struct ui_file *file= , int from_tty, value); } =20 +#ifdef HAVE_PYTHON /* Return value to assign to PyConfig.write_bytecode or, when negated (via !), Py_DontWriteBytecodeFlag. Py_DontWriteBytecodeFlag is deprecated in Python 3.12. */ @@ -1872,6 +1873,7 @@ python_write_bytecode () =20 return wbc; } +#endif /* HAVE_PYTHON */ =20 /* Implement 'set python dont-write-bytecode'. This sets Python's internal flag no matter when the command is issued, however, if this is used