Commit Graph

13200 Commits

Author SHA1 Message Date
Simon McVittie
8f65536504 GCredentials: add getter/setter for the Unix process ID
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=687920
2012-12-19 15:08:09 -05:00
Dan Winship
602714a8da tests/spawn-*.c: fix on Windows
Need to append ".exe" to the spawned binary name on Windows

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:13 -05:00
Dan Winship
8d9969fe15 tests/protocol: redo a bit
Rather than overloading --verbose, just skip the tests that aren't
supposed to be run in the parent process (so that if you do run the
toplevel test with --verbose, it doesn't immediately error out).

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:12 -05:00
Dan Winship
80253cd710 tests/option-context: fix under --verbose
We need to always pass G_TEST_TRAP_SILENCE_STDERR/STDOUT, or else
we can't check that they contained the right text later.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:12 -05:00
Dan Winship
723a8f5588 gtestutils: fix "-p" logic
If you had two tests "/foo/bar" and "/foo/bar/baz", and ran the test
program with "-p /foo/bar/baz", it would run "/foo/bar" too. Fix that.
And add a test to tests/testing for it.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:11 -05:00
Dan Winship
ea06ec8063 tests: port from g_test_trap_subprocess() to g_test_trap_fork()
(or, in a few cases, to g_test_expect_message())

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:10 -05:00
Dan Winship
e3a29184d5 gtestutils: add g_test_trap_subprocess(), deprecate g_test_trap_fork()
g_test_trap_fork() doesn't work on Windows and is potentially flaky on
unix anyway given the fork-but-don't-exec. Replace it with
g_test_trap_subprocess(), which re-spawns the same program with
arguments telling it to run a specific (otherwise-ignored) test case.

Make the existing g_test_trap_fork() unit tests be unix-only (they
never passed on Windows anyway), and add a parallel set of
g_test_trap_subprocess() tests.

https://bugzilla.gnome.org/show_bug.cgi?id=679683
2012-12-19 14:35:08 -05:00
Daniel Macks
79fab3e647 Add missing autoconf test for sysctlbyname()
uses specific mib[] tokens iff it is available, but configure wasn't
testing for it to be available.

https://bugzilla.gnome.org/show_bug.cgi?id=689324
2012-12-19 14:32:24 -05:00
Daniel Macks
1fec9ac47d Fix constant type to match assigned variable type
Some compilers assume a literal value is a certain byte-length without
checking the type to which it is being assigned, giving a compile-time
warning: a default of 'long' is a mismatch when assigning to a guint64
when the latter is a 'long long'. Use one of glib's standard macros to
specify the type of the constant to match the variable type.

https://bugzilla.gnome.org/show_bug.cgi?id=688829
2012-12-19 14:29:08 -05:00
Dan Winship
69ad5010e3 inotify: fix compile 2012-12-19 09:10:12 -05:00
Emmanuele Bassi
5f1f9cb7d8 timezone: Fix byte arithmetic
Use guint8* instead of gpointer, to avoid warnings and side effects.

https://bugzilla.gnome.org/show_bug.cgi?id=686128
2012-12-19 13:48:31 +00:00
Dan Winship
1d7985aa0a tests: multiple fixes to run-assert-msg-test.sh
1) use "../libtool" rather than "libtool" to avoid problems
with wacky OS X not-actually-libtool

2) Use libtool on the libtool script, not the binary, so that it
actually does anything

3) Don't use "gdb --ex" since it's apparently new-ish/non-portable.

https://bugzilla.gnome.org/show_bug.cgi?id=684723
2012-12-19 08:32:42 -05:00
Dan Winship
3a7244bd0c Add "Since 2.36" to G_FILE_MONITOR_WATCH_HARD_LINKS doc 2012-12-19 08:22:23 -05:00
Ryan Lortie
707bc4a40f gio + inotify support for hard links
Add a new GFileMonitorFlag: G_FILE_MONITOR_WATCH_HARD_LINKS.  When set,
changes made to the file via another hard link will be detected.

Implement the new flag for the inotify backend.

https://bugzilla.gnome.org/show_bug.cgi?id=532815
2012-12-19 08:19:18 -05:00
John Ralls
e6d45972fc Bug 633117: glib fails tests if /etc/localtime is not properly set 2012-12-19 00:40:08 +00:00
John Ralls
c9939b0fc7 GTimeZone interval_info: Fix interval 0 per IANA tzfile instructions
IANA tzfiles don't always put standard time in the 0th t_info. Follow
their instructions to use the first standard time t_info for interval 0.
2012-12-18 15:43:41 -08:00
John Ralls
0f0404af21 test_posix_parse: PST8PDT passes on Unix because it names an IANA zone. 2012-12-18 15:43:41 -08:00
John Ralls
bdab372379 MSWindows TimeZone Support: Refactor and rewrite TZ variable parsing 2012-12-18 15:43:41 -08:00
John Ralls
1af37768a5 Test the TZ-variable parsing functions 2012-12-18 15:43:40 -08:00
John Ralls
7d1ae24e19 Implement and test time zone name/abbrev setting for Windows. 2012-12-18 15:43:40 -08:00
John Ralls
d12bb7ef72 Win32 TimeZone Support: General refactoring
For code clarity and to pass tests
2012-12-18 15:43:40 -08:00
John Ralls
1ef6933cbe Add MSWindows timezone names to test new windows support. 2012-12-18 15:43:40 -08:00
Arnel A. Borja
1ccd4d60fc GTimeZone: Fix time zones in Windows
Get time zone information from registry. Use GetTimeZoneInformation()
instead to get the local time zone if Dynamic DST is not available.

https://bugzilla.gnome.org/show_bug.cgi?id=683998
2012-12-18 15:43:40 -08:00
Arnel A. Borja
206ba07bd9 GTimeZone: Parse Windows format for TZ
Parse the "tzn[+|-]hh[:mm[:ss]][dzn]" format used in Windows for
environment variable TZ.

https://bugzilla.gnome.org/show_bug.cgi?id=683998
2012-12-18 15:43:40 -08:00
Arnel A. Borja
87436e6b3d GTimeZone: Parse POSIX format for TZ
Parse the "std offset [dst [offset],start[/time],end[/time]]" (POSIX)
format used in Unix for environment variable TZ.

https://bugzilla.gnome.org/show_bug.cgi?id=686128
2012-12-18 15:43:40 -08:00
Arnel A. Borja
9a4a53c03d GTimeZone: Add initialization functions for rules
Add functions to initialize a GTimeZone from rules.
2012-12-18 15:43:40 -08:00
Arnel A. Borja
9fae921c3e GTimeZone: Parse more offset formats
Allow more formats for offset. Parse seconds in offsets too. Make offset
signs optional.

https://bugzilla.gnome.org/show_bug.cgi?id=686128
2012-12-18 15:43:40 -08:00
John Ralls
59f2da1749 Replace zoneinfo pointers with structs
The approach of sucking a zoneinfo file into a GBytes and working with
pointers into it might be fast, but it's obtuse and not compatible with
Microsoft Windows.
2012-12-18 15:43:40 -08:00
John Ralls
489e031f22 Extract function init_zone_from_iana_info 2012-12-18 15:43:40 -08:00
John Ralls
47de8646e2 Extract function zone_info_unix 2012-12-18 15:43:40 -08:00
Ryan Lortie
5df1edaf70 gtype: disallow adding interfaces after the fact
Add a check to prevent adding an interface to a class that has already
had its class_init done.

This is an incompatible change but it is suspected that there are not
many users of this functionality.  Two known exceptions are pygobject
(fixed in bug 686149) and our own testsuite (affected tests have been
temporarily disabled by this patch).

Once we confirm that nobody else is using this functionality we can
remove a rather large amount of code for dealing with this case.

https://bugzilla.gnome.org/show_bug.cgi?id=687659
2012-12-18 21:37:07 +01:00
Rico Tzschichholz
d04faab327 gio: Fix build with -Werror=format-security 2012-12-18 21:32:01 +01:00
Rico Tzschichholz
d1ab41c940 Revert "gtype: disallow adding interfaces after the fact"
This reverts commit d6a075b0d8.
2012-12-18 21:23:13 +01:00
PHO
f0f6c8d231 gsocket: Work around broken CMSG_FIRSTHDR()
As RFC 2292 points out, some platforms (e.g. Darwin 9.8.0) provide
CMSG_FIRSTHDR(msg) which just returns msg.msg_control without first
checking if msg.msg_controllen is non-zero. We need a workaround for
such platforms not to let g_socket_receive_message() segfault.

https://bugzilla.gnome.org/show_bug.cgi?id=690388
2012-12-18 13:31:02 -05:00
Colin Walters
780871d273 GOutputStream: Fix a compiler warning 2012-12-18 13:21:24 -05:00
Dan Winship
07bb8097e5 gtask: don't deadlock when tasks block on other tasks
If tasks block waiting for other tasks to complete then the system can
end up starved for threads. Avoid this by bumping up max-threads in
that case.

This also reverts 7b1f8c58 and reverts max-threads for GTask's
GThreadPool back to 10.

https://bugzilla.gnome.org/show_bug.cgi?id=687223
2012-12-18 13:19:08 -05:00
Colin Walters
2149b29468 Add g_get_num_processors()
Based on a patch from John Cupitt <jcupitt@gmail.com>

Useful for thread pools which should scale to number of processors.

See https://bugzilla.gnome.org/show_bug.cgi?id=687223

https://bugzilla.gnome.org/show_bug.cgi?id=614930
2012-12-18 13:13:15 -05:00
Dan Winship
ed5accf16c gio: port file/vfs-related classes from GSimpleAsyncResult to GTask
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-12-18 09:07:24 -05:00
Dan Winship
669505e354 gio: port basic I/O classes from GSimpleAsyncResult to GTask
https://bugzilla.gnome.org/show_bug.cgi?id=661767
2012-12-18 09:07:19 -05:00
Shantha kumar
586adb9790 Tamil translation updated 2012-12-18 16:48:21 +05:30
Shantha kumar
8a4567aaeb Tamil translation updated 2012-12-18 16:35:48 +05:30
Shantha kumar
5eb2e087ce Tamil translation updated 2012-12-18 16:29:08 +05:30
Shantha kumar
e3d6bb41c5 Tamil translation updated 2012-12-18 16:07:10 +05:30
Shantha kumar
b1eb481e47 Tamil translation updated 2012-12-18 16:01:25 +05:30
Matej Urbančič
99d92b1f53 Updated Slovenian translation 2012-12-18 08:40:39 +01:00
Matthias Clasen
9061d91605 bump version 2012-12-17 19:18:13 -05:00
Matthias Clasen
6262a48678 2.35.3 2012-12-17 19:15:29 -05:00
Matthias Clasen
c23122b5e9 Fix distcheck 2012-12-17 19:15:29 -05:00
Christophe Fergeau
b055c82815 Fix g_type_add_class_private() name in g_warning
When g_type_class_get_private is called without calling
g_type_add_class_private first, a g_warning is issued, but
the name of the function to call is wrong:
g_type_class_add_class_private.

https://bugzilla.gnome.org/show_bug.cgi?id=690348
2012-12-17 15:51:07 +01:00
Dan Winship
df334d6e00 gsocket: improve sockopt handling for IPv4-wrapped-IPv6 sockets
On IPv6 sockets, set both the IPv4 and IPv6 versions of IP socket
options, in case the socket is (or might become) IPv4-wrapped. (But
ignore errors when setting the IPv4 version.)

Similarly, when joining or leaving a multicast group, pick the sockopt
to use based on the address family of the multicast address rather
than the address family of the socket.

https://bugzilla.gnome.org/show_bug.cgi?id=687092
2012-12-17 09:01:05 -05:00