tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Now in careful mode (was: Re: HEADS UP: pkgsrc-2025Q2 branch calendar)



On Mon, 2 Jun 2025 14:23:31 +0200
Benny Siegert <bsiegert%gmail.com@localhost> wrote:

> As announced before, we are now in "careful mode". Please ask for 
> approval before making changes to packages with lots of dependencies 
> (see above), as well as for any pkgsrc infrastructure changes (mk/, 
> devel/cmake/build.mk, etc.)
> 
> Thank you for your cooperation.

Hi,

We have a problem that pkgtools/pkg_install-info is broken on any
platform that ships with GCC 15 or later (due to C23 being the default
which breaks some configure tests and other things).

I made a patch that mends the issues which I had forgot about until
a user inquired in #pkgsrc earlier today. But we could opt to set
FORCE_C_STD in the package instead. I'm not sure to what value though.
Worried about introducing regressions with both approaches. This is
legacy code that is effectively maintained by us because it is many
years behind the canonical upstream.

FORCE_C_STD=	c89 # seems to be ok at least on Linux

-Tobias
? files/config.h.in_
? files/configure_
Index: files/configure.ac
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install-info/files/configure.ac,v
retrieving revision 1.3
diff -p -u -r1.3 configure.ac
--- files/configure.ac	7 Feb 2005 16:14:26 -0000	1.3
+++ files/configure.ac	2 Jun 2025 13:18:28 -0000
@@ -3,10 +3,10 @@
 #
 # Process this file with autoconf to produce a configure script.
 
-AC_PREREQ(2.57)
-AC_INIT([texinfo], [4.5])
+AC_PREREQ([2.72])
+AC_INIT([texinfo],[4.5])
 AC_CONFIG_SRCDIR([install-info.c])
-AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
 
 # Checks for programs.
 
@@ -27,14 +27,13 @@ dnl AC_FUNC_MALLOC
 dnl AC_FUNC_REALLOC
 dnl AC_FUNC_STRCOLL
 AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([setlocale])
-AC_REPLACE_FUNCS([strdup strerror strncasecmp])
+AC_CHECK_FUNCS([setlocale strcoll])
+AC_REPLACE_FUNCS([strdup strerror strcasecmp strncasecmp])
 
 #
 if test $ac_cv_header_locale_h = yes; then
 	AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
-		[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
-		am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 
+		[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <locale.h>]], [[return LC_MESSAGES]])],[am_cv_val_LC_MESSAGES=yes],[am_cv_val_LC_MESSAGES=no])]) 
 	if test $am_cv_val_LC_MESSAGES = yes; then
 		AC_DEFINE(HAVE_LC_MESSAGES, 1, 
 			[Define if your <locale.h> file defines LC_MESSAGES.])
Index: files/install-info.c
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install-info/files/install-info.c,v
retrieving revision 1.3
diff -p -u -r1.3 install-info.c
--- files/install-info.c	8 Sep 2013 16:31:13 -0000	1.3
+++ files/install-info.c	2 Jun 2025 13:18:28 -0000
@@ -20,13 +20,15 @@
 
 #include "system.h"
 #include <getopt.h>
+#include <stdlib.h>
 
 static char *progname = "install-info";
 
-int menu_line_equal (), menu_line_lessp ();
-struct line_data *findlines ();
-void insert_entry_here ();
-int compare_section_names (), compare_entries_text ();
+int menu_line_equal (char *, int, char *, int), menu_line_lessp (char *, int, char *, int);
+struct line_data *findlines (char *, int, int *);
+struct spec_entry;
+void insert_entry_here (struct spec_entry *, int, struct line_data *, int);
+int compare_section_names (const void *, const void *), compare_entries_text (const void *, const void *);
 
 struct spec_entry;
 
@@ -170,7 +172,6 @@ void *
 xmalloc (size)
      unsigned int size;
 {
-  extern void *malloc ();
   void *result = malloc (size);
   if (result == NULL)
     fatal (_("virtual memory exhausted"), 0, 0);
@@ -183,7 +184,6 @@ xrealloc (obj, size)
      void *obj;
      unsigned int size;
 {
-  extern void *realloc ();
   void *result = realloc (obj, size);
   if (result == NULL)
     fatal (_("virtual memory exhausted"), 0, 0);
@@ -487,7 +487,7 @@ FILE *
 open_possibly_compressed_file (filename, create_callback,
                                opened_filename, compression_program, is_pipe)
      char *filename;
-     void (*create_callback) ();
+     void (*create_callback) (char *);
      char **opened_filename;
      char **compression_program;
      int  *is_pipe;
@@ -624,7 +624,7 @@ readfile (filename, sizep, create_callba
           opened_filename, compression_program)
      char *filename;
      int *sizep;
-     void (*create_callback) ();
+     void (*create_callback) (char *);
      char **opened_filename;
      char **compression_program;
 {
@@ -1555,10 +1555,10 @@ menu_line_equal (line1, len1, line2, len
 
 int
 compare_section_names (sec1, sec2)
-     struct spec_section **sec1, **sec2;
+     const void *sec1, *sec2;
 {
-  char *name1 = (*sec1)->name;
-  char *name2 = (*sec2)->name;
+  char *name1 = (*(struct spec_section **)sec1)->name;
+  char *name2 = (*(struct spec_section **)sec2)->name;
   return strcmp (name1, name2);
 }
 
@@ -1568,10 +1568,10 @@ compare_section_names (sec1, sec2)
 
 int
 compare_entries_text (entry1, entry2)
-     struct spec_entry **entry1, **entry2;
+     const void *entry1, *entry2;
 {
-  char *text1 = (*entry1)->text;
-  char *text2 = (*entry2)->text;
+  char *text1 = (*(struct spec_entry **)entry1)->text;
+  char *text2 = (*(struct spec_entry **)entry2)->text;
   char *colon1 = strchr (text1, ':');
   char *colon2 = strchr (text2, ':');
   int len1, len2;
Index: files/system.h
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_install-info/files/system.h,v
retrieving revision 1.2
diff -p -u -r1.2 system.h
--- files/system.h	5 Aug 2024 14:40:09 -0000	1.2
+++ files/system.h	2 Jun 2025 13:18:28 -0000
@@ -97,7 +97,7 @@ extern int errno;
 #include <perror.h>
 #endif
 
-#ifndef HAVE_DECL_STRERROR
+#ifndef HAVE_STRERROR
 extern char *strerror ();
 #endif
 
@@ -111,15 +111,15 @@ extern char *strerror ();
 #define PATH_MAX _POSIX_PATH_MAX
 #endif
 
-#ifndef HAVE_DECL_STRCASECMP
+#ifndef HAVE_STRCASECMP
 extern int strcasecmp ();
 #endif
 
-#ifndef HAVE_DECL_STRNCASECMP
+#ifndef HAVE_STRNCASECMP
 extern int strncasecmp ();
 #endif
 
-#ifndef HAVE_DECL_STRCOLL
+#ifndef HAVE_STRCOLL
 extern int strcoll ();
 #endif
 
@@ -252,12 +252,12 @@ extern int strcoll ();
 #include <pwd.h>
 #endif
 /* Some systems don't declare this function in pwd.h. */
-struct passwd *getpwnam ();
+struct passwd *getpwnam (const char *);
 
 /* Our library routines not included in any system library.  */
-extern void *xmalloc (), *xrealloc ();
-extern char *xstrdup ();
-extern void xexit ();
+extern void *xmalloc (unsigned int), *xrealloc (void *, unsigned int);
+extern char *xstrdup (const char *);
+extern void xexit (int);
 
 /* For convenience.  */
 #define STREQ(s1,s2) (strcmp (s1, s2) == 0)


Home | Main Index | Thread Index | Old Index