This commit is contained in:
TriForceX
2019-09-25 20:51:37 -03:00
commit 6203ff3e7c
11215 changed files with 428258 additions and 0 deletions

View File

@@ -0,0 +1,79 @@
# --- T2-COPYRIGHT-NOTE-BEGIN ---
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
#
# T2 SDE: package/.../rng-tools/throw-in-funcdef.patch.argp-standalone
# Copyright (C) 2006 The T2 SDE Project
#
# More information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
# --- T2-COPYRIGHT-NOTE-END ---
No __THROW in function implementation.
--jsaw
--- argp-standalone-1.4-test2/argp.h.orig 2006-01-06 02:29:59.000000000 +0100
+++ argp-standalone-1.4-test2/argp.h 2006-01-06 02:41:10.000000000 +0100
@@ -560,17 +560,17 @@
# endif
# ifndef ARGP_EI
-# define ARGP_EI extern __inline__
+# define ARGP_EI extern inline
# endif
ARGP_EI 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);
}
ARGP_EI 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;
@@ -582,7 +582,7 @@
}
ARGP_EI 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;
}
--- argp-standalone-1.4-test2/argp-parse.c.orig 2006-01-06 02:47:48.000000000 +0100
+++ argp-standalone-1.4-test2/argp-parse.c 2006-01-06 02:48:16.000000000 +0100
@@ -1290,13 +1290,13 @@
/* 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;
@@ -1310,7 +1310,7 @@
}
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;
}

View File

@@ -0,0 +1,45 @@
Subject: restrict value range passed to isprint function
According to C standards isprint argument shall be representable as an
unsigned char or be equal to EOF, otherwise the behaviour is undefined.
Passing arbitrary ints leads to segfault in nm program from elfutils.
Restrict isprint argument range to values representable by unsigned char.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Index: b/argp.h
===================================================================
--- a/argp.h
+++ b/argp.h
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <ctype.h>
+#include <limits.h>
#define __need_error_t
#include <errno.h>
@@ -577,7 +578,7 @@
else
{
int __key = __opt->key;
- return __key > 0 && isprint (__key);
+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
}
}
Index: b/argp-parse.c
===================================================================
--- a/argp-parse.c
+++ b/argp-parse.c
@@ -1292,7 +1292,7 @@
int __key = __opt->key;
/* FIXME: whether or not a particular key implies a short option
* ought not to be locale dependent. */
- return __key > 0 && isprint (__key);
+ return __key > 0 && __key <= UCHAR_MAX && isprint (__key);
}
}

View File

@@ -0,0 +1,68 @@
From b2dfa011a3fdcb7d22764d143517d0fbd1c2a201 Mon Sep 17 00:00:00 2001
From: Emmanuel Dreyfus <manu@netbsd.org>
Date: Wed, 22 Jan 2014 14:47:23 +0100
Subject: [PATCH] Fix build with c99 compilers
BUG: 764655
Change-Id: If5dfdc9c7427bd3d39d8da8f79e33ae2da6a3137
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6034
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
---
diff --git a/argp-fmtstream.c b/argp-fmtstream.c
index 7f79285..494b6b3 100644
--- a/argp-fmtstream.c
+++ b/argp-fmtstream.c
@@ -389,6 +389,7 @@
weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
#endif
+#if __STDC_VERSION__ - 199900L < 1
/* Duplicate the inline definitions in argp-fmtstream.h, for compilers
* that don't do inlining. */
size_t
@@ -471,5 +472,6 @@
__argp_fmtstream_update (__fs);
return __fs->point_col >= 0 ? __fs->point_col : 0;
}
+#endif /* __STDC_VERSION__ - 199900L < 1 */
#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
diff --git a/argp-fmtstream.h b/argp-fmtstream.h
index e797b11..828f435 100644
--- a/argp-fmtstream.h
+++ b/argp-fmtstream.h
@@ -153,6 +153,7 @@
__const char *__fmt, ...)
PRINTF_STYLE(2,3);
+#if __STDC_VERSION__ - 199900L < 1
extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
@@ -163,6 +164,7 @@
__const char *__str, size_t __len);
extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
__const char *__str, size_t __len);
+#endif /* __STDC_VERSION__ - 199900L < 1 */
/* Access macros for various bits of state. */
#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
@@ -172,6 +174,7 @@
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+#if __STDC_VERSION__ - 199900L < 1
/* Set __FS's left margin to LMARGIN and return the old value. */
extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
size_t __lmargin);
@@ -193,6 +196,7 @@
/* Return the column number of the current output point in __FS. */
extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
+#endif /* __STDC_VERSION__ - 199900L < 1 */
/* Internal routines. */
extern void _argp_fmtstream_update (argp_fmtstream_t __fs);

View File

@@ -0,0 +1,8 @@
config BR2_PACKAGE_ARGP_STANDALONE
bool "argp-standalone"
# glibc provides its own argp implementation.
depends on !BR2_TOOLCHAIN_USES_GLIBC
help
Glibc hierarchical argument parsing standalone library.
http://www.lysator.liu.se/~nisse/misc/

View File

@@ -0,0 +1,2 @@
# Locally calculated after checking pgp signature
sha256 dec79694da1319acd2238ce95df57f3680fea2482096e483323fddf3d818d8be argp-standalone-1.3.tar.gz

View File

@@ -0,0 +1,25 @@
################################################################################
#
# argp-standalone
#
################################################################################
ARGP_STANDALONE_VERSION = 1.3
ARGP_STANDALONE_SITE = http://www.lysator.liu.se/~nisse/archive
ARGP_STANDALONE_INSTALL_STAGING = YES
ARGP_STANDALONE_LICENSE = LGPL-2.0+
ARGP_STANDALONE_CONF_ENV = \
CFLAGS="$(TARGET_CFLAGS) -fPIC -fgnu89-inline"
define ARGP_STANDALONE_INSTALL_STAGING_CMDS
$(INSTALL) -D $(@D)/libargp.a $(STAGING_DIR)/usr/lib/libargp.a
$(INSTALL) -D $(@D)/argp.h $(STAGING_DIR)/usr/include/argp.h
endef
define ARGP_STANDALONE_INSTALL_TARGET_CMDS
$(INSTALL) -D $(@D)/libargp.a $(TARGET_DIR)/usr/lib/libargp.a
$(INSTALL) -D $(@D)/argp.h $(TARGET_DIR)/usr/include/argp.h
endef
$(eval $(autotools-package))