mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-24 03:02:10 +01:00
Merge branch 'nacho/off_t' into 'main'
giowin32: use gint64 and _lseeki64 See merge request GNOME/glib!2447
This commit is contained in:
commit
aad2cbd2db
@ -297,7 +297,7 @@ inline static guint32 _g_stat_nlink (const GLocalFileStat *buf) { return b
|
||||
#endif
|
||||
inline static dev_t _g_stat_dev (const GLocalFileStat *buf) { return buf->st_dev; }
|
||||
inline static ino_t _g_stat_ino (const GLocalFileStat *buf) { return buf->st_ino; }
|
||||
inline static off_t _g_stat_size (const GLocalFileStat *buf) { return buf->st_size; }
|
||||
inline static goffset _g_stat_size (const GLocalFileStat *buf) { return buf->st_size; }
|
||||
|
||||
#ifndef G_OS_WIN32
|
||||
inline static uid_t _g_stat_uid (const GLocalFileStat *buf) { return buf->st_uid; }
|
||||
|
@ -1291,8 +1291,7 @@ g_io_win32_fd_seek (GIOChannel *channel,
|
||||
{
|
||||
GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel;
|
||||
int whence, errsv;
|
||||
off_t tmp_offset;
|
||||
off_t result;
|
||||
gint64 result;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -1311,16 +1310,7 @@ g_io_win32_fd_seek (GIOChannel *channel,
|
||||
g_abort ();
|
||||
}
|
||||
|
||||
tmp_offset = offset;
|
||||
if (tmp_offset != offset)
|
||||
{
|
||||
g_set_error_literal (err, G_IO_CHANNEL_ERROR,
|
||||
g_io_channel_error_from_errno (EINVAL),
|
||||
g_strerror (EINVAL));
|
||||
return G_IO_STATUS_ERROR;
|
||||
}
|
||||
|
||||
result = lseek (win32_channel->fd, tmp_offset, whence);
|
||||
result = _lseeki64 (win32_channel->fd, offset, whence);
|
||||
errsv = errno;
|
||||
|
||||
if (result < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user