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.
Ryan Lortie [Thu, 6 Dec 2012 18:42:06 +0000 (13:42 -0500)]
configure.ac: change our visibility policy
Check for -fvisibility=hidden as a supported CFLAG.
If it is supported, use it and emit an AC_DEFINE to change the meaning
of _GLIB_EXTERN to include the GNU attribute for marking symbols as
public: __attribute((visibility("default"))).
This will override the public definition of _GLIB_EXTERN for any file
which does #include "config.h" (forcing all our .c files to do so, as a
side effect).
If we're on mingw, assume that -fvisibility will work and also throw in
a __declspec(dllexport) for good measure. This will allow us to move
away from using a .def file to create the the various DLLs.
It's possible that there may be compilers that accept
-fvisibility=hidden but don't accept the GNU attribute for making
symbols public again -- we will hopefully receive bugs if any of those
exist.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Sun, 13 Jan 2013 20:34:27 +0000 (15:34 -0500)]
win32: visibility fixups
Add/remove visibility macros according to if symbols were previously
part of our public win32 API.
Ryan Lortie [Mon, 14 Jan 2013 03:57:27 +0000 (22:57 -0500)]
gio: hide another leaked symbol
guint g_menu_model_items_changed_signal leaked out. Tuck it back in.
Rico Tzschichholz [Sun, 13 Jan 2013 19:49:15 +0000 (20:49 +0100)]
gio: add some missing array annotations with their element-type
Rico Tzschichholz [Sun, 13 Jan 2013 19:05:17 +0000 (20:05 +0100)]
gio: add missing element-type annotation
Ryan Lortie [Thu, 6 Dec 2012 19:01:46 +0000 (14:01 -0500)]
gmarshal.h: replace "extern" with GLIB_AVAILABLE_IN_ALL
This was one of the few public header files that was properly declaring
functions as "extern". Switch it to use GLIB_AVAILABLE_IN_ALL instead.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Thu, 6 Dec 2012 19:03:22 +0000 (14:03 -0500)]
gbacktrace.c: special treatment for a weird symbol
We have a public symbol 'glib_on_error_halt' that is exported from
gbacktrace.c without appearing in a header, presumably with the
intention that people will be able to hit it from their debugger.
Mark it as GLIB_AVAILABLE_IN_ALL from inside the .c file...
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Thu, 6 Dec 2012 18:37:45 +0000 (13:37 -0500)]
Add a new _GLIB_EXTERN macro for "extern"
This macro simply evaluates the "extern" unless it has been explicitly
defined to something else.
All of the version macros (including the unversioned deprecation markers
and GLIB_AVAILABLE_IN_ALL) now include _GLIB_EXTERN as part of their
definition.
G_INLINE has also been modified to use _GLIB_EXTERN where appropriate.
This macro should never be used outside of the gmacros.h/gversonmacros.h
headers.
The effect of this patch is that "extern" has now been added to all
functions declared in installed headers. Strictly speaking, this is
something we should have had all along...
GLIB_VAR and GOBJECT_VAR have also been modified to use _GLIB_EXTERN on
non-Windows, instead of "extern" which they were using before. The
eventual goal is to use the normal version/deprecation macros on
exported variables and drop GLIB_VAR but we need to see how this will
work on Windows before we go ahead with that.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Sun, 13 Jan 2013 18:13:03 +0000 (13:13 -0500)]
add a missing AVAILABLE_IN_2_36 annotation
Ryan Lortie [Thu, 6 Dec 2012 19:04:59 +0000 (14:04 -0500)]
various: add GLIB_AVAILABLE_IN_ALL everywhere else
Add the GLIB_AVAILABLE_IN_ALL annotation to all old functions (that
haven't already been annotated with the GLIB_AVAILABLE_IN_* macros or a
deprecation macro).
If we discover in the future that we cannot use only one macro on
Windows, it will be an easy sed patch to fix that.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Thu, 6 Dec 2012 18:59:35 +0000 (13:59 -0500)]
gioenumtypes.h.template: use GLIB_AVAILABLE_IN_ALL
glib-mkenums is not currently clever enough to know which version an
enum type was added in, so just mark all the _get_type() functions as
available in all versions.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Ryan Lortie [Thu, 6 Dec 2012 18:34:55 +0000 (13:34 -0500)]
gversionmacros.h: add GLIB_AVAILABLE_IN_ALL
Add a macro to declare that a particular symbol is available in all
versions of GLib.
All newly-added symbols should have proper version macros (like
GLIB_AVAILABLE_IN_2_36) and this macro is less likely to get used 'by
accident' for those than one with a name like GLIB_EXTERN or
GLIB_PUBLIC.
https://bugzilla.gnome.org/show_bug.cgi?id=688681
Henrique Dante de Almeida [Sun, 13 Jan 2013 16:05:14 +0000 (14:05 -0200)]
Add G_GNUC_PRINTF on all functions with format strings
This allows compilation with clang without errors, even when
-Wformat-nonliteral is active (as long as there are no real cases of
non literal formatting).
https://bugzilla.gnome.org/show_bug.cgi?id=691608
Benjamin Otte [Sun, 13 Jan 2013 17:14:11 +0000 (18:14 +0100)]
API: Constify g_get_prgname()
Found by Mike Gorse while via pygobject freeing the value.
Should have been const according to original commit message.
Fran Diéguez [Sun, 13 Jan 2013 16:39:08 +0000 (17:39 +0100)]
Updated Galician translations
Henrique Dante de Almeida [Sun, 13 Jan 2013 14:58:12 +0000 (12:58 -0200)]
build: Ensure user-set CFLAGS override defaults
For example, the user should be able disable our default -Werror
settings.
https://bugzilla.gnome.org/show_bug.cgi?id=691608
Dan Winship [Sat, 12 Jan 2013 22:39:37 +0000 (17:39 -0500)]
GInputStream: fix default g_input_stream_skip_async() logic
g_input_stream_real_skip_async() wants to use read_async() normally,
but will use skip() in a thread instead if it sees that read_async()
will end up using threads. Except that the test for "will read_async()
use threads" never got updated to know about the GPollableInputStream
support in read_async(), so it was doing the wrong thing in that case.
Fix.
Also remove a small bit of pre-GTask cruft noticed nearby.
https://bugzilla.gnome.org/show_bug.cgi?id=691489
Matej Urbančič [Sun, 13 Jan 2013 11:02:42 +0000 (12:02 +0100)]
Updated Slovenian translation
Alexander Shopov [Sat, 12 Jan 2013 18:18:05 +0000 (20:18 +0200)]
Updated Bulgarian translation
Matthias Clasen [Sat, 12 Jan 2013 18:02:31 +0000 (13:02 -0500)]
Expand g_type_init release notes
This is in the light of
https://bugzilla.gnome.org/show_bug.cgi?id=691077
Colin Walters [Fri, 11 Jan 2013 16:10:15 +0000 (11:10 -0500)]
glocalfile: Only check for .hidden files if standard::is-hidden is requested
For OSTree, I use Gio and also really care about performance. It's
disturbing to see open('.hidden') all over my straces and such. At
the moment I have an explicit set of things to query, as opposed to
"standard::*", since even before this that also implies an lstat() of
the parent directory.
This matches up with what we do for all the other attributes.
See https://bugzilla.gnome.org/show_bug.cgi?id=587806
https://bugzilla.gnome.org/show_bug.cgi?id=691558
Colin Walters [Thu, 10 Jan 2013 21:25:15 +0000 (16:25 -0500)]
gio-querymodules: Ensure we're linked to GObject
Since we're dynamically loading objects, after the g_type_init()
change, we now need to ensure people building with --as-needed don't
lose the DT_NEEDED on libgobject.
https://bugzilla.gnome.org/show_bug.cgi?id=691077
Will Thompson [Thu, 10 Jan 2013 11:16:47 +0000 (11:16 +0000)]
G_IO_ERROR_INVALID_DATA: fix docstring typo
Antoine Jacoutot [Wed, 9 Jan 2013 15:29:29 +0000 (16:29 +0100)]
ipv6_v4mapped: force pass even if we don't speak IPv4
Some OS (e.g. OpenBSD) do not implement IP v4-mapped addresses. When
this is the case, then we get a "Connection refused", so force the test
to pass to that further tests can run.
https://bugzilla.gnome.org/show_bug.cgi?id=686058
Dan Winship [Wed, 9 Jan 2013 15:06:53 +0000 (10:06 -0500)]
glib-compile-resources: avoid warnings with -Wmissing-field-initializers
Initialize all the fields of the generated GStaticResource, to avoid
warnings in packages that build with -Wmissing-field-initializers.