Fri Feb 15 10:41:51 2002  Owen Taylor  <otaylor@redhat.com>

        * NEWS: Updated.

        * configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
        (#71410, Sven Neumann)

        * glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
        Change offset type for g_io_channel_seek[_position] to
        gint64.
This commit is contained in:
Owen Taylor 2002-02-15 16:41:54 +00:00 committed by Owen Taylor
parent 9c357424fc
commit 5d43b9ade4
14 changed files with 141 additions and 12 deletions

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

View File

@ -1,3 +1,14 @@
Fri Feb 15 10:41:51 2002 Owen Taylor <otaylor@redhat.com>
* NEWS: Updated.
* configure.in: Require autoconf-2.52, run AC_SYS_LARGEFILE.
(#71410, Sven Neumann)
* glib/giounix.c glib/giowin32.c glib/giochannel.[ch]:
Change offset type for g_io_channel_seek[_position] to
gint64.
2002-02-15 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* tests/thread-test.c: Do not assume, that after

15
NEWS
View File

@ -1,3 +1,18 @@
Overview of Changes in GLib 1.3.14:
===================================
* Register value transformations for gint64, guint64 [Andy Wingo]
* Build with large-file support [Sven Neumann, Owen Taylor]
* Fix handling of hostnames in URI's [Darin Adler]
* Main loop bug fixes [Havoc Pennington, Owen]
* Doc fixes and improvements [Manish Singh, Tim Janik]
* Support ' as attribute delimiters in GMarkup [Matthias Clasen]
* Win32 fixes [Hans Breuer, Tor Lillqvist]
* Threading bug and build fixes [Sebastian Wilhelmi, Miroslaw Dobrzanski-Neumann]
* Miscellaneous bug fixes
Other contributors: Matthias Clasen, Mitch Natterer, James Henstridge
Overview of Changes in GLib 1.3.13:
===================================

View File

@ -5,8 +5,8 @@ builtin(include, acglib.m4)dnl
builtin(include, glib/libcharset/codeset.m4)dnl
builtin(include, glib/libcharset/glibc21.m4)dnl
# require autoconf 2.13
AC_PREREQ(2.13)
# require autoconf 2.52
AC_PREREQ(2.52)
# Process this file with autoconf to produce a configure script.
AC_INIT(glib/glib.h)
@ -196,6 +196,8 @@ AC_LANG_RESTORE
AM_PROG_CC_STDC
AC_PROG_INSTALL
AC_SYS_LARGEFILE
#
# Find pkg-config
#

View File

@ -239,7 +239,7 @@ g_io_channel_write (GIOChannel *channel,
**/
GIOError
g_io_channel_seek (GIOChannel *channel,
glong offset,
gint64 offset,
GSeekType type)
{
GError *err = NULL;
@ -799,7 +799,7 @@ g_io_channel_get_close_on_unref (GIOChannel *channel)
**/
GIOStatus
g_io_channel_seek_position (GIOChannel* channel,
glong offset,
gint64 offset,
GSeekType type,
GError **error)
{

View File

@ -145,7 +145,7 @@ struct _GIOFuncs
gsize *bytes_written,
GError **err);
GIOStatus (*io_seek) (GIOChannel *channel,
glong offset,
gint64 offset,
GSeekType type,
GError **err);
GIOStatus (*io_close) (GIOChannel *channel,
@ -173,7 +173,7 @@ GIOError g_io_channel_write (GIOChannel *channel,
gsize count,
gsize *bytes_written);
GIOError g_io_channel_seek (GIOChannel *channel,
glong offset,
gint64 offset,
GSeekType type);
void g_io_channel_close (GIOChannel *channel);
#endif /* G_DISABLE_DEPRECATED */
@ -254,7 +254,7 @@ GIOStatus g_io_channel_write_unichar (GIOChannel *channel,
gunichar thechar,
GError **error);
GIOStatus g_io_channel_seek_position (GIOChannel *channel,
glong offset,
gint64 offset,
GSeekType type,
GError **error);
GIOChannel* g_io_channel_new_file (const gchar *filename,

View File

@ -31,6 +31,8 @@
* MT safe
*/
#include "config.h"
#include "glib.h"
#include <sys/types.h>
#include <sys/stat.h>
@ -73,7 +75,7 @@ static GIOStatus g_io_unix_write (GIOChannel *channel,
gsize *bytes_written,
GError **err);
static GIOStatus g_io_unix_seek (GIOChannel *channel,
glong offset,
gint64 offset,
GSeekType type,
GError **err);
static GIOStatus g_io_unix_close (GIOChannel *channel,
@ -251,12 +253,13 @@ g_io_unix_write (GIOChannel *channel,
static GIOStatus
g_io_unix_seek (GIOChannel *channel,
glong offset,
gint64 offset,
GSeekType type,
GError **err)
{
GIOUnixChannel *unix_channel = (GIOUnixChannel *)channel;
int whence;
off_t tmp_offset;
off_t result;
switch (type)
@ -275,7 +278,16 @@ g_io_unix_seek (GIOChannel *channel,
g_assert_not_reached ();
}
result = lseek (unix_channel->fd, offset, whence);
tmp_offset = offset;
if (tmp_offset != offset)
{
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (EINVAL),
strerror (EINVAL));
return G_IO_STATUS_ERROR;
}
result = lseek (unix_channel->fd, tmp_offset, whence);
if (result < 0)
{

View File

@ -32,6 +32,8 @@
/* Define this to get (very) verbose logging of all channels */
/* #define G_IO_WIN32_DEBUG */
#include "config.h"
#include "glib.h"
#include <stdlib.h>
@ -898,12 +900,13 @@ g_io_win32_fd_write (GIOChannel *channel,
static GIOStatus
g_io_win32_fd_seek (GIOChannel *channel,
glong offset,
gint64 offset,
GSeekType type,
GError **err)
{
GIOWin32Channel *win32_channel = (GIOWin32Channel *)channel;
int whence;
off_t tmp_offset;
off_t result;
switch (type)
@ -921,8 +924,17 @@ g_io_win32_fd_seek (GIOChannel *channel,
whence = -1; /* Keep the compiler quiet */
g_assert_not_reached();
}
tmp_offset = offset;
if (tmp_offset != offset)
{
g_set_error (err, G_IO_CHANNEL_ERROR,
g_io_channel_error_from_errno (EINVAL),
strerror (EINVAL));
return G_IO_STATUS_ERROR;
}
result = lseek (win32_channel->fd, offset, whence);
result = lseek (win32_channel->fd, tmp_offset, whence);
if (result < 0)
{