diff --git a/src/dialogs.c b/src/dialogs.c index 064c8585..51609225 100644 --- a/src/dialogs.c +++ b/src/dialogs.c @@ -1152,7 +1152,7 @@ void dialogs_show_file_properties(GeanyDocument *doc) gchar *file_size, *title, *base_name, *time_changed, *time_modified, *time_accessed, *enctext; gchar *short_name; #ifdef HAVE_SYS_TYPES_H - struct stat st; + GStatBuf st; off_t filesize; mode_t mode; gchar *locale_filename; diff --git a/src/socket.c b/src/socket.c index fd78ccd4..3b2fe55d 100644 --- a/src/socket.c +++ b/src/socket.c @@ -225,7 +225,7 @@ static void socket_get_document_list(gint sock) #ifndef G_OS_WIN32 static void check_socket_permissions(void) { - struct stat socket_stat; + GStatBuf socket_stat; if (g_lstat(socket_info.file_name, &socket_stat) == 0) { /* If the user id of the process is not the same as the owner of the socket diff --git a/tagmanager/ctags/ctags.c b/tagmanager/ctags/ctags.c index 56bf67fb..d5bad4d4 100644 --- a/tagmanager/ctags/ctags.c +++ b/tagmanager/ctags/ctags.c @@ -421,7 +421,7 @@ extern char* newUpperString (const char* str) extern long unsigned int getFileSize (const char *const name) { - struct stat fileStatus; + GStatBuf fileStatus; unsigned long size = 0; if (g_stat (name, &fileStatus) == 0) @@ -436,7 +436,7 @@ static boolean isSymbolicLink (const char *const name) #if defined (MSDOS) || defined (WIN32) || defined (VMS) || defined (__EMX__) || defined (AMIGA) return FALSE; #else - struct stat fileStatus; + GStatBuf fileStatus; boolean result = FALSE; if (g_lstat (name, &fileStatus) == 0) @@ -448,7 +448,7 @@ static boolean isSymbolicLink (const char *const name) static boolean isNormalFile (const char *const name) { - struct stat fileStatus; + GStatBuf fileStatus; boolean result = FALSE; if (g_stat (name, &fileStatus) == 0) @@ -460,7 +460,7 @@ static boolean isNormalFile (const char *const name) extern boolean isExecutable (const char *const name) { - struct stat fileStatus; + GStatBuf fileStatus; boolean result = FALSE; if (g_stat (name, &fileStatus) == 0) @@ -473,7 +473,7 @@ extern boolean isSameFile (const char *const name1, const char *const name2) { boolean result = FALSE; #ifdef HAVE_STAT_ST_INO - struct stat stat1, stat2; + GStatBuf stat1, stat2; if (g_stat (name1, &stat1) == 0 && g_stat (name2, &stat2) == 0) result = (boolean) (stat1.st_ino == stat2.st_ino); @@ -488,7 +488,7 @@ static boolean isSetUID (const char *const name) #if defined (VMS) || defined (MSDOS) || defined (WIN32) || defined (__EMX__) || defined (AMIGA) return FALSE; #else - struct stat fileStatus; + GStatBuf fileStatus; boolean result = FALSE; if (g_stat (name, &fileStatus) == 0) @@ -520,7 +520,7 @@ static boolean isDirectory (const char *const name) eFree (fib); } #else - struct stat fileStatus; + GStatBuf fileStatus; if (g_stat (name, &fileStatus) == 0) result = (boolean) S_ISDIR (fileStatus.st_mode); @@ -531,7 +531,7 @@ static boolean isDirectory (const char *const name) extern boolean doesFileExist (const char *const fileName) { - struct stat fileStatus; + GStatBuf fileStatus; return (boolean) (g_stat (fileName, &fileStatus) == 0); } diff --git a/tagmanager/src/tm_source_file.c b/tagmanager/src/tm_source_file.c index a6861626..2dbdaa34 100644 --- a/tagmanager/src/tm_source_file.c +++ b/tagmanager/src/tm_source_file.c @@ -142,7 +142,7 @@ static void tm_source_file_set_tag_arglist(const char *tag_name, const char *arg static gboolean tm_source_file_init(TMSourceFile *source_file, const char *file_name, const char* name) { - struct stat s; + GStatBuf s; int status; #ifdef TM_DEBUG @@ -269,7 +269,7 @@ gboolean tm_source_file_parse(TMSourceFile *source_file, guchar* text_buf, gsize if (!use_buffer) { - struct stat s; + GStatBuf s; /* load file to memory and parse it from memory unless the file is too big */ if (g_stat(file_name, &s) != 0 || s.st_size > 10*1024*1024) diff --git a/tagmanager/src/tm_workspace.c b/tagmanager/src/tm_workspace.c index 76cd108e..5b345c23 100644 --- a/tagmanager/src/tm_workspace.c +++ b/tagmanager/src/tm_workspace.c @@ -391,7 +391,7 @@ gboolean tm_workspace_load_global_tags(const char *tags_file, gint mode) static guint tm_file_inode_hash(gconstpointer key) { - struct stat file_stat; + GStatBuf file_stat; const char *filename = (const char*)key; if (g_stat(filename, &file_stat) == 0) {