This undoes a probably incorrect change from void * to FILE * from the
-fno-common times, probably related to non-opaque FILE. Now it gives:

 error: incompatible pointer types passing 'FILE *' (aka 'struct __sFILE *') to 
parameter of type 'gzFile' (aka 'struct gzFile_s *') 
[-Wincompatible-pointer-types]

because we end up passing a FILE * to gzopen().

This code really hasn't aged well. The remaining warnings are scary
and I wonder if cvs rm isn't the right approach here.

Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/mboxgrep/Makefile,v
diff -u -p -r1.18 Makefile
--- Makefile    26 Sep 2023 12:28:12 -0000      1.18
+++ Makefile    20 May 2026 06:18:05 -0000
@@ -1,7 +1,7 @@
 COMMENT=               scan mailboxes for messages matching a regular 
expression
 
 DISTNAME=              mboxgrep-0.7.9
-REVISION=              0
+REVISION=              1
 CATEGORIES=            mail
 
 HOMEPAGE=              http://www.mboxgrep.org/
Index: patches/patch-src_main_c
===================================================================
RCS file: /cvs/ports/mail/mboxgrep/patches/patch-src_main_c,v
diff -u -p -r1.3 patch-src_main_c
--- patches/patch-src_main_c    11 Mar 2022 19:34:40 -0000      1.3
+++ patches/patch-src_main_c    20 May 2026 06:16:42 -0000
@@ -1,8 +1,5 @@
 fix for -fno-common
 
-main.c:317: warning: dereferencing 'void *' pointer
-main.c:317: error: request for member '_file' in something not a structure or 
union
-
 Index: src/main.c
 --- src/main.c.orig
 +++ src/main.c
@@ -14,12 +11,3 @@ Index: src/main.c
  regex_t posix_pattern;
  #ifdef HAVE_LIBPCRE
  pcre *pcre_pattern;
-@@ -55,7 +56,7 @@ pcre_extra *hints;
- char *boxname, *outboxname, *pipecmd, *tmpfilename;
- int maildir_count = 0;
- int count = 0;
--void *tmpp;
-+FILE *tmpp;
- checksum_t *cs;
- 
- int
Index: patches/patch-src_scan_c
===================================================================
RCS file: patches/patch-src_scan_c
diff -N patches/patch-src_scan_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_scan_c    20 May 2026 06:16:42 -0000
@@ -0,0 +1,12 @@
+Index: src/scan.c
+--- src/scan.c.orig
++++ src/scan.c
+@@ -77,7 +77,7 @@ void scan_mailbox (char path[])
+      /* {{{  */
+ {
+   static FILE *outf;
+-  extern FILE *tmpp;
++  extern void *tmpp;
+   static mbox_t *mbox, *out;
+ #ifdef HAVE_LIBPCRE
+   extern pcre *pcre_pattern;
Index: patches/patch-src_wrap_c
===================================================================
RCS file: patches/patch-src_wrap_c
diff -N patches/patch-src_wrap_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_wrap_c    20 May 2026 06:16:42 -0000
@@ -0,0 +1,15 @@
+Index: src/wrap.c
+--- src/wrap.c.orig
++++ src/wrap.c
+@@ -107,9 +107,9 @@ FILE *m_fdopen (int fildes, const char *mode)
+ 
+ #ifdef HAVE_LIBZ
+ 
+-gzFile *m_gzdopen (int fildes, const char *mode)
++gzFile m_gzdopen (int fildes, const char *mode)
+ {
+-  gzFile *blah;
++  gzFile blah;
+ 
+   blah = gzdopen (fildes, mode);
+   if (blah == NULL)
Index: patches/patch-src_wrap_h
===================================================================
RCS file: patches/patch-src_wrap_h
diff -N patches/patch-src_wrap_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_wrap_h    20 May 2026 06:16:42 -0000
@@ -0,0 +1,12 @@
+Index: src/wrap.h
+--- src/wrap.h.orig
++++ src/wrap.h
+@@ -57,7 +57,7 @@ int m_open (const char *pathname, int flags, mode_t mo
+ FILE *m_fopen (const char *path, const char *mode);
+ FILE *m_fdopen (int fildes, const char *mode);
+ #ifdef HAVE_LIBZ
+-gzFile *m_gzdopen (int fildes, const char *mode);
++gzFile m_gzdopen (int fildes, const char *mode);
+ #endif /* HAVE_LIBZ */
+ 
+ DIR *m_opendir (const char *name);

Reply via email to