mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems
@ 2012-05-31 15:28 Andreas Bießmann
  2012-06-04  8:59 ` Michael Olbrich
  2012-06-04 10:55 ` Andreas Bießmann
  0 siblings, 2 replies; 6+ messages in thread
From: Andreas Bießmann @ 2012-05-31 15:28 UTC (permalink / raw)
  To: PTXdist list

See patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch for
detailed description.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
---
 .../0004-text-utils-hexsyntax.c-use-c.h.patch      |   32 ++++++++++++++++++++
 patches/util-linux-2.21.2/series                   |    3 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch

diff --git a/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
new file mode 100644
index 0000000..4084af3
--- /dev/null
+++ b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
@@ -0,0 +1,32 @@
+From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <biessmann@corscience.de>
+Date: Tue, 29 May 2012 09:51:24 +0200
+Subject: [PATCH] text-utils/hexsyntax.c: use c.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch hfixes following error for me:
+---8<---
+hexsyntax.c: In function 'newsyntax':
+hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
+hexsyntax.c:115: error: (Each undeclared identifier is reported only once
+hexsyntax.c:115: error: for each function it appears in.)
+--->8---
+
+Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
+---
+ text-utils/hexsyntax.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/text-utils/hexsyntax.c b/text-utils/hexsyntax.c
+index 5cdd1de..74146c8 100644
+--- a/text-utils/hexsyntax.c
++++ b/text-utils/hexsyntax.c
+@@ -45,6 +45,7 @@
+ #include "hexdump.h"
+ #include "nls.h"
+ #include "strutils.h"
++#include "c.h"
+ 
+ off_t skip;				/* bytes to skip */
+ 
diff --git a/patches/util-linux-2.21.2/series b/patches/util-linux-2.21.2/series
index 4f56478..45da749 100644
--- a/patches/util-linux-2.21.2/series
+++ b/patches/util-linux-2.21.2/series
@@ -3,4 +3,5 @@
 0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
 0002-__progname-redefinition-fix.patch
 0003-replace-index-with-strchr.patch
-# 5460ef482e2f1fbfb2002773d7074ab5  - git-ptx-patches magic
+0004-text-utils-hexsyntax.c-use-c.h.patch
+# 96d8b4106ab3633e981114542f3d18da  - git-ptx-patches magic
-- 
1.7.10


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems
  2012-05-31 15:28 [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems Andreas Bießmann
@ 2012-06-04  8:59 ` Michael Olbrich
  2012-06-04 10:20   ` Andreas Bießmann
  2012-06-04 10:25   ` Andreas Bießmann
  2012-06-04 10:55 ` Andreas Bießmann
  1 sibling, 2 replies; 6+ messages in thread
From: Michael Olbrich @ 2012-06-04  8:59 UTC (permalink / raw)
  To: ptxdist

On Thu, May 31, 2012 at 05:28:00PM +0200, Andreas Bießmann wrote:
> See patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch for
> detailed description.

This occurs when building host-util-linux-ng on Mac OS, right? Please add a
comment for this here.

> Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
> ---
>  .../0004-text-utils-hexsyntax.c-use-c.h.patch      |   32 ++++++++++++++++++++
>  patches/util-linux-2.21.2/series                   |    3 +-
>  2 files changed, 34 insertions(+), 1 deletion(-)
>  create mode 100644 patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
> 
> diff --git a/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
> new file mode 100644
> index 0000000..4084af3
> --- /dev/null
> +++ b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
> @@ -0,0 +1,32 @@
> +From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <biessmann@corscience.de>
> +Date: Tue, 29 May 2012 09:51:24 +0200
> +Subject: [PATCH] text-utils/hexsyntax.c: use c.h
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +This patch hfixes following error for me:
> +---8<---
> +hexsyntax.c: In function 'newsyntax':
> +hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
> +hexsyntax.c:115: error: (Each undeclared identifier is reported only once
> +hexsyntax.c:115: error: for each function it appears in.)
> +--->8---

This can only happen if program_invocation_short_name is not defined by the
libc (probably glibc specific). Please add something like that to the
comment.
Otherwise, the patch might be removed later because it 'works'.

Michael

> +
> +Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
> +---
> + text-utils/hexsyntax.c |    1 +
> + 1 file changed, 1 insertion(+)
> +
> +diff --git a/text-utils/hexsyntax.c b/text-utils/hexsyntax.c
> +index 5cdd1de..74146c8 100644
> +--- a/text-utils/hexsyntax.c
> ++++ b/text-utils/hexsyntax.c
> +@@ -45,6 +45,7 @@
> + #include "hexdump.h"
> + #include "nls.h"
> + #include "strutils.h"
> ++#include "c.h"
> + 
> + off_t skip;				/* bytes to skip */
> + 
> diff --git a/patches/util-linux-2.21.2/series b/patches/util-linux-2.21.2/series
> index 4f56478..45da749 100644
> --- a/patches/util-linux-2.21.2/series
> +++ b/patches/util-linux-2.21.2/series
> @@ -3,4 +3,5 @@
>  0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
>  0002-__progname-redefinition-fix.patch
>  0003-replace-index-with-strchr.patch
> -# 5460ef482e2f1fbfb2002773d7074ab5  - git-ptx-patches magic
> +0004-text-utils-hexsyntax.c-use-c.h.patch
> +# 96d8b4106ab3633e981114542f3d18da  - git-ptx-patches magic
> -- 
> 1.7.10
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems
  2012-06-04  8:59 ` Michael Olbrich
@ 2012-06-04 10:20   ` Andreas Bießmann
  2012-06-04 10:25   ` Andreas Bießmann
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Bießmann @ 2012-06-04 10:20 UTC (permalink / raw)
  To: ptxdist

On 04.06.2012 10:59, Michael Olbrich wrote:
> On Thu, May 31, 2012 at 05:28:00PM +0200, Andreas Bießmann wrote:
>> See patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch for
>> detailed description.
> 
> This occurs when building host-util-linux-ng on Mac OS, right? Please add a
> comment for this here.

No, but building util-linux-ng for avr32 which do not expose
program_invocation_short_name in uclibc.

best regards

Andreas Bießmann

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems
  2012-06-04  8:59 ` Michael Olbrich
  2012-06-04 10:20   ` Andreas Bießmann
@ 2012-06-04 10:25   ` Andreas Bießmann
  2012-06-04 18:46     ` Bernhard Walle
  1 sibling, 1 reply; 6+ messages in thread
From: Andreas Bießmann @ 2012-06-04 10:25 UTC (permalink / raw)
  To: ptxdist

Hi again,

On 04.06.2012 10:59, Michael Olbrich wrote:
> On Thu, May 31, 2012 at 05:28:00PM +0200, Andreas Bießmann wrote:
>> See patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch for
>> detailed description.
> 
> This occurs when building host-util-linux-ng on Mac OS, right? Please add a
> comment for this here.
> 
>> Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
>> ---
>>  .../0004-text-utils-hexsyntax.c-use-c.h.patch      |   32 ++++++++++++++++++++
>>  patches/util-linux-2.21.2/series                   |    3 +-
>>  2 files changed, 34 insertions(+), 1 deletion(-)
>>  create mode 100644 patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
>>
>> diff --git a/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
>> new file mode 100644
>> index 0000000..4084af3
>> --- /dev/null
>> +++ b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-use-c.h.patch
>> @@ -0,0 +1,32 @@
>> +From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <biessmann@corscience.de>
>> +Date: Tue, 29 May 2012 09:51:24 +0200
>> +Subject: [PATCH] text-utils/hexsyntax.c: use c.h
>> +MIME-Version: 1.0
>> +Content-Type: text/plain; charset=UTF-8
>> +Content-Transfer-Encoding: 8bit
>> +
>> +This patch hfixes following error for me:
>> +---8<---
>> +hexsyntax.c: In function 'newsyntax':
>> +hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
>> +hexsyntax.c:115: error: (Each undeclared identifier is reported only once
>> +hexsyntax.c:115: error: for each function it appears in.)
>> +--->8---
> 
> This can only happen if program_invocation_short_name is not defined by the
> libc (probably glibc specific). Please add something like that to the
> comment.
> Otherwise, the patch might be removed later because it 'works'.

sorry, did not read until the end.

Well, util-linux-ng has some helper for program_invocation_short_name in
its c.h. There are some different ways to get the current process name
coded there.
Unfortunately the current version miss to include the c.h in
hexsyntax.c. The attached patch is also sent mainline and will hopefully
applied soon. Therefore this patch can be removed here in future.

best regards

Andreas Bießmann

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems
  2012-05-31 15:28 [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems Andreas Bießmann
  2012-06-04  8:59 ` Michael Olbrich
@ 2012-06-04 10:55 ` Andreas Bießmann
  1 sibling, 0 replies; 6+ messages in thread
From: Andreas Bießmann @ 2012-06-04 10:55 UTC (permalink / raw)
  To: PTXdist list

Some libc do not expose program_invocation_short_name. This patch use the
util-linux-ng provided 'c.h' header to circumvent that fact.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
---
 ...hexsyntax.c-fix-for-missing-program_invoc.patch |   36 ++++++++++++++++++++
 patches/util-linux-2.21.2/series                   |    3 +-
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-fix-for-missing-program_invoc.patch

diff --git a/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-fix-for-missing-program_invoc.patch b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-fix-for-missing-program_invoc.patch
new file mode 100644
index 0000000..51e28d4
--- /dev/null
+++ b/patches/util-linux-2.21.2/0004-text-utils-hexsyntax.c-fix-for-missing-program_invoc.patch
@@ -0,0 +1,36 @@
+From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= <biessmann@corscience.de>
+Date: Tue, 29 May 2012 09:51:24 +0200
+Subject: [PATCH] text-utils/hexsyntax.c: fix for missing
+ program_invocation_short_name
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Some libc do not expose program_invocation_short_name. Therefore util-linux
+comes with helpers in 'c.h'. Use the 'c.h' in hexsyntax.c where it was missed.
+
+This patch fixes following error for me:
+---8<---
+hexsyntax.c: In function 'newsyntax':
+hexsyntax.c:115: error: 'program_invocation_short_name' undeclared (first use in this function)
+hexsyntax.c:115: error: (Each undeclared identifier is reported only once
+hexsyntax.c:115: error: for each function it appears in.)
+--->8---
+
+Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
+---
+ text-utils/hexsyntax.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/text-utils/hexsyntax.c b/text-utils/hexsyntax.c
+index 5cdd1de..74146c8 100644
+--- a/text-utils/hexsyntax.c
++++ b/text-utils/hexsyntax.c
+@@ -45,6 +45,7 @@
+ #include "hexdump.h"
+ #include "nls.h"
+ #include "strutils.h"
++#include "c.h"
+ 
+ off_t skip;				/* bytes to skip */
+ 
diff --git a/patches/util-linux-2.21.2/series b/patches/util-linux-2.21.2/series
index 4f56478..9718184 100644
--- a/patches/util-linux-2.21.2/series
+++ b/patches/util-linux-2.21.2/series
@@ -3,4 +3,5 @@
 0001-libmount-add-fallbacks-for-old-systems-without-umoun.patch
 0002-__progname-redefinition-fix.patch
 0003-replace-index-with-strchr.patch
-# 5460ef482e2f1fbfb2002773d7074ab5  - git-ptx-patches magic
+0004-text-utils-hexsyntax.c-fix-for-missing-program_invoc.patch
+# f153341f4051f66cbeedef2bbd15c9cf  - git-ptx-patches magic
-- 
1.7.10


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems
  2012-06-04 10:25   ` Andreas Bießmann
@ 2012-06-04 18:46     ` Bernhard Walle
  0 siblings, 0 replies; 6+ messages in thread
From: Bernhard Walle @ 2012-06-04 18:46 UTC (permalink / raw)
  To: ptxdist

Am 04.06.12 12:25, schrieb Andreas Bießmann:
> 
> Well, util-linux-ng has some helper for program_invocation_short_name in
> its c.h. There are some different ways to get the current process name
> coded there.
> Unfortunately the current version miss to include the c.h in
> hexsyntax.c. The attached patch is also sent mainline and will hopefully
> applied soon. Therefore this patch can be removed here in future.

You can also enable program_invocation_short_name in uclibc config
(UCLIBC_HAS_PROGRAM_INVOCATION_NAME).


Regards,
Bernhard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-06-04 18:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-31 15:28 [ptxdist] [PATCH] util-linux: fix hexsyntax.c for some systems Andreas Bießmann
2012-06-04  8:59 ` Michael Olbrich
2012-06-04 10:20   ` Andreas Bießmann
2012-06-04 10:25   ` Andreas Bießmann
2012-06-04 18:46     ` Bernhard Walle
2012-06-04 10:55 ` Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox