Author: aurel32
Date: 2014-06-04 18:23:36 +0000 (Wed, 04 Jun 2014)
New Revision: 6122

Added:
   
glibc-package/branches/eglibc-2.19/debian/patches/any/submitted-argp-attribute.diff
Modified:
   glibc-package/branches/eglibc-2.19/debian/changelog
   glibc-package/branches/eglibc-2.19/debian/patches/series
Log:
debian/patches/any/submitted-argp-attribute.diff: new patch from Ond?\197?\153ej
B?\195?\173lka to fix string functions with FORTIFY_SOURCE=2 when <argp.h> is
included before <string.h>.  Closes: #647084.

Modified: glibc-package/branches/eglibc-2.19/debian/changelog
===================================================================
--- glibc-package/branches/eglibc-2.19/debian/changelog 2014-06-04 18:20:38 UTC 
(rev 6121)
+++ glibc-package/branches/eglibc-2.19/debian/changelog 2014-06-04 18:23:36 UTC 
(rev 6122)
@@ -8,6 +8,9 @@
   * Finish debconf translation update from Esko Arajärvi.  Closes: #750124.
   * debian/patches/git-updates.diff: update from the 2.19 branch:
     - fixes pthread_spin_lock on sparc/sparc64.  Closes: #749087.
+  * debian/patches/any/submitted-argp-attribute.diff: new patch from Ondřej
+    Bílka to fix string functions with FORTIFY_SOURCE=2 when <argp.h> is
+    included before <string.h>.  Closes: #647084.
 
   [ Samuel Thibault ]
   * hurd-i386/unsubmitted-pthread_posix-option.diff: Split patches into...

Added: 
glibc-package/branches/eglibc-2.19/debian/patches/any/submitted-argp-attribute.diff
===================================================================
--- 
glibc-package/branches/eglibc-2.19/debian/patches/any/submitted-argp-attribute.diff
                         (rev 0)
+++ 
glibc-package/branches/eglibc-2.19/debian/patches/any/submitted-argp-attribute.diff
 2014-06-04 18:23:36 UTC (rev 6122)
@@ -0,0 +1,111 @@
+2014-06-03  Ondřej Bílka  <nel...@seznam.cz>
+
+       * argp/argp-fmtstream.h (_GL_ATTRIBUTE_FORMAT): Define.
+       (argp_error, argp_failure): Use _GL_ATTRIBUTE_FORMAT.
+       * argp/argp.h (__argp_fmtstream_printf): Likewise.
+
+diff --git a/argp/argp-fmtstream.h b/argp/argp-fmtstream.h
+index 1ed2834..fc07d91 100644
+--- a/argp/argp-fmtstream.h
++++ b/argp/argp-fmtstream.h
+@@ -29,17 +29,16 @@
+ #include <string.h>
+ #include <unistd.h>
+ 
+-#ifndef __attribute__
+-/* This feature is available in gcc versions 2.5 and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+-#  define __attribute__(Spec) /* empty */
+-# endif
+-/* The __-protected variants of `format' and `printf' attributes
+-   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || __STRICT_ANSI__
+-#  define __format__ format
+-#  define __printf__ printf
+-# endif
++/* The __attribute__ feature is available in gcc versions 2.5 and later.
++   The __-protected variants of the attributes 'format' and 'printf' are
++   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
++   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
++   gnulib and libintl do '#define printf __printf__' when they override
++   the 'printf' function.  */
++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
++# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
++#else
++# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+ #endif
+ 
+ #if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)
+@@ -130,10 +127,10 @@ extern void argp_fmtstream_free (argp_fmtstream_t __fs);
+ 
+ extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs,
+                                       const char *__fmt, ...)
+-     __attribute__ ((__format__ (printf, 2, 3)));
++     _GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
+ extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs,
+                                     const char *__fmt, ...)
+-     __attribute__ ((__format__ (printf, 2, 3)));
++     _GL_ATTRIBUTE_FORMAT ((printf, 2, 3));
+ 
+ extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+ extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
+diff --git a/argp/argp.h b/argp/argp.h
+index 0868228..6a1cc1b 100644
+--- a/argp/argp.h
++++ b/argp/argp.h
+@@ -35,17 +35,16 @@
+ # define __NTH(fct) fct __THROW
+ #endif
+ 
+-#ifndef __attribute__
+-/* This feature is available in gcc versions 2.5 and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
+-#  define __attribute__(Spec) /* empty */
+-# endif
+-/* The __-protected variants of `format' and `printf' attributes
+-   are accepted by gcc versions 2.6.4 (effectively 2.7) and later.  */
+-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) || __STRICT_ANSI__
+-#  define __format__ format
+-#  define __printf__ printf
+-# endif
++/* The __attribute__ feature is available in gcc versions 2.5 and later.
++   The __-protected variants of the attributes 'format' and 'printf' are
++   accepted by gcc versions 2.6.4 (effectively 2.7) and later.
++   We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because
++   gnulib and libintl do '#define printf __printf__' when they override
++   the 'printf' function.  */
++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
++# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
++#else
++# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */
+ #endif
+ 
+ /* GCC 2.95 and later have "__restrict"; C99 compilers have
+@@ -503,10 +500,10 @@ extern void __argp_usage (const struct argp_state 
*__state);
+    message, then exit (1).  */
+ extern void argp_error (const struct argp_state *__restrict __state,
+                       const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 2, 3)));
++     _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
+ extern void __argp_error (const struct argp_state *__restrict __state,
+                         const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 2, 3)));
++    _GL_ATTRIBUTE_FORMAT ((__printf__, 2, 3));
+ 
+ /* Similar to the standard gnu error-reporting function error(), but will
+    respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print
+@@ -519,11 +516,11 @@ extern void __argp_error (const struct argp_state 
*__restrict __state,
+ extern void argp_failure (const struct argp_state *__restrict __state,
+                         int __status, int __errnum,
+                         const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 4, 5)));
++     _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
+ extern void __argp_failure (const struct argp_state *__restrict __state,
+                           int __status, int __errnum,
+                           const char *__restrict __fmt, ...)
+-     __attribute__ ((__format__ (__printf__, 4, 5)));
++     _GL_ATTRIBUTE_FORMAT ((__printf__, 4, 5));
+ 
+ /* Returns true if the option OPT is a valid short option.  */
+ extern int _option_is_short (const struct argp_option *__opt) __THROW;
+

Modified: glibc-package/branches/eglibc-2.19/debian/patches/series
===================================================================
--- glibc-package/branches/eglibc-2.19/debian/patches/series    2014-06-04 
18:20:38 UTC (rev 6121)
+++ glibc-package/branches/eglibc-2.19/debian/patches/series    2014-06-04 
18:23:36 UTC (rev 6122)
@@ -243,3 +243,4 @@
 any/submitted-nl_langinfo-static.diff
 any/cvs-strtod.diff
 any/cvs-resolv-reuse-fd.diff
+any/submitted-argp-attribute.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/e1wsfqa-0004wq...@moszumanska.debian.org

Reply via email to