Commit Graph

11015 Commits

Author SHA1 Message Date
Chun-wei Fan
17c713d3f6 Update VS property sheets
Missed the new glib/gstringchunk.h header that needed to be installed as
well.
2011-10-12 10:37:24 +08:00
Dan Winship
380ec80d07 g_time_val_from_iso8601: clarify the docs a bit 2011-10-11 19:28:59 -04:00
Ryan Lortie
baa394910b gmain: use GPrivate instead of GStaticPrivate 2011-10-11 18:42:03 -04:00
Dan Winship
b3e3914062 Fix two tests for G_DEBUG=gc-friendly 2011-10-11 15:36:42 -04:00
Chun-wei Fan
08d6e1147d Use GLIB_DEPRECATED instead of G_GNUC_DEPRECATED in our headers
This will let others opt out of seeing GLib deprecation warnings
by defining GLIB_DISABLE_DEPRECATION_WARNINGS.

https://bugzilla.gnome.org/show_bug.cgi?id=661438
2011-10-11 13:42:59 -04:00
Matthias Clasen
a1acf35653 Add our own deprecation macros
This will allow to suppress deprecation warnings on a per-module
basis, if needed. They are on by default now, though.
2011-10-11 13:42:58 -04:00
Matthias Clasen
0da0411a4a Add better deprecation macros
Unlike G_GNUC_... macros, the new G_DEPRECATED[_FOR] are
meant as abstractions that work with different compilers.
Using a new name also lets us restrict it to 'must be placed
before the declaration', which works with more compilers.

https://bugzilla.gnome.org/show_bug.cgi?id=661438
2011-10-11 13:13:27 -04:00
Chun-wei Fan
a73113908f Update VS property sheets
Copy the deprecated headers in their appropriate places.
2011-10-11 18:04:07 +08:00
Chun-wei Fan
0e71214bef glibconfig.win32(.in): Cleanup cruft
The definitions of _GMutex* and G_STATIC_MUTEX_INIT is now found in
glib/deprecated/gthread.h, and should no longer be in the mainline
code, so remove them from here.
2011-10-11 15:55:55 +08:00
Ryan Lortie
3e5a30fc17 GStaticMutex: ABI fixup
Everything was OK as long as GMutex was backed by pthread_mutex_t on
POSIX.  Since this is no longer the case, the ABI of GStaticMutex was
broken.

Fix that up by using pthread_mutex_t directly in the structure.  Since
that's potentially incompatible with our GMutex implementation, set
g_thread_use_default_impl to FALSE to cause the fallback code (which
manually allocates a GMutex) to run, even in the case of
already-existing code (without the need for a recompile).  This will
cause the pthread_mutex_t part of the struct to be completely ignored.
2011-10-10 19:44:23 -04:00
Matthias Clasen
2c1cbde21e Compile private test with -pthread on UNIX
We are using explicit pthread calls here, so we should
use the right linker flags for that.

https://bugzilla.gnome.org/show_bug.cgi?id=661318
2011-10-10 11:11:29 -04:00
Matthias Clasen
93e49aea1b Don't use deprecated GThread API in gio tests 2011-10-10 09:49:50 -04:00
Kjartan Maraas
5662619f22 Updated Norwegian bokmål translation 2011-10-10 07:55:29 +02:00
Algimantas Margevičius
918954e089 Updated Lithuanian translation 2011-10-09 22:00:49 +03:00
Matthias Clasen
5e2764d70c Silence deprecation warnings in deprecated/
We know we are all deprecated here...
2011-10-09 09:57:13 -04:00
Matthias Clasen
ff2dafb209 Add G_GNUC_DEPRECATED to deprecated functions in gio 2011-10-08 23:49:04 -04:00
Matthias Clasen
93b3f6477e Add G_GNUC_DEPRECATED to deprecated functions in gobject 2011-10-08 23:23:43 -04:00
Matthias Clasen
f9b29ca034 Add G_GNUC_DEPRECATED to deprecated APIs in glib 2011-10-08 23:16:01 -04:00
Matthias Clasen
30b320b61c Add some GHookList tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
6109db27ae Test a few more GIOChannel functions 2011-10-08 19:02:06 -04:00
Matthias Clasen
d33f625444 Remove a bit of dead code 2011-10-08 19:02:06 -04:00
Matthias Clasen
b3ead3c998 Pass G_DEBUG=g-gc-friendly when running the tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
d5a1ca8fd7 Add some more GMarkup tests 2011-10-08 19:02:06 -04:00
Matthias Clasen
08e17ae51b Call setlocale in markup-parse test
This is necessary to make utf-8 text come out properly.
2011-10-08 19:02:06 -04:00
Matthias Clasen
87cb246f46 Improve GNode test coverage 2011-10-08 19:02:05 -04:00
Matthias Clasen
dca6a601c1 Improve GCache test coverage 2011-10-08 19:02:05 -04:00
Matthias Clasen
eeedaac3e8 Improve coverage of string function tests 2011-10-08 19:02:05 -04:00
Matthias Clasen
944f66f38f Improve coverage of GHmac tests 2011-10-08 19:02:05 -04:00
Matthias Clasen
d9e9239a46 Add a test for g_date_time_new_from_timeval_utc 2011-10-08 19:02:05 -04:00
Antoine Jacoutot
c739a5df14 gio: enable test_peer regression test for OpenBSD
https://bugzilla.gnome.org/show_bug.cgi?id=661255
2011-10-08 17:11:39 +02:00
David Zeuthen
3c4d3dec09 GDBusConnection: Make pending calls error when the connection is lost
If the connection to the bus is lost while a method call is ongoing,
the method call does not get cancelled. Instead it just sits around
until it times out.

This is visible here on XO laptops when stopping the display manager
during shutdown. imsettings starts sending a sync message to give up
its bus name (via g_bus_unown_name()), then systemd terminates the
session bus at approximately the same time. imsettings then hangs for
about 20 seconds before timing out the message.

 http://lists.freedesktop.org/archives/dbus/2011-September/014717.html

imsettings behaviour could be improved as described in that thread,
but I think this is a glib bug. I've also come up with the attached
patch which fixes it.

Credits for the bug-fix goes to Daniel Drake <dsd@laptop.org>. The test
case was written by David Zeuthen <zeuthen@gmail.com>.

https://bugzilla.gnome.org/show_bug.cgi?id=660637

Signed-off-by: David Zeuthen <davidz@redhat.com>
2011-10-07 14:23:03 -04:00
John Ralls
edcac1ee41 Bug 661129: Duplicate symbols zero_thread and g_once_mutex on OSX 2011-10-07 09:51:12 -07:00
Dan Winship
59f1f54655 Add g_main_context_ref_thread_default()
Add g_main_context_ref_thread_default(), which always returns a
reffed GMainContext, rather than sometimes returning a (non-reffed)
GMainContext, and sometimes returning NULL. This simplifies the
bookkeeping in any code that needs to keep a reference to the
thread-default context for a while.

https://bugzilla.gnome.org/show_bug.cgi?id=660994
2011-10-07 10:14:34 -04:00
Daniel Mustieles
d91769b641 Updated Spanish translation 2011-10-07 10:14:10 +02:00
Matthias Clasen
97b0b36ae3 USE __COUNTER__ instead of __LINE__ when available
I've seen builds fail with

nm-connection.c:119:691: error: declaration of '_GStaticAssertCompileTimeAssertion_119' shadows a previous local [-Werror=shadow]

because several compile-time assertions ended up on the same
line. __COUNTER__ is meant specifically for the purpose of
constructing identifiers, so use it when available.
2011-10-07 01:19:15 -04:00
Matthias Clasen
c51fa1852d Don't redundantly redeclare
It makes gcc throw an error:

redundant redeclaration of 'g_static_mutex_get_mutex_impl' [-Werror=redundant-decls]
2011-10-07 00:42:52 -04:00
Ryan Lortie
e76927006a Move G_LOCK below GMutex in the docs
The flow is currently a bit wrong since G_LOCK makes reference to GMutex
which was not yet defined, so switch things around.
2011-10-06 12:24:21 -04:00
Ryan Lortie
761e75f849 .gitignore 2011-10-06 12:21:33 -04:00
Ryan Lortie
083812f854 Several docs cleanups 2011-10-06 12:19:58 -04:00
Ryan Lortie
94b7d2ee6c Cleanup thread documentation 2011-10-06 12:01:53 -04:00
Chun-wei Fan
49b93a0bba gobjet/gclosure.c: Fix styling issues
...so that it looks more consistent with the rest.
2011-10-06 16:02:18 +08:00
Chun-wei Fan
e80d8f0c23 gobject/gclosure.c: Add type cast for int_val = value
This will silence compiler warnings on Visual C++.

(Sorry for the bad fix just now.)
2011-10-06 15:37:52 +08:00
Chun-wei Fan
d77f65d24d Revert "gobject/gclosure.c: Made up for missed pointer deref"
This reverts commit d792a1ebe4.
2011-10-06 15:33:34 +08:00
Chun-wei Fan
d792a1ebe4 gobject/gclosure.c: Made up for missed pointer deref
The value parameter is a gpointer * (void **), but ffi_arg itself is not a
pointer type, so make up for dereference here.
2011-10-06 15:24:08 +08:00
Chun-wei Fan
ed03047a5b gthread-deprecated.c: Include gutils.h
This is needed for declaration of inline.
2011-10-06 15:12:22 +08:00
Chun-wei Fan
eb17516a67 config.h.win32(.in): Update for strcasecmp
Visual C++ uses _stricmp, which is identical to strcasecmp on gcc.
2011-10-06 15:03:30 +08:00
Matthias Clasen
3636cf2c64 Update threads docs for the demise of g_thread_init() 2011-10-05 22:43:22 -04:00
Matthias Clasen
47c7fa2ccd Remove mention of gthread-2.0.pc from 'Compiling' section
At the same time, add one or two other corrections.
2011-10-05 22:31:17 -04:00
Matthias Clasen
749758ec78 Add a warning to g_thread_init_with_errorcheck_mutexes
Should anybody try to use this, we should at least tell them that
its gone.
2011-10-05 22:23:25 -04:00
Dan Williams
8e82225aed closure: fix handling of ENUMs and integral return types on 64-bit BE platforms
enums are stored in v_long but need to be marshalled as signed
integers.  On platforms where int is 32 bits, taking the
address of v_long resulted in the wrong 32 bits being marshalled.
So we need to stuff the enum's int-sized value to a temporary
int-sized variable and marshall that instead.

Second, on return, libffi actually returns a pointer to a value
that's sized according to platform conventions, not according to
what the caller requested.  ie if ffi_type_sint was requested, the
value can still be a 64-bit sign-extended long on a 64-bit
architecture like PPC64, thus the caller cannot simply cast
the return value as a pointer to the desired type, but must cast
as a pointer to an integral type and then cast to the desired
type to remove any sign extension complications.

For more information on how to correctly handle libffi return
values, see the following bug, specifically comment 35:

https://bugzilla.redhat.com/show_bug.cgi?id=736489

"For 64-bit ABIs that extend integral returns types to 64-bits, libffi always
returns full 64-bit values that you can truncate in the calling code.   It's
just the way it is has always been.  Please don't change libffi.  I'll document
this clearly for the next version (perhaps there is a mention of this, I
haven't looked yet).

The same is true for returning 8-bit values, for instance, on 32-bit systems.
All ABIs extend those results to the full 32-bits so you need to provide a
properly aligned buffer that's big enough to hold the result."

https://bugzilla.gnome.org/show_bug.cgi?id=659881
2011-10-05 14:08:22 -05:00