pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/argp



Module Name:    pkgsrc
Committed By:   js
Date:           Sun Mar 12 12:38:57 UTC 2023

Modified Files:
        pkgsrc/devel/argp: distinfo
Added Files:
        pkgsrc/devel/argp/patches: patch-argp-parse.c patch-argp.h

Log Message:
devel/argp: Fix compilation


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 pkgsrc/devel/argp/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/argp/patches/patch-argp-parse.c \
    pkgsrc/devel/argp/patches/patch-argp.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/argp/distinfo
diff -u pkgsrc/devel/argp/distinfo:1.9 pkgsrc/devel/argp/distinfo:1.10
--- pkgsrc/devel/argp/distinfo:1.9      Tue Oct 26 10:14:16 2021
+++ pkgsrc/devel/argp/distinfo  Sun Mar 12 12:38:56 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.9 2021/10/26 10:14:16 nia Exp $
+$NetBSD: distinfo,v 1.10 2023/03/12 12:38:56 js Exp $
 
 BLAKE2s (argp-standalone-1.3.tar.gz) = aadc55df51b443d36f081b06a48d864aba802b8239e132f5d88b18cc1fedcca2
 SHA512 (argp-standalone-1.3.tar.gz) = 58c3feb8852b90248fff39e49b5019bd0dcf646790c3eaf70c3262eb81dda31a61dc0a45963c7b4a010e80fc14b37288dcb3b3ef48d02f2d33dd72c1c62e62d9
@@ -7,3 +7,5 @@ SHA1 (patch-aa) = f6053a22f3267392d6dbd3
 SHA1 (patch-ab) = dfec66b81dfb21e019652fcbffeefa3ee88c4109
 SHA1 (patch-argp-fmtstream.c) = c7e763bb317702e5072570783629d8e973e5f077
 SHA1 (patch-argp-fmtstream.h) = c0b740fc31d51d0295d6bd01a9ed1a84ff2b5205
+SHA1 (patch-argp-parse.c) = 0e6e61ec639dc9afb6863709038ec27bd6cda527
+SHA1 (patch-argp.h) = 82e8035a12779c392f291838fd956101433f2ff9

Added files:

Index: pkgsrc/devel/argp/patches/patch-argp-parse.c
diff -u /dev/null pkgsrc/devel/argp/patches/patch-argp-parse.c:1.1
--- /dev/null   Sun Mar 12 12:38:57 2023
+++ pkgsrc/devel/argp/patches/patch-argp-parse.c        Sun Mar 12 12:38:56 2023
@@ -0,0 +1,32 @@
+$NetBSD: patch-argp-parse.c,v 1.1 2023/03/12 12:38:56 js Exp $
+
+Remove __THROW that might be defined to __attribute__((nothrow)) and would thus
+cause the compilation to fail.
+
+--- argp-parse.c.orig  2003-12-11 08:37:05.000000000 +0000
++++ argp-parse.c
+@@ -1277,13 +1277,13 @@ weak_alias (__argp_input, _argp_input)
+ /* Defined here, in case a user is not inlining the definitions in
+  * argp.h */
+ void
+-__argp_usage (__const struct argp_state *__state) __THROW
++__argp_usage (__const struct argp_state *__state)
+ {
+   __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+ }
+ 
+ int
+-__option_is_short (__const struct argp_option *__opt) __THROW
++__option_is_short (__const struct argp_option *__opt)
+ {
+   if (__opt->flags & OPTION_DOC)
+     return 0;
+@@ -1297,7 +1297,7 @@ __option_is_short (__const struct argp_o
+ }
+ 
+ int
+-__option_is_end (__const struct argp_option *__opt) __THROW
++__option_is_end (__const struct argp_option *__opt)
+ {
+   return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+ }
Index: pkgsrc/devel/argp/patches/patch-argp.h
diff -u /dev/null pkgsrc/devel/argp/patches/patch-argp.h:1.1
--- /dev/null   Sun Mar 12 12:38:57 2023
+++ pkgsrc/devel/argp/patches/patch-argp.h      Sun Mar 12 12:38:56 2023
@@ -0,0 +1,177 @@
+$NetBSD: patch-argp.h,v 1.1 2023/03/12 12:38:56 js Exp $
+
+Remove __THROW that might be defined to __attribute__((nothrow)) and would thus
+cause the compilation to fail.
+
+Remove everything in #ifdef __USE_EXTERN_INLINES, as this results in duplicate
+definitions.
+
+--- argp.h.orig        2003-12-11 08:37:05.000000000 +0000
++++ argp.h
+@@ -27,10 +27,6 @@
+ #define __need_error_t
+ #include <errno.h>
+ 
+-#ifndef __THROW
+-# define __THROW
+-#endif
+-
+ #ifndef __const
+ # define __const const
+ #endif
+@@ -400,11 +396,11 @@ struct argp_state
+ extern error_t argp_parse (__const struct argp *__restrict __argp,
+                          int __argc, char **__restrict __argv,
+                          unsigned __flags, int *__restrict __arg_index,
+-                         void *__restrict __input) __THROW;
++                         void *__restrict __input);
+ extern error_t __argp_parse (__const struct argp *__restrict __argp,
+                            int __argc, char **__restrict __argv,
+                            unsigned __flags, int *__restrict __arg_index,
+-                           void *__restrict __input) __THROW;
++                           void *__restrict __input);
+ 
+ /* Global variables.  */
+ 
+@@ -468,10 +464,10 @@ extern error_t argp_err_exit_status;
+    ARGP_HELP_*.  */
+ extern void argp_help (__const struct argp *__restrict __argp,
+                      FILE *__restrict __stream,
+-                     unsigned __flags, char *__restrict __name) __THROW;
++                     unsigned __flags, char *__restrict __name);
+ extern void __argp_help (__const struct argp *__restrict __argp,
+                        FILE *__restrict __stream, unsigned __flags,
+-                       char *__name) __THROW;
++                       char *__name);
+ 
+ /* The following routines are intended to be called from within an argp
+    parsing routine (thus taking an argp_state structure as the first
+@@ -485,23 +481,23 @@ extern void __argp_help (__const struct
+    from the set ARGP_HELP_*.  */
+ extern void argp_state_help (__const struct argp_state *__restrict __state,
+                            FILE *__restrict __stream,
+-                           unsigned int __flags) __THROW;
++                           unsigned int __flags);
+ extern void __argp_state_help (__const struct argp_state *__restrict __state,
+                              FILE *__restrict __stream,
+-                             unsigned int __flags) __THROW;
++                             unsigned int __flags);
+ 
+ /* Possibly output the standard usage message for ARGP to stderr and exit.  */
+-extern void argp_usage (__const struct argp_state *__state) __THROW;
+-extern void __argp_usage (__const struct argp_state *__state) __THROW;
++extern void argp_usage (__const struct argp_state *__state);
++extern void __argp_usage (__const struct argp_state *__state);
+ 
+ /* If appropriate, print the printf string FMT and following args, preceded
+    by the program name and `:', to stderr, and followed by a `Try ... --help'
+    message, then exit (1).  */
+ extern void argp_error (__const struct argp_state *__restrict __state,
+-                      __const char *__restrict __fmt, ...) __THROW
++                      __const char *__restrict __fmt, ...)
+      PRINTF_STYLE(2,3);
+ extern void __argp_error (__const struct argp_state *__restrict __state,
+-                        __const char *__restrict __fmt, ...) __THROW
++                        __const char *__restrict __fmt, ...)
+      PRINTF_STYLE(2,3);
+ 
+ /* Similar to the standard gnu error-reporting function error(), but will
+@@ -514,86 +510,38 @@ extern void __argp_error (__const struct
+    parsing but don't reflect a (syntactic) problem with the input.  */
+ extern void argp_failure (__const struct argp_state *__restrict __state,
+                         int __status, int __errnum,
+-                        __const char *__restrict __fmt, ...) __THROW
++                        __const char *__restrict __fmt, ...)
+      PRINTF_STYLE(4,5);
+ extern void __argp_failure (__const struct argp_state *__restrict __state,
+                           int __status, int __errnum,
+-                          __const char *__restrict __fmt, ...) __THROW
++                          __const char *__restrict __fmt, ...)
+      PRINTF_STYLE(4,5);
+ 
+ /* Returns true if the option OPT is a valid short option.  */
+-extern int _option_is_short (__const struct argp_option *__opt) __THROW;
+-extern int __option_is_short (__const struct argp_option *__opt) __THROW;
++extern int _option_is_short (__const struct argp_option *__opt);
++extern int __option_is_short (__const struct argp_option *__opt);
+ 
+ /* Returns true if the option OPT is in fact the last (unused) entry in an
+    options array.  */
+-extern int _option_is_end (__const struct argp_option *__opt) __THROW;
+-extern int __option_is_end (__const struct argp_option *__opt) __THROW;
++extern int _option_is_end (__const struct argp_option *__opt);
++extern int __option_is_end (__const struct argp_option *__opt);
+ 
+ /* Return the input field for ARGP in the parser corresponding to STATE; used
+    by the help routines.  */
+ extern void *_argp_input (__const struct argp *__restrict __argp,
+-                        __const struct argp_state *__restrict __state)
+-     __THROW;
++                        __const struct argp_state *__restrict __state);
+ extern void *__argp_input (__const struct argp *__restrict __argp,
+-                         __const struct argp_state *__restrict __state)
+-     __THROW;
++                         __const struct argp_state *__restrict __state);
+ 
+ /* Used for extracting the program name from argv[0] */
+-extern char *_argp_basename(char *name) __THROW;
+-extern char *__argp_basename(char *name) __THROW;
++extern char *_argp_basename(char *name);
++extern char *__argp_basename(char *name);
+ 
+ /* Getting the program name given an argp state */
+ extern char *
+-_argp_short_program_name(const struct argp_state *state) __THROW;
++_argp_short_program_name(const struct argp_state *state);
+ extern char *
+-__argp_short_program_name(const struct argp_state *state) __THROW;
+-
+-
+-#ifdef __USE_EXTERN_INLINES
+-
+-# if !_LIBC
+-#  define __argp_usage argp_usage
+-#  define __argp_state_help argp_state_help
+-#  define __option_is_short _option_is_short
+-#  define __option_is_end _option_is_end
+-# endif
+-
+-# ifndef ARGP_EI
+-#  define ARGP_EI extern __inline__
+-# endif
+-
+-ARGP_EI void
+-__argp_usage (__const struct argp_state *__state) __THROW
+-{
+-  __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE);
+-}
+-
+-ARGP_EI int
+-__option_is_short (__const struct argp_option *__opt) __THROW
+-{
+-  if (__opt->flags & OPTION_DOC)
+-    return 0;
+-  else
+-    {
+-      int __key = __opt->key;
+-      return __key > 0 && isprint (__key);
+-    }
+-}
+-
+-ARGP_EI int
+-__option_is_end (__const struct argp_option *__opt) __THROW
+-{
+-  return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
+-}
+-
+-# if !_LIBC
+-#  undef __argp_usage
+-#  undef __argp_state_help
+-#  undef __option_is_short
+-#  undef __option_is_end
+-# endif
+-#endif /* Use extern inlines.  */
++__argp_short_program_name(const struct argp_state *state);
+ 
+ #ifdef  __cplusplus
+ }



Home | Main Index | Thread Index | Old Index