bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: diffutils 2.8.1 ISO C90 compliance patch


From: Paul Eggert
Subject: Re: diffutils 2.8.1 ISO C90 compliance patch
Date: Tue, 14 Nov 2006 14:55:57 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

"Paul Edwards" <address@hidden> writes:

> Users have no choice.  It doesn't work otherwise.

The port you sent may not work otherwise, but another MVS port might
work more compatibly.  For example, diff3 could put the sub-diff
output into files, and then read the files.  It could do this
transparently to "diff3", as part of its implementation of pipe(...)
and fork().

> There is no concept of directories on MVS.  There's nowhere
> to create a "/sys/types.h".

You shouldn't need to create "/sys/types.h"; it should suffice to
create "lib/sys/types.h", just as there is already a "lib/alloca.h".
And "diff" doesn't care whether it's a single file named "sys/types.h"
(with a slash in its name), so perhaps you can just create that -- I
assume MVS allows slashes in file names?

>>  # define sigprocmask(how, n, o) \
>>      ((how) == SIG_BLOCK \
>>       ? *(sigset_t *) (o) = sigblock (*(n)) \
>
> I commented it out because the 3rd parameter (o) can be 0,
> and that means that code resolves to *(sigset_t *)0 = something,
> which is going to cause a core dump if executed.

OK, thanks, I installed this further change.

2006-11-14  Paul Eggert  <address@hidden>

        * src/sdiff.c (sigprocmask): Don't dump core if O is null.

--- src/sdiff.c 14 Nov 2006 20:22:12 -0000      1.45
+++ src/sdiff.c 14 Nov 2006 22:52:21 -0000
@@ -119,7 +119,7 @@ static int const sigs[] = {
 # endif
 # define sigprocmask(how, n, o) \
     ((how) == SIG_BLOCK \
-     ? *(sigset_t *) (o) = sigblock (*(n)) \
+     ? ((o) ? (*(sigset_t *) (o) = sigblock (*(n))) : sigblock (*(n))) \
      : sigsetmask (*(n)))
 #endif
 




reply via email to

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