This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: BZ#10254: Explain additional fopen parameters


Andreas Jaeger <aj@suse.com> writes:

> +@item x
> +Insist on creating a new file---if a file @var{filename} already
> +exists, @code{fopen} fails rather than opening it.  If you use
> +@samp{x} you are guaranteed that you will not clobber an existing
> +file.  This is equivalent to the @code{O_EXCL} option to the
> +@code{open} function (@pxref{Opening and Closing Files})

This meaning of "x" is also in the N1570 draft of C11.  Unless
the ratified C11 standard differs in this, I think the glibc
manual should mention that "x" is not solely a glibc extension,
and that portable programs using "x" should make it the last
character of the string.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]