public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/xine-lib] epel9-next: Port configure script to C99
Date: Mon, 20 Jul 2026 20:01:25 GMT	[thread overview]
Message-ID: <178457768578.1.16371045159274920240.rpms-xine-lib-778d0883383a@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/xine-lib
            Branch : epel9-next
            Commit : 778d0883383a1e8ee4060b1d8583296812e077d4
            Author : Florian Weimer <fweimer@redhat.com>
            Date   : 2023-04-15T18:57:58+02:00
            Stats  : +121/-1 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/xine-lib/c/778d0883383a1e8ee4060b1d8583296812e077d4?branch=epel9-next

            Log:
            Port configure script to C99

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>

---
diff --git a/xine-lib-configure-c99.patch b/xine-lib-configure-c99.patch
new file mode 100644
index 0000000..a6bf2e6
--- /dev/null
+++ b/xine-lib-configure-c99.patch
@@ -0,0 +1,116 @@
+configure: Add fake prototypes for C99 compatibility
+
+The xxmc-related configure probes assume that the compiler
+supports implicit function declarations because it tries to
+call the functions without including the appropriate headers,
+for link testing.
+
+As the headers are not determined yet at this point, use
+a fake prototype (the same that autoconf uses) to avoid
+the implicit function declarations.
+
+This avoids altering the outcome of these checks with future
+compilers which do not support implicit function declarations.
+
+Submitted upstream:
+
+  <https://sourceforge.net/p/xine/xine-lib-1.2/merge-requests/2/>
+
+diff --git a/configure b/configure
+index a4009e857777b5cf..3a83b40efda8fd5d 100755
+--- a/configure
++++ b/configure
+@@ -28563,7 +28563,7 @@ $as_echo "" >&6; }
+             LIBS="$XXMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
++char XvMCPutSlice(void);
+ int
+ main ()
+ {
+@@ -28578,7 +28578,7 @@ else
+   LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS $DYNAMIC_LD_LIBS"
+                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
++char XvMCPutSlice(void);
+ int
+ main ()
+ {
+@@ -28616,7 +28616,7 @@ done
+             else
+                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
++char XvMCCreateContext(void);
+ int
+ main ()
+ {
+@@ -28631,7 +28631,7 @@ else
+   LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
++char XvMCCreateContext(void);
+ int
+ main ()
+ {
+@@ -28675,7 +28675,7 @@ $as_echo "" >&6; }
+             LIBS="$XVMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
++char XvMCCreateContext(void);
+ int
+ main ()
+ {
+@@ -28690,7 +28690,7 @@ else
+   LIBS="$XVMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS $DYNAMIC_LD_LIBS"
+                             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+-
++char XvMCCreateContext(void);
+ int
+ main ()
+ {
+diff --git a/m4/video_out.m4 b/m4/video_out.m4
+index 150b477697297c03..8aa1f4a3b9267ff9 100644
+--- a/m4/video_out.m4
++++ b/m4/video_out.m4
+@@ -496,9 +496,9 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
+             AC_MSG_CHECKING([whether to enable the xxmc plugin with VLD extensions])
+             AC_MSG_RESULT([])
+             LIBS="$XXMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+-            AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCPutSlice()]])], [have_xxmc=yes],
++            AC_LINK_IFELSE([AC_LANG_PROGRAM([[char XvMCPutSlice(void);]], [[XvMCPutSlice()]])], [have_xxmc=yes],
+                            [LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS $DYNAMIC_LD_LIBS"
+-                            AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCPutSlice()]])],
++                            AC_LINK_IFELSE([AC_LANG_PROGRAM([[char XvMCPutSlice(void);]], [[XvMCPutSlice()]])],
+                                            [have_xxmc=yes XXMC_LIBS="$XXMC_LIBS -lXvMC"])])
+             if test x"$have_xxmc" = x"yes"; then
+                 AC_CHECK_HEADERS([X11/extensions/vldXvMC.h],
+@@ -506,9 +506,9 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
+                                   AC_DEFINE([HAVE_VLDXVMC], 1, [Define if you have vldXvMC.h])],
+                                   [have_vldexts=no])
+             else
+-                AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])], [have_xxmc=yes],
++                AC_LINK_IFELSE([AC_LANG_PROGRAM([[char XvMCCreateContext(void);]], [[XvMCCreateContext()]])], [have_xxmc=yes],
+                                [LIBS="$XXMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS"
+-                                AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])],
++                                AC_LINK_IFELSE([AC_LANG_PROGRAM([[char XvMCCreateContext(void);]], [[XvMCCreateContext()]])],
+                                                [have_xxmc=yes XXMC_LIBS="$XXMC_LIBS -lXvMC"])])
+             fi
+             if test x"$have_xxmc" = x"yes"; then
+@@ -521,9 +521,9 @@ AC_DEFUN([XINE_VIDEO_OUT_PLUGINS], [
+             AC_MSG_CHECKING([whether to enable the xvmc plugin])
+             AC_MSG_RESULT([])
+             LIBS="$XVMC_LIBS $X_LIBS $XV_LIBS $LIBS"
+-            AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])], [have_xvmc=yes],
++            AC_LINK_IFELSE([AC_LANG_PROGRAM([[char XvMCCreateContext(void);]], [[XvMCCreateContext()]])], [have_xvmc=yes],
+                            [LIBS="$XVMC_LIBS -lXvMC $X_LIBS $XV_LIBS $LIBS $DYNAMIC_LD_LIBS"
+-                            AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[XvMCCreateContext()]])],
++                            AC_LINK_IFELSE([AC_LANG_PROGRAM([[char XvMCCreateContext(void);]], [[XvMCCreateContext()]])],
+                                            [have_xvmc=yes XVMC_LIBS="$XVMC_LIBS -lXvMC"])])
+             if test x"$have_xvmc" = x"yes"; then
+                 AC_CHECK_HEADERS([X11/extensions/XvMC.h], [], [have_xvmc=no])

diff --git a/xine-lib.spec b/xine-lib.spec
index 80f0896..fa6d6d3 100644
--- a/xine-lib.spec
+++ b/xine-lib.spec
@@ -37,7 +37,7 @@
 Summary:        A multimedia engine
 Name:           xine-lib
 Version:        1.2.13
-Release:        3%{?snapshot:.%{date}hg%{revision}}%{?dist}
+Release:        4%{?snapshot:.%{date}hg%{revision}}%{?dist}
 License:        GPL-2.0-or-later
 URL:            https://www.xine-project.org/
 %if ! 0%{?snapshot}
@@ -51,6 +51,7 @@ Source1:        make_xinelib_snapshot.sh
 # ffmpeg6 compatibility
 # See: https://sourceforge.net/p/xine/xine-lib-1.2/ci/771f4ae27e582123ff3500444718fc8f96186d74/
 Patch0:         xine-lib-1.2.13-ffmpeg6-compatibility.patch
+Patch1: xine-lib-configure-c99.patch
 
 Provides:       xine-lib(plugin-abi) = %{plugin_abi}
 Provides:       xine-lib(plugin-abi)%{?_isa} = %{plugin_abi}
@@ -349,6 +350,9 @@ mkdir -p %{buildroot}%{codecdir}
 
 
 %changelog
+* Sat Apr 15 2023 Florian Weimer <fweimer@redhat.com> - 1.2.13-4
+- Port configure script to C99
+
 * Sat Mar 18 2023 Xavier Bachelot <xavier@bachelot.org> - 1.2.13-3
 - Enable external libdvdnav for EL9
 - Restore specfile compatibility with RPM Fusion for EL7/8

                 reply	other threads:[~2026-07-20 20:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178457768578.1.16371045159274920240.rpms-xine-lib-778d0883383a@fedoraproject.org \
    --to=fweimer@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox