mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-02 01:12:17 +01:00
glocalfileinfo: implement _g_stat_{a,c,m}_nsec for macOS
add implementations for these functions using st_{a,c,m}timespec when
__APPLE__ is defined. Also re-enable the g-file-info test for darwin.
Fixes #3070, #2608
This commit is contained in:
@@ -332,6 +332,10 @@ inline static guint32 _g_stat_mtim_nsec (const GLocalFileStat *buf) { return b
|
||||
inline static guint32 _g_stat_atim_nsec (const GLocalFileStat *buf) { return buf->st_atimensec; }
|
||||
inline static guint32 _g_stat_ctim_nsec (const GLocalFileStat *buf) { return buf->st_ctimensec; }
|
||||
inline static guint32 _g_stat_mtim_nsec (const GLocalFileStat *buf) { return buf->st_mtimensec; }
|
||||
#elif defined(__APPLE__)
|
||||
inline static guint32 _g_stat_atim_nsec (const GLocalFileStat *buf) { return buf->st_atimespec.tv_nsec; }
|
||||
inline static guint32 _g_stat_ctim_nsec (const GLocalFileStat *buf) { return buf->st_ctimespec.tv_nsec; }
|
||||
inline static guint32 _g_stat_mtim_nsec (const GLocalFileStat *buf) { return buf->st_mtimespec.tv_nsec; }
|
||||
#else
|
||||
inline static guint32 _g_stat_atim_nsec (const GLocalFileStat *buf) { return 0; }
|
||||
inline static guint32 _g_stat_ctim_nsec (const GLocalFileStat *buf) { return 0; }
|
||||
|
||||
@@ -85,9 +85,8 @@ gio_tests = {
|
||||
},
|
||||
'g-file' : {},
|
||||
'g-file-info' : {
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3070
|
||||
# FIXME: https://gitlab.gnome.org/GNOME/glib/-/issues/3148
|
||||
'can_fail' : host_system in ['darwin', 'gnu'] or host_system == 'windows' and cc.get_id() != 'gcc',
|
||||
'can_fail' : host_system in ['gnu'] or host_system == 'windows' and cc.get_id() != 'gcc',
|
||||
},
|
||||
'g-icon' : {},
|
||||
'gdbus-addresses' : {},
|
||||
|
||||
Reference in New Issue
Block a user