浏览代码

bugfix for https://trac.osgeo.org/grass/ticket/536 ???

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@36440 15284696-431f-4ddb-bdfa-cd5b030d7da7
Markus Metz 16 年之前
父节点
当前提交
692f8fa84b
共有 1 个文件被更改,包括 4 次插入4 次删除
  1. 4 4
      lib/vector/diglib/head.c

+ 4 - 4
lib/vector/diglib/head.c

@@ -63,16 +63,16 @@ int dig__write_head(struct Map_info *Map)
 	}
 	}
 	else {
 	else {
 	    /* write twice to fill the space and set offset (account for sizeof(off_t) == 4) */
 	    /* write twice to fill the space and set offset (account for sizeof(off_t) == 4) */
-	    if (0 >= dig__fwrite_port_L(&(Map->head.size), 1, &(Map->dig_fp)))
+	    if (0 >= dig__fwrite_port_O(&(Map->head.size), 1, &(Map->dig_fp), 4))
 		return (0);
 		return (0);
-	    if (0 >= dig__fwrite_port_L(&(Map->head.size), 1, &(Map->dig_fp)))
+	    if (0 >= dig__fwrite_port_O(&(Map->head.size), 1, &(Map->dig_fp), 4))
 		return (0);
 		return (0);
 	}
 	}
     }
     }
     else {
     else {
 	/* old vector with shorter coor head size got modified */
 	/* old vector with shorter coor head size got modified */
 	/* bytes 11 - 14 : size of coordinate file */
 	/* bytes 11 - 14 : size of coordinate file */
-	if (0 >= dig__fwrite_port_L(&(Map->head.size), 1, &(Map->dig_fp)))
+	if (0 >= dig__fwrite_port_O(&(Map->head.size), 1, &(Map->dig_fp), 4))
 	    return (0);
 	    return (0);
     }
     }
 
 
@@ -147,7 +147,7 @@ int dig__read_head(struct Map_info *Map)
     }
     }
     else {
     else {
 	/* bytes 11 - 14 : size of coordinate file */
 	/* bytes 11 - 14 : size of coordinate file */
-	if (0 >= dig__fread_port_L(&(Map->head.size), 1, &(Map->dig_fp)))
+	if (0 >= dig__fread_port_O(&(Map->head.size), 1, &(Map->dig_fp), 4))
 	    return (0);
 	    return (0);
     }
     }
     G_debug(2, "  coor size %ld", Map->head.size);
     G_debug(2, "  coor size %ld", Map->head.size);