From 722eb978a682aa3adfb481d5c883c76d02124a86 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Jan 02 2023 07:22:58 +0000 Subject: C99 compatibility fixes for the configure scripts Related to: --- diff --git a/gambas3-configure-c99.patch b/gambas3-configure-c99.patch new file mode 100644 index 0000000..ccd7c63 --- /dev/null +++ b/gambas3-configure-c99.patch @@ -0,0 +1,39 @@ +Define _GNU_SOURCE in the math tests so that exp10 can be found. +Include for the puts function in the __progname check. + +Submitted upstream: + +diff --git a/acinclude.m4 b/acinclude.m4 +index 055cfd86b1102815..fe4f24b9f49cd1d7 100644 +--- a/acinclude.m4 ++++ b/acinclude.m4 +@@ -558,6 +558,7 @@ AC_DEFUN([GB_CHECK_MATH_FUNC], + [ + #define _ISOC9X_SOURCE 1 + #define _ISOC99_SOURCE 1 ++ #define _GNU_SOURCE 1 + #define __USE_ISOC99 1 + #define __USE_ISOC9X 1 + #include +diff --git a/gb.httpd/configure.ac b/gb.httpd/configure.ac +index 5fb0fa507ff89993..e8a3a9e3a4dfe8fb 100644 +--- a/gb.httpd/configure.ac ++++ b/gb.httpd/configure.ac +@@ -28,7 +28,7 @@ dnl + AC_MSG_CHECKING(how to link static binaries) + AC_CACHE_VAL(ac_cv_lbl_static_flag, + ac_cv_lbl_static_flag=unknown +- echo 'main() {}' > conftest.c ++ echo 'int main() {}' > conftest.c + if test "$GCC" != yes ; then + trial_flag="-Bstatic" + test=`$CC $trial_flag -o conftest conftest.c 2>&1` +@@ -53,7 +53,7 @@ fi + + AC_MSG_CHECKING(for __progname) + AC_CACHE_VAL(ac_cv_extern__progname, +- AC_TRY_LINK([], ++ AC_TRY_LINK([#include ], + [extern char *__progname; + puts(__progname)], + ac_cv_extern__progname=yes, diff --git a/gambas3.spec b/gambas3.spec index 783e758..9fb24db 100644 --- a/gambas3.spec +++ b/gambas3.spec @@ -14,7 +14,7 @@ Name: gambas3 Summary: IDE based on a basic interpreter with object extensions Version: 3.17.3 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL+ URL: http://gambas.sourceforge.net/ Source0: https://gitlab.com/gambas/gambas/-/archive/%{version}/gambas-%{version}.tar.bz2 @@ -65,6 +65,7 @@ Patch1: %{name}-3.12.2-nolintl.patch Patch2: %{name}-3.12.2-noliconv.patch Patch5: %{name}-3.14.1-gst1.patch Patch6: gambas-3.17.3-force-pcre2.patch +Patch7: gambas3-configure-c99.patch %description Gambas3 is a free development environment based on a Basic interpreter @@ -1019,6 +1020,7 @@ Requires: %{name}-gb-xml = %{version}-%{release} %patch2 -p1 -b .noliconv %patch5 -p1 -b .gst1 %patch6 -p1 -b .force-pcre2 +%patch7 -p1 for i in `find . |grep acinclude.m4`; do sed -i 's|$AM_CFLAGS -O3|$AM_CFLAGS|g' $i sed -i 's|$AM_CXXFLAGS -Os -fno-omit-frame-pointer|$AM_CXXFLAGS|g' $i @@ -1764,6 +1766,9 @@ install -m 0644 -p main/mime/application-x-gambas3.xml %{buildroot}%{_datadir}/m %{_datadir}/%{name}/info/gb.xml.xslt.* %changelog +* Mon Jan 02 2023 Florian Weimer - 3.17.3-6 +- C99 compatibility fixes for the configure scripts + * Wed Nov 16 2022 Ondřej Sloup - 3.17.3-5 - Rebuild for new PostgreSQL 15