From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,3c4ff193a1aba51d X-Google-Attributes: gidf7344,public X-Google-Thread: f86d6,3c4ff193a1aba51d X-Google-Attributes: gidf86d6,public X-Google-Thread: 1164f8,3c4ff193a1aba51d X-Google-Attributes: gid1164f8,public 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 Message-ID: <1997May23.105939.1@gaelic>#1/1 X-Deja-AN: 243276002 References: <1997May21.171439@news.all-net.net> Organization: CENA, Centre d'Etudes de la Navigation Aerienne - FRANCE Newsgroups: comp.os.vms,comp.sys.dec,vmsnet.sysmgt 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 #include #include 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/ ===============================================================================