diff --git a/tinyfigue-configure-c99.patch b/tinyfigue-configure-c99.patch new file mode 100644 index 0000000..42810a8 --- /dev/null +++ b/tinyfigue-configure-c99.patch @@ -0,0 +1,21 @@ +Fix old autoconf-generated code for compatibility with C99: undeclared +functions can now longer be called. + +Fixed in by moving to current +autoconf. + +diff --git a/configure b/configure +index ea48217c90151d8f..9d4a80250acf575a 100755 +--- a/configure ++++ b/configure +@@ -3060,8 +3060,8 @@ main () + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) +- exit(2); +- exit (0); ++ return 2; ++ return 0; + } + _ACEOF + rm -f conftest$ac_exeext diff --git a/tinyfugue-malloc-c99.h b/tinyfugue-malloc-c99.h new file mode 100644 index 0000000..3a0037e --- /dev/null +++ b/tinyfugue-malloc-c99.h @@ -0,0 +1,18 @@ +Include for !USE_MMALLOC, so that the malloc etc. +prototypes are available. For C99 compatibility. + +This seems to have been fixed in +in a different way. + +diff --git a/src/malloc.h b/src/malloc.h +index cc4d3bf317b09b06..2e649de2651c1edf 100644 +--- a/src/malloc.h ++++ b/src/malloc.h +@@ -34,6 +34,7 @@ extern int low_memory_warning; + # define realloc(ptr, size) mrealloc(NULL, ptr, size) + # define free(ptr) mfree(NULL, ptr) + #else ++# include + # define mmalloc(md, size) malloc(size) + # define mcalloc(md, size) calloc(size) + # define mrealloc(md, ptr, size) realloc(ptr, size) diff --git a/tinyfugue-tfio-c99.patch b/tinyfugue-tfio-c99.patch new file mode 100644 index 0000000..f7b474e --- /dev/null +++ b/tinyfugue-tfio-c99.patch @@ -0,0 +1,26 @@ +Include "socket.h" for main_loop prototype. For C99 compatibility. + +Also fixed via this in : + +commit 7b280f0f54dac62342c4f2a13a70b79bfb01a7b8 +Author: Karol Lassak +Date: Wed Dec 2 15:04:42 2020 +0000 + + Add actions file (#31) + + Switch from travis to GH actions + + Also fixes for new C compilator and finding of lua and python libraries + +diff --git a/src/tfio.c b/src/tfio.c +index 151583ebb17cd81e..bbbbd90f7de31134 100644 +--- a/src/tfio.c ++++ b/src/tfio.c +@@ -45,6 +45,7 @@ static const char RCSid[] = "$Id: tfio.c,v 35004.114 2007/01/13 23:12:39 kkeys E + #include "variable.h" /* getvar() */ + #include "keyboard.h" /* keyboard_pos */ + #include "expand.h" /* current_command */ ++#include "socket.h" /* main_loop */ + #include "cmdlist.h" + + TFILE *loadfile = NULL; /* currently /load'ing file */ diff --git a/tinyfugue.spec b/tinyfugue.spec index 6d345a0..68caf0a 100644 --- a/tinyfugue.spec +++ b/tinyfugue.spec @@ -3,7 +3,7 @@ Name: tinyfugue Version: 5.0 -Release: 0.105.b8%{?dist} +Release: 0.107.b8%{?dist} Summary: A MU* client License: GPLv2+ URL: http://tinyfugue.sourceforge.net/ @@ -24,6 +24,9 @@ Patch9: 0006-Fix-library-install-path.patch Patch10: 0007-Fix-spelling-errors.patch Patch11: 0008-Fix-duplicate-world_decl-definitions.patch Patch12: 0009-Fix-spelling-error-in-manual-page.patch +Patch13: tinyfigue-configure-c99.patch +Patch14: tinyfugue-malloc-c99.h +Patch15: tinyfugue-tfio-c99.patch BuildRequires: coreutils BuildRequires: gcc BuildRequires: make @@ -67,6 +70,9 @@ install -D -p -m 644 src/tf.1.nroffman %{buildroot}%{_mandir}/man1/tf.1 %{_mandir}/man1/tf.1* %changelog +* Fri Nov 25 2022 Florian Weimer - 5.0-0.107.b8 +- Port to C99 (mostly) + * Sat Jul 23 2022 Fedora Release Engineering - 5.0-0.105.b8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild