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");
int
make_directory (const char *directory)
{
- int quit = 0;
- int i;
- int ret = 0;
+ int i, ret, quit = 0;
char *dir;
/* Make a copy of dir, to be able to write to it. Otherwise, the
{
int fd;
struct file_memory *fm;
- wgint size;
+ long size;
int inhibit_close = 0;
/* Some magic in the finest tradition of Perl and its kin: if FILE