This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to remove putenv definition from gcc.c
- To: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>
- Subject: Re: Patch to remove putenv definition from gcc.c
- From: "Zack Weinberg" <zackw at stanford dot edu>
- Date: Wed, 28 Mar 2001 11:41:47 -0800
- Cc: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>, gcc-patches at gcc dot gnu dot org
- References: <200103272307.SAA23982@caip.rutgers.edu> <200103281917.OAA12323@hiauly1.hia.nrc.ca>
On Wed, Mar 28, 2001 at 02:17:53PM -0500, John David Anglin wrote:
> > > The last change will cause further VMS breakage. The libiberty
> > > version of putenv isn't suitable for VMS. The putenv defined in
> > > gcc.c was a nop for VMS and this behavior is lost with your patch.
> > > Dave
> >
> > The alpha/xm-vms.h port hardcodes #define HAVE_PUTENV, so as currently
> > written, gcc.c won't define putenv() at all. Somehow its already
> > working there without the NOP.
>
> VAX C for OpenVMS version 5.0 (circa 1995) doesn't have putenv. I don't have
> access to any later documentation.
>
> > My understanding from previous posts is that the vax vms port is
> > broken and whoever wants to resurrect it will have to start with the
> > alpha one (or from scratch) anyway.
> >
> > With this in mind, do you still object?
>
> I suggest retaining a do nothing version of putenv for VMS in gcc.c.
Doesn't this mean that collect2 won't work properly with older VAX C?
Wouldn't it make more sense to make libiberty's putenv work on VMS in
some fashion? Its putenv is just a wrapper around setenv, so I'm
guessing that VAX C doesn't have setenv either, and modifying the
environ[] array doesn't carry down to subprocesses. [pexecute.c
assumes fork and exec - does VAX C support those?]
I see code in perl5.6 that could probably be stolen (vmssetenv in
vms.c), although it does not make a whole lot of sense to me...
zw