Commit Graph

14843 Commits

Author SHA1 Message Date
Ross Burton
299ca6dc1e gio/tests: fix race when generating code
There is a race condition in the makefile that can result in build failures like this in parallel builds:

| ./gdbus-test-codegen-generated.h:7:0: error: unterminated #ifndef
|  #ifndef __GDBUS_TEST_CODEGEN_GENERATED_H__

This is because a rule like this:

x.c x.h: prerequisites
	@commands

doesn't consider x.c and x.h together. Instead, it expands to two rules, one to
generate x.c and one to generate x.h, which happen to run the same commands.  In
the worst case they execute in parallel, overwriting each other's output.

Signed-off-by: Ross Burton <ross.burton@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=723616
2014-02-17 10:21:31 +00:00
Olivier Crête
ed017994c9 subprocess: Init and clear the mutex
Fixes the leak of the GMutexImpl allocated inside the first call to g_mutex_lock()
on an uninitialized GMutex.

https://bugzilla.gnome.org/show_bug.cgi?id=724401
2014-02-16 19:59:44 -05:00
Paolo Borelli
a732f2966d Annotate g_application_add_main_option_entries 2014-02-16 22:06:11 +01:00
Dan Winship
8902276101 g_simple_async_result_is_valid: fix for NULL source tag
If a GSimpleAsyncResult has a NULL source tag, allow it to compare
valid to a non-NULL source tag in g_simple_async_result_is_valid(), to
simplify cases where, eg, g_simple_async_result_new() and
g_simple_async_result_report_error_in_idle() are both used.

https://bugzilla.gnome.org/show_bug.cgi?id=721458
2014-02-16 09:24:04 -05:00
Koop Mast
9c135707cb Fix the build on FreeBSD by replacing EAI_NODATA with EAI_NONAME.
https://bugzilla.gnome.org/show_bug.cgi?id=724434
2014-02-15 18:35:57 -05:00
Ryan Lortie
7cbff954b9 win32: fixup lib.exe invocation
We have a configure.ac check for lib.exe that attempts to enable
creation of .lib files for our 5 public libraries.  That has been broken
for a long time for two reasons:

 1) the Makefiles hardcode 'lib' instead of 'lib.exe'

 2) we dropped generation of .def files quite some time ago (except for
    in gthread where we have the two-symbol file under version control)

Add new rules for creating .def files from dumpbin.exe (which you should
have if you have lib.exe) and fix the .lib rules to use lib.exe.

Add a bit of $(AM_V_GEN) all around, as well.

https://bugzilla.gnome.org/show_bug.cgi?id=722033
2014-02-15 16:55:25 -05:00
Ryan Lortie
08533cae05 only '#pragma GCC' outside of functions
Don't use #pragma GCC inside of function scope.

https://bugzilla.gnome.org/show_bug.cgi?id=724417
2014-02-15 10:31:52 -05:00
Dan Winship
5575a3e9cb gio: don't accept nonstandard IPv4 "numbers-and-dots" addresses
In addition to the standard "192.168.1.1" format, there are numerous
legacy IPv4 address formats (such as "192.168.257",
"0xc0.0xa8.0x01.0x01", "0300.0250.0001.0001", "3232235777", and
"0xc0a80101"). However, none of these forms are ever used any more
except in phishing attempts. GLib wasn't supposed to be accepting
these addresses (neither g_hostname_is_ip_address() nor
g_inet_address_new_from_string() recognizes them), but getaddrinfo()
accepts them, and so the parts of gio that use getaddrinfo()
accidentally did accept those formats.

Fix GNetworkAddress and GResolver to reject these address formats.

https://bugzilla.gnome.org/show_bug.cgi?id=679957
2014-02-15 10:22:24 -05:00
Dan Winship
5cab3fcec1 gobject: re-allow finalization from constructor()
Although returning NULL from constructor is strongly discouraged, some
old libraries need to keep doing it for ABI-compatibility reasons.
Given this, it's rude to forbid finalization from within
constructor(), since it would otherwise work correctly now anyway (and
the critical when returning NULL should discourage any new uses of
returning NULL from constructor()).

https://bugzilla.gnome.org/show_bug.cgi?id=661576
2014-02-15 10:20:53 -05:00
Dan Winship
074df39681 Fix g_socket_get_available() with TCP on Windows
Windows needs a special inefficient hack to implement
g_socket_get_available() correctly for UDP sockets, but that hack
isn't needed for TCP, and in fact, might give the wrong answer in that
case. Fix it to only use the hack with UDP.

Also, fix that case to handle non-blocking sockets as well.

And add a test case for g_socket_get_available() with TCP.

https://bugzilla.gnome.org/show_bug.cgi?id=723422
2014-02-15 10:06:04 -05:00
Matthias Clasen
d690b3dcd0 docs: Remove a few trailing <literal>s 2014-02-14 21:49:42 -05:00
Matthias Clasen
bcab7ba002 docs: Remove some unneeded decorations
@var is not expanded inside literal `` blocks.
Just remove those @ characters.
2014-02-14 21:39:11 -05:00
Matthias Clasen
bc6ee788b4 docs: let go of &ast;
Since we are no longer using sgml mode, using /&ast; &ast;/ to
escape block comments inside examples does not work anymore.
Switch to using line comments with //
2014-02-14 21:33:36 -05:00
Ryan Lortie
450e7b1036 configure.ac: tweak inotify check
Our check for inotify_init1() being defined is broken.  We happily
declare that inotify is supported, even if the check fails.

This was originally intended to check for inotify_init1 in the libc so
that we could fall back to inotify_init if it was not yet defined.

FreeBSD has a libinotify that emulates the inotify API via kqueue.  It
installs a <sys/inotify.h> header and requires linking to -linotify.  We
don't want to falsely detect working inotify in this case.

Treat the lack of inotify_init1() in the libc as a lack of inotify
support.  This requires only a new libc -- we still support old kernels:
in the case that inotify1_init() fails, we fall back to inotify_init().

https://bugzilla.gnome.org/show_bug.cgi?id=724330
2014-02-14 10:42:40 -05:00
Dan Winship
db83b8ac4c gtask: fix trivial doc typo 2014-02-13 12:59:29 -05:00
Simon McVittie
0f5577de57 g_test_run: return 0 if all tests are skipped in TAP mode
Exit status 77 is special to Automake's default test driver, but is
treated as an error by TAP.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=724124
Reviewed-by: Dan Winship <danw>
2014-02-13 14:31:27 +00:00
Simon McVittie
ffa5fab09a glib/tests/collate.c: run to completion when skipping all tests
Otherwise, we don't produce valid TAP output, and fail with:

    ERROR: collate - missing test plan

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=724124
Reviewed-by: Dan Winship <danw>
2014-02-13 14:31:09 +00:00
Philip Withnall
169846c5ab gsocketconnection: Document closing connections with g_io_stream_close()
It’s not enough to close a connection by calling g_input_stream_close()
and g_output_stream_close() on its two substreams: to close the
underlying socket, one must use g_io_stream_close(). Document that.

https://bugzilla.gnome.org/show_bug.cgi?id=724278
2014-02-13 14:09:48 +00:00
Dan Winship
0017728c8c gsocketservice: Clarify g_socket_service_stop() documentation
https://bugzilla.gnome.org/show_bug.cgi?id=724233
2014-02-13 08:30:59 -05:00
Simon McVittie
125913e9fe g_child_watch_source_new: POSIX pid must be positive
If we used a non-positive pid, we'd call waitpid(that_pid, ...)
which is exactly the situation this function can't deal with.

On Windows, GPid is a HANDLE (pointer), so I don't think the same thing
applies.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=723743
Reviewed-by: Ryan Lortie
2014-02-11 15:02:16 +00:00
Simon McVittie
a3cb5ce33b Be more clear that g_return_if_fail is undefined behaviour
In particular, it is not incorrect to g_return_if_fail (..., FALSE)
in a function returning a "success" gboolean and a GError: "failure to
meet the preconditions is an error" takes precedence over the
GError documentation's guarantee that the error will be set on failure.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=660809
Reviewed-by: Emmanuele Bassi
2014-02-11 15:01:58 +00:00
Emmanuele Bassi
f5e60984af po/nb.po: Fix mismatched translation
Missing '\n' at the end of the string broke building under CI.
2014-02-10 15:48:17 +00:00
Kjartan Maraas
bf25c451f5 Updated Norwegian bokmål translation 2014-02-10 16:17:06 +01:00
Andika Triwidada
87a7b7763b Updated Indonesian translation 2014-02-10 14:55:59 +00:00
Philip Withnall
d173d97c9b gsubprocess: Fix ‘Since’ lines in documentation to read 2.40
GSubprocess was introduced in GLib 2.40, not 2.36.

https://bugzilla.gnome.org/show_bug.cgi?id=724001
2014-02-10 08:50:36 +00:00
Philip Withnall
24536dd030 gsubprocess: Fix a broken link in the documentation
https://bugzilla.gnome.org/show_bug.cgi?id=724001
2014-02-10 08:22:30 +00:00
Kjartan Maraas
28b1d39058 Updated Norwegian bokmål translation 2014-02-10 08:15:00 +01:00
Milo Casagrande
ada09a7b62 [l10n] Updated Italian translation. 2014-02-09 12:21:34 +01:00
Matthias Clasen
c158a9cdcb Fix a misformatting in GVariant docs
The + at the beginning of the line was misinterpreted
as markdown for a list.
2014-02-09 02:12:53 -05:00
Matthias Clasen
35066ed6c6 Docs: Drop entities, switch away from sgml mode
Since all element markup is now gone from the doc comments,
we can turn off the gtk-doc sgml mode, which means that from
now on, docbook markup is no longer allowed in doc comments.

To make this possible, we have to replace all remaining
entities in doc comments by their replacement text, &amp; -> &
and so on.
2014-02-09 02:07:26 -05:00
Matthias Clasen
a03cee3b27 Convert remaining examples to links 2014-02-08 17:52:21 -05:00
Matthias Clasen
623b58eeac REmove another table 2014-02-08 15:59:24 -05:00
Matthias Clasen
5acd7b01de Remove some informalexamples 2014-02-08 15:50:17 -05:00
Matthias Clasen
a59e3d69b4 Another stray <programlisting> 2014-02-08 15:34:04 -05:00
Matthias Clasen
d5e5244c30 Another stray litreal 2014-02-08 15:28:34 -05:00
Matthias Clasen
c4991d24ee Strip out a remaining programlisting 2014-02-08 15:19:24 -05:00
Matthias Clasen
cd5cd874f0 Convert another table to a list 2014-02-08 15:18:37 -05:00
Matthias Clasen
3d0e55dfd5 Convert more xincluded examples to external links 2014-02-08 15:18:06 -05:00
Matthias Clasen
ebc4347b2c Docs: Remove an example tag that has snuck back in 2014-02-08 13:55:27 -05:00
Matthias Clasen
03b21a19ec Docs: convert another table to a list 2014-02-08 13:47:02 -05:00
Matthias Clasen
38b1d63b24 Convert GVariantType table to a list 2014-02-08 13:43:16 -05:00
Matthias Clasen
f04dbac47d Remove a new literal tag that has crept in 2014-02-08 13:28:11 -05:00
Matthias Clasen
c43e0c34b0 Remove a few leftover <simplelist>s 2014-02-08 13:25:04 -05:00
Matthias Clasen
3ad5aadb40 Remove a stray <em> tag 2014-02-08 13:22:58 -05:00
Matthias Clasen
e16f053aa7 Remove tables from GFileAttribute docs 2014-02-08 13:22:38 -05:00
Matthias Clasen
e7fd3de86d Eradicate links and xrefs
These are all replaced by markdown ref links.
2014-02-08 12:26:56 -05:00
Daniel Mustieles
1448e619b5 Updated Spanish translation 2014-02-07 14:47:16 +01:00
Fran Diéguez
6129f2b9e3 Updated Galician translations 2014-02-07 01:27:18 +01:00
Matthias Clasen
63777d0c63 Remove a few overlooked literals 2014-02-06 16:59:49 -05:00
Matthias Clasen
df990914cf Stop using replaceable tags 2014-02-06 16:49:29 -05:00