[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #44768] gdiffmk(1) is not Solaris 10 /bin/sh compatible - PATCH pro

From: Bertrand Garrigues
Subject: [bug #44768] gdiffmk(1) is not Solaris 10 /bin/sh compatible - PATCH provided
Date: Sun, 26 Apr 2015 16:34:18 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #19, bug #44768 (project groff):

Hi Mark, Peter,

I tried to solve the 3 problems mentioned previously (attached a patch

1. Diff

-D option is mandatory, so we have to use GNU diff. In groff.m4 I define a
DIFF_PROG command (set to diff by default).  I first check if diff is working.
 If not, I'm looking for gdiff (I assume that people would install GNU diff as
gdiff on a standard path). If gdiff is not available, I let the default
command as diff: the error message in gdiffmk will explain the problem.

2. test -ef

Instead to force the use of bash, I propose to use ls -i, which gives the
inode of the file.

3. Sed

I was about to implement the same solution than for diff. However the error on
"Unrecognized command: /^#else \/\* __diffmk_18037__/ ! {"
looked stranged: the command has nothing special (no GNU extension) and should
work. But POSIX says: "A function can be preceded by one or more '!'
characters, in which case the function shall be applied if the addresses do
not select the pattern space. Zero or more <blank> characters shall be
accepted before the first '!' character. It is unspecified whether <blank>
characters can follow a '!' character, and conforming applications shall not
follow a '!' character with <blank> characters."
So it seems that the space after the '!' character is not correct (I removed
it in the patch).

Then, I made more tests by forcing the option --posix to the sed command: this
causes make check to fail on my Arch Linux environment. The sed script of
gdiffmk uses a GNU extension that allows to match a regexp or another regexp:
\(not\|!\), this in order to match lines like
#else /* not __diffmk_xxxx__
#else /* ! __diffmx_xxxx__

So I split this it in two sets of pattern tests and commands.

Could you please test on Solaris 10 ?


Bertrand Garrigues

(file #33791)

Additional Item Attachment:

File name: bug_44768_diff_sh_sed.patch    Size:3 KB


Reply to this item at:


  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]