From: peter AT agnes DOT dida DOT physik DOT uni-essen DOT de (Peter Gerwinski) Newsgroups: comp.os.msdos.djgpp Subject: `access' function and `prn' etc. Date: 21 Jan 1997 13:17:48 GMT Organization: Universitaet Essen, Germany Lines: 29 Message-ID: <5c2fls$a3s@sun3.uni-essen.de> Reply-To: peter DOT gerwinski AT uni-essen DOT de NNTP-Posting-Host: agnes.dida.physik.uni-essen.de Summary: `access' function applied to `prn' tells "not writeable" Keywords: access, devices To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Hello, when applying the `access' function to DOS device files like `prn' or `lpt1', it returns "not writeable": /* test.c */ #include #include int main ( void ) { printf ( "%d\n", access ( "prn", W_OK ) ); /* yields -1 */ return 0; } /* main */ Is this intended, or is it a bug in the C library (or in my configuration)? It causes that you cannot print at all with GNU Pascal because GPC's run time library always calls "access" before opening a file. Thanks in advance, Peter e-mail: peter DOT gerwinski AT uni-essen DOT de home address: D\"usseldorfer Str. 35, 45145 Essen, Germany WWW: http://agnes.dida.physik.uni-essen.de/~peter/