mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 02:36:19 +01:00
Add some more G_OS_WIN32 conditionals to silence gcc warnings.
2007-12-10 Tor Lillqvist <tml@novell.com> * glocalfile.c: Add some more G_OS_WIN32 conditionals to silence gcc warnings. svn path=/trunk/; revision=6088
This commit is contained in:
parent
cc3de68e21
commit
83445755b3
@ -1,3 +1,8 @@
|
|||||||
|
2007-12-10 Tor Lillqvist <tml@novell.com>
|
||||||
|
|
||||||
|
* glocalfile.c: Add some more G_OS_WIN32 conditionals to silence
|
||||||
|
gcc warnings.
|
||||||
|
|
||||||
2007-12-10 Alexander Larsson <alexl@redhat.com>
|
2007-12-10 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
* gfile.c (g_file_set_display_name):
|
* gfile.c (g_file_set_display_name):
|
||||||
|
@ -663,9 +663,11 @@ get_fs_type (long f_type)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
|
|
||||||
G_LOCK_DEFINE_STATIC(mount_info_hash);
|
G_LOCK_DEFINE_STATIC(mount_info_hash);
|
||||||
static GHashTable *mount_info_hash = NULL;
|
static GHashTable *mount_info_hash = NULL;
|
||||||
guint64 mount_info_hash_cache_time = 0;
|
static guint64 mount_info_hash_cache_time = 0;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
MOUNT_INFO_READONLY = 1<<0
|
MOUNT_INFO_READONLY = 1<<0
|
||||||
@ -750,6 +752,8 @@ get_mount_info (GFileInfo *fs_info,
|
|||||||
g_file_info_set_attribute_boolean (fs_info, G_FILE_ATTRIBUTE_FS_READONLY, TRUE);
|
g_file_info_set_attribute_boolean (fs_info, G_FILE_ATTRIBUTE_FS_READONLY, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static GFileInfo *
|
static GFileInfo *
|
||||||
g_local_file_query_filesystem_info (GFile *file,
|
g_local_file_query_filesystem_info (GFile *file,
|
||||||
const char *attributes,
|
const char *attributes,
|
||||||
@ -760,12 +764,14 @@ g_local_file_query_filesystem_info (GFile *file,
|
|||||||
GFileInfo *info;
|
GFileInfo *info;
|
||||||
int statfs_result;
|
int statfs_result;
|
||||||
gboolean no_size;
|
gboolean no_size;
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
guint64 block_size;
|
guint64 block_size;
|
||||||
#ifdef USE_STATFS
|
#ifdef USE_STATFS
|
||||||
struct statfs statfs_buffer;
|
struct statfs statfs_buffer;
|
||||||
const char *fstype;
|
const char *fstype;
|
||||||
#elif defined(USE_STATVFS)
|
#elif defined(USE_STATVFS)
|
||||||
struct statvfs statfs_buffer;
|
struct statvfs statfs_buffer;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
GFileAttributeMatcher *attribute_matcher;
|
GFileAttributeMatcher *attribute_matcher;
|
||||||
|
|
||||||
@ -1289,6 +1295,8 @@ find_mountpoint_for (const char *file,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
find_topdir_for (const char *file)
|
find_topdir_for (const char *file)
|
||||||
{
|
{
|
||||||
@ -1302,6 +1310,8 @@ find_topdir_for (const char *file)
|
|||||||
return find_mountpoint_for (dir, dir_dev);
|
return find_mountpoint_for (dir, dir_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
get_unique_filename (const char *basename,
|
get_unique_filename (const char *basename,
|
||||||
int id)
|
int id)
|
||||||
@ -1400,10 +1410,9 @@ g_local_file_trash (GFile *file,
|
|||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GLocalFile *local = G_LOCAL_FILE (file);
|
GLocalFile *local = G_LOCAL_FILE (file);
|
||||||
struct stat file_stat, home_stat, trash_stat, global_stat;
|
struct stat file_stat, home_stat;
|
||||||
const char *homedir;
|
const char *homedir;
|
||||||
char *dirname;
|
char *trashdir, *topdir, *infodir, *filesdir;
|
||||||
char *trashdir, *globaldir, *topdir, *infodir, *filesdir;
|
|
||||||
char *basename, *trashname, *trashfile, *infoname, *infofile;
|
char *basename, *trashname, *trashfile, *infoname, *infofile;
|
||||||
char *original_name, *original_name_escaped;
|
char *original_name, *original_name_escaped;
|
||||||
int i;
|
int i;
|
||||||
@ -1411,6 +1420,10 @@ g_local_file_trash (GFile *file,
|
|||||||
gboolean is_homedir_trash;
|
gboolean is_homedir_trash;
|
||||||
char delete_time[32];
|
char delete_time[32];
|
||||||
int fd;
|
int fd;
|
||||||
|
#ifndef G_OS_WIN32
|
||||||
|
struct stat trash_stat, global_stat;
|
||||||
|
char *dirname, *globaldir;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (g_lstat (local->filename, &file_stat) != 0)
|
if (g_lstat (local->filename, &file_stat) != 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user