[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vms argv[0] and exit status fixes.
From: |
h.becker |
Subject: |
Re: vms argv[0] and exit status fixes. |
Date: |
Mon, 10 Mar 2014 20:35:05 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130519 Icedove/17.0.5 |
On 03/08/2014 02:47 PM, John E. Malmberg wrote:
> Since there will only be one build procedure and one resulting binary,
> there would not be two templates.
>
> One of the main reasons for merging this fork back in is to get to one
> make binary.
>
> The one binary where needed will check if it is running under a UNIX
> shell or DCL and adjust its behavior as needed.
>
> This is the way that Curl and Perl now work.
>
> That way users do not have to track two implementations of the same
> version of product.
It's not yet determined, whether there will be different binaries for
the same platform (and same VMS version). Again, I prefer to keep it
simple, whatever simple will be in this context.
> I am already expecting that a [.vms] directory will be needed to contain
> at the minimum, the files needed for building the PCSI kit.
Someone else needs to decide if these files should be in the GNU make
repository. I didn't look, but I also didn't expect to see files to
create a Debian or Red Hat package. But what do I know. Also I don't
know if the copyright for the wrapper code is OK, here.
Anyway, appended is what I came up with. I don't expect this to be the
final patch for this. So far it is only tested on Alpha/VMS 8.3.
I'm not happy with hijacking main. What this code seems to do is
replacing argv[0]. There seems to be no other change which affects the
main entry. It seems to be enough to call a vms_mangle_argv0(&argv[0]);
function, in main, just prior to when argv[0] is really used. This would
be similar to calls like initialize_main() which is "Needed for OS/2".
Anyway, these changes all depend on what is configured in
config.h[-vms[.template]]. (This also indicates that at the moment I
expect different binaries depending on what a user "configures".) As
default I used more or less the current behavior: no hihacking and no
/tmp. It also seems that HAVE_VMS_MAIN_ENVP must be defined. If that's
the case then there is no need to have it at all.
I did not test with DECC$POSIX_COMPLIANT_PATHNAMES or whatever affects
the argv[0] passed by the CRTL. It seems worth to have some comments in
these 300+ lines of code, which show some examples what is expected and
what the result will be.
In my opinion, silently defining or overwriting a symbol shoulnd't be
implemented. If the user wants/needs the argv[0] changed, she/he should
define a symbol. That means, this needs to be documented, in the readme
or in the config.h-vms.template.
On the other hand, moving the wrapper into an existing source file,
which includes starlet.h, exhibited incompatible prototypes for system
services, even without __NEW_STARLET defined. That is not really
surprising, but there should be a better way than the hack I introduced.
On MAKE_TROUBLE, I agree, as this is a failure status on Unix - it will
stop make as well - this should be in the same failure range as
MAKE_FAILURE, so I used STS$K_ERROR.
gnu-make-vms-argv-exit.patch
Description: Text Data
- vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/05
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/05
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/06
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/06
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/07
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/08
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/08
- VMS exit status fixes., John E. Malmberg, 2014/03/08
- Re: vms argv[0] and exit status fixes.,
h.becker <=
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/10
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/11
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/24
- Re: vms argv[0] and exit status fixes., John E. Malmberg, 2014/03/25
- Re: vms argv[0] and exit status fixes., h.becker, 2014/03/25