[GRASS-CVS] markus: grass6/lib/gis open.c,2.6,2.6.2.1

grass at intevation.de grass at intevation.de
Sun Nov 18 15:03:31 EST 2007


Author: markus

Update of /grassrepository/grass6/lib/gis
In directory doto:/tmp/cvs-serv23460

Modified Files:
      Tag: releasebranch_6_3
	open.c 
Log Message:
Portability: use open() instead of creat() (merge from HEAD)

Index: open.c
===================================================================
RCS file: /grassrepository/grass6/lib/gis/open.c,v
retrieving revision 2.6
retrieving revision 2.6.2.1
diff -u -d -r2.6 -r2.6.2.1
--- open.c	20 Apr 2007 17:40:49 -0000	2.6
+++ open.c	18 Nov 2007 20:03:29 -0000	2.6.2.1
@@ -134,7 +134,7 @@
 	if(mode == 1 || access(path,0) != 0)
 	{
 	    G__make_mapset_element (element);
-	    close (creat (path, 0666));
+	    close (open(path, O_WRONLY|O_CREAT|O_TRUNC, 0666));
 	}
 
 	return open (path, mode);




More information about the grass-commit mailing list