Skip to contentSkip to conversation

package/argp-standalone: format patches to git patches

PATCH New Romain Naour 4 participants 10 messages May 1, 2015 – May 2, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 package/argp-standalone: format patches to git patches

---
 .../argp-standalone/0001-throw-in-funcdef.patch    | 102 ++++++++++++---------
 package/argp-standalone/0002-isprint.patch         |  41 ++++++---
 2 files changed, 88 insertions(+), 55 deletions(-)
package/argp-standalone/0001-throw-in-funcdef.patch +60 -42
index 4a90751..a07e559 100644
@@ -1,79 +1,97 @@
-# --- 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 ---
+From 28ed8fb9333d0618212fd8b4391b4978072a4120 Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Fri, 1 May 2015 18:15:53 +0200
+Subject: [PATCH 1/2] No __THROW in function implementation
 
+--- 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
+[Romain: format to git patch]
+Signed-off-by: Romain Naour <[email protected]>
+---
+ argp-parse.c | 6 +++---
+ argp.h       | 8 ++++----
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/argp-parse.c b/argp-parse.c
+index 10bff92..bdb4ad6 100644
+--- a/argp-parse.c
++++ b/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);
  }
  
- ARGP_EI int
+ int
 -__option_is_short (__const struct argp_option *__opt) __THROW
-+__option_is_short (__const struct argp_option *__opt)
++__option_is_short (__const struct argp_option *__opt) 
  {
    if (__opt->flags & OPTION_DOC)
      return 0;
-@@ -582,7 +582,7 @@
+@@ -1297,7 +1297,7 @@ __option_is_short (__const struct argp_option *__opt) __THROW
  }
  
- ARGP_EI int
+ int
 -__option_is_end (__const struct argp_option *__opt) __THROW
-+__option_is_end (__const struct argp_option *__opt)
++__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
+diff --git a/argp.h b/argp.h
+index 56f1c3d..ee23c99 100644
+--- a/argp.h
++++ b/argp.h
+@@ -560,17 +560,17 @@ __argp_short_program_name(const struct argp_state *state) __THROW;
+ # 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);
  }
  
- int
+ ARGP_EI int
 -__option_is_short (__const struct argp_option *__opt) __THROW
-+__option_is_short (__const struct argp_option *__opt) 
++__option_is_short (__const struct argp_option *__opt)
  {
    if (__opt->flags & OPTION_DOC)
      return 0;
-@@ -1310,7 +1310,7 @@
+@@ -582,7 +582,7 @@ __option_is_short (__const struct argp_option *__opt) __THROW
  }
  
- int
+ ARGP_EI int
 -__option_is_end (__const struct argp_option *__opt) __THROW
-+__option_is_end (__const struct argp_option *__opt) 
++__option_is_end (__const struct argp_option *__opt)
  {
    return !__opt->key && !__opt->name && !__opt->doc && !__opt->group;
  }
+-- 
+1.9.3
+
package/argp-standalone/0002-isprint.patch +28 -13

60 lines not on this page · raw message

Signature · 1 line
1.9.3
#1 lore raw

PATCH 2/3 package/argp-standalone: add missing limits.h

Fixes:
http://autobuild.buildroot.net/results/b80/b802cc638a4b11d2a2098b82615f2c0ccadf8e3f/build-end.log

---
 package/argp-standalone/0002-isprint.patch | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
package/argp-standalone/0002-isprint.patch +16 -7
index 00ace31..ffdca4c 100644
@@ -1,7 +1,7 @@
-From 9f1c15818915b888a93d4514cf4cf3fead261c3c Mon Sep 17 00:00:00 2001
+From f5635bb13af07190bd057889f90110bf74e1c5c0 Mon Sep 17 00:00:00 2001
 From: Max Filippov <[email protected]>
 Date: Fri, 1 May 2015 18:21:51 +0200
-Subject: [PATCH 2/2] restrict value range passed to isprint function
+Subject: [PATCH] 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.
@@ -12,12 +12,13 @@ Restrict isprint argument range to values representable by unsigned char.
 
 Signed-off-by: Max Filippov <[email protected]>
 [Romain:
-  - format to git patch]
+  - format to git patch
+  - add missing limits.h header for UCHAR_MAX]
 Signed-off-by: Romain Naour <[email protected]>
 ---
  argp-parse.c | 2 +-
- argp.h       | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
+ argp.h       | 3 ++-
+ 2 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/argp-parse.c b/argp-parse.c
 index bdb4ad6..d8e7d54 100644
@@ -33,10 +34,18 @@ index bdb4ad6..d8e7d54 100644
  }
  
 diff --git a/argp.h b/argp.h
-index ee23c99..abd8b05 100644
+index ee23c99..b2c5f74 100644
 --- a/argp.h
 +++ b/argp.h
-@@ -577,7 +577,7 @@ __option_is_short (__const struct argp_option *__opt)
+@@ -23,6 +23,7 @@
+ 
+ #include <stdio.h>
+ #include <ctype.h>
++#include <limits.h>
+ 
+ #define __need_error_t
+ #include <errno.h>
+@@ -577,7 +578,7 @@ __option_is_short (__const struct argp_option *__opt)
    else
      {
        int __key = __opt->key;
Signature · 1 line
1.9.3
#2 lore raw

PATCH 2/3 package/argp-standalone: add missing limits.h

Quoted 8 lines · Romain Naour

Fixes:
http://autobuild.buildroot.net/results/b80/b802cc638a4b11d2a2098b82615f2c0ccadf8e3f/build-end.log

---
 package/argp-standalone/0002-isprint.patch | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)
Signature · 2 lines
Thanks.
-- Max
#3 lore raw

PATCH 2/3 package/argp-standalone: add missing limits.h

In reply to Romain Naour

Dear Romain Naour,

Quoted 8 lines · Romain Naour

Fixes:
http://autobuild.buildroot.net/results/b80/b802cc638a4b11d2a2098b82615f2c0ccadf8e3f/build-end.log

---
 package/argp-standalone/0002-isprint.patch | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

I have already done a similar fix a few hours ago:
http://git.buildroot.net/buildroot/commit/?id=2a4ece2ed3e3766c463ef8f61a3362ba86c8a6cf.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 2/3 package/argp-standalone: add missing limits.h

Hi Thomas,

Le 01/05/2015 22:48, Thomas Petazzoni a ?crit :

Quoted 6 lines

Dear Romain Naour,

Quoted 3 lines · Romain Naour

Fixes:
http://autobuild.buildroot.net/results/b80/b802cc638a4b11d2a2098b82615f2c0ccadf8e3f/build-end.log

Quoted 8 lines
Quoted 5 lines
---
 package/argp-standalone/0002-isprint.patch | 23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

I have already done a similar fix a few hours ago:
http://git.buildroot.net/buildroot/commit/?id=2a4ece2ed3e3766c463ef8f61a3362ba86c8a6cf.

Sorry, I missed it.

Best regards,
Romain

Quoted 5 lines

Best regards,

Thomas

#5 lore raw

PATCH 3/3 package/wvstreams: add argp-standalone as optionnal dependency

In reply to Romain Naour

This ensures the build reproducibility.

---
 package/wvstreams/wvstreams.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/wvstreams/wvstreams.mk +5 -0
index bc7c5d4..3db317a 100644
@@ -32,6 +32,11 @@ ifneq ($(BR2_STATIC_LIBS),y)
 WVSTREAMS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC"
 endif
 
+# wvstreams use argp.h which can be provided by argp-standalone package.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+WVSTREAMS_DEPENDENCIES += argp-standalone
+endif
+
 ifeq ($(BR2_PACKAGE_DBUS),y)
 WVSTREAMS_DEPENDENCIES += dbus
 WVSTREAMS_CONF_OPTS += --with-dbus
Signature · 1 line
1.9.3
#6 lore raw

PATCH 3/3 package/wvstreams: add argp-standalone as optionnal dependency

Dear Romain Naour,

Quoted 12 lines · Romain Naour

This ensures the build reproducibility.

---
 package/wvstreams/wvstreams.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/wvstreams/wvstreams.mk +0 -0
index bc7c5d4..3db317a 100644

package/wvstreams/wvstreams.mk ifneq ($(BR2_STATIC_LIBS),y) · line 38

Quoted 7 lines
package/wvstreams/wvstreams.mk +4 -0
@@ -32,6 +32,11 @@ ifneq ($(BR2_STATIC_LIBS),y)
 WVSTREAMS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC"
 endif
 
+# wvstreams use argp.h which can be provided by argp-standalone package.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+WVSTREAMS_DEPENDENCIES += argp-standalone
+endif

Applied after fixing typos in the commit title and comment.

I wonder if we shouldn't make the argp-standalone package only available on !glibc builds, since glibc provides its own argp implementation.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#7 lore raw

PATCH 3/3 package/wvstreams: add argp-standalone as optionnal dependency

Hi Thomas,

Le 01/05/2015 23:04, Thomas Petazzoni a ?crit :

Quoted 18 lines

Dear Romain Naour,

Quoted 15 lines · Romain Naour

This ensures the build reproducibility.

---
 package/wvstreams/wvstreams.mk | 5 +++++
 1 file changed, 5 insertions(+)
package/wvstreams/wvstreams.mk +0 -0
index bc7c5d4..3db317a 100644
@@ -32,6 +32,11 @@ ifneq ($(BR2_STATIC_LIBS),y)
 WVSTREAMS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -fPIC"
 endif
 
Quoted 6 lines

package/wvstreams/wvstreams.mk ifneq ($(BR2_STATIC_LIBS),y) · line 38

Quoted 4 lines
package/wvstreams/wvstreams.mk +4 -0
+# wvstreams use argp.h which can be provided by argp-standalone package.
+ifeq ($(BR2_PACKAGE_ARGP_STANDALONE),y)
+WVSTREAMS_DEPENDENCIES += argp-standalone
+endif

Applied after fixing typos in the commit title and comment.

Thanks.

Quoted 4 lines

I wonder if we shouldn't make the argp-standalone package only available on !glibc builds, since glibc provides its own argp implementation.

I'm agree, most of packages which uses argp.h select argp-standalone only when a uClibc toolchain is used.
Except libpthsem package which select argp-standalone unconditionally. However, I built successfully libpthsem with a glibc toolchain and without argp-standalone installed.

It appears that argp.h from glibc is more up to date should be preferred to argp-standalone one.

I can do the change if you want.

Best regards,
Romain

Quoted 5 lines

Thanks,

Thomas

#8 lore raw

PATCH 3/3 package/wvstreams: add argp-standalone as optionnal dependency

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Romain" == Romain Naour <[email protected]> writes:

Hi,

Quoted 4 lines
Quoted 3 lines

I wonder if we shouldn't make the argp-standalone package only available on !glibc builds, since glibc provides its own argp implementation.

Quoted 8 lines

I'm agree, most of packages which uses argp.h select argp-standalone only when a uClibc toolchain is used.
Except libpthsem package which select argp-standalone unconditionally. However, I built successfully libpthsem with a glibc toolchain and without argp-standalone installed.

It appears that argp.h from glibc is more up to date should be preferred to argp-standalone one.

Yes, sounds sensible.

Quoted 1 line

I can do the change if you want.

Please do - Thanks!

Signature · 1 line
Bye, Peter Korsgaard
#9 lore raw

PATCH 3/3 package/wvstreams: add argp-standalone as optionnal dependency

In reply to Romain Naour

Dear Romain Naour,

Quoted 10 lines · Romain Naour

I'm agree, most of packages which uses argp.h select argp-standalone only when a uClibc toolchain is used.
Except libpthsem package which select argp-standalone unconditionally. However, I built successfully libpthsem with a glibc toolchain and without argp-standalone installed.

It appears that argp.h from glibc is more up to date should be preferred to argp-standalone one.

I can do the change if you want.

That would be nice.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com