+2005-03-06 Hrvoje Niksic <hniksic@xemacs.org>
+
+ * utils.c (fopen_excl): Fix parse error when O_BINARY is
+ available.
+
2005-03-05 Hrvoje Niksic <hniksic@xemacs.org>
* url.c (url_file_name): Don't allow hosts named ".." to be
FILE *
fopen_excl (const char *fname, int binary)
{
+ int fd;
#ifdef O_EXCL
int flags = O_WRONLY | O_CREAT | O_EXCL;
# ifdef O_BINARY
if (binary)
- flags |= O_BINARY
+ flags |= O_BINARY;
# endif
- int fd = open (fname, flags, 0666);
+ fd = open (fname, flags, 0666);
if (fd < 0)
return NULL;
return fdopen (fd, binary ? "wb" : "w");