Commit Graph

17561 Commits

Author SHA1 Message Date
Philip Withnall
2502bfd8b0 Re-normalise line endings of README.win32
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-10 11:37:30 +01:00
Philip Withnall
a88302683f git: Add .gitattributes file with EOL settings for README.win32
Set it to always have CRLF line endings, since we want it to be readable
on Windows by default. This should result in the line endings being
normalised to CRLF even after it’s edited by someone on Linux.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-10 11:35:31 +01:00
Philip Withnall
a131134918 build: Drop nmake/MSC build system for GLib
It hasn’t been seriously maintained for the best part of 10 years and is
very outdated. The recommended way to build GLib on Windows is now
Visual Studio:

https://wiki.gnome.org/Projects/GTK%2B/Win32/MSVCCompilationOfGTKStack#GLib

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=722047
2017-07-10 11:22:40 +01:00
Aleksander Morgado
1d3210a8ab configure: fix minor typo 'be build'->'be built'
https://bugzilla.gnome.org/show_bug.cgi?id=784739
2017-07-10 11:11:33 +01:00
Yosef Or Boczko
28cc905cd0 Updated Hebrew translation 2017-07-09 20:47:55 +03:00
Matthias Clasen
28cc6aeb19 gsettings: Try harder to describe keys
If a key has no description, show the summary,
rather than "(null)". Since thats not helpful at all.
2017-07-07 19:11:51 -04:00
Matthias Clasen
85e4a25912 Avoid a race with the openuri portal
Same as the previous commit; use the new predictable request
object path to connect to the Response signal early.
2017-07-07 11:54:54 -04:00
Bastien Nocera
a95e2a4c64 docs: Fix cut'n'paste error in g_resources_get_info() doc
https://bugzilla.gnome.org/show_bug.cgi?id=784581
2017-07-05 23:50:04 +02:00
Rico Tzschichholz
8e23a514b0 unicode: Update test data files for unicode 10.0.0
https://bugzilla.gnome.org/show_bug.cgi?id=784456
2017-07-05 17:53:07 +02:00
Rico Tzschichholz
4e1567a079 unicode: Update to unicode 10.0.0
https://bugzilla.gnome.org/show_bug.cgi?id=784456
2017-07-05 17:53:07 +02:00
Philip Withnall
a74fe20064 tests: Drop local timezone GTimeVal overflow check
We can’t reasonably control the local timezone in the test
environment, so drop some assertions which were assuming the local
timezone offset was not big enough to cause an overflow in the GTimeVal
handling for GDateTime.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2017-07-05 16:37:20 +01:00
Philip Withnall
5a8b02cae6 gdbusutils: Add an example to g_dbus_gvariant_to_gvalue() docs
Clarify that GVariants of type v are not magically unboxed.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=784433
2017-07-04 10:45:50 +01:00
Jehan
9bc3d025f9 configure: close a parenthese in an error message. 2017-07-01 17:03:29 +02:00
Matthias Clasen
f39024038f Disambiguate source names
This makes debugging more pleasant.
2017-06-28 19:50:57 -04:00
Emanuele Aina
79e4d4c6be gio: Mention the ALL_METADATA flag in g_file_copy()
The g_file_copy() documentation didn't mention if
G_FILE_COPY_ALL_METADATA was applicable or not, and users were led to
call g_file_copy_attributes() to specify it after the g_file_copy()
call, unless they checked the source (been there, done that).

https://bugzilla.gnome.org/show_bug.cgi?id=784037
2017-06-21 15:54:11 +02:00
Sebastian Dröge
fd329f4853 GKeyFile – Add array length annotations to to_data(), get_keys() and get_groups()
https://bugzilla.gnome.org/show_bug.cgi?id=784020
2017-06-21 13:47:40 +03:00
Philip Withnall
1366ce7ee0 gutf8: Clarify return value docs for g_utf8_find_next_char()
Make it clearer that it will only return NULL if @end is non-NULL. Add a
test for this too.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=773842
2017-06-21 11:39:52 +01:00
Philip Withnall
3e89b19c44 gutf8: Fix documentation for g_utf8_get_char_validated() length limits
If g_utf8_get_char_validated() encounters a nul byte in the middle of a
string of given longer length, it returns -2, indicating a partial
gunichar. That is not the obvious behaviour, but since
g_utf8_get_char_validated() has been API for a long time, the behaviour
cannot be changed.

Document it, and add some unit tests (for this behaviour and the other
behaviour of g_utf8_get_char_validated()).

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=780095
2017-06-21 11:38:46 +01:00
Philip Withnall
428acd9b14 tests: Fix overflows in find_maximum_supported_tv_sec()
The addition (highest_success + lowest_failure) could have overflowed,
and typically would do on 32-bit platforms where the real
highest_success should be G_MAXLONG. Fix that, and introduce special
handling of the corner case of (highest_success = G_MAXLONG).

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=783841
2017-06-21 11:21:31 +01:00
Philip Withnall
30fed3b906 tests: Fix GDateTime overflow tests on 32-bit architectures
On architectures where sizeof(glong) == 32 bits, there are no problems
with overflow when constructing a GDateTime from a GTimeVal. Adjust the
test for this by basing it on the maximum supported tv_sec value it can
calculate, rather than a fixed ‘known unsupported’ value.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=783841
2017-06-21 11:21:31 +01:00
Philip Withnall
2db7aa4799 gdatetime: Fix a potential overflow in overflow calculations
I can’t remember whether glong (tv.tv_sec) needs to be explicitly
promoted to gint64 here, or whether C does it automatically. Safer to
make the cast explicit to avoid overflow issues on 32-bit platforms,
where glong is 32-bit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=783841
2017-06-21 11:21:31 +01:00
Philip Withnall
18f8b77c04 gio: Use g_strerror() instead of strerror()
This marginally improves thread safety, and marginally improves
consistency.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=733821
2017-06-21 11:20:29 +01:00
Igor Pashev
c8e268bbce Fix detection and usage of strerror_r()
autoconf provides a macro for this situation, which saves us having to
manually work out whether strerror_r() returns a char* or an int.

https://bugzilla.gnome.org/show_bug.cgi?id=784000
2017-06-20 14:59:27 +01:00
Matthias Clasen
bb50b70713 2.53.3 2017-06-19 21:51:09 -04:00
Baurzhan Muftakhidinov
5cb0ca7a35 Update Kazakh translation 2017-06-17 11:01:18 +00:00
Colin Walters
017f78d77f gtype: Add private DEFINE_TYPE with prelude to workaround gtype deadlocks
And use it in GSocket, as it had a real-world case reported.

https://bugzilla.gnome.org/show_bug.cgi?id=674885
2017-06-14 14:45:45 -04:00
Philip Withnall
ac0b0c84f7 gmessages: Expand documentation on GLogWriterFunc chaining
As prompted by Marc-Andre Lureau.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=661926
2017-06-14 09:57:01 +01:00
Chun-wei Fan
ad49479265 Visual Studio builds: Visual Studio 2013 and later has va_copy()
Update config.h.win32.in and glib/glibconfig.h.win32.in to indicate so.
2017-06-14 11:48:27 +08:00
Chun-wei Fan
951fd642dc Visual Studio builds: Use the Centricular fork of libffi
The latest upstream libffi is getting bit-rotten with the Windows/MSVC
builds, and since we are eventually moving to a Meson-based build system,
make use of the Centricular fork of libffi[1], which is better maintained
and tested for builds on Windows, with the use of DLLs over static libraries
and elimination of awkward build flags that we had to use for GObject.

[1]: https://github.com/centricular/libffi
2017-06-14 10:51:55 +08:00
Kristjan SCHMIDT
d52f789a29 Updated Esperanto translation 2017-06-11 02:08:58 +02:00
Ting-Wei Lan
45d4b59e3f glocalfileoutputstream: Fix symlink writing on FreeBSD and NetBSD
FreeBSD, DragonflyBSD and NetBSD support O_NOFOLLOW, but they use error
numbers that are different from what POSIX standard specifies. They are
not going to change the behavior, and existing programs on these systems
already take advantage of this difference. To support them, we have to
add a check in GIO to use different error numbers on these systems.

https://bugzilla.gnome.org/show_bug.cgi?id=775593
2017-06-10 20:55:12 +08:00
Mario Blättermann
9c254f472f Update German translation 2017-06-09 19:35:20 +00:00
Simon McVittie
34045e66a6 GGtkNotificationBackend: Use correct path for GetNameOwner call
For historical reasons, the reference dbus-daemon responds to most
method calls on all object paths. However, the canonical path
of the object implementing the o.fd.DBus interface is
/org/freedesktop/DBus, and in some environments (notably AppArmor
with the <abstractions/dbus-session-strict> abstraction) only this
path is allowed.

https://bugs.freedesktop.org/show_bug.cgi?id=101256 officially
deprecates all other object paths, and when adding new APIs we will
only make them available on the canonical object path.

Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Emmanuele Bassi <ebassi@gnome.org>
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=783593
2017-06-09 16:45:09 +01:00
Debarshi Ray
debbdb7ce7 docs: The program name is also set by g_application_run
https://bugzilla.gnome.org/show_bug.cgi?id=783524
2017-06-07 20:58:07 +02:00
Ondrej Holy
6863080c32 gio-tool: Fix alignment of monitor messages
Name of GMount/GVolume/GDrive is aligned in many cases in output messages,
except few cases. Let's unify the alignment.

https://bugzilla.gnome.org/show_bug.cgi?id=776169
2017-06-06 11:11:58 +02:00
Philip Withnall
085b3470f0 gdbusintrospection: Remove incorrect (out) annotations
The caller passes in a GString instance which is then modified by the
function, rather than the function building its own GString and passing
it out to the caller.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=783392
2017-06-05 16:07:52 +01:00
Philip Withnall
f98d998267 gdatainputstream: Annotate (out) length arguments as (optional)
All of them are.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=783350
2017-06-05 16:04:18 +01:00
Daniel Mustieles
cb9de6695c Update Spanish translation 2017-06-05 14:12:15 +00:00
Kukuh Syafaat
329b7bdec5 Update Indonesian translation 2017-06-03 23:44:14 +00:00
Sébastien Wilmet
eea0681574 LGPLv2+ -> LGPLv2.1+: update remaining files
For the files in gio/ (but not in gio/ sub-directories), only the *.[ch]
files were handled in commit 3bf4a720c3.

For the modified files in glib/tests/markups/, I've tested that
`make check` still succeeds.

After this commit,
$ git grep -in "GNU Library"
and
$ git grep -in "Library General"
return only results in COPYING files and in glib/libcharset/. The latter
was not updated because it's a copy.

$ git grep -in "version 2" | grep -iv "version 2\.1"
now doesn't return any LGPL license header.
- glib-gettextize.in: GPL
- glib/gen-unicode-tables.pl: GPL
- glib/gnulib/: a copy
- glib/libcharset/: a copy
- m4macros/attributes.m4: GPL
- po/po2tbl.sed.in: GPL
- tap-driver.sh: GPL
- tests/*.pl: GPL

https://bugzilla.gnome.org/show_bug.cgi?id=776504
2017-06-03 10:30:17 +02:00
Matthias Clasen
34b21312f1 appinfo: Fix the build on windows
The previous commit forgot to protect some unix-only
calls by an ifdef.

Pointed out by John Emmas.
2017-06-02 22:04:46 -04:00
Patrick Griffis
7c5cd293d0 Fix g_file_copy_async() annotation
https://bugzilla.gnome.org/show_bug.cgi?id=776333
2017-06-02 13:44:16 -04:00
Ignacio Casal Quinteiro
e4e83bff72 win32: port monotonic times to use QPC
This provides a high precision monotonic time and
the concerns that we had are no longer true
on new versions of Windows (7+).

https://bugzilla.gnome.org/show_bug.cgi?id=783340
2017-06-02 18:11:11 +02:00
Руслан Ижбулатов
b4ee4628d9 GetTickCount64 is a __stdcall function
https://bugzilla.gnome.org/show_bug.cgi?id=781301
2017-06-01 11:00:29 +00:00
John Lindgren
d1d60fc846 NtNotifyChangeMultipleKeys is a __stdcall function.
https://bugzilla.gnome.org/show_bug.cgi?id=781301
2017-06-01 11:00:28 +00:00
Philip Withnall
4dd1b17c24 gdbus: Fix race in name watching on connection teardown
If g_dbus_unwatch_name() is called from one thread at the same time as
the GDBusConnection is emitting ::disconnected in another thread, there
will be a race and the handler for ::disconnected may end up using
memory after it’s freed.

Fix this by serialising through the map_id_to_client, so that
on_connection_disconnected() atomically gets a strong reference to the
Client, or NULL.

https://bugzilla.gnome.org/show_bug.cgi?id=777307
2017-06-01 11:39:40 +01:00
Matthias Clasen
97068f363e OpenFile support: Handle open failing
This can happen, report it as an error when it does.
2017-05-31 12:10:58 -04:00
Philip Withnall
e1e73dafa6 gsubprocess: Copy parent process’ environ when clearing subprocess’
Previously, this was done at the time of spawning the subprocess, which
meant the g_subprocess_launcher_*_environ() functions could not be used
to modify the parent process’ environment.

Change the code to copy the parent process’ environment when
g_subprocess_launcher_set_environ(NULL) is called. Document the change
and add a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=778422
2017-05-31 12:07:31 +01:00
Philip Withnall
c7d325733c docs: Mention GtkApplication in the GResource documentation
Since GtkApplication auto-loads some well-known resource paths. Add a
cross-reference to its documentation. (The cross-reference won’t be
linked if the GTK+ documentation isn’t available at build time, but this
is probably good enough. It is likely to be available.)

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=782336
2017-05-31 11:09:51 +01:00
Philip Withnall
678899e87a docs: Mention the alias GResource attribute in the documentation
It was the only part of the XML format which was not documented.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=782336
2017-05-31 11:08:05 +01:00