Commit Graph

12997 Commits

Author SHA1 Message Date
Simon McVittie
837db1a026 Fix more warning-addition fallout
I'm normally a big fan of small atomic commits, but I also want to get
things done this afternoon...

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
2012-11-02 16:27:19 +00:00
Simon McVittie
733acc2316 Fix more void prototypes in tests
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
2012-11-02 16:14:11 +00:00
Simon McVittie
eb7dc2bcc6 Predeclare more things in tests
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
2012-11-02 16:14:09 +00:00
Simon McVittie
85976cf91d Bring back a couple of private-but-extern symbols
These both existed in 2.34.1, but are not exposed in headers, and were
meant to be private. Making them static (in commit 84475e43) was
technically an ABI break, and in particular it causes abicheck.sh to fail.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687441
Reviewed-by: Colin Walters <walters@verbum.org>
2012-11-02 16:13:57 +00:00
Dan Winship
7b1f8c582a gtask: bump the max thread pool size up to 100 to avoid stalls/deadlocks
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686810 for now.
https://bugzilla.gnome.org/show_bug.cgi?id=687223 discusses a nicer
fix for later.
2012-11-02 10:19:06 -04:00
Simon McVittie
1afaea333b Use the FreeBSD credentials-passing code on Debian GNU/kFreeBSD
The __FreeBSD__ macro means we have both a FreeBSD kernel and FreeBSD
libc, which isn't the case on GNU/kFreeBSD (GNU libc and userland on
the FreeBSD kernel), so it predefines a different macro. The kernel
is what actually matters for credentials-passing, though.

Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Tested-by: Steven Chamberlain <steven@pyro.eu.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=649302
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581750
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=631968
Reviewed-by: Dan Winship <danw@gnome.org>
2012-11-02 13:55:40 +00:00
Colin Walters
ce0022933c Merge waitpid() from g_spawn_sync into gmain()
This is preparatory work for a future commit which will add a
"catchall" waitpid API.  If we don't synchronize here with the worker
thread, race conditions are possible.

This also ensures we have an error message if someone adds a child
watch for a nonexistent pid, etc.  Previously, we'd simply keep
calling waitpid() getting ECHILD, and ignoring it until the source was
removed. Now, we g_warning() and fire the source.

Thirdly, this ensures that the waitpid() call in gmain handles EINTR,
like the g_spawn_sync() one did.

https://bugzilla.gnome.org/show_bug.cgi?id=687061
2012-11-02 09:19:13 -04:00
Tim-Philipp Müller
0bdf7fecaf tests: fix compiler warning in gvariant test
gvariant.c:3555:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
2012-11-02 13:14:58 +00:00
Colin Walters
28b30caecb configure: Enable set of standard -Werror=foo flags
We're not going to depend on gnome-common (I assume) so this patch
nicks the systemd macro to test for compiler flags, and uses it to set
a similar set of -Werror=foo as the gnome-common one does.

See https://bugzilla.gnome.org/show_bug.cgi?id=608953
See https://mail.gnome.org/archives/desktop-devel-list/2012-July/msg00100.html

If we're going to be setting more strict compiler flags for GNOME, we
should really ensure GLib builds with them first, as it's kind of the
model citizen.

In particular, you can see several times that downstreams such as
Debian have come in and fixed -Wformat-security bugs.  We should never
let those get into tarballs, or even commits.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:52 -04:00
Colin Walters
055aa2b55e gdateparser: Delete unused debug print function
https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:52 -04:00
Colin Walters
94ef8dff0d gdbusactiongroup: Add prototype for g_dbus_action_group_sync()
Even private functions that are actually called across compilation
units should have prototypes.  For g_dbus_action_group_sync(), create
one in gdbusactiongroup-private.h

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:52 -04:00
Colin Walters
dc4922af21 test-pipe-unix: Add missing include
Fixes the build with -Werror=missing-prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:52 -04:00
Colin Walters
3686aa0e18 gettext: Add missing include
Fixes the build with -Werror=missing-prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:52 -04:00
Colin Walters
4c2a659588 gcharset: Add header file for private API
This fixes the build with -Werror=missing-prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:52 -04:00
Colin Walters
488cdb13f6 gslice: Prototype G_ENABLE_DEBUG function that's part of ABI
Sadly, g_slice_debug_tree_statistics is conditionally part of the
public ABI.  We might as well make it conditionally part of the API as
well, even though this will require people actually using it to

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:51 -04:00
Colin Walters
bd8387f25a g_check_setuid: Include glib-private.h
Otherwise we fail to build with -Werror=missing-prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-02 09:03:35 -04:00
Colin Walters
139892734e tests/1bitmutex: Hack to build with -Werror=missing-prototypes
Admittedly, this could probably be better, but it builds.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-01 20:12:02 -04:00
Colin Walters
8e59d8602c Use (void) for no parameters, not ()
This ensures we build with -Werror=missing-parameter-type.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-01 20:12:02 -04:00
Colin Walters
84475e4320 build: Prototype GType accessors for private classes
Otherwise we fail to build with -Werror=missing-prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-01 20:12:02 -04:00
Colin Walters
6d88a2f822 build: Add missing "static" keyword where it should be used
Otherwise we fail to build with -Werror=missing-prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-01 20:12:01 -04:00
Colin Walters
f6da43f56c build: Ensure we #include header files for glib-genmarshal code
Otherwise we fail with -Werror=missing-prototypes.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-01 20:12:01 -04:00
Colin Walters
67466b41af build: Don't use C99 declarations
Since GLib needs to compile with MSVC, we can't use them.  This fixes
compilation when using -Werror=declaration-after-statement.

https://bugzilla.gnome.org/show_bug.cgi?id=687385
2012-11-01 20:12:01 -04:00
Robert Ancell
59a24ab5a3 Use "Returns:" instead of the invalid "@returns" for annotating return values.
https://bugzilla.gnome.org/show_bug.cgi?id=673229
2012-11-01 14:47:25 +13:00
Colin Walters
4447d5ce11 tests/signals: Disable large enumeration value test that is failing on PPC64
Basically due to a combination of va_args semantics around
signed/unsigned ints, this test case fails on ppc64.  At the moment,
we have as yet to find any real-world consumer with such a large
enumeration value.

Unfortunately, the possible fixes for this are extremely invasive;
we would have to define a new enum API.

Given both of these facts, we believe it makes the most sense at the
current time to simply not test this. If we at a later time determine
there is such a real-world consumer, we can look at doing the
necessary fixes.

https://bugzilla.gnome.org/show_bug.cgi?id=686662
2012-10-31 17:45:21 -04:00
Rico Tzschichholz
531be87f24 po: Fix Makefile.in.in syntax
Introduced by cff536c99e
2012-10-31 13:14:06 +01:00
Will Thompson
a773a615b6 GNetworkMonitor: add missing apostrophe to docstring 2012-10-30 17:17:23 +00:00
Vincent Untz
529bf6bd89 Add annotations for g_filename_from_uri()
https://bugzilla.gnome.org/show_bug.cgi?id=672924
2012-10-30 09:27:20 -04:00
Aleksander Morgado
0d22609fe9 gmessages: fix minor typo in documentation 2012-10-30 13:15:23 +01:00
Sweta Kothari
15a21bd3cd Updated gujarati file 2012-10-30 16:22:14 +05:30
Ryan Lortie
311e18abdd gthread-posix: always use atomic pointer ops
On platforms where dependent loads can be reordered (alpha) and we have
exotic implementation of pthread_mutex_lock() it could be possible that
our implementation of g_mutex_lock() is unsafe.

Always use atomic operations to avoid this possibility.

https://bugzilla.gnome.org/show_bug.cgi?id=686191
2012-10-29 16:18:10 +01:00
Ryan Lortie
f20ae7fcfd g_dbus_connection_export_menu_model(): fix a crash
Add some extra protection when 'preparing' a group that doesn't yet
contain any menus.  This can happen if you subscribe to a group that
doesn't yet exist.

It was possible to crash any application using
g_dbus_connection_export_menu_model() by requesting a non-existent
subscription group over the bus.

In practice this only happened in races -- where the proxy sees a group
that exists and queries it, but by the time it does, it's already gone.

https://bugzilla.gnome.org/show_bug.cgi?id=687089
2012-10-29 16:18:10 +01:00
Paul Eggert
00f4c12bf9 gmain: Document constraints on waitpid
Applications that use glib should not invoke waitpid with a first
argument that is nonpositive, because when such a waitpid is run in
one thread and glib waits for a subprocess in another, there is a race
condition, and the former waitpid can reap a process that was intended
for the latter.  Mention this in the documentation for
g_child_watch_source_new, and in the diagnostic generated by
g_spawn_sync when its waitpid fails with errno equal to ECHILD.

Signed-off-by: Colin Walters <walters@verbum.org>

http://bugzilla.gnome.org/show_bug.cgi?id=687075
2012-10-29 10:19:20 -04:00
Colin Walters
cff536c99e mkinstalldirs: Delete from version control
This is installed by automake.  By maintaining it in git, we create
merge conflicts as people build with different versions of automake.

Just use 'mkdir -p' instead in gettext.  Should be portable enough.

https://bugzilla.gnome.org/show_bug.cgi?id=686839
2012-10-29 09:39:36 -04:00
Colin Walters
d04ac162c1 README.in: Note undefined behavior with new g_type_init() -> ctor change
https://bugzilla.gnome.org/show_bug.cgi?id=686822
2012-10-27 12:29:02 -04:00
Rico Tzschichholz
8911cee350 gio/tests: Fix build with -Werror=format-security 2012-10-27 12:12:29 +02:00
Rico Tzschichholz
fa523734c7 gio/tests: Fix linker failure
Fixes 8c320d0c34
2012-10-27 12:10:44 +02:00
Stef Walter
d68b4e1d02 gio: No need to specify SOURCES when name matches executable
Removes some of the duplication from Makefile.am

https://bugzilla.gnome.org/show_bug.cgi?id=686921
2012-10-26 21:25:55 +02:00
Stef Walter
8c320d0c34 gio: Remove LDADD repetition from gio/tests Makefile
Using a global LDADD for the basic libraries to link.

https://bugzilla.gnome.org/show_bug.cgi?id=686921
2012-10-26 21:25:55 +02:00
Stef Walter
fb2d3aacb5 gdbus: Allow GDBusObjectManagerClient to work on peer connections
Allow GDBusObjectManagerClient to work on peer to peer DBus
connections. Don't require that a unique bus name is available
for the object manager, if the owned bus name is NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=686920
2012-10-26 21:20:04 +02:00
Matthew Barnes
7db2ac7b88 Fix typo in G_TEST_DBUS. 2012-10-26 13:20:29 -04:00
Cosimo Cecchi
d681b581ff file-info: catch thumbnail files in large directory as well
When building the file attribute table info for local files, use
thumbnail paths in $XDG_CACHE_DIR/thumbnails/large in addition to
$XDG_CACHE_DIR/thumbnails/normal.

Failing to do this would cause an application that creates large
thumbnails by default to never find any value for
G_FILE_ATTRIBUTE_THUMBNAIL_PATH, with no
G_FILE_ATTRIBUTE_THUMBNAILING_FAILED set, which might cause the
application to either think thumbnailing is still in progress, or
blindly requeue thumbnail operations in a loop.

Large thumbnails are generally preferred, so we now default to the path
of a large thumbnail (in case both are present).

https://bugzilla.gnome.org/show_bug.cgi?id=686895
2012-10-26 10:48:09 -04:00
Colin Walters
36bf25371c g_unix_signal_source_new: Allow SIGUSR1 and SIGUSR2
These are user defined, it makes sense to allow watching them.  This
is needed to port gnome-session and gdm over.

https://bugzilla.gnome.org/show_bug.cgi?id=686898
2012-10-26 09:28:01 -04:00
Martin Pitt
1775c46e7a GIOChannel: Add missing annotations
The various read and write methods have several out arguments which were not
previously marked as such. Also, as GIOChannel supports binary data with a NULL
encoding, the buffers need to be uint8 arrays instead of utf8 strings.
2012-10-25 14:55:30 +02:00
Martin Pitt
a5c5730085 Revert "Box GPollFD to make it introspectable"
This reverts commit 932f4250b8.

This got pushed accidentally and has not been accepted yet. It's also not clear
whether we want this in the first place.

https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-10-25 11:27:39 +02:00
Martin Pitt
932f4250b8 Box GPollFD to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-10-25 07:58:09 +02:00
Martin Pitt
c3f52eae0e GIOChannel: Add missing (allow-none) annotations
g_io_channel_set_line_term() and g_io_channel_set_encoding() can get NULL
arguments, mark them as such.
2012-10-25 07:52:43 +02:00
Colin Walters
4fb2d737ac gvariant: Make g_variant_new_from_bytes() public
Now that GBytes has been made public, we should make
g_variant_new_from_bytes() public too.

Add g_variant_get_data_as_bytes() to match.

https://bugzilla.gnome.org/show_bug.cgi?id=677062
2012-10-23 16:25:49 +02:00
Ryan Lortie
7d17fd6f61 Release GLib 2.35.1 2012-10-22 22:20:47 +02:00
Murray Cumming
05756f8418 Fix this cost -> the cost typos 2012-10-21 13:08:01 +02:00
Matej Urbančič
c2a2c4a00b Updated Slovenian translation 2012-10-20 00:14:37 +02:00