[GRASS-SVN] r43104 - grass/trunk/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Aug 14 14:00:11 EDT 2010


Author: mmetz
Date: 2010-08-14 18:00:11 +0000 (Sat, 14 Aug 2010)
New Revision: 43104

Modified:
   grass/trunk/lib/gis/copy_dir.c
   grass/trunk/lib/gis/mapset_msc.c
   grass/trunk/lib/gis/mapset_nme.c
   grass/trunk/lib/gis/paths.c
   grass/trunk/lib/gis/remove.c
   grass/trunk/lib/gis/user_config.c
Log:
lib/gis: LFS for wingrass

Modified: grass/trunk/lib/gis/copy_dir.c
===================================================================
--- grass/trunk/lib/gis/copy_dir.c	2010-08-14 17:57:52 UTC (rev 43103)
+++ grass/trunk/lib/gis/copy_dir.c	2010-08-14 18:00:11 UTC (rev 43104)
@@ -14,6 +14,7 @@
  *
  *****************************************************************************/
 
+#include <grass/config.h>
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
@@ -63,7 +64,7 @@
 int G_recursive_copy(const char *src, const char *dst)
 {
     DIR *dirp;
-    struct stat sb;
+    STRUCT_STAT sb;
 
     if (G_lstat(src, &sb) < 0)
 	return 1;

Modified: grass/trunk/lib/gis/mapset_msc.c
===================================================================
--- grass/trunk/lib/gis/mapset_msc.c	2010-08-14 17:57:52 UTC (rev 43103)
+++ grass/trunk/lib/gis/mapset_msc.c	2010-08-14 18:00:11 UTC (rev 43104)
@@ -9,6 +9,7 @@
    (>=v2). Read the file COPYING that comes with GRASS for details.
  */
 
+#include <grass/config.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdlib.h>
@@ -99,7 +100,7 @@
 int G__mapset_permissions(const char *mapset)
 {
     char path[GPATH_MAX];
-    struct stat info;
+    STRUCT_STAT info;
 
     G__file_name(path, "", "", mapset);
 
@@ -133,7 +134,7 @@
 			   const char *mapset)
 {
     char path[GPATH_MAX];
-    struct stat info;
+    STRUCT_STAT info;
 
     sprintf(path, "%s/%s/%s", gisdbase, location, mapset);
 

Modified: grass/trunk/lib/gis/mapset_nme.c
===================================================================
--- grass/trunk/lib/gis/mapset_nme.c	2010-08-14 17:57:52 UTC (rev 43103)
+++ grass/trunk/lib/gis/mapset_nme.c	2010-08-14 18:00:11 UTC (rev 43104)
@@ -9,6 +9,7 @@
    (>=v2). Read the file COPYING that comes with GRASS for details.
  */
 
+#include <grass/config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <string.h>
@@ -155,7 +156,7 @@
 
     while ((ent = readdir(dir))) {
 	char buf[GPATH_MAX];
-	struct stat st;
+	STRUCT_STAT st;
 
 	sprintf(buf, "%s/%s/WIND", G_location_path(), ent->d_name);
 

Modified: grass/trunk/lib/gis/paths.c
===================================================================
--- grass/trunk/lib/gis/paths.c	2010-08-14 17:57:52 UTC (rev 43103)
+++ grass/trunk/lib/gis/paths.c	2010-08-14 18:00:11 UTC (rev 43104)
@@ -1,3 +1,4 @@
+#include <grass/config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -115,7 +116,7 @@
  * \return Return value from system lstat function
  **/
 
-int G_stat(const char *file_name, struct stat *buf)
+int G_stat(const char *file_name, STRUCT_STAT *buf)
 {
     return stat(file_name, buf);
 }
@@ -132,7 +133,7 @@
  * \return Return value from system lstat function
  **/
 
-int G_lstat(const char *file_name, struct stat *buf)
+int G_lstat(const char *file_name, STRUCT_STAT *buf)
 {
 #ifdef __MINGW32__
     return stat(file_name, buf);

Modified: grass/trunk/lib/gis/remove.c
===================================================================
--- grass/trunk/lib/gis/remove.c	2010-08-14 17:57:52 UTC (rev 43103)
+++ grass/trunk/lib/gis/remove.c	2010-08-14 18:00:11 UTC (rev 43104)
@@ -106,7 +106,7 @@
 {
     DIR *dirp;
     struct dirent *dp;
-    struct stat sb;
+    STRUCT_STAT sb;
     char path2[GPATH_MAX];
 
     if (G_lstat(path, &sb))

Modified: grass/trunk/lib/gis/user_config.c
===================================================================
--- grass/trunk/lib/gis/user_config.c	2010-08-14 17:57:52 UTC (rev 43103)
+++ grass/trunk/lib/gis/user_config.c	2010-08-14 18:00:11 UTC (rev 43104)
@@ -25,6 +25,7 @@
  * \date 2007-04-14
  */
 
+#include <grass/config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <assert.h>
@@ -58,7 +59,7 @@
     uid_t me;
     struct passwd *my_passwd;
 #endif
-    struct stat buf;
+    STRUCT_STAT buf;
     char *path;
 
     errno = 0;
@@ -193,7 +194,7 @@
 {
     int i, status;
     char *cp, *path, *top, *ptr;
-    struct stat buf;
+    STRUCT_STAT buf;
 
     /* Get top level path */
     if (NULL == (top = _make_toplevel()))



More information about the grass-commit mailing list