From: rankin@eql.caltech.edu (Pat Rankin)
Subject: Re: QUESTION: Porting Unix Code To GNU C On VAX/VMS...
Date: 1997/05/21 [thread overview]
Message-ID: <21MAY199719454835@eql.caltech.edu> (raw)
In-Reply-To: 1997May21.171439@news.all-net.net
In article <1997May21.171439@news.all-net.net>,\
byer@mail.all-net.net (Robert Byer) writes...
[...]
> My question is, what is the equiv of the Unix "unlink" in GNU C v2.7.1
> for VMS or for that matter VAXC.
The answer is the same for either compiler since both
assume that you're using VAXCRTL as your C run-time library.
(VAXCRTL is part of VMS rather than being provided by either
compiler.)
Most of the time unlink() is used simply to delete a file,
so you can just add
#define unlink(X) remove(X)
to the source code and use the ANSI sanctioned method for
deleting a file. *But* unlink() under Unix actually does
something different whenever the specified file has more than
one directory entry, and there is no general way to emulate
that under VMS. (Otherwise VAXCRTL would have implemented
it along with the other bits of Unix emulation present.)
There are cases where you could reliably remove directory
entries instead of deleting files, such as when your own
code is creating the alternate directory entries, but it
isn't exactly trivial and you're probably not going to need
generality anyway.
Pat Rankin, rankin@eql.caltech.edu
next prev parent reply other threads:[~1997-05-21 4:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-05-21 4:00 QUESTION: Porting Unix Code To GNU C On VAX/VMS Robert Byer
1997-05-21 4:00 ` Pat Rankin [this message]
1997-05-23 4:00 ` Stephen Hoff Hoffman
1997-05-23 4:00 ` Patrick MOREAU, CENA Athis, Tel: 01.69.57.64.40
1997-05-29 4:00 ` Arne Vajhoej
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox