Commit Graph

13152 Commits

Author SHA1 Message Date
Dan Winship
d9e8feae7c win32: make gio/tests/gdbus-proxy.c compile
win32 doesn't have kill(), so this won't even compile on Windows
unless that is ifdeffed out. The test probably still doesn't *work*,
but...

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:06 -05:00
Dan Winship
75d2c1823c gvariant-internal.h: fix the include hack
gvariant-internal.h was defining GLIB_COMPILATION so that it could
include individual headers, but this broke tests/gvariant on windows
because setting GLIB_COMPILATION changes the definition of GLIB_VAR,
causing external variables to not be found. Fix this by having it
define __GLIB_H_INSIDE__ instead.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:06 -05:00
Dan Winship
468a166711 GLocalFile: canonicalize the initial directory separator
GLocalFile was (in certain situations) translating a path like
"/foo/bar/baz" to "/foo\bar\baz" on win32. Fix it to make sure the
initial directory separator gets canonicalized too.

Fixes gio/tests/g-icon on win32.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:06 -05:00
Dan Winship
f80d8f1e4d win32: various fixes to test programs
Fix a few win32-specific bugs in various tests, and #ifdef out code
that is UNIX- or Linux-specific that wouldn't be expected to pass on
Windows.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:06 -05:00
Dan Winship
b8c13a01b6 win32: misc warning fixes
https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:06 -05:00
Dan Winship
f248c86b0a win32: move some code into #ifdef G_OS_UNIX
Fix various bits of code/declarations that are only used by G_OS_UNIX
but were still visible to G_OS_WIN32.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:05 -05:00
Dan Winship
731b469908 win32: define _WIN32_WINNT globally
Rather than defining _WIN32_WINNT only in a handful of files, define
it in config.h, like we do with _GNU_SOURCE.

(Also remove a "#define WIN32_LEAN_AND_MEAN" that isn't really all
that useful.)

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:05 -05:00
Dan Winship
3ac6cfaeaa win32: prototype _glib_get_dll_directory() and _glib_get_locale_dir()
Rather than using "extern" declarations of these win32 functions
everywhere they're needed, just prototype them in glib-private.h.
(Which also fixes the fact that they weren't prototyped in the files
where they're defined.)

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:05 -05:00
Dan Winship
08f4f92fed win32: add gwin32compat.h, for utf8-renaming compatibility defines
To avoid -Wmissing-prototype warnings, we need to prototype both the
original and the _utf8 versions of all of the functions that have had
_utf8-renaming on Windows. But duplicating all the prototypes is ugly,
so rather than doing them "in-place", move them all to a new header
file just for that.

https://bugzilla.gnome.org/show_bug.cgi?id=688109
2012-11-15 14:19:05 -05:00
Wim Taymans
c2acbc0182 gsocket: fix joining/leaving multicast groups
Initialize the structure passed to setsockopt to 0 to avoid random
errors when joining or leaving a multicast group.

https://bugzilla.gnome.org/show_bug.cgi?id=688378
2012-11-15 11:09:00 -05:00
Michael Natterer
49db979922 Revert "gmain: Add private API to create Unix child watch that uses waitid()"
This reverts commit 93bf37ce15.
2012-11-15 15:33:38 +01:00
Michael Natterer
6dee874b68 Revert "gio: Add private API to create win32 streams from fds"
This reverts commit 292de8cc52.
2012-11-15 15:33:38 +01:00
Michael Natterer
75de24ca66 Revert "gspawn: support creating pipes with O_CLOEXEC"
This reverts commit 2054ccad95.
2012-11-15 15:33:38 +01:00
Colin Walters
2aa97e2847 gdbus: Fix some compiler warnings
Code appears to have been copy/pasted from a bit which used _object,
but I think it's clearer to always use the "self" parameter anyways.
2012-11-15 08:42:36 -05:00
Antoine Jacoutot
a335fd1de8 GFileMonitor: Add kqueue(3) support to GIO
Written by Dmitry Matveev as part of GSoC 2011:
http://netbsd-soc.sourceforge.net/projects/kqueue4gio/

This brings native file monitoring support on systems supporting kqueue(3)
(all BSDs) and remove the need to rely on the unmaintained gamin software.
The backend adds GKqueueDirectoryMonitor and GKqueueFileMonitor.

Some parts rewritten by myself (to prevent needing a configuration file).
Helpful inputs from Colin Walters and Simon McVittie.

https://bugzilla.gnome.org/show_bug.cgi?id=679793
2012-11-15 08:13:30 +01:00
Ryan Lortie
2054ccad95 gspawn: support creating pipes with O_CLOEXEC
Add a new flag, G_SPAWN_CLOEXEC_PIPES, for creating the stdin/out/err
pipes with O_CLOEXEC (for the usual reasons).

https://bugzilla.gnome.org/show_bug.cgi?id=672102
2012-11-14 14:12:15 -05:00
Colin Walters
292de8cc52 gio: Add private API to create win32 streams from fds
This will be used by GSubprocess.

https://bugzilla.gnome.org/show_bug.cgi?id=672102
2012-11-14 14:12:05 -05:00
Colin Walters
93bf37ce15 gmain: Add private API to create Unix child watch that uses waitid()
This avoids collecting the zombie child, which means that the PID
can't be reused.  This prevents possible race conditions that might
occur were one to send e.g. SIGTERM to a child.

This race condition has always existed due to the way we called
waitpid() for the app, but the window was widened when we moved the
waitpid() calls into a separate thread.

If waitid() isn't available, we return NULL, and consumers of this
private API (namely, GSubprocess) will need to handle that.

https://bugzilla.gnome.org/show_bug.cgi?id=672102
2012-11-14 14:11:57 -05:00
Simon McVittie
e744a4aa7a Remove trailing spaces from expected GMarkup error messages
Commit 138f4c1 broke the relevant part of 'make check' by changing the
error messages away from the ones we previously expected. This commit
updates the expected output to catch up.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=688255
Reviewed-by: Matthias Clasen <mclasen@redhat.com>
2012-11-14 13:26:57 +00:00
Colin Walters
b98a1c8df3 gmain: Handle case where source id overflows
0 is not a valid source id, but for long-lived programs that rapidly
create/destroy sources, it's possible for the source id to overflow.
We should handle this, because the documentation implies we will.

https://bugzilla.gnome.org/show_bug.cgi?id=687098
2012-11-13 11:32:57 -05:00
Paul Menzel
606aa26acf gio/*: Fix spelling of determining
$ sed -i s,determing,determining,g gio/gdrive.c
$ sed -i s,determing,determining,g gio/gdbusprivate.c

http://www.merriam-webster.com/dictionary/determining

For some reason according to `git log --follow` the whole file was created during some translation update.

    commit c45b813504
    Author: Timo Jyrinki <timo@debian.org>
    Date:   Mon Mar 12 11:02:04 2012 +0200

        Finnish translation update from http://l10n.laxstrom.name/wiki/Gnome_3.4 translation sprint
2012-11-13 13:54:40 +00:00
Dan Winship
9fb3082070 Revert "Return correct value for g_socket_get_available_bytes() on Windows and OSX"
This neither compiles nor does what it's supposed to on Windows.

This reverts commit 1e598600a1.
2012-11-11 14:14:04 -05:00
Dan Winship
4651ec7725 .gitignore: ignore .def files (win32 build) 2012-11-11 13:33:36 -05:00
Sebastian Dröge
2bba1da306 Add caching for the receiver addresses for g_socket_receive_from()
https://bugzilla.gnome.org/show_bug.cgi?id=668842
2012-11-11 17:32:38 +01:00
Мирослав Николић
df1e049792 Updated Serbian translation 2012-11-11 11:36:03 +01:00
Aurimas Černius
4a20aa31b1 Updated Lithuanian translation 2012-11-10 14:12:30 +02:00
Fran Diéguez
1b3e65d502 Updated Galician translations 2012-11-10 11:07:09 +01:00
Matej Urbančič
a8db7314fb Updated Slovenian translation 2012-11-10 08:58:41 +01:00
Matej Urbančič
de298366e5 Updated Slovenian translation 2012-11-10 08:56:38 +01:00
Matthias Clasen
8caf39b59b Add an option to make glib-compile-resources use G_GNUC_INTERNAL
https://bugzilla.gnome.org/show_bug.cgi?id=687742
2012-11-09 22:14:39 -05:00
Matthias Clasen
138f4c1e2f Remove trailing space from some translated strings
https://bugzilla.gnome.org/show_bug.cgi?id=687700
2012-11-09 22:12:57 -05:00
Matthias Clasen
7fd15ee4ae Add plural forms for some translations
https://bugzilla.gnome.org/show_bug.cgi?id=687698
2012-11-09 22:10:10 -05:00
Sebastian Dröge
1e598600a1 Return correct value for g_socket_get_available_bytes() on Windows and OSX
https://bugzilla.gnome.org/show_bug.cgi?id=686786
2012-11-09 21:57:50 -05:00
John Ralls
b65dac802e Fix poll able streams for Darwin (and probably BSD)
Darwin's poll doesn't change revents if there are no available events, though it returns 0. Initialize the fd.revents to 0 so that the test passes.

That reveals a test failure, though, because with socket streams it takes time for an event to pass through the socket. Provide an 80-usec delay to allow time for the propagation.
2012-11-09 09:23:01 -08:00
John Ralls
5588d47985 Fix compile error about missing prototype
For g_nextstep_settings_backend_get_type()
2012-11-09 09:23:01 -08:00
Dan Winship
f1b34cab8a gthreadedresolver: fix a bug in the GTask porting of lookup_records
We were passing the wrong destroy notify when returning the list of
records, so it would crash if it got called (ie, if you didn't call
g_resolver_lookup_records_finish()).

(Also fix s/targets/records/ throughout the records functions.)
2012-11-09 11:41:01 -05:00
Timothy Arceri
edeffe0c87 Use url encoding for trash fileinfo path as per freedesktop trash specification
https://bugzilla.gnome.org/show_bug.cgi?id=687540
2012-11-09 08:40:43 -05:00
Martin Pitt
a07a5f82aa GByteArray: Add missing transfer annotations
Make g_byte_array_new() and g_byte_array_new_take() introspectable by adding
missing transfer annotations to return value.

Covered by tests in PyGObject.
2012-11-09 09:32:03 +01:00
Martin Pitt
e06268d72e GBytes: Add missing annotations
Annotate g_bytes_new*()'s data argument to be a guint8 array, as
introspection clients cannot deal with raw gconstpointers. This makes
GBytes' behaviour similar to GByteArray whose API already uses guint8.

Add missing transfer annotation to g_bytes_get_data() to make it
introspectable.

This is covered by test cases in PyGObject.
2012-11-09 09:09:39 +01:00
John Ralls
8dd70a261d Bug 686185: GDateTime Transcoding fails on OSX
Better fix than d5df0a10f. Thanks to Christian Persch for pointing this
out.
2012-11-08 08:37:54 -08:00
Emmanuel Pacaud
a9eb1907a6 Check for PR_GET_NAME
PR_GET_NAME may not be defined when using an old kernel. Deal with it.
2012-11-08 08:19:43 +01:00
Colin Walters
753494a25e tests/buffered-input-stream: Fix size of parameter passed
buffer-size is guint, but the public API is gsize for some reason.

Tested-By: gustavold@linux.vnet.ibm.com

https://bugzilla.gnome.org/show_bug.cgi?id=687801
2012-11-07 09:51:20 -05:00
John Ralls
d5df0a10f1 Skip test_non_utf8_printf() if EUC-JP is aliased to UTF-8
See https://bugzilla.gnome.org/show_bug.cgi?id=686185
This skips the test on those systems, like Darwin, which provide the
ja_JP.eucjp locale but which glib doesn't know how to transcode and
aliases JIS to UTF-8.
2012-11-06 16:50:09 -08:00
Ryan Lortie
b26fb3ae5c Don't call varargs open() through non-varargs type
open() is probably defined varargs.  Casting a varargs function to an
equivalent non-varargs type and then calling it is undefined, but
gfileutils.c was doing exactly that.

Add some non-varargs wrappers to avoid the problem.

Problem reported by John Spencer.

https://bugzilla.gnome.org/show_bug.cgi?id=687600
2012-11-06 14:40:36 -05:00
Ryan Lortie
77032ea390 belated version bump 2012-11-06 07:41:13 -05:00
Ryan Lortie
d6a075b0d8 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-11-05 13:20:28 -05:00
Martin Pitt
1af1b2b2bb Box GPollFD to make it introspectable
https://bugzilla.gnome.org/show_bug.cgi?id=686797
2012-11-05 14:41:31 +01:00
Ryan Lortie
81b27ffc1c Add a translator comment about 'KB'
The GLib units policy used to be that 'KB' means 1024 bytes, 'MB' means
1024 KB, 'GB' means 1024 MB, etc.

Those days are over, but we have a deprecated function that still works
that way.  It contains the string "KB", marked for translation, which
has been a source of confusion for translators on multiple occasions.

https://bugzilla.gnome.org/show_bug.cgi?id=687516
2012-11-05 08:24:30 -05:00
Chun-wei Fan
2b17e797a4 gio/gthreadedresolver.c: Fix non-UNIX build
Move the GError *error declaration up, as that variable is also used for
non-Unix builds.
2012-11-05 17:22:38 +08:00
Sweta Kothari
8a530463ad Updated gujarati file 2012-11-05 11:33:39 +05:30