GNU bug report logs - #19186
[PATCH] OS/2 patches

Previous Next

Package: diffutils;

Reported by: KO Myung-Hun <komh78 <at> gmail.com>

Date: Wed, 26 Nov 2014 02:32:01 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19186 in the body.
You can then email your comments to 19186 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Wed, 26 Nov 2014 02:32:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to KO Myung-Hun <komh78 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-diffutils <at> gnu.org. (Wed, 26 Nov 2014 02:32:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: KO Myung-Hun <komh78 <at> gmail.com>
To: bug-diffutils <at> gnu.org
Subject: [PATCH] OS/2 patches
Date: Wed, 26 Nov 2014 11:29:37 +0900
Hi/2.

These are OS/2 patches.

Review, please...

[PATCH 1/2] build: use quotation mark(") for PATH
[PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC




Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Wed, 26 Nov 2014 03:28:01 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: KO Myung-Hun <komh78 <at> gmail.com>
To: bug-diffutils <at> gnu.org
Subject: [PATCH 1/2] build: use quotation mark(") for PATH
Date: Wed, 26 Nov 2014 11:29:38 +0900
* man/Makefile.am (dist_man1_MANS): On OS/2, PATH_SEPARATOR is ';',
and sh recognizes it as a mark of EOL. To avoid this, quote it.
---
 man/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man/Makefile.am b/man/Makefile.am
index 02cd761..36eb35f 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -29,6 +29,6 @@ sdiff.1: $S/sdiff.c sdiff.x
 $(dist_man1_MANS): $(SRC_VERSION_C) help2man
 	$(AM_V_GEN)base=`expr $@ : '\(.*\).1'`				\
 	  && (echo '[NAME]' && sed 's@/\* *@@; s/-/\\-/; q' $S/$$base.c) \
-	     | PATH=..$(PATH_SEPARATOR)$$PATH				\
+	     | PATH="..$(PATH_SEPARATOR)$$PATH"				\
 	       $(srcdir)/help2man -i - -i $(srcdir)/$$base.x		\
 		 -S '$(PACKAGE) $(VERSION)' $$base > $@-t && mv $@-t $@
-- 
1.8.5.2





Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Wed, 26 Nov 2014 03:28:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: KO Myung-Hun <komh78 <at> gmail.com>
To: bug-diffutils <at> gnu.org
Subject: [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
Date: Wed, 26 Nov 2014 11:29:39 +0900
This fixes the problem that 'diff - file' fails due to seek failure,
because seek does not work on stdin on OS/2 kLIBC.

* src/io.c (sip): Set skip_test to true if seek is not possible on
OS/2 kLIBC.
---
 src/io.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/io.c b/src/io.c
index 05a898c..75c39a9 100644
--- a/src/io.c
+++ b/src/io.c
@@ -108,6 +108,11 @@ sip (struct file_data *current, bool skip_test)
 				     PTRDIFF_MAX - 2 * sizeof (word));
       current->buffer = xmalloc (current->bufsize);
 
+#ifdef __KLIBC__
+      /* Skip test if seek is not possible */
+      skip_test = skip_test || lseek (current->desc, 0, SEEK_CUR) < 0;
+#endif
+
       if (! skip_test)
 	{
 	  /* Check first part of file to see if it's a binary file.  */
-- 
1.8.5.2





Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Tue, 09 Dec 2014 06:09:01 GMT) Full text and rfc822 format available.

Message #14 received at 19186 <at> debbugs.gnu.org (full text, mbox):

From: KO Myung-Hun <komh78 <at> gmail.com>
To: 19186 <at> debbugs.gnu.org
Subject: Re: bug#19186: [PATCH] OS/2 patches
Date: Tue, 09 Dec 2014 15:08:19 +0900
Ping ?

KO Myung-Hun wrote:
> Hi/2.
> 
> These are OS/2 patches.
> 
> Review, please...
> 
> [PATCH 1/2] build: use quotation mark(") for PATH
> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
> 
> 
> 
> 

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr





Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Tue, 09 Dec 2014 15:59:01 GMT) Full text and rfc822 format available.

Message #17 received at 19186 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: KO Myung-Hun <komh78 <at> gmail.com>
Cc: 19186 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#19186: [PATCH] OS/2 patches
Date: Tue, 9 Dec 2014 07:58:09 -0800
On Tue, Nov 25, 2014 at 6:29 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
> Hi/2.
>
> These are OS/2 patches.
>
> Review, please...
>
> [PATCH 1/2] build: use quotation mark(") for PATH
> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC

I saw no patches here, but was able to dig them out of the
bug-tracking system at http://debbugs.gnu.org/19186.
I have applied and pushed the first one.  Thank you.

However, for the second, my inclination is that if at all possible,
it should be fixed via an lseek replacement that does something
more sensible. Of course, that may not be possible, but from
what you've presented so far, I cannot tell. Please demonstrate
a use of diff that shows how OS/2+kLIBC's lseek fails.




Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Thu, 11 Dec 2014 05:38:03 GMT) Full text and rfc822 format available.

Message #20 received at 19186 <at> debbugs.gnu.org (full text, mbox):

From: KO Myung-Hun <komh78 <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: 19186 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#19186: [PATCH] OS/2 patches
Date: Thu, 11 Dec 2014 14:37:11 +0900

Jim Meyering wrote:
> On Tue, Nov 25, 2014 at 6:29 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>> Hi/2.
>>
>> These are OS/2 patches.
>>
>> Review, please...
>>
>> [PATCH 1/2] build: use quotation mark(") for PATH
>> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
> 
> I saw no patches here, but was able to dig them out of the
> bug-tracking system at http://debbugs.gnu.org/19186.
> I have applied and pushed the first one.  Thank you.
> 
> However, for the second, my inclination is that if at all possible,
> it should be fixed via an lseek replacement that does something
> more sensible. Of course, that may not be possible, but from
> what you've presented so far, I cannot tell. Please demonstrate
> a use of diff that shows how OS/2+kLIBC's lseek fails.

Do you want this ?

-----
$ cat file | diff - file
diff.exe: -: Invalid seek
-----


-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr





Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Fri, 12 Dec 2014 15:57:01 GMT) Full text and rfc822 format available.

Message #23 received at 19186 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: KO Myung-Hun <komh78 <at> gmail.com>
Cc: 19186 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#19186: [PATCH] OS/2 patches
Date: Fri, 12 Dec 2014 07:56:29 -0800
On Wed, Dec 10, 2014 at 9:37 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
> Jim Meyering wrote:
>> On Tue, Nov 25, 2014 at 6:29 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>> Hi/2.
>>>
>>> These are OS/2 patches.
>>>
>>> Review, please...
>>>
>>> [PATCH 1/2] build: use quotation mark(") for PATH
>>> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
>>
>> I saw no patches here, but was able to dig them out of the
>> bug-tracking system at http://debbugs.gnu.org/19186.
>> I have applied and pushed the first one.  Thank you.
>>
>> However, for the second, my inclination is that if at all possible,
>> it should be fixed via an lseek replacement that does something
>> more sensible. Of course, that may not be possible, but from
>> what you've presented so far, I cannot tell. Please demonstrate
>> a use of diff that shows how OS/2+kLIBC's lseek fails.
>
> Do you want this ?
>
> -----
> $ cat file | diff - file
> diff.exe: -: Invalid seek
> -----

Yes.  Thanks. That shows how lseek-pipe fails on your system.
Please adjust your patch to make diff ignore failure only in that case,
i.e., when errno == EINVAL (assuming strerror(EINVAL)
produces that diagnostic).




Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Sat, 13 Dec 2014 03:25:02 GMT) Full text and rfc822 format available.

Message #26 received at 19186 <at> debbugs.gnu.org (full text, mbox):

From: KO Myung-Hun <komh78 <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: 19186 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#19186: [PATCH] OS/2 patches
Date: Sat, 13 Dec 2014 12:24:42 +0900

Jim Meyering wrote:
> On Wed, Dec 10, 2014 at 9:37 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>> Jim Meyering wrote:
>>> On Tue, Nov 25, 2014 at 6:29 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>>> Hi/2.
>>>>
>>>> These are OS/2 patches.
>>>>
>>>> Review, please...
>>>>
>>>> [PATCH 1/2] build: use quotation mark(") for PATH
>>>> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
>>>
>>> I saw no patches here, but was able to dig them out of the
>>> bug-tracking system at http://debbugs.gnu.org/19186.
>>> I have applied and pushed the first one.  Thank you.
>>>
>>> However, for the second, my inclination is that if at all possible,
>>> it should be fixed via an lseek replacement that does something
>>> more sensible. Of course, that may not be possible, but from
>>> what you've presented so far, I cannot tell. Please demonstrate
>>> a use of diff that shows how OS/2+kLIBC's lseek fails.
>>
>> Do you want this ?
>>
>> -----
>> $ cat file | diff - file
>> diff.exe: -: Invalid seek
>> -----
> 
> Yes.  Thanks. That shows how lseek-pipe fails on your system.
> Please adjust your patch to make diff ignore failure only in that case,
> i.e., when errno == EINVAL (assuming strerror(EINVAL)
> produces that diagnostic).

Do you mean to add errno == EINVAL to if() for pfatal_with_name() ?

Then contents read from pipe are consumed and cannot be recovered. So
diff behaves in wrong way.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr





Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Sat, 13 Dec 2014 03:52:02 GMT) Full text and rfc822 format available.

Message #29 received at 19186 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: KO Myung-Hun <komh78 <at> gmail.com>
Cc: 19186 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#19186: [PATCH] OS/2 patches
Date: Fri, 12 Dec 2014 19:51:21 -0800
On Fri, Dec 12, 2014 at 7:24 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>
>
> Jim Meyering wrote:
>> On Wed, Dec 10, 2014 at 9:37 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>> Jim Meyering wrote:
>>>> On Tue, Nov 25, 2014 at 6:29 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>>>> Hi/2.
>>>>>
>>>>> These are OS/2 patches.
>>>>>
>>>>> Review, please...
>>>>>
>>>>> [PATCH 1/2] build: use quotation mark(") for PATH
>>>>> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
>>>>
>>>> I saw no patches here, but was able to dig them out of the
>>>> bug-tracking system at http://debbugs.gnu.org/19186.
>>>> I have applied and pushed the first one.  Thank you.
>>>>
>>>> However, for the second, my inclination is that if at all possible,
>>>> it should be fixed via an lseek replacement that does something
>>>> more sensible. Of course, that may not be possible, but from
>>>> what you've presented so far, I cannot tell. Please demonstrate
>>>> a use of diff that shows how OS/2+kLIBC's lseek fails.
>>>
>>> Do you want this ?
>>>
>>> -----
>>> $ cat file | diff - file
>>> diff.exe: -: Invalid seek
>>> -----
>>
>> Yes.  Thanks. That shows how lseek-pipe fails on your system.
>> Please adjust your patch to make diff ignore failure only in that case,
>> i.e., when errno == EINVAL (assuming strerror(EINVAL)
>> produces that diagnostic).
>
> Do you mean to add errno == EINVAL to if() for pfatal_with_name() ?

No.
Skip the test only when this lseek fails with precisely that errno value:

+#ifdef __KLIBC__
+      /* Skip test if seek is not possible */
+      skip_test = skip_test || lseek (current->desc, 0, SEEK_CUR) < 0;
+#endif




Information forwarded to bug-diffutils <at> gnu.org:
bug#19186; Package diffutils. (Sat, 13 Dec 2014 04:19:02 GMT) Full text and rfc822 format available.

Message #32 received at 19186 <at> debbugs.gnu.org (full text, mbox):

From: KO Myung-Hun <komh78 <at> gmail.com>
To: Jim Meyering <jim <at> meyering.net>
Cc: 19186 <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#19186: [PATCH] OS/2 patches
Date: Sat, 13 Dec 2014 13:18:47 +0900
[Message part 1 (text/plain, inline)]

Jim Meyering wrote:
> On Fri, Dec 12, 2014 at 7:24 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>
>>
>> Jim Meyering wrote:
>>> On Wed, Dec 10, 2014 at 9:37 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>>> Jim Meyering wrote:
>>>>> On Tue, Nov 25, 2014 at 6:29 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>>>>> Hi/2.
>>>>>>
>>>>>> These are OS/2 patches.
>>>>>>
>>>>>> Review, please...
>>>>>>
>>>>>> [PATCH 1/2] build: use quotation mark(") for PATH
>>>>>> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
>>>>>
>>>>> I saw no patches here, but was able to dig them out of the
>>>>> bug-tracking system at http://debbugs.gnu.org/19186.
>>>>> I have applied and pushed the first one.  Thank you.
>>>>>
>>>>> However, for the second, my inclination is that if at all possible,
>>>>> it should be fixed via an lseek replacement that does something
>>>>> more sensible. Of course, that may not be possible, but from
>>>>> what you've presented so far, I cannot tell. Please demonstrate
>>>>> a use of diff that shows how OS/2+kLIBC's lseek fails.
>>>>
>>>> Do you want this ?
>>>>
>>>> -----
>>>> $ cat file | diff - file
>>>> diff.exe: -: Invalid seek
>>>> -----
>>>
>>> Yes.  Thanks. That shows how lseek-pipe fails on your system.
>>> Please adjust your patch to make diff ignore failure only in that case,
>>> i.e., when errno == EINVAL (assuming strerror(EINVAL)
>>> produces that diagnostic).
>>
>> Do you mean to add errno == EINVAL to if() for pfatal_with_name() ?
> 
> No.
> Skip the test only when this lseek fails with precisely that errno value:
> 

Ok. Fixed.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

[0001-diff-skip-test-if-seek-is-not-possible-on-OS-2-kLIBC.patch (text/plain, attachment)]

Reply sent to Jim Meyering <jim <at> meyering.net>:
You have taken responsibility. (Sat, 13 Dec 2014 04:55:02 GMT) Full text and rfc822 format available.

Notification sent to KO Myung-Hun <komh78 <at> gmail.com>:
bug acknowledged by developer. (Sat, 13 Dec 2014 04:55:02 GMT) Full text and rfc822 format available.

Message #37 received at 19186-done <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: KO Myung-Hun <komh78 <at> gmail.com>
Cc: 19186-done <at> debbugs.gnu.org
Subject: Re: [bug-diffutils] bug#19186: [PATCH] OS/2 patches
Date: Fri, 12 Dec 2014 20:54:22 -0800
On Fri, Dec 12, 2014 at 8:18 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
> Jim Meyering wrote:
>> On Fri, Dec 12, 2014 at 7:24 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>>
>>> Jim Meyering wrote:
>>>> On Wed, Dec 10, 2014 at 9:37 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>>>> Jim Meyering wrote:
>>>>>> On Tue, Nov 25, 2014 at 6:29 PM, KO Myung-Hun <komh78 <at> gmail.com> wrote:
>>>>>>> Hi/2.
>>>>>>>
>>>>>>> These are OS/2 patches.
>>>>>>>
>>>>>>> Review, please...
>>>>>>>
>>>>>>> [PATCH 1/2] build: use quotation mark(") for PATH
>>>>>>> [PATCH 2/2] diff: skip test if seek is not possible on OS/2 kLIBC
>>>>>>
>>>>>> I saw no patches here, but was able to dig them out of the
>>>>>> bug-tracking system at http://debbugs.gnu.org/19186.
>>>>>> I have applied and pushed the first one.  Thank you.
>>>>>>
>>>>>> However, for the second, my inclination is that if at all possible,
>>>>>> it should be fixed via an lseek replacement that does something
>>>>>> more sensible. Of course, that may not be possible, but from
>>>>>> what you've presented so far, I cannot tell. Please demonstrate
>>>>>> a use of diff that shows how OS/2+kLIBC's lseek fails.
>>>>>
>>>>> Do you want this ?
>>>>>
>>>>> -----
>>>>> $ cat file | diff - file
>>>>> diff.exe: -: Invalid seek
>>>>> -----
>>>>
>>>> Yes.  Thanks. That shows how lseek-pipe fails on your system.
>>>> Please adjust your patch to make diff ignore failure only in that case,
>>>> i.e., when errno == EINVAL (assuming strerror(EINVAL)
>>>> produces that diagnostic).
>>>
>>> Do you mean to add errno == EINVAL to if() for pfatal_with_name() ?
>>
>> No.
>> Skip the test only when this lseek fails with precisely that errno value:
>
> Ok. Fixed.

Applied and pushed.  Thanks.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 10 Jan 2015 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 109 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.