作図ソフト dia の改良版
Revision | 1ba172fb9e17a2b9fcf315b6ec3156eeb5437080 (tree) |
---|---|
Time | 2009-08-19 19:39:18 |
Author | Hans Breuer <hans@breu...> |
Commiter | Hans Breuer |
Use g_stat() rather than stat()
@@ -25,12 +25,12 @@ | ||
25 | 25 | #include <string.h> |
26 | 26 | #include <errno.h> |
27 | 27 | #include <sys/types.h> |
28 | -#include <sys/stat.h> | |
29 | 28 | #include <fcntl.h> |
30 | 29 | #ifdef HAVE_UNISTD_H |
31 | 30 | #include <unistd.h> |
32 | 31 | #endif |
33 | 32 | |
33 | +#include <glib/gstdio.h> | |
34 | 34 | #include <libxml/xmlmemory.h> |
35 | 35 | #include <libxml/parser.h> |
36 | 36 | #include <libxml/tree.h> |
@@ -295,7 +295,7 @@ for_each_in_dir(const gchar *directory, ForEachInDirDoFunc dofunc, | ||
295 | 295 | GDir *dp; |
296 | 296 | GError *error = NULL; |
297 | 297 | |
298 | - if (stat(directory, &statbuf) < 0) | |
298 | + if (g_stat(directory, &statbuf) < 0) | |
299 | 299 | return; |
300 | 300 | |
301 | 301 | dp = g_dir_open(directory, 0, &error); |
@@ -26,6 +26,7 @@ | ||
26 | 26 | #include <unistd.h> |
27 | 27 | #endif |
28 | 28 | #include <glib.h> |
29 | +#include <glib/gstdio.h> /* g_stat() */ | |
29 | 30 | #include <libxml/tree.h> |
30 | 31 | #include <libxml/parser.h> |
31 | 32 | #include <libxml/xmlmemory.h> |
@@ -302,10 +303,10 @@ load_register_sheet(const gchar *dirname, const gchar *filename, | ||
302 | 303 | struct stat first_file, this_file; |
303 | 304 | int stat_ret; |
304 | 305 | |
305 | - stat_ret = stat(((Sheet *)(sheetp->data))->filename, &first_file); | |
306 | + stat_ret = g_stat(((Sheet *)(sheetp->data))->filename, &first_file); | |
306 | 307 | g_assert(!stat_ret); |
307 | 308 | |
308 | - stat_ret = stat(filename, &this_file); | |
309 | + stat_ret = g_stat(filename, &this_file); | |
309 | 310 | g_assert(!stat_ret); |
310 | 311 | |
311 | 312 | if (this_file.st_mtime > first_file.st_mtime) |