This is an automated email from the git hooks/post-receive script.

guix_mirror_bot pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new ce8752ef83 gnu: xlispstat: Fix compilation with modern GCC versions.
ce8752ef83 is described below

commit ce8752ef83a500f9c0a8d3e8e28d84de470bc408
Author: Artyom V. Poptsov <[email protected]>
AuthorDate: Fri Oct 24 06:19:03 2025 +0300

    gnu: xlispstat: Fix compilation with modern GCC versions.
    
    Package compilation would fail with modern GCC due to deprecated features 
that
    are used in the package source code.  This patch updates the package to
    modernize the source code to fix compilation errors (see
    <https://github.com/jhbadger/xlispstat/pull/1>.)
    
    * gnu/packages/statistics.scm (xlispstat): Fix compilation with GCC version 
14
    or newer.
    [source]: Add a patch.
    * gnu/packages/patches/xlispstat-fix-compilation-with-modern-gcc.patch: New
    file.
    * gnu/local.mk (dist_patch_DATA): Register the patch.
    
    Change-Id: I0f8b194887298fff196be7426a0de7eb247a8c48
---
 gnu/local.mk                                       |   1 +
 ...xlispstat-fix-compilation-with-modern-gcc.patch | 213 +++++++++++++++++++++
 gnu/packages/statistics.scm                        |   5 +-
 3 files changed, 218 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 2d059f3535..2d65107586 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2459,6 +2459,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/xfce4-settings-defaults.patch           \
   %D%/packages/patches/xgboost-use-system-dmlc-core.patch      \
   %D%/packages/patches/xiphos-glib.patch                        \
+  %D%/packages/patches/xlispstat-fix-compilation-with-modern-gcc.patch \
   %D%/packages/patches/xmonad-dynamic-linking.patch            \
   %D%/packages/patches/xplanet-1.3.1-cxx11-eof.patch           \
   %D%/packages/patches/xplanet-1.3.1-libdisplay_DisplayOutput.cpp.patch        
\
diff --git 
a/gnu/packages/patches/xlispstat-fix-compilation-with-modern-gcc.patch 
b/gnu/packages/patches/xlispstat-fix-compilation-with-modern-gcc.patch
new file mode 100644
index 0000000000..46825d1132
--- /dev/null
+++ b/gnu/packages/patches/xlispstat-fix-compilation-with-modern-gcc.patch
@@ -0,0 +1,213 @@
+From 29d14d78a17f2d85bc9e37f380e71221c2055dd8 Mon Sep 17 00:00:00 2001
+From: "Artyom V. Poptsov" <[email protected]>
+Date: Thu, 23 Oct 2025 22:13:53 +0300
+Subject: [PATCH] src: Fix compilation with GCC version 14 or newer
+
+GCC version 14 now treats some deprecation warnings as errors, namely
+it is not allowed to use implicit "int" types, implicit function
+declarations (see <https://gcc.gnu.org/gcc-14/porting_to.html>.)  In
+this patch, deprecated code updated to match the new requirements of
+GCC.
+
+* src/c/ddists.c, src/c/objects.c, src/include/sysvr4-foreign.h,
+src/c/iviewdat.c, src/c/postscript.c: Explicitly specify variable
+types and procedure return value types to satisfy requirements of
+GCC version 14 or newer.
+* src/c/X11graph.c: Likewise.
+(StBlockForInput): Modernize "select" call.
+* src/c/X11BSDstuff.c (line_available): Modernize "select" call.
+---
+ src/c/X11BSDstuff.c          |  4 +++-
+ src/c/X11graph.c             | 10 +++++++---
+ src/c/ddists.c               |  4 +++-
+ src/c/iviewdat.c             |  2 +-
+ src/c/objects.c              |  6 ++++--
+ src/c/postscript.c           |  7 ++++---
+ src/include/sysvr4-foreign.h |  2 +-
+ 7 files changed, 23 insertions(+), 12 deletions(-)
+
+diff --git a/src/c/X11BSDstuff.c b/src/c/X11BSDstuff.c
+index 5bb7144..4a9b91b 100644
+--- a/src/c/X11BSDstuff.c
++++ b/src/c/X11BSDstuff.c
+@@ -3,6 +3,8 @@
+ /* Additions to Xlisp 2.1, Copyright (c) 1989 by David Michael Betz    */
+ /* You may give out copies of this software; for conditions see the    */
+ /* file COPYING included with this distribution.                       */
++/* Additions to XLISP-STAT 2.1, Copyright (c) 2025,                    */
++/* by Artyom V. Poptsov <[email protected]>                     */
+ /*                                                                     */
+ /* Some modifications included from WINTERP                            */
+ /* WINTERP 1.0 Copyright 1989 Hewlett-Packard Company (by Niels Mayer).*/
+@@ -549,7 +551,7 @@ LOCAL int line_available()
+   FD_ZERO(&readmask);
+   FD_SET(fileno(stdin), &readmask);
+ 
+-  result = select(ndfs, (int *) &readmask, NULL, NULL, &tv);
++  result = select(ndfs, &readmask, NULL, NULL, &tv);
+   if (result > 0) return(TRUE);
+   /* *** should merge the select here with the one for blocking ***/
+   else return(StBlockForInput());
+diff --git a/src/c/X11graph.c b/src/c/X11graph.c
+index 70dff08..920957c 100644
+--- a/src/c/X11graph.c
++++ b/src/c/X11graph.c
+@@ -1,6 +1,8 @@
+ /* X11graph - X11 support for XLISP-STAT                               */
+ /* XLISP-STAT 2.1 Copyright (c) 1990, by Luke Tierney                  */
+ /* Additions to Xlisp 2.1, Copyright (c) 1989 by David Michael Betz    */
++/* Additions to XLISP-STAT 2.1, Copyright (c) 2025,                    */
++/* by Artyom V. Poptsov <[email protected]>                     */
+ /* You may give out copies of this software; for conditions see the    */
+ /* file COPYING included with this distribution.                       */
+ 
+@@ -23,8 +25,8 @@ extern VOID InstallMenuButton P2H(Window, LVAL);
+ extern VOID DeleteMenuButton P1H(Window);
+ extern VOID StX11FinishMenus(V);
+ extern VOID StX11FinishDialogs(V);
+-extern StX11InitMenus(V);
+-extern StX11InitDialogs(V);
++extern void StX11InitMenus(V);
++extern void StX11InitDialogs(V);
+ 
+ extern char *getenv();
+ 
+@@ -316,7 +318,7 @@ int StBlockForInput()
+       if (tmp > maxfd) maxfd = tmp;
+       FD_SET(maxfd, &readmask);
+     }
+-    result = select(maxfd+1, (int *) &readmask, NULL, NULL, NULL);
++    result = select(maxfd+1, &readmask, NULL, NULL, NULL);
+     return((FD_ISSET(fileno(stdin), &readmask)) ? TRUE : FALSE);
+   }
+   else return(FALSE);
+@@ -1221,6 +1223,7 @@ VOID StWGetLocation(w, left, top, frame)
+ VOID StWSetSize(w, width, height, frame)
+      Window w;
+      int width, height;
++     int frame;
+ {
+   Display *dpy = StX11Display();
+   StGWWinInfo *gwinfo;
+@@ -1286,6 +1289,7 @@ VOID StWGetSize(w, pwidth, pheight, frame)
+ VOID StGWSetSize(gwinfo, width, height, frame)
+      StGWWinInfo *gwinfo;
+      int width, height;
++     int frame;
+ {
+   Window w;
+   if (gwinfo == NULL || (w = gwinfo->window) == NullWindow) return;
+diff --git a/src/c/ddists.c b/src/c/ddists.c
+index e6abeaa..dcefa23 100644
+--- a/src/c/ddists.c
++++ b/src/c/ddists.c
+@@ -3,6 +3,8 @@
+ /* Additions to Xlisp 2.1, Copyright (c) 1989 by David Michael Betz    */
+ /* You may give out copies of this software; for conditions see the    */
+ /* file COPYING included with this distribution.                       */
++/* Additions to XLISP-STAT 2.1, Copyright (c) 2025,                    */
++/* by Artyom V. Poptsov <[email protected]>                     */
+  
+ #include "xlisp.h"
+ #include "xlstat.h"
+@@ -29,7 +31,7 @@ LOCAL VOID getpoisarg P1H(double *);
+ LOCAL double poisson_cdf P2H(int, double);
+ LOCAL int binomial_quant P3H(double, int, double);
+ LOCAL int poisson_quant P2H(double, double);
+-LOCAL poisson_rand P1H(double);
++LOCAL int poisson_rand P1H(double);
+ LOCAL int binomial_rand P2H(int, double);
+ 
+ /* numerical distribution function */
+diff --git a/src/c/iviewdat.c b/src/c/iviewdat.c
+index 0b35e05..28fd2df 100644
+--- a/src/c/iviewdat.c
++++ b/src/c/iviewdat.c
+@@ -237,7 +237,7 @@ static VOID IViewBasicPointsSetTransformation 
P2C(IViewBasicPoints, p, double **
+ static VOID IViewBasicPointsApplyTransformation P3C(IViewBasicPoints, p,
+                                                     double **, a, int *, 
inbasis)
+ {
+-  static maxvars = 0;
++  static int maxvars = 0;
+   static Fixed **b, *x, **screen_data, *screen_location;
+   int vars, n, i, j;
+   double *scale = p->scale, *location = p->location;
+diff --git a/src/c/objects.c b/src/c/objects.c
+index d9c61f2..1084b47 100644
+--- a/src/c/objects.c
++++ b/src/c/objects.c
+@@ -3,7 +3,9 @@
+ /* Additions to Xlisp 2.1, Copyright (c) 1989 by David Michael Betz    */
+ /* You may give out copies of this software; for conditions see the    */
+ /* file COPYING included with this distribution.                       */
+- 
++/* Additions to XLISP-STAT 2.1, Copyright (c) 2025,                    */
++/* by Artyom V. Poptsov <[email protected]>                     */
++
+ #include "xlisp.h"
+ #include "xlstat.h"
+ 
+@@ -1260,7 +1262,7 @@ LVAL xsobject_isnew(V)
+ VOID xsaddmsg P2C(LVAL, object, char *, str)
+ {
+   LVAL fcn;
+-  static offset = FIRST_METHOD_OFFSET;
++  static int offset = FIRST_METHOD_OFFSET;
+ 
+   xlsave1(fcn);
+   fcn = cvsubr(funtab[offset].fd_subr,funtab[offset].fd_type,offset);
+diff --git a/src/c/postscript.c b/src/c/postscript.c
+index 6ddbfb9..ea57351 100644
+--- a/src/c/postscript.c
++++ b/src/c/postscript.c
+@@ -9,6 +9,7 @@
+ /* pbmtops.c - read a portable bitmap and produce a PostScript bitmap file
+ **
+ ** Copyright (C) 1988 by Jef Poskanzer.
++** Copyright (C) 2025 by Artyom V. Poptsov <[email protected]>
+ **
+ ** Permission to use, copy, modify, and distribute this software and its
+ ** documentation for any purpose and without fee is hereby granted, provided
+@@ -60,7 +61,7 @@ static FILE *fp;
+ /**************************************************************************/
+ 
+ /* set up global variables and print the postscript preamble */
+-psputinit(file, cols, rows, scale )
++void psputinit(file, cols, rows, scale )
+      FILEP file;
+      int cols, rows;
+      double scale;
+@@ -120,7 +121,7 @@ psputinit(file, cols, rows, scale )
+ }
+ 
+ /* enter a bit into the image */
+-psputbit(b)
++void psputbit(b)
+      int b;
+ {
+   if ( bitsperitem == 8 ) {
+@@ -133,7 +134,7 @@ psputbit(b)
+ }
+ 
+ /* clean up and print the showpage command */
+-psputrest( )
++void psputrest( )
+ {
+   if ( bitsperitem > 0 )
+     putitem( );
+diff --git a/src/include/sysvr4-foreign.h b/src/include/sysvr4-foreign.h
+index f40acc8..709fc6c 100644
+--- a/src/include/sysvr4-foreign.h
++++ b/src/include/sysvr4-foreign.h
+@@ -16,7 +16,7 @@ LOCAL VOID link_and_load(fname, libs, fort)
+      char *fname, *libs;
+      int fort;
+ {
+-  static initialized = FALSE;
++  static int initialized = FALSE;
+   void *handle;
+ 
+   if (! initialized) {
+-- 
+2.51.0
+
diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm
index 87e40e1177..d0d7be3ae7 100644
--- a/gnu/packages/statistics.scm
+++ b/gnu/packages/statistics.scm
@@ -3633,7 +3633,10 @@ and Causal), and simulations in Bayesian Networks.")
                 (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "1p0cmgy19kbkxia139cb5w9dnkp2cdqp5n3baag6cq3prn3n71mf"))))
+                  "1p0cmgy19kbkxia139cb5w9dnkp2cdqp5n3baag6cq3prn3n71mf"))
+                (patches
+                 (search-patches
+                  "xlispstat-fix-compilation-with-modern-gcc.patch"))))
       (build-system gnu-build-system)
       (arguments
        `(#:parallel-build? #f   ; Parallel builds are not supported

Reply via email to