Commit Graph

14096 Commits

Author SHA1 Message Date
Chun-wei Fan
2ff85ca47c Fix typo in last commit
The gio.vcxprojin and glib.vcxprojin were including .vsprops property
sheets, but it should have been .props instead.
2013-08-21 17:54:32 +08:00
Chun-wei Fan
113793a442 MSVC 2010 Project Files: Split up the Property Sheets
Like the Visual Studio 2008 project files, split up the property sheets
so to ease maintenace, and to prepare to use autotools to fill in the
header entries to "install".

Put some of the items that are frequently repeated in the projects as well,
also to simplify maintenance.

Also, update the autotools files to automate the upgrade of Visual Studio
2010 project as we now have multiple property sheets to copy and process.
2013-08-21 16:57:11 +08:00
Chun-wei Fan
3c4ee831f7 MSVC 2008 Projects: Split the Property Sheets
Split the property sheet into four sheets, to make maintainance of the
build files easier, and also to prepare for using autotools to fill in
the parts for the "installation" of headers.

Also put more of the items that are repeated in the projects into the
property sheets, also to improve ease of maintenance.

Updates to the Visual Studio 2010 projects will come later, as the script
to update them to Visual Studio 2012 must also be taken into account during'
the process.
2013-08-21 16:05:47 +08:00
Chun-wei Fan
716ec71ece GLib MSVC Projects: Consolidate PCRE items
Move the definitions of macros used to build PCRE that ships with GLib into
the property sheets, so that it can be easier to maintain
2013-08-21 13:55:52 +08:00
Chun-wei Fan
18f498c3fa GIO MSVC Projects: Drop Unneeded Defines
GIO_MODULE_DIR is dynamically constructed on Windows, so we don't really
need to define it here.
2013-08-21 13:34:42 +08:00
Chun-wei Fan
7145f06941 GIO MSVC Project: Link to iphlpapi.lib
This is needed for GetAdaptersAddresses()[1], which was used to implement
if_nametoindex on Windows, notably on Windows XP, in commit 01156b12.

if_nametoindex and if_indextoname, as noted in config.h.win32(.in), is
available with Windows Vista and later, so when we eventually drop
support for Windows XP, we can call them directly, and these functions
also reside in the same iphlpapi.lib

[1]: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365915%28v=vs.85%29.aspx
2013-08-21 11:16:19 +08:00
Chun-wei Fan
e05abaed04 Update config.h.win32.in
Make entries more in sync with the items checked with autotools, and
provide a MinGW declaration for _GLIB_EXTERN, taken from configure.ac.
2013-08-21 11:04:37 +08:00
Piotr Drąg
dacc0ad2d1 Updated Polish translation 2013-08-20 23:29:38 +02:00
Piotr Drąg
130aaddd20 Updated Polish translation 2013-08-20 20:33:47 +02:00
Matthias Clasen
a4363582b0 post-release bump 2013-08-19 23:54:43 -04:00
Matthias Clasen
c512d16570 2.37.6 2013-08-19 23:31:53 -04:00
Matthias Clasen
739874c5da Set up test environment properly
To make the G_TEST_SRCDIR and G_TEST_BUILDDIR variables
reach our test binaries, we have to add it to the
TESTS_ENVIRONMENT variable.
2013-08-19 23:29:54 -04:00
Matthias Clasen
820406931b Dist tap-test script
Otherwise it won't be around when make distcheck is looking
for it.
2013-08-19 22:32:21 -04:00
Matthias Clasen
49cf439ce7 Fix make check
The glib/tests contained some tests for gtester. Now that
we're not including glib.mk anymore, we have to define
GTESTER ourselves.
2013-08-19 20:57:44 -04:00
Sebastian Dröge
01156b122c GSocket – Implement multicast interface selection on Windows
https://bugzilla.gnome.org/show_bug.cgi?id=697185
2013-08-19 12:28:20 -04:00
Dan Winship
c069c51db5 gnetworkaddress: allow IPv6 scope ids in URIs
GNetworkAddress was allowing IPv6 scope ids in g_network_address_new()
/ g_network_address_parse(), but not in g_network_address_parse_uri().
Fix that.

Part of https://bugzilla.gnome.org/show_bug.cgi?id=669724
2013-08-19 12:15:36 -04:00
Dan Winship
e1f92431c1 gnetworkaddress: fix parsing of URIs with IPv6 literal and port
Addresses like "http://[::1]:8080/" were being parsed as though they
did not include a port. Fix that, and add some more parsing tests.
2013-08-19 12:15:36 -04:00
Matthias Clasen
635196b1ff Expand docs for thread names
Thread names may be NULL, and don't have to be unique.
The docs should tell you that.
2013-08-18 18:13:02 -04:00
Milo Casagrande
3c040f8534 [l10n] Updated Italian translation. 2013-08-18 14:29:29 +02:00
William Jon McCann
b0e6a38d95 Remove legacy icon name support
https://bugzilla.gnome.org/show_bug.cgi?id=684327
2013-08-17 21:53:33 -04:00
Matej Urbančič
6ed46cd2a4 Updated Slovenian translation 2013-08-18 01:59:54 +02:00
Matthias Clasen
0e9f9867fa Start using TAP
Convert {glib,gobject,gio}/tests to use the automake TAP driver
and test harness instead of gtester. To do so, we add a glib-tap.mk
that provides the same interface as glib.mk, except for the
reporting and coverage testing functionality. Eventually, we may
want to replace glib.mk with it. I've not yet converted the
toplevel tests/ directory, since it mixes gtestutils tests with
other binaries.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:58 -04:00
Matthias Clasen
1ea3405297 Update the documentation for assertion macros
The assertion macros that are part of gtestutils (but not
g_assert) can now be made non-fatal. Update the documentation
to reflect that.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:58 -04:00
Matthias Clasen
a6a8750687 Add a way to make assertions non-fatal
When using test harnesses other than gtester (e.g. using TAP),
it can be suboptimal to have the very first failed assertion
abort the test suite.

This commit adds a g_test_set_nonfatal_assertions() that can
be called in a test binary to change the behaviour of most
assert macros to just call g_test_fail() and continue. We
don't change the behavior of g_assert() and g_assert_not_reached(),
since these to assertion macros are older than GTest, are
widely used outside of testsuites, and will cause compiler
warnings if they loose their noreturn annotation.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:57 -04:00
Matthias Clasen
b63739e60e Add g_assert_true, g_assert_false and g_assert_null
These are just like g_assert(), but using a different entry
point for the message, so we can repurpose them together
with the other assertion macros.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:57 -04:00
Matthias Clasen
a32c9c7e9c Make g_assert and g_assert_not_reached use the same entry point
These two assertion macros are commonly used outside tests,
so we can't repurpose them, as we are going to do with the
other assertion macros in the following commits. This
change is in preparation for that.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:57 -04:00
Matthias Clasen
19aafc4ca4 Support TAP as an output format
Initial support for the Test Anything Protocol for
GTest output. Use the --tap option to get TAP output.
More information about TAP can be found e.g. here:
http://en.wikipedia.org/wiki/Test_Anything_Protocol

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:57 -04:00
Matthias Clasen
69582bf635 Add a function to check test status from the inside
The new g_test_failed() function can be used to find
out if a currently running testcase is already marked
as failed.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:57 -04:00
Matthias Clasen
88eaefb9d5 Add functions to mark tests as skipped or incomplete
We also expand the GTestResult enumeration to include
values for skipped and incomplete tests, and pass that
on when logging a test result.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:56 -04:00
Matthias Clasen
4e6d25f005 Add a GTestResult enumeration
This enumeration will be expanded to introduce more results
in the following commits.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:56 -04:00
Matthias Clasen
8253f98a18 Add start/stop suite log messages
These will be used in the following commits, when
implementing support for TAP as an alternative
test driver protocol.

https://bugzilla.gnome.org/show_bug.cgi?id=692125
2013-08-17 17:25:56 -04:00
Matthias Clasen
de9cf58f65 GApplication: Stop using deprecated api 2013-08-17 17:25:56 -04:00
Matthias Clasen
18accd43f7 Quell a few compiler warnings 2013-08-17 17:25:56 -04:00
Matthias Clasen
5cd169810e Take out an unused line from gdatetime tests
This line was apparently causing build problems on Win64,
and since the only test involving the t_str variable was
already commented out, lets just take this out altogether.

https://bugzilla.gnome.org/show_bug.cgi?id=696970
2013-08-17 13:45:34 -04:00
Stef Walter
409a6db349 Mark up warnings/critical functions for clang analyzer
The clang code analyzer needs to know that functions like g_error
g_critical an g_return_if_fail should be seen by the analyzer in the
same way as g_assert(). That is the analyzer should think they are
fatal.

https://bugzilla.gnome.org/show_bug.cgi?id=700268
2013-08-17 13:40:06 -04:00
Dan Winship
547df5937c GSocket: fix g_socket_bind() allow_reuse semantics
With UDP sockets, g_socket_bind() with allow_reuse=TRUE on Linux
behaved in a way that the documentation didn't suggest, and that
didn't match other OSes. (Specifically, it allowed binding multiple
multicast sockets to the same address.)

Since this behavior is useful, and since allow_reuse didn't have any
other meaning with UDP sockets, update the docs to reflect the Linux
behavior, and make it do the same thing on non-Linux.

https://bugzilla.gnome.org/show_bug.cgi?id=689245
2013-08-17 13:26:42 -04:00
Dan Winship
2ea4af6f01 GSocket: fix broadcast documentation
The :broadcast property only affects sending broadcast packets, not
receiving them.
2013-08-17 13:26:42 -04:00
Robert Ancell
3784927764 Add G_SPAWN_DEFAULT to GSpawnFlags
This is convenient for language bindings, and also makes
invocations of g_spawn functions in C more readable.

https://bugzilla.gnome.org/show_bug.cgi?id=701318
2013-08-17 13:02:25 -04:00
Matthias Clasen
8b3d779d1e Make g_date_time_new check its arguments
The documentation for this function explicitly gives valid
ranges for the arguments and states that out-of-range arguments
will cause NULL to be returned. Only, the code didn't check
the ranges, and crashed instead. Fix that and add a testcase
for invalid arguments. It turns out that the test_z testcase
was providing invalid arguments and relied on g_date_time_new
to return a non-NULL value anyway, so this commit fixes that
testcase as well.

https://bugzilla.gnome.org/show_bug.cgi?id=702674
2013-08-17 12:35:33 -04:00
Ryan Lortie
e70250bbd5 Export __glib_assert_msg
Put __glib_assert_msg in the dynamic symbol table, but not in any public
headers.

This variable is _not_ part of our API but this way debuggers and
automated crash report utilities will be able to access this variable,
even if debug symbols are not available.

https://bugzilla.gnome.org/show_bug.cgi?id=701800
2013-08-17 12:10:23 -04:00
Dan Winship
f550c0dc9d update .gitignores 2013-08-17 10:35:13 -04:00
Dan Winship
fd5b1939bd build: fix dtrace-related warnings
Fix the warnings when compiling and linking the probes files by
calling dtrace with all the -W flags removed from CFLAGS (since dtrace
generates bad C code), and with CC set to "libtool --mode=compile ..."
(so that it will output a proper .lo file and libtool won't warn when
linking it into the .la).

https://bugzilla.gnome.org/show_bug.cgi?id=693335
2013-08-17 10:34:32 -04:00
Dan Winship
5415537edb glib/tests/gdatetime: use UTC time in test_GDateTime_diff()
test_GDateTime_diff() checks that the span from 2009-01-01 to
2010-01-01 is exactly 365 * G_TIME_SPAN_DAY, but it does this using
local time, and so fails if you are in a timezone that is in the
southern hemisphere which only did DST during one of 2008-2009 and
2009-2010 (in which case the year will end up being one hour too long
or too short).

Switch the diff tests to use UTC time instead; there are plenty of
other local time tests already.

https://bugzilla.gnome.org/show_bug.cgi?id=701529
2013-08-17 10:25:26 -04:00
Wouter Bolsterlee
74a5e92076 Updated Dutch translation 2013-08-17 14:58:12 +02:00
Daiki Ueno
a7f2765dba codegen: Treat input file as binary
Under C locale, open() in Python 3 sets the file encoding to ASCII.
As expat looks at encoding="..." in XML declaration, gdbus-codegen can
simply open the input file as binary and let expat decode the content.

https://bugzilla.gnome.org/show_bug.cgi?id=696633
2013-08-17 06:42:02 +02:00
Chun-wei Fan
1e945933d4 config.h.win32.in: Drop unneeded item
...We no longer have the iconv cache code around.
2013-08-16 10:35:19 +08:00
Chun-wei Fan
2ab9e54477 Update config.h.win32.in
Make its entries match the items that are being checked by the autotools
builds in config.h.in.
2013-08-16 10:29:41 +08:00
Colin Walters
4cea6625cb giochannel: Add an out annotation for g_io_channel_read_unichar()
Since it's an output variable.

https://bugzilla.gnome.org/show_bug.cgi?id=704165
2013-08-15 19:45:34 -04:00
Dan Winship
a93d373812 gio/tests/task: fix a race condition in test_run_in_thread()
When running a task in a thread, GTask may still be internally holding
a ref on the task in that thread even after the callback is called in
the original thread (depending on thread scheduling). Fix the test to
handle that by using a weak notify that signals a GCond, and wait for
that GCond from the main thread. (And add a corresponding check to
test_return_on_cancel().)

https://bugzilla.gnome.org/show_bug.cgi?id=705152
2013-08-15 12:43:57 -04:00
Nick Schermer
4b334ef8f1 gobject: Handle ref_count==0 in notify_by_pspec
Just like g_object_notify, check for a zero ref_count in
g_object_notify_by_pspec and leave if it is 0.

This allows using functions in ->finalize() that possibly also
notify a property change on the object.  Previously,
this resulted in an error from g_object_ref.

https://bugzilla.gnome.org/show_bug.cgi?id=705570
2013-08-14 18:11:05 +01:00