Paul Edwards | 4 Feb 2009 21:44
Picon

Re: gnu utilities for MVS and CMS

 MVS is on the list of recognized platforms:
>
> $ ./build-aux/config.sub mvs
> i370-ibm-mvs

Which particular MVS compiler is that though?  One that supports
Unix extensions or one that only supports C89?  I'm using the latter.

> What version of bash are you using, and from where did you get it?  I

C:\devel\m4x>bash --version
GNU bash, version 3.2.25(17)-release (i686-pc-cygwin)
Copyright (C) 2005 Free Software Foundation, Inc.

> think your problem is that you are trying to use a sub-standard Windows
> environment to cross-compile to an MVS environment; if you must use
> Windows, you may have much more success using pre-compiled utilities from
> Cygwin;

I already am using Cygwin, and I only installed it a few months ago.

And I've already reported to the appropriate people that the
C compiler environment that comes with Cygwin is not
C89-compliant because it pollutes the namespace with
Unix stuff like "open" etc (can't remember which specific
one I reported).  No-one was interested in providing a C89
compliant compiler.

So I instead replaced newlib with PDPCLIB and now my C89
code goes through.

> but even better would be using something like GNU/Linux as your
> starting point.  At least that way, you will only be fighting one set of
> portability issues (how to make MVS happy), and not two simultaneous sets
> (how to make Windows run your configure script in cross-compilation mode
> in such a way to make MVS happy).

I don't run GNU/Linux and not everyone who gets the code will be.
Windows is more common by far.  Without Cygwin in fact.  The
people I communicate with do however have a C89 compiler on
the (emulated) mainframe system that they run under Windows.

>> Ok, but it'd be a whole lot easier for someone like me if there was
>> C89 code sitting there after an extraction and all I had to do was
>> organize a C89 compiler.  For people with Unix-like systems, the
>> option would still exist to run configure which would delete all
>> the generated c89 files and replace them with whatever it is that
>> configure thinks is a better idea than C89.
>
> If you have a C89 compiler, then you should be able to get to a reasonably
> portable shell and make implementation.  With those three programs in
> place, you should be able to run the ./configure script and then run make,
> at which point you will have C89 code to compile.  There is no point in
> bloating the distribution tarball to account for people who don't have the
> standard set of tools already available on their system.

m4 1.4 which works for me, is 318k.  m4 1.4.12 which doesn't, is 1,169k.

I would argue that if the tar ball is going to be so massively bloated,
it can afford to keep a copy of the C89 code, for instant portability
to C89 systems.  The traditional way of writing code in any language
is to have the required code sitting there, not to require generators
on alien systems in order to get the C89 code generated so that
you can even start.  I had a look at the bool and fcntl replacement
files and they are only 8k, before compression.  BTW, as an end
user, I don't care at all about the tar ball having been bloated.  The
only thing I care about is the fact that the provided (rather than
changed) code [in both tarballs] is not C89-compliant and that the
changes required to make the small tarball compliant are quite
small, so that's great, while the large tarball are more extensive.
It's not downloading a 3-times bigger tarball that I don't like.  I
didn't even know the size was different until deliberately looking.

I guess it's just a case of a different philosophy.  I like and expect
C89-compliant code to be provided so that all I need to do is zip
up some files, add MVS compile JCL (which I don't expect you
to provide), add a CMS exec (which I also don't expect you to
provide), and hey presto, m4 available on the major mainframe
environments without drama, just like C was meant to do with
its much-vaunted portability.  These extra hoops are similar to
running an ANSI2K&R translator on an alien system because
the compiler you actually have is not C89-compliant, only
K&R.

BFN.  Paul.

>
> - --
> Don't work too hard, make some time for fun as well!
>
> Eric Blake             ebb9 <at> byu.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (Cygwin)
> Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iEYEARECAAYFAkmJlHcACgkQ84KuGfSFAYDAkQCfbPElGy7cGMI9UH7Crd1lWUoZ
> SI0Amwcr23ugoIgwZ16Ukelfj57oj0Ni
> =ktrW
> -----END PGP SIGNATURE----- 


Gmane