• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

作図ソフト dia の改良版


Commit MetaInfo

Revision1ba172fb9e17a2b9fcf315b6ec3156eeb5437080 (tree)
Time2009-08-19 19:39:18
AuthorHans Breuer <hans@breu...>
CommiterHans Breuer

Log Message

Use g_stat() rather than stat()

Change Summary

Incremental Difference

--- a/lib/plug-ins.c
+++ b/lib/plug-ins.c
@@ -25,12 +25,12 @@
2525 #include <string.h>
2626 #include <errno.h>
2727 #include <sys/types.h>
28-#include <sys/stat.h>
2928 #include <fcntl.h>
3029 #ifdef HAVE_UNISTD_H
3130 #include <unistd.h>
3231 #endif
3332
33+#include <glib/gstdio.h>
3434 #include <libxml/xmlmemory.h>
3535 #include <libxml/parser.h>
3636 #include <libxml/tree.h>
@@ -295,7 +295,7 @@ for_each_in_dir(const gchar *directory, ForEachInDirDoFunc dofunc,
295295 GDir *dp;
296296 GError *error = NULL;
297297
298- if (stat(directory, &statbuf) < 0)
298+ if (g_stat(directory, &statbuf) < 0)
299299 return;
300300
301301 dp = g_dir_open(directory, 0, &error);
--- a/lib/sheet.c
+++ b/lib/sheet.c
@@ -26,6 +26,7 @@
2626 #include <unistd.h>
2727 #endif
2828 #include <glib.h>
29+#include <glib/gstdio.h> /* g_stat() */
2930 #include <libxml/tree.h>
3031 #include <libxml/parser.h>
3132 #include <libxml/xmlmemory.h>
@@ -302,10 +303,10 @@ load_register_sheet(const gchar *dirname, const gchar *filename,
302303 struct stat first_file, this_file;
303304 int stat_ret;
304305
305- stat_ret = stat(((Sheet *)(sheetp->data))->filename, &first_file);
306+ stat_ret = g_stat(((Sheet *)(sheetp->data))->filename, &first_file);
306307 g_assert(!stat_ret);
307308
308- stat_ret = stat(filename, &this_file);
309+ stat_ret = g_stat(filename, &this_file);
309310 g_assert(!stat_ret);
310311
311312 if (this_file.st_mtime > first_file.st_mtime)