Thanks for that and all the other replies. Seems that the leading "./" will fix it although I'll have to wait until tomorrow to try it out. I'm slightly confused about where "access" or "fopen" are coming from. I explicitly linked with what I thought was the C run-time/library. Hmmm - I guess I must be linking with the ccxl library rather than the c89 one from what you are saying. It's a fairly small project so using peoples suggestions to prefix with "./" if the first character isn't "/" (it's defined by the user in this case so I'll have to check) will be fine. But if I had a lot of code I might want to link with the c89 (POSIX only) library - is there a way to do that? Just curious now. Maybe it's a matter of linking with /lib/libc.a or something similar? I fixed the problem with the code where access() didn't want to work on a directory. The real code was adding "/." at the end for some reason - not sure why as it makes no difference to UNIX but the ccxl library must have not liked it so I removed it. So I've deleted a line adding "/." to the directory name, now I've got to add some code to stick it at the start! (well, "./" to be exact) Thanks for all the replies - very helpfull. I've been taken off the project to do other work so I'll be off for a while. Cheers. Peter. >From: Gavin Scott <[log in to unmask]> >Reply-To: Gavin Scott <[log in to unmask]> >To: [log in to unmask] >Subject: Re: [HP3000-L] HFS, C and COBOL >Date: Tue, 13 Aug 2002 10:13:23 -0700 > >Tom writes: > > Actually, "TGAFORMS/FORMS1/FRED" is NOT a "relative" path -- > >It is if you pass it to a Posix interface, i.e. a c89 compiled/linked >program. > >It you pass it to an MPE Intrinsic or CCXL compiled/linked program then it >will assume "MPE escaped" file naming and it will look like the MPE file >TGAFORMS with a lockword of FORMS1. > >Ultimately all opens devolve to something like HPFOPEN which has an option >to say how the filename should be interpreted. > >Most libraries use the MPE escaped option which says that if the name >starts >with a dot "." or a slash "/" then it is a Posix name, otherwise it's an >MPE >name. The notable exception are the Posix libraries and by extension GCC >and c89 programs *and* most programs compiled using them (Apache, Samba, >etc.), which specify Posix-only which means that A/B will be treated as a >Posix path rather than an MPE filename/lockword. > >There's also an option for MPE-only syntax, though offhand I can't think of >anything that commonly uses this, since normal MPE names don't start with a >. or a / and so you and almost always use MPE escaped syntax for any MPEish >program but you generally have to use Posix-only for programs that >originated on non-MPE platforms to keep from breaking them. > >The CCXL command and its related link variants are a little odd in that >they >predate the Posix subsystem and so do the best job they can of compiling C >programs without any knowledge of the Posix world. This means that CCXL >generally leaves you with a pure MPE program using MPE semantics for >everything. > >G. > >* To join/leave the list, search archives, change list settings, * >* etc., please visit http://raven.utc.edu/archives/hp3000-l.html * -- Windsor & District MAG - http://www.wadmag.org.uk _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx * To join/leave the list, search archives, change list settings, * * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *