2008-09-16 Tor Lillqvist <tml@novell.com>
* glib/gtimer.c (g_time_val_to_iso8601): time_t is 64 bits in all
the newer Microsoft C libraries, not just 64-bit ones. So to avoid
crash if compiled with newer MSVSes, use a separate time_t
variable in all cases on Windows.
svn path=/trunk/; revision=7496
2008-09-16 Tor Lillqvist <tml@novell.com>
* glib/gbacktrace.h: Define G_BREAKPOINT() also for 64-bit MSVC,
using the __debugbreak() intrinsic.
svn path=/trunk/; revision=7495
2008-09-15 Tor Lillqvist <tml@novell.com>
* config.h.win32.in: Update to match what the configure script
produces. Just for uniformity, only commented out parts affected.
svn path=/trunk/; revision=7489
2008-09-13 Tor Lillqvist <tml@novell.com>
* glib/gutils.h
* glib/gwin32.h: Deprecate G_WIN32_DLLMAIN_FOR_DLL_NAME(),
g_win32_get_package_installation_directory() and
g_win32_get_package_installation_subdirectory() as their
documentation has warned for a while. Sorry that I forgot to do
this before 2.18.0.
* glib/gwin32.c (g_win32_get_package_installation_directory):
Print a warning if a non-NULL package parameter is passed to this
function, as that is deprecated usage, as the documentation says.
svn path=/trunk/; revision=7480
2008-09-11 Matthias Clasen <mclasen@redhat.com>
Bug 548321 – <string.h> is not included in gi18n-lib.h
* glib/gi18n.h:
* glib/gi18n-lib.h: Include string.h, since strlen is used in
the macros. Pointed out by Ignacio Casal Quinteiro
svn path=/trunk/; revision=7455
2008-09-09 Matthias Clasen <mclasen@redhat.com>
Bug 551228 – G_STRFUNC on recent Sun compiler should be expanded to
__func__ rather than '???'
* glib/gmacros.h: Don't use glibconfig.h defines in gmacros.h,
as the comment up top says. Instead look at __STDC_VERSION__.
Problem reported by Lin Ma.
svn path=/trunk/; revision=7451
2008-09-09 Matthias Clasen <mclasen@redhat.com>
Bug 523463 – Core dump in gmain.c:2482:IA__g_main_context_check()
* glib/gmain.c (g_main_context_check): Be robust against setting
event fields on the fly, as e.g. happens in linc. Tracked down
by Paul Smith, fix proposed by Owen Taylor.
svn path=/trunk/; revision=7447
2008-08-31 Emmanuele Bassi <ebassi@gnome.org>
Bug 550096 – GBookmarkFile parser is not forward compatible
* glib/gbookmarkfile.c:
(parse_bookmark_element), (parse_application_element),
(parse_mime_type_element), (parse_icon_element): Relax the
attributes checking of the GBookmarkFile parser for the
attributes that the desktop bookmark file specification
defines and controls. This allows adding new attributes to
the existing elements in newer versions without breaking the
parser in older ones.
svn path=/trunk/; revision=7418
2008-08-28 Ryan Lortie <desrt@desrt.ca>
Fixup for test case in previous commit.
* glib/tests/strfuncs.c: don't fail if we can't open the test data.
This happens if $(builddir) != $(srcdir) (like when doing 'make
distcheck'). Quick workaround for now until #549783 can be fixed.
svn path=/trunk/; revision=7415
2008-08-28 Ryan Lortie <desrt@desrt.ca>
[REVERT] Bug 548612 – g_strstr_len() should use memmem when available
* glib/gstrfuncs.c (g_strstr_len): fix off-by-one memory access error
* glib/tests/strfuncs.c (test_bounds): add some new test cases that
would catch problems like this
* glib/tests/4096-random-bytes: test data for the previous
* glib/tests/Makefile.am: add previous to EXTRA_DIST
svn path=/trunk/; revision=7414
2008-08-28 Ryan Lortie <desrt@desrt.ca>
[REVERT] Bug 548612 – g_strstr_len() should use memmem when available
* configure.in:
* glib/gstrfuncs.c (g_strstr_len): revert use of memmem (see bug)
svn path=/trunk/; revision=7413
2008-08-28 Michael Natterer <mitch@imendio.com>
* glib/gstrfuncs.c (g_parse_long_long): make "endptr" const since
it's always a pointer into the const string passed. Remove some
casting to (gchar*) in this function.
(g_ascii_strtoull)
(g_ascii_strtoll): cast "endptr" to (const gchar**) here when
passing it to above function.
svn path=/trunk/; revision=7410
2008-08-28 Bastien Nocera <hadess@hadess.net>
Bug 548612 – g_strstr_len() should use memmem when available
* glib/tests/strfuncs.c (test_strstr):
* tests/string-test.c (main): Patch by Paolo Borelli
<pborelli@katamail.com> to move the tests to the right place,
and add more tests
* glib/gstrfuncs.c (g_strstr_len): Fix problem with memmem ignoring
nul-terminators in strings, and using the haystack_len instead
svn path=/trunk/; revision=7409
2008-08-28 Bastien Nocera <hadess@hadess.net>
Bug 548612 – g_strstr_len() should use memmem when available
* configure.in: detect whether memmem is available in the C library
* glib/gstrfuncs.c (g_strstr_len): use memmem for g_strstr_len() if
available in it's available, as it could be optimised by the C library
* tests/string-test.c (main): Add a few tests for g_strstr_len()
svn path=/trunk/; revision=7407
2008-08-27 Tor Lillqvist <tml@novell.com>
* glib/giowin32.c: Stylistic changes. Plug an unlikely memory leak
that occurred in create_thread() if closing the thread handle
failed. Add more error messages to g_io_win32_free() that are
printed only when debugging. Plug handle leak, a socket channel's
event was never closed.
svn path=/trunk/; revision=7405
2008-08-27 Tor Lillqvist <tml@novell.com>
* config.h.win32.in: Should not define HAVE_DIRENT_H when
compiling with MSVC, as the only file which checks HAVE_DIRENT_H
is gdir.c, and that includes the dirent.h and wdirent.c from
build/win32/dirent explicitly anyway when being compiled with
MSVC.
svn path=/trunk/; revision=7403
2008-08-22 Björn Lindqvist <bjourne@gmail.com>
Bug 523939 – Example program for GValue
* gobject/gvalue.c: Add code example that demonstrates GValue's
features.
svn path=/trunk/; revision=7387
2008-08-21 Tor Lillqvist <tml@novell.com>
* glib/giowin32.c: Don't bother compiling the binary
compatibility g_io_channel_win32_new_stream_socket()
function that has not been mentioned in any header since 2.0 on
Win64.
* glib/glib.symbols: Mark it, too, private, and don't export it on
Win64.
svn path=/trunk/; revision=7384
2008-08-21 Tor Lillqvist <tml@novell.com>
* glib/gmain.c: Rework the g_poll() implementation on Windows to
match poll() semantics more closely. This makes the test program
in bug #468910 behave better and doesn't seem to break anything
else.
If polling several GPollFDs, i.e. messages and/or waitable
handles, first check if one or several of them are in the
signalled state right away, and return indication for all that are
in that case.
If not, then poll with timeout and indicate only the single one
that the Win32 wait function tells us as before.
Remove unnecessary ifdefs, as we always have G_MAIN_POLL_DEBUG
defined on Windows.
Initialise g_main_poll_debug in g_main_context_new() so we have it
before testing it in one case.
Don't add several copies of a handle in the array of handles to
wait for. The documentation says this is not allowed, although it
did seem to work fine in practise. But do as the documentations
says anyway.
svn path=/trunk/; revision=7375
2008-08-20 Tor Lillqvist <tml@novell.com>
Bug 500246 - Bug fixes for giowin32
* glib/giowin32.c (read_thread) (write_thread): Change the nbytes
variables to signed.
(g_io_channel_win32_make_pollfd): Fix an obvious error in the file
descriptor case leftover after the patch from bug #333098 on
2006-03-02. Thanks to Marcus Brinkmann.
svn path=/trunk/; revision=7373
2008-08-20 Tor Lillqvist <tml@novell.com>
Bug 324234 - Using g_io_add_watch_full() to wait for connect() to
return on a non-blocking socket returns prematurely
Bug 548278 - Async GETs connections are always terminated
unexpectedly on Windows
* glib/giowin32.c: Add one more state variable to the
GIOWin32Channel struct, ever_writable. Initialise it to FALSE, set
to TRUE when the WSAEventSelect() indicates FD_WRITE, and never
reset to FALSE.
Don't do the WSASetEvent() in g_io_win32_prepare() unless
ever_writable is TRUE. Don't automatically indicate G_IO_OUT in
g_io_win32_check() unless ever_writable is TRUE.
This fixes the behaviour of the test case program in bug #548278,
and the "Testcase for the spurious OUT event bug" in bug
#324234. It also doesn't seem to break anything. Not that there is
any exhaustive test suite...
Add a comment with a list of bugs that are related to the code in
this file.
svn path=/trunk/; revision=7372
2008-08-15 12:41:26 Tim Janik <timj@imendio.com>
* glib/gtestutils.c: changed assertion messages, so older emacsen
can also detect failing source file and line, fixes:
Bug 502498 – Test framework assertion failures should follow gcc error format
svn path=/trunk/; revision=7358
2008-08-13 Matthias Clasen <mclasen@redhat.com>
Bug 547637 – unconditional #include of sys/statfs.h in configure
impedes detection of statfs things if non-existant
* configure.in: Protect the statfs.h include by guards.
svn path=/trunk/; revision=7352
2008-08-12 Federico Mena Quintero <federico@novell.com>
* glib/gi18n-lib.h: In the #error about having to define
GETTEXT_PACKAGE, add a hint about a possibly-missing config.h.
Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=7343