Dan Winship [Thu, 23 Aug 2012 16:39:26 +0000 (12:39 -0400)]
g_option_context_help: don't modify the input data
If there are options that need their names to be aliased, keep track
of that internally rather than modifying the passed-in GOptionGroup
(and leaking strings in the process).
https://bugzilla.gnome.org/show_bug.cgi?id=682560
Matthias Clasen [Sun, 3 Feb 2013 03:54:15 +0000 (22:54 -0500)]
Silence automake
automake doesn't like INCLUDES anymore.
Matthias Clasen [Sat, 2 Feb 2013 21:53:45 +0000 (16:53 -0500)]
Log errors the same way as messages
This will make sense if we keep going past
the assertions that cause the error to be logged.
Matthias Clasen [Sat, 2 Feb 2013 21:26:17 +0000 (16:26 -0500)]
Simplify glib/glib/tests setup
The Makefile.am was setting a ton of unnecessary things
Matthias Clasen [Sat, 2 Feb 2013 21:23:03 +0000 (16:23 -0500)]
Make the logging test more robust
The default handler test was not unsetting the log handler that
gets installed by GTest, which causes the log messages to be duplicated
on stdout if --verbose or --tap are passed. This in turn can make some
of the non-match checks fail. Since we are already using g_test_trap_fork,
we can just unset the handler in the child.
Piotr Drąg [Sat, 2 Feb 2013 23:24:14 +0000 (00:24 +0100)]
Updated Polish translation
Yaron Shahrabani [Sat, 2 Feb 2013 09:23:56 +0000 (11:23 +0200)]
Updated Hebrew translation.
Will Thompson [Tue, 29 Jan 2013 16:09:40 +0000 (16:09 +0000)]
Test for g_hash_table_insert() corrupting sets
https://bugzilla.gnome.org/show_bug.cgi?id=692815
Ryan Lortie [Wed, 30 Jan 2013 00:23:48 +0000 (01:23 +0100)]
hashtable: properly handle insert() de-set-ifying
GHashTable remains a set for as long as all of the keys are exactly
equal (in pointer value) to all of the values. We check this by
comparing keys to values when we do inserts.
Unfortunately, when doing g_hash_table_insert() when a key is already in
the table, the old key pointer value is kept, but the new value pointer
is used. Now we have a situation where a key pointer is unequal to a
value pointer, but we were not treating this case properly.
Fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=692815
Руслан Ижбулатов [Sat, 19 Jan 2013 07:50:28 +0000 (11:50 +0400)]
Fix gio tests makefile for W32
While compiling, libtool will say that undefined symbols are not allowed, and
will refuse to make you a dll. This is only one line, easy to miss. And it
doesn't prevent `make' from completing successfully.
The code this patch adds is from other Makefile.am files that use
$(no_undefined). It's absence in gio is, most likely, an oversight.
Fixes #692058
Matthias Clasen [Sat, 2 Feb 2013 05:19:15 +0000 (00:19 -0500)]
Don't try to find nfs mounts on Windows
This should fix the build there.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 1 Feb 2013 03:56:23 +0000 (04:56 +0100)]
gmain: equivocate a bit on _set_ready_time()
Since this is a new API this cycle it's a good time to add a doc comment
explicitly declaring that a confusing issue that could be resolved
either way has no specific defined behaviour.
This may allow us some additional freedom in future GMainContext work or
we may decide that one behaviour is more desirable than the other.
Stef Walter [Wed, 30 Jan 2013 10:13:38 +0000 (11:13 +0100)]
gdbus: Don't output invalid nested <para> docbook tags
Fix gdbus-codegen so it no longer outputs tags like
<para><para>Text</para></para>
https://bugzilla.gnome.org/show_bug.cgi?id=692865
Stef Walter [Wed, 30 Jan 2013 10:07:52 +0000 (11:07 +0100)]
gdbus: Don't output invalid empty <variablelist> tags
Docbook doesn't allow an empty <variablelist> and so the docbook
output from gdbus-codegen is invalid when a method/signal has
no arguments.
https://bugzilla.gnome.org/show_bug.cgi?id=692865
Dan Winship [Wed, 12 Dec 2012 15:00:26 +0000 (16:00 +0100)]
GInetSocketAddress: fix the byte order of flowinfo and scope_id
The flowinfo and scope_id fields of struct sockaddr_in6 are in host
byte order, but the code previously assumed they were in network byte
order. Fix that.
This is an ABI-breaking change (since before you would have had to use
g_ntohl() and g_htonl() with them to get the correct values, and now
that would give the wrong values), but the previous behavior was
clearly wrong, and no one ever reported it, so it is likely that no
one was actually using it.
https://bugzilla.gnome.org/show_bug.cgi?id=684404
Cosimo Cecchi [Wed, 30 Jan 2013 16:59:09 +0000 (17:59 +0100)]
gmacros: add G_GNUC_UNUSED to G_STATIC_ASSERT
Silence some warnings seen with GCC 4.8.
Kjartan Maraas [Tue, 29 Jan 2013 18:36:58 +0000 (19:36 +0100)]
Updated Norwegian bokmål translation
Colin Walters [Fri, 25 Jan 2013 17:05:26 +0000 (12:05 -0500)]
Add g_close(), use it
There are two benefits to this:
1) We can centralize any operating system specific knowledge of
close-vs-EINTR handling. For example, while on Linux we should never
retry, if someone cared enough later about HP-UX, they could come by
and change this one spot.
2) For places that do care about the return value and want to provide
the caller with a GError, this function makes it convenient to do so.
Note that gspawn.c had an incorrect EINTR loop-retry around close().
https://bugzilla.gnome.org/show_bug.cgi?id=682819
Simon McVittie [Sat, 26 Jan 2013 17:37:33 +0000 (17:37 +0000)]
g_atomic_int_get, g_atomic_pointer_get: accept const arguments
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=692583
Matej Urbančič [Sun, 27 Jan 2013 21:03:12 +0000 (22:03 +0100)]
Updated Slovenian translation
Colin Walters [Fri, 25 Jan 2013 15:40:45 +0000 (10:40 -0500)]
GFile: Clean up file_copy_fallback to fix SEGV with btrfs
Ok, this function was just an awful mess before. Now the problem
domain is not trivial, and I won't claim this new code is *beautiful*,
but it should fix the bug at hand, and be somewhat less prone to
failure for the next person who tries to modify it. There's only one
unref call for each object now.
https://bugzilla.gnome.org/show_bug.cgi?id=692408
Aurimas Černius [Sat, 26 Jan 2013 18:24:32 +0000 (20:24 +0200)]
Updated Lithuanian translation
Rui Matos [Sat, 26 Jan 2013 18:08:08 +0000 (19:08 +0100)]
gsequence: Fix g_sequence_lookup() return value documentation
Mention that we return NULL if the item we are looking up isn't
found.
Dan Winship [Sat, 26 Jan 2013 15:09:33 +0000 (10:09 -0500)]
.gitignore updates
Matthias Clasen [Sat, 26 Jan 2013 01:09:26 +0000 (20:09 -0500)]
Plug a small memleak in gdbus-export test
Colin Walters [Fri, 25 Jan 2013 17:32:39 +0000 (12:32 -0500)]
gfile: Ensure we create internal pipe with FD_CLOEXEC
That way the descriptors aren't leaked to child processes.
https://bugzilla.gnome.org/show_bug.cgi?id=692544
Colin Walters [Fri, 25 Jan 2013 17:06:04 +0000 (12:06 -0500)]
gwakeup: Fix uninitialized variable from previous commit
We really don't want to infloop here...
Colin Walters [Wed, 29 Aug 2012 15:44:01 +0000 (11:44 -0400)]
Handle EINTR for a few more write() calls
https://bugzilla.gnome.org/show_bug.cgi?id=682819
Daniel Mustieles [Fri, 25 Jan 2013 11:54:09 +0000 (12:54 +0100)]
Updated Spanish translation
Akira TAGOH [Thu, 24 Jan 2013 03:33:39 +0000 (12:33 +0900)]
gcontenttype: Duplicate the string inside Mutex lock for thread-safety
https://bugzilla.gnome.org/show_bug.cgi?id=692360
Gil Forcada [Thu, 24 Jan 2013 23:17:18 +0000 (00:17 +0100)]
Incorrect string formatters, fixes #692229
Alexander Larsson [Wed, 23 Jan 2013 11:07:10 +0000 (12:07 +0100)]
Ignore fstab entries that are bind mounts
We don't show the bind mounts anyway, so it only leads to
problems when we show the fstab entries, like being unable
to mount them.
https://bugzilla.gnome.org/show_bug.cgi?id=625552
Dan Winship [Mon, 21 Jan 2013 16:25:26 +0000 (11:25 -0500)]
build: fix a srcdir != builddir problem with gnetworking.h
gio's glib-mkenums call needs to get gnetworking.h out of $(builddir),
not $(srcdir). Fix/simplify it by using $(filter) on $^ and letting
make find everything.
Also add -Wno-portability to AM_INIT_AUTOMAKE in configure.ac, so that
it doesn't warn about this (or about the gmake-specific features we
were already using in gio/tests/)
https://bugzilla.gnome.org/show_bug.cgi?id=691866
Colin Walters [Wed, 23 Jan 2013 16:51:48 +0000 (11:51 -0500)]
gtester: Use FD_CLOEXEC when creating pipes
We were already unsetting the cloexec flag for the child later,
just not actually starting with it.
https://bugzilla.gnome.org/show_bug.cgi?id=692404
Dan Winship [Tue, 22 Jan 2013 21:39:49 +0000 (16:39 -0500)]
GNetworkMonitorNetlink: make the netlink socket cloexec
Use the same code GSocket does, to try SOCK_CLOEXEC first, and then
fall back to FD_CLOEXEC if it fails. (And fix that code to not call
fcntl if SOCK_CLOEXEC worked.)
https://bugzilla.gnome.org/show_bug.cgi?id=692332
Shankar Prasad [Wed, 23 Jan 2013 07:29:13 +0000 (12:59 +0530)]
Updated kn translations
Chun-wei Fan [Tue, 22 Jan 2013 06:14:27 +0000 (14:14 +0800)]
build/Makefile-newvs.am: Make description comment clearer
Cosimo Cecchi [Sun, 20 Jan 2013 19:00:50 +0000 (14:00 -0500)]
gfile: don't report completion twice on g_file_load_contents error
When an error occurs while reading the file input stream in
g_file_load_contents (e.g. because the operation was cancelled), the
code is correctly calling g_task_return_error(), but in the callback
from the close operation, g_task_return_boolean() will be called again.
Code that cleans up its state in the async callback will then be called
twice, leading to invalid memory access.
https://bugzilla.gnome.org/show_bug.cgi?id=692202
Cosimo Cecchi [Sun, 20 Jan 2013 18:12:49 +0000 (13:12 -0500)]
inotify: fix a memleak
https://bugzilla.gnome.org/show_bug.cgi?id=692201
Kjartan Maraas [Mon, 21 Jan 2013 11:25:16 +0000 (12:25 +0100)]
Updated Norwegian bokmål translation
Giovanni Campagna [Thu, 3 Jan 2013 21:53:06 +0000 (22:53 +0100)]
Install an invalidation notifier for GClosure in g_source_set_closure()
The point of g_source_set_closure() is getting memory management right,
including handling closures disappearing from the outside (for example
because a runtime they refer to is being shutdown). This means that
sources with an associated closure should remove themselves from the
main loop and free memory when the closure is invalidated.
https://bugzilla.gnome.org/show_bug.cgi?id=692034
Gheyret Kenji [Sun, 20 Jan 2013 10:47:16 +0000 (19:47 +0900)]
Updated Uyghur translation
Signed-off-by: Gheyret Kenji <gheyret@gmail.com>
Matthias Clasen [Sun, 20 Jan 2013 08:16:47 +0000 (03:16 -0500)]
Fix a typo
Matthias Clasen [Sun, 20 Jan 2013 08:14:24 +0000 (03:14 -0500)]
Fix g_test_add_vtable
This function was creating a test suite for each added
testcase, when it should have grouped tests according to
their paths.
Matthias Clasen [Sun, 20 Jan 2013 08:12:09 +0000 (03:12 -0500)]
Fix annotation for g_test_fail
The doc comment has a "Since: 2.30" annotation, so make
the header match that.
Matthias Clasen [Sat, 19 Jan 2013 19:30:05 +0000 (14:30 -0500)]
Fix build with -Werror=format
There were a few places in gmarkup.c where we were giving
pointer differences when integers are expected. Fix that
by explicitly casting to int.
https://bugzilla.gnome.org/show_bug.cgi?id=692079
Ryan Lortie [Fri, 18 Jan 2013 23:48:31 +0000 (18:48 -0500)]
fam: implement gio-nfs-{file,directory}-monitor
Declare explicit support for monitor NFS from the fam file monitoring
backend. This will cause it to be preferred for monitoring on NFS, if
it is installed.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 18 Jan 2013 23:44:11 +0000 (18:44 -0500)]
localfile: add support for monitoring on NFS
Add a pair of new extension points: 'gio-nfs-file-monitor' and
'gio-nfs-directory-monitor'.
Add a check to GLocalFile when creating a file monitor. If the
requested file is in the user's home directory and the user has an NFS
home directory then attempt to use an implementation of one of the new
extension points. If we don't have any implementations then fall back
to the normal "local" monitors.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 18 Jan 2013 23:30:36 +0000 (18:30 -0500)]
file monitors: use new giomodule function
Get rid of the complicated default module detection code in
GLocalFileMonitor and GLocalDirectoryMonitor and use the new
_gio_module_get_default_type() function instead.
This change also adds the ability to override the default file monitor
via the GIO_USE_FILE_MONITOR environment variable in the same way as can
be done for GIO_USE_VFS.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Ryan Lortie [Fri, 18 Jan 2013 23:27:57 +0000 (18:27 -0500)]
giomodule: add a new "get default" function
_gio_module_get_default() is a very convenient function for modules
implementing a singleton -- it finds the default module by priority
subject to override by a given environment variable name, instantiates
it, and caches the instance for future calls. It also has the ability
to query instances for being 'active' using a callback.
It doesn't work very well for non-singletons (like file monitors).
Add a new function _gio_module_get_default_type() that skips the
instantiation, returning the GType instead. As a replacement for the
'active' callback, a vtable offset can be given for a virtual function
to use to query if a particular backend is supported.
https://bugzilla.gnome.org/show_bug.cgi?id=592211
Chun-wei Fan [Sat, 19 Jan 2013 04:05:12 +0000 (12:05 +0800)]
Update Visual C++ 2010 property sheet
Left out some items to purge in the last commit. Sorry :|
Chun-wei Fan [Sat, 19 Jan 2013 04:02:45 +0000 (12:02 +0800)]
Clean up Visual C++ property sheets
We no longer need entries to generate the .def files in the property sheets
as we are now doing __declspec (dllexport) to export all the needed
symbols. So, purge these items from the property sheets since they are no
longer used.
Chun-wei Fan [Sat, 19 Jan 2013 03:58:47 +0000 (11:58 +0800)]
Bug 688681: Stop using the .def file for GThread Visual C++ builds
We should also stop using gthread/gthread.def file as well, since we
also use __declspec (dllexport) for the two (deprecated) functions there
since commit
f8756694.
This should also silence some linker warnings in x64 builds.
Also get rid of the references to the .symbols files in the
.vcxproj.filters(in) in the various Visual C++ 2010 projects
Cosimo Cecchi [Fri, 18 Jan 2013 22:22:52 +0000 (17:22 -0500)]
timezone: plug a memleak
Cosimo Cecchi [Fri, 18 Jan 2013 22:02:35 +0000 (17:02 -0500)]
timezone: avoid a double GBytes unref
This will cause random memory corruption; functions should not unref
passed-in parameters.
Мирослав Николић [Fri, 18 Jan 2013 22:01:19 +0000 (23:01 +0100)]
Updated Serbian translation
Ryan Lortie [Fri, 18 Jan 2013 21:11:20 +0000 (16:11 -0500)]
GVariant: fix normal-form checking for tuples
GVariant has the concept of fixed-sized types (ie: types for which all
values of the type will have the same size). Examples are booleans,
integers, doubles, etc. Tuples containing only these types are also
fixed size.
When GVariant is trying to deal with a fixed-sized value for which it
doesn't have a sufficient backing store (eg: the case where a
fixed-sized value was created with g_variant_new_data() with an
incorrect number of bytes) it denotes this by setting the size of the
value to the correct fixed size but using a NULL data pointer.
This is well-documented in several code comments and also in the public
API documentation for g_variant_get_data() which describes the situation
number which NULL could be returned.
The decision to deal with this case in this way was changed at the last
minute around the time that GVariant was merged -- originally we had an
elaborate setup involving allocating an internal buffer of sufficient
size to be shared between all invalid values.
Unfortunately, when making this change a small detail was missed.
gvs_tuple_get_child() (the function responsible for deserialising
tuples) was updated to properly check for this case (and it contains a
comment about why it must). gvs_tuple_is_normal() (the function
responsible for verifying if a tuple is in normal form) was not.
We add the check now.
Note that this problem does not exist with any other container type
because tuples are the only container capable of being fixed-sized. All
other container types (arrays, maybes, variants) can contain a variable
number of items or items of variable types (note: we consider dictionary
entries to be two-tuples). The code for validating non-container values
also contains a check for the case of NULL data.
The problem also does not occur in the only other function dealing with
serialised tuples: gvs_tuple_n_children(). Whereas other container
types would have to inspect the serialised data to determine the number
of children, for tuples it can be determined directly from the type.
Ryan Lortie [Fri, 18 Jan 2013 19:33:16 +0000 (14:33 -0500)]
gobject/: Remove abicheck.sh from DIST_EXTRA
Ryan Lortie [Fri, 18 Jan 2013 18:56:10 +0000 (13:56 -0500)]
Add new API checking utility
Add a test script to make sure that (with a few exceptions) only symbols
that start with 'g_' are being exported from our public libraries.
https://bugzilla.gnome.org/show_bug.cgi?id=692029
Ryan Lortie [Fri, 18 Jan 2013 18:27:16 +0000 (13:27 -0500)]
Remove a few more G_GNUC_INTERNAL users
Ryan Lortie [Fri, 18 Jan 2013 18:23:40 +0000 (13:23 -0500)]
Fix visibility for glib/ and gio/ submodules
We have various sub directories in glib/ and gio/ (eg: inotify, gnulib,
pcre, xdgmime, etc.) that build convenience libraries that are then
included into libglib and libgio. The files in these directories need
to be built with the same visibility policy as the files in the first
level directories, so add CFLAGS for them all.
This wasn't a problem when the visibility flags were set directly in
CFLAGS but then we had to deal with some modules that we built that we
explicitly wanted to export symbols from.
For now, we can keep things the way they are because it's less hacky and
although it's a theoretical hazard to forget these CFLAGS, we rarely add
new subdirectories to the build.
Colin Walters [Wed, 28 Nov 2012 17:00:40 +0000 (12:00 -0500)]
Remove most use of G_GNUC_INTERNAL
Now that we use an explicit list of symbols to export, the
G_GNUC_INTERNAL is redundant.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Mon, 14 Jan 2013 04:31:45 +0000 (23:31 -0500)]
Remove ABI checking scripts
Before this commit, the only difference between the expected and actual
ABI were the addition of _init and _fini symbols in each module (now
that regexp-based export control is not catching those).
Ryan Lortie [Mon, 14 Jan 2013 04:12:23 +0000 (23:12 -0500)]
Remove regexp-based export control
Ryan Lortie [Thu, 17 Jan 2013 03:55:27 +0000 (22:55 -0500)]
gsignal: fix closure invalidation code
This is the bug that has been causing segfaults and criticals when accel
keys are used to close windows via GtkUIManager.
The main cause of this problem was a mistake made in the original patch
when modifying the handler_lookup() to take the extra 'closure'
parameter. The original check used was:
if (handler->sequential_number == handler_id ||
(closure && handler->closure == closure))
It was called to find a particular closure like so:
handler_lookup (instance, 0, closure, &signal_id);
The problem is that the check will return if either the signal ID or
closure matches (if a closure was given). The calling code assumes 0 to
be an invalid signal ID which will match no handlers, but unfortunately
the rest of gsignal code uses this to denote a signal that has already
been disconnected. The result is that this function was searching for a
matching closure _or_ the first already-disconnected handler. When it
found the already-disconnected handler, we'd get criticals and crashes.
The condition has been corrected; it now ignores the handler_id
parameter if the closure parameter is non-NULL.
While we're in here, change the lifecycle of the invalidation notify to
be easier to understand.
Before, the notify was removed when the last reference on the handler
dropped. This could happen in very many situations; often at the end of
an emission. Instead, we now tie the registration of the notifier to
the lifecycle of the signal connection. When the signal is disconnected
we remove the notification, even if other references are held (eg:
because it is currently being dispatched).
https://bugzilla.gnome.org/show_bug.cgi?id=690118
Dan Winship [Wed, 16 Jan 2013 15:09:10 +0000 (10:09 -0500)]
gio/tests: add some more async stream tests
Add read_async() and skip_async() tests to buffered-input-stream.
Fix and re-enable filter-streams's existing close_async() tests, and
add read_async(), skip_async(), and write_async() tests as well. Also,
redo the tests to use dummy GFilterInputStream and GFilterOutputStream
subclasses rather than GBufferedInput/OutputStream, so that we're
testing the base filter stream implementations of everything (since
the buffered stream overrides are already getting tested in the
buffered-input-stream and buffered-output-stream tests anyway).
Add a skip_async() test to unix-streams. (This one would crash without
the bugfix in the previous commit.)
Alban Browaeys [Tue, 15 Jan 2013 23:04:58 +0000 (00:04 +0100)]
gio: callback_data is the task not the task data.
skip_callback_wrapper expect the user_data (callback_data)
to be the task holding the task_data, not the task_data
itself.
Otherwise the task_data is cast as GTask and then task_data
is extracted from this bogus task.
https://bugzilla.gnome.org/show_bug.cgi?id=691812
Ryan Lortie [Tue, 15 Jan 2013 20:40:14 +0000 (15:40 -0500)]
mainloop test: fix a silly memory error
Ryan Lortie [Tue, 15 Jan 2013 20:40:09 +0000 (15:40 -0500)]
mainloop test: use atomic for cross-thread access
Ryan Lortie [Tue, 15 Jan 2013 20:22:35 +0000 (15:22 -0500)]
mainloop test: fix a small typo
This g_assert() could never possibly fail, as it was.
Ryan Lortie [Tue, 15 Jan 2013 04:05:31 +0000 (23:05 -0500)]
tests for the new MainContext/GSource API
Ryan Lortie [Mon, 14 Jan 2013 19:47:16 +0000 (14:47 -0500)]
Add a UNIX fd source
https://bugzilla.gnome.org/show_bug.cgi?id=658020
Ryan Lortie [Mon, 14 Jan 2013 21:53:06 +0000 (16:53 -0500)]
gsource: Add support for file descriptors on UNIX
Adding file descriptors to a GSource provides similar functionality to
the old g_source_add_poll() API with two main differences.
First: the list of handles is managed internally and therefore users are
prevented from randomly modifying the ->events field. This prepares us
for an epoll future where changing the event mask is a syscall.
Second: keeping the list internally allows us to check the ->revents for
events for ourselves, allowing the source to skip implementing
check/prepare. This also prepares us for the future by allowing an
implementation that doesn't need to iterate over all of the sources
every time.
https://bugzilla.gnome.org/show_bug.cgi?id=686853
Ryan Lortie [Tue, 30 Aug 2011 23:14:17 +0000 (19:14 -0400)]
GTimeoutSource: simplify
Take advantage of the new default handling of the 'prepare' and 'check'
functions.
https://bugzilla.gnome.org/show_bug.cgi?id=657729
Ryan Lortie [Mon, 14 Jan 2013 21:51:51 +0000 (16:51 -0500)]
GSource: new API g_source_set_ready_time()
Add an API to mark a GSource to automatically become ready at the
specified monotonic time.
https://bugzilla.gnome.org/show_bug.cgi?id=657729
Ryan Lortie [Mon, 29 Oct 2012 17:26:05 +0000 (18:26 +0100)]
gsource: allow NULL check and prepare functions
Allow for NULL GSourceFuncs.check() and .prepare().
For prepare() the source will be taken not to be ready and having an
infinite timeout. For check() the source will be taken not to be ready.
https://bugzilla.gnome.org/show_bug.cgi?id=686853
Ryan Lortie [Mon, 29 Oct 2012 15:33:18 +0000 (16:33 +0100)]
move GIOCondition to gmain.h from giochannel.h
GIOCondition has uses outside of GIOChannel, so move it to gmain.h.
https://bugzilla.gnome.org/show_bug.cgi?id=686853
Ryan Lortie [Mon, 29 Oct 2012 15:31:46 +0000 (16:31 +0100)]
gsource: Make GSource->source_funcs const
This is the vtable pointer for the source which is usually held in
static storage. For our internal sources it points at a vtable which
the user should really never be modifying.
Mark it const.
https://bugzilla.gnome.org/show_bug.cgi?id=686853
Yuri Sedunov [Tue, 15 Jan 2013 16:05:43 +0000 (11:05 -0500)]
gtester: Add #include config.h
Missed #include "config.h" so, in particular, large file support
(_FILE_OFFSET_BITS) ignored.
https://bugzilla.gnome.org/show_bug.cgi?id=691624
Chun-wei Fan [Tue, 15 Jan 2013 07:47:17 +0000 (15:47 +0800)]
Revert "Improvde #include order consistency"
This reverts commit
f2e00a07f49d6ad0e8d790396bcdea913592ce33.
Moving the block up would prevent G_OS_WIN32 being checked correctly as
it is a macro that is defined by including the GLib header(s), at least for
Visual C++ builds.
https://bugzilla.gnome.org/show_bug.cgi?id=691769
Chun-wei Fan [Tue, 15 Jan 2013 07:23:05 +0000 (15:23 +0800)]
Bug 688681: Stop using .def files in Visual Studio builds
Since we are now starting to use __declspec (dllexport) to export the
public functions during the build of the GLib DLLs (i.e. to generate the
.lib files), we don't want to generate the .def files from the .symbols
files as we did before for a long time.
This removes from the projects the custom build steps to generate the
various .def files
This will also update the pre-configured config.h(.win32.in) to define
_GLIB_EXTERN appropriately as __declspec (dllexport), as well as making its
entries reflect config.h.in more closely.
Matthias Clasen [Tue, 15 Jan 2013 05:24:27 +0000 (00:24 -0500)]
Bump version
Matthias Clasen [Tue, 15 Jan 2013 04:52:10 +0000 (23:52 -0500)]
2.35.4
Matthias Clasen [Tue, 15 Jan 2013 04:25:05 +0000 (23:25 -0500)]
Dist assert-msg-test.gdb
And refer to it in srcdir. Otherwise, the test fails mysteriously
in make distcheck.
Ryan Lortie [Tue, 15 Jan 2013 04:24:53 +0000 (23:24 -0500)]
visibility: Use a separate CFLAGS variable
We only want to control the default visibility for our five main
installable libraries: libglib, libgthread, libgmodule, libgobject,
libgio. We should therefore only set -fvisibility=hidden when building
those.
Use a separate substitution variable for this purpose.
Using CFLAGS directly leads to some modules built in testcases not
exporting their symbols (and then the tests fail). It also affects the
fam file monitoring module.
Colin had originally done it this way in his visibility patch series but
I failed to understand why so I didn't copy it. Now I do.
Also: revert changes made to two testcases in an attempt to work around
this issue.
https://bugzilla.gnome.org/show_bug.cgi?id=691756
Matthias Clasen [Tue, 15 Jan 2013 03:47:02 +0000 (22:47 -0500)]
Fix module-test in a better way
Avoid having visibility attribute directly in the code by
adding a _GLIB_EXTERN-decorated declaration for the exported
variables.
Matthias Clasen [Tue, 15 Jan 2013 03:22:41 +0000 (22:22 -0500)]
Fix distcheck
With gdbus-testserver now being a compiled program, it no longer
lives in SRCDIR.
Matthias Clasen [Tue, 15 Jan 2013 02:31:47 +0000 (21:31 -0500)]
Fix up visibility fallout in module-test
Matthias Clasen [Mon, 14 Jan 2013 22:21:52 +0000 (17:21 -0500)]
Fix the assert-msg test
gdb is playing games with us, by breaking -x /dev/stdin
Matthias Clasen [Mon, 14 Jan 2013 20:53:37 +0000 (15:53 -0500)]
Remove an unused function
Matthias Clasen [Mon, 14 Jan 2013 20:53:13 +0000 (15:53 -0500)]
Make the build more quiet
Ryan Lortie [Mon, 14 Jan 2013 16:17:52 +0000 (11:17 -0500)]
win32: hide g_win32_app_info_get_type()
This was in a private header file and was never part of the public ABI.
Hide it again.
Caught by Dieter Verfaillie.
Ryan Lortie [Mon, 14 Jan 2013 16:14:53 +0000 (11:14 -0500)]
glocal*monitor: export ABI only on UNIX
Add an #ifdef G_OS_UNIX around the GLIB_AVAILABLE_IN_ALL annotation on
the _get_type() functions for GLocal{File,Directory}Monitor.
These symbols are in private header files and are only exported so that
the in-tree file monitoring modules can subclass. This is only needed
on UNIX and was therefore never part of the public ABI on Windows.
Caught by Dieter Verfaillie.
Ryan Lortie [Mon, 14 Jan 2013 16:11:00 +0000 (11:11 -0500)]
win32: hide _glib_get_dll_directory again
This is not part of our public ABI and it's not used from the other
libraries in GLib, so we should not be exporting it.
Caught by Dieter Verfaillie.
Martin Pitt [Mon, 14 Jan 2013 10:26:30 +0000 (11:26 +0100)]
GParamSpec: Make constructors introspectable
Commit
282366c3262 unnecessarily (skip)ed all the GParamSpec constructors like
g_param_spec_bool(). Make those introspectable by dropping the (skip) and
adding proper transfer annotations.
Keep g_param_spec_value_array() skipped as GValueArray is deprecated.
Ryan Lortie [Mon, 14 Jan 2013 05:13:00 +0000 (00:13 -0500)]
tests: introduce a small hack for visibility
One of our testcases builds a small giomodule for testing the loading of
modules containing resources. Unfortunately, this module gets built
using the same CFLAGS as the rest of GLib, including the visibility
flags (defaulting to hidden).
Use "config.h" to get a declaration of _GLIB_EXTERN that will export
symbols properly and use it to annotate the necessary APIs.
Ryan Lortie [Mon, 14 Jan 2013 05:06:26 +0000 (00:06 -0500)]
gthread-impl.c: add missing #include "config.h"
One of the features of our new symbol exporting regime is that it forces
config.h to be included at the top of every .c file.
This was missed in gthread-impl.c.
The only reason this wasn't noticed is because nothing in this file is
being used anymore. We need those symbols to continue to be exported
for reasons of ABI backwards compatibility, however.
Ryan Lortie [Mon, 14 Jan 2013 04:43:44 +0000 (23:43 -0500)]
kqueue: Reduce G_GNUC_INTERNAL + G_LOCK abuse
The kqueue file monitoring backend was misusing G_GNUC_INTERNAL for want
of 'static' in a couple of places and also using it to declare a lock
that was never used at all.
Fix those up.
Ryan Lortie [Mon, 14 Jan 2013 04:30:49 +0000 (23:30 -0500)]
gio: remove export tags from two private headers
I got a little bit too excited and added GLIB_AVAILABLE_IN_ALL tags to
some internal API.
Ryan Lortie [Sun, 13 Jan 2013 20:41:03 +0000 (15:41 -0500)]
win32: build: stop using .def files
With visibility now under the control of __declspec(dllexport) we no
longer need to build .def files or use them for building our various
.dll files.
.def files used to be installed (even though it is only really useful
when creating the .dll or .lib file). Don't do that anymore either.
The Makefiles still contain rules to create a .lib file for use with
Visual Studio and these rules require .def files. There are special
requirements to using these rules (like having installed and setup
Microsoft tools for use during the build) and therefore the problem of
creating a .def file for use with them is left open to anyone willing to
make the effort. Many options are available depending on which
toolchain is in use (dlltool, pexport, gendef, dumpbin.exe, just to name
a few).
If we can find a free tool for creating .lib files in the future, we
should probably revisit this issue and add proper support back to our
build system.