[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diffutils 2.8.1 ISO C90 compliance patch
From: |
Paul Edwards |
Subject: |
Re: diffutils 2.8.1 ISO C90 compliance patch |
Date: |
Wed, 15 Nov 2006 12:11:08 +1100 |
From: "Paul Eggert" <address@hidden>
> > It is not natural to create files on the fly in MVS.
>
> I thought you said there was a C89 environment? C89 lets you create
> files with fopen.
Yes, but the syntax is fopen("dd:outfile", "w");
And then you have a DD statement
//OUTFILE DD DSN=SOMETHING,DISP=(NEW,CATLG),
// DCB=(LRECL=80,BLKSIZE=800),SPACE=(CYL,1),UNIT=SYSDA
You don't refer to the filename directly. You do it via a
DD name.
> But if that doesn't work, I'm afraid you'll just
> have to think of another way. I'm sure there is some way to do it.
The C90 standard exists precisely because there is no way to
do it. It is the common subset of all environments. There's
nowhere in the C90 standard that says how you can invoke an
external program and capture the output. You can't do it. Not
portably, and not on MVS. You can however pass in parameters
of filenames.
> >> 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?
> >
> > No it doesn't. Filenames are basically 8.8.8(8). But that's not what
> > programs expect. Programs expect an 8-character DD name.
>
> But diffutils already has include directives like #include
> <hard-locale.h>. You must have some solution for this, even though
> hard-locale.h is not an 8.8.whatever name.
Yes. What happens there is that the include gets translated
into a filename of DD:INCLUDE(address@hidden). And there
is a DD statement for INCLUDE, which is a PDS, and has
address@hidden as a member.
> So, whatever solution
> works for this, just use the same solution for #include <sys/types.h>.
Well I can translate it into DD:INCLUDE(TYPES) and have a
member of the PDS called "TYPES".
Why don't you tell all the people who don't have string.h (which
they should have), to create a dummy file for that? Why go to
all the trouble of #defining out a standard include file that
every C90 environment must have, but not do it for a completely
non-standard sys/types.h?
> Or, if you can't do that, just remove all the #include <sys/types.h>
> lines from the source code. That shouldn't be hard to do, in an
> automated way.
Why not write the code properly to not use non-standard includes?
At least not by default. Or at least not without an override.
BFN. Paul.
- diffutils 2.8.1 ISO C90 compliance patch, Paul Edwards, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Eggert, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Edwards, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Eggert, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Edwards, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, John Cowan, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Eggert, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch,
Paul Edwards <=
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Eggert, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, John Cowan, 2006/11/14
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Eggert, 2006/11/15
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Edwards, 2006/11/15
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Jarc, 2006/11/15
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Edwards, 2006/11/15
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Jarc, 2006/11/15
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Edwards, 2006/11/15
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Eggert, 2006/11/15
- Re: diffutils 2.8.1 ISO C90 compliance patch, Paul Edwards, 2006/11/15