Restore changes which fix C89-isms in gdb-6.6-buildid-locate-rpm.patch

These changes, originally added to Fedora GDB by Keith Seitz, and
described in the Nov 30 2022 Changelog eentry, were inadvertently lost
during the GDB 13.1 rebase.  Only downstream/local changes were lost -
the remainder of the changes were in the upstream GDB 13.1 sources.
This commit is contained in:
Kevin Buettner 2023-05-04 13:40:32 -07:00
parent e19c0f8fb7
commit 6c805458b5
3 changed files with 16 additions and 8 deletions

View File

@ -339,7 +339,7 @@ diff --git a/gdb/configure b/gdb/configure
YACC The `Yet Another Compiler Compiler' implementation to use. YACC The `Yet Another Compiler Compiler' implementation to use.
Defaults to the first program found out of: `bison -y', `byacc', Defaults to the first program found out of: `bison -y', `byacc',
`yacc'. `yacc'.
@@ -17848,6 +17860,494 @@ _ACEOF @@ -17848,6 +17860,495 @@ _ACEOF
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
$as_echo "$with_auto_load_safe_path" >&6; } $as_echo "$with_auto_load_safe_path" >&6; }
@ -403,6 +403,7 @@ diff --git a/gdb/configure b/gdb/configure
+#include <rpm/rpmlib.h> +#include <rpm/rpmlib.h>
+#include <dlfcn.h> +#include <dlfcn.h>
+#include <errno.h> +#include <errno.h>
+#include <string.h>
+ +
+int +int
+main () +main ()
@ -837,7 +838,7 @@ diff --git a/gdb/configure b/gdb/configure
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/gdb/configure.ac +++ b/gdb/configure.ac
@@ -160,6 +160,199 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir, @@ -160,6 +160,200 @@ AC_DEFINE_DIR(AUTO_LOAD_SAFE_PATH, escape_dir,
[Directories safe to hold auto-loaded files.]) [Directories safe to hold auto-loaded files.])
AC_MSG_RESULT([$with_auto_load_safe_path]) AC_MSG_RESULT([$with_auto_load_safe_path])
@ -887,6 +888,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
+#include <rpm/rpmlib.h> +#include <rpm/rpmlib.h>
+#include <dlfcn.h> +#include <dlfcn.h>
+#include <errno.h> +#include <errno.h>
+#include <string.h>
+ ]], [[ + ]], [[
+ void *h; + void *h;
+ const char *const *rpmverp; + const char *const *rpmverp;

View File

@ -12,7 +12,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=1270534
diff --git a/gdb/configure b/gdb/configure diff --git a/gdb/configure b/gdb/configure
--- a/gdb/configure --- a/gdb/configure
+++ b/gdb/configure +++ b/gdb/configure
@@ -20915,6 +20915,7 @@ if test x"$prefer_curses" = xyes; then @@ -20916,6 +20916,7 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A # search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such # default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation. # a situation.
@ -20,7 +20,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
$as_echo_n "checking for library containing waddstr... " >&6; } $as_echo_n "checking for library containing waddstr... " >&6; }
if ${ac_cv_search_waddstr+:} false; then : if ${ac_cv_search_waddstr+:} false; then :
@@ -20939,7 +20940,7 @@ return waddstr (); @@ -20940,7 +20941,7 @@ return waddstr ();
return 0; return 0;
} }
_ACEOF _ACEOF
@ -29,7 +29,7 @@ diff --git a/gdb/configure b/gdb/configure
if test -z "$ac_lib"; then if test -z "$ac_lib"; then
ac_res="none required" ac_res="none required"
else else
@@ -21013,6 +21014,7 @@ case $host_os in @@ -21014,6 +21015,7 @@ case $host_os in
esac esac
# These are the libraries checked by Readline. # These are the libraries checked by Readline.
@ -37,7 +37,7 @@ diff --git a/gdb/configure b/gdb/configure
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
$as_echo_n "checking for library containing tgetent... " >&6; } $as_echo_n "checking for library containing tgetent... " >&6; }
if ${ac_cv_search_tgetent+:} false; then : if ${ac_cv_search_tgetent+:} false; then :
@@ -21037,7 +21039,7 @@ return tgetent (); @@ -21038,7 +21040,7 @@ return tgetent ();
return 0; return 0;
} }
_ACEOF _ACEOF
@ -49,7 +49,7 @@ diff --git a/gdb/configure b/gdb/configure
diff --git a/gdb/configure.ac b/gdb/configure.ac diff --git a/gdb/configure.ac b/gdb/configure.ac
--- a/gdb/configure.ac --- a/gdb/configure.ac
+++ b/gdb/configure.ac +++ b/gdb/configure.ac
@@ -704,7 +704,8 @@ if test x"$prefer_curses" = xyes; then @@ -705,7 +705,8 @@ if test x"$prefer_curses" = xyes; then
# search /usr/local/include, if ncurses is installed in /usr/local. A # search /usr/local/include, if ncurses is installed in /usr/local. A
# default installation of ncurses on alpha*-dec-osf* will lead to such # default installation of ncurses on alpha*-dec-osf* will lead to such
# a situation. # a situation.
@ -59,7 +59,7 @@ diff --git a/gdb/configure.ac b/gdb/configure.ac
if test "$ac_cv_search_waddstr" != no; then if test "$ac_cv_search_waddstr" != no; then
curses_found=yes curses_found=yes
@@ -746,7 +747,8 @@ case $host_os in @@ -747,7 +748,8 @@ case $host_os in
esac esac
# These are the libraries checked by Readline. # These are the libraries checked by Readline.

View File

@ -1249,6 +1249,12 @@ fi
%endif %endif
%changelog %changelog
* Thu May 4 2023 Kevin Buettner <kevinb@redhat.com>
- Fix C89-isms in gdb-6.6-buildid-locate-rpm.patch. (Florian Weimer,
RHBZ 2143992)'. This change merely restores changes introduced by
Keith's Nov 30 2022 commit, but which were inadvertently lost during
the GDB 13.1 backport.
* Thu May 4 2023 Andrew Burgess <aburgess@redhat.com> * Thu May 4 2023 Andrew Burgess <aburgess@redhat.com>
- Rewrite the changes to gdb-add-index.sh. If the user has set the - Rewrite the changes to gdb-add-index.sh. If the user has set the
GDB environment variable then use that value, otherwise find a GDB environment variable then use that value, otherwise find a