Sun Dec 26 23:54:01 2021 UTC ()
ifile: fix ssp build on NetBSD


(nros)
diff -r1.13 -r1.14 pkgsrc/mail/ifile/distinfo
diff -r1.3 -r1.4 pkgsrc/mail/ifile/patches/patch-aa
diff -r1.1 -r1.2 pkgsrc/mail/ifile/patches/patch-argp_argp-fmtstream.h
diff -r0 -r1.1 pkgsrc/mail/ifile/patches/patch-argp_argp-fs-xinl.c
diff -r0 -r1.1 pkgsrc/mail/ifile/patches/patch-argp_argp-xinl.c

cvs diff -r1.13 -r1.14 pkgsrc/mail/ifile/distinfo (expand / switch to unified diff)

--- pkgsrc/mail/ifile/distinfo 2021/10/26 10:54:02 1.13
+++ pkgsrc/mail/ifile/distinfo 2021/12/26 23:54:01 1.14
@@ -1,8 +1,10 @@ @@ -1,8 +1,10 @@
1$NetBSD: distinfo,v 1.13 2021/10/26 10:54:02 nia Exp $ 1$NetBSD: distinfo,v 1.14 2021/12/26 23:54:01 nros Exp $
2 2
3BLAKE2s (ifile-1.3.8/ifile-1.3.8.tar.gz) = 1f484a0689d3d7afae497dea28626fac48b4815ba288249fde4c09ccd4b329f2 3BLAKE2s (ifile-1.3.8/ifile-1.3.8.tar.gz) = 1f484a0689d3d7afae497dea28626fac48b4815ba288249fde4c09ccd4b329f2
4SHA512 (ifile-1.3.8/ifile-1.3.8.tar.gz) = d69315da0eae777fb764d9db5157d1e7232f7c17fa3b42dcdf21dd81205999f1740d1d59727a951cbd48327cdd05ce47f9c1a30d6c67cca4b744f879d82a8b32 4SHA512 (ifile-1.3.8/ifile-1.3.8.tar.gz) = d69315da0eae777fb764d9db5157d1e7232f7c17fa3b42dcdf21dd81205999f1740d1d59727a951cbd48327cdd05ce47f9c1a30d6c67cca4b744f879d82a8b32
5Size (ifile-1.3.8/ifile-1.3.8.tar.gz) = 190558 bytes 5Size (ifile-1.3.8/ifile-1.3.8.tar.gz) = 190558 bytes
6SHA1 (patch-aa) = f60b5642496e83707f722c2ea1d63460599226ba 6SHA1 (patch-aa) = 259413b004057433d49202e1ab1ba57d33f22f99
7SHA1 (patch-ad) = 6b92eec1416a40cc692ff58915f8ebf133160f6a 7SHA1 (patch-ad) = 6b92eec1416a40cc692ff58915f8ebf133160f6a
8SHA1 (patch-argp_argp-fmtstream.h) = 505591cb210f783422a9e600e1f97a2ca3ae09ad 8SHA1 (patch-argp_argp-fmtstream.h) = 384edba4ffa1449e0b7f7ccf117e2de11514e496
 9SHA1 (patch-argp_argp-fs-xinl.c) = 208a1f3d2711ddae6fc175a5b8dd03744053662e
 10SHA1 (patch-argp_argp-xinl.c) = 508c2afe0b452443f745722e28ce2cb8f336d49a

cvs diff -r1.3 -r1.4 pkgsrc/mail/ifile/patches/patch-aa (expand / switch to unified diff)

--- pkgsrc/mail/ifile/patches/patch-aa 2012/10/15 09:35:17 1.3
+++ pkgsrc/mail/ifile/patches/patch-aa 2021/12/26 23:54:01 1.4
@@ -1,16 +1,19 @@ @@ -1,16 +1,19 @@
1$NetBSD: patch-aa,v 1.3 2012/10/15 09:35:17 joerg Exp $ 1$NetBSD: patch-aa,v 1.4 2021/12/26 23:54:01 nros Exp $
2 2
3--- argp/argp.h.orig 2004-11-19 22:51:25.000000000 +0000 3* defining __OPTIMIZE__ to nothing causes ssp.h on NetBSD
 4 to crash use __ARGP_OPTIMIZE__ instead to avoid conflict
 5
 6--- argp/argp.h.orig 2006-05-22 16:49:22.000000000 +0000
4+++ argp/argp.h 7+++ argp/argp.h
5@@ -352,7 +352,7 @@ struct argp_state 8@@ -352,7 +352,7 @@ struct argp_state
6 #define ARGP_NO_EXIT 0x20 9 #define ARGP_NO_EXIT 0x20
7  10
8 /* Use the gnu getopt `long-only' rules for parsing arguments. */ 11 /* Use the gnu getopt `long-only' rules for parsing arguments. */
9-#define ARGP_LONG_ONLY 0x40 12-#define ARGP_LONG_ONLY 0x40
10+#define ARGP_LONG_ONLY 0x00 13+#define ARGP_LONG_ONLY 0x00
11  14
12 /* Turns off any message-printing/exiting options. */ 15 /* Turns off any message-printing/exiting options. */
13 #define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP) 16 #define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP)
14@@ -446,8 +446,10 @@ extern void __argp_state_help __P ((__co 17@@ -446,8 +446,10 @@ extern void __argp_state_help __P ((__co
15 FILE *__stream, unsigned __flags)); 18 FILE *__stream, unsigned __flags));
16  19
@@ -28,25 +31,43 @@ $NetBSD: patch-aa,v 1.3 2012/10/15 09:35 @@ -28,25 +31,43 @@ $NetBSD: patch-aa,v 1.3 2012/10/15 09:35
28 /* Returns true if the option OPT is a valid short option. */ 31 /* Returns true if the option OPT is a valid short option. */
29+#if 0 32+#if 0
30 extern int _option_is_short __P ((__const struct argp_option *__opt)); 33 extern int _option_is_short __P ((__const struct argp_option *__opt));
31 extern int __option_is_short __P ((__const struct argp_option *__opt)); 34 extern int __option_is_short __P ((__const struct argp_option *__opt));
32  35
33@@ -500,6 +503,7 @@ extern int __option_is_short __P ((__con 36@@ -500,6 +503,7 @@ extern int __option_is_short __P ((__con
34 options array. */ 37 options array. */
35 extern int _option_is_end __P ((__const struct argp_option *__opt)); 38 extern int _option_is_end __P ((__const struct argp_option *__opt));
36 extern int __option_is_end __P ((__const struct argp_option *__opt)); 39 extern int __option_is_end __P ((__const struct argp_option *__opt));
37+#endif 40+#endif
38  41
39 /* Return the input field for ARGP in the parser corresponding to STATE; used 42 /* Return the input field for ARGP in the parser corresponding to STATE; used
40 by the help routines. */ 43 by the help routines. */
 44@@ -508,7 +512,7 @@ extern void *_argp_input __P ((__const s
 45 extern void *__argp_input __P ((__const struct argp *argp,
 46 __const struct argp_state *state));
 47
 48-#ifdef __OPTIMIZE__
 49+#ifdef __ARGP_OPTIMIZE__
 50
 51 #if !_LIBC
 52 # define __argp_usage argp_usage
41@@ -518,7 +522,11 @@ extern void *__argp_input __P ((__const  53@@ -518,7 +522,11 @@ extern void *__argp_input __P ((__const
42 #endif 54 #endif
43  55
44 #ifndef ARGP_EI 56 #ifndef ARGP_EI
45+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) 57+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
46 # define ARGP_EI extern inline 58 # define ARGP_EI extern inline
47+#else 59+#else
48+# define ARGP_EI inline 60+# define ARGP_EI inline
49+#endif 61+#endif
50 #endif 62 #endif
51  63
52 ARGP_EI void 64 ARGP_EI void
 65@@ -552,7 +560,7 @@ __option_is_end (__const struct argp_opt
 66 # undef __option_is_end
 67 #endif
 68
 69-#endif /* __OPTIMIZE__ */
 70+#endif /* __ARGP_OPTIMIZE__ */
 71
 72 #ifdef __cplusplus
 73 }

cvs diff -r1.1 -r1.2 pkgsrc/mail/ifile/patches/patch-argp_argp-fmtstream.h (expand / switch to unified diff)

--- pkgsrc/mail/ifile/patches/patch-argp_argp-fmtstream.h 2012/10/20 22:13:28 1.1
+++ pkgsrc/mail/ifile/patches/patch-argp_argp-fmtstream.h 2021/12/26 23:54:01 1.2
@@ -1,16 +1,19 @@ @@ -1,16 +1,19 @@
1$NetBSD: patch-argp_argp-fmtstream.h,v 1.1 2012/10/20 22:13:28 joerg Exp $ 1$NetBSD: patch-argp_argp-fmtstream.h,v 1.2 2021/12/26 23:54:01 nros Exp $
2 2
3--- argp/argp-fmtstream.h.orig 2004-11-19 22:51:26.000000000 +0000 3* defining __OPTIMIZE__ to nothing causes ssp.h on NetBSD
 4 to crash use __ARGP_OPTIMIZE__ instead to avoid conflict
 5
 6--- argp/argp-fmtstream.h.orig 2006-05-22 16:49:23.000000000 +0000
4+++ argp/argp-fmtstream.h 7+++ argp/argp-fmtstream.h
5@@ -139,6 +139,7 @@ extern ssize_t argp_fmtstream_printf (ar 8@@ -139,6 +139,7 @@ extern ssize_t argp_fmtstream_printf (ar
6 ; 9 ;
7 #endif 10 #endif
8  11
9+#if 0 12+#if 0
10 extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); 13 extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
11 extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); 14 extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
12  15
13@@ -149,6 +150,7 @@ extern size_t __argp_fmtstream_write (ar 16@@ -149,6 +150,7 @@ extern size_t __argp_fmtstream_write (ar
14 __const char *__str, size_t __len); 17 __const char *__str, size_t __len);
15 extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, 18 extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
16 __const char *__str, size_t __len); 19 __const char *__str, size_t __len);
@@ -24,25 +27,43 @@ $NetBSD: patch-argp_argp-fmtstream.h,v 1 @@ -24,25 +27,43 @@ $NetBSD: patch-argp_argp-fmtstream.h,v 1
24  27
25+#if 0 28+#if 0
26 /* Set __FS's left margin to LMARGIN and return the old value. */ 29 /* Set __FS's left margin to LMARGIN and return the old value. */
27 extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, 30 extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
28 size_t __lmargin); 31 size_t __lmargin);
29@@ -179,6 +182,7 @@ extern size_t __argp_fmtstream_set_wmarg 32@@ -179,6 +182,7 @@ extern size_t __argp_fmtstream_set_wmarg
30 /* Return the column number of the current output point in __FS. */ 33 /* Return the column number of the current output point in __FS. */
31 extern size_t argp_fmtstream_point (argp_fmtstream_t __fs); 34 extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
32 extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs); 35 extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
33+#endif 36+#endif
34  37
35 /* Internal routines. */ 38 /* Internal routines. */
36 extern void _argp_fmtstream_update (argp_fmtstream_t __fs); 39 extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
 40@@ -186,7 +190,7 @@ extern void __argp_fmtstream_update (arg
 41 extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
 42 extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount);
 43
 44-#ifdef __OPTIMIZE__
 45+#ifdef __ARGP_OPTIMIZE__
 46 /* Inline versions of above routines. */
 47
 48 #if !_LIBC
37@@ -202,7 +206,11 @@ extern int __argp_fmtstream_ensure (argp 49@@ -202,7 +206,11 @@ extern int __argp_fmtstream_ensure (argp
38 #endif 50 #endif
39  51
40 #ifndef ARGP_FS_EI 52 #ifndef ARGP_FS_EI
41+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__) 53+#if defined(__GNUC__) && !defined(__GNUC_STDC_INLINE__)
42 #define ARGP_FS_EI extern inline 54 #define ARGP_FS_EI extern inline
43+#else 55+#else
44+#define ARGP_FS_EI inline 56+#define ARGP_FS_EI inline
45+#endif 57+#endif
46 #endif 58 #endif
47  59
48 ARGP_FS_EI size_t 60 ARGP_FS_EI size_t
 61@@ -298,7 +306,7 @@ __argp_fmtstream_point (argp_fmtstream_t
 62 #undef __argp_fmtstream_ensure
 63 #endif
 64
 65-#endif /* __OPTIMIZE__ */
 66+#endif /* __ARGP_OPTIMIZE__ */
 67
 68 #endif /* ARGP_FMTSTREAM_USE_LINEWRAP */
 69

File Added: pkgsrc/mail/ifile/patches/patch-argp_argp-fs-xinl.c
$NetBSD: patch-argp_argp-fs-xinl.c,v 1.1 2021/12/26 23:54:01 nros Exp $

* defining __OPTIMIZE__ to nothing causes ssp.h on NetBSD
  to crash use __ARGP_OPTIMIZE__ instead to avoid conflict

--- argp/argp-fs-xinl.c.orig	2021-12-26 22:34:56.922104884 +0000
+++ argp/argp-fs-xinl.c
@@ -23,8 +23,8 @@
 #endif
 
 #define ARGP_FS_EI
-#undef __OPTIMIZE__
-#define __OPTIMIZE__
+#undef __ARGP_OPTIMIZE__
+#define __ARGP_OPTIMIZE__
 #include "argp-fmtstream.h"
 
 /* Add weak aliases.  */

File Added: pkgsrc/mail/ifile/patches/patch-argp_argp-xinl.c
$NetBSD: patch-argp_argp-xinl.c,v 1.1 2021/12/26 23:54:01 nros Exp $

* defining __OPTIMIZE__ to nothing causes ssp.h on NetBSD
  to crash use __ARGP_OPTIMIZE__ instead to avoid conflict

--- argp/argp-xinl.c.orig	2021-12-26 22:35:33.786126632 +0000
+++ argp/argp-xinl.c
@@ -23,8 +23,8 @@
 #endif
 
 #define ARGP_EI
-#undef __OPTIMIZE__
-#define __OPTIMIZE__
+#undef __ARGP_OPTIMIZE__
+#define __ARGP_OPTIMIZE__
 #include "argp.h"
 
 /* Add weak aliases.  */