This is the mail archive of the
cygwin
mailing list for the Cygwin project.
1.5.5.1 posix conformance for fopen
- From: Ghanshyam <gshyam at denver dot india dot mentorg dot com>
- To: cygwin at cygwin dot com
- Cc: harsh_arora at mentorg dot com
- Date: Mon, 8 Mar 2004 20:22:34 +0000 (GMT)
- Subject: 1.5.5.1 posix conformance for fopen
Hi All,
I found following problems in fopen system call. Problems are written
against there assertions which were tested. I am not sure whether these
problems are due to implmentation limitation or because of underlaying
Windows system. Can somebody help me in this regard?
The assertions have been written from document "IEEE std 2003.1-1992 Test
Methods for Measuring Conformance to Posix-Part1 System Interface"
7A -When the filename argument points to a string beginning with a
single slash or beginning with three or more slashes, then fopen()
resolves the pathname by locating the first filename component of the
pathname in the root directory of the process.
In current implementation
****path name beginning with "///" is not supported.
20A - When search permission is denied on a component of the
filename prefix, then a call to fopen(filename, type) returns a NULL pointer and sets
errno to [EACCES].
In current implementation
****fopen is successful even if search permission is denied.
24A - When the named file is a directory, and when type is w, a,
r+, w+, a+, wb,ab, r+b, rb+,w+b, wb+, a+b, or ab+, then a call to fopen
(filename,type) returns a NULL pointer, sets errno to [EISDIR], and
does not mark for update st_ctime,st_mtime, and st_atime fields of
the file.
In current implementation
****when Named file is a directory and mode is "w", it returns EEXIST
instead of EISDIR
25A - If {OPEN_MAX}{PCTS_OPEN_MAX}: When {OPEN_MAX} file descriptors have
been opened, then a subsequent call to fopen(filename,type, mode)
returns a NULL pointer ans sets errno to [EMFILE].
In current implementation
****when {OPEN_MAX} file descriptors are in use and the file to be opened
does not exist it should fail and return NULL ,
but it returns NONNULL value instead of NULL
33A - When a component of the filename prefix is not a directory,
then a call to fopen(filename, type) returns a NULL pointer and sets
errno to [ENOTDIR].
**** Call to fopen() when path contains a non-directory component ,
expected ENOTDIR , returned ENOENT
Regards,
ghanshyam
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/