1 /* gstdioprivate.h - Private GLib stdio functions 2 * 3 * Copyright 2017 Руслан Ижбулатов 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with this library; if not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef __G_STDIOPRIVATE_H__ 20 #define __G_STDIOPRIVATE_H__ 21 22 G_BEGIN_DECLS 23 24 #if defined (G_OS_WIN32) 25 26 typedef struct _gtimespec { 27 guint64 tv_sec; 28 guint32 tv_nsec; 29 } gtimespec; 30 31 struct _GWin32PrivateStat 32 { 33 guint32 volume_serial; 34 guint64 file_index; 35 guint64 attributes; 36 guint64 allocated_size; 37 guint32 reparse_tag; 38 39 guint32 st_dev; 40 guint32 st_ino; 41 guint16 st_mode; 42 guint16 st_uid; 43 guint16 st_gid; 44 guint32 st_nlink; 45 guint64 st_size; 46 gtimespec st_ctim; 47 gtimespec st_atim; 48 gtimespec st_mtim; 49 }; 50 51 typedef struct _GWin32PrivateStat GWin32PrivateStat; 52 53 int g_win32_stat_utf8 (const gchar *filename, 54 GWin32PrivateStat *buf); 55 56 int g_win32_lstat_utf8 (const gchar *filename, 57 GWin32PrivateStat *buf); 58 59 int g_win32_readlink_utf8 (const gchar *filename, 60 gchar *buf, 61 gsize buf_size, 62 gchar **alloc_buf, 63 gboolean terminate); 64 65 int g_win32_fstat (int fd, 66 GWin32PrivateStat *buf); 67 68 #endif 69 70 G_END_DECLS 71 72 #endif /* __G_STDIOPRIVATE_H__ */ 73