Pārlūkot izejas kodu

lib/gis: LFS for wingrass

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43104 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 14 gadi atpakaļ
vecāks
revīzija
0d1953da13
6 mainītis faili ar 14 papildinājumiem un 9 dzēšanām
  1. 2 1
      lib/gis/copy_dir.c
  2. 3 2
      lib/gis/mapset_msc.c
  3. 2 1
      lib/gis/mapset_nme.c
  4. 3 2
      lib/gis/paths.c
  5. 1 1
      lib/gis/remove.c
  6. 3 2
      lib/gis/user_config.c

+ 2 - 1
lib/gis/copy_dir.c

@@ -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;

+ 3 - 2
lib/gis/mapset_msc.c

@@ -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__make_mapset_element_misc(const char *dir, const char *name)
 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 @@ int G__mapset_permissions2(const char *gisdbase, const char *location,
 			   const char *mapset)
 {
     char path[GPATH_MAX];
-    struct stat info;
+    STRUCT_STAT info;
 
     sprintf(path, "%s/%s/%s", gisdbase, location, mapset);
 

+ 2 - 1
lib/gis/mapset_nme.c

@@ -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 @@ char **G_available_mapsets(void)
 
     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);
 

+ 3 - 2
lib/gis/paths.c

@@ -1,3 +1,4 @@
+#include <grass/config.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -115,7 +116,7 @@ char *G_convert_dirseps_from_host(char *path)
  * \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 @@ int G_stat(const char *file_name, struct stat *buf)
  * \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);

+ 1 - 1
lib/gis/remove.c

@@ -106,7 +106,7 @@ static int recursive_remove(const char *path)
 {
     DIR *dirp;
     struct dirent *dp;
-    struct stat sb;
+    STRUCT_STAT sb;
     char path2[GPATH_MAX];
 
     if (G_lstat(path, &sb))

+ 3 - 2
lib/gis/user_config.c

@@ -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 @@ static char *_make_toplevel(void)
     uid_t me;
     struct passwd *my_passwd;
 #endif
-    struct stat buf;
+    STRUCT_STAT buf;
     char *path;
 
     errno = 0;
@@ -193,7 +194,7 @@ static char *_make_sublevels(const char *elems)
 {
     int i, status;
     char *cp, *path, *top, *ptr;
-    struct stat buf;
+    STRUCT_STAT buf;
 
     /* Get top level path */
     if (NULL == (top = _make_toplevel()))