diff --git a/ChangeLog b/ChangeLog index 1f515420c..48a0336b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 1f515420c..48a0336b3 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 1f515420c..48a0336b3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 1f515420c..48a0336b3 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 1f515420c..48a0336b3 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 1f515420c..48a0336b3 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 1f515420c..48a0336b3 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 1f515420c..48a0336b3 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +Fri Feb 15 10:41:51 2002 Owen Taylor + + * 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 * tests/thread-test.c: Do not assume, that after diff --git a/NEWS b/NEWS index 6faa07cf7..364d25cc3 100644 --- a/NEWS +++ b/NEWS @@ -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: =================================== diff --git a/configure.in b/configure.in index 252d80ccf..b06f8a3d6 100644 --- a/configure.in +++ b/configure.in @@ -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 # diff --git a/glib/giochannel.c b/glib/giochannel.c index fe60dc7f5..a82bf0e47 100644 --- a/glib/giochannel.c +++ b/glib/giochannel.c @@ -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) { diff --git a/glib/giochannel.h b/glib/giochannel.h index 1ff325b5b..80d2d9bf3 100644 --- a/glib/giochannel.h +++ b/glib/giochannel.h @@ -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, diff --git a/glib/giounix.c b/glib/giounix.c index bc5211215..826a2e5b4 100644 --- a/glib/giounix.c +++ b/glib/giounix.c @@ -31,6 +31,8 @@ * MT safe */ +#include "config.h" + #include "glib.h" #include #include @@ -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) { diff --git a/glib/giowin32.c b/glib/giowin32.c index 20bc22a83..e2a29d5b2 100644 --- a/glib/giowin32.c +++ b/glib/giowin32.c @@ -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 @@ -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) {