Index: posixio.c =================================================================== RCS file: /upc/share/CVS/netcdf-3/libsrc/posixio.c,v retrieving revision 1.59 retrieving revision 1.57 diff -c -r1.59 -r1.57 *** posixio.c 1997/09/23 18:55:19 1.59 --- posixio.c 1997/06/04 21:05:35 1.57 *************** *** 2,8 **** * Copyright 1996, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. */ ! /* $Id: posixio.c,v 1.59 1997/09/23 18:55:19 davis Exp $ */ #include "ncconfig.h" #include --- 2,8 ---- * Copyright 1996, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. */ ! /* $Id: posixio.c,v 1.57 1997/06/04 21:05:35 davis Exp $ */ #include "ncconfig.h" #include *************** *** 738,751 **** #define NCIO_MINBLOCKSIZE 256 #define NCIO_MAXBLOCKSIZE 268435456 /* sanity check, about X_SIZE_T_MAX/8 */ - #ifdef S_IRUSR - #define NC_DEFAULT_CREAT_MODE \ - (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) /* 0666 */ - - #else - #define NC_DEFAULT_CREAT_MODE 0666 - #endif - int ncio_create(const char *path, int ioflags, size_t initialsz, --- 738,743 ---- *************** *** 753,764 **** ncio **nciopp, void **const igetvpp) { ncio *nciop; ! int oflags = (O_RDWR|O_CREAT); int fd; int status; ! if(initialsz < (size_t)igeto + igetsz) ! initialsz = (size_t)igeto + igetsz; fSet(ioflags, NC_WRITE); --- 745,756 ---- ncio **nciopp, void **const igetvpp) { ncio *nciop; ! int oflags = (O_RDWR|O_CREAT|O_TRUNC); int fd; int status; ! if(initialsz < igetsz) ! initialsz = igetsz; fSet(ioflags, NC_WRITE); *************** *** 771,786 **** if(fIsSet(ioflags, NC_NOCLOBBER)) fSet(oflags, O_EXCL); - else - fSet(oflags, O_TRUNC); #ifdef O_BINARY fSet(oflags, O_BINARY); #endif #ifdef vms ! fd = open(path, oflags, NC_DEFAULT_CREAT_MODE, "ctx=stm"); #else /* Should we mess with the mode based on NC_SHARE ?? */ ! fd = open(path, oflags, NC_DEFAULT_CREAT_MODE); #endif #if 0 (void) fprintf(stderr, "ncio_create(): path=\"%s\"\n", path); --- 763,776 ---- if(fIsSet(ioflags, NC_NOCLOBBER)) fSet(oflags, O_EXCL); #ifdef O_BINARY fSet(oflags, O_BINARY); #endif #ifdef vms ! fd = open(path, oflags, 0666, "ctx=stm"); #else /* Should we mess with the mode based on NC_SHARE ?? */ ! fd = open(path, oflags, 0666); #endif #if 0 (void) fprintf(stderr, "ncio_create(): path=\"%s\"\n", path);