From: pmoreau@cenaath.cena.dgac.fr (Patrick MOREAU, CENA Athis, Tel: 01.69.57.64.40)
Subject: Re: QUESTION: Porting Unix Code To GNU C On VAX/VMS...
Date: 1997/05/23 [thread overview]
Message-ID: <1997May23.105939.1@gaelic> (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:
> -----BEGIN PGP SIGNED MESSAGE-----
>
>
> Hi.
>
> I'm trying to port over a Unix application to VMS using GNU C v2.7.1 and
> so far it's going great.
>
> But, I don't have the "unlink" function which is kinda vital for this
> application.
>
> My question is, what is the equiv of the Unix "unlink" in GNU C v2.7.1
> for VMS or for that matter VAXC.
>
> I don't know all that much acout Unix programming or VAX programming so
> I would appreciate any and all help on this.
Try:
/* Fudge to allow the UNIX unlink() to work */
#include <descrip.h>
#include <string.h>
#include <lib$routines.h>
unlink(filename)
char *filename;
{
static struct dsc$descriptor_s file_desc;
file_desc.dsc$w_length = strlen(filename);
file_desc.dsc$b_dtype = DSC$K_DTYPE_T;
file_desc.dsc$b_class = DSC$K_CLASS_S;
file_desc.dsc$a_pointer= filename;
return (lib$delete_file(&file_desc));
}
(Extracted from XVMS utils Unix emlulation routines)
Patrick
--
===============================================================================
pmoreau@cena.dgac.fr (CENA) ______ ___ _ (Patrick MOREAU)
moreau_p@decus.decus.fr(DECUS) / / / / /| /|
CENA/Athis-Mons FRANCE / /___/ / / | / | __ __ __ __
BP 205 / / / / |/ | | | |__| |__ |__| | |
94542 ORLY AEROGARE CEDEX / / :: / / | |__| | \ |__ | | |__|
Web Page: http://www2.cenaath.cena.dgac.fr/~pmoreau/
===============================================================================
next prev parent reply other threads:[~1997-05-23 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
1997-05-23 4:00 ` Patrick MOREAU, CENA Athis, Tel: 01.69.57.64.40 [this message]
1997-05-23 4:00 ` Stephen Hoff Hoffman
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