summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjee Kim <hj0426.kim@samsung.com>2019-12-03 09:46:57 +0900
committerHyunjee Kim <hj0426.kim@samsung.com>2019-12-03 09:46:57 +0900
commit2edc4beaf99a0eb139005443a9ed9ebad1d4cf5f (patch)
tree2f1062b20f87d04526d39be4fe68d55500bd45ab
parent199bcd7237c3abbe4c62cdc742a3396301de64c0 (diff)
downloadglib-2edc4beaf99a0eb139005443a9ed9ebad1d4cf5f.tar.gz
glib-2edc4beaf99a0eb139005443a9ed9ebad1d4cf5f.tar.bz2
glib-2edc4beaf99a0eb139005443a9ed9ebad1d4cf5f.zip
Imported Upstream version 2.55.0
-rw-r--r--NEWS173
-rw-r--r--config.h.meson9
-rw-r--r--config.h.win32.in253
-rw-r--r--configure.ac46
-rw-r--r--docs/reference/gio/Makefile.am5
-rw-r--r--docs/reference/gio/gio-docs.xml2
-rw-r--r--docs/reference/gio/gio-sections.txt38
-rw-r--r--docs/reference/gio/meson.build58
-rw-r--r--docs/reference/glib/Makefile.am4
-rw-r--r--docs/reference/glib/glib-docs.xml4
-rw-r--r--docs/reference/glib/glib-overrides.txt4
-rw-r--r--docs/reference/glib/glib-sections.txt19
-rw-r--r--docs/reference/glib/meson.build57
-rw-r--r--docs/reference/gobject/Makefile.am5
-rw-r--r--docs/reference/gobject/glib-genmarshal.xml44
-rw-r--r--docs/reference/gobject/glib-mkenums.xml180
-rw-r--r--docs/reference/gobject/meson.build57
-rw-r--r--docs/reference/gobject/tut_gsignal.xml4
-rw-r--r--docs/reference/gobject/tut_gtype.xml2
-rw-r--r--gio/Makefile.am24
-rw-r--r--gio/completion/gsettings4
-rwxr-xr-xgio/data-to-c.pl37
-rwxr-xr-x[-rw-r--r--]gio/data-to-c.py2
-rw-r--r--gio/gappinfo.c30
-rw-r--r--gio/gappinfo.h12
-rw-r--r--gio/gapplication.c7
-rw-r--r--gio/gapplicationcommandline.c12
-rw-r--r--gio/gasynchelper.c4
-rw-r--r--gio/gasyncresult.c21
-rw-r--r--gio/gbufferedinputstream.c2
-rw-r--r--gio/gcancellable.c16
-rw-r--r--gio/gdbus-2.0/codegen/Makefile.am2
-rwxr-xr-x[-rw-r--r--]gio/gdbus-2.0/codegen/gdbus-codegen.in14
-rw-r--r--gio/gdbus-2.0/codegen/meson.build22
-rw-r--r--gio/gdbus-tool.c253
-rw-r--r--gio/gdbusaddress.c6
-rw-r--r--gio/gdbusauth.c9
-rw-r--r--gio/gdbusauthmechanismsha1.c10
-rw-r--r--gio/gdbusconnection.c16
-rw-r--r--gio/gdbuserror.c2
-rw-r--r--gio/gdbusinterfaceskeleton.c2
-rw-r--r--gio/gdbusmessage.c14
-rw-r--r--gio/gdbusnamewatching.h2
-rw-r--r--gio/gdbusobjectmanagerclient.c18
-rw-r--r--gio/gdesktopappinfo.c80
-rw-r--r--gio/gdtlsconnection.c4
-rw-r--r--gio/gfile.c236
-rw-r--r--gio/gfile.h19
-rw-r--r--gio/gfileenumerator.c2
-rw-r--r--gio/gioenums.h2
-rw-r--r--gio/giomodule.c4
-rw-r--r--gio/giotypes.h12
-rw-r--r--gio/glib-compile-resources.c8
-rw-r--r--gio/glib-compile-schemas.c4
-rw-r--r--gio/glistmodel.c18
-rw-r--r--gio/glocalfile.c56
-rw-r--r--gio/glocalfileinfo.c121
-rw-r--r--gio/glocalfileinfo.h5
-rw-r--r--gio/glocalfileoutputstream.c8
-rw-r--r--gio/gmount.c9
-rw-r--r--gio/gopenuriportal.c4
-rw-r--r--gio/gosxappinfo.c38
-rw-r--r--gio/gosxcontenttype.c103
-rw-r--r--gio/goutputstream.c10
-rw-r--r--gio/gpollfilemonitor.c3
-rw-r--r--gio/gresource.c54
-rw-r--r--gio/gresourcefile.c125
-rw-r--r--gio/gschema.dtd5
-rw-r--r--gio/gseekable.c12
-rw-r--r--gio/gsettings.c8
-rw-r--r--gio/gsettingsbackend.c4
-rw-r--r--gio/gsettingsschema.c17
-rw-r--r--gio/gsimpleasyncresult.c7
-rw-r--r--gio/gsocket.c483
-rw-r--r--gio/gsocket.h12
-rw-r--r--gio/gsocketlistener.h2
-rw-r--r--gio/gsubprocess.c2
-rw-r--r--gio/gsubprocesslauncher.c20
-rw-r--r--gio/gtask.c23
-rw-r--r--gio/gthreadedresolver.c4
-rw-r--r--gio/gtlsbackend.c30
-rw-r--r--gio/gtlsdatabase.c4
-rw-r--r--gio/gtlspassword.c4
-rw-r--r--gio/gunixmounts.c147
-rw-r--r--gio/gunixmounts.h6
-rw-r--r--gio/gvolume.c2
-rw-r--r--gio/gvolumemonitor.c5
-rw-r--r--gio/inotify/inotify-helper.c16
-rw-r--r--gio/inotify/inotify-path.c5
-rw-r--r--gio/kqueue/kqueue-helper.c4
-rw-r--r--gio/meson.build14
-rw-r--r--gio/tests/Makefile.am28
-rw-r--r--gio/tests/appinfo.c83
-rw-r--r--gio/tests/contenttype.c75
-rw-r--r--gio/tests/dbus-launch.c2
-rw-r--r--gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop2
-rw-r--r--gio/tests/file.c120
-rw-r--r--gio/tests/g-file-info-filesystem-readonly.c176
-rw-r--r--gio/tests/g-file-info.c367
-rw-r--r--gio/tests/gdbus-proxy.c24
-rw-r--r--gio/tests/gmenumodel.c48
-rw-r--r--gio/tests/gschema-compile.c1
-rw-r--r--gio/tests/httpd.c15
-rw-r--r--gio/tests/meson.build3
-rw-r--r--gio/tests/resources.c101
-rw-r--r--gio/tests/schema-tests/enum-with-invalid-value.gschema.xml10
-rw-r--r--gio/tests/socket.c48
-rw-r--r--gio/tests/unix-mounts.c57
-rwxr-xr-x[-rw-r--r--]glib-gettextize.in0
-rw-r--r--glib/Makefile.am2
-rw-r--r--glib/docs.c14
-rw-r--r--glib/gbase64.c4
-rw-r--r--glib/gbookmarkfile.c2
-rw-r--r--glib/gbytes.c9
-rw-r--r--glib/gconvert.c13
-rw-r--r--glib/gconvert.h2
-rw-r--r--glib/gdataset.c71
-rw-r--r--glib/gdate.c29
-rw-r--r--glib/gdate.h2
-rw-r--r--glib/gdatetime.c337
-rw-r--r--glib/gdatetime.h4
-rw-r--r--glib/genviron.c55
-rw-r--r--glib/gfileutils.c86
-rw-r--r--glib/gfileutils.h3
-rw-r--r--glib/ghook.c2
-rw-r--r--glib/giochannel.c2
-rw-r--r--glib/giowin32.c4
-rw-r--r--glib/gkeyfile.c56
-rw-r--r--glib/glib-private.c7
-rw-r--r--glib/glib-private.h18
-rw-r--r--glib/glib-unix.c2
-rw-r--r--glib/glibconfig.h.win32.in109
-rw-r--r--glib/gmacros.h8
-rw-r--r--glib/gmain.c121
-rw-r--r--glib/gmain.h34
-rw-r--r--glib/gmem.c3
-rw-r--r--glib/gmessages.c84
-rw-r--r--glib/gmessages.h33
-rw-r--r--glib/goption.c4
-rw-r--r--glib/gpoll.c8
-rw-r--r--glib/gprintf.c14
-rw-r--r--glib/gregex.c2
-rw-r--r--glib/gregex.h6
-rw-r--r--glib/gscanner.c2
-rw-r--r--glib/gshell.c14
-rw-r--r--glib/gslice.c18
-rw-r--r--glib/gslist.c92
-rw-r--r--glib/gspawn.c41
-rw-r--r--glib/gspawn.h2
-rw-r--r--glib/gstdio.c590
-rw-r--r--glib/gstdioprivate.h65
-rw-r--r--glib/gstrfuncs.c32
-rw-r--r--glib/gstringchunk.c2
-rwxr-xr-xglib/gtester-report9
-rw-r--r--glib/gtester.c26
-rw-r--r--glib/gtestutils.c119
-rw-r--r--glib/gtestutils.h18
-rw-r--r--glib/gthread-posix.c17
-rw-r--r--glib/gtypes.h4
-rw-r--r--glib/gunicode.h8
-rw-r--r--glib/gutf8.c2
-rw-r--r--glib/gutils.c178
-rw-r--r--glib/gutils.h3
-rw-r--r--glib/gvariant-parser.c2
-rw-r--r--glib/gvariant.c2
-rw-r--r--glib/gversionmacros.h24
-rw-r--r--glib/meson.build13
-rw-r--r--glib/pcre/pcre_compile.c2
-rw-r--r--glib/tests/array-test.c2
-rw-r--r--glib/tests/autoptr.c5
-rw-r--r--glib/tests/bytes.c2
-rw-r--r--glib/tests/convert.c6
-rw-r--r--glib/tests/date.c27
-rw-r--r--glib/tests/fileutils.c30
-rw-r--r--glib/tests/gdatetime.c321
-rw-r--r--glib/tests/slist.c73
-rw-r--r--glib/tests/unix.c2
-rw-r--r--glib/tests/utf8-misc.c5
-rw-r--r--glib/tests/utils.c27
-rw-r--r--gmodule/gmodule-dl.c9
-rw-r--r--gmodule/gmodule-win32.c8
-rw-r--r--gmodule/gmodule.c4
-rw-r--r--gobject/Makefile.am1
-rw-r--r--gobject/gboxed.c8
-rw-r--r--gobject/gclosure.c8
-rwxr-xr-xgobject/glib-genmarshal.in25
-rwxr-xr-xgobject/glib-mkenums.in39
-rw-r--r--gobject/gobject.c40
-rw-r--r--gobject/gparam.c4
-rw-r--r--gobject/gsignal.c4
-rw-r--r--gobject/gvalue.h2
-rw-r--r--gobject/gvaluearray.c2
-rw-r--r--gobject/meson.build4
-rw-r--r--m4macros/glib-2.0.m45
-rw-r--r--m4macros/glib-gettext.m45
-rw-r--r--m4macros/glibtests.m43
-rw-r--r--m4macros/gsettings.m43
-rw-r--r--meson.build15
-rw-r--r--po/cs.po892
-rw-r--r--po/de.po841
-rw-r--r--po/es.po921
-rw-r--r--po/nb.po860
-rw-r--r--po/sl.po300
-rw-r--r--tests/assert-msg-test.gdb3
-rw-r--r--tests/timeloop-basic.c4
-rw-r--r--win32/gen_util_scripts.py1
-rw-r--r--win32/setup.py1
-rw-r--r--win32/vs10/glib-version-paths.props.in20
-rw-r--r--win32/vs9/glib-version-paths.vsprops.in22
209 files changed, 8043 insertions, 3372 deletions
diff --git a/NEWS b/NEWS
index d2eaa9499..d51be0b3f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,61 +1,146 @@
-Overview of changes in GLib 2.54.3
+Overview of changes in GLib 2.55.0
==================================
-* Bugs fixed:
+* New API:
+ - g_clear_handle_id, to simplify removing sources from the default mainloop
+ - g_file_load_bytes, to make it more convenient to load files into GBytes
+
+* Bugs fixed:
+ 330458 Sample code for the GLib Key-value parser
+ 483341 g_error and friends create warnings when not used in MSVC
+ 569375 g[u]intptr undocumented
+ 573251 documentation for g_seekable_truncate() needs some love
+ 629347 Missing annotations in GFile (was: Perf throws an exception in cur...
+ 630983 [PATCH] Type accuracy for result of strlen() in string utilities.
+ 632953 Clarify documentation of GValueTransform.
+ 636210 Document that pre-unmount is not guaranteed and backend-dependant
+ 656502 type information for GSettings::backend missing from .gir
+ 661442 Nautilus crashes when refreshing home folder after modifying ~/.co...
+ 668035 gtester-report broken with python 2.7.2 and glib 2.30.1
+ 670139 gbytes.c:try_steal_and_unref nit
+ 677233 (transfer full) annotation not correct for g_closure_new_simple re...
+ 679347 glocalfile seems to leak 'fstype'
+ 679467 Mention translation in g_warning() documentation
+ 689323 Variable scoping in gunixmounts.c
691436 glib-mkenums output arch dependent
- 761102 Increase performance for main loop
- 776147 gio/glocalfilemonitor.c doesn't handle case G_FILE_MONITOR_EVENT_MOVE...
+ 695681 gsettings bash completion put error messages
+ 705331 AM_PATH_GLIB_2_0 macro fails with -Wstrict-prototypes -Werror
+ 706667 Fix permission denied error when installing from an nfs directory
+ 711809 gdbus-proxy: Fix erroneous timeout during following tests
+ 722256 gslist: Simplified node removal and got rid of some code duplication
+ 723655 Socket source is left in the poll after the socket is closed
+ 723743 g_child_watch_add() doesn't check for non-pids
+ 725014 g_settings_schema_source_ref should check for NULL pointer
+ 727346 docs: Escape some backslashes for markdown
+ 730296 gsignal: Fix a potential NULL pointer dereference
+ 731625 Improve test for darwin printf format-strings
+ 731705 gio/tests/desktop-app-info assumes /bin/true
+ 737278 Clarify relationship of g_application_quit() to hold count
+ 738176 Skip GSpawnChildSetupFunc closures in introspection
+ 740223 source_object for GAsyncResult should be nullable
+ 740791 gio: cannot specify the source when joining a multicast group (IGM...
+ 740826 glib doesn't know fuse filesystems
+ 742548 configure.ac: stay out of autoconf's namespace
+ 742997 Don't skip invalid enum values in schemas
+ 745723 -Wunused-but-set-variable work-around no longer sufficient
+ 749371 Use a GHashTable as a set when possible
+ 751738 Unused-variable warnings in glib/tests/autoptr.c
+ 752239 Missing dependency for python files in build file
+ 752240 Add DTLS support to GIO
+ 753459 GDateTime: Add conversion functions from/to ISO 8601 strings
+ 753521 g_subprocess_launcher_set_environ misses argument annotations
+ 754026 gfileutils: add some sanity checks
+ 756009 'const gchar* const *' gets incorrectly defaulted to utf8
+ 756103 Skip g_base64_decode_step() in introspection
+ 756128 Fix up annotations in gconvert
+ 756430 g_rw_lock_reader_lock() can return without locking, or error
+ 756470 Fix up annotations in gdataset.c
+ 756588 Fix up annotations on data/qdata API of GObject
+ 760022 Memory leak in gvariant-parser.c
+ 760109 [PATCH] Invalid GDate can't be g_boxed_copy()'d
+ 760716 Fix documentation regarding <glib/gprintf.h>
+ 765063 Update annotations for gio
+ 765552 Please set serial in .m4 files to prevent autoreconf failure on up...
+ 767215 GCC version number is interpreted as start of a list in docs for g...
+ 767239 Tautological comparisons in convert tests
+ 769674 some GIO tests' arbitrary timeouts are too short
+ 769846 gmessages: Add timestamp to g_log_writer_format_fields()
+ 770459 Tutorial article is slightly wrong
+ 773355 Incorrect documentation about stopping a signal emission from a hook
+ 774083 spelling mistakes in glib: charater
+ 776562 Add Intel C Compiler support for G_GNUC_BEGIN/END_IGNORE_DEPRECATI...
+ 777308 GModule win32: disable error dialog popup
+ 777310 gio/gasynchelper.c: fix cast from pointer to smaller int type on w...
+ 777956 gmessages: Update advice for G_LOG_DOMAIN
779182 xdg-open fails with gio open for some uris
- 782057 Unit tests fail in run-assert-msg-test.sh
- 785113 glib-mkenums Python port fixes
- 788990 Include licensing information in output from glib-mkenums, glib-genma...
+ 779501 Type of GIConv given wrongly on web
+ 780202 introspection: Don't expose GValueArray.free
+ 780296 xdg-open/gnome-open doesn't work if service isn't started
+ 781598 gstdio.h should #include what it needs to work
+ 781867 various gvfsd-* wants to look in /boot/efi, causes unnecessary/ina...
+ 783210 build: Switch to sassc for generating style
+ 783270 Improve Visual Studio support for Meson builds
+ 783825 Suggest that asynchronous operations should invoke the callback in...
+ 786737 No g_variant_get() example for dicts
+ 786785 Commit #fe2a9887a8 breaks gdbus-codegen, cannot find its module so...
+ 787271 Make GListModel usable from G-I bindings
+ 787485 g_tls_backend_supports_dtls () returns true when the backend doesn't
+ 787551 Factor out some duplicated code in GParamSpec validation
+ 787581 tests: Add tests for g_slist_copy() and g_slist_copy_deep()
+ 787671 meson: Fix permissions of installed scripts
+ 787731 g_file_query_filesystem_info() wrongly reports "filesystem::readon...
+ 788138 glib-compile-resources: Fix leak of a GHashTable
+ 788180 G_FILE_ATTRIBUTE_ID_FILE is useless on W32
+ 788270 gmodule - failed to load symbol on Android 64bit
+ 788368 Race condition in GDbusObjectManagerClient
+ 788384 gtypes: Fix signedness of __builtin_bswap() usage
+ 788385 gtestutils: Explicitly cast args to g_assertion_message_cmpnum()
+ 788401 PATCH: MacOS build cannot detect content type from content - xdgmi...
+ 788467 Fatal errors and warnings should be reported as TAP
+ 788488 GFile-based API for g_build_filename()
+ 788489 gmain: add g_clear_source API
+ 788561 Document how to integrate GTest into your project
+ 788594 gdbus-tool doesn’t handle non-message-bus connections correctly
+ 788705 Allow building GLib on older Linux platforms
+ 788766 fixed a doc-typo in socket_get_remote_address
+ 788772 meson installs gdb scripts incorrectly
+ 788863 Add more filename type annotations for strings which can contain f...
+ 788880 gunixmounts: Update list of virtual file systems to ignore
+ 788927 Expose better API for detecting ‘system’ mounts
+ 788936 Show mime type icons on OS X
+ 788948 Document Autotools best practices for genmarshal/mkenums
+ 788975 Meson + Visual Studio: Can't find zlib.h with subprojects/zlib
+ 788978 Document XML has a syntax error
+ 788989 Use subdir-objects with Autotools
+ 788990 Include licensing information in output from glib-mkenums, glib-ge...
+ 789087 gint and guint misrepresented as functions
+ 789170 GFormatSizeFlags should have a value for bits
+ 789245 g_settings_bind() not conforming to lifecycle specification
+ 789444 Fix handling of length in g_utf8_make_valid
789637 glib-mkenums: Fails when --ouput file does not exist
- 789894 Text tool has color from previous line, when overwriting existing text
+ 789681 meson: Libmount support not built
+ 789723 [PATCH] gdbus-codegen: Call abspath() earlier
+ 789755 g_get_host_name: ensure return value is always UTF8 encoded
+ 789820 GPollFileMonitor is not cleaning up correctly
+ 790015 docs: Various linking and syntax fixes
790030 GResource/GVariant fails to load from non-pointer aligned memory
790093 gio-tool: fix inverted logic in monitor tool
790126 gengiotypefuncs.py is missing from tarballs
- 790829 glib-genmarshal --body must not generate alias implementations
- 790934 gtester doesn't handle skipped tests
- 791235 Fix gschema.dtd regarding flags.
- 791267 Make gschema.dtd usable.
- 791296 gtester-report: fix range usage when running as python3 app
- 791325 Gio handling of thumbnail:: attribute namespace causes inconsistent b...
- 791334 gbinding.c:898: The target object of type GNetworkAddress has no prop...
- 791337 Crash opening URIs with g_desktop_app_info_launch_uris_with_spawn()
- 791720 Criticals in gio/xdp-dbus.h leading to crash under flatpak
- 791744 gmenumodel test sometimes fails: assertion failed (items_changed_coun...
- 791754 gdbus-peer test intermittently fails: assertion 'source->ref_count > ...
- 791906 GSocketListenerClass.event has wrong signature
-
-* Translation updates:
- Norwegian bokmål
-
-
-Overview of changes in GLib 2.54.2
-==================================
-
-* Bugs fixed:
- 780296 Fix a race in gio open
+ 790147 build: Drop data-to-c.pl in favour of data-to-c.py
+ 790157 gmessages: Give examples of G_DEBUG with gdb in the documentation
+ 790272 file: add g_file_load_bytes()
+ 790275 avoid temporary string allocations in g_resources_enumerate_children
+ 790310 speedup path canonicalization in GResourceFile
* Translation updates:
Catalan (Valencian)
+ Czech
+ German
Nepali
+ Norwegian bokmål
Slovak
Slovenian
-
-
-Overview of changes in GLib 2.54.1
-==================================
-
-* Bugs fixed:
- 786737 No g_variant_get() example for dicts
- 787551 Factor out some duplicated code in GParamSpec validation
- 783270 Improve Visual Studio support for Meson builds
- 783210 build: Switch to sassc for generating style
- 781867 various gvfsd-* wants to look in /boot/efi, causes unnecessary/inappro...
-
-* Translation updates:
- Slovenian
+ Spanish
Overview of changes in GLib 2.54.0
diff --git a/config.h.meson b/config.h.meson
index ac0b5e0b7..3f310b3c9 100644
--- a/config.h.meson
+++ b/config.h.meson
@@ -247,6 +247,9 @@
/* Define if libelf is available */
#mesondefine HAVE_LIBELF
+/* Define if libmount is available */
+#mesondefine HAVE_LIBMOUNT
+
/* Define to 1 if you have the <linux/magic.h> header file. */
#mesondefine HAVE_LINUX_MAGIC_H
@@ -364,6 +367,9 @@
/* Define if you have the 'sig_atomic_t' type. */
#mesondefine HAVE_SIG_ATOMIC_T
+/* Define if there is support for the ioctl request SIOCGIFADDR. */
+#mesondefine HAVE_SIOCGIFADDR
+
/* Define to 1 if you have the `snprintf' function. */
#mesondefine HAVE_SNPRINTF
@@ -376,6 +382,9 @@
/* Define to 1 if you have the `statvfs' function. */
#mesondefine HAVE_STATVFS
+/* Define to 1 if you have the `mkostemp' function. */
+#mesondefine HAVE_MKOSTEMP
+
/* Define to 1 if you have the <stddef.h> header file. */
#mesondefine HAVE_STDDEF_H
diff --git a/config.h.win32.in b/config.h.win32.in
index 7bb9a13c6..b607cca9c 100644
--- a/config.h.win32.in
+++ b/config.h.win32.in
@@ -57,16 +57,16 @@
/* A 'va_copy' style function */
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
-#define G_VA_COPY va_copy
+# define G_VA_COPY va_copy
#else /* _MSC_VER && _MSC_VER < 1800 */
/* #undef G_VA_COPY */
-#endif /* _MSC_VER */
+#endif
/* 'va_lists' cannot be copies as values */
/* #undef G_VA_COPY_AS_ARRAY */
/* Define to 1 if you have `alloca', as a function or macro. */
-#define HAVE_ALLOCA 1
+/* #undef HAVE_ALLOCA */
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
@@ -80,11 +80,11 @@
/* Define if you have a version of the snprintf function with semantics as
specified by the ISO C99 standard. */
-/* #undef HAVE_C99_SNPRINTF */
+#undef HAVE_C99_SNPRINTF
/* Define if you have a version of the vsnprintf function with semantics as
specified by the ISO C99 standard. */
-/* #undef HAVE_C99_VSNPRINTF */
+#undef HAVE_C99_VSNPRINTF
/* define to 1 if Carbon is available */
/* #undef HAVE_CARBON */
@@ -110,9 +110,9 @@
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#ifndef _MSC_VER
-#define HAVE_DIRENT_H 1
+# define HAVE_DIRENT_H 1
#else
-/* #undef HAVE_DIRENT_H */
+/* # undef HAVE_DIRENT_H */
#endif
/* Define to 1 if you have the <dlfcn.h> header file. */
@@ -196,52 +196,33 @@
/* Define to 1 if you have the `hasmntopt' function. */
/* #undef HAVE_HASMNTOPT */
-/* Target the Windows XP API */
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
-#endif
-
-#if _WIN32_WINNT >= 0x0600
-/* if_indextoname() and if_nametoindex() are available on Windows Vista/Server
- * 2008 or later, so we can make use of them when building agaist Vista/Server
- * 2008 or later.
- */
-
/* Define to 1 if you have the `if_indextoname' function. */
#define HAVE_IF_INDEXTONAME 1
/* Define to 1 if you have the `if_nametoindex' function. */
#define HAVE_IF_NAMETOINDEX 1
-#endif
-
/* Define to 1 if you have the `inotify_init1' function. */
/* #undef HAVE_INOTIFY_INIT1 */
/* define to support printing 64-bit integers with format I64 */
-#define HAVE_INT64_AND_I64 1
+/* #undef HAVE_INT64_AND_I64 */
/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
#if !defined (_MSC_VER) || (_MSC_VER >= 1600)
-#define HAVE_INTMAX_T 1
-#else /* !_MSC_VER || _MSC_VER >= 1600 */
-/* #undef HAVE_INTMAX_T */
-#endif /* _MSC_VER < 1600 */
+# define HAVE_INTMAX_T 1
+#endif
/* Define to 1 if you have the <inttypes.h> header file. */
#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
-#define HAVE_INTTYPES_H 1
-#else /* !_MSC_VER || _MSC_VER >= 1800 */
-/* #undef HAVE_INTTYPES_H */
-#endif /* _MSC_VER < 1800 */
+# define HAVE_INTTYPES_H 1
+#endif
/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
declares uintmax_t. */
-#ifndef _MSC_VER
-#define HAVE_INTTYPES_H_WITH_UINTMAX 1
-#else /* !_MSC_VER */
-/* #undef HAVE_INTTYPES_H_WITH_UINTMAX */
-#endif /* _MSC_VER */
+#if !defined (_MSC_VER) || (_MSC_VER >= 1800)
+# define HAVE_INTTYPES_H_WITH_UINTMAX 1
+#endif
/* Define if we have struct ip_mreqn */
/* #undef HAVE_IP_MREQN */
@@ -295,7 +276,7 @@
#define HAVE_LONG_LONG 1
/* define if system printf can print long long */
-#define HAVE_LONG_LONG_FORMAT 1
+/* #undef HAVE_LONG_LONG_FORMAT */
/* Define to 1 if you have the `lstat' function. */
/* #undef HAVE_LSTAT */
@@ -333,12 +314,6 @@
/* Define to 1 if you have the `newlocale' function. */
/* #undef HAVE_NEWLOCALE */
-/* Have non-POSIX function getgrgid_r */
-/* #undef HAVE_NONPOSIX_GETGRGID_R */
-
-/* Have non-POSIX function getpwuid_r */
-/* #undef HAVE_NONPOSIX_GETPWUID_R */
-
/* open option O_DIRECTORY */
/* #undef HAVE_OPEN_O_DIRECTORY */
@@ -348,12 +323,6 @@
/* Define to 1 if you have the `poll' function. */
/* #undef HAVE_POLL */
-/* Have POSIX function getgrgid_r */
-/* #undef HAVE_POSIX_GETGRGID_R */
-
-/* Have POSIX function getpwuid_r */
-/* #undef HAVE_POSIX_GETPWUID_R */
-
/* Define to 1 if you have the `posix_memalign' function. */
/* #undef HAVE_POSIX_MEMALIGN */
@@ -363,11 +332,17 @@
/* Have function pthread_attr_setstacksize */
/* #undef HAVE_PTHREAD_ATTR_SETSTACKSIZE */
+/* Have function pthread_cond_timedwait_relative_np */
+/* #undef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP */
+
/* Have function pthread_condattr_setclock */
/* #undef HAVE_PTHREAD_CONDATTR_SETCLOCK */
-/* Have function pthread_cond_timedwait_relative_np */
-/* #undef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE_NP */
+/* Have function pthread_setname_np without TID as argument */
+/* #undef HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID */
+
+/* Have function pthread_setname_np with TID as argument */
+/* #undef HAVE_PTHREAD_SETNAME_NP_WITH_TID */
/* Define to 1 if the system has the type `ptrdiff_t'. */
#define HAVE_PTRDIFF_T 1
@@ -375,6 +350,9 @@
/* Define to 1 if you have the `readlink' function. */
/* #undef HAVE_READLINK */
+/* Define to 1 if you have the `recvmmsg' function. */
+/* #undef HAVE_RECVMMSG */
+
/* Define to 1 if you have the 'res_init' function. */
/* #undef HAVE_RES_INIT */
@@ -384,15 +362,12 @@
/* Define to 1 if libselinux is available */
/* #undef HAVE_SELINUX */
-/* Define to 1 if you have the `sendmmsg` function */
-/* #undef HAVE_SENDMMSG */
-
-/* Define to 1 if you have the `recvmmsg` function */
-/* #undef HAVE_RECVMMSG */
-
/* Define to 1 if you have the <selinux/selinux.h> header file. */
/* #undef HAVE_SELINUX_SELINUX_H */
+/* Define to 1 if you have the `sendmmsg' function. */
+/* #undef HAVE_SENDMMSG */
+
/* Define to 1 if you have the `setenv' function. */
/* #undef HAVE_SETENV */
@@ -403,14 +378,10 @@
#define HAVE_SIG_ATOMIC_T 1
/* Define to 1 if you have the `snprintf' function. */
-#if !defined (_MSC_VER) || (_MSC_VER >= 1900)
#define HAVE_SNPRINTF 1
-#ifdef __DMC__
-#define snprintf _snprintf
+#if defined (_MSC_VER) && (_MSC_VER < 1900)
+# define snprintf _snprintf
#endif
-#else /* !_MSC_VER || _MSC_VER >= 1900 */
-/* #undef HAVE_SNPRINTF */
-#endif /* _MSC_VER < 1900 */
/* Define to 1 if you have the `splice' function. */
/* #undef HAVE_SPLICE */
@@ -421,60 +392,57 @@
/* Define to 1 if you have the `statvfs' function. */
/* #undef HAVE_STATVFS */
+/* Define to 1 if you have the <stddef.h> header file. */
+#define HAVE_STDDEF_H 1
+
/* Define to 1 if you have the <stdint.h> header file. */
-#ifndef _MSC_VER
-#define HAVE_STDINT_H 1
-#else /* _MSC_VER */
-#if (_MSC_VER >= 1600) /*VS 2010 ships with stdint.h*/
-#define HAVE_STDINT_H 1
-#else
-/* #undef HAVE_STDINT_H */
+#if !defined (_MSC_VER) || (_MSC_VER >= 1600)
+# define HAVE_STDINT_H 1
#endif
-#endif /* _MSC_VER */
/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
uintmax_t. */
-#ifndef _MSC_VER
-#define HAVE_STDINT_H_WITH_UINTMAX 1
-#else /* _MSC_VER */
-#if (_MSC_VER >= 1600)
-#define HAVE_STDINT_H_WITH_UINTMAX 1
-#else
-/* #undef HAVE_STDINT_H_WITH_UINTMAX */
+#if !defined (_MSC_VER) || (_MSC_VER >= 1600)
+# define HAVE_STDINT_H_WITH_UINTMAX 1
#endif
-#endif /* _MSC_VER */
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */
/* #undef HAVE_STPCPY */
/* Define to 1 if you have the `strcasecmp' function. */
-#if defined(_MSC_VER)
-#define strcasecmp _stricmp
-#endif /* _MSC_VER uses _stricmp, which is identical to strcasecmp */
-
-#if !defined(__DMC__)
#define HAVE_STRCASECMP 1
-#endif /* _MSC_VER or __gcc__ */
+#ifdef _MSC_VER
+# define strcasecmp _stricmp
+#endif
+
+/* Define to 1 if you have the `strerror_r' function. */
+/* #undef HAVE_STRERROR_R */
+
+/* Define if strerror_r returns char * */
+/* #undef STRERROR_R_CHAR_P */
/* Define to 1 if you have the <strings.h> header file. */
-#if !defined(_MSC_VER) && !defined(__DMC__)
-#define HAVE_STRINGS_H 1
-#else /* _MSC_VER or __DMC__ */
-/* #undef HAVE_STRINGS_H */
-#endif /* _MSC_VER or __DMC__ */
+#ifndef _MSC_VER
+# define HAVE_STRINGS_H 1
+#endif
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
/* Have functions strlcpy and strlcat */
/* #undef HAVE_STRLCPY */
/* Define to 1 if you have the `strncasecmp' function. */
-#if !defined(__DMC__)
-#if defined(_MSC_VER)
-#define strncasecmp _strnicmp
-#endif /* _MSC_VER uses _strnicmp, which is identical to strncasecmp */
#define HAVE_STRNCASECMP 1
-#else /* __DMC__ */
-/* #undef HAVE_STRNCASECMP */
-#endif /* __DMC__ */
+#ifdef _MSC_VER
+# define strncasecmp _strnicmp
+#endif
+
+/* Define to 1 if you have the `strnlen' function. */
+#define HAVE_STRNLEN 1
/* Define to 1 if you have the `strsignal' function. */
/* #undef HAVE_STRSIGNAL */
@@ -539,7 +507,7 @@
/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC */
-/* Define to 1 if `tm_gmtoff' is a a member of `struct tm'. */
+/* Define to 1 if `tm_gmtoff' is a member of `struct tm'. */
/* #undef HAVE_STRUCT_TM_TM_GMTOFF */
/* Define to 1 if `__tm_gmtoff' is a member of `struct tm'. */
@@ -581,14 +549,12 @@
/* #undef HAVE_SYS_NDIR_H */
/* Define to 1 if you have the <sys/param.h> header file. */
-#if !defined(_MSC_VER) && !defined(__DMC__)
-#define HAVE_SYS_PARAM_H 1
-#else /* _MSC_VER or __DMC__ */
-/* #undef HAVE_SYS_PARAM_H */
-#endif /* _MSC_VER or __DMC__ */
+#ifndef _MSC_VER
+# define HAVE_SYS_PARAM_H 1
+#endif
-/* Define to 1 if you have the <sys/prctl.h> header file. */
-/* #undef HAVE_SYS_PRCTL_H */
+/* Define to 1 if you have the <sys/poll.h> header file. */
+/* #undef HAVE_SYS_POLL_H */
/* Define to 1 if you have the <sys/resource.h> header file. */
/* #undef HAVE_SYS_RESOURCE_H */
@@ -613,10 +579,8 @@
/* Define to 1 if you have the <sys/time.h> header file. */
#ifndef _MSC_VER
-#define HAVE_SYS_TIME_H 1
-#else /* _MSC_VER */
-/* #undef HAVE_SYS_TIME_H */
-#endif /* _MSC_VER */
+# define HAVE_SYS_TIME_H 1
+#endif
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
@@ -664,24 +628,15 @@
/* #undef HAVE_VALLOC */
/* Define to 1 if you have the <values.h> header file. */
-#if !defined(_MSC_VER) && !defined(__DMC__)
-#define HAVE_VALUES_H 1
-#else /* _MSC_VER or __DMC__ */
-/* #undef HAVE_VALUES_H */
-#endif /* _MSC_VER or __DMC__ */
+#ifdef _MSC_VER
+# define HAVE_VALUES_H 1
+#endif
/* Define to 1 if you have the `vasprintf' function. */
#define HAVE_VASPRINTF 1
/* Define to 1 if you have the `vsnprintf' function. */
-#if !defined (_MSC_VER) || (_MSC_VER >= 1500)
#define HAVE_VSNPRINTF 1
-#ifdef __DMC__
-#define vsnprintf _vsnprintf
-#endif
-#else /* !_MSC_VER || _MSC_VER >= 1500 */
-/* #undef HAVE_VSNPRINTF */
-#endif /* _MSC_VER < 1500 */
/* Define if you have the 'wchar_t' type. */
#define HAVE_WCHAR_T 1
@@ -707,9 +662,8 @@
/* Define to 1 if you have the `_NSGetEnviron' function. */
/* #undef HAVE__NSGETENVIRON */
-/* Define to the sub-directory in which libtool stores uninstalled libraries.
- */
-#define LT_OBJDIR ".libs/"
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ""
/* Do we cache iconv descriptors */
/* #undef NEED_ICONV_CACHE */
@@ -754,28 +708,24 @@
#define SIZEOF_SHORT 2
/* The size of `size_t', as computed by sizeof. */
-#if (defined(_M_X64) || defined(_M_AMD64))
+#ifdef _WIN64
# define SIZEOF_SIZE_T 8
#else
# define SIZEOF_SIZE_T 4
#endif
/* The size of `ssize_t', as computed by sizeof. */
-#if (defined(_M_X64) || defined(_M_AMD64))
+#ifdef _WIN64
# define SIZEOF_SSIZE_T 8
#else
# define SIZEOF_SSIZE_T 4
#endif
/* The size of `void *', as computed by sizeof. */
-#ifdef _MSC_VER
-#if (defined(_M_X64) || defined(_M_AMD64))
-#define SIZEOF_VOID_P 8
-#elif (defined(_M_IX86))
-#define SIZEOF_VOID_P 4
-#endif
+#ifdef _WIN64
+# define SIZEOF_VOID_P 8
#else
-#define SIZEOF_VOID_P 4
+# define SIZEOF_VOID_P 4
#endif
/* The size of `__int64', as computed by sizeof. */
@@ -818,27 +768,27 @@
/* Enable extensions on AIX 3, Interix. */
#ifndef _ALL_SOURCE
-/* # undef _ALL_SOURCE */
+/* #undef _ALL_SOURCE */
#endif
/* Enable GNU extensions on systems that have them. */
#ifndef _GNU_SOURCE
-/* # undef _GNU_SOURCE */
+#define _GNU_SOURCE 1
#endif
/* Enable threading extensions on Solaris. */
#ifndef _POSIX_PTHREAD_SEMANTICS
-/* # undef _POSIX_PTHREAD_SEMANTICS */
+/* #undef _POSIX_PTHREAD_SEMANTICS */
#endif
/* Enable extensions on HP NonStop. */
#ifndef _TANDEM_SOURCE
-/* # undef _TANDEM_SOURCE */
+/* #undef _TANDEM_SOURCE */
#endif
/* Enable general extensions on Solaris. */
#ifndef __EXTENSIONS__
-/* # undef __EXTENSIONS__ */
+#define __EXTENSIONS__ 1
#endif
/* using the system-supplied PCRE library */
-/* This is defined in the *_PCRE MSVC project configs */
+/* This is determined in the MSVC projects */
/* #undef USE_SYSTEM_PCRE */
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
@@ -849,13 +799,13 @@
# endif
#else
# ifndef WORDS_BIGENDIAN
-/* # undef WORDS_BIGENDIAN */
+# undef WORDS_BIGENDIAN
# endif
#endif
/* Enable large inode numbers on Mac OS X 10.5. */
#ifndef _DARWIN_USE_64_BIT_INODE
-/* # define _DARWIN_USE_64_BIT_INODE 1 */
+# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
@@ -863,23 +813,16 @@
/* defines how to decorate public symbols while building */
#ifdef _MSC_VER
-#define _GLIB_EXTERN __declspec (dllexport) extern
+# define _GLIB_EXTERN __declspec (dllexport) extern
#else
-#define _GLIB_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern
+# define _GLIB_EXTERN __attribute__((visibility("default"))) __declspec (dllexport) extern
#endif
/* Define for large files, on AIX-style hosts. */
/* #undef _LARGE_FILES */
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
- this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
+/* Target the Windows 7 API */
+#define _WIN32_WINNT 0x0601
/* Needed to get declarations for msg_control and msg_controllen on Solaris */
/* #undef _XOPEN_SOURCE */
@@ -888,7 +831,7 @@
/* #undef _XOPEN_SOURCE_EXTENDED */
/* Needed to get declarations for msg_control and msg_controllen on Solaris */
-/* #undef __EXTENSIONS__ */
+#define __EXTENSIONS__ 1
/* compiler supports atomic operations */
/* #undef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 */
@@ -904,3 +847,11 @@
/* Define to `unsigned int' if <sys/types.h> does not define. */
/* #undef size_t */
+
+#define EXEEXT ".exe"
+
+/* #undef MAJOR_IN_MKDEV */
+/* #undef MAJOR_IN_SYSMACROS */
+/* #undef HAVE_RTLD_LAZY */
+/* #undef HAVE_RTLD_NOW */
+/* #undef HAVE_RTLD_GLOBAL */
diff --git a/configure.ac b/configure.ac
index 0457c90b8..5cbff1919 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,9 +30,9 @@ m4_define(glib_configure_ac)
# <mclasen> on the unstable (ie master), interface age = 0
m4_define([glib_major_version], [2])
-m4_define([glib_minor_version], [54])
-m4_define([glib_micro_version], [3])
-m4_define([glib_interface_age], [3])
+m4_define([glib_minor_version], [55])
+m4_define([glib_micro_version], [0])
+m4_define([glib_interface_age], [0])
m4_define([glib_binary_age],
[m4_eval(100 * glib_minor_version + glib_micro_version)])
m4_define([glib_version],
@@ -63,7 +63,7 @@ AC_CONFIG_MACRO_DIR([m4macros])
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS:+set}
-AM_INIT_AUTOMAKE([1.11 -Wno-portability no-define no-dist-gzip dist-xz tar-ustar])
+AM_INIT_AUTOMAKE([1.13.3 -Wno-portability no-define no-dist-gzip dist-xz tar-ustar subdir-objects])
AM_MAINTAINER_MODE([enable])
# Support silent build rules. Disable
@@ -144,7 +144,7 @@ case "$host" in
;;
esac
- AC_DEFINE([_WIN32_WINNT], [0x0501], [Target the Windows XP API])
+ AC_DEFINE([_WIN32_WINNT], [0x0601], [Target the Windows 7 API])
;;
*)
glib_native_win32=no
@@ -369,16 +369,6 @@ if test "x$enable_rebuilds" = "xyes" && \
fi
AC_SUBST(REBUILD)
-# Need full path to Perl for glib-mkenums
-#
-if test "x$PERL" != x ; then
- AC_PATH_PROG(PERL_PATH, [$PERL])
-fi
-if test "x$PERL_PATH" = x ; then
- PERL_PATH="/usr/bin/env perl"
-fi
-AC_SUBST(PERL_PATH)
-
# option to specify python interpreter to use; this just sets $PYTHON, so that
# we will fallback to reading $PYTHON if --with-python is not given, and
# python.m4 will get the expected input
@@ -700,7 +690,7 @@ AM_CONDITIONAL(HAVE_SUNSTUDIO_VISIBILITY, [test x$g_have_sunstudio_visibility =
# check for bytesex stuff
AC_C_BIGENDIAN
if test x$ac_cv_c_bigendian = xuniversal ; then
- AC_MSG_ERROR([Universal builds not supported: see https://bugs.gnome.org/742548])
+ AC_MSG_ERROR([Universal builds not supported: see https://bugzilla.gnome.org/show_bug.cgi?id=742548])
fi
@@ -890,7 +880,7 @@ int main ()
AC_MSG_RESULT($glib_ssize_type)
# Check for some functions
-AC_CHECK_FUNCS(lstat strsignal vsnprintf stpcpy strcasecmp strncasecmp poll vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk)
+AC_CHECK_FUNCS(lstat strsignal vsnprintf stpcpy strcasecmp strncasecmp poll vasprintf setenv unsetenv getc_unlocked readlink symlink fdwalk mkostemp)
AC_CHECK_FUNCS(lchmod lchown fchmod fchown utimes getresuid)
AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getfsstat getvfsstat fallocate)
case $host_os in aix*) ac_cv_func_splice=no ;; esac # AIX splice() is something else
@@ -961,6 +951,22 @@ fi
AC_CHECK_FUNCS(endservent if_nametoindex if_indextoname sendmmsg recvmmsg)
+AC_MSG_CHECKING([for SIOCGIFADDR])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+ ]],
+ [[
+ struct ifreq ifr;
+ ioctl(0, SIOCGIFADDR, &ifr);
+ ]])], [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_SIOCGIFADDR, 1, [SIOCGIFADDR is available])
+ ], [
+ AC_MSG_RESULT(no)
+])
+
AS_IF([test $glib_native_win32 = yes], [
# <wspiapi.h> in the Windows SDK and in mingw-w64 has wrappers for
# inline workarounds for getaddrinfo, getnameinfo and freeaddrinfo if
@@ -1754,8 +1760,10 @@ AS_IF([ test $have_libmount = maybe ], [
glib_save_LIBS=$LIBS
AC_CHECK_HEADER([libmount/libmount.h], [:], [have_libmount=no])
- # Check for a recent enough libmount
- AC_CHECK_LIB([mount], [mnt_unref_table], [:], [have_libmount=no])
+ # We used to check for mnt_unref_table(), but now for compat with
+ # e.g. RHEL7 just use mnt_free_table(). Let's keep this check
+ # anyways.
+ AC_CHECK_LIB([mount], [mnt_free_table], [:], [have_libmount=no])
LIBS=$glib_save_LIBS
if test $have_libmount != no; then
diff --git a/docs/reference/gio/Makefile.am b/docs/reference/gio/Makefile.am
index 5741a3edc..e04ab6843 100644
--- a/docs/reference/gio/Makefile.am
+++ b/docs/reference/gio/Makefile.am
@@ -7,8 +7,9 @@ DOC_MODULE=gio
DOC_MAIN_SGML_FILE=gio-docs.xml
# Extra options to supply to gtkdoc-scan
-SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \
- --ignore-decorators="G_GNUC_WARN_UNUSED_RESULT"
+SCAN_OPTIONS = \
+ --deprecated-guards="G_DISABLE_DEPRECATED" \
+ --ignore-decorators="GLIB_VAR|G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT|GLIB_AVAILABLE_IN_ALL|GLIB_AVAILABLE_IN_2_26|GLIB_AVAILABLE_IN_2_28|GLIB_AVAILABLE_IN_2_30|GLIB_AVAILABLE_IN_2_32|GLIB_AVAILABLE_IN_2_34|GLIB_AVAILABLE_IN_2_36|GLIB_AVAILABLE_IN_2_38|GLIB_AVAILABLE_IN_2_40|GLIB_AVAILABLE_IN_2_42|GLIB_AVAILABLE_IN_2_44|GLIB_AVAILABLE_IN_2_46|GLIB_AVAILABLE_IN_2_48|GLIB_AVAILABLE_IN_2_50|GLIB_AVAILABLE_IN_2_52|GLIB_AVAILABLE_IN_2_54|GLIB_AVAILABLE_IN_2_56|GLIB_DEPRECATED_IN_2_26|GLIB_DEPRECATED_IN_2_26_FOR|GLIB_DEPRECATED_IN_2_28|GLIB_DEPRECATED_IN_2_28_FOR|GLIB_DEPRECATED_IN_2_30|GLIB_DEPRECATED_IN_2_30_FOR|GLIB_DEPRECATED_IN_2_32|GLIB_DEPRECATED_IN_2_32_FOR|GLIB_DEPRECATED_IN_2_34|GLIB_DEPRECATED_IN_2_34_FOR|GLIB_DEPRECATED_IN_2_36|GLIB_DEPRECATED_IN_2_36_FOR|GLIB_DEPRECATED_IN_2_38|GLIB_DEPRECATED_IN_2_38_FOR|GLIB_DEPRECATED_IN_2_40|GLIB_DEPRECATED_IN_2_40_FOR|GLIB_DEPRECATED_IN_2_42|GLIB_DEPRECATED_IN_2_42_FOR|GLIB_DEPRECATED_IN_2_44|GLIB_DEPRECATED_IN_2_44_FOR|GLIB_DEPRECATED_IN_2_46|GLIB_DEPRECATED_IN_2_46_FOR|GLIB_DEPRECATED_IN_2_48|GLIB_DEPRECATED_IN_2_48_FOR|GLIB_DEPRECATED_IN_2_50|GLIB_DEPRECATED_IN_2_50_FOR|GLIB_DEPRECATED_IN_2_52|GLIB_DEPRECATED_IN_2_52_FOR|GLIB_DEPRECATED_IN_2_54|GLIB_DEPRECATED_IN_2_54_FOR|GLIB_DEPRECATED_IN_2_56|GLIB_DEPRECATED_IN_2_56_FOR"
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR =$(top_srcdir)/gio $(top_builddir)/gio
diff --git a/docs/reference/gio/gio-docs.xml b/docs/reference/gio/gio-docs.xml
index 6abd0ea79..bc23bf946 100644
--- a/docs/reference/gio/gio-docs.xml
+++ b/docs/reference/gio/gio-docs.xml
@@ -167,8 +167,6 @@
<xi:include href="xml/gproxyresolver.xml"/>
<xi:include href="xml/gsimpleproxyresolver.xml"/>
<xi:include href="xml/gsocketconnectable.xml"/>
- <xi:include href="xml/gsocketaddressenumerator.xml"/>
- <xi:include href="xml/gproxyaddressenumerator.xml"/>
<xi:include href="xml/gnetworkaddress.xml"/>
<xi:include href="xml/gnetworkservice.xml"/>
<xi:include href="xml/gsrvtarget.xml"/>
diff --git a/docs/reference/gio/gio-sections.txt b/docs/reference/gio/gio-sections.txt
index 780d249b6..e0472f7ca 100644
--- a/docs/reference/gio/gio-sections.txt
+++ b/docs/reference/gio/gio-sections.txt
@@ -85,6 +85,7 @@ g_file_new_for_commandline_arg
g_file_new_for_commandline_arg_and_cwd
g_file_new_tmp
g_file_parse_name
+g_file_new_build_filename
g_file_dup
g_file_hash
g_file_equal
@@ -183,6 +184,9 @@ g_file_mount_enclosing_volume_finish
g_file_monitor_directory
g_file_monitor_file
g_file_monitor
+g_file_load_bytes
+g_file_load_bytes_async
+g_file_load_bytes_finish
g_file_load_contents
g_file_load_contents_async
g_file_load_contents_finish
@@ -1571,6 +1575,8 @@ g_unix_mount_monitor_get
g_unix_mount_monitor_new
g_unix_mount_monitor_set_rate_limit
g_unix_is_mount_path_system_internal
+g_unix_is_system_fs_type
+g_unix_is_system_device_path
<SUBSECTION Standard>
GUnixMountMonitorClass
G_UNIX_MOUNT_MONITOR
@@ -1931,40 +1937,26 @@ GSocketConnectableIface
g_socket_connectable_enumerate
g_socket_connectable_proxy_enumerate
g_socket_connectable_to_string
+<SUBSECTION>
+GSocketAddressEnumerator
+g_socket_address_enumerator_next
+g_socket_address_enumerator_next_async
+g_socket_address_enumerator_next_finish
+<SUBSECTION>
+GProxyAddressEnumerator
<SUBSECTION Standard>
G_IS_SOCKET_CONNECTABLE
G_SOCKET_CONNECTABLE
G_SOCKET_CONNECTABLE_GET_IFACE
G_TYPE_SOCKET_CONNECTABLE
-<SUBSECTION Private>
-g_socket_connectable_get_type
-</SECTION>
-
-<SECTION>
-<FILE>gsocketaddressenumerator</FILE>
-<TITLE>GSocketAddressEnumerator</TITLE>
-GSocketAddressEnumerator
GSocketAddressEnumeratorClass
-g_socket_address_enumerator_next
-g_socket_address_enumerator_next_async
-g_socket_address_enumerator_next_finish
-<SUBSECTION Standard>
G_IS_SOCKET_ADDRESS_ENUMERATOR
G_IS_SOCKET_ADDRESS_ENUMERATOR_CLASS
G_SOCKET_ADDRESS_ENUMERATOR
G_SOCKET_ADDRESS_ENUMERATOR_CLASS
G_SOCKET_ADDRESS_ENUMERATOR_GET_CLASS
G_TYPE_SOCKET_ADDRESS_ENUMERATOR
-<SUBSECTION Private>
-g_socket_address_enumerator_get_type
-</SECTION>
-
-<SECTION>
-<FILE>gproxyaddressenumerator</FILE>
-<TITLE>GProxyAddressEnumerator</TITLE>
-GProxyAddressEnumerator
GProxyAddressEnumeratorClass
-<SUBSECTION Standard>
G_IS_PROXY_ADDRESS_ENUMERATOR
G_IS_PROXY_ADDRESS_ENUMERATOR_CLASS
G_PROXY_ADDRESS_ENUMERATOR
@@ -1974,6 +1966,8 @@ G_TYPE_PROXY_ADDRESS_ENUMERATOR
<SUBSECTION Private>
GProxyAddressEnumeratorPrivate
g_proxy_address_enumerator_get_type
+g_socket_address_enumerator_get_type
+g_socket_connectable_get_type
</SECTION>
<SECTION>
@@ -2107,6 +2101,8 @@ g_socket_get_credentials
<SUBSECTION>
g_socket_join_multicast_group
g_socket_leave_multicast_group
+g_socket_join_multicast_group_ssm
+g_socket_leave_multicast_group_ssm
g_socket_get_multicast_loopback
g_socket_set_multicast_loopback
g_socket_get_multicast_ttl
diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build
index 7f0467726..e6b1386f6 100644
--- a/docs/reference/gio/meson.build
+++ b/docs/reference/gio/meson.build
@@ -82,6 +82,62 @@ if get_option('with-docs') != 'no'
'thumbnail-verify.h',
'xdp-dbus.h',
]
+
+ ignore_decorators = [
+ 'GLIB_VAR',
+ 'G_GNUC_INTERNAL',
+ 'G_GNUC_WARN_UNUSED_RESULT',
+ 'GLIB_AVAILABLE_IN_ALL',
+ 'GLIB_AVAILABLE_IN_2_26',
+ 'GLIB_AVAILABLE_IN_2_28',
+ 'GLIB_AVAILABLE_IN_2_30',
+ 'GLIB_AVAILABLE_IN_2_32',
+ 'GLIB_AVAILABLE_IN_2_34',
+ 'GLIB_AVAILABLE_IN_2_36',
+ 'GLIB_AVAILABLE_IN_2_38',
+ 'GLIB_AVAILABLE_IN_2_40',
+ 'GLIB_AVAILABLE_IN_2_42',
+ 'GLIB_AVAILABLE_IN_2_44',
+ 'GLIB_AVAILABLE_IN_2_46',
+ 'GLIB_AVAILABLE_IN_2_48',
+ 'GLIB_AVAILABLE_IN_2_50',
+ 'GLIB_AVAILABLE_IN_2_52',
+ 'GLIB_AVAILABLE_IN_2_54',
+ 'GLIB_AVAILABLE_IN_2_56',
+ 'GLIB_DEPRECATED_IN_2_26',
+ 'GLIB_DEPRECATED_IN_2_26_FOR',
+ 'GLIB_DEPRECATED_IN_2_28',
+ 'GLIB_DEPRECATED_IN_2_28_FOR',
+ 'GLIB_DEPRECATED_IN_2_30',
+ 'GLIB_DEPRECATED_IN_2_30_FOR',
+ 'GLIB_DEPRECATED_IN_2_32',
+ 'GLIB_DEPRECATED_IN_2_32_FOR',
+ 'GLIB_DEPRECATED_IN_2_34',
+ 'GLIB_DEPRECATED_IN_2_34_FOR',
+ 'GLIB_DEPRECATED_IN_2_36',
+ 'GLIB_DEPRECATED_IN_2_36_FOR',
+ 'GLIB_DEPRECATED_IN_2_38',
+ 'GLIB_DEPRECATED_IN_2_38_FOR',
+ 'GLIB_DEPRECATED_IN_2_40',
+ 'GLIB_DEPRECATED_IN_2_40_FOR',
+ 'GLIB_DEPRECATED_IN_2_42',
+ 'GLIB_DEPRECATED_IN_2_42_FOR',
+ 'GLIB_DEPRECATED_IN_2_44',
+ 'GLIB_DEPRECATED_IN_2_44_FOR',
+ 'GLIB_DEPRECATED_IN_2_46',
+ 'GLIB_DEPRECATED_IN_2_46_FOR',
+ 'GLIB_DEPRECATED_IN_2_48',
+ 'GLIB_DEPRECATED_IN_2_48_FOR',
+ 'GLIB_DEPRECATED_IN_2_50',
+ 'GLIB_DEPRECATED_IN_2_50_FOR',
+ 'GLIB_DEPRECATED_IN_2_52',
+ 'GLIB_DEPRECATED_IN_2_52_FOR',
+ 'GLIB_DEPRECATED_IN_2_54',
+ 'GLIB_DEPRECATED_IN_2_54_FOR',
+ 'GLIB_DEPRECATED_IN_2_56',
+ 'GLIB_DEPRECATED_IN_2_56_FOR',
+ ]
+
# FIXME: More win32 headers were added to fix building gio-scan
# FIXME: ExampleAnimal docs aren't built
@@ -105,7 +161,7 @@ if get_option('with-docs') != 'no'
scan_args : [
'--rebuild-types',
'--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=G_GNUC_WARN_UNUSED_RESULT',
+ '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/glib/Makefile.am b/docs/reference/glib/Makefile.am
index 8dbb069ee..44536cf21 100644
--- a/docs/reference/glib/Makefile.am
+++ b/docs/reference/glib/Makefile.am
@@ -14,7 +14,9 @@ DOC_SOURCE_DIR = \
$(top_builddir)/glib $(top_builddir)/gmodule
# Extra options to supply to gtkdoc-scan
-SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" --ignore-decorators="GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT"
+SCAN_OPTIONS = \
+ --deprecated-guards="G_DISABLE_DEPRECATED" \
+ --ignore-decorators="GLIB_VAR|G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT|GLIB_AVAILABLE_IN_ALL|GLIB_AVAILABLE_IN_2_26|GLIB_AVAILABLE_IN_2_28|GLIB_AVAILABLE_IN_2_30|GLIB_AVAILABLE_IN_2_32|GLIB_AVAILABLE_IN_2_34|GLIB_AVAILABLE_IN_2_36|GLIB_AVAILABLE_IN_2_38|GLIB_AVAILABLE_IN_2_40|GLIB_AVAILABLE_IN_2_42|GLIB_AVAILABLE_IN_2_44|GLIB_AVAILABLE_IN_2_46|GLIB_AVAILABLE_IN_2_48|GLIB_AVAILABLE_IN_2_50|GLIB_AVAILABLE_IN_2_52|GLIB_AVAILABLE_IN_2_54|GLIB_AVAILABLE_IN_2_56|GLIB_DEPRECATED_IN_2_26|GLIB_DEPRECATED_IN_2_26_FOR|GLIB_DEPRECATED_IN_2_28|GLIB_DEPRECATED_IN_2_28_FOR|GLIB_DEPRECATED_IN_2_30|GLIB_DEPRECATED_IN_2_30_FOR|GLIB_DEPRECATED_IN_2_32|GLIB_DEPRECATED_IN_2_32_FOR|GLIB_DEPRECATED_IN_2_34|GLIB_DEPRECATED_IN_2_34_FOR|GLIB_DEPRECATED_IN_2_36|GLIB_DEPRECATED_IN_2_36_FOR|GLIB_DEPRECATED_IN_2_38|GLIB_DEPRECATED_IN_2_38_FOR|GLIB_DEPRECATED_IN_2_40|GLIB_DEPRECATED_IN_2_40_FOR|GLIB_DEPRECATED_IN_2_42|GLIB_DEPRECATED_IN_2_42_FOR|GLIB_DEPRECATED_IN_2_44|GLIB_DEPRECATED_IN_2_44_FOR|GLIB_DEPRECATED_IN_2_46|GLIB_DEPRECATED_IN_2_46_FOR|GLIB_DEPRECATED_IN_2_48|GLIB_DEPRECATED_IN_2_48_FOR|GLIB_DEPRECATED_IN_2_50|GLIB_DEPRECATED_IN_2_50_FOR|GLIB_DEPRECATED_IN_2_52|GLIB_DEPRECATED_IN_2_52_FOR|GLIB_DEPRECATED_IN_2_54|GLIB_DEPRECATED_IN_2_54_FOR|GLIB_DEPRECATED_IN_2_56|GLIB_DEPRECATED_IN_2_56_FOR"
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--output-format=xml --name-space=g
diff --git a/docs/reference/glib/glib-docs.xml b/docs/reference/glib/glib-docs.xml
index 93639b1f5..a0716c172 100644
--- a/docs/reference/glib/glib-docs.xml
+++ b/docs/reference/glib/glib-docs.xml
@@ -252,6 +252,10 @@
<title>Index of new symbols in 2.54</title>
<xi:include href="xml/api-index-2.54.xml"><xi:fallback /></xi:include>
</index>
+ <index id="api-index-2-56" role="2.56">
+ <title>Index of new symbols in 2.56</title>
+ <xi:include href="xml/api-index-2.56.xml"><xi:fallback /></xi:include>
+ </index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
diff --git a/docs/reference/glib/glib-overrides.txt b/docs/reference/glib/glib-overrides.txt
index b2774c0a1..991fcf2d0 100644
--- a/docs/reference/glib/glib-overrides.txt
+++ b/docs/reference/glib/glib-overrides.txt
@@ -288,10 +288,6 @@ gint *atomic
gint *atomic
</FUNCTION>
-<STRUCT>
-<NAME>GIConv</NAME>
-</STRUCT>
-
<MACRO>
<NAME>G_VA_COPY</NAME>
#define G_VA_COPY(ap1,ap2)
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index e09d4d3aa..1aaaf6043 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -129,6 +129,9 @@ GLIB_VERSION_2_44
GLIB_VERSION_2_46
GLIB_VERSION_2_48
GLIB_VERSION_2_50
+GLIB_VERSION_2_52
+GLIB_VERSION_2_54
+GLIB_VERSION_2_56
GLIB_VERSION_MIN_REQUIRED
GLIB_VERSION_MAX_ALLOWED
GLIB_DISABLE_DEPRECATION_WARNINGS
@@ -149,6 +152,9 @@ GLIB_AVAILABLE_IN_2_44
GLIB_AVAILABLE_IN_2_46
GLIB_AVAILABLE_IN_2_48
GLIB_AVAILABLE_IN_2_50
+GLIB_AVAILABLE_IN_2_52
+GLIB_AVAILABLE_IN_2_54
+GLIB_AVAILABLE_IN_2_56
GLIB_DEPRECATED_IN_2_26
GLIB_DEPRECATED_IN_2_26_FOR
GLIB_DEPRECATED_IN_2_28
@@ -175,6 +181,12 @@ GLIB_DEPRECATED_IN_2_48
GLIB_DEPRECATED_IN_2_48_FOR
GLIB_DEPRECATED_IN_2_50
GLIB_DEPRECATED_IN_2_50_FOR
+GLIB_DEPRECATED_IN_2_52
+GLIB_DEPRECATED_IN_2_52_FOR
+GLIB_DEPRECATED_IN_2_54
+GLIB_DEPRECATED_IN_2_54_FOR
+GLIB_DEPRECATED_IN_2_56
+GLIB_DEPRECATED_IN_2_56_FOR
GLIB_VERSION_CUR_STABLE
GLIB_VERSION_PREV_STABLE
</SECTION>
@@ -621,6 +633,8 @@ g_source_get_current_time
g_source_remove
g_source_remove_by_funcs_user_data
g_source_remove_by_user_data
+GClearHandleFunc
+g_clear_handle_id
<SUBSECTION Private>
GLIB_HAVE_ALLOCA_H
@@ -1324,7 +1338,7 @@ g_option_error_quark
<SECTION>
<TITLE>File Utilities</TITLE>
<FILE>fileutils</FILE>
-<INCLUDE>glib.h,glib/gstdio.h</INCLUDE>
+<INCLUDE>glib.h,glib/gstdio.h,fcntl.h,sys/types.h,sys/stat.h</INCLUDE>
GFileError
G_FILE_ERROR
GFileTest
@@ -1551,6 +1565,7 @@ g_date_new_dmy
g_date_new_julian
g_date_clear
g_date_free
+g_date_copy
<SUBSECTION>
g_date_set_day
@@ -1667,6 +1682,7 @@ g_date_time_new_from_unix_utc
<SUBSECTION>
g_date_time_new_from_timeval_local
g_date_time_new_from_timeval_utc
+g_date_time_new_from_iso8601
<SUBSECTION>
g_date_time_new
@@ -1837,6 +1853,7 @@ g_path_get_basename
g_path_get_dirname
g_build_filename
g_build_filenamev
+g_build_filename_valist
g_build_path
g_build_pathv
diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build
index 3babb3ee0..271574dda 100644
--- a/docs/reference/glib/meson.build
+++ b/docs/reference/glib/meson.build
@@ -36,6 +36,61 @@ if get_option('with-docs') != 'no'
'valgrind.h',
]
+ ignore_decorators = [
+ 'GLIB_VAR',
+ 'G_GNUC_INTERNAL',
+ 'G_GNUC_WARN_UNUSED_RESULT',
+ 'GLIB_AVAILABLE_IN_ALL',
+ 'GLIB_AVAILABLE_IN_2_26',
+ 'GLIB_AVAILABLE_IN_2_28',
+ 'GLIB_AVAILABLE_IN_2_30',
+ 'GLIB_AVAILABLE_IN_2_32',
+ 'GLIB_AVAILABLE_IN_2_34',
+ 'GLIB_AVAILABLE_IN_2_36',
+ 'GLIB_AVAILABLE_IN_2_38',
+ 'GLIB_AVAILABLE_IN_2_40',
+ 'GLIB_AVAILABLE_IN_2_42',
+ 'GLIB_AVAILABLE_IN_2_44',
+ 'GLIB_AVAILABLE_IN_2_46',
+ 'GLIB_AVAILABLE_IN_2_48',
+ 'GLIB_AVAILABLE_IN_2_50',
+ 'GLIB_AVAILABLE_IN_2_52',
+ 'GLIB_AVAILABLE_IN_2_54',
+ 'GLIB_AVAILABLE_IN_2_56',
+ 'GLIB_DEPRECATED_IN_2_26',
+ 'GLIB_DEPRECATED_IN_2_26_FOR',
+ 'GLIB_DEPRECATED_IN_2_28',
+ 'GLIB_DEPRECATED_IN_2_28_FOR',
+ 'GLIB_DEPRECATED_IN_2_30',
+ 'GLIB_DEPRECATED_IN_2_30_FOR',
+ 'GLIB_DEPRECATED_IN_2_32',
+ 'GLIB_DEPRECATED_IN_2_32_FOR',
+ 'GLIB_DEPRECATED_IN_2_34',
+ 'GLIB_DEPRECATED_IN_2_34_FOR',
+ 'GLIB_DEPRECATED_IN_2_36',
+ 'GLIB_DEPRECATED_IN_2_36_FOR',
+ 'GLIB_DEPRECATED_IN_2_38',
+ 'GLIB_DEPRECATED_IN_2_38_FOR',
+ 'GLIB_DEPRECATED_IN_2_40',
+ 'GLIB_DEPRECATED_IN_2_40_FOR',
+ 'GLIB_DEPRECATED_IN_2_42',
+ 'GLIB_DEPRECATED_IN_2_42_FOR',
+ 'GLIB_DEPRECATED_IN_2_44',
+ 'GLIB_DEPRECATED_IN_2_44_FOR',
+ 'GLIB_DEPRECATED_IN_2_46',
+ 'GLIB_DEPRECATED_IN_2_46_FOR',
+ 'GLIB_DEPRECATED_IN_2_48',
+ 'GLIB_DEPRECATED_IN_2_48_FOR',
+ 'GLIB_DEPRECATED_IN_2_50',
+ 'GLIB_DEPRECATED_IN_2_50_FOR',
+ 'GLIB_DEPRECATED_IN_2_52',
+ 'GLIB_DEPRECATED_IN_2_52_FOR',
+ 'GLIB_DEPRECATED_IN_2_54',
+ 'GLIB_DEPRECATED_IN_2_54_FOR',
+ 'GLIB_DEPRECATED_IN_2_56',
+ 'GLIB_DEPRECATED_IN_2_56_FOR',
+ ]
+
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version())
@@ -54,7 +109,7 @@ if get_option('with-docs') != 'no'
scan_args : [
'--rebuild-types',
'--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT',
+ '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/gobject/Makefile.am b/docs/reference/gobject/Makefile.am
index 50b239ba3..430ab6d5f 100644
--- a/docs/reference/gobject/Makefile.am
+++ b/docs/reference/gobject/Makefile.am
@@ -12,8 +12,9 @@ DOC_MAIN_SGML_FILE=gobject-docs.xml
DOC_SOURCE_DIR =$(top_srcdir)/gobject $(top_builddir)/gobject
# Extra options to supply to gtkdoc-scan
-SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \
- --ignore-decorators="G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT"
+SCAN_OPTIONS = \
+ --deprecated-guards="G_DISABLE_DEPRECATED" \
+ --ignore-decorators="GLIB_VAR|G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT|GLIB_AVAILABLE_IN_ALL|GLIB_AVAILABLE_IN_2_26|GLIB_AVAILABLE_IN_2_28|GLIB_AVAILABLE_IN_2_30|GLIB_AVAILABLE_IN_2_32|GLIB_AVAILABLE_IN_2_34|GLIB_AVAILABLE_IN_2_36|GLIB_AVAILABLE_IN_2_38|GLIB_AVAILABLE_IN_2_40|GLIB_AVAILABLE_IN_2_42|GLIB_AVAILABLE_IN_2_44|GLIB_AVAILABLE_IN_2_46|GLIB_AVAILABLE_IN_2_48|GLIB_AVAILABLE_IN_2_50|GLIB_AVAILABLE_IN_2_52|GLIB_AVAILABLE_IN_2_54|GLIB_AVAILABLE_IN_2_56|GLIB_DEPRECATED_IN_2_26|GLIB_DEPRECATED_IN_2_26_FOR|GLIB_DEPRECATED_IN_2_28|GLIB_DEPRECATED_IN_2_28_FOR|GLIB_DEPRECATED_IN_2_30|GLIB_DEPRECATED_IN_2_30_FOR|GLIB_DEPRECATED_IN_2_32|GLIB_DEPRECATED_IN_2_32_FOR|GLIB_DEPRECATED_IN_2_34|GLIB_DEPRECATED_IN_2_34_FOR|GLIB_DEPRECATED_IN_2_36|GLIB_DEPRECATED_IN_2_36_FOR|GLIB_DEPRECATED_IN_2_38|GLIB_DEPRECATED_IN_2_38_FOR|GLIB_DEPRECATED_IN_2_40|GLIB_DEPRECATED_IN_2_40_FOR|GLIB_DEPRECATED_IN_2_42|GLIB_DEPRECATED_IN_2_42_FOR|GLIB_DEPRECATED_IN_2_44|GLIB_DEPRECATED_IN_2_44_FOR|GLIB_DEPRECATED_IN_2_46|GLIB_DEPRECATED_IN_2_46_FOR|GLIB_DEPRECATED_IN_2_48|GLIB_DEPRECATED_IN_2_48_FOR|GLIB_DEPRECATED_IN_2_50|GLIB_DEPRECATED_IN_2_50_FOR|GLIB_DEPRECATED_IN_2_52|GLIB_DEPRECATED_IN_2_52_FOR|GLIB_DEPRECATED_IN_2_54|GLIB_DEPRECATED_IN_2_54_FOR|GLIB_DEPRECATED_IN_2_56|GLIB_DEPRECATED_IN_2_56_FOR"
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--output-format=xml --name-space=g
diff --git a/docs/reference/gobject/glib-genmarshal.xml b/docs/reference/gobject/glib-genmarshal.xml
index 61cfe774a..bf72ba7fe 100644
--- a/docs/reference/gobject/glib-genmarshal.xml
+++ b/docs/reference/gobject/glib-genmarshal.xml
@@ -411,6 +411,50 @@ debugging information. This option is mutually exclusive with the
</variablelist>
</refsect1>
+<refsect1><title>Using glib-genmarshal with Autotools</title>
+<para>
+In order to use <command>glib-genmarshal</command> in your project when using
+Autotools as the build system, you will first need to modify your
+<filename>configure.ac</filename> file to ensure you find the appropriate
+command using <command>pkg-config</command>, similarly as to how you discover
+the compiler and linker flags for GLib.
+</para>
+<informalexample><programlisting>
+PKG_PROG_PKG_CONFIG([0.28])
+
+PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal])
+</programlisting></informalexample>
+<para>
+In your <filename>Makefile.am</filename> file you will typically need very
+simple rules to generate the C files needed for the build.
+</para>
+<informalexample><programlisting>
+marshal.h: marshal.list
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) \
+ --header \
+ --output=$@ \
+ $&lt;
+
+marshal.c: marshal.list marshal.h
+ $(AM_V_GEN)$(GLIB_GENMARSHAL) \
+ --include-header=marshal.h \
+ --body \
+ --output=$@ \
+ $&lt;
+
+BUILT_SOURCES += marshal.h marshal.c
+CLEANFILES += marshal.h marshal.c
+EXTRA_DIST += marshal.list
+</programlisting></informalexample>
+<para>
+In the example above, the first rule generates the header file and depends on
+a <filename>marshal.list</filename> file in order to regenerate the result in
+case the marshallers list is updated. The second rule generates the source file
+for the same <filename>marshal.list</filename>, and includes the file generated
+by the header rule.
+</para>
+</refsect1>
+
<refsect1><title>Example</title>
<para>
To generate marshallers for the following callback functions:
diff --git a/docs/reference/gobject/glib-mkenums.xml b/docs/reference/gobject/glib-mkenums.xml
index 1dabe6053..545857f22 100644
--- a/docs/reference/gobject/glib-mkenums.xml
+++ b/docs/reference/gobject/glib-mkenums.xml
@@ -208,30 +208,54 @@ typedef enum /*&lt; flags,prefix=PREFIX &gt;*/
<varlistentry>
<term><option>--fhead</option> <replaceable>TEXT</replaceable></term>
<listitem><para>
-Put out <replaceable>TEXT</replaceable> prior to processing input files.
+Emits <replaceable>TEXT</replaceable> prior to processing input files.
+</para>
+<para>
+You can specify this option multiple times, and the <replaceable>TEXT</replaceable>
+will be concatenated.
+</para>
+<para>
+When used along with a template file, <replaceable>TEXT</replaceable>
+will be prepended to the template's <literal>file-header</literal> section.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--fprod</option> <replaceable>TEXT</replaceable></term>
<listitem><para>
-Put out <replaceable>TEXT</replaceable> everytime a new input file
+Emits <replaceable>TEXT</replaceable> every time a new input file
is being processed.
+</para>
+<para>
+You can specify this option multiple times, and the <replaceable>TEXT</replaceable>
+will be concatenated.
+</para>
+<para>
+When used along with a template file, <replaceable>TEXT</replaceable>
+will be appended to the template's <literal>file-production</literal> section.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--ftail</option> <replaceable>TEXT</replaceable></term>
<listitem><para>
-Put out <replaceable>TEXT</replaceable> after all input files have been
+Emits <replaceable>TEXT</replaceable> after all input files have been
processed.
+</para>
+<para>
+You can specify this option multiple times, and the <replaceable>TEXT</replaceable>
+will be concatenated.
+</para>
+<para>
+When used along with a template file, <replaceable>TEXT</replaceable>
+will be appended to the template's <literal>file-tail</literal> section.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--eprod</option> <replaceable>TEXT</replaceable></term>
<listitem><para>
-Put out <replaceable>TEXT</replaceable> everytime an enum is encountered
+Emits <replaceable>TEXT</replaceable> everytime an enum is encountered
in the input files.
</para></listitem>
</varlistentry>
@@ -239,23 +263,47 @@ in the input files.
<varlistentry>
<term><option>--vhead</option> <replaceable>TEXT</replaceable></term>
<listitem><para>
-Put out <replaceable>TEXT</replaceable> before iterating over the set of
+Emits <replaceable>TEXT</replaceable> before iterating over the set of
values of an enum.
+</para>
+<para>
+You can specify this option multiple times, and the <replaceable>TEXT</replaceable>
+will be concatenated.
+</para>
+<para>
+When used along with a template file, <replaceable>TEXT</replaceable>
+will be prepended to the template's <literal>value-header</literal> section.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--vprod</option> <replaceable>TEXT</replaceable></term>
<listitem><para>
-Put out <replaceable>TEXT</replaceable> for every value of an enum.
+Emits <replaceable>TEXT</replaceable> for every value of an enum.
+</para>
+<para>
+You can specify this option multiple times, and the <replaceable>TEXT</replaceable>
+will be concatenated.
+</para>
+<para>
+When used along with a template file, <replaceable>TEXT</replaceable>
+will be appended to the template's <literal>value-production</literal> section.
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--vtail</option> <replaceable>TEXT</replaceable></term>
<listitem><para>
-Put out <replaceable>TEXT</replaceable> after iterating over all values
+Emits <replaceable>TEXT</replaceable> after iterating over all values
of an enum.
+</para>
+<para>
+You can specify this option multiple times, and the <replaceable>TEXT</replaceable>
+will be concatenated.
+</para>
+<para>
+When used along with a template file, <replaceable>TEXT</replaceable>
+will be appended to the template's <literal>value-tail</literal> section.
</para></listitem>
</varlistentry>
@@ -332,6 +380,124 @@ Write output to FILE instead of stdout.
</variablelist>
</refsect1>
+<refsect1><title>Using glib-mkenums with Autotools</title>
+<para>
+In order to use <command>glib-mkenums</command> in your project when using
+Autotools as the build system, you will first need to modify your
+<filename>configure.ac</filename> file to ensure you find the appropriate
+command using <command>pkg-config</command>, similarly as to how you discover
+the compiler and linker flags for GLib.
+</para>
+<informalexample><programlisting>
+PKG_PROG_PKG_CONFIG([0.28])
+
+PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.0], [glib_mkenums])
+</programlisting></informalexample>
+<para>
+In your <filename>Makefile.am</filename> file you will typically use rules
+like these:
+</para>
+<informalexample><programlisting>
+# A list of headers to inspect
+project_headers = \
+ project-foo.h \
+ project-bar.h \
+ project-baz.h
+
+enum-types.h: $(project_headers) enum-types.h.in
+ $(AM_V_GEN)$(GLIB_MKENUMS) \
+ --template=enum-types.h.in \
+ --output=$@ \
+ $(project_headers)
+
+enum-types.c: $(project_headers) enum-types.c.in enum-types.h
+ $(AM_V_GEN)$(GLIB_MKENUMS) \
+ --template=enum-types.c.in \
+ --output=$@ \
+ $(project_headers)
+
+BUILT_SOURCES += enum-types.h enum-types.c
+CLEANFILES += enum-types.h enum-types.c
+EXTRA_DIST += enum-types.h.in enum-types.c.in
+</programlisting></informalexample>
+<para>
+In the example above, we have a variable called <literal>project_headers</literal>
+where we reference all header files we want to inspect for generating enumeration
+GTypes. In the <filename>enum-types.h</filename> rule we use <command>glib-mkenums</command>
+with a template called <filename>enum-types.h.in</filename> in order to generate the
+header file; a header template file will typically look like this:
+</para>
+<informalexample><programlisting>
+/*** BEGIN file-header ***/
+#pragma once
+
+/* Include the main project header */
+#include "project.h"
+
+G_BEGIN_DECLS
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType @enum_name@_get_type (void) G_GNUC_CONST;
+#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
+/*** END value-header ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+/*** END file-tail ***/
+</programlisting></informalexample>
+<para>
+The <filename>enum-types.c</filename> rule is similar to the rule for the
+header file, but will use a different <filename>enum-types.c.in</filename> template
+file, similar to this:
+</para>
+<informalexample><programlisting>
+/*** BEGIN file-header ***/
+#include "config.h"
+#include "enum-types.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@filename@" */
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+@enum_name@_get_type (void)
+{
+ static volatile gsize g_@type@_type_id__volatile;
+
+ if (g_once_init_enter (&amp;g_define_type_id__volatile))
+ {
+ static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+ { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+ { 0, NULL, NULL }
+ };
+
+ GType g_@type@_type_id =
+ g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
+
+ g_once_init_leave (&amp;g_@type@_type_id__volatile, g_@type@_type_id);
+ }
+ return g_@type@_type_id__volatile;
+}
+
+/*** END value-tail ***/
+</programlisting></informalexample>
+</refsect1>
+
<refsect1><title>See also</title>
<para>
<citerefentry>
diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build
index 1025e174f..5a7aa4754 100644
--- a/docs/reference/gobject/meson.build
+++ b/docs/reference/gobject/meson.build
@@ -8,6 +8,61 @@ if get_option('with-docs') != 'no'
'gtype-private.h'
]
+ ignore_decorators = [
+ 'GLIB_VAR',
+ 'G_GNUC_INTERNAL',
+ 'G_GNUC_WARN_UNUSED_RESULT',
+ 'GLIB_AVAILABLE_IN_ALL',
+ 'GLIB_AVAILABLE_IN_2_26',
+ 'GLIB_AVAILABLE_IN_2_28',
+ 'GLIB_AVAILABLE_IN_2_30',
+ 'GLIB_AVAILABLE_IN_2_32',
+ 'GLIB_AVAILABLE_IN_2_34',
+ 'GLIB_AVAILABLE_IN_2_36',
+ 'GLIB_AVAILABLE_IN_2_38',
+ 'GLIB_AVAILABLE_IN_2_40',
+ 'GLIB_AVAILABLE_IN_2_42',
+ 'GLIB_AVAILABLE_IN_2_44',
+ 'GLIB_AVAILABLE_IN_2_46',
+ 'GLIB_AVAILABLE_IN_2_48',
+ 'GLIB_AVAILABLE_IN_2_50',
+ 'GLIB_AVAILABLE_IN_2_52',
+ 'GLIB_AVAILABLE_IN_2_54',
+ 'GLIB_AVAILABLE_IN_2_56',
+ 'GLIB_DEPRECATED_IN_2_26',
+ 'GLIB_DEPRECATED_IN_2_26_FOR',
+ 'GLIB_DEPRECATED_IN_2_28',
+ 'GLIB_DEPRECATED_IN_2_28_FOR',
+ 'GLIB_DEPRECATED_IN_2_30',
+ 'GLIB_DEPRECATED_IN_2_30_FOR',
+ 'GLIB_DEPRECATED_IN_2_32',
+ 'GLIB_DEPRECATED_IN_2_32_FOR',
+ 'GLIB_DEPRECATED_IN_2_34',
+ 'GLIB_DEPRECATED_IN_2_34_FOR',
+ 'GLIB_DEPRECATED_IN_2_36',
+ 'GLIB_DEPRECATED_IN_2_36_FOR',
+ 'GLIB_DEPRECATED_IN_2_38',
+ 'GLIB_DEPRECATED_IN_2_38_FOR',
+ 'GLIB_DEPRECATED_IN_2_40',
+ 'GLIB_DEPRECATED_IN_2_40_FOR',
+ 'GLIB_DEPRECATED_IN_2_42',
+ 'GLIB_DEPRECATED_IN_2_42_FOR',
+ 'GLIB_DEPRECATED_IN_2_44',
+ 'GLIB_DEPRECATED_IN_2_44_FOR',
+ 'GLIB_DEPRECATED_IN_2_46',
+ 'GLIB_DEPRECATED_IN_2_46_FOR',
+ 'GLIB_DEPRECATED_IN_2_48',
+ 'GLIB_DEPRECATED_IN_2_48_FOR',
+ 'GLIB_DEPRECATED_IN_2_50',
+ 'GLIB_DEPRECATED_IN_2_50_FOR',
+ 'GLIB_DEPRECATED_IN_2_52',
+ 'GLIB_DEPRECATED_IN_2_52_FOR',
+ 'GLIB_DEPRECATED_IN_2_54',
+ 'GLIB_DEPRECATED_IN_2_54_FOR',
+ 'GLIB_DEPRECATED_IN_2_56',
+ 'GLIB_DEPRECATED_IN_2_56_FOR',
+ ]
+
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version())
@@ -26,7 +81,7 @@ if get_option('with-docs') != 'no'
src_dir : 'gobject',
scan_args : [
'--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT',
+ '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/gobject/tut_gsignal.xml b/docs/reference/gobject/tut_gsignal.xml
index f990ab805..4ed4211fa 100644
--- a/docs/reference/gobject/tut_gsignal.xml
+++ b/docs/reference/gobject/tut_gsignal.xml
@@ -390,8 +390,8 @@ void g_signal_emitv (const GValue *instance_and_params,
</para>
<para>
- If, at any point during emission (except in <literal>RUN_CLEANUP</literal> state), one of the
- closures or emission hook stops the signal emission with
+ If, at any point during emission (except in <literal>RUN_CLEANUP</literal> or
+ <literal>EMISSION_HOOK</literal> state), one of the closures stops the signal emission with
<function><link linkend="g-signal-stop-emission">g_signal_stop_emission</link></function>,
emission jumps to <literal>RUN_CLEANUP</literal> state.
</para>
diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml
index 126eac38e..a1c6005a0 100644
--- a/docs/reference/gobject/tut_gtype.xml
+++ b/docs/reference/gobject/tut_gtype.xml
@@ -677,7 +677,7 @@ viewer_editable_save (ViewerEditable *self,
g_return_if_fail (VIEWER_IS_EDITABLE (self));
g_return_if_fail (error == NULL || *error == NULL);
- iface = VIEWER_EDITABLE_GET_INTERFACE (self);
+ iface = VIEWER_EDITABLE_GET_IFACE (self);
g_return_if_fail (iface->save != NULL);
iface->save (self);
}
diff --git a/gio/Makefile.am b/gio/Makefile.am
index b2db99581..0cfda50bf 100644
--- a/gio/Makefile.am
+++ b/gio/Makefile.am
@@ -3,10 +3,8 @@ include $(top_srcdir)/glib.mk
SUBDIRS = gdbus-2.0/codegen
if OS_UNIX
-if !OS_COCOA
SUBDIRS += xdgmime
endif
-endif
if OS_WIN32_AND_DLL_COMPILATION
if MS_LIB_AVAILABLE
@@ -92,7 +90,18 @@ gdbus_sources = \
# These are not built into the library yet
EXTRA_DIST += gdbusdaemon.c gdbusdaemon.h dbus-daemon.xml
-gdbus-daemon-generated.h gdbus-daemon-generated.c: $(srcdir)/dbus-daemon.xml $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in
+GDBUS_PYTHON_DEPS = \
+ $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in \
+ $(srcdir)/gdbus-2.0/codegen/codegen_main.py \
+ $(srcdir)/gdbus-2.0/codegen/parser.py \
+ $(srcdir)/gdbus-2.0/codegen/codegen_docbook.py \
+ $(srcdir)/gdbus-2.0/codegen/codegen.py \
+ $(srcdir)/gdbus-2.0/codegen/__init__.py \
+ $(srcdir)/gdbus-2.0/codegen/dbustypes.py \
+ $(builddir)/gdbus-2.0/codegen/config.py \
+ $(srcdir)/gdbus-2.0/codegen/utils.py
+
+gdbus-daemon-generated.h gdbus-daemon-generated.c: $(srcdir)/dbus-daemon.xml $(GDBUS_PYTHON_DEPS)
$(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
$(PYTHON) $(srcdir)/gdbus-2.0/codegen/gdbus-codegen.in \
@@ -251,10 +260,9 @@ SUBDIRS += fam
endif
if OS_UNIX
-if !OS_COCOA
platform_libadd += xdgmime/libxdgmime.la
platform_deps += xdgmime/libxdgmime.la
-
+if !OS_COCOA
appinfo_headers += gdesktopappinfo.h
endif
@@ -754,7 +762,7 @@ BUILT_SOURCES += \
$(NULL)
EXTRA_DIST += \
- data-to-c.pl \
+ data-to-c.py \
gioenumtypes.h.template \
gioenumtypes.c.template \
gio.rc.in \
@@ -814,8 +822,8 @@ gio_querymodules_LDADD = libgio-2.0.la \
$(top_builddir)/glib/libglib-2.0.la \
$(NULL)
-gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.pl
- $(AM_V_GEN) $(srcdir)/data-to-c.pl $(top_srcdir)/glib/gconstructor.h gconstructor_code > $@.tmp && mv $@.tmp $@
+gconstructor_as_data.h: $(top_srcdir)/glib/gconstructor.h data-to-c.py
+ $(AM_V_GEN) $(srcdir)/data-to-c.py $(top_srcdir)/glib/gconstructor.h gconstructor_code $@
glib_compile_schemas_LDADD = $(top_builddir)/glib/libglib-2.0.la
glib_compile_schemas_SOURCES = \
diff --git a/gio/completion/gsettings b/gio/completion/gsettings
index 0316e299f..22b2ac379 100644
--- a/gio/completion/gsettings
+++ b/gio/completion/gsettings
@@ -35,11 +35,11 @@ __gsettings() {
choices=$'list-schemas\nlist-relocatable-schemas\nlist-keys\nlist-children\nlist-recursively\nget\nrange\nset\nreset\nreset-recursively\nwritable\nmonitor'
;;
list-keys|list-children|list-recursively|reset-recursively)
- choices="$(gsettings $schemadir list-schemas)"$'\n'"$(gsettings $schemadir list-relocatable-schemas | sed -e 's.$.:/.')"
+ choices="$(gsettings $schemadir list-schemas 2> /dev/null)"$'\n'"$(gsettings $schemadir list-relocatable-schemas 2> /dev/null | sed -e 's.$.:/.')"
;;
get|range|set|reset|writable|monitor|describe)
- choices="$(gsettings $schemadir list-schemas | sed -e 's.$. .')"$'\n'"$(gsettings $schemadir list-relocatable-schemas | sed -e 's.$.:/.')"
+ choices="$(gsettings $schemadir list-schemas 2> /dev/null | sed -e 's.$. .')"$'\n'"$(gsettings $schemadir list-relocatable-schemas 2> /dev/null | sed -e 's.$.:/.')"
;;
esac
;;
diff --git a/gio/data-to-c.pl b/gio/data-to-c.pl
deleted file mode 100755
index 28c1d71e6..000000000
--- a/gio/data-to-c.pl
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env perl
-
-# Copyright © 2011 Red Hat, Inc
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, see <http://www.gnu.org/licenses/>.
-#
-# Author: Kalev Lember <kalevlember@gmail.com>
-
-
-if (@ARGV != 2) {
- die "Usage: data-to-c.pl <filename> <variable>\n";
-}
-
-$file = $ARGV[0];
-
-open (FILE, $file) || die "Cannot open $file: $!\n";
-
-printf ("const char %s[] = \"", $ARGV[1]);
-while (my $line = <FILE>) {
- foreach my $c (split //, $line) {
- printf ("\\x%02x", ord ($c));
- }
-}
-print "\";\n";
-
-close (FILE);
diff --git a/gio/data-to-c.py b/gio/data-to-c.py
index 7a8d8a865..f226220ed 100644..100755
--- a/gio/data-to-c.py
+++ b/gio/data-to-c.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python3
+#!/usr/bin/env python
import sys
diff --git a/gio/gappinfo.c b/gio/gappinfo.c
index b0c03dda8..646b8ef2e 100644
--- a/gio/gappinfo.c
+++ b/gio/gappinfo.c
@@ -136,9 +136,9 @@ g_app_info_dup (GAppInfo *appinfo)
*
* Checks if two #GAppInfos are equal.
*
- * Note that the check <em>may not</em> compare each individual field, and
- * only does an identity check. In case detecting changes in the contents
- * is needed, program code must additionally compare relevant fields.
+ * Note that the check <emphasis>may not</emphasis> compare each individual
+ * field, and only does an identity check. In case detecting changes in the
+ * contents is needed, program code must additionally compare relevant fields.
*
* Returns: %TRUE if @appinfo1 is equal to @appinfo2. %FALSE otherwise.
**/
@@ -536,11 +536,11 @@ g_app_info_get_icon (GAppInfo *appinfo)
* g_app_info_launch:
* @appinfo: a #GAppInfo
* @files: (nullable) (element-type GFile): a #GList of #GFile objects
- * @launch_context: (nullable): a #GAppLaunchContext or %NULL
+ * @context: (nullable): a #GAppLaunchContext or %NULL
* @error: a #GError
*
* Launches the application. Passes @files to the launched application
- * as arguments, using the optional @launch_context to get information
+ * as arguments, using the optional @context to get information
* about the details of the launcher (like what screen it is on).
* On error, @error will be set accordingly.
*
@@ -565,7 +565,7 @@ g_app_info_get_icon (GAppInfo *appinfo)
* process. This can be used to ignore `GIO_LAUNCHED_DESKTOP_FILE`,
* should it be inherited by further processes. The `DISPLAY` and
* `DESKTOP_STARTUP_ID` environment variables are also set, based
- * on information provided in @launch_context.
+ * on information provided in @context.
*
* Returns: %TRUE on successful launch, %FALSE otherwise.
**/
@@ -631,11 +631,11 @@ g_app_info_supports_files (GAppInfo *appinfo)
* g_app_info_launch_uris:
* @appinfo: a #GAppInfo
* @uris: (nullable) (element-type utf8): a #GList containing URIs to launch.
- * @launch_context: (nullable): a #GAppLaunchContext or %NULL
+ * @context: (nullable): a #GAppLaunchContext or %NULL
* @error: a #GError
*
* Launches the application. This passes the @uris to the launched application
- * as arguments, using the optional @launch_context to get information
+ * as arguments, using the optional @context to get information
* about the details of the launcher (like what screen it is on).
* On error, @error will be set accordingly.
*
@@ -727,7 +727,7 @@ launch_default_for_uri (const char *uri,
/**
* g_app_info_launch_default_for_uri:
* @uri: the uri to show
- * @launch_context: (nullable): an optional #GAppLaunchContext
+ * @context: (nullable): an optional #GAppLaunchContext
* @error: (nullable): return location for an error, or %NULL
*
* Utility function that launches the default application
@@ -768,7 +768,7 @@ g_app_info_launch_default_for_uri (const char *uri,
* g_app_info_launch_default_for_uri_async:
* @uri: the uri to show
* @context: (nullable): an optional #GAppLaunchContext
- * cancellable: (nullable): a #GCancellable
+ * @cancellable: (nullable): a #GCancellable
* @callback: (nullable): a #GASyncReadyCallback to call when the request is done
* @user_data: (nullable): data to pass to @callback
*
@@ -987,8 +987,8 @@ g_app_launch_context_init (GAppLaunchContext *context)
/**
* g_app_launch_context_setenv:
* @context: a #GAppLaunchContext
- * @variable: the environment variable to set
- * @value: the value for to set the variable to.
+ * @variable: (type filename): the environment variable to set
+ * @value: (type filename): the value for to set the variable to.
*
* Arranges for @variable to be set to @value in the child's
* environment when @context is used to launch an application.
@@ -1010,7 +1010,7 @@ g_app_launch_context_setenv (GAppLaunchContext *context,
/**
* g_app_launch_context_unsetenv:
* @context: a #GAppLaunchContext
- * @variable: the environment variable to remove
+ * @variable: (type filename): the environment variable to remove
*
* Arranges for @variable to be unset in the child's environment
* when @context is used to launch an application.
@@ -1037,8 +1037,8 @@ g_app_launch_context_unsetenv (GAppLaunchContext *context,
* This is a %NULL-terminated array of strings, where each string has
* the form `KEY=VALUE`.
*
- * Returns: (array zero-terminated=1) (transfer full): the
- * child's environment
+ * Returns: (array zero-terminated=1) (element-type filename) (transfer full):
+ * the child's environment
*
* Since: 2.32
*/
diff --git a/gio/gappinfo.h b/gio/gappinfo.h
index 18f012689..4889be923 100644
--- a/gio/gappinfo.h
+++ b/gio/gappinfo.h
@@ -99,13 +99,13 @@ struct _GAppInfoIface
GIcon * (* get_icon) (GAppInfo *appinfo);
gboolean (* launch) (GAppInfo *appinfo,
GList *files,
- GAppLaunchContext *launch_context,
+ GAppLaunchContext *context,
GError **error);
gboolean (* supports_uris) (GAppInfo *appinfo);
gboolean (* supports_files) (GAppInfo *appinfo);
gboolean (* launch_uris) (GAppInfo *appinfo,
GList *uris,
- GAppLaunchContext *launch_context,
+ GAppLaunchContext *context,
GError **error);
gboolean (* should_show) (GAppInfo *appinfo);
@@ -162,7 +162,7 @@ GIcon * g_app_info_get_icon (GAppInfo *appin
GLIB_AVAILABLE_IN_ALL
gboolean g_app_info_launch (GAppInfo *appinfo,
GList *files,
- GAppLaunchContext *launch_context,
+ GAppLaunchContext *context,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_app_info_supports_uris (GAppInfo *appinfo);
@@ -171,7 +171,7 @@ gboolean g_app_info_supports_files (GAppInfo *appin
GLIB_AVAILABLE_IN_ALL
gboolean g_app_info_launch_uris (GAppInfo *appinfo,
GList *uris,
- GAppLaunchContext *launch_context,
+ GAppLaunchContext *context,
GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_app_info_should_show (GAppInfo *appinfo);
@@ -226,12 +226,12 @@ GAppInfo *g_app_info_get_default_for_uri_scheme (const char *uri_scheme);
GLIB_AVAILABLE_IN_ALL
gboolean g_app_info_launch_default_for_uri (const char *uri,
- GAppLaunchContext *launch_context,
+ GAppLaunchContext *context,
GError **error);
GLIB_AVAILABLE_IN_2_50
void g_app_info_launch_default_for_uri_async (const char *uri,
- GAppLaunchContext *launch_context,
+ GAppLaunchContext *context,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 0ee6ca6e8..9d880fc1d 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -2218,7 +2218,8 @@ g_application_open (GApplication *application,
* g_application_run:
* @application: a #GApplication
* @argc: the argc from main() (or 0 if @argv is %NULL)
- * @argv: (array length=argc) (nullable): the argv from main(), or %NULL
+ * @argv: (array length=argc) (element-type filename) (nullable):
+ * the argv from main(), or %NULL
*
* Runs the application.
*
@@ -2624,6 +2625,10 @@ g_application_set_default (GApplication *application)
* calling only the 'shutdown' function before doing so.
*
* The hold count is ignored.
+ * Take care if your code has called g_application_hold() on the application and
+ * is therefore still expecting it to exist.
+ * (Note that you may have called g_application_hold() indirectly, for example
+ * through gtk_application_add_window().)
*
* The result of calling g_application_run() again after it returns is
* unspecified.
diff --git a/gio/gapplicationcommandline.c b/gio/gapplicationcommandline.c
index b3a99e007..d6c5c45fa 100644
--- a/gio/gapplicationcommandline.c
+++ b/gio/gapplicationcommandline.c
@@ -463,8 +463,8 @@ g_application_command_line_class_init (GApplicationCommandLineClass *class)
* The return value is %NULL-terminated and should be freed using
* g_strfreev().
*
- * Returns: (array length=argc) (transfer full): the string array
- * containing the arguments (the argv)
+ * Returns: (array length=argc) (element-type filename) (transfer full)
+ * the string array containing the arguments (the argv)
*
* Since: 2.28
**/
@@ -582,8 +582,8 @@ g_application_command_line_get_cwd (GApplicationCommandLine *cmdline)
* See g_application_command_line_getenv() if you are only interested
* in the value of a single environment variable.
*
- * Returns: (array zero-terminated=1) (transfer none): the environment
- * strings, or %NULL if they were not sent
+ * Returns: (array zero-terminated=1) (element-type filename) (transfer none):
+ * the environment strings, or %NULL if they were not sent
*
* Since: 2.28
**/
@@ -596,7 +596,7 @@ g_application_command_line_get_environ (GApplicationCommandLine *cmdline)
/**
* g_application_command_line_getenv:
* @cmdline: a #GApplicationCommandLine
- * @name: the environment variable to get
+ * @name: (type filename): the environment variable to get
*
* Gets the value of a particular environment variable of the command
* line invocation, as would be returned by g_getenv(). The strings may
@@ -805,7 +805,7 @@ g_application_command_line_get_platform_data (GApplicationCommandLine *cmdline)
/**
* g_application_command_line_create_file_for_arg:
* @cmdline: a #GApplicationCommandLine
- * @arg: an argument from @cmdline
+ * @arg: (type filename): an argument from @cmdline
*
* Creates a #GFile corresponding to a filename that was given as part
* of the invocation of @cmdline.
diff --git a/gio/gasynchelper.c b/gio/gasynchelper.c
index fc2464ace..41bbb2ad5 100644
--- a/gio/gasynchelper.c
+++ b/gio/gasynchelper.c
@@ -44,7 +44,11 @@ _g_win32_overlap_wait_result (HANDLE hfile,
gboolean result = FALSE;
gint num, npoll;
+#if GLIB_SIZEOF_VOID_P == 8
+ pollfd[0].fd = (gint64)overlap->hEvent;
+#else
pollfd[0].fd = (gint)overlap->hEvent;
+#endif
pollfd[0].events = G_IO_IN;
num = 1;
diff --git a/gio/gasyncresult.c b/gio/gasyncresult.c
index fafda9a04..b96f1eeab 100644
--- a/gio/gasyncresult.c
+++ b/gio/gasyncresult.c
@@ -36,13 +36,16 @@
* which are chained together by a #GAsyncReadyCallback. To begin
* an asynchronous operation, provide a #GAsyncReadyCallback to the
* asynchronous function. This callback will be triggered when the
- * operation has completed, and will be passed a #GAsyncResult instance
- * filled with the details of the operation's success or failure, the
- * object the asynchronous function was started for and any error codes
- * returned. The asynchronous callback function is then expected to call
- * the corresponding "_finish()" function, passing the object the
- * function was called for, the #GAsyncResult instance, and (optionally)
- * an @error to grab any error conditions that may have occurred.
+ * operation has completed, and must be run in a later iteration of
+ * the [thread-default main context][g-main-context-push-thread-default]
+ * from where the operation was initiated. It will be passed a
+ * #GAsyncResult instance filled with the details of the operation's
+ * success or failure, the object the asynchronous function was
+ * started for and any error codes returned. The asynchronous callback
+ * function is then expected to call the corresponding "_finish()"
+ * function, passing the object the function was called for, the
+ * #GAsyncResult instance, and (optionally) an @error to grab any
+ * error conditions that may have occurred.
*
* The "_finish()" function for an operation takes the generic result
* (of type #GAsyncResult) and returns the specific result that the
@@ -147,8 +150,8 @@ g_async_result_get_user_data (GAsyncResult *res)
*
* Gets the source object from a #GAsyncResult.
*
- * Returns: (transfer full): a new reference to the source object for the @res,
- * or %NULL if there is none.
+ * Returns: (transfer full) (nullable): a new reference to the source
+ * object for the @res, or %NULL if there is none.
*/
GObject *
g_async_result_get_source_object (GAsyncResult *res)
diff --git a/gio/gbufferedinputstream.c b/gio/gbufferedinputstream.c
index f70ccb080..f5090d064 100644
--- a/gio/gbufferedinputstream.c
+++ b/gio/gbufferedinputstream.c
@@ -524,7 +524,7 @@ g_buffered_input_stream_fill_async (GBufferedInputStream *stream,
*
* Finishes an asynchronous read.
*
- * Returns: a #gssize of the read stream, or %-1 on an error.
+ * Returns: a #gssize of the read stream, or `-1` on an error.
*/
gssize
g_buffered_input_stream_fill_finish (GBufferedInputStream *stream,
diff --git a/gio/gcancellable.c b/gio/gcancellable.c
index dced16e05..d833bcfc0 100644
--- a/gio/gcancellable.c
+++ b/gio/gcancellable.c
@@ -594,7 +594,7 @@ g_cancellable_connect (GCancellable *cancellable,
/**
* g_cancellable_disconnect:
* @cancellable: (nullable): A #GCancellable or %NULL.
- * @handler_id: Handler id of the handler to be disconnected, or %0.
+ * @handler_id: Handler id of the handler to be disconnected, or `0`.
*
* Disconnects a handler from a cancellable instance similar to
* g_signal_handler_disconnect(). Additionally, in the event that a
@@ -608,7 +608,7 @@ g_cancellable_connect (GCancellable *cancellable,
* signal handler is removed. See #GCancellable::cancelled for
* details on how to use this.
*
- * If @cancellable is %NULL or @handler_id is %0 this function does
+ * If @cancellable is %NULL or @handler_id is `0` this function does
* nothing.
*
* Since: 2.22
@@ -644,18 +644,6 @@ typedef struct {
guint cancelled_handler;
} GCancellableSource;
-/*
- * We can't guarantee that the source still has references, so we are
- * relying on the fact that g_source_set_ready_time() no longer makes
- * assertions about the reference count - the source might be in the
- * window between last-unref and finalize, during which its refcount
- * is officially 0. However, we *can* guarantee that it's OK to
- * dereference it in a limited way, because we know we haven't yet reached
- * cancellable_source_finalize() - if we had, then we would have waited
- * for signal emission to finish, then disconnected the signal handler
- * under the lock.
- * See https://bugzilla.gnome.org/show_bug.cgi?id=791754
- */
static void
cancellable_source_cancelled (GCancellable *cancellable,
gpointer user_data)
diff --git a/gio/gdbus-2.0/codegen/Makefile.am b/gio/gdbus-2.0/codegen/Makefile.am
index b3fb2c292..b4e500cb0 100644
--- a/gio/gdbus-2.0/codegen/Makefile.am
+++ b/gio/gdbus-2.0/codegen/Makefile.am
@@ -21,7 +21,7 @@ CLEANFILES += gdbus-codegen
EXTRA_DIST += gdbus-codegen.in
gdbus-codegen: gdbus-codegen.in Makefile $(codegen_PYTHON)
- $(AM_V_GEN) sed -e 's,@datadir\@,$(datadir),' -e 's,@PYTHON\@,$(PYTHON),' $< > $@.tmp && mv $@.tmp $@
+ $(AM_V_GEN) sed -e 's,@DATADIR\@,$(datadir),' -e 's,@PYTHON\@,$(PYTHON),' $< > $@.tmp && mv $@.tmp $@
@chmod a+x $@
clean-local:
diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in
index 805098188..67d367543 100644..100755
--- a/gio/gdbus-2.0/codegen/gdbus-codegen.in
+++ b/gio/gdbus-2.0/codegen/gdbus-codegen.in
@@ -37,7 +37,19 @@ else:
# parent directory to the python path.
path = os.path.join(filedir, '..')
-sys.path.insert(0, os.path.abspath(path))
+# Canonicalize, then do further testing
+path = os.path.abspath(path)
+
+# If the above path detection failed, use the hard-coded datadir. This can
+# happen when, for instance, bindir and datadir are not in the same prefix or
+# on Windows where we cannot make any guarantees about the directory structure.
+#
+# In these cases our installation cannot be relocatable, but at least we should
+# be able to find the codegen module.
+if not os.path.isfile(os.path.join(path, 'codegen', 'codegen_main.py')):
+ path = os.path.join('@DATADIR@', 'glib-2.0')
+
+sys.path.insert(0, path)
from codegen import codegen_main
sys.exit(codegen_main.codegen_main())
diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
index 0e9ffbdfa..54a86b0d6 100644
--- a/gio/gdbus-2.0/codegen/meson.build
+++ b/gio/gdbus-2.0/codegen/meson.build
@@ -11,9 +11,9 @@ gdbus_codegen_files = [
gdbus_codegen_conf = configuration_data()
gdbus_codegen_conf.set('VERSION', glib_version)
gdbus_codegen_conf.set('PYTHON', python.path())
+gdbus_codegen_conf.set('DATADIR', glib_datadir)
# Install gdbus-codegen executable
-# FIXME: Set permissions
gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
output : 'gdbus-codegen',
install : true,
@@ -23,19 +23,19 @@ gdbus_codegen = configure_file(input : 'gdbus-codegen.in',
codegen_dir = join_paths(get_option('datadir'), 'glib-2.0/codegen')
-configure_file(input : 'config.py.in',
- output : 'config.py',
- install : true,
- install_dir : codegen_dir,
- configuration : gdbus_codegen_conf
-)
+gdbus_codegen_built_files = []
+gdbus_codegen_built_files += configure_file(input : 'config.py.in',
+ output : 'config.py',
+ install : true,
+ install_dir : codegen_dir,
+ configuration : gdbus_codegen_conf)
blank_conf = configuration_data()
foreach f : gdbus_codegen_files
# Copy these into the builddir so that gdbus-codegen can be used uninstalled
# and then install it too so that it can be used after installation
- configure_file(input : f, output : f,
- install : true,
- install_dir : codegen_dir,
- configuration : blank_conf)
+ gdbus_codegen_built_files += configure_file(input : f, output : f,
+ install : true,
+ install_dir : codegen_dir,
+ configuration : blank_conf)
endforeach
diff --git a/gio/gdbus-tool.c b/gio/gdbus-tool.c
index fb285f1db..77863a2a0 100644
--- a/gio/gdbus-tool.c
+++ b/gio/gdbus-tool.c
@@ -137,9 +137,11 @@ modify_argv0_for_command (gint *argc, gchar **argv[], const gchar *command)
/* ---------------------------------------------------------------------------------------------------- */
static void
-print_methods (GDBusConnection *c,
- const gchar *name,
- const gchar *path)
+print_methods_and_signals (GDBusConnection *c,
+ const gchar *name,
+ const gchar *path,
+ gboolean print_methods,
+ gboolean print_signals)
{
GVariant *result;
GError *error;
@@ -181,11 +183,16 @@ print_methods (GDBusConnection *c,
for (n = 0; node->interfaces != NULL && node->interfaces[n] != NULL; n++)
{
const GDBusInterfaceInfo *iface = node->interfaces[n];
- for (m = 0; iface->methods != NULL && iface->methods[m] != NULL; m++)
+ for (m = 0; print_methods && iface->methods != NULL && iface->methods[m] != NULL; m++)
{
const GDBusMethodInfo *method = iface->methods[m];
g_print ("%s.%s \n", iface->name, method->name);
}
+ for (m = 0; print_signals && iface->signals != NULL && iface->signals[m] != NULL; m++)
+ {
+ const GDBusSignalInfo *signal = iface->signals[m];
+ g_print ("%s.%s \n", iface->name, signal->name);
+ }
}
g_dbus_node_info_unref (node);
@@ -302,7 +309,7 @@ print_names (GDBusConnection *c,
}
g_variant_get (result, "(as)", &iter);
while (g_variant_iter_loop (iter, "s", &str))
- g_hash_table_insert (name_set, g_strdup (str), NULL);
+ g_hash_table_add (name_set, g_strdup (str));
g_variant_iter_free (iter);
g_variant_unref (result);
@@ -326,7 +333,7 @@ print_names (GDBusConnection *c,
}
g_variant_get (result, "(as)", &iter);
while (g_variant_iter_loop (iter, "s", &str))
- g_hash_table_insert (name_set, g_strdup (str), NULL);
+ g_hash_table_add (name_set, g_strdup (str));
g_variant_iter_free (iter);
g_variant_unref (result);
@@ -565,6 +572,7 @@ handle_emit (gint *argc,
gboolean skip_dashes;
guint parm;
guint n;
+ gboolean complete_names, complete_paths, complete_signals;
ret = FALSE;
c = NULL;
@@ -580,6 +588,27 @@ handle_emit (gint *argc,
g_option_context_add_main_entries (o, emit_entries, GETTEXT_PACKAGE);
g_option_context_add_group (o, connection_get_group ());
+ complete_names = FALSE;
+ if (request_completion && *argc > 1 && g_strcmp0 ((*argv)[(*argc)-1], "--dest") == 0)
+ {
+ complete_names = TRUE;
+ remove_arg ((*argc) - 1, argc, argv);
+ }
+
+ complete_paths = FALSE;
+ if (request_completion && *argc > 1 && g_strcmp0 ((*argv)[(*argc)-1], "--object-path") == 0)
+ {
+ complete_paths = TRUE;
+ remove_arg ((*argc) - 1, argc, argv);
+ }
+
+ complete_signals = FALSE;
+ if (request_completion && *argc > 1 && g_strcmp0 ((*argv)[(*argc)-1], "--signal") == 0)
+ {
+ complete_signals = TRUE;
+ remove_arg ((*argc) - 1, argc, argv);
+ }
+
if (!g_option_context_parse (o, argc, argv, NULL))
{
if (!request_completion)
@@ -616,36 +645,99 @@ handle_emit (gint *argc,
goto out;
}
- /* All done with completion now */
- if (request_completion)
- goto out;
+ /* validate and complete destination (bus name) */
+ if (complete_names)
+ {
+ print_names (c, FALSE);
+ goto out;
+ }
+ if (opt_emit_dest == NULL)
+ {
+ if (request_completion)
+ g_print ("--dest \n");
+ else
+ g_printerr (_("Error: Destination is not specified\n"));
+ goto out;
+ }
+ if (request_completion && g_strcmp0 ("--dest", completion_prev) == 0)
+ {
+ print_names (c, g_str_has_prefix (opt_emit_dest, ":"));
+ goto out;
+ }
+
+ if (!request_completion && !g_dbus_is_unique_name (opt_emit_dest))
+ {
+ g_printerr (_("Error: %s is not a valid unique bus name.\n"), opt_emit_dest);
+ goto out;
+ }
+ /* validate and complete object path */
+ if (complete_paths)
+ {
+ print_paths (c, opt_emit_dest, "/");
+ goto out;
+ }
if (opt_emit_object_path == NULL)
{
- g_printerr (_("Error: object path not specified.\n"));
+ if (request_completion)
+ g_print ("--object-path \n");
+ else
+ g_printerr (_("Error: Object path is not specified\n"));
+ goto out;
+ }
+ if (request_completion && g_strcmp0 ("--object-path", completion_prev) == 0)
+ {
+ gchar *p;
+ s = g_strdup (opt_emit_object_path);
+ p = strrchr (s, '/');
+ if (p != NULL)
+ {
+ if (p == s)
+ p++;
+ *p = '\0';
+ }
+ print_paths (c, opt_emit_dest, s);
+ g_free (s);
goto out;
}
- if (!g_variant_is_object_path (opt_emit_object_path))
+ if (!request_completion && !g_variant_is_object_path (opt_emit_object_path))
{
g_printerr (_("Error: %s is not a valid object path\n"), opt_emit_object_path);
goto out;
}
+ /* validate and complete signal (interface + signal name) */
+ if (complete_signals)
+ {
+ print_methods_and_signals (c, opt_emit_dest, opt_emit_object_path, FALSE, TRUE);
+ goto out;
+ }
if (opt_emit_signal == NULL)
{
- g_printerr (_("Error: signal not specified.\n"));
+ if (request_completion)
+ g_print ("--signal \n");
+ else
+ g_printerr (_("Error: Signal name is not specified\n"));
+ goto out;
+ }
+ if (request_completion && g_strcmp0 ("--signal", completion_prev) == 0)
+ {
+ print_methods_and_signals (c, opt_emit_dest, opt_emit_object_path, FALSE, TRUE);
goto out;
}
-
s = strrchr (opt_emit_signal, '.');
- if (s == NULL)
+ if (!request_completion && s == NULL)
{
- g_printerr (_("Error: signal must be the fully-qualified name.\n"));
+ g_printerr (_("Error: Signal name “%s” is invalid\n"), opt_emit_signal);
goto out;
}
signal_name = g_strdup (s + 1);
interface_name = g_strndup (opt_emit_signal, s - opt_emit_signal);
+ /* All done with completion now */
+ if (request_completion)
+ goto out;
+
if (!g_dbus_is_interface_name (interface_name))
{
g_printerr (_("Error: %s is not a valid interface name\n"), interface_name);
@@ -658,12 +750,6 @@ handle_emit (gint *argc,
goto out;
}
- if (opt_emit_dest != NULL && !g_dbus_is_unique_name (opt_emit_dest))
- {
- g_printerr (_("Error: %s is not a valid unique bus name.\n"), opt_emit_dest);
- goto out;
- }
-
/* Read parameters */
g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
skip_dashes = TRUE;
@@ -862,27 +948,23 @@ handle_call (gint *argc,
}
/* validate and complete destination (bus name) */
- if (g_dbus_connection_get_unique_name (c) != NULL)
+ if (complete_names)
{
- /* this only makes sense on message bus connections */
- if (complete_names)
- {
- print_names (c, FALSE);
- goto out;
- }
- if (opt_call_dest == NULL)
- {
- if (request_completion)
- g_print ("--dest \n");
- else
- g_printerr (_("Error: Destination is not specified\n"));
- goto out;
- }
- if (request_completion && g_strcmp0 ("--dest", completion_prev) == 0)
- {
- print_names (c, g_str_has_prefix (opt_call_dest, ":"));
- goto out;
- }
+ print_names (c, FALSE);
+ goto out;
+ }
+ if (opt_call_dest == NULL)
+ {
+ if (request_completion)
+ g_print ("--dest \n");
+ else
+ g_printerr (_("Error: Destination is not specified\n"));
+ goto out;
+ }
+ if (request_completion && g_strcmp0 ("--dest", completion_prev) == 0)
+ {
+ print_names (c, g_str_has_prefix (opt_call_dest, ":"));
+ goto out;
}
if (!request_completion && !g_dbus_is_name (opt_call_dest))
@@ -929,7 +1011,7 @@ handle_call (gint *argc,
/* validate and complete method (interface + method name) */
if (complete_methods)
{
- print_methods (c, opt_call_dest, opt_call_object_path);
+ print_methods_and_signals (c, opt_call_dest, opt_call_object_path, TRUE, FALSE);
goto out;
}
if (opt_call_method == NULL)
@@ -942,7 +1024,7 @@ handle_call (gint *argc,
}
if (request_completion && g_strcmp0 ("--method", completion_prev) == 0)
{
- print_methods (c, opt_call_dest, opt_call_object_path);
+ print_methods_and_signals (c, opt_call_dest, opt_call_object_path, TRUE, FALSE);
goto out;
}
s = strrchr (opt_call_method, '.');
@@ -1619,28 +1701,26 @@ handle_introspect (gint *argc,
goto out;
}
- if (g_dbus_connection_get_unique_name (c) != NULL)
+ if (complete_names)
{
- if (complete_names)
- {
- print_names (c, FALSE);
- goto out;
- }
- /* this only makes sense on message bus connections */
- if (opt_introspect_dest == NULL)
- {
- if (request_completion)
- g_print ("--dest \n");
- else
- g_printerr (_("Error: Destination is not specified\n"));
- goto out;
- }
- if (request_completion && g_strcmp0 ("--dest", completion_prev) == 0)
- {
- print_names (c, g_str_has_prefix (opt_introspect_dest, ":"));
- goto out;
- }
+ print_names (c, FALSE);
+ goto out;
+ }
+ /* this only makes sense on message bus connections */
+ if (opt_introspect_dest == NULL)
+ {
+ if (request_completion)
+ g_print ("--dest \n");
+ else
+ g_printerr (_("Error: Destination is not specified\n"));
+ goto out;
+ }
+ if (request_completion && g_strcmp0 ("--dest", completion_prev) == 0)
+ {
+ print_names (c, g_str_has_prefix (opt_introspect_dest, ":"));
+ goto out;
}
+
if (complete_paths)
{
print_paths (c, opt_introspect_dest, "/");
@@ -1649,7 +1729,7 @@ handle_introspect (gint *argc,
if (!request_completion && !g_dbus_is_name (opt_introspect_dest))
{
- g_printerr (_("Error: %s is not a valid bus name\n"), opt_introspect_dest);
+ g_printerr (_("Error: %s is not a valid bus name\n"), opt_introspect_dest);
goto out;
}
@@ -1854,27 +1934,32 @@ handle_monitor (gint *argc,
goto out;
}
- if (g_dbus_connection_get_unique_name (c) != NULL)
+ /* Monitoring doesn’t make sense on a non-message-bus connection. */
+ if (g_dbus_connection_get_unique_name (c) == NULL)
{
- if (complete_names)
- {
- print_names (c, FALSE);
- goto out;
- }
- /* this only makes sense on message bus connections */
- if (opt_monitor_dest == NULL)
- {
- if (request_completion)
- g_print ("--dest \n");
- else
- g_printerr (_("Error: Destination is not specified\n"));
- goto out;
- }
- if (request_completion && g_strcmp0 ("--dest", completion_prev) == 0)
- {
- print_names (c, g_str_has_prefix (opt_monitor_dest, ":"));
- goto out;
- }
+ if (!request_completion)
+ g_printerr (_("Error: can’t monitor a non-message-bus connection\n"));
+ goto out;
+ }
+
+ if (complete_names)
+ {
+ print_names (c, FALSE);
+ goto out;
+ }
+ /* this only makes sense on message bus connections */
+ if (opt_monitor_dest == NULL)
+ {
+ if (request_completion)
+ g_print ("--dest \n");
+ else
+ g_printerr (_("Error: Destination is not specified\n"));
+ goto out;
+ }
+ if (request_completion && g_strcmp0 ("--dest", completion_prev) == 0)
+ {
+ print_names (c, g_str_has_prefix (opt_monitor_dest, ":"));
+ goto out;
}
if (!request_completion && !g_dbus_is_name (opt_monitor_dest))
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 6fb3d2ac8..faee80087 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -1702,10 +1702,10 @@ g_dbus_address_get_for_bus_sync (GBusType bus_type,
* Escape @string so it can appear in a D-Bus address as the value
* part of a key-value pair.
*
- * For instance, if @string is "/run/bus-for-:0",
- * this function would return "/run/bus-for-%3A0",
+ * For instance, if @string is `/run/bus-for-:0`,
+ * this function would return `/run/bus-for-%3A0`,
* which could be used in a D-Bus address like
- * "unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0".
+ * `unix:nonce-tcp:host=127.0.0.1,port=42,noncefile=/run/bus-for-%3A0`.
*
* Returns: (transfer full): a copy of @string with all
* non-optionally-escaped bytes escaped
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index e46e62260..1a0ada5bf 100644
--- a/gio/gdbusauth.c
+++ b/gio/gdbusauth.c
@@ -961,7 +961,6 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
GDataInputStream *dis;
GDataOutputStream *dos;
GError *local_error;
- guchar byte;
gchar *line;
gsize line_length;
GDBusAuthMechanism *mech;
@@ -997,7 +996,7 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
g_data_input_stream_set_newline_type (dis, G_DATA_STREAM_NEWLINE_TYPE_CR_LF);
- /* first read the NUL-byte (TODO: read credentials if using a unix domain socket) */
+ /* first read the NUL-byte */
#ifdef G_OS_UNIX
if (G_IS_UNIX_CONNECTION (auth->priv->stream))
{
@@ -1014,8 +1013,7 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
else
{
local_error = NULL;
- byte = g_data_input_stream_read_byte (dis, cancellable, &local_error);
- byte = byte; /* To avoid -Wunused-but-set-variable */
+ (void)g_data_input_stream_read_byte (dis, cancellable, &local_error);
if (local_error != NULL)
{
g_propagate_error (error, local_error);
@@ -1024,8 +1022,7 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
}
#else
local_error = NULL;
- byte = g_data_input_stream_read_byte (dis, cancellable, &local_error);
- byte = byte; /* To avoid -Wunused-but-set-variable */
+ (void)g_data_input_stream_read_byte (dis, cancellable, &local_error);
if (local_error != NULL)
{
g_propagate_error (error, local_error);
diff --git a/gio/gdbusauthmechanismsha1.c b/gio/gdbusauthmechanismsha1.c
index a51430cfa..47cef7833 100644
--- a/gio/gdbusauthmechanismsha1.c
+++ b/gio/gdbusauthmechanismsha1.c
@@ -389,7 +389,6 @@ keyring_lookup_entry (const gchar *cookie_context,
gchar **tokens;
gchar *endp;
gint line_id;
- guint64 line_when;
if (line[0] == '\0')
continue;
@@ -422,8 +421,7 @@ keyring_lookup_entry (const gchar *cookie_context,
goto out;
}
- line_when = g_ascii_strtoll (tokens[1], &endp, 10);
- line_when = line_when; /* To avoid -Wunused-but-set-variable */
+ (void)g_ascii_strtoll (tokens[1], &endp, 10); /* do not care what the timestamp is */
if (*endp != '\0')
{
g_set_error (error,
@@ -490,7 +488,9 @@ keyring_acquire_lock (const gchar *path,
gchar *lock;
gint ret;
guint num_tries;
+#ifdef EEXISTS
guint num_create_tries;
+#endif
int errsv;
g_return_val_if_fail (path != NULL, FALSE);
@@ -512,8 +512,8 @@ keyring_acquire_lock (const gchar *path,
* real locking implementations are still flaky on network filesystems
*/
- num_create_tries = 0;
#ifdef EEXISTS
+ num_create_tries = 0;
again:
#endif
num_tries = 0;
@@ -562,7 +562,6 @@ keyring_acquire_lock (const gchar *path,
goto again;
}
#endif
- num_create_tries = num_create_tries; /* To avoid -Wunused-but-set-variable */
g_set_error (error,
G_IO_ERROR,
g_io_error_from_errno (errsv),
@@ -753,7 +752,6 @@ keyring_generate_entry (const gchar *cookie_context,
g_strfreev (tokens);
goto out;
}
- line_when = line_when; /* To avoid -Wunused-but-set-variable */
/* D-Bus spec says:
diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c
index b56c5a875..421e9eab7 100644
--- a/gio/gdbusconnection.c
+++ b/gio/gdbusconnection.c
@@ -635,7 +635,7 @@ g_dbus_connection_dispose (GObject *object)
else
{
if (alive_connections != NULL)
- g_warn_if_fail (g_hash_table_lookup (alive_connections, connection) == NULL);
+ g_warn_if_fail (!g_hash_table_contains (alive_connections, connection));
}
CONNECTION_UNLOCK (connection);
G_UNLOCK (message_bus_lock);
@@ -2226,7 +2226,7 @@ on_worker_message_received (GDBusWorker *worker,
gboolean alive;
G_LOCK (message_bus_lock);
- alive = (g_hash_table_lookup (alive_connections, user_data) != NULL);
+ alive = g_hash_table_contains (alive_connections, user_data);
if (!alive)
{
G_UNLOCK (message_bus_lock);
@@ -2324,7 +2324,7 @@ on_worker_message_about_to_be_sent (GDBusWorker *worker,
gboolean alive;
G_LOCK (message_bus_lock);
- alive = (g_hash_table_lookup (alive_connections, user_data) != NULL);
+ alive = g_hash_table_contains (alive_connections, user_data);
if (!alive)
{
G_UNLOCK (message_bus_lock);
@@ -2397,7 +2397,7 @@ on_worker_closed (GDBusWorker *worker,
guint old_atomic_flags;
G_LOCK (message_bus_lock);
- alive = (g_hash_table_lookup (alive_connections, user_data) != NULL);
+ alive = g_hash_table_contains (alive_connections, user_data);
if (!alive)
{
G_UNLOCK (message_bus_lock);
@@ -2572,7 +2572,7 @@ initable_init (GInitable *initable,
G_LOCK (message_bus_lock);
if (alive_connections == NULL)
alive_connections = g_hash_table_new (g_direct_hash, g_direct_equal);
- g_hash_table_insert (alive_connections, connection, connection);
+ g_hash_table_add (alive_connections, connection);
G_UNLOCK (message_bus_lock);
connection->worker = _g_dbus_worker_new (connection->stream,
@@ -4708,8 +4708,8 @@ maybe_add_path (const gchar *path, gsize path_len, const gchar *object_path, GHa
else
s = g_strdup (begin);
- if (g_hash_table_lookup (set, s) == NULL)
- g_hash_table_insert (set, s, GUINT_TO_POINTER (1));
+ if (!g_hash_table_contains (set, s))
+ g_hash_table_add (set, s);
else
g_free (s);
}
@@ -6126,7 +6126,7 @@ g_dbus_connection_call_finish (GDBusConnection *connection,
* operation will fail with %G_IO_ERROR_CANCELLED. If @parameters
* contains a value not compatible with the D-Bus protocol, the operation
* fails with %G_IO_ERROR_INVALID_ARGUMENT.
-
+ *
* If @reply_type is non-%NULL then the reply will be checked for having
* this type and an error will be raised if it does not match. Said
* another way, if you give a @reply_type then any non-%NULL return
diff --git a/gio/gdbuserror.c b/gio/gdbuserror.c
index c41c2039d..95949ead3 100644
--- a/gio/gdbuserror.c
+++ b/gio/gdbuserror.c
@@ -172,7 +172,7 @@ g_dbus_error_quark (void)
* g_dbus_error_register_error_domain:
* @error_domain_quark_name: The error domain name.
* @quark_volatile: A pointer where to store the #GQuark.
- * @entries: A pointer to @num_entries #GDBusErrorEntry struct items.
+ * @entries: (array length=num_entries): A pointer to @num_entries #GDBusErrorEntry struct items.
* @num_entries: Number of items to register.
*
* Helper function for associating a #GError error domain with D-Bus error names.
diff --git a/gio/gdbusinterfaceskeleton.c b/gio/gdbusinterfaceskeleton.c
index 4dd17af9c..4c82bd0a4 100644
--- a/gio/gdbusinterfaceskeleton.c
+++ b/gio/gdbusinterfaceskeleton.c
@@ -97,7 +97,7 @@ g_dbus_interface_skeleton_finalize (GObject *object)
{
GDBusInterfaceSkeleton *interface = G_DBUS_INTERFACE_SKELETON (object);
- /* Hold the lock just incase any code we call verifies that the lock is held */
+ /* Hold the lock just in case any code we call verifies that the lock is held */
g_mutex_lock (&interface->priv->lock);
/* unexport from all connections if we're exported anywhere */
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index e80794ff6..7dd458d20 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -1440,7 +1440,9 @@ parse_value_from_blob (GMemoryBuffer *buf,
{
GVariant *ret;
GError *local_error;
+#ifdef DEBUG_SERIALIZER
gboolean is_leaf;
+#endif /* DEBUG_SERIALIZER */
const gchar *type_string;
type_string = g_variant_type_peek_string (type);
@@ -1460,7 +1462,9 @@ parse_value_from_blob (GMemoryBuffer *buf,
ret = NULL;
+#ifdef DEBUG_SERIALIZER
is_leaf = TRUE;
+#endif /* DEBUG_SERIALIZER */
local_error = NULL;
switch (type_string[0])
{
@@ -1643,8 +1647,8 @@ parse_value_from_blob (GMemoryBuffer *buf,
array_len = g_memory_buffer_read_uint32 (buf);
- is_leaf = FALSE;
#ifdef DEBUG_SERIALIZER
+ is_leaf = FALSE;
g_print (": array spans 0x%04x bytes\n", array_len);
#endif /* DEBUG_SERIALIZER */
@@ -1751,8 +1755,8 @@ parse_value_from_blob (GMemoryBuffer *buf,
ensure_input_padding (buf, 8);
- is_leaf = FALSE;
#ifdef DEBUG_SERIALIZER
+ is_leaf = FALSE;
g_print ("\n");
#endif /* DEBUG_SERIALIZER */
@@ -1786,8 +1790,8 @@ parse_value_from_blob (GMemoryBuffer *buf,
{
ensure_input_padding (buf, 8);
- is_leaf = FALSE;
#ifdef DEBUG_SERIALIZER
+ is_leaf = FALSE;
g_print ("\n");
#endif /* DEBUG_SERIALIZER */
@@ -1821,8 +1825,8 @@ parse_value_from_blob (GMemoryBuffer *buf,
}
else if (g_variant_type_is_variant (type))
{
- is_leaf = FALSE;
#ifdef DEBUG_SERIALIZER
+ is_leaf = FALSE;
g_print ("\n");
#endif /* DEBUG_SERIALIZER */
@@ -1894,8 +1898,6 @@ parse_value_from_blob (GMemoryBuffer *buf,
g_free (s);
}
}
-#else
- is_leaf = is_leaf; /* To avoid -Wunused-but-set-variable */
#endif /* DEBUG_SERIALIZER */
/* sink the reference, if floating */
diff --git a/gio/gdbusnamewatching.h b/gio/gdbusnamewatching.h
index d803ecb5d..491e21e21 100644
--- a/gio/gdbusnamewatching.h
+++ b/gio/gdbusnamewatching.h
@@ -54,7 +54,7 @@ typedef void (*GBusNameAppearedCallback) (GDBusConnection *connection,
*
* Invoked when the name being watched is known not to have to have a owner.
*
- * This is also invoked when the #GDBusConection on which the watch was
+ * This is also invoked when the #GDBusConnection on which the watch was
* established has been closed. In that case, @connection will be
* %NULL.
*
diff --git a/gio/gdbusobjectmanagerclient.c b/gio/gdbusobjectmanagerclient.c
index 17a515a37..08c94d506 100644
--- a/gio/gdbusobjectmanagerclient.c
+++ b/gio/gdbusobjectmanagerclient.c
@@ -532,7 +532,8 @@ g_dbus_object_manager_client_class_init (GDBusObjectManagerClientClass *klass)
* @object_proxy: The #GDBusObjectProxy on which an interface has properties that are changing.
* @interface_proxy: The #GDBusProxy that has properties that are changing.
* @changed_properties: A #GVariant containing the properties that changed.
- * @invalidated_properties: A %NULL terminated array of properties that was invalidated.
+ * @invalidated_properties: (array zero-terminated=1) (element-type utf8): A %NULL terminated
+ * array of properties that were invalidated.
*
* Emitted when one or more D-Bus properties on proxy changes. The
* local cache has already been updated when this signal fires. Note
@@ -1541,6 +1542,13 @@ add_interfaces (GDBusObjectManagerClient *manager,
g_variant_unref (properties);
}
+ if (added)
+ {
+ g_hash_table_insert (manager->priv->map_object_path_to_object_proxy,
+ g_strdup (object_path),
+ op);
+ }
+
g_mutex_unlock (&manager->priv->lock);
/* now that we don't hold the lock any more, emit signals */
@@ -1554,12 +1562,8 @@ add_interfaces (GDBusObjectManagerClient *manager,
g_list_free (interface_added_signals);
if (added)
- {
- g_hash_table_insert (manager->priv->map_object_path_to_object_proxy,
- g_strdup (object_path),
- op);
- g_signal_emit_by_name (manager, "object-added", op);
- }
+ g_signal_emit_by_name (manager, "object-added", op);
+
g_object_unref (manager);
g_object_unref (op);
}
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index fa52f8494..cb5ec48b5 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -2199,7 +2199,7 @@ g_desktop_app_info_get_show_in (GDesktopAppInfo *info,
/* Launching... {{{2 */
static char *
-expand_macro_single (char macro, const char *uri)
+expand_macro_single (char macro, char *uri)
{
GFile *file;
char *result = NULL;
@@ -2248,29 +2248,6 @@ expand_macro_single (char macro, const char *uri)
return result;
}
-static char *
-expand_macro_uri (char macro, const char *uri, gboolean force_file_uri, char force_file_uri_macro)
-{
- char *expanded = NULL;
-
- g_return_val_if_fail (uri != NULL, NULL);
-
- if (!force_file_uri ||
- /* Pass URI if it contains an anchor */
- strchr (uri, '#') != NULL)
- {
- expanded = expand_macro_single (macro, uri);
- }
- else
- {
- expanded = expand_macro_single (force_file_uri_macro, uri);
- if (expanded == NULL)
- expanded = expand_macro_single (macro, uri);
- }
-
- return expanded;
-}
-
static void
expand_macro (char macro,
GString *exec,
@@ -2278,10 +2255,10 @@ expand_macro (char macro,
GList **uri_list)
{
GList *uris = *uri_list;
- char *expanded = NULL;
+ char *expanded;
gboolean force_file_uri;
char force_file_uri_macro;
- const char *uri;
+ char *uri;
g_return_if_fail (exec != NULL);
@@ -2318,8 +2295,19 @@ expand_macro (char macro,
if (uris)
{
uri = uris->data;
- expanded = expand_macro_uri (macro, uri,
- force_file_uri, force_file_uri_macro);
+ if (!force_file_uri ||
+ /* Pass URI if it contains an anchor */
+ strchr (uri, '#') != NULL)
+ {
+ expanded = expand_macro_single (macro, uri);
+ }
+ else
+ {
+ expanded = expand_macro_single (force_file_uri_macro, uri);
+ if (expanded == NULL)
+ expanded = expand_macro_single (macro, uri);
+ }
+
if (expanded)
{
g_string_append (exec, expanded);
@@ -2337,8 +2325,20 @@ expand_macro (char macro,
while (uris)
{
uri = uris->data;
- expanded = expand_macro_uri (macro, uri,
- force_file_uri, force_file_uri_macro);
+
+ if (!force_file_uri ||
+ /* Pass URI if it contains an anchor */
+ strchr (uri, '#') != NULL)
+ {
+ expanded = expand_macro_single (macro, uri);
+ }
+ else
+ {
+ expanded = expand_macro_single (force_file_uri_macro, uri);
+ if (expanded == NULL)
+ expanded = expand_macro_single (macro, uri);
+ }
+
if (expanded)
{
g_string_append (exec, expanded);
@@ -2658,8 +2658,6 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
{
gboolean completed = FALSE;
GList *old_uris;
- GList *dup_uris;
-
char **argv, **envp;
int argc;
ChildSetupData data;
@@ -2673,11 +2671,6 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
else
envp = g_get_environ ();
- /* The GList* passed to expand_application_parameters() will be modified
- * internally by expand_macro(), so we need to pass a copy of it instead,
- * and also use that copy to control the exit condition of the loop below.
- */
- dup_uris = g_list_copy (uris);
do
{
GPid pid;
@@ -2685,13 +2678,13 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
GList *iter;
char *sn_id = NULL;
- old_uris = dup_uris;
- if (!expand_application_parameters (info, exec_line, &dup_uris, &argc, &argv, error))
+ old_uris = uris;
+ if (!expand_application_parameters (info, exec_line, &uris, &argc, &argv, error))
goto out;
/* Get the subset of URIs we're launching with this process */
launched_uris = NULL;
- for (iter = old_uris; iter != NULL && iter != dup_uris; iter = iter->next)
+ for (iter = old_uris; iter != NULL && iter != uris; iter = iter->next)
launched_uris = g_list_prepend (launched_uris, iter->data);
launched_uris = g_list_reverse (launched_uris);
@@ -2787,12 +2780,11 @@ g_desktop_app_info_launch_uris_with_spawn (GDesktopAppInfo *info,
g_strfreev (argv);
argv = NULL;
}
- while (dup_uris != NULL);
+ while (uris != NULL);
completed = TRUE;
out:
- g_list_free (dup_uris);
g_strfreev (argv);
g_strfreev (envp);
@@ -3011,7 +3003,7 @@ g_desktop_app_info_launch (GAppInfo *appinfo,
* @uris: (element-type utf8): List of URIs
* @launch_context: (nullable): a #GAppLaunchContext
* @spawn_flags: #GSpawnFlags, used for each process
- * @user_setup: (scope call) (nullable): a #GSpawnChildSetupFunc, used once
+ * @user_setup: (scope async) (nullable): a #GSpawnChildSetupFunc, used once
* for each process.
* @user_setup_data: (closure user_setup) (nullable): User data for @user_setup
* @pid_callback: (scope call) (nullable): Callback for child processes
@@ -3714,7 +3706,7 @@ g_desktop_app_info_delete (GAppInfo *appinfo)
/* Create for commandline {{{2 */
/**
* g_app_info_create_from_commandline:
- * @commandline: the commandline to use
+ * @commandline: (type filename): the commandline to use
* @application_name: (nullable): the application name, or %NULL to use @commandline
* @flags: flags that can specify details of the created #GAppInfo
* @error: a #GError location to store the error occurring, %NULL to ignore.
diff --git a/gio/gdtlsconnection.c b/gio/gdtlsconnection.c
index 67a038d18..cbcb720dc 100644
--- a/gio/gdtlsconnection.c
+++ b/gio/gdtlsconnection.c
@@ -112,7 +112,7 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface)
*
* The certificate database to use when verifying this TLS connection.
* If no certificate database is set, then the default database will be
- * used. See g_dtls_backend_get_default_database().
+ * used. See g_tls_backend_get_default_database().
*
* Since: 2.48
*/
@@ -294,7 +294,7 @@ g_dtls_connection_default_init (GDtlsConnectionInterface *iface)
*
* Sets the certificate database that is used to verify peer certificates.
* This is set to the default database by default. See
- * g_dtls_backend_get_default_database(). If set to %NULL, then
+ * g_tls_backend_get_default_database(). If set to %NULL, then
* peer certificate validation will always set the
* %G_TLS_CERTIFICATE_UNKNOWN_CA error (meaning
* #GDtlsConnection::accept-certificate will always be emitted on
diff --git a/gio/gfile.c b/gio/gfile.c
index 8a78e95c9..812b148b7 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -81,6 +81,7 @@
* - g_file_new_for_commandline_arg() for a command line argument.
* - g_file_new_tmp() to create a temporary file from a template.
* - g_file_parse_name() from a UTF-8 string gotten from g_file_get_parse_name().
+ * - g_file_new_build_filename() to create a file from path elements.
*
* One way to think of a #GFile is as an abstraction of a pathname. For
* normal files the system pathname is what is stored internally, but as
@@ -4368,7 +4369,7 @@ g_file_query_writable_namespaces (GFile *file,
*
* Sets an attribute in the file with attribute name @attribute to @value.
*
- * Some attributes can be unset by setting @attribute to
+ * Some attributes can be unset by setting @type to
* %G_FILE_ATTRIBUTE_TYPE_INVALID and @value_p to %NULL.
*
* If @cancellable is not %NULL, then the operation can be cancelled by
@@ -6440,6 +6441,41 @@ g_file_parse_name (const char *parse_name)
return g_vfs_parse_name (g_vfs_get_default (), parse_name);
}
+/**
+ * g_file_new_build_filename:
+ * @first_element: (type filename): the first element in the path
+ * @...: remaining elements in path, terminated by %NULL
+ *
+ * Constructs a #GFile from a series of elements using the correct
+ * separator for filenames.
+ *
+ * Using this function is equivalent to calling g_build_filename(),
+ * followed by g_file_new_for_path() on the result.
+ *
+ * Returns: (transfer full): a new #GFile
+ *
+ * Since: 2.56
+ */
+GFile *
+g_file_new_build_filename (const gchar *first_element,
+ ...)
+{
+ gchar *str;
+ GFile *file;
+ va_list args;
+
+ g_return_val_if_fail (first_element != NULL, NULL);
+
+ va_start (args, first_element);
+ str = g_build_filename_valist (first_element, &args);
+ va_end (args);
+
+ file = g_file_new_for_path (str);
+ g_free (str);
+
+ return file;
+}
+
static gboolean
is_valid_scheme_character (char c)
{
@@ -6498,7 +6534,7 @@ new_for_cmdline_arg (const gchar *arg,
/**
* g_file_new_for_commandline_arg:
- * @arg: a command line string
+ * @arg: (type filename): a command line string
*
* Creates a #GFile with the given argument from the command line.
* The value of @arg can be either a URI, an absolute path or a
@@ -6528,7 +6564,7 @@ g_file_new_for_commandline_arg (const char *arg)
/**
* g_file_new_for_commandline_arg_and_cwd:
- * @arg: a command line string
+ * @arg: (type filename): a command line string
* @cwd: (type filename): the current working directory of the commandline
*
* Creates a #GFile with the given argument from the command line.
@@ -6957,9 +6993,11 @@ load_contents_open_callback (GObject *obj,
* g_file_load_partial_contents_async: (skip)
* @file: input #GFile
* @cancellable: optional #GCancellable object, %NULL to ignore
- * @read_more_callback: a #GFileReadMoreCallback to receive partial data
+ * @read_more_callback: (scope call) (closure user_data): a
+ * #GFileReadMoreCallback to receive partial data
* and to specify whether further data should be read
- * @callback: a #GAsyncReadyCallback to call when the request is satisfied
+ * @callback: (scope async) (closure user_data): a #GAsyncReadyCallback to call
+ * when the request is satisfied
* @user_data: the data to pass to the callback functions
*
* Reads the partial contents of a file. A #GFileReadMoreCallback should
@@ -8054,3 +8092,191 @@ g_file_supports_thread_contexts (GFile *file)
iface = G_FILE_GET_IFACE (file);
return iface->supports_thread_contexts;
}
+
+/**
+ * g_file_load_bytes:
+ * @file: a #GFile
+ * @cancellable: (nullable): a #GCancellable or %NULL
+ * @etag_out: (out) (nullable) (optional): a location to place the current
+ * entity tag for the file, or %NULL if the entity tag is not needed
+ * @error: a location for a #GError or %NULL
+ *
+ * Loads the contents of @file and returns it as #GBytes.
+ *
+ * If @file is a resource:// based URI, the resulting bytes will reference the
+ * embedded resource instead of a copy. Otherwise, this is equivalent to calling
+ * g_file_load_contents() and g_bytes_new_take().
+ *
+ * For resources, @etag_out will be set to %NULL.
+ *
+ * The data contained in the resulting #GBytes is always zero-terminated, but
+ * this is not included in the #GBytes length. The resulting #GBytes should be
+ * freed with g_bytes_unref() when no longer in use.
+ *
+ * Returns: (transfer full): a #GBytes or %NULL and @error is set
+ *
+ * Since: 2.56
+ */
+GBytes *
+g_file_load_bytes (GFile *file,
+ GCancellable *cancellable,
+ gchar **etag_out,
+ GError **error)
+{
+ gchar *contents;
+ gsize len;
+
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ if (etag_out != NULL)
+ *etag_out = NULL;
+
+ if (g_file_has_uri_scheme (file, "resource"))
+ {
+ GBytes *bytes;
+ gchar *uri, *unescaped;
+
+ uri = g_file_get_uri (file);
+ unescaped = g_uri_unescape_string (uri + strlen ("resource://"), NULL);
+ g_free (uri);
+
+ bytes = g_resources_lookup_data (unescaped, G_RESOURCE_LOOKUP_FLAGS_NONE, error);
+ g_free (unescaped);
+
+ return bytes;
+ }
+
+ /* contents is guaranteed to be \0 terminated */
+ if (g_file_load_contents (file, cancellable, &contents, &len, etag_out, error))
+ return g_bytes_new_take (g_steal_pointer (&contents), len);
+
+ return NULL;
+}
+
+static void
+g_file_load_bytes_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ GFile *file = G_FILE (object);
+ GTask *task = user_data;
+ GError *error = NULL;
+ gchar *etag = NULL;
+ gchar *contents = NULL;
+ gsize len = 0;
+
+ g_file_load_contents_finish (file, result, &contents, &len, &etag, &error);
+ g_task_set_task_data (task, g_steal_pointer (&etag), g_free);
+
+ if (error != NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task,
+ g_bytes_new_take (g_steal_pointer (&contents), len),
+ (GDestroyNotify)g_bytes_unref);
+
+ g_object_unref (task);
+}
+
+/**
+ * g_file_load_bytes_async:
+ * @file: a #GFile
+ * @cancellable: (nullable): a #GCancellable or %NULL
+ * @callback: (scope async): a #GAsyncReadyCallback to call when the
+ * request is satisfied
+ * @user_data: (closure): the data to pass to callback function
+ *
+ * Asynchronously loads the contents of @file as #GBytes.
+ *
+ * If @file is a resource:// based URI, the resulting bytes will reference the
+ * embedded resource instead of a copy. Otherwise, this is equivalent to calling
+ * g_file_load_contents_async() and g_bytes_new_take().
+ *
+ * @callback should call g_file_load_bytes_finish() to get the result of this
+ * asynchronous operation.
+ *
+ * See g_file_load_bytes() for more information.
+ *
+ * Since: 2.56
+ */
+void
+g_file_load_bytes_async (GFile *file,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GError *error = NULL;
+ GBytes *bytes;
+ GTask *task;
+
+ g_return_if_fail (G_IS_FILE (file));
+ g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
+
+ task = g_task_new (file, cancellable, callback, user_data);
+ g_task_set_source_tag (task, g_file_load_bytes_async);
+
+ if (!g_file_has_uri_scheme (file, "resource"))
+ {
+ g_file_load_contents_async (file,
+ cancellable,
+ g_file_load_bytes_cb,
+ g_steal_pointer (&task));
+ return;
+ }
+
+ bytes = g_file_load_bytes (file, cancellable, NULL, &error);
+
+ if (bytes == NULL)
+ g_task_return_error (task, g_steal_pointer (&error));
+ else
+ g_task_return_pointer (task,
+ g_steal_pointer (&bytes),
+ (GDestroyNotify)g_bytes_unref);
+
+ g_object_unref (task);
+}
+
+/**
+ * g_file_load_bytes_finish:
+ * @file: a #GFile
+ * @result: a #GAsyncResult provided to the callback
+ * @etag_out: (out) (nullable) (optional): a location to place the current
+ * entity tag for the file, or %NULL if the entity tag is not needed
+ * @error: a location for a #GError, or %NULL
+ *
+ * Completes an asynchronous request to g_file_load_bytes_async().
+ *
+ * For resources, @etag_out will be set to %NULL.
+ *
+ * The data contained in the resulting #GBytes is always zero-terminated, but
+ * this is not included in the #GBytes length. The resulting #GBytes should be
+ * freed with g_bytes_unref() when no longer in use.
+ *
+ * See g_file_load_bytes() for more information.
+ *
+ * Returns: (transfer full): a #GBytes or %NULL and @error is set
+ *
+ * Since: 2.56
+ */
+GBytes *
+g_file_load_bytes_finish (GFile *file,
+ GAsyncResult *result,
+ gchar **etag_out,
+ GError **error)
+{
+ GBytes *bytes;
+
+ g_return_val_if_fail (G_IS_FILE (file), NULL);
+ g_return_val_if_fail (G_IS_TASK (result), NULL);
+ g_return_val_if_fail (g_task_is_valid (G_TASK (result), file), NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ bytes = g_task_propagate_pointer (G_TASK (result), error);
+
+ if (etag_out != NULL)
+ *etag_out = g_strdup (g_task_get_task_data (G_TASK (result)));
+
+ return bytes;
+}
diff --git a/gio/gfile.h b/gio/gfile.h
index 1efbfa03b..1717665e4 100644
--- a/gio/gfile.h
+++ b/gio/gfile.h
@@ -606,6 +606,9 @@ GFile * g_file_new_tmp (const char
GError **error);
GLIB_AVAILABLE_IN_ALL
GFile * g_file_parse_name (const char *parse_name);
+GLIB_AVAILABLE_IN_2_56
+GFile * g_file_new_build_filename (const gchar *first_element,
+ ...) G_GNUC_NULL_TERMINATED;
GLIB_AVAILABLE_IN_ALL
GFile * g_file_dup (GFile *file);
GLIB_AVAILABLE_IN_ALL
@@ -1248,6 +1251,22 @@ gboolean g_file_replace_contents_finish (GFile *file,
GLIB_AVAILABLE_IN_ALL
gboolean g_file_supports_thread_contexts (GFile *file);
+GLIB_AVAILABLE_IN_2_56
+GBytes *g_file_load_bytes (GFile *file,
+ GCancellable *cancellable,
+ gchar **etag_out,
+ GError **error);
+GLIB_AVAILABLE_IN_2_56
+void g_file_load_bytes_async (GFile *file,
+ GCancellable *cancellable,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
+GLIB_AVAILABLE_IN_2_56
+GBytes *g_file_load_bytes_finish (GFile *file,
+ GAsyncResult *result,
+ gchar **etag_out,
+ GError **error);
+
G_END_DECLS
#endif /* __G_FILE_H__ */
diff --git a/gio/gfileenumerator.c b/gio/gfileenumerator.c
index 3e4db13b8..d96a798af 100644
--- a/gio/gfileenumerator.c
+++ b/gio/gfileenumerator.c
@@ -318,7 +318,7 @@ next_async_callback_wrapper (GObject *source_object,
* Request information for a number of files from the enumerator asynchronously.
* When all i/o for the operation is finished the @callback will be called with
* the requested information.
-
+ *
* See the documentation of #GFileEnumerator for information about the
* order of returned files.
*
diff --git a/gio/gioenums.h b/gio/gioenums.h
index bedc81b1f..c6ee8c433 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -1690,7 +1690,7 @@ typedef enum /*< flags >*/ {
* @G_TLS_DATABASE_LOOKUP_KEYPAIR: Restrict lookup to certificates that have
* a private key.
*
- * Flags for g_tls_database_lookup_certificate_handle(),
+ * Flags for g_tls_database_lookup_certificate_for_handle(),
* g_tls_database_lookup_certificate_issuer(),
* and g_tls_database_lookup_certificates_issued_by().
*
diff --git a/gio/giomodule.c b/gio/giomodule.c
index 6937932b2..40476957c 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -202,14 +202,14 @@ g_io_module_scope_block (GIOModuleScope *scope,
g_return_if_fail (basename != NULL);
key = g_strdup (basename);
- g_hash_table_insert (scope->basenames, key, key);
+ g_hash_table_add (scope->basenames, key);
}
static gboolean
_g_io_module_scope_contains (GIOModuleScope *scope,
const gchar *basename)
{
- return g_hash_table_lookup (scope->basenames, basename) ? TRUE : FALSE;
+ return g_hash_table_contains (scope->basenames, basename);
}
struct _GIOModule {
diff --git a/gio/giotypes.h b/gio/giotypes.h
index 67c9cc7b7..738e517bb 100644
--- a/gio/giotypes.h
+++ b/gio/giotypes.h
@@ -259,12 +259,18 @@ typedef struct _GVolumeMonitor GVolumeMonitor;
/**
* GAsyncReadyCallback:
- * @source_object: the object the asynchronous operation was started with.
+ * @source_object: (nullable): the object the asynchronous operation was started with.
* @res: a #GAsyncResult.
* @user_data: user data passed to the callback.
*
* Type definition for a function that will be called back when an asynchronous
- * operation within GIO has been completed.
+ * operation within GIO has been completed. #GAsyncReadyCallback
+ * callbacks from #GTask are guaranteed to be invoked in a later
+ * iteration of the
+ * [thread-default main context][g-main-context-push-thread-default]
+ * where the #GTask was created. All other users of
+ * #GAsyncReadyCallback must likewise call it asynchronously in a
+ * later iteration of the main context.
**/
typedef void (*GAsyncReadyCallback) (GObject *source_object,
GAsyncResult *res,
@@ -288,7 +294,7 @@ typedef void (*GFileProgressCallback) (goffset current_num_bytes,
* GFileReadMoreCallback:
* @file_contents: the data as currently read.
* @file_size: the size of the data currently read.
- * @callback_data: data passed to the callback.
+ * @callback_data: (closure): data passed to the callback.
*
* When loading the partial contents of a file with g_file_load_partial_contents_async(),
* it may become necessary to determine if any more data from the file should be loaded.
diff --git a/gio/glib-compile-resources.c b/gio/glib-compile-resources.c
index a92fefd7d..8a1a07dd1 100644
--- a/gio/glib-compile-resources.c
+++ b/gio/glib-compile-resources.c
@@ -789,6 +789,7 @@ main (int argc, char **argv)
{
g_free (target);
g_free (c_name);
+ g_hash_table_unref (files);
return 1;
}
@@ -858,6 +859,7 @@ main (int argc, char **argv)
g_string_free (dep_string, TRUE);
g_free (dependency_file);
g_error_free (error);
+ g_hash_table_unref (files);
return 1;
}
}
@@ -890,6 +892,7 @@ main (int argc, char **argv)
{
g_printerr ("Can't open temp file\n");
g_free (c_name);
+ g_hash_table_unref (files);
return 1;
}
close (fd);
@@ -936,6 +939,7 @@ main (int argc, char **argv)
g_printerr ("%s\n", error->message);
g_free (target);
g_free (c_name);
+ g_hash_table_unref (files);
return 1;
}
@@ -948,6 +952,7 @@ main (int argc, char **argv)
{
g_printerr ("can't write to file %s", target);
g_free (c_name);
+ g_hash_table_unref (files);
return 1;
}
@@ -985,6 +990,7 @@ main (int argc, char **argv)
{
g_printerr ("can't read back temporary file");
g_free (c_name);
+ g_hash_table_unref (files);
return 1;
}
g_unlink (binary_target);
@@ -994,6 +1000,7 @@ main (int argc, char **argv)
{
g_printerr ("can't write to file %s", target);
g_free (c_name);
+ g_hash_table_unref (files);
return 1;
}
@@ -1090,6 +1097,7 @@ main (int argc, char **argv)
g_hash_table_destroy (table);
g_free (xmllint);
g_free (c_name);
+ g_hash_table_unref (files);
return 0;
}
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index b8de09072..2dc8c7171 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -97,9 +97,9 @@ enum_state_add_value (EnumState *state,
}
value = g_ascii_strtoll (valuestr, &end, 0);
- if (*end || state->is_flags ?
+ if (*end || (state->is_flags ?
(value > G_MAXUINT32 || value < 0) :
- (value > G_MAXINT32 || value < G_MININT32))
+ (value > G_MAXINT32 || value < G_MININT32)))
{
g_set_error (error, G_MARKUP_ERROR,
G_MARKUP_ERROR_INVALID_CONTENT,
diff --git a/gio/glistmodel.c b/gio/glistmodel.c
index c2491be2d..2b943a87c 100644
--- a/gio/glistmodel.c
+++ b/gio/glistmodel.c
@@ -96,6 +96,22 @@ G_DEFINE_INTERFACE (GListModel, g_list_model, G_TYPE_OBJECT)
*/
/**
+ * GListModelInterface::get_item:
+ * @list: a #GListModel
+ * @position: the position of the item to fetch
+ *
+ * Get the item at @position. If @position is greater than the number of
+ * items in @list, %NULL is returned.
+ *
+ * %NULL is never returned for an index that is smaller than the length
+ * of the list. See g_list_model_get_n_items().
+ *
+ * Returns: (type GObject) (transfer full) (nullable): the object at @position.
+ *
+ * Since: 2.44
+ */
+
+/**
* GListModel:
*
* #GListModel is an opaque data structure and can only be accessed
@@ -186,7 +202,7 @@ g_list_model_get_n_items (GListModel *list)
* %NULL is never returned for an index that is smaller than the length
* of the list. See g_list_model_get_n_items().
*
- * Returns: (transfer full) (nullable) (type GObject): the item at @position.
+ * Returns: (transfer full) (nullable): the item at @position.
*
* Since: 2.44
*/
diff --git a/gio/glocalfile.c b/gio/glocalfile.c
index d417c4991..e484a31bf 100644
--- a/gio/glocalfile.c
+++ b/gio/glocalfile.c
@@ -62,11 +62,11 @@
#include "gunixmounts.h"
#include "gioerror.h"
#include <glib/gstdio.h>
+#include <glib/gstdioprivate.h>
#include "glibintl.h"
#ifdef G_OS_UNIX
#include "glib-unix.h"
#endif
-#include "glib-private.h"
#include "glib-private.h"
@@ -753,6 +753,8 @@ get_fs_type (long f_type)
return "xiafs";
case 0x52345362:
return "reiser4";
+ case 0x65735546:
+ return "fuse";
default:
return NULL;
}
@@ -1104,16 +1106,16 @@ g_local_file_query_filesystem_info (GFile *file,
#ifndef G_OS_WIN32
#ifdef USE_STATFS
#if defined(HAVE_STRUCT_STATFS_F_FSTYPENAME)
- fstype = g_strdup (statfs_buffer.f_fstypename);
+ fstype = statfs_buffer.f_fstypename;
#else
fstype = get_fs_type (statfs_buffer.f_type);
#endif
#elif defined(USE_STATVFS)
#if defined(HAVE_STRUCT_STATVFS_F_FSTYPENAME)
- fstype = g_strdup (statfs_buffer.f_fstypename);
+ fstype = statfs_buffer.f_fstypename;
#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE)
- fstype = g_strdup (statfs_buffer.f_basetype);
+ fstype = statfs_buffer.f_basetype;
#else
fstype = NULL;
#endif
@@ -1395,7 +1397,8 @@ g_local_file_read (GFile *file,
#ifdef G_OS_WIN32
if (errsv == EACCES)
{
- ret = _stati64 (local->filename, &buf);
+ /* Exploit the fact that on W32 the glib filename encoding is UTF8 */
+ ret = GLIB_PRIVATE_CALL (g_win32_stat_utf8) (local->filename, &buf);
if (ret == 0 && S_ISDIR (buf.st_mode))
errsv = EISDIR;
}
@@ -1407,7 +1410,7 @@ g_local_file_read (GFile *file,
}
#ifdef G_OS_WIN32
- ret = _fstati64 (fd, &buf);
+ ret = GLIB_PRIVATE_CALL (g_win32_fstat) (fd, &buf);
#else
ret = fstat (fd, &buf);
#endif
@@ -1577,7 +1580,7 @@ expand_symlink (const char *link)
char symlink_value[4096];
#ifdef G_OS_WIN32
#else
- ssize_t res;
+ gssize res;
#endif
#ifdef G_OS_WIN32
@@ -2677,33 +2680,12 @@ g_local_file_measure_size_of_file (gint parent_fd,
int errsv = errno;
return g_local_file_measure_size_error (state->flags, errsv, name, error);
}
-#else
- {
- const char *filename = (const gchar *) name->data;
- wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
- int retval;
- int save_errno;
- int len;
-
- if (wfilename == NULL)
- return g_local_file_measure_size_error (state->flags, errno, name, error);
-
- len = wcslen (wfilename);
- while (len > 0 && G_IS_DIR_SEPARATOR (wfilename[len-1]))
- len--;
- if (len > 0 &&
- (!g_path_is_absolute (filename) || len > g_path_skip_root (filename) - filename))
- wfilename[len] = '\0';
-
- retval = _wstati64 (wfilename, &buf);
- save_errno = errno;
-
- g_free (wfilename);
-
- errno = save_errno;
- if (retval != 0)
- return g_local_file_measure_size_error (state->flags, errno, name, error);
- }
+#else /* !AT_FDCWD && !HAVE_LSTAT && G_OS_WIN32 */
+ if (GLIB_PRIVATE_CALL (g_win32_lstat_utf8) (name->data, &buf) != 0)
+ {
+ int errsv = errno;
+ return g_local_file_measure_size_error (state->flags, errsv, name, error);
+ }
#endif
if (name->next)
@@ -2722,7 +2704,11 @@ g_local_file_measure_size_of_file (gint parent_fd,
state->contained_on = buf.st_dev;
}
-#if defined (HAVE_STRUCT_STAT_ST_BLOCKS)
+#if defined (G_OS_WIN32)
+ if (~state->flags & G_FILE_MEASURE_APPARENT_SIZE)
+ state->disk_usage += buf.allocated_size;
+ else
+#elif defined (HAVE_STRUCT_STAT_ST_BLOCKS)
if (~state->flags & G_FILE_MEASURE_APPARENT_SIZE)
state->disk_usage += buf.st_blocks * G_GUINT64_CONSTANT (512);
else
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index f46d4d6db..fad80d37c 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -53,6 +53,7 @@
#endif /* HAVE_XATTR */
#include <glib/gstdio.h>
+#include <glib/gstdioprivate.h>
#include <gfileattribute-priv.h>
#include <gfileinfo-priv.h>
#include <gvfs.h>
@@ -60,9 +61,10 @@
#ifdef G_OS_UNIX
#include <unistd.h>
#include "glib-unix.h"
-#include "glib-private.h"
#endif
+#include "glib-private.h"
+
#include "thumbnail-verify.h"
#ifdef G_OS_WIN32
@@ -136,9 +138,15 @@ _g_local_file_info_create_etag (GLocalFileStat *statbuf)
static char *
_g_local_file_info_create_file_id (GLocalFileStat *statbuf)
{
+ guint64 ino;
+#ifdef G_OS_WIN32
+ ino = statbuf->file_index;
+#else
+ ino = statbuf->st_ino;
+#endif
return g_strdup_printf ("l%" G_GUINT64_FORMAT ":%" G_GUINT64_FORMAT,
(guint64) statbuf->st_dev,
- (guint64) statbuf->st_ino);
+ ino);
}
static char *
@@ -148,13 +156,12 @@ _g_local_file_info_create_fs_id (GLocalFileStat *statbuf)
(guint64) statbuf->st_dev);
}
-
-#ifdef S_ISLNK
+#if defined (S_ISLNK) || defined (G_OS_WIN32)
static gchar *
read_link (const gchar *full_name)
{
-#ifdef HAVE_READLINK
+#if defined (HAVE_READLINK) || defined (G_OS_WIN32)
gchar *buffer;
guint size;
@@ -165,7 +172,11 @@ read_link (const gchar *full_name)
{
int read_size;
+#ifndef G_OS_WIN32
read_size = readlink (full_name, buffer, size);
+#else
+ read_size = GLIB_PRIVATE_CALL (g_win32_readlink_utf8) (full_name, buffer, size);
+#endif
if (read_size < 0)
{
g_free (buffer);
@@ -184,7 +195,7 @@ read_link (const gchar *full_name)
#endif
}
-#endif /* S_ISLNK */
+#endif /* S_ISLNK || G_OS_WIN32 */
#ifdef HAVE_SELINUX
/* Get the SELinux security context */
@@ -236,7 +247,7 @@ get_selinux_context (const char *path,
#define g_setxattr(path,name,value,size) setxattr(path,name,value,size,0)
#endif
-static ssize_t
+static gssize
g_getxattr (const char *path, const char *name, void *value, size_t size,
gboolean follow_symlinks)
{
@@ -250,7 +261,7 @@ g_getxattr (const char *path, const char *name, void *value, size_t size,
#endif
}
-static ssize_t
+static gssize
g_listxattr(const char *path, char *namebuf, size_t size,
gboolean follow_symlinks)
{
@@ -400,7 +411,7 @@ get_one_xattr (const char *path,
{
char value[64];
char *value_p;
- ssize_t len;
+ gssize len;
int errsv;
len = g_getxattr (path, xattr, value, sizeof (value)-1, follow_symlinks);
@@ -450,7 +461,7 @@ get_xattrs (const char *path,
#ifdef HAVE_XATTR
gboolean all;
gsize list_size;
- ssize_t list_res_size;
+ gssize list_res_size;
size_t len;
char *list;
const char *attr, *attr2;
@@ -562,7 +573,7 @@ get_one_xattr_from_fd (int fd,
{
char value[64];
char *value_p;
- ssize_t len;
+ gssize len;
int errsv;
len = g_fgetxattr (fd, xattr, value, sizeof (value) - 1);
@@ -610,7 +621,7 @@ get_xattrs_from_fd (int fd,
#ifdef HAVE_XATTR
gboolean all;
gsize list_size;
- ssize_t list_res_size;
+ gssize list_res_size;
size_t len;
char *list;
const char *attr, *attr2;
@@ -938,6 +949,9 @@ set_info_from_stat (GFileInfo *info,
#ifdef S_ISLNK
else if (S_ISLNK (statbuf->st_mode))
file_type = G_FILE_TYPE_SYMBOLIC_LINK;
+#elif defined (G_OS_WIN32)
+ if (statbuf->reparse_tag == IO_REPARSE_TAG_SYMLINK)
+ file_type = G_FILE_TYPE_SYMBOLIC_LINK;
#endif
g_file_info_set_file_type (info, file_type);
@@ -960,7 +974,11 @@ set_info_from_stat (GFileInfo *info,
#if defined (HAVE_STRUCT_STAT_ST_BLOCKS)
_g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_BLOCKS, statbuf->st_blocks);
_g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_STANDARD_ALLOCATED_SIZE,
- statbuf->st_blocks * G_GUINT64_CONSTANT (512));
+ statbuf->st_blocks * G_GUINT64_CONSTANT (512));
+#elif defined (G_OS_WIN32)
+ _g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_STANDARD_ALLOCATED_SIZE,
+ statbuf->allocated_size);
+
#endif
_g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_TIME_MODIFIED, statbuf->st_mtime);
@@ -1289,7 +1307,7 @@ get_content_type (const char *basename,
if (fd != -1)
{
- ssize_t res;
+ gssize res;
res = read (fd, sniff_buffer, sniff_length);
(void) g_close (fd, NULL);
@@ -1618,12 +1636,12 @@ get_icon_name (const char *path,
const char *name = NULL;
gboolean with_fallbacks = TRUE;
- if (strcmp (path, g_get_home_dir ()) == 0)
+ if (g_strcmp0 (path, g_get_home_dir ()) == 0)
{
name = use_symbolic ? "user-home-symbolic" : "user-home";
with_fallbacks = FALSE;
}
- else if (strcmp (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0)
+ else if (g_strcmp0 (path, g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP)) == 0)
{
name = use_symbolic ? "user-desktop-symbolic" : "user-desktop";
with_fallbacks = FALSE;
@@ -1711,13 +1729,12 @@ _g_local_file_info_get (const char *basename,
GLocalFileStat statbuf;
#ifdef S_ISLNK
struct stat statbuf2;
+#elif defined (G_OS_WIN32)
+ GWin32PrivateStat statbuf2;
#endif
int res;
gboolean stat_ok;
gboolean is_symlink, symlink_broken;
-#ifdef G_OS_WIN32
- DWORD dos_attributes;
-#endif
char *symlink_target;
GVfs *vfs;
GVfsClass *class;
@@ -1739,28 +1756,7 @@ _g_local_file_info_get (const char *basename,
#ifndef G_OS_WIN32
res = g_lstat (path, &statbuf);
#else
- {
- wchar_t *wpath = g_utf8_to_utf16 (path, -1, NULL, NULL, error);
- int len;
-
- if (wpath == NULL)
- {
- g_object_unref (info);
- return NULL;
- }
-
- len = wcslen (wpath);
- while (len > 0 && G_IS_DIR_SEPARATOR (wpath[len-1]))
- len--;
- if (len > 0 &&
- (!g_path_is_absolute (path) || len > g_path_skip_root (path) - path))
- wpath[len] = '\0';
-
- res = _wstati64 (wpath, &statbuf);
- dos_attributes = GetFileAttributesW (wpath);
-
- g_free (wpath);
- }
+ res = GLIB_PRIVATE_CALL (g_win32_lstat_utf8) (path, &statbuf);
#endif
if (res == -1)
@@ -1791,11 +1787,14 @@ _g_local_file_info_get (const char *basename,
#ifdef S_ISLNK
is_symlink = stat_ok && S_ISLNK (statbuf.st_mode);
+#elif defined (G_OS_WIN32)
+ /* glib already checked the FILE_ATTRIBUTE_REPARSE_POINT for us */
+ is_symlink = stat_ok && statbuf.reparse_tag == IO_REPARSE_TAG_SYMLINK;
#else
is_symlink = FALSE;
#endif
symlink_broken = FALSE;
-#ifdef S_ISLNK
+
if (is_symlink)
{
g_file_info_set_is_symlink (info, TRUE);
@@ -1803,7 +1802,11 @@ _g_local_file_info_get (const char *basename,
/* Unless NOFOLLOW was set we default to following symlinks */
if (!(flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS))
{
+#ifndef G_OS_WIN32
res = stat (path, &statbuf2);
+#else
+ res = GLIB_PRIVATE_CALL (g_win32_stat_utf8) (path, &statbuf2);
+#endif
/* Report broken links as symlinks */
if (res != -1)
@@ -1815,7 +1818,6 @@ _g_local_file_info_get (const char *basename,
symlink_broken = TRUE;
}
}
-#endif
if (stat_ok)
set_info_from_stat (info, &statbuf, attribute_matcher);
@@ -1839,27 +1841,28 @@ _g_local_file_info_get (const char *basename,
(stat_ok && S_ISREG (statbuf.st_mode)))
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_STANDARD_IS_BACKUP, TRUE);
#else
- if (dos_attributes & FILE_ATTRIBUTE_HIDDEN)
+ if (statbuf.attributes & FILE_ATTRIBUTE_HIDDEN)
g_file_info_set_is_hidden (info, TRUE);
- if (dos_attributes & FILE_ATTRIBUTE_ARCHIVE)
+ if (statbuf.attributes & FILE_ATTRIBUTE_ARCHIVE)
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_IS_ARCHIVE, TRUE);
- if (dos_attributes & FILE_ATTRIBUTE_SYSTEM)
+ if (statbuf.attributes & FILE_ATTRIBUTE_SYSTEM)
_g_file_info_set_attribute_boolean_by_id (info, G_FILE_ATTRIBUTE_ID_DOS_IS_SYSTEM, TRUE);
#endif
symlink_target = NULL;
-#ifdef S_ISLNK
if (is_symlink)
{
+#if defined (S_ISLNK) || defined (G_OS_WIN32)
symlink_target = read_link (path);
+#endif
if (symlink_target &&
_g_file_attribute_matcher_matches_id (attribute_matcher,
G_FILE_ATTRIBUTE_ID_STANDARD_SYMLINK_TARGET))
g_file_info_set_symlink_target (info, symlink_target);
}
-#endif
+
if (_g_file_attribute_matcher_matches_id (attribute_matcher,
G_FILE_ATTRIBUTE_ID_STANDARD_CONTENT_TYPE) ||
_g_file_attribute_matcher_matches_id (attribute_matcher,
@@ -1975,11 +1978,7 @@ _g_local_file_info_get (const char *basename,
get_xattrs (path, FALSE, info, attribute_matcher, (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS) == 0);
if (_g_file_attribute_matcher_matches_id (attribute_matcher,
- G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH) ||
- _g_file_attribute_matcher_matches_id (attribute_matcher,
- G_FILE_ATTRIBUTE_ID_THUMBNAIL_IS_VALID) ||
- _g_file_attribute_matcher_matches_id (attribute_matcher,
- G_FILE_ATTRIBUTE_ID_THUMBNAILING_FAILED))
+ G_FILE_ATTRIBUTE_ID_THUMBNAIL_PATH))
{
if (stat_ok)
get_thumbnail_attributes (path, info, &statbuf);
@@ -2018,7 +2017,7 @@ _g_local_file_info_get_from_fd (int fd,
GFileInfo *info;
#ifdef G_OS_WIN32
-#define FSTAT _fstati64
+#define FSTAT GLIB_PRIVATE_CALL (g_win32_fstat)
#else
#define FSTAT fstat
#endif
@@ -2152,16 +2151,26 @@ set_unix_mode (char *filename,
if (!get_uint32 (value, &val, error))
return FALSE;
-#ifdef HAVE_SYMLINK
+#if defined (HAVE_SYMLINK) || defined (G_OS_WIN32)
if (flags & G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS) {
#ifdef HAVE_LCHMOD
res = lchmod (filename, val);
#else
+ gboolean is_symlink;
+#ifndef G_OS_WIN32
struct stat statbuf;
/* Calling chmod on a symlink changes permissions on the symlink.
* We don't want to do this, so we need to check for a symlink */
res = g_lstat (filename, &statbuf);
- if (res == 0 && S_ISLNK (statbuf.st_mode))
+ is_symlink = (res == 0 && S_ISLNK (statbuf.st_mode));
+#else
+ /* FIXME: implement lchmod for W32, should be doable */
+ GWin32PrivateStat statbuf;
+
+ res = GLIB_PRIVATE_CALL (g_win32_lstat_utf8) (filename, &statbuf);
+ is_symlink = (res == 0 && statbuf.reparse_tag == IO_REPARSE_TAG_SYMLINK);
+#endif
+ if (is_symlink)
{
g_set_error_literal (error, G_IO_ERROR,
G_IO_ERROR_NOT_SUPPORTED,
diff --git a/gio/glocalfileinfo.h b/gio/glocalfileinfo.h
index f0362889f..a231c24ca 100644
--- a/gio/glocalfileinfo.h
+++ b/gio/glocalfileinfo.h
@@ -23,6 +23,7 @@
#include <gio/gfileinfo.h>
#include <gio/gfile.h>
+#include <glib/gstdioprivate.h>
#include <sys/stat.h>
#include <sys/types.h>
@@ -40,8 +41,8 @@ typedef struct
} GLocalParentFileInfo;
#ifdef G_OS_WIN32
-/* We want 64-bit file size support */
-#define GLocalFileStat struct _stati64
+/* We want 64-bit file size, file ID and symlink support */
+#define GLocalFileStat GWin32PrivateStat
#else
#define GLocalFileStat struct stat
#endif
diff --git a/gio/glocalfileoutputstream.c b/gio/glocalfileoutputstream.c
index 76005716f..57d2d5dfe 100644
--- a/gio/glocalfileoutputstream.c
+++ b/gio/glocalfileoutputstream.c
@@ -40,6 +40,8 @@
#include "gfiledescriptorbased.h"
#endif
+#include "glib-private.h"
+
#ifdef G_OS_WIN32
#include <io.h>
#ifndef S_ISDIR
@@ -234,7 +236,7 @@ _g_local_file_output_stream_really_close (GLocalFileOutputStream *file,
/* Must close before renaming on Windows, so just do the close first
* in all cases for now.
*/
- if (_fstati64 (file->priv->fd, &final_stat) == 0)
+ if (GLIB_PRIVATE_CALL (g_win32_fstat) (file->priv->fd, &final_stat) == 0)
file->priv->etag = _g_local_file_info_create_etag (&final_stat);
if (!g_close (file->priv->fd, NULL))
@@ -797,7 +799,7 @@ handle_overwrite_open (const char *filename,
}
#ifdef G_OS_WIN32
- res = _fstati64 (fd, &original_stat);
+ res = GLIB_PRIVATE_CALL (g_win32_fstat) (fd, &original_stat);
#else
res = fstat (fd, &original_stat);
#endif
@@ -891,7 +893,7 @@ handle_overwrite_open (const char *filename,
int tres;
#ifdef G_OS_WIN32
- tres = _fstati64 (tmpfd, &tmp_statbuf);
+ tres = GLIB_PRIVATE_CALL (g_win32_fstat) (tmpfd, &tmp_statbuf);
#else
tres = fstat (tmpfd, &tmp_statbuf);
#endif
diff --git a/gio/gmount.c b/gio/gmount.c
index 3d74b855d..0169ea54b 100644
--- a/gio/gmount.c
+++ b/gio/gmount.c
@@ -54,9 +54,9 @@
* g_mount_unmount_with_operation() with (at least) the #GMount instance and a
* #GAsyncReadyCallback. The callback will be fired when the
* operation has resolved (either with success or failure), and a
- * #GAsyncReady structure will be passed to the callback. That
+ * #GAsyncResult structure will be passed to the callback. That
* callback should then call g_mount_unmount_with_operation_finish() with the #GMount
- * and the #GAsyncReady data to see if the operation was completed
+ * and the #GAsyncResult data to see if the operation was completed
* successfully. If an @error is present when g_mount_unmount_with_operation_finish()
* is called, then it will be filled with any error information.
**/
@@ -101,9 +101,12 @@ g_mount_default_init (GMountInterface *iface)
* GMount::pre-unmount:
* @mount: the object on which the signal is emitted
*
- * This signal is emitted when the #GMount is about to be
+ * This signal may be emitted when the #GMount is about to be
* unmounted.
*
+ * This signal depends on the backend and is only emitted if
+ * GIO was used to unmount.
+ *
* Since: 2.22
**/
g_signal_new (I_("pre-unmount"),
diff --git a/gio/gopenuriportal.c b/gio/gopenuriportal.c
index 247ed8ce7..51a72dfc2 100644
--- a/gio/gopenuriportal.c
+++ b/gio/gopenuriportal.c
@@ -197,8 +197,7 @@ open_call_done (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
- GXdpOpenURI *openuri = GXDP_OPEN_URI (source);
- GDBusConnection *connection;
+ GDBusConnection *connection = G_DBUS_CONNECTION (source);
GTask *task = user_data;
GError *error = NULL;
gboolean open_file;
@@ -207,7 +206,6 @@ open_call_done (GObject *source,
const char *handle;
guint signal_id;
- connection = g_dbus_proxy_get_connection (G_DBUS_PROXY (openuri));
open_file = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (task), "open-file"));
if (open_file)
diff --git a/gio/gosxappinfo.c b/gio/gosxappinfo.c
index b24b6fffa..463b2da3c 100644
--- a/gio/gosxappinfo.c
+++ b/gio/gosxappinfo.c
@@ -171,19 +171,26 @@ create_cfstring_from_cstr (const gchar *cstr)
return CFStringCreateWithCString (NULL, cstr, kCFStringEncodingUTF8);
}
+#ifdef G_ENABLE_DEBUG
static gchar *
create_cstr_from_cfstring (CFStringRef str)
{
- const gchar *cstr;
+ g_return_val_if_fail (str != NULL, NULL);
- if (str == NULL)
- return NULL;
-
- cstr = CFStringGetCStringPtr (str, kCFStringEncodingUTF8);
- CFRelease (str);
-
- return g_strdup (cstr);
+ CFIndex length = CFStringGetLength (str);
+ CFIndex maxlen = CFStringGetMaximumSizeForEncoding (length, kCFStringEncodingUTF8);
+ gchar *buffer = g_malloc (maxlen + 1);
+ Boolean success = CFStringGetCString (str, (char *) buffer, maxlen,
+ kCFStringEncodingUTF8);
+ if (success)
+ return buffer;
+ else
+ {
+ g_free (buffer);
+ return NULL;
+ }
}
+#endif
static char *
url_escape_hostname (const char *url)
@@ -328,13 +335,18 @@ get_bundle_for_id (CFStringRef bundle_id)
}
else
#else
- if (LSFindApplicationForInfo (kLSUnknownCreator, bundle_id, NULL, NULL, &app_url))
+ if (LSFindApplicationForInfo (kLSUnknownCreator, bundle_id, NULL, NULL, &app_url) == kLSApplicationNotFoundErr)
#endif
{
#ifdef G_ENABLE_DEBUG /* This can fail often, no reason to alloc strings */
gchar *id_str = create_cstr_from_cfstring (bundle_id);
- g_debug ("Application not found for id \"%s\".", id_str);
- g_free (id_str);
+ if (id_str)
+ {
+ g_debug ("Application not found for id \"%s\".", id_str);
+ g_free (id_str);
+ }
+ else
+ g_debug ("Application not found for unconvertable bundle id.");
#endif
return NULL;
}
@@ -594,7 +606,7 @@ g_osx_app_info_get_all_for_scheme (const char *cscheme)
info = G_APP_INFO (g_osx_app_info_new (bundle));
info_list = g_list_append (info_list, info);
}
-
+ CFRelease (bundle_list);
return info_list;
}
@@ -639,7 +651,7 @@ g_app_info_get_all_for_type (const char *content_type)
info = G_APP_INFO (g_osx_app_info_new (bundle));
info_list = g_list_append (info_list, info);
}
-
+ CFRelease (bundle_list);
return info_list;
}
diff --git a/gio/gosxcontenttype.c b/gio/gosxcontenttype.c
index 485f5bfb6..347477577 100644
--- a/gio/gosxcontenttype.c
+++ b/gio/gosxcontenttype.c
@@ -25,6 +25,12 @@
#include <CoreServices/CoreServices.h>
+#define XDG_PREFIX _gio_xdg
+#include "xdgmime/xdgmime.h"
+
+/* We lock this mutex whenever we modify global state in this module. */
+G_LOCK_DEFINE_STATIC (gio_xdgmime);
+
/*< internal >
* create_cfstring_from_cstr:
@@ -52,15 +58,21 @@ create_cfstring_from_cstr (const gchar *cstr)
static gchar *
create_cstr_from_cfstring (CFStringRef str)
{
- const gchar *cstr;
-
- if (str == NULL)
- return NULL;
+ g_return_val_if_fail (str != NULL, NULL);
- cstr = CFStringGetCStringPtr (str, kCFStringEncodingUTF8);
+ CFIndex length = CFStringGetLength (str);
+ CFIndex maxlen = CFStringGetMaximumSizeForEncoding (length, kCFStringEncodingUTF8);
+ gchar *buffer = g_malloc (maxlen + 1);
+ Boolean success = CFStringGetCString (str, (char *) buffer, maxlen,
+ kCFStringEncodingUTF8);
CFRelease (str);
-
- return g_strdup (cstr);
+ if (success)
+ return buffer;
+ else
+ {
+ g_free (buffer);
+ return NULL;
+ }
}
/*< internal >
@@ -78,9 +90,10 @@ static gchar *
create_cstr_from_cfstring_with_fallback (CFStringRef str,
const gchar *fallback)
{
- gchar *cstr;
+ gchar *cstr = NULL;
- cstr = create_cstr_from_cfstring (str);
+ if (str)
+ cstr = create_cstr_from_cfstring (str);
if (!cstr)
return g_strdup (fallback);
@@ -180,25 +193,59 @@ g_content_type_get_description (const gchar *type)
}
static GIcon *
-g_content_type_get_icon_internal (const gchar *type,
+g_content_type_get_icon_internal (const gchar *uti,
gboolean symbolic)
{
- GIcon *icon = NULL;
- gchar *name;
+ char *mimetype_icon;
+ char *type;
+ char *generic_mimetype_icon = NULL;
+ char *q;
+ char *icon_names[6];
+ int n = 0;
+ GIcon *themed_icon;
+ const char *xdg_icon;
+ int i;
- g_return_val_if_fail (type != NULL, NULL);
+ g_return_val_if_fail (uti != NULL, NULL);
- /* TODO: Show mimetype icons. */
- if (g_content_type_can_be_executable (type))
- name = "gtk-execute";
- else if (g_content_type_is_a (type, "public.directory"))
- name = symbolic ? "inode-directory-symbolic" : "inode-directory";
- else
- name = "gtk-file";
+ type = g_content_type_get_mime_type (uti);
+
+ G_LOCK (gio_xdgmime);
+ xdg_icon = xdg_mime_get_icon (type);
+ G_UNLOCK (gio_xdgmime);
+
+ if (xdg_icon)
+ icon_names[n++] = g_strdup (xdg_icon);
- icon = g_themed_icon_new_with_default_fallbacks (name);
+ mimetype_icon = g_strdup (type);
+ while ((q = strchr (mimetype_icon, '/')) != NULL)
+ *q = '-';
- return icon;
+ icon_names[n++] = mimetype_icon;
+
+ generic_mimetype_icon = g_content_type_get_generic_icon_name (type);
+ if (generic_mimetype_icon)
+ icon_names[n++] = generic_mimetype_icon;
+
+ if (symbolic)
+ {
+ for (i = 0; i < n; i++)
+ {
+ icon_names[n + i] = icon_names[i];
+ icon_names[i] = g_strconcat (icon_names[i], "-symbolic", NULL);
+ }
+
+ n += n;
+ }
+
+ themed_icon = g_themed_icon_new_from_names (icon_names, n);
+
+ for (i = 0; i < n; i++)
+ g_free (icon_names[i]);
+
+ g_free(type);
+
+ return themed_icon;
}
GIcon *
@@ -429,7 +476,17 @@ g_content_type_guess (const gchar *filename,
if (data && (!filename || !uti ||
CFStringCompare (uti, CFSTR ("public.data"), 0) == kCFCompareEqualTo))
{
- if (looks_like_text (data, data_size))
+ const char *sniffed_mimetype;
+ G_LOCK (gio_xdgmime);
+ sniffed_mimetype = xdg_mime_get_mime_type_for_data (data, data_size, NULL);
+ G_UNLOCK (gio_xdgmime);
+ if (sniffed_mimetype != XDG_MIME_TYPE_UNKNOWN)
+ {
+ gchar *uti_str = g_content_type_from_mime_type (sniffed_mimetype);
+ uti = create_cfstring_from_cstr (uti_str);
+ g_free (uti_str);
+ }
+ if (!uti && looks_like_text (data, data_size))
{
if (g_str_has_prefix ((const gchar*)data, "#!/"))
uti = CFStringCreateCopy (NULL, CFSTR ("public.script"));
diff --git a/gio/goutputstream.c b/gio/goutputstream.c
index c59eb67e0..6372fd9c9 100644
--- a/gio/goutputstream.c
+++ b/gio/goutputstream.c
@@ -234,7 +234,7 @@ g_output_stream_write (GOutputStream *stream,
* @stream: a #GOutputStream.
* @buffer: (array length=count) (element-type guint8): the buffer containing the data to write.
* @count: the number of bytes to write
- * @bytes_written: (out): location to store the number of bytes that was
+ * @bytes_written: (out) (optional): location to store the number of bytes that was
* written to the stream
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: location to store the error occurring, or %NULL to ignore
@@ -302,7 +302,7 @@ g_output_stream_write_all (GOutputStream *stream,
/**
* g_output_stream_printf:
* @stream: a #GOutputStream.
- * @bytes_written: (out): location to store the number of bytes that was
+ * @bytes_written: (out) (optional): location to store the number of bytes that was
* written to the stream
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: location to store the error occurring, or %NULL to ignore
@@ -348,7 +348,7 @@ g_output_stream_printf (GOutputStream *stream,
/**
* g_output_stream_vprintf:
* @stream: a #GOutputStream.
- * @bytes_written: (out): location to store the number of bytes that was
+ * @bytes_written: (out) (optional): location to store the number of bytes that was
* written to the stream
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: location to store the error occurring, or %NULL to ignore
@@ -384,7 +384,7 @@ g_output_stream_vprintf (GOutputStream *stream,
gboolean success;
g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), FALSE);
- g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable), FALSE);
+ g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (stream), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_return_val_if_fail (format != NULL, FALSE);
@@ -1019,7 +1019,7 @@ g_output_stream_write_all_async (GOutputStream *stream,
* g_output_stream_write_all_finish:
* @stream: a #GOutputStream
* @result: a #GAsyncResult
- * @bytes_written: (out): location to store the number of bytes that was written to the stream
+ * @bytes_written: (out) (optional): location to store the number of bytes that was written to the stream
* @error: a #GError location to store the error occurring, or %NULL to ignore.
*
* Finishes an asynchronous stream write operation started with
diff --git a/gio/gpollfilemonitor.c b/gio/gpollfilemonitor.c
index da7f1c5fa..411e00393 100644
--- a/gio/gpollfilemonitor.c
+++ b/gio/gpollfilemonitor.c
@@ -145,7 +145,8 @@ poll_file_timeout (gpointer data)
{
GPollFileMonitor* poll_monitor = data;
- poll_monitor->timeout = FALSE;
+ g_source_unref (poll_monitor->timeout);
+ poll_monitor->timeout = NULL;
g_file_query_info_async (poll_monitor->file, G_FILE_ATTRIBUTE_ETAG_VALUE "," G_FILE_ATTRIBUTE_STANDARD_SIZE,
0, 0, NULL, got_new_info, g_object_ref (poll_monitor));
diff --git a/gio/gresource.c b/gio/gresource.c
index ed0e474a4..8ead26bc6 100644
--- a/gio/gresource.c
+++ b/gio/gresource.c
@@ -525,7 +525,8 @@ g_resource_new_from_table (GvdbTable *table)
* to register it with g_resources_register().
*
* Note: @data must be backed by memory that is at least pointer aligned.
- * Otherwise this function will fail and exit the process.
+ * Otherwise this function will internally create a copy of the memory since
+ * GLib 2.56, or in older versions fail and exit the process.
*
* Returns: (transfer full): a new #GResource, or %NULL on error
*
@@ -536,6 +537,14 @@ g_resource_new_from_data (GBytes *data,
GError **error)
{
GvdbTable *table;
+ gboolean unref_data = FALSE;
+
+ if (((guintptr) g_bytes_get_data (data, NULL)) % sizeof (gpointer) != 0)
+ {
+ data = g_bytes_new (g_bytes_get_data (data, NULL),
+ g_bytes_get_size (data));
+ unref_data = TRUE;
+ }
table = gvdb_table_new_from_data (g_bytes_get_data (data, NULL),
g_bytes_get_size (data),
@@ -545,6 +554,9 @@ g_resource_new_from_data (GBytes *data,
(GDestroyNotify)g_bytes_unref,
error);
+ if (unref_data)
+ g_bytes_unref (data);
+
if (table == NULL)
return NULL;
@@ -850,9 +862,17 @@ g_resource_enumerate_children (GResource *resource,
GResourceLookupFlags lookup_flags,
GError **error)
{
+ gchar local_str[256];
+ const gchar *path_with_slash;
gchar **children;
+ gchar *free_path = NULL;
gsize path_len;
- char *path_with_slash;
+
+ /*
+ * Size of 256 is arbitrarily chosen based on being large enough
+ * for pretty much everything we come across, but not cumbersome
+ * on the stack. It also matches common cacheline sizes.
+ */
if (*path == 0)
{
@@ -863,13 +883,35 @@ g_resource_enumerate_children (GResource *resource,
}
path_len = strlen (path);
- if (path[path_len-1] != '/')
- path_with_slash = g_strconcat (path, "/", NULL);
+
+ if G_UNLIKELY (path[path_len-1] != '/')
+ {
+ if (path_len < sizeof (local_str) - 2)
+ {
+ /*
+ * We got a path that does not have a trailing /. It is not the
+ * ideal use of this API as we require trailing / for our lookup
+ * into gvdb. Some degenerate application configurations can hit
+ * this code path quite a bit, so we try to avoid using the
+ * g_strconcat()/g_free().
+ */
+ memcpy (local_str, path, path_len);
+ local_str[path_len] = '/';
+ local_str[path_len+1] = 0;
+ path_with_slash = local_str;
+ }
+ else
+ {
+ path_with_slash = free_path = g_strconcat (path, "/", NULL);
+ }
+ }
else
- path_with_slash = g_strdup (path);
+ {
+ path_with_slash = path;
+ }
children = gvdb_table_list (resource->table, path_with_slash);
- g_free (path_with_slash);
+ g_free (free_path);
if (children == NULL)
{
diff --git a/gio/gresourcefile.c b/gio/gresourcefile.c
index 739c6e2f1..429e9ef49 100644
--- a/gio/gresourcefile.c
+++ b/gio/gresourcefile.c
@@ -138,69 +138,92 @@ g_resource_file_init (GResourceFile *resource)
{
}
-static char *
-canonicalize_filename (const char *filename)
+static inline gchar *
+scan_backwards (const gchar *begin,
+ const gchar *end,
+ gchar c)
{
- char *canon, *start, *p, *q;
+ while (end >= begin)
+ {
+ if (*end == c)
+ return (gchar *)end;
+ end--;
+ }
- /* Skip multiple inital slashes */
- while (filename[0] == '/' && filename[1] == '/')
- filename++;
+ return NULL;
+}
- if (*filename != '/')
- canon = g_strconcat ("/", filename, NULL);
- else
- canon = g_strdup (filename);
+static inline void
+pop_to_previous_part (const gchar *begin,
+ gchar **out)
+{
+ if (*out > begin)
+ *out = scan_backwards (begin, *out - 1, '/');
+}
+
+/*
+ * canonicalize_filename:
+ * @in: the path to be canonicalized
+ *
+ * The path @in may contain non-canonical path pieces such as "../"
+ * or duplicated "/". This will resolve those into a form that only
+ * contains a single / at a time and resolves all "../". The resulting
+ * path must also start with a /.
+ *
+ * Returns: the canonical form of the path
+ */
+static char *
+canonicalize_filename (const char *in)
+{
+ gchar *bptr;
+ char *out;
- start = canon + 1;
+ bptr = out = g_malloc (strlen (in) + 2);
+ *out = '/';
- p = start;
- while (*p != 0)
+ while (*in != 0)
{
- if (p[0] == '.' && (p[1] == 0 || p[1] == '/'))
- {
- memmove (p, p+1, strlen (p+1)+1);
- }
- else if (p[0] == '.' && p[1] == '.' && (p[2] == 0 || p[2] == '/'))
- {
- q = p + 2;
- /* Skip previous separator */
- p = p - 2;
- if (p < start)
- p = start;
- while (p > start && *p != '/')
- p--;
- if (*p == '/')
- *p++ = '/';
- memmove (p, q, strlen (q)+1);
- }
- else
- {
- /* Skip until next separator */
- while (*p != 0 && *p != '/')
- p++;
+ g_assert (*out == '/');
- if (*p != 0)
- {
- /* Canonicalize one separator */
- *p++ = '/';
- }
- }
+ /* move past slashes */
+ while (*in == '/')
+ in++;
+
+ /* Handle ./ ../ .\0 ..\0 */
+ if (*in == '.')
+ {
+ /* If this is ../ or ..\0 move up */
+ if (in[1] == '.' && (in[2] == '/' || in[2] == 0))
+ {
+ pop_to_previous_part (bptr, &out);
+ in += 2;
+ continue;
+ }
+
+ /* If this is ./ skip past it */
+ if (in[1] == '/' || in[1] == 0)
+ {
+ in += 1;
+ continue;
+ }
+ }
- /* Remove additional separators */
- q = p;
- while (*q && *q == '/')
- q++;
+ /* Scan to the next path piece */
+ while (*in != 0 && *in != '/')
+ *(++out) = *(in++);
- if (p != q)
- memmove (p, q, strlen (q)+1);
+ /* Add trailing /, compress the rest on the next go round. */
+ if (*in == '/')
+ *(++out) = *(in++);
}
- /* Remove trailing slashes */
- if (p > start && *(p-1) == '/')
- *(p-1) = 0;
+ /* Trim trailing / from path */
+ if (out > bptr && *out == '/')
+ *out = 0;
+ else
+ *(++out) = 0;
- return canon;
+ return bptr;
}
static GFile *
diff --git a/gio/gschema.dtd b/gio/gschema.dtd
index 8cd552d4a..00e3a1653 100644
--- a/gio/gschema.dtd
+++ b/gio/gschema.dtd
@@ -1,4 +1,4 @@
-<!ELEMENT schemalist (schema|enum|flags)* >
+<!ELEMENT schemalist (schema|enum)* >
<!ATTLIST schemalist gettext-domain CDATA #IMPLIED >
<!ELEMENT schema (key|child|override)* >
@@ -47,8 +47,7 @@
<!-- range is only allowed for keys with numeric type -->
<!ELEMENT range EMPTY >
-<!-- min and max must be parseable as values of the key type and
- min must be less than or equal to max -->
+<!-- min and max must be parseable as values of the key type and min < max -->
<!ATTLIST range min CDATA #REQUIRED
max CDATA #REQUIRED >
diff --git a/gio/gseekable.c b/gio/gseekable.c
index 26159d07e..5237e7f2f 100644
--- a/gio/gseekable.c
+++ b/gio/gseekable.c
@@ -141,7 +141,8 @@ g_seekable_seek (GSeekable *seekable,
* g_seekable_can_truncate:
* @seekable: a #GSeekable.
*
- * Tests if the stream can be truncated.
+ * Tests if the length of the stream can be adjusted with
+ * g_seekable_truncate().
*
* Returns: %TRUE if the stream can be truncated, %FALSE otherwise.
**/
@@ -158,14 +159,16 @@ g_seekable_can_truncate (GSeekable *seekable)
}
/**
- * g_seekable_truncate:
+ * g_seekable_truncate: (virtual truncate_fn)
* @seekable: a #GSeekable.
- * @offset: a #goffset.
+ * @offset: new length for @seekable, in bytes.
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: a #GError location to store the error occurring, or %NULL to
* ignore.
*
- * Truncates a stream with a given #offset.
+ * Sets the length of the stream to @offset. If the stream was previously
+ * larger than @offset, the extra data is discarded. If the stream was
+ * previouly shorter than @offset, it is extended with NUL ('\0') bytes.
*
* If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation
@@ -173,7 +176,6 @@ g_seekable_can_truncate (GSeekable *seekable)
* operation was partially finished when the operation was cancelled the
* partial result will be returned, without an error.
*
- * Virtual: truncate_fn
* Returns: %TRUE if successful. If an error
* has occurred, this function will return %FALSE and set @error
* appropriately if present.
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 45b10dd7e..7b0b6a162 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -830,7 +830,7 @@ g_settings_class_init (GSettingsClass *class)
NULL, G_TYPE_BOOLEAN, 1, G_TYPE_UINT);
/**
- * GSettings:context:
+ * GSettings:backend:
*
* The name of the context that the settings are stored in.
*/
@@ -2767,7 +2767,7 @@ g_settings_bind_invert_boolean_set_mapping (const GValue *value,
* a boolean property by that name). See g_settings_bind_writable()
* for more details about writable bindings.
*
- * Note that the lifecycle of the binding is tied to the object,
+ * Note that the lifecycle of the binding is tied to @object,
* and that you can have only one binding per object property.
* If you bind the same property twice on the same object, the second
* binding overrides the first one.
@@ -2817,7 +2817,7 @@ g_settings_bind (GSettings *settings,
* The binding uses the provided mapping functions to map between
* settings and property values.
*
- * Note that the lifecycle of the binding is tied to the object,
+ * Note that the lifecycle of the binding is tied to @object,
* and that you can have only one binding per object property.
* If you bind the same property twice on the same object, the second
* binding overrides the first one.
@@ -3034,7 +3034,7 @@ g_settings_binding_writable_changed (GSettings *settings,
* value as it passes from the setting to the object, i.e. @property
* will be set to %TRUE if the key is not writable.
*
- * Note that the lifecycle of the binding is tied to the object,
+ * Note that the lifecycle of the binding is tied to @object,
* and that you can have only one binding per object property.
* If you bind the same property twice on the same object, the second
* binding overrides the first one.
diff --git a/gio/gsettingsbackend.c b/gio/gsettingsbackend.c
index 0d5df0f82..edc4ff4d3 100644
--- a/gio/gsettingsbackend.c
+++ b/gio/gsettingsbackend.c
@@ -70,12 +70,12 @@ static gboolean g_settings_has_backend;
* implementations must carefully adhere to the expectations of
* callers that are documented on each of the interface methods.
*
- * Some of the GSettingsBackend functions accept or return a #GTree.
+ * Some of the #GSettingsBackend functions accept or return a #GTree.
* These trees always have strings as keys and #GVariant as values.
* g_settings_backend_create_tree() is a convenience function to create
* suitable trees.
*
- * The GSettingsBackend API is exported to allow third-party
+ * The #GSettingsBackend API is exported to allow third-party
* implementations, but does not carry the same stability guarantees
* as the public GIO API. For this reason, you have to define the
* C preprocessor symbol %G_SETTINGS_ENABLE_BACKEND before including
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index bc7a4ac84..4e12243d8 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -68,7 +68,7 @@
* ...
*
* plugin->schema_source =
- * g_settings_new_schema_source_from_directory (dir,
+ * g_settings_schema_source_new_from_directory (dir,
* g_settings_schema_source_get_default (), FALSE, NULL);
*
* ...
@@ -376,11 +376,11 @@ initialise_schema_sources (void)
* lookups performed against the default source should probably be done
* recursively.
*
- * Returns: (transfer none): the default schema source
+ * Returns: (transfer none) (nullable): the default schema source
*
* Since: 2.32
**/
- GSettingsSchemaSource *
+GSettingsSchemaSource *
g_settings_schema_source_get_default (void)
{
initialise_schema_sources ();
@@ -785,18 +785,21 @@ g_settings_schema_source_list_schemas (GSettingsSchemaSource *source,
for (i = 0; list[i]; i++)
{
- if (!g_hash_table_lookup (single, list[i]) &&
- !g_hash_table_lookup (reloc, list[i]))
+ if (!g_hash_table_contains (single, list[i]) &&
+ !g_hash_table_contains (reloc, list[i]))
{
+ gchar *schema;
GvdbTable *table;
+ schema = g_strdup (list[i]);
+
table = gvdb_table_get_table (s->table, list[i]);
g_assert (table != NULL);
if (gvdb_table_has_value (table, ".path"))
- g_hash_table_insert (single, g_strdup (list[i]), NULL);
+ g_hash_table_add (single, schema);
else
- g_hash_table_insert (reloc, g_strdup (list[i]), NULL);
+ g_hash_table_add (reloc, schema);
gvdb_table_unref (table);
}
diff --git a/gio/gsimpleasyncresult.c b/gio/gsimpleasyncresult.c
index 7883463b8..c6ddd9771 100644
--- a/gio/gsimpleasyncresult.c
+++ b/gio/gsimpleasyncresult.c
@@ -84,9 +84,10 @@
* from the point where it is called. g_simple_async_result_complete_in_idle()
* will finish it from an idle handler in the
* [thread-default main context][g-main-context-push-thread-default]
- * . g_simple_async_result_run_in_thread() will run the
- * job in a separate thread and then deliver the result to the
- * thread-default main context.
+ * where the #GSimpleAsyncResult was created.
+ * g_simple_async_result_run_in_thread() will run the job in a
+ * separate thread and then use
+ * g_simple_async_result_complete_in_idle() to deliver the result.
*
* To set the results of an asynchronous function,
* g_simple_async_result_set_op_res_gpointer(),
diff --git a/gio/gsocket.c b/gio/gsocket.c
index ba90be54b..567b4802e 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -44,6 +44,10 @@
# include <sys/ioctl.h>
#endif
+#ifdef HAVE_SIOCGIFADDR
+#include <net/if.h>
+#endif
+
#ifdef HAVE_SYS_FILIO_H
# include <sys/filio.h>
#endif
@@ -59,6 +63,7 @@
#include "gdatagrambased.h"
#include "gioenumtypes.h"
#include "ginetaddress.h"
+#include "ginetsocketaddress.h"
#include "ginitable.h"
#include "gioerror.h"
#include "gioenums.h"
@@ -252,11 +257,14 @@ struct _GSocketPrivate
guint connect_pending : 1;
#ifdef G_OS_WIN32
WSAEVENT event;
+ gboolean waiting;
+ DWORD waiting_result;
int current_events;
int current_errors;
int selected_events;
GList *requested_conditions; /* list of requested GIOCondition * */
GMutex win32_source_lock;
+ GCond win32_source_cond;
#endif
struct {
@@ -343,8 +351,10 @@ socket_strerror (int err)
static void
_win32_unset_event_mask (GSocket *socket, int mask)
{
+ g_mutex_lock (&socket->priv->win32_source_lock);
socket->priv->current_events &= ~mask;
socket->priv->current_errors &= ~mask;
+ g_mutex_unlock (&socket->priv->win32_source_lock);
}
#else
#define win32_unset_event_mask(_socket, _mask)
@@ -842,6 +852,7 @@ g_socket_finalize (GObject *object)
g_assert (socket->priv->requested_conditions == NULL);
g_mutex_clear (&socket->priv->win32_source_lock);
+ g_cond_clear (&socket->priv->win32_source_cond);
#endif
for (i = 0; i < RECV_ADDR_CACHE_SIZE; i++)
@@ -1069,6 +1080,7 @@ g_socket_init (GSocket *socket)
#ifdef G_OS_WIN32
socket->priv->event = WSA_INVALID_EVENT;
g_mutex_init (&socket->priv->win32_source_lock);
+ g_cond_init (&socket->priv->win32_source_cond);
#endif
}
@@ -1945,7 +1957,7 @@ g_socket_get_local_address (GSocket *socket,
* @socket: a #GSocket.
* @error: #GError for error reporting, or %NULL to ignore.
*
- * Try to get the remove address of a connected socket. This is only
+ * Try to get the remote address of a connected socket. This is only
* useful for connection oriented sockets that have been connected.
*
* Returns: (transfer full): a #GSocketAddress or %NULL on error.
@@ -2148,63 +2160,6 @@ g_socket_bind (GSocket *socket,
return TRUE;
}
-#if !defined(HAVE_IF_NAMETOINDEX) && defined(G_OS_WIN32)
-static guint
-if_nametoindex (const gchar *iface)
-{
- PIP_ADAPTER_ADDRESSES addresses = NULL, p;
- gulong addresses_len = 0;
- guint idx = 0;
- DWORD res;
-
- if (ws2funcs.pIfNameToIndex != NULL)
- return ws2funcs.pIfNameToIndex (iface);
-
- res = GetAdaptersAddresses (AF_UNSPEC, 0, NULL, NULL, &addresses_len);
- if (res != NO_ERROR && res != ERROR_BUFFER_OVERFLOW)
- {
- if (res == ERROR_NO_DATA)
- errno = ENXIO;
- else
- errno = EINVAL;
- return 0;
- }
-
- addresses = g_malloc (addresses_len);
- res = GetAdaptersAddresses (AF_UNSPEC, 0, NULL, addresses, &addresses_len);
-
- if (res != NO_ERROR)
- {
- g_free (addresses);
- if (res == ERROR_NO_DATA)
- errno = ENXIO;
- else
- errno = EINVAL;
- return 0;
- }
-
- p = addresses;
- while (p)
- {
- if (strcmp (p->AdapterName, iface) == 0)
- {
- idx = p->IfIndex;
- break;
- }
- p = p->Next;
- }
-
- if (p == NULL)
- errno = ENXIO;
-
- g_free (addresses);
-
- return idx;
-}
-
-#define HAVE_IF_NAMETOINDEX 1
-#endif
-
static gboolean
g_socket_multicast_group_operation (GSocket *socket,
GInetAddress *group,
@@ -2322,6 +2277,9 @@ g_socket_multicast_group_operation (GSocket *socket,
* in RFC 4604 is used. Note that on older platforms this may fail
* with a %G_IO_ERROR_NOT_SUPPORTED error.
*
+ * To bind to a given source-specific multicast address, use
+ * g_socket_join_multicast_group_ssm() instead.
+ *
* Returns: %TRUE on success, %FALSE on error.
*
* Since: 2.32
@@ -2351,6 +2309,9 @@ g_socket_join_multicast_group (GSocket *socket,
* @socket remains bound to its address and port, and can still receive
* unicast messages after calling this.
*
+ * To unbind to a given source-specific multicast address, use
+ * g_socket_leave_multicast_group_ssm() instead.
+ *
* Returns: %TRUE on success, %FALSE on error.
*
* Since: 2.32
@@ -2365,6 +2326,282 @@ g_socket_leave_multicast_group (GSocket *socket,
return g_socket_multicast_group_operation (socket, group, source_specific, iface, FALSE, error);
}
+static gboolean
+g_socket_multicast_group_operation_ssm (GSocket *socket,
+ GInetAddress *group,
+ GInetAddress *source_specific,
+ const gchar *iface,
+ gboolean join_group,
+ GError **error)
+{
+ gint result;
+
+ g_return_val_if_fail (G_IS_SOCKET (socket), FALSE);
+ g_return_val_if_fail (socket->priv->type == G_SOCKET_TYPE_DATAGRAM, FALSE);
+ g_return_val_if_fail (G_IS_INET_ADDRESS (group), FALSE);
+ g_return_val_if_fail (iface == NULL || *iface != '\0', FALSE);
+ g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
+
+ if (!source_specific)
+ {
+ return g_socket_multicast_group_operation (socket, group, FALSE, iface,
+ join_group, error);
+ }
+
+ if (!check_socket (socket, error))
+ return FALSE;
+
+ switch (g_inet_address_get_family (group))
+ {
+ case G_SOCKET_FAMILY_INVALID:
+ case G_SOCKET_FAMILY_UNIX:
+ {
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ join_group ?
+ _("Error joining multicast group: %s") :
+ _("Error leaving multicast group: %s"),
+ _("Unsupported socket family"));
+ return FALSE;
+ }
+ break;
+
+ case G_SOCKET_FAMILY_IPV4:
+ {
+#ifdef IP_ADD_SOURCE_MEMBERSHIP
+ gint optname;
+ struct ip_mreq_source mc_req_src;
+
+ if (g_inet_address_get_family (source_specific) !=
+ G_SOCKET_FAMILY_IPV4)
+ {
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ join_group ?
+ _("Error joining multicast group: %s") :
+ _("Error leaving multicast group: %s"),
+ _("source-specific not an IPv4 address"));
+ return FALSE;
+ }
+
+ memset (&mc_req_src, 0, sizeof (mc_req_src));
+
+ /* By default use the default IPv4 multicast interface. */
+ mc_req_src.imr_interface.s_addr = g_htonl (INADDR_ANY);
+
+ if (iface)
+ {
+#if defined(G_OS_WIN32) && defined (HAVE_IF_NAMETOINDEX)
+ guint iface_index = if_nametoindex (iface);
+ if (iface_index == 0)
+ {
+ int errsv = errno;
+
+ g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
+ _("Interface not found: %s"), g_strerror (errsv));
+ return FALSE;
+ }
+ /* (0.0.0.iface_index) only works on Windows. */
+ mc_req_src.imr_interface.s_addr = g_htonl (iface_index);
+#elif defined (HAVE_SIOCGIFADDR)
+ int ret;
+ struct ifreq ifr;
+ struct sockaddr_in *iface_addr;
+ size_t if_name_len = strlen (iface);
+
+ memset (&ifr, 0, sizeof (ifr));
+
+ if (if_name_len >= sizeof (ifr.ifr_name))
+ {
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FILENAME_TOO_LONG,
+ _("Interface name too long"));
+ return FALSE;
+ }
+
+ memcpy (ifr.ifr_name, iface, if_name_len);
+
+ /* Get the IPv4 address of the given network interface name. */
+ ret = ioctl (socket->priv->fd, SIOCGIFADDR, &ifr);
+ if (ret < 0)
+ {
+ int errsv = errno;
+
+ g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
+ _("Interface not found: %s"), g_strerror (errsv));
+ return FALSE;
+ }
+
+ iface_addr = (struct sockaddr_in *) &ifr.ifr_addr;
+ mc_req_src.imr_interface.s_addr = iface_addr->sin_addr.s_addr;
+#endif /* defined(G_OS_WIN32) && defined (HAVE_IF_NAMETOINDEX) */
+ }
+ memcpy (&mc_req_src.imr_multiaddr, g_inet_address_to_bytes (group),
+ g_inet_address_get_native_size (group));
+ memcpy (&mc_req_src.imr_sourceaddr,
+ g_inet_address_to_bytes (source_specific),
+ g_inet_address_get_native_size (source_specific));
+
+ optname =
+ join_group ? IP_ADD_SOURCE_MEMBERSHIP : IP_DROP_SOURCE_MEMBERSHIP;
+ result = setsockopt (socket->priv->fd, IPPROTO_IP, optname,
+ &mc_req_src, sizeof (mc_req_src));
+#else
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ join_group ?
+ _("Error joining multicast group: %s") :
+ _("Error leaving multicast group: %s"),
+ _("No support for IPv4 source-specific multicast"));
+ return FALSE;
+#endif /* IP_ADD_SOURCE_MEMBERSHIP */
+ }
+ break;
+
+ case G_SOCKET_FAMILY_IPV6:
+ {
+#ifdef MCAST_JOIN_SOURCE_GROUP
+ gboolean res;
+ gint optname;
+ struct group_source_req mc_req_src;
+ GSocketAddress *saddr_group, *saddr_source_specific;
+ guint iface_index = 0;
+
+#if defined (HAVE_IF_NAMETOINDEX)
+ if (iface)
+ {
+ iface_index = if_nametoindex (iface);
+ if (iface_index == 0)
+ {
+ int errsv = errno;
+
+ g_set_error (error, G_IO_ERROR, g_io_error_from_errno (errsv),
+ _("Interface not found: %s"), g_strerror (errsv));
+ return FALSE;
+ }
+ }
+#endif /* defined (HAVE_IF_NAMETOINDEX) */
+ mc_req_src.gsr_interface = iface_index;
+
+ saddr_group = g_inet_socket_address_new (group, 0);
+ res = g_socket_address_to_native (saddr_group, &mc_req_src.gsr_group,
+ sizeof (mc_req_src.gsr_group),
+ error);
+ g_object_unref (saddr_group);
+ if (!res)
+ return FALSE;
+
+ saddr_source_specific = g_inet_socket_address_new (source_specific, 0);
+ res = g_socket_address_to_native (saddr_source_specific,
+ &mc_req_src.gsr_source,
+ sizeof (mc_req_src.gsr_source),
+ error);
+ g_object_unref (saddr_source_specific);
+
+ if (!res)
+ return FALSE;
+
+ optname =
+ join_group ? MCAST_JOIN_SOURCE_GROUP : MCAST_LEAVE_SOURCE_GROUP;
+ result = setsockopt (socket->priv->fd, IPPROTO_IPV6, optname,
+ &mc_req_src, sizeof (mc_req_src));
+#else
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED,
+ join_group ?
+ _("Error joining multicast group: %s") :
+ _("Error leaving multicast group: %s"),
+ _("No support for IPv6 source-specific multicast"));
+ return FALSE;
+#endif /* MCAST_JOIN_SOURCE_GROUP */
+ }
+ break;
+
+ default:
+ g_return_val_if_reached (FALSE);
+ }
+
+ if (result < 0)
+ {
+ int errsv = get_socket_errno ();
+
+ g_set_error (error, G_IO_ERROR, socket_io_error_from_errno (errsv),
+ join_group ?
+ _("Error joining multicast group: %s") :
+ _("Error leaving multicast group: %s"),
+ socket_strerror (errsv));
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
+/**
+ * g_socket_join_multicast_group_ssm:
+ * @socket: a #GSocket.
+ * @group: a #GInetAddress specifying the group address to join.
+ * @source_specific: (nullable): a #GInetAddress specifying the
+ * source-specific multicast address or %NULL to ignore.
+ * @iface: (nullable): Name of the interface to use, or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Registers @socket to receive multicast messages sent to @group.
+ * @socket must be a %G_SOCKET_TYPE_DATAGRAM socket, and must have
+ * been bound to an appropriate interface and port with
+ * g_socket_bind().
+ *
+ * If @iface is %NULL, the system will automatically pick an interface
+ * to bind to based on @group.
+ *
+ * If @source_specific is not %NULL, use source-specific multicast as
+ * defined in RFC 4604. Note that on older platforms this may fail
+ * with a %G_IO_ERROR_NOT_SUPPORTED error.
+ *
+ * Note that this function can be called multiple times for the same
+ * @group with different @source_specific in order to receive multicast
+ * packets from more than one source.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ *
+ * Since: 2.56
+ */
+gboolean
+g_socket_join_multicast_group_ssm (GSocket *socket,
+ GInetAddress *group,
+ GInetAddress *source_specific,
+ const gchar *iface,
+ GError **error)
+{
+ return g_socket_multicast_group_operation_ssm (socket, group,
+ source_specific, iface, TRUE, error);
+}
+
+/**
+ * g_socket_leave_multicast_group_ssm:
+ * @socket: a #GSocket.
+ * @group: a #GInetAddress specifying the group address to leave.
+ * @source_specific: (nullable): a #GInetAddress specifying the
+ * source-specific multicast address or %NULL to ignore.
+ * @iface: (nullable): Name of the interface to use, or %NULL
+ * @error: #GError for error reporting, or %NULL to ignore.
+ *
+ * Removes @socket from the multicast group defined by @group, @iface,
+ * and @source_specific (which must all have the same values they had
+ * when you joined the group).
+ *
+ * @socket remains bound to its address and port, and can still receive
+ * unicast messages after calling this.
+ *
+ * Returns: %TRUE on success, %FALSE on error.
+ *
+ * Since: 2.56
+ */
+gboolean
+g_socket_leave_multicast_group_ssm (GSocket *socket,
+ GInetAddress *group,
+ GInetAddress *source_specific,
+ const gchar *iface,
+ GError **error)
+{
+ return g_socket_multicast_group_operation_ssm (socket, group,
+ source_specific, iface, FALSE, error);
+}
+
/**
* g_socket_speaks_ipv4:
* @socket: a #GSocket
@@ -2452,6 +2689,8 @@ g_socket_accept (GSocket *socket,
while (TRUE)
{
+ win32_unset_event_mask (socket, FD_ACCEPT);
+
if ((ret = accept (socket->priv->fd, NULL, 0)) < 0)
{
int errsv = get_socket_errno ();
@@ -2466,8 +2705,6 @@ g_socket_accept (GSocket *socket,
errsv == EAGAIN)
#endif
{
- win32_unset_event_mask (socket, FD_ACCEPT);
-
if (socket->priv->blocking)
{
if (!g_socket_condition_wait (socket,
@@ -2484,8 +2721,6 @@ g_socket_accept (GSocket *socket,
break;
}
- win32_unset_event_mask (socket, FD_ACCEPT);
-
#ifdef G_OS_WIN32
{
/* The socket inherits the accepting sockets event mask and even object,
@@ -2574,6 +2809,8 @@ g_socket_connect (GSocket *socket,
while (1)
{
+ win32_unset_event_mask (socket, FD_CONNECT);
+
if (connect (socket->priv->fd, (struct sockaddr *) &buffer,
g_socket_address_get_native_size (address)) < 0)
{
@@ -2588,8 +2825,6 @@ g_socket_connect (GSocket *socket,
if (errsv == WSAEWOULDBLOCK)
#endif
{
- win32_unset_event_mask (socket, FD_CONNECT);
-
if (socket->priv->blocking)
{
if (g_socket_condition_wait (socket, G_IO_OUT, cancellable, error))
@@ -2615,8 +2850,6 @@ g_socket_connect (GSocket *socket,
break;
}
- win32_unset_event_mask (socket, FD_CONNECT);
-
socket->priv->connected_read = TRUE;
socket->priv->connected_write = TRUE;
@@ -2796,6 +3029,8 @@ g_socket_receive_with_timeout (GSocket *socket,
while (1)
{
+ win32_unset_event_mask (socket, FD_READ);
+
if ((ret = recv (socket->priv->fd, buffer, size, 0)) < 0)
{
int errsv = get_socket_errno ();
@@ -2810,8 +3045,6 @@ g_socket_receive_with_timeout (GSocket *socket,
errsv == EAGAIN)
#endif
{
- win32_unset_event_mask (socket, FD_READ);
-
if (timeout != 0)
{
if (!block_on_timeout (socket, G_IO_IN, timeout, start_time,
@@ -2822,14 +3055,10 @@ g_socket_receive_with_timeout (GSocket *socket,
}
}
- win32_unset_event_mask (socket, FD_READ);
-
socket_set_error_lazy (error, errsv, _("Error receiving data: %s"));
return -1;
}
- win32_unset_event_mask (socket, FD_READ);
-
break;
}
@@ -2995,6 +3224,8 @@ g_socket_send_with_timeout (GSocket *socket,
while (1)
{
+ win32_unset_event_mask (socket, FD_WRITE);
+
if ((ret = send (socket->priv->fd, buffer, size, G_SOCKET_DEFAULT_SEND_FLAGS)) < 0)
{
int errsv = get_socket_errno ();
@@ -3009,8 +3240,6 @@ g_socket_send_with_timeout (GSocket *socket,
errsv == EAGAIN)
#endif
{
- win32_unset_event_mask (socket, FD_WRITE);
-
if (timeout != 0)
{
if (!block_on_timeout (socket, G_IO_OUT, timeout, start_time,
@@ -3425,7 +3654,7 @@ remove_condition_watch (GSocket *socket,
}
static GIOCondition
-update_condition (GSocket *socket)
+update_condition_unlocked (GSocket *socket)
{
WSANETWORKEVENTS events;
GIOCondition condition;
@@ -3492,6 +3721,16 @@ update_condition (GSocket *socket)
return condition;
}
+
+static GIOCondition
+update_condition (GSocket *socket)
+{
+ GIOCondition res;
+ g_mutex_lock (&socket->priv->win32_source_lock);
+ res = update_condition_unlocked (socket);
+ g_mutex_unlock (&socket->priv->win32_source_lock);
+ return res;
+}
#endif
typedef struct {
@@ -3505,24 +3744,38 @@ typedef struct {
GIOCondition condition;
} GSocketSource;
-#ifdef G_OS_WIN32
static gboolean
-socket_source_prepare_win32 (GSource *source,
- gint *timeout)
+socket_source_prepare (GSource *source,
+ gint *timeout)
{
GSocketSource *socket_source = (GSocketSource *)source;
*timeout = -1;
+#ifdef G_OS_WIN32
+ if ((socket_source->pollfd.revents & G_IO_NVAL) != 0)
+ return TRUE;
+
+ if (g_socket_is_closed (socket_source->socket))
+ {
+ g_source_remove_poll (source, &socket_source->pollfd);
+ socket_source->pollfd.revents = G_IO_NVAL;
+ return TRUE;
+ }
+
return (update_condition (socket_source->socket) & socket_source->condition) != 0;
+#else
+ return g_socket_is_closed (socket_source->socket) && socket_source->fd_tag != NULL;
+#endif
}
+#ifdef G_OS_WIN32
static gboolean
socket_source_check_win32 (GSource *source)
{
int timeout;
- return socket_source_prepare_win32 (source, &timeout);
+ return socket_source_prepare (source, &timeout);
}
#endif
@@ -3541,11 +3794,22 @@ socket_source_dispatch (GSource *source,
#ifdef G_OS_WIN32
events = update_condition (socket_source->socket);
#else
- events = g_source_query_unix_fd (source, socket_source->fd_tag);
+ if (g_socket_is_closed (socket_source->socket))
+ {
+ if (socket_source->fd_tag)
+ g_source_remove_unix_fd (source, socket_source->fd_tag);
+ socket_source->fd_tag = NULL;
+ events = G_IO_NVAL;
+ }
+ else
+ {
+ events = g_source_query_unix_fd (source, socket_source->fd_tag);
+ }
#endif
timeout = g_source_get_ready_time (source);
- if (timeout >= 0 && timeout < g_source_get_time (source))
+ if (timeout >= 0 && timeout < g_source_get_time (source) &&
+ !g_socket_is_closed (socket_source->socket))
{
socket->priv->timed_out = TRUE;
events |= (G_IO_IN | G_IO_OUT);
@@ -3553,7 +3817,7 @@ socket_source_dispatch (GSource *source,
ret = (*func) (socket, events & socket_source->condition, user_data);
- if (socket->priv->timeout)
+ if (socket->priv->timeout && !g_socket_is_closed (socket_source->socket))
g_source_set_ready_time (source, g_get_monotonic_time () + socket->priv->timeout * 1000000);
else
g_source_set_ready_time (source, -1);
@@ -3606,11 +3870,11 @@ socket_source_closure_callback (GSocket *socket,
static GSourceFuncs socket_source_funcs =
{
+ socket_source_prepare,
#ifdef G_OS_WIN32
- socket_source_prepare_win32,
socket_source_check_win32,
#else
- NULL, NULL, /* check, prepare */
+ NULL,
#endif
socket_source_dispatch,
socket_source_finalize,
@@ -3887,11 +4151,44 @@ g_socket_condition_timed_wait (GSocket *socket,
if (timeout == -1)
timeout = WSA_INFINITE;
- current_condition = update_condition (socket);
+ g_mutex_lock (&socket->priv->win32_source_lock);
+ current_condition = update_condition_unlocked (socket);
while ((condition & current_condition) == 0)
{
- res = WSAWaitForMultipleEvents (num_events, events,
- FALSE, timeout, FALSE);
+ if (!socket->priv->waiting)
+ {
+ socket->priv->waiting = TRUE;
+ socket->priv->waiting_result = 0;
+ g_mutex_unlock (&socket->priv->win32_source_lock);
+
+ res = WSAWaitForMultipleEvents (num_events, events, FALSE, timeout, FALSE);
+
+ g_mutex_lock (&socket->priv->win32_source_lock);
+ socket->priv->waiting = FALSE;
+ socket->priv->waiting_result = res;
+ g_cond_broadcast (&socket->priv->win32_source_cond);
+ }
+ else
+ {
+ if (timeout != WSA_INFINITE)
+ {
+ if (!g_cond_wait_until (&socket->priv->win32_source_cond, &socket->priv->win32_source_lock, timeout))
+ {
+ res = WSA_WAIT_TIMEOUT;
+ break;
+ }
+ else
+ {
+ res = socket->priv->waiting_result;
+ }
+ }
+ else
+ {
+ g_cond_wait (&socket->priv->win32_source_cond, &socket->priv->win32_source_lock);
+ res = socket->priv->waiting_result;
+ }
+ }
+
if (res == WSA_WAIT_FAILED)
{
int errsv = get_socket_errno ();
@@ -3912,7 +4209,7 @@ g_socket_condition_timed_wait (GSocket *socket,
if (g_cancellable_set_error_if_cancelled (cancellable, error))
break;
- current_condition = update_condition (socket);
+ current_condition = update_condition_unlocked (socket);
if (timeout != WSA_INFINITE)
{
@@ -3921,6 +4218,7 @@ g_socket_condition_timed_wait (GSocket *socket,
timeout = 0;
}
}
+ g_mutex_unlock (&socket->priv->win32_source_lock);
remove_condition_watch (socket, &condition);
if (num_events > 1)
g_cancellable_release_fd (cancellable);
@@ -4418,6 +4716,8 @@ g_socket_send_message_with_timeout (GSocket *socket,
while (1)
{
+ win32_unset_event_mask (socket, FD_WRITE);
+
if (address)
result = WSASendTo (socket->priv->fd,
bufs, num_vectors,
@@ -4439,8 +4739,6 @@ g_socket_send_message_with_timeout (GSocket *socket,
if (errsv == WSAEWOULDBLOCK)
{
- win32_unset_event_mask (socket, FD_WRITE);
-
if (timeout != 0)
{
if (!block_on_timeout (socket, G_IO_OUT, timeout,
@@ -4888,6 +5186,8 @@ g_socket_receive_message_with_timeout (GSocket *socket,
/* do it */
while (1)
{
+ win32_unset_event_mask (socket, FD_READ);
+
addrlen = sizeof addr;
if (address)
result = WSARecvFrom (socket->priv->fd,
@@ -4909,8 +5209,6 @@ g_socket_receive_message_with_timeout (GSocket *socket,
if (errsv == WSAEWOULDBLOCK)
{
- win32_unset_event_mask (socket, FD_READ);
-
if (timeout != 0)
{
if (!block_on_timeout (socket, G_IO_IN, timeout,
@@ -4924,7 +5222,6 @@ g_socket_receive_message_with_timeout (GSocket *socket,
socket_set_error_lazy (error, errsv, _("Error receiving message: %s"));
return -1;
}
- win32_unset_event_mask (socket, FD_READ);
break;
}
diff --git a/gio/gsocket.h b/gio/gsocket.h
index 613c8dd92..a65cbc22f 100644
--- a/gio/gsocket.h
+++ b/gio/gsocket.h
@@ -157,6 +157,18 @@ gboolean g_socket_leave_multicast_group (GSocket
gboolean source_specific,
const gchar *iface,
GError **error);
+GLIB_AVAILABLE_IN_2_56
+gboolean g_socket_join_multicast_group_ssm (GSocket *socket,
+ GInetAddress *group,
+ GInetAddress *source_specific,
+ const gchar *iface,
+ GError **error);
+GLIB_AVAILABLE_IN_2_56
+gboolean g_socket_leave_multicast_group_ssm (GSocket *socket,
+ GInetAddress *group,
+ GInetAddress *source_specific,
+ const gchar *iface,
+ GError **error);
GLIB_AVAILABLE_IN_ALL
gboolean g_socket_connect (GSocket *socket,
GSocketAddress *address,
diff --git a/gio/gsocketlistener.h b/gio/gsocketlistener.h
index e5185c28d..687fab3d4 100644
--- a/gio/gsocketlistener.h
+++ b/gio/gsocketlistener.h
@@ -62,7 +62,7 @@ struct _GSocketListenerClass
void (* changed) (GSocketListener *listener);
void (* event) (GSocketListener *listener,
- GSocketListenerEvent event,
+ GSocketListenerEvent *event,
GSocket *socket);
/* Padding for future expansion */
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index 8525f3bfc..18de30e55 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -717,7 +717,7 @@ g_subprocess_new (GSubprocessFlags flags,
/**
* g_subprocess_newv: (rename-to g_subprocess_new)
- * @argv: (array zero-terminated=1) (element-type utf8): commandline arguments for the subprocess
+ * @argv: (array zero-terminated=1) (element-type filename): commandline arguments for the subprocess
* @flags: flags that define the behaviour of the subprocess
* @error: (nullable): return location for an error, or %NULL
*
diff --git a/gio/gsubprocesslauncher.c b/gio/gsubprocesslauncher.c
index 5cdec4d4e..12a5e44b2 100644
--- a/gio/gsubprocesslauncher.c
+++ b/gio/gsubprocesslauncher.c
@@ -228,7 +228,8 @@ g_subprocess_launcher_new (GSubprocessFlags flags)
/**
* g_subprocess_launcher_set_environ:
* @self: a #GSubprocess
- * @env: (array zero-terminated=1): the replacement environment
+ * @env: (array zero-terminated=1) (element-type filename) (transfer none):
+ * the replacement environment
*
* Replace the entire environment of processes launched from this
* launcher with the given 'environ' variable.
@@ -266,8 +267,9 @@ g_subprocess_launcher_set_environ (GSubprocessLauncher *self,
/**
* g_subprocess_launcher_setenv:
* @self: a #GSubprocess
- * @variable: the environment variable to set, must not contain '='
- * @value: the new value for the variable
+ * @variable: (type filename): the environment variable to set,
+ * must not contain '='
+ * @value: (type filename): the new value for the variable
* @overwrite: whether to change the variable if it already exists
*
* Sets the environment variable @variable in the environment of
@@ -291,7 +293,8 @@ g_subprocess_launcher_setenv (GSubprocessLauncher *self,
/**
* g_subprocess_launcher_unsetenv:
* @self: a #GSubprocess
- * @variable: the environment variable to unset, must not contain '='
+ * @variable: (type filename): the environment variable to unset,
+ * must not contain '='
*
* Removes the environment variable @variable from the environment of
* processes launched from this launcher.
@@ -311,7 +314,7 @@ g_subprocess_launcher_unsetenv (GSubprocessLauncher *self,
/**
* g_subprocess_launcher_getenv:
* @self: a #GSubprocess
- * @variable: the environment variable to get
+ * @variable: (type filename): the environment variable to get
*
* Returns the value of the environment variable @variable in the
* environment of processes launched from this launcher.
@@ -319,7 +322,8 @@ g_subprocess_launcher_unsetenv (GSubprocessLauncher *self,
* On UNIX, the returned string can be an arbitrary byte string.
* On Windows, it will be UTF-8.
*
- * Returns: the value of the environment variable, %NULL if unset
+ * Returns: (type filename): the value of the environment variable,
+ * %NULL if unset
*
* Since: 2.40
**/
@@ -640,7 +644,7 @@ g_subprocess_launcher_take_fd (GSubprocessLauncher *self,
}
/**
- * g_subprocess_launcher_set_child_setup:
+ * g_subprocess_launcher_set_child_setup: (skip)
* @self: a #GSubprocessLauncher
* @child_setup: a #GSpawnChildSetupFunc to use as the child setup function
* @user_data: user data for @child_setup
@@ -724,7 +728,7 @@ g_subprocess_launcher_spawn (GSubprocessLauncher *launcher,
/**
* g_subprocess_launcher_spawnv:
* @self: a #GSubprocessLauncher
- * @argv: (array zero-terminated=1) (element-type utf8): Command line arguments
+ * @argv: (array zero-terminated=1) (element-type filename): Command line arguments
* @error: Error
*
* Creates a #GSubprocess given a provided array of arguments.
diff --git a/gio/gtask.c b/gio/gtask.c
index 7eb018560..814ba9433 100644
--- a/gio/gtask.c
+++ b/gio/gtask.c
@@ -47,11 +47,13 @@
* Eventually, you will call a method such as
* g_task_return_pointer() or g_task_return_error(), which will
* save the value you give it and then invoke the task's callback
- * function (waiting until the next iteration of the main
- * loop first, if necessary). The caller will pass the #GTask back
- * to the operation's finish function (as a #GAsyncResult), and
- * you can use g_task_propagate_pointer() or the like to extract
- * the return value.
+ * function in the
+ * [thread-default main context][g-main-context-push-thread-default]
+ * where it was created (waiting until the next iteration of the main
+ * loop first, if necessary). The caller will pass the #GTask back to
+ * the operation's finish function (as a #GAsyncResult), and you can
+ * can use g_task_propagate_pointer() or the like to extract the
+ * return value.
*
* Here is an example for using GTask as a GAsyncResult:
* |[<!-- language="C" -->
@@ -290,9 +292,10 @@
* ## Asynchronous operations from synchronous ones
*
* You can use g_task_run_in_thread() to turn a synchronous
- * operation into an asynchronous one, by running it in a thread
- * which will then dispatch the result back to the caller's
- * #GMainContext when it completes.
+ * operation into an asynchronous one, by running it in a thread.
+ * When it completes, the result will be dispatched to the
+ * [thread-default main context][g-main-context-push-thread-default]
+ * where the #GTask was created.
*
* Running a task in a thread:
* |[<!-- language="C" -->
@@ -504,7 +507,7 @@
* whether the task's callback can be invoked directly, or
* if it needs to be sent to another #GMainContext, or delayed
* until the next iteration of the current #GMainContext.)
- * - The "finish" functions for #GTask-based operations are generally
+ * - The "finish" functions for #GTask based operations are generally
* much simpler than #GSimpleAsyncResult ones, normally consisting
* of only a single call to g_task_propagate_pointer() or the like.
* Since g_task_propagate_pointer() "steals" the return value from
@@ -978,7 +981,7 @@ g_task_set_source_tag (GTask *task,
* Gets the source object from @task. Like
* g_async_result_get_source_object(), but does not ref the object.
*
- * Returns: (transfer none) (type GObject): @task's source object, or %NULL
+ * Returns: (transfer none) (nullable) (type GObject): @task's source object, or %NULL
*
* Since: 2.36
*/
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index 7fa266aa5..7941d95fc 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -537,7 +537,6 @@ g_resolver_records_from_res_query (const gchar *rrname,
gchar namebuf[1024];
guchar *end, *p;
guint16 type, qclass, rdlength;
- guint32 ttl;
HEADER *header;
GList *records;
GVariant *record;
@@ -587,8 +586,7 @@ g_resolver_records_from_res_query (const gchar *rrname,
p += dn_expand (answer, end, p, namebuf, sizeof (namebuf));
GETSHORT (type, p);
GETSHORT (qclass, p);
- GETLONG (ttl, p);
- ttl = ttl; /* To avoid -Wunused-but-set-variable */
+ p += 4; /* ignore the ttl (type=long) value */
GETSHORT (rdlength, p);
if (type != rrtype || qclass != C_IN)
diff --git a/gio/gtlsbackend.c b/gio/gtlsbackend.c
index a78d84be7..80af6ad49 100644
--- a/gio/gtlsbackend.c
+++ b/gio/gtlsbackend.c
@@ -143,10 +143,8 @@ g_tls_backend_supports_dtls (GTlsBackend *backend)
{
if (G_TLS_BACKEND_GET_INTERFACE (backend)->supports_dtls)
return G_TLS_BACKEND_GET_INTERFACE (backend)->supports_dtls (backend);
- else if (G_IS_DUMMY_TLS_BACKEND (backend))
- return FALSE;
- else
- return TRUE;
+
+ return FALSE;
}
/**
@@ -230,14 +228,22 @@ g_tls_backend_get_server_connection_type (GTlsBackend *backend)
* Gets the #GType of @backend’s #GDtlsClientConnection implementation.
*
* Returns: the #GType of @backend’s #GDtlsClientConnection
- * implementation.
+ * implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS.
*
* Since: 2.48
*/
GType
g_tls_backend_get_dtls_client_connection_type (GTlsBackend *backend)
{
- return G_TLS_BACKEND_GET_INTERFACE (backend)->get_dtls_client_connection_type ();
+ GTlsBackendInterface *iface;
+
+ g_return_val_if_fail (G_IS_TLS_BACKEND (backend), G_TYPE_INVALID);
+
+ iface = G_TLS_BACKEND_GET_INTERFACE (backend);
+ if (iface->get_dtls_client_connection_type == NULL)
+ return G_TYPE_INVALID;
+
+ return iface->get_dtls_client_connection_type ();
}
/**
@@ -247,14 +253,22 @@ g_tls_backend_get_dtls_client_connection_type (GTlsBackend *backend)
* Gets the #GType of @backend’s #GDtlsServerConnection implementation.
*
* Returns: the #GType of @backend’s #GDtlsServerConnection
- * implementation.
+ * implementation, or %G_TYPE_INVALID if this backend doesn’t support DTLS.
*
* Since: 2.48
*/
GType
g_tls_backend_get_dtls_server_connection_type (GTlsBackend *backend)
{
- return G_TLS_BACKEND_GET_INTERFACE (backend)->get_dtls_server_connection_type ();
+ GTlsBackendInterface *iface;
+
+ g_return_val_if_fail (G_IS_TLS_BACKEND (backend), G_TYPE_INVALID);
+
+ iface = G_TLS_BACKEND_GET_INTERFACE (backend);
+ if (iface->get_dtls_server_connection_type == NULL)
+ return G_TYPE_INVALID;
+
+ return iface->get_dtls_server_connection_type ();
}
/**
diff --git a/gio/gtlsdatabase.c b/gio/gtlsdatabase.c
index 424d9c178..5a77b56d7 100644
--- a/gio/gtlsdatabase.c
+++ b/gio/gtlsdatabase.c
@@ -459,7 +459,7 @@ g_tls_database_class_init (GTlsDatabaseClass *klass)
* adding any missing certificates to the chain.
*
* @chain is a chain of #GTlsCertificate objects each pointing to the next
- * certificate in the chain by its %issuer property. The chain may initially
+ * certificate in the chain by its #GTlsCertificate:issuer property. The chain may initially
* consist of one or more certificates. After the verification process is
* complete, @chain may be modified by adding missing certificates, or removing
* extra certificates. If a certificate anchor was found, then it is added to
@@ -741,7 +741,7 @@ g_tls_database_lookup_certificate_for_handle_async (GTlsDatabase *sel
* @error: a #GError pointer, or %NULL
*
* Finish an asynchronous lookup of a certificate by its handle. See
- * g_tls_database_lookup_certificate_handle() for more information.
+ * g_tls_database_lookup_certificate_by_handle() for more information.
*
* If the handle is no longer valid, or does not point to a certificate in
* this database, then %NULL will be returned.
diff --git a/gio/gtlspassword.c b/gio/gtlspassword.c
index 27364b1be..1e437a7b6 100644
--- a/gio/gtlspassword.c
+++ b/gio/gtlspassword.c
@@ -266,7 +266,7 @@ g_tls_password_get_value (GTlsPassword *password,
/**
* g_tls_password_set_value:
* @password: a #GTlsPassword object
- * @value: the new password value
+ * @value: (array length=length): the new password value
* @length: the length of the password, or -1
*
* Set the value for this password. The @value will be copied by the password
@@ -295,7 +295,7 @@ g_tls_password_set_value (GTlsPassword *password,
/**
* g_tls_password_set_value_full:
* @password: a #GTlsPassword object
- * @value: the value for the password
+ * @value: (array length=length): the value for the password
* @length: the length of the password, or -1
* @destroy: (nullable): a function to use to free the password.
*
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index 8e32b4f1e..fc3712987 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -148,6 +148,7 @@ G_DEFINE_BOXED_TYPE (GUnixMountPoint, g_unix_mount_point,
static GList *_g_get_unix_mounts (void);
static GList *_g_get_unix_mount_points (void);
+static gboolean proc_mounts_watch_is_running (void);
static guint64 mount_poller_time = 0;
@@ -280,35 +281,99 @@ g_unix_is_mount_path_system_internal (const char *mount_path)
return FALSE;
}
-static gboolean
-guess_system_internal (const char *mountpoint,
- const char *fs,
- const char *device)
+/**
+ * g_unix_is_system_fs_type:
+ * @fs_type: a file system type, e.g. `procfs` or `tmpfs`
+ *
+ * Determines if @fs_type is considered a type of file system which is only
+ * used in implementation of the OS. This is primarily used for hiding
+ * mounted volumes that are intended as APIs for programs to read, and system
+ * administrators at a shell; rather than something that should, for example,
+ * appear in a GUI. For example, the Linux `/proc` filesystem.
+ *
+ * The list of file system types considered ‘system’ ones may change over time.
+ *
+ * Returns: %TRUE if @fs_type is considered an implementation detail of the OS.
+ * Since: 2.56
+ */
+gboolean
+g_unix_is_system_fs_type (const char *fs_type)
{
const char *ignore_fs[] = {
+ "adfs",
+ "afs",
"auto",
"autofs",
+ "autofs4",
+ "cgroup",
+ "cifs",
+ "configfs",
+ "cxfs",
+ "debugfs",
"devfs",
"devpts",
+ "devtmpfs",
"ecryptfs",
"fdescfs",
+ "fusectl",
+ "gfs",
+ "gfs2",
+ "gpfs",
+ "hugetlbfs",
"kernfs",
"linprocfs",
+ "linsysfs",
+ "lustre",
+ "lustre_lite",
"mfs",
+ "mqueue",
+ "ncpfs",
+ "nfs",
+ "nfs4",
+ "nfsd",
"nullfs",
+ "ocfs2",
+ "overlay",
"proc",
"procfs",
+ "pstore",
"ptyfs",
"rootfs",
+ "rpc_pipefs",
+ "securityfs",
"selinuxfs",
+ "smbfs",
"sysfs",
"tmpfs",
"usbfs",
- "nfsd",
- "rpc_pipefs",
"zfs",
NULL
};
+
+ g_return_val_if_fail (fs_type != NULL && *fs_type != '\0', FALSE);
+
+ return is_in (fs_type, ignore_fs);
+}
+
+/**
+ * g_unix_is_system_device_path:
+ * @device_path: a device path, e.g. `/dev/loop0` or `nfsd`
+ *
+ * Determines if @device_path is considered a block device path which is only
+ * used in implementation of the OS. This is primarily used for hiding
+ * mounted volumes that are intended as APIs for programs to read, and system
+ * administrators at a shell; rather than something that should, for example,
+ * appear in a GUI. For example, the Linux `/proc` filesystem.
+ *
+ * The list of device paths considered ‘system’ ones may change over time.
+ *
+ * Returns: %TRUE if @device_path is considered an implementation detail of
+ * the OS.
+ * Since: 2.56
+ */
+gboolean
+g_unix_is_system_device_path (const char *device_path)
+{
const char *ignore_devices[] = {
"none",
"sunrpc",
@@ -318,11 +383,21 @@ guess_system_internal (const char *mountpoint,
"/dev/vn",
NULL
};
-
- if (is_in (fs, ignore_fs))
+
+ g_return_val_if_fail (device_path != NULL && *device_path != '\0', FALSE);
+
+ return is_in (device_path, ignore_devices);
+}
+
+static gboolean
+guess_system_internal (const char *mountpoint,
+ const char *fs,
+ const char *device)
+{
+ if (g_unix_is_system_fs_type (fs))
return TRUE;
- if (is_in (device, ignore_devices))
+ if (g_unix_is_system_device_path (device))
return TRUE;
if (g_unix_is_mount_path_system_internal (mountpoint))
@@ -430,7 +505,7 @@ _g_get_unix_mounts (void)
mnt_free_iter (iter);
out:
- mnt_unref_table (table);
+ mnt_free_table (table);
return g_list_reverse (return_list);
}
@@ -954,7 +1029,7 @@ _g_get_unix_mount_points (void)
mnt_free_iter (iter);
out:
- mnt_unref_table (table);
+ mnt_free_table (table);
return g_list_reverse (return_list);
}
@@ -1279,7 +1354,6 @@ _g_get_unix_mount_points (void)
GList *return_list;
#ifdef HAVE_SYS_SYSCTL_H
int usermnt = 0;
- size_t len = sizeof(usermnt);
struct stat sb;
#endif
@@ -1290,10 +1364,15 @@ _g_get_unix_mount_points (void)
#ifdef HAVE_SYS_SYSCTL_H
#if defined(HAVE_SYSCTLBYNAME)
- sysctlbyname ("vfs.usermount", &usermnt, &len, NULL, 0);
+ {
+ size_t len = sizeof(usermnt);
+
+ sysctlbyname ("vfs.usermount", &usermnt, &len, NULL, 0);
+ }
#elif defined(CTL_VFS) && defined(VFS_USERMOUNT)
{
int mib[2];
+ size_t len = sizeof(usermnt);
mib[0] = CTL_VFS;
mib[1] = VFS_USERMOUNT;
@@ -1302,6 +1381,7 @@ _g_get_unix_mount_points (void)
#elif defined(CTL_KERN) && defined(KERN_USERMOUNT)
{
int mib[2];
+ size_t len = sizeof(usermnt);
mib[0] = CTL_KERN;
mib[1] = KERN_USERMOUNT;
@@ -1368,15 +1448,26 @@ get_mounts_timestamp (void)
struct stat buf;
monitor_file = get_mtab_monitor_file ();
- if (monitor_file)
+ /* Don't return mtime for /proc/ files */
+ if (monitor_file && !g_str_has_prefix (monitor_file, "/proc/"))
{
if (stat (monitor_file, &buf) == 0)
return (guint64)buf.st_mtime;
}
- else
+ else if (proc_mounts_watch_is_running ())
{
+ /* it's being monitored by poll, so return mount_poller_time */
return mount_poller_time;
}
+ else
+ {
+ /* Case of /proc/ file not being monitored - Be on the safe side and
+ * send a new timestamp to force g_unix_mounts_changed_since() to
+ * return TRUE so any application caches depending on it (like eg.
+ * the one in GIO) get invalidated and don't hold possibly outdated
+ * data - see Bug 787731 */
+ return (guint64) g_get_monotonic_time ();
+ }
return 0;
}
@@ -1566,6 +1657,13 @@ static GFileMonitor *mtab_monitor;
static GSource *proc_mounts_watch_source;
static GList *mount_poller_mounts;
+static gboolean
+proc_mounts_watch_is_running (void)
+{
+ return proc_mounts_watch_source != NULL &&
+ !g_source_is_destroyed (proc_mounts_watch_source);
+}
+
static void
fstab_file_changed (GFileMonitor *monitor,
GFile *file,
@@ -1602,7 +1700,10 @@ proc_mounts_changed (GIOChannel *channel,
gpointer user_data)
{
if (cond & G_IO_ERR)
- g_context_specific_group_emit (&mount_monitor_group, signals[MOUNTS_CHANGED]);
+ {
+ mount_poller_time = (guint64) g_get_monotonic_time ();
+ g_context_specific_group_emit (&mount_monitor_group, signals[MOUNTS_CHANGED]);
+ }
return TRUE;
}
@@ -1652,7 +1753,10 @@ mount_monitor_stop (void)
}
if (proc_mounts_watch_source != NULL)
- g_source_destroy (proc_mounts_watch_source);
+ {
+ g_source_destroy (proc_mounts_watch_source);
+ proc_mounts_watch_source = NULL;
+ }
if (mtab_monitor)
{
@@ -2049,9 +2153,14 @@ g_unix_mount_is_readonly (GUnixMountEntry *mount_entry)
/**
* g_unix_mount_is_system_internal:
* @mount_entry: a #GUnixMount.
+ *
+ * Checks if a Unix mount is a system mount. This is the Boolean OR of
+ * g_unix_is_system_fs_type(), g_unix_is_system_device_path() and
+ * g_unix_is_mount_path_system_internal() on @mount_entry’s properties.
*
- * Checks if a unix mount is a system path.
- *
+ * The definition of what a ‘system’ mount entry is may change over time as new
+ * file system types and device paths are ignored.
+ *
* Returns: %TRUE if the unix mount is for a system path.
*/
gboolean
diff --git a/gio/gunixmounts.h b/gio/gunixmounts.h
index 853b16182..04d6b0726 100644
--- a/gio/gunixmounts.h
+++ b/gio/gunixmounts.h
@@ -96,6 +96,8 @@ GIcon * g_unix_mount_guess_icon (GUnixMountEntry *mount_e
GLIB_AVAILABLE_IN_ALL
GIcon * g_unix_mount_guess_symbolic_icon (GUnixMountEntry *mount_entry);
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountEntry, g_unix_mount_free)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GUnixMountPoint, g_unix_mount_point_free)
GLIB_AVAILABLE_IN_ALL
gint g_unix_mount_point_compare (GUnixMountPoint *mount1,
@@ -151,6 +153,10 @@ void g_unix_mount_monitor_set_rate_limit (GUnixMountMonitor *mount
GLIB_AVAILABLE_IN_ALL
gboolean g_unix_is_mount_path_system_internal (const char *mount_path);
+GLIB_AVAILABLE_IN_2_56
+gboolean g_unix_is_system_fs_type (const char *fs_type);
+GLIB_AVAILABLE_IN_2_56
+gboolean g_unix_is_system_device_path (const char *device_path);
G_END_DECLS
diff --git a/gio/gvolume.c b/gio/gvolume.c
index 67a70a924..f97ce4c12 100644
--- a/gio/gvolume.c
+++ b/gio/gvolume.c
@@ -633,7 +633,7 @@ g_volume_enumerate_identifiers (GVolume *volume)
* then the expression
* |[<!-- language="C" -->
* (g_file_has_prefix (volume_activation_root, mount_root) ||
- g_file_equal (volume_activation_root, mount_root))
+ * g_file_equal (volume_activation_root, mount_root))
* ]|
* will always be %TRUE.
*
diff --git a/gio/gvolumemonitor.c b/gio/gvolumemonitor.c
index cc8d917b9..cb22f8927 100644
--- a/gio/gvolumemonitor.c
+++ b/gio/gvolumemonitor.c
@@ -159,7 +159,10 @@ g_volume_monitor_class_init (GVolumeMonitorClass *klass)
* @volume_monitor: The volume monitor emitting the signal.
* @mount: a #GMount that is being unmounted.
*
- * Emitted when a mount is about to be removed.
+ * May be emitted when a mount is about to be removed.
+ *
+ * This signal depends on the backend and is only emitted if
+ * GIO was used to unmount.
**/
signals[MOUNT_PRE_UNMOUNT] = g_signal_new (I_("mount-pre-unmount"),
G_TYPE_VOLUME_MONITOR,
diff --git a/gio/inotify/inotify-helper.c b/gio/inotify/inotify-helper.c
index d64e34d0c..dce57e507 100644
--- a/gio/inotify/inotify-helper.c
+++ b/gio/inotify/inotify-helper.c
@@ -156,12 +156,9 @@ ih_event_callback (ik_event_t *event,
gboolean file_event)
{
gboolean interesting;
- GFileMonitorEvent event_flags;
g_assert (!file_event); /* XXX hardlink support */
- event_flags = ih_mask_to_EventFlags (event->mask);
-
if (event->mask & IN_MOVE)
{
/* We either have a rename (in the same directory) or a move
@@ -190,22 +187,17 @@ ih_event_callback (ik_event_t *event,
else
other = NULL;
- /* This is either an incoming or outgoing move. Since we checked the
- * event->mask above, it should have converted to a #GFileMonitorEvent
- * properly. If not, the assumption we have made about event->mask
- * only ever having a single bit set (apart from IN_ISDIR) is false.
- * The kernel documentation is lacking here. */
- g_assert (event_flags != -1);
- interesting = g_file_monitor_source_handle_event (sub->user_data, event_flags,
+ /* this is either an incoming or outgoing move */
+ interesting = g_file_monitor_source_handle_event (sub->user_data, ih_mask_to_EventFlags (event->mask),
event->name, NULL, other, event->timestamp);
if (other)
g_object_unref (other);
}
}
- else if (event_flags != -1)
+ else
/* unpaired event -- no 'other' field */
- interesting = g_file_monitor_source_handle_event (sub->user_data, event_flags,
+ interesting = g_file_monitor_source_handle_event (sub->user_data, ih_mask_to_EventFlags (event->mask),
event->name, NULL, NULL, event->timestamp);
if (event->mask & IN_CREATE)
diff --git a/gio/inotify/inotify-path.c b/gio/inotify/inotify-path.c
index f0528f443..5110dff45 100644
--- a/gio/inotify/inotify-path.c
+++ b/gio/inotify/inotify-path.c
@@ -532,9 +532,8 @@ ip_event_callback (ik_event_t *event)
GList* dir_list = NULL;
GList *file_list = NULL;
- /* We can ignore the IGNORED events. Likewise, if the event queue overflowed,
- * there is not much we can do to recover. */
- if (event->mask & (IN_IGNORED | IN_Q_OVERFLOW))
+ /* We can ignore the IGNORED events */
+ if (event->mask & IN_IGNORED)
{
_ik_event_free (event);
return TRUE;
diff --git a/gio/kqueue/kqueue-helper.c b/gio/kqueue/kqueue-helper.c
index e7d583c8b..d4e66cd4d 100644
--- a/gio/kqueue/kqueue-helper.c
+++ b/gio/kqueue/kqueue-helper.c
@@ -97,10 +97,8 @@ convert_kqueue_events_to_gio (uint32_t flags, gboolean *done)
}
if (flags & NOTE_RENAME)
{
- /* Since there’s apparently no way to get the new name of the file out of
- * kqueue(), all we can do is say that this one has been deleted. */
*done = TRUE;
- return G_FILE_MONITOR_EVENT_DELETED;
+ return G_FILE_MONITOR_EVENT_MOVED;
}
if (flags & NOTE_REVOKE)
{
diff --git a/gio/meson.build b/gio/meson.build
index 325263626..4a10d49d7 100644
--- a/gio/meson.build
+++ b/gio/meson.build
@@ -93,6 +93,18 @@ if host_system != 'windows'
name : 'struct ip_mreqn')
glib_conf.set('HAVE_IP_MREQN', '/**/')
endif
+
+ if cc.compiles('''#include <sys/ioctl.h>
+ #include <net/if.h>
+ int main (int argc, char ** argv) {
+ struct ifreq ifr;
+ ioctl(0, SIOCGIFADDR, &ifr);
+ return 0;
+ }''',
+ name : 'ioctl with request SIOCGIFADDR')
+ glib_conf.set('HAVE_SIOCGIFADDR', '/**/')
+ endif
+
endif
network_args_string = ''
@@ -174,6 +186,7 @@ xdp_dbus_generated = custom_target('xdp-dbus',
'org.freedesktop.portal.NetworkMonitor.xml',
'org.freedesktop.portal.ProxyResolver.xml'],
output : ['xdp-dbus.h', 'xdp-dbus.c'],
+ depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-prefix', 'org.freedesktop.portal.',
'--output-directory', '@OUTDIR@',
@@ -193,6 +206,7 @@ xdp_dbus_generated = custom_target('xdp-dbus',
gdbus_daemon_generated = custom_target('gdbus-daemon-generated',
input : ['dbus-daemon.xml'],
output : ['gdbus-daemon-generated.h', 'gdbus-daemon-generated.c'],
+ depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-prefix', 'org.',
'--output-directory', '@OUTDIR@',
diff --git a/gio/tests/Makefile.am b/gio/tests/Makefile.am
index acc1da4f4..a553958e4 100644
--- a/gio/tests/Makefile.am
+++ b/gio/tests/Makefile.am
@@ -231,11 +231,29 @@ socket_client_SOURCES = \
EXTRA_DIST += socket-common.c
uninstalled_test_extra_programs += gdbus-daemon
+gdbus_daemon_SOURCES = gdbus-daemon.c
nodist_gdbus_daemon_SOURCES = \
- $(top_builddir)/gio/gdbus-daemon-generated.c
-gdbus_daemon_SOURCES = \
- gdbus-daemon.c \
- $(top_srcdir)/gio/gdbusdaemon.c
+ gdbus-daemon-generated.c \
+ gdbus-daemon-impl.c
+CLEANFILES += gdbus-daemon-impl.c gdbus-daemon-generated.c gdbus-daemon-generated.h
+
+# With subdir-objects we need to create a link to the original
+# file in the right directory, otherwise libtool will complain
+# that it cannot find the wrapper file
+gdbus-daemon-impl.c: $(top_srcdir)/gio/gdbusdaemon.c
+ $(AM_V_GEN) $(LN_S) $^ $@
+
+# These files are only generated on Windows builds inside GIO,
+# but we want them on non-Windows builds for the tests
+gdbus-daemon-generated.h gdbus-daemon-generated.c: $(top_srcdir)/gio/dbus-daemon.xml $(GDBUS_PYTHON_DEPS)
+ $(AM_V_GEN) UNINSTALLED_GLIB_SRCDIR=$(top_srcdir) \
+ UNINSTALLED_GLIB_BUILDDIR=$(top_builddir) \
+ $(PYTHON) $(top_srcdir)/gio/gdbus-2.0/codegen/gdbus-codegen.in \
+ --interface-prefix org. \
+ --generate-c-code gdbus-daemon-generated \
+ --c-namespace _G \
+ $(top_srcdir)/gio/dbus-daemon.xml \
+ $(NULL)
# -----------------------------------------------------------------------------
# Test programs buildable on UNIX only
@@ -248,7 +266,9 @@ test_programs += \
socket-address \
stream-rw_all \
unix-fd \
+ unix-mounts \
unix-streams \
+ g-file-info-filesystem-readonly \
$(NULL)
test_extra_programs += \
diff --git a/gio/tests/appinfo.c b/gio/tests/appinfo.c
index 2e69da051..190205398 100644
--- a/gio/tests/appinfo.c
+++ b/gio/tests/appinfo.c
@@ -7,8 +7,9 @@
#include <gio/gdesktopappinfo.h>
static void
-test_launch_for_app_info (GAppInfo *appinfo)
+test_launch (void)
{
+ GAppInfo *appinfo;
GError *error;
GFile *file;
GList *l;
@@ -21,6 +22,10 @@ test_launch_for_app_info (GAppInfo *appinfo)
return;
}
+ path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
+ appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
+ g_assert (appinfo != NULL);
+
error = NULL;
g_assert (g_app_info_launch (appinfo, NULL, NULL, &error));
g_assert_no_error (error);
@@ -28,7 +33,6 @@ test_launch_for_app_info (GAppInfo *appinfo)
g_assert (g_app_info_launch_uris (appinfo, NULL, NULL, &error));
g_assert_no_error (error);
- path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
file = g_file_new_for_path (path);
l = NULL;
l = g_list_append (l, file);
@@ -47,84 +51,11 @@ test_launch_for_app_info (GAppInfo *appinfo)
g_assert_no_error (error);
g_list_free (l);
g_free (uri);
-}
-
-static void
-test_launch (void)
-{
- GAppInfo *appinfo;
- const gchar *path;
- path = g_test_get_filename (G_TEST_DIST, "appinfo-test.desktop", NULL);
- appinfo = (GAppInfo*)g_desktop_app_info_new_from_filename (path);
- g_assert (appinfo != NULL);
-
- test_launch_for_app_info (appinfo);
g_object_unref (appinfo);
}
static void
-test_launch_no_app_id (void)
-{
- const gchar desktop_file_base_contents[] =
- "[Desktop Entry]\n"
- "Type=Application\n"
- "GenericName=generic-appinfo-test\n"
- "Name=appinfo-test\n"
- "Name[de]=appinfo-test-de\n"
- "X-GNOME-FullName=example\n"
- "X-GNOME-FullName[de]=Beispiel\n"
- "Comment=GAppInfo example\n"
- "Comment[de]=GAppInfo Beispiel\n"
- "Icon=testicon.svg\n"
- "Terminal=true\n"
- "StartupNotify=true\n"
- "StartupWMClass=appinfo-class\n"
- "MimeType=image/png;image/jpeg;\n"
- "Keywords=keyword1;test keyword;\n"
- "Categories=GNOME;GTK;\n";
-
- const char *exec_line_variants[] = {
- "Exec=./appinfo-test --option %U %i --name %c --filename %k %m %%",
- "Exec=./appinfo-test --option %u %i --name %c --filename %k %m %%"
- };
-
- gsize i;
-
- g_test_bug ("791337");
-
- for (i = 0; i < G_N_ELEMENTS (exec_line_variants); i++)
- {
- gchar *desktop_file_contents;
- GKeyFile *fake_desktop_file;
- GAppInfo *appinfo;
- gboolean loaded;
-
- g_test_message ("Exec line variant #%" G_GSIZE_FORMAT, i);
-
- desktop_file_contents = g_strdup_printf ("%s\n%s",
- desktop_file_base_contents,
- exec_line_variants[i]);
-
- /* We load a desktop file from memory to force the app not
- * to have an app ID, which would check different codepaths.
- */
- fake_desktop_file = g_key_file_new ();
- loaded = g_key_file_load_from_data (fake_desktop_file, desktop_file_contents, -1, G_KEY_FILE_NONE, NULL);
- g_assert_true (loaded);
-
- appinfo = (GAppInfo*)g_desktop_app_info_new_from_keyfile (fake_desktop_file);
- g_assert (appinfo != NULL);
-
- test_launch_for_app_info (appinfo);
-
- g_free (desktop_file_contents);
- g_object_unref (appinfo);
- g_key_file_unref (fake_desktop_file);
- }
-}
-
-static void
test_locale (const char *locale)
{
GAppInfo *appinfo;
@@ -549,7 +480,6 @@ main (int argc, char *argv[])
g_setenv ("XDG_CURRENT_DESKTOP", "GNOME", TRUE);
g_test_init (&argc, &argv, NULL);
- g_test_bug_base ("https://bugzilla.gnome.org/show_bug.cgi?id=");
/* With Meson build we need to change into right directory, so that the
* appinfo-test binary can be found. */
@@ -560,7 +490,6 @@ main (int argc, char *argv[])
g_test_add_func ("/appinfo/basic", test_basic);
g_test_add_func ("/appinfo/text", test_text);
g_test_add_func ("/appinfo/launch", test_launch);
- g_test_add_func ("/appinfo/launch/no-appid", test_launch_no_app_id);
g_test_add_func ("/appinfo/show-in", test_show_in);
g_test_add_func ("/appinfo/commandline", test_commandline);
g_test_add_func ("/appinfo/launch-context", test_launch_context);
diff --git a/gio/tests/contenttype.c b/gio/tests/contenttype.c
index 1acbd776f..2424b8e5f 100644
--- a/gio/tests/contenttype.c
+++ b/gio/tests/contenttype.c
@@ -56,6 +56,8 @@ test_guess (void)
g_free (res);
g_free (expected);
+ /* Sadly OSX just doesn't have as large and robust of a mime type database as Linux */
+#ifndef __APPLE__
res = g_content_type_guess ("foo", data, sizeof (data) - 1, &uncertain);
expected = g_content_type_from_mime_type ("text/plain");
g_assert_content_type_equals (expected, res);
@@ -63,8 +65,6 @@ test_guess (void)
g_free (res);
g_free (expected);
-/* Sadly OSX just doesn't have as large and robust of a mime type database as Linux */
-#ifndef __APPLE__
res = g_content_type_guess ("foo.desktop", data, sizeof (data) - 1, &uncertain);
expected = g_content_type_from_mime_type ("application/x-desktop");
g_assert_content_type_equals (expected, res);
@@ -110,6 +110,7 @@ test_guess (void)
g_assert (!uncertain);
g_free (res);
g_free (expected);
+#endif
res = g_content_type_guess (NULL, (guchar *)"%!PS-Adobe-2.0 EPSF-1.2", 23, &uncertain);
expected = g_content_type_from_mime_type ("image/x-eps");
@@ -117,7 +118,6 @@ test_guess (void)
g_assert (!uncertain);
g_free (res);
g_free (expected);
-#endif
}
static void
@@ -233,8 +233,12 @@ test_icon (void)
const gchar *const *names;
names = g_themed_icon_get_names (G_THEMED_ICON (icon));
+#ifdef __APPLE__
+ g_assert (g_strv_contains (names, "text-*"));
+#else
g_assert (g_strv_contains (names, "text-plain"));
g_assert (g_strv_contains (names, "text-x-generic"));
+#endif
}
g_object_unref (icon);
g_free (type);
@@ -248,7 +252,9 @@ test_icon (void)
names = g_themed_icon_get_names (G_THEMED_ICON (icon));
g_assert (g_strv_contains (names, "application-rtf"));
+#ifndef __APPLE__
g_assert (g_strv_contains (names, "x-office-document"));
+#endif
}
g_object_unref (icon);
g_free (type);
@@ -269,10 +275,15 @@ test_symbolic_icon (void)
const gchar *const *names;
names = g_themed_icon_get_names (G_THEMED_ICON (icon));
+#ifdef __APPLE__
+ g_assert (g_strv_contains (names, "text-*-symbolic"));
+ g_assert (g_strv_contains (names, "text-*"));
+#else
g_assert (g_strv_contains (names, "text-plain-symbolic"));
g_assert (g_strv_contains (names, "text-x-generic-symbolic"));
g_assert (g_strv_contains (names, "text-plain"));
g_assert (g_strv_contains (names, "text-x-generic"));
+#endif
}
g_object_unref (icon);
g_free (type);
@@ -286,9 +297,11 @@ test_symbolic_icon (void)
names = g_themed_icon_get_names (G_THEMED_ICON (icon));
g_assert (g_strv_contains (names, "application-rtf-symbolic"));
- g_assert (g_strv_contains (names, "x-office-document-symbolic"));
g_assert (g_strv_contains (names, "application-rtf"));
+#ifndef __APPLE__
+ g_assert (g_strv_contains (names, "x-office-document-symbolic"));
g_assert (g_strv_contains (names, "x-office-document"));
+#endif
}
g_object_unref (icon);
g_free (type);
@@ -334,8 +347,60 @@ test_type_is_a_special_case (void)
/* Everything but the inode type is application/octet-stream */
res = g_content_type_is_a ("inode/directory", "application/octet-stream");
g_assert_false (res);
+#ifndef __APPLE__
res = g_content_type_is_a ("anything", "application/octet-stream");
g_assert_true (res);
+#endif
+}
+
+static void
+test_guess_svg_from_data (void)
+{
+ const gchar svgfilecontent[] = "<svg xmlns=\"http://www.w3.org/2000/svg\"\
+ xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n\
+ <rect x=\"10\" y=\"10\" height=\"100\" width=\"100\"\n\
+ style=\"stroke:#ff0000; fill: #0000ff\"/>\n\
+</svg>\n";
+
+ gboolean uncertain = TRUE;
+ gchar *res = g_content_type_guess (NULL, (guchar *)svgfilecontent,
+ sizeof (svgfilecontent) - 1, &uncertain);
+#ifdef __APPLE__
+ g_assert_cmpstr (res, ==, "public.svg-image");
+#elif defined(G_OS_WIN32)
+ g_test_skip ("svg type detection from content is not implemented on WIN32");
+#else
+ g_assert_cmpstr (res, ==, "image/svg+xml");
+#endif
+ g_assert_false (uncertain);
+ g_free (res);
+}
+
+static void
+test_mime_from_content (void)
+{
+#ifdef __APPLE__
+ gchar *mime_type;
+ mime_type = g_content_type_get_mime_type ("com.microsoft.bmp");
+ g_assert_cmpstr (mime_type, ==, "image/bmp");
+ g_free (mime_type);
+ mime_type = g_content_type_get_mime_type ("com.compuserve.gif");
+ g_assert_cmpstr (mime_type, ==, "image/gif");
+ g_free (mime_type);
+ mime_type = g_content_type_get_mime_type ("public.png");
+ g_assert_cmpstr (mime_type, ==, "image/png");
+ g_free (mime_type);
+ mime_type = g_content_type_get_mime_type ("public.text");
+ g_assert_cmpstr (mime_type, ==, "text/*");
+ g_free (mime_type);
+ mime_type = g_content_type_get_mime_type ("public.svg-image");
+ g_assert_cmpstr (mime_type, ==, "image/svg+xml");
+ g_free (mime_type);
+#elif defined(G_OS_WIN32)
+ g_test_skip ("mime from content type test not implemented on WIN32");
+#else
+ g_test_skip ("mime from content type test not implemented on UNIX");
+#endif
}
int
@@ -346,6 +411,8 @@ main (int argc, char *argv[])
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/contenttype/guess", test_guess);
+ g_test_add_func ("/contenttype/guess_svg_from_data", test_guess_svg_from_data);
+ g_test_add_func ("/contenttype/mime_from_content", test_mime_from_content);
g_test_add_func ("/contenttype/unknown", test_unknown);
g_test_add_func ("/contenttype/subtype", test_subtype);
g_test_add_func ("/contenttype/list", test_list);
diff --git a/gio/tests/dbus-launch.c b/gio/tests/dbus-launch.c
index 5eeb1c0c0..90d8d069e 100644
--- a/gio/tests/dbus-launch.c
+++ b/gio/tests/dbus-launch.c
@@ -38,7 +38,7 @@ write_all (const void *ptr,
while (len > 0)
{
- ssize_t done = write (STDOUT_FILENO, p, len);
+ gssize done = write (STDOUT_FILENO, p, len);
int errsv = errno;
if (done == 0)
diff --git a/gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop b/gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop
index 97fe69dcc..83976e027 100644
--- a/gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop
+++ b/gio/tests/desktop-files/home/applications/epiphany-weather-for-toronto-island-9c6a4e022b17686306243dada811d550d25eb1fb.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Name=Weather for Toronto Island
-Exec=/bin/true
+Exec=true
StartupNotify=true
Terminal=false
Type=Application
diff --git a/gio/tests/file.c b/gio/tests/file.c
index 779183791..cf2aae253 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -8,27 +8,47 @@
#endif
static void
-test_basic (void)
+test_basic_for_file (GFile *file,
+ const gchar *suffix)
{
- GFile *file;
gchar *s;
- file = g_file_new_for_path ("./some/directory/testfile");
-
s = g_file_get_basename (file);
g_assert_cmpstr (s, ==, "testfile");
g_free (s);
s = g_file_get_uri (file);
g_assert (g_str_has_prefix (s, "file://"));
- g_assert (g_str_has_suffix (s, "/some/directory/testfile"));
+ g_assert (g_str_has_suffix (s, suffix));
g_free (s);
g_assert (g_file_has_uri_scheme (file, "file"));
s = g_file_get_uri_scheme (file);
g_assert_cmpstr (s, ==, "file");
g_free (s);
+}
+
+static void
+test_basic (void)
+{
+ GFile *file;
+ file = g_file_new_for_path ("./some/directory/testfile");
+ test_basic_for_file (file, "/some/directory/testfile");
+ g_object_unref (file);
+}
+
+static void
+test_build_filename (void)
+{
+ GFile *file;
+
+ file = g_file_new_build_filename (".", "some", "directory", "testfile", NULL);
+ test_basic_for_file (file, "/some/directory/testfile");
+ g_object_unref (file);
+
+ file = g_file_new_build_filename ("testfile", NULL);
+ test_basic_for_file (file, "/testfile");
g_object_unref (file);
}
@@ -466,7 +486,7 @@ test_create_delete (gconstpointer d)
data->loop = g_main_loop_new (NULL, FALSE);
- data->timeout = g_timeout_add (5000, stop_timeout, NULL);
+ data->timeout = g_timeout_add (10000, stop_timeout, NULL);
g_file_create_async (data->file, 0, 0, NULL, created_cb, data);
@@ -1043,6 +1063,91 @@ test_measure_async (void)
measure_done, data);
}
+static void
+test_load_bytes (void)
+{
+ gchar filename[] = "g_file_load_bytes_XXXXXX";
+ GError *error = NULL;
+ GBytes *bytes;
+ GFile *file;
+ int len;
+ int fd;
+ int ret;
+
+ fd = g_mkstemp (filename);
+ g_assert_cmpint (fd, !=, -1);
+ len = strlen ("test_load_bytes");
+ ret = write (fd, "test_load_bytes", len);
+ g_assert_cmpint (ret, ==, len);
+ close (fd);
+
+ file = g_file_new_for_path (filename);
+ bytes = g_file_load_bytes (file, NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (bytes != NULL);
+ g_assert_cmpint (len, ==, g_bytes_get_size (bytes));
+ g_assert_cmpstr ("test_load_bytes", ==, (gchar *)g_bytes_get_data (bytes, NULL));
+
+ g_file_delete (file, NULL, NULL);
+
+ g_bytes_unref (bytes);
+ g_object_unref (file);
+}
+
+typedef struct
+{
+ GMainLoop *main_loop;
+ GFile *file;
+ GBytes *bytes;
+} LoadBytesAsyncData;
+
+static void
+test_load_bytes_cb (GObject *object,
+ GAsyncResult *result,
+ gpointer user_data)
+{
+ GFile *file = G_FILE (object);
+ LoadBytesAsyncData *data = user_data;
+ GError *error = NULL;
+
+ data->bytes = g_file_load_bytes_finish (file, result, NULL, &error);
+ g_assert_no_error (error);
+ g_assert (data->bytes != NULL);
+
+ g_main_loop_quit (data->main_loop);
+}
+
+static void
+test_load_bytes_async (void)
+{
+ LoadBytesAsyncData data = { 0 };
+ gchar filename[] = "g_file_load_bytes_XXXXXX";
+ int len;
+ int fd;
+ int ret;
+
+ fd = g_mkstemp (filename);
+ g_assert_cmpint (fd, !=, -1);
+ len = strlen ("test_load_bytes_async");
+ ret = write (fd, "test_load_bytes_async", len);
+ g_assert_cmpint (ret, ==, len);
+ close (fd);
+
+ data.main_loop = g_main_loop_new (NULL, FALSE);
+ data.file = g_file_new_for_path (filename);
+
+ g_file_load_bytes_async (data.file, NULL, test_load_bytes_cb, &data);
+ g_main_loop_run (data.main_loop);
+
+ g_assert_cmpint (len, ==, g_bytes_get_size (data.bytes));
+ g_assert_cmpstr ("test_load_bytes_async", ==, (gchar *)g_bytes_get_data (data.bytes, NULL));
+
+ g_file_delete (data.file, NULL, NULL);
+ g_object_unref (data.file);
+ g_bytes_unref (data.bytes);
+ g_main_loop_unref (data.main_loop);
+}
+
int
main (int argc, char *argv[])
{
@@ -1051,6 +1156,7 @@ main (int argc, char *argv[])
g_test_bug_base ("http://bugzilla.gnome.org/");
g_test_add_func ("/file/basic", test_basic);
+ g_test_add_func ("/file/build-filename", test_build_filename);
g_test_add_func ("/file/parent", test_parent);
g_test_add_func ("/file/child", test_child);
g_test_add_func ("/file/type", test_type);
@@ -1068,6 +1174,8 @@ main (int argc, char *argv[])
#endif
g_test_add_func ("/file/measure", test_measure);
g_test_add_func ("/file/measure-async", test_measure_async);
+ g_test_add_func ("/file/load-bytes", test_load_bytes);
+ g_test_add_func ("/file/load-bytes-async", test_load_bytes_async);
return g_test_run ();
}
diff --git a/gio/tests/g-file-info-filesystem-readonly.c b/gio/tests/g-file-info-filesystem-readonly.c
new file mode 100644
index 000000000..9a185b081
--- /dev/null
+++ b/gio/tests/g-file-info-filesystem-readonly.c
@@ -0,0 +1,176 @@
+/* Testcase for bug in GIO function g_file_query_filesystem_info()
+ * Author: Nelson Benítez León
+ *
+ * This work is provided "as is"; redistribution and modification
+ * in whole or in part, in any medium, physical or electronic is
+ * permitted without restriction.
+ *
+ * This work is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * In no event shall the authors or contributors be liable for any
+ * direct, indirect, incidental, special, exemplary, or consequential
+ * damages (including, but not limited to, procurement of substitute
+ * goods or services; loss of use, data, or profits; or business
+ * interruption) however caused and on any theory of liability, whether
+ * in contract, strict liability, or tort (including negligence or
+ * otherwise) arising in any way out of the use of this software, even
+ * if advised of the possibility of such damage.
+ */
+
+#include <glib.h>
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+#include <gio/gunixmounts.h>
+
+static void
+test_filesystem_readonly (gconstpointer with_mount_monitor)
+{
+ GFileInfo *file_info;
+ GFile *mounted_file;
+ GUnixMountMonitor *mount_monitor;
+ gchar *bindfs, *fusermount;
+ gchar *command_mount, *command_mount_ro, *command_umount;
+ gchar *curdir, *dir_to_mount, *dir_mountpoint;
+ gchar *file_in_mount, *file_in_mountpoint;
+
+ /* installed by package 'bindfs' in Fedora */
+ bindfs = g_find_program_in_path ("bindfs");
+
+ /* installed by package 'fuse' in Fedora */
+ fusermount = g_find_program_in_path ("fusermount");
+
+ if (bindfs == NULL || fusermount == NULL)
+ {
+ /* We need these because "mount --bind" requires root privileges */
+ g_test_skip ("'bindfs' and 'fusermount' commands are needed to run this test");
+ return;
+ }
+
+ curdir = g_get_current_dir ();
+ dir_to_mount = g_strdup_printf ("%s/dir_bindfs_to_mount", curdir);
+ file_in_mount = g_strdup_printf ("%s/example.txt", dir_to_mount);
+ dir_mountpoint = g_strdup_printf ("%s/dir_bindfs_mountpoint", curdir);
+
+ g_mkdir (dir_to_mount, 0777);
+ g_mkdir (dir_mountpoint, 0777);
+ if (! g_file_set_contents (file_in_mount, "Example", -1, NULL))
+ {
+ g_test_skip ("Failed to create file needed to proceed further with the test");
+ return;
+ }
+
+ if (with_mount_monitor)
+ {
+ mount_monitor = g_unix_mount_monitor_get ();
+ }
+
+ /* Use bindfs, which does not need root privileges, to mount the contents of one dir
+ * into another dir (and do the mount as readonly as per passed '-o ro' option) */
+ command_mount_ro = g_strdup_printf ("%s -n -o ro '%s' '%s'", bindfs, dir_to_mount, dir_mountpoint);
+ g_spawn_command_line_sync (command_mount_ro, NULL, NULL, NULL, NULL);
+
+ /* Let's check now, that the file is in indeed in a readonly filesystem */
+ file_in_mountpoint = g_strdup_printf ("%s/example.txt", dir_mountpoint);
+ mounted_file = g_file_new_for_path (file_in_mountpoint);
+
+ if (with_mount_monitor)
+ {
+ /* Let UnixMountMonitor process its 'mounts-changed'
+ * signal triggered by mount operation above */
+ while (g_main_context_iteration (NULL, FALSE));
+ }
+
+ file_info = g_file_query_filesystem_info (mounted_file,
+ G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, NULL, NULL);
+ if (! g_file_info_get_attribute_boolean (file_info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY))
+ {
+ g_test_skip ("Failed to create readonly file needed to proceed further with the test");
+ return;
+ }
+
+ /* Now we unmount, and mount again but this time rw (not readonly) */
+ command_umount = g_strdup_printf ("%s -u '%s'", fusermount, dir_mountpoint);
+ g_spawn_command_line_sync (command_umount, NULL, NULL, NULL, NULL);
+ command_mount = g_strdup_printf ("%s -n '%s' '%s'", bindfs, dir_to_mount, dir_mountpoint);
+ g_spawn_command_line_sync (command_mount, NULL, NULL, NULL, NULL);
+
+ if (with_mount_monitor)
+ {
+ /* Let UnixMountMonitor process its 'mounts-changed' signal
+ * triggered by mount/umount operations above */
+ while (g_main_context_iteration (NULL, FALSE));
+ }
+
+ /* Now let's test if GIO will report the new filesystem state */
+ g_clear_object (&file_info);
+ g_clear_object (&mounted_file);
+ mounted_file = g_file_new_for_path (file_in_mountpoint);
+ file_info = g_file_query_filesystem_info (mounted_file,
+ G_FILE_ATTRIBUTE_FILESYSTEM_READONLY, NULL, NULL);
+
+ if (g_file_info_get_attribute_boolean (file_info, G_FILE_ATTRIBUTE_FILESYSTEM_READONLY))
+ {
+ /* ¡¡ GIO still reports filesystem as being Readonly !!
+ * Let's check if that's true by trying to write to file */
+ GFileOutputStream *write_stream;
+ write_stream = g_file_append_to (mounted_file, G_FILE_CREATE_NONE, NULL, NULL);
+ if (write_stream != NULL)
+ {
+ /* The file has been opened for writing without error, so ¡¡ GIO IS WRONG !! */
+ g_object_unref (write_stream);
+ g_test_fail (); /* Marking test as FAILED */
+ }
+ }
+
+ /* Clean up */
+ if (with_mount_monitor)
+ g_clear_object (&mount_monitor);
+
+ g_clear_object (&file_info);
+ g_clear_object (&mounted_file);
+ g_spawn_command_line_sync (command_umount, NULL, NULL, NULL, NULL); /* unmount */
+
+ g_remove (file_in_mount);
+ g_remove (dir_to_mount);
+ g_remove (dir_mountpoint);
+
+ g_free (bindfs);
+ g_free (fusermount);
+ g_free (curdir);
+ g_free (dir_to_mount);
+ g_free (dir_mountpoint);
+ g_free (command_mount);
+ g_free (command_mount_ro);
+ g_free (command_umount);
+ g_free (file_in_mount);
+ g_free (file_in_mountpoint);
+}
+
+int
+main (int argc, char *argv[])
+{
+ /* To avoid unnecessary D-Bus calls, see http://goo.gl/ir56j2 */
+ g_setenv ("GIO_USE_VFS", "local", FALSE);
+
+ g_test_init (&argc, &argv, NULL);
+
+ g_test_bug_base ("http://bugzilla.gnome.org/");
+ g_test_bug ("787731");
+
+ g_test_add_data_func ("/g-file-info-filesystem-readonly/test-fs-ro",
+ GINT_TO_POINTER (FALSE), test_filesystem_readonly);
+
+ /* This second test is using a running GUnixMountMonitor, so the calls to:
+ * g_unix_mount_get(&time_read) - To fill the time_read parameter
+ * g_unix_mounts_changed_since()
+ *
+ * made from inside g_file_query_filesystem_info() will use the mount_poller_time
+ * from the monitoring of /proc/self/mountinfo , while in the previous test new
+ * created timestamps are returned from those g_unix_mount* functions. */
+ g_test_add_data_func ("/g-file-info-filesystem-readonly/test-fs-ro-with-mount-monitor",
+ GINT_TO_POINTER (TRUE), test_filesystem_readonly);
+
+ return g_test_run ();
+}
diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c
index 7ed874a03..5b3def91c 100644
--- a/gio/tests/g-file-info.c
+++ b/gio/tests/g-file-info.c
@@ -20,10 +20,18 @@
* if advised of the possibility of such damage.
*/
+#include "config.h"
+
#include <glib/glib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
+#ifdef G_OS_WIN32
+#include <stdio.h>
+#include <glib/gstdio.h>
+#include <Windows.h>
+#include <Shlobj.h>
+#endif
#define TEST_NAME "Prilis zlutoucky kun"
#define TEST_DISPLAY_NAME "UTF-8 p\xc5\x99\xc3\xadli\xc5\xa1 \xc5\xbelu\xc5\xa5ou\xc4\x8dk\xc3\xbd k\xc5\xaf\xc5\x88"
@@ -132,6 +140,362 @@ test_g_file_info (void)
g_object_unref (info_copy);
}
+#ifdef G_OS_WIN32
+static void
+test_internal_enhanced_stdio (void)
+{
+ char *p0, *p1, *ps;
+ gboolean try_sparse;
+ gchar *tmp_dir_root;
+ wchar_t *tmp_dir_root_w;
+ gchar *c;
+ DWORD fsflags;
+ FILE *f;
+ SYSTEMTIME st;
+ FILETIME ft;
+ HANDLE h;
+ GStatBuf statbuf_p0, statbuf_p1, statbuf_ps;
+ GFile *gf_p0, *gf_p1, *gf_ps;
+ GFileInfo *fi_p0, *fi_p1, *fi_ps;
+ guint64 size_p0, alsize_p0, size_ps, alsize_ps;
+ const gchar *id_p0;
+ const gchar *id_p1;
+ volatile guint64 time_p0;
+ gchar *tmp_dir;
+ wchar_t *programdata_dir_w;
+ wchar_t *users_dir_w;
+ static const GUID folder_id_programdata =
+ { 0x62AB5D82, 0xFDC1, 0x4DC3, { 0xA9, 0xDD, 0x07, 0x0D, 0x1D, 0x49, 0x5D, 0x97 } };
+ static const GUID folder_id_users =
+ { 0x0762D272, 0xC50A, 0x4BB0, { 0xA3, 0x82, 0x69, 0x7D, 0xCD, 0x72, 0x9B, 0x80 } };
+
+ programdata_dir_w = NULL;
+ SHGetKnownFolderPath (&folder_id_programdata, 0, NULL, &programdata_dir_w);
+
+ users_dir_w = NULL;
+ SHGetKnownFolderPath (&folder_id_users, 0, NULL, &users_dir_w);
+
+ if (programdata_dir_w != NULL && users_dir_w != NULL)
+ {
+ gchar *programdata;
+ gchar *users_dir;
+ gchar *allusers;
+ GFile *gf_programdata, *gf_allusers;
+ GFileInfo *fi_programdata, *fi_allusers, *fi_allusers_target;
+ GFileType ft_allusers;
+ GFileType ft_allusers_target;
+ GFileType ft_programdata;
+ gboolean allusers_is_symlink;
+ const gchar *id_allusers;
+ const gchar *id_allusers_target;
+ const gchar *id_programdata;
+ const gchar *allusers_target;
+
+ /* C:/ProgramData */
+ programdata = g_utf16_to_utf8 (programdata_dir_w, -1, NULL, NULL, NULL);
+ g_assert_nonnull (programdata);
+ /* C:/Users */
+ users_dir = g_utf16_to_utf8 (users_dir_w, -1, NULL, NULL, NULL);
+ g_assert_nonnull (users_dir);
+ /* "C:/Users/All Users" is a known directory symlink
+ * for "C:/ProgramData".
+ */
+ allusers = g_build_filename (users_dir, "All Users", NULL);
+ g_assert_nonnull (allusers);
+
+ /* We don't test g_stat() and g_lstat() on these directories,
+ * because it is pointless - there's no way to tell that these
+ * functions behave correctly in this case
+ * (st_ino is useless, so we can't tell apart g_stat() and g_lstat()
+ * results; st_mode is also useless as it does not support S_ISLNK;
+ * and these directories have no interesting properties other
+ * than [not] being symlinks).
+ */
+ gf_programdata = g_file_new_for_path (programdata);
+ gf_allusers = g_file_new_for_path (allusers);
+
+ fi_programdata = g_file_query_info (gf_programdata,
+ G_FILE_ATTRIBUTE_ID_FILE ","
+ G_FILE_ATTRIBUTE_STANDARD_TYPE,
+ G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
+
+ fi_allusers_target = g_file_query_info (gf_allusers,
+ G_FILE_ATTRIBUTE_ID_FILE ","
+ G_FILE_ATTRIBUTE_STANDARD_TYPE,
+ G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
+
+ fi_allusers = g_file_query_info (gf_allusers,
+ G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET ","
+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK ","
+ G_FILE_ATTRIBUTE_ID_FILE ","
+ G_FILE_ATTRIBUTE_STANDARD_TYPE,
+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+ NULL, NULL);
+
+ g_assert (g_file_info_has_attribute (fi_programdata, G_FILE_ATTRIBUTE_ID_FILE));
+ g_assert (g_file_info_has_attribute (fi_programdata, G_FILE_ATTRIBUTE_STANDARD_TYPE));
+
+ g_assert (g_file_info_has_attribute (fi_allusers_target, G_FILE_ATTRIBUTE_ID_FILE));
+ g_assert (g_file_info_has_attribute (fi_allusers_target, G_FILE_ATTRIBUTE_STANDARD_TYPE));
+
+ g_assert (g_file_info_has_attribute (fi_allusers, G_FILE_ATTRIBUTE_ID_FILE));
+ g_assert (g_file_info_has_attribute (fi_allusers, G_FILE_ATTRIBUTE_STANDARD_TYPE));
+ g_assert (g_file_info_has_attribute (fi_allusers, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK));
+ g_assert (g_file_info_has_attribute (fi_allusers, G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET));
+
+ ft_allusers = g_file_info_get_file_type (fi_allusers);
+ ft_allusers_target = g_file_info_get_file_type (fi_allusers_target);
+ ft_programdata = g_file_info_get_file_type (fi_programdata);
+
+ g_assert (ft_allusers == G_FILE_TYPE_SYMBOLIC_LINK);
+ g_assert (ft_allusers_target == G_FILE_TYPE_DIRECTORY);
+ g_assert (ft_programdata == G_FILE_TYPE_DIRECTORY);
+
+ allusers_is_symlink = g_file_info_get_attribute_boolean (fi_allusers, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
+
+ g_assert_true (allusers_is_symlink);
+
+ id_allusers = g_file_info_get_attribute_string (fi_allusers, G_FILE_ATTRIBUTE_ID_FILE);
+ id_allusers_target = g_file_info_get_attribute_string (fi_allusers_target, G_FILE_ATTRIBUTE_ID_FILE);
+ id_programdata = g_file_info_get_attribute_string (fi_programdata, G_FILE_ATTRIBUTE_ID_FILE);
+
+ g_assert_cmpstr (id_allusers_target, ==, id_programdata);
+ g_assert_cmpstr (id_allusers, !=, id_programdata);
+
+ allusers_target = g_file_info_get_symlink_target (fi_allusers);
+
+ g_assert_true (g_str_has_suffix (allusers_target, "ProgramData"));
+
+ g_object_unref (fi_allusers);
+ g_object_unref (fi_allusers_target);
+ g_object_unref (fi_programdata);
+ g_object_unref (gf_allusers);
+ g_object_unref (gf_programdata);
+
+ g_free (allusers);
+ g_free (users_dir);
+ g_free (programdata);
+ }
+
+ if (programdata_dir_w)
+ CoTaskMemFree (programdata_dir_w);
+
+ if (users_dir_w)
+ CoTaskMemFree (users_dir_w);
+
+ tmp_dir = g_dir_make_tmp ("glib_stdio_testXXXXXX", NULL);
+ g_assert_nonnull (tmp_dir);
+
+ /* Technically, this isn't necessary - we already assume NTFS, because of
+ * symlink support, and NTFS also supports sparse files. Still, given
+ * the amount of unusual I/O APIs called in this test, checking for
+ * sparse file support of the filesystem where temp directory is
+ * doesn't seem to be out of place.
+ */
+ try_sparse = FALSE;
+ tmp_dir_root = g_strdup (tmp_dir);
+ /* We need "C:\\" or "C:/", with a trailing [back]slash */
+ for (c = tmp_dir_root; c && c[0] && c[1]; c++)
+ if (c[0] == ':')
+ {
+ c[2] = '\0';
+ break;
+ }
+ tmp_dir_root_w = g_utf8_to_utf16 (tmp_dir_root, -1, NULL, NULL, NULL);
+ g_assert_nonnull (tmp_dir_root_w);
+ g_free (tmp_dir_root);
+ g_assert_true (GetVolumeInformationW (tmp_dir_root_w, NULL, 0, NULL, NULL, &fsflags, NULL, 0));
+ g_free (tmp_dir_root_w);
+ try_sparse = (fsflags & FILE_SUPPORTS_SPARSE_FILES) == FILE_SUPPORTS_SPARSE_FILES;
+
+ p0 = g_build_filename (tmp_dir, "zool", NULL);
+ p1 = g_build_filename (tmp_dir, "looz", NULL);
+ ps = g_build_filename (tmp_dir, "sparse", NULL);
+
+ if (try_sparse)
+ {
+ FILE_SET_SPARSE_BUFFER ssb;
+ FILE_ZERO_DATA_INFORMATION zdi;
+
+ g_remove (ps);
+
+ f = g_fopen (ps, "wb");
+ g_assert_nonnull (f);
+
+ h = (HANDLE) _get_osfhandle (fileno (f));
+ g_assert (h != INVALID_HANDLE_VALUE);
+
+ ssb.SetSparse = TRUE;
+ g_assert_true (DeviceIoControl (h,
+ FSCTL_SET_SPARSE,
+ &ssb, sizeof (ssb),
+ NULL, 0, NULL, NULL));
+
+ /* Make it a sparse file that starts with 4GBs of zeros */
+ zdi.FileOffset.QuadPart = 0;
+ zdi.BeyondFinalZero.QuadPart = 0xFFFFFFFFULL + 1;
+ g_assert_true (DeviceIoControl (h,
+ FSCTL_SET_ZERO_DATA,
+ &zdi, sizeof (zdi),
+ NULL, 0, NULL, NULL));
+
+ /* Let's not keep this seemingly 4GB monster around
+ * longer than we absolutely need to. Do all operations
+ * without assertions, then remove the file immediately.
+ */
+ _fseeki64 (f, 0xFFFFFFFFULL, SEEK_SET);
+ fprintf (f, "Hello 4GB World!");
+ fflush (f);
+ fclose (f);
+
+ memset (&statbuf_ps, 0, sizeof (statbuf_ps));
+
+ g_stat (ps, &statbuf_ps);
+
+ gf_ps = g_file_new_for_path (ps);
+
+ fi_ps = g_file_query_info (gf_ps,
+ G_FILE_ATTRIBUTE_STANDARD_SIZE ","
+ G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE,
+ G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
+
+ g_remove (ps);
+
+ g_assert (g_file_info_has_attribute (fi_ps, G_FILE_ATTRIBUTE_STANDARD_SIZE));
+ g_assert (g_file_info_has_attribute (fi_ps, G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE));
+
+ size_ps = g_file_info_get_attribute_uint64 (fi_ps, G_FILE_ATTRIBUTE_STANDARD_SIZE);
+ alsize_ps = g_file_info_get_attribute_uint64 (fi_ps, G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE);
+
+ /* allocated size should small (usually - size of the FS cluster,
+ * let's assume it's less than 1 gigabyte),
+ * size should be more than 4 gigabytes,
+ * st_size should not exceed its 0xFFFFFFFF 32-bit limit,
+ * and should be nonzero (this also detects a failed g_stat() earlier).
+ */
+ g_assert_cmpuint (alsize_ps, <, 0x40000000);
+ g_assert_cmpuint (size_ps, >, G_GUINT64_CONSTANT (0xFFFFFFFF));
+ g_assert_cmpuint (statbuf_ps.st_size, >, 0);
+ g_assert_cmpuint (statbuf_ps.st_size, <=, 0xFFFFFFFF);
+
+ g_object_unref (fi_ps);
+ g_object_unref (gf_ps);
+ }
+
+ /* Wa-a-ay past 02/07/2106 @ 6:28am (UTC),
+ * which is the date corresponding to 0xFFFFFFFF + 1.
+ * This is easier to check than Y2038 (0x80000000 + 1),
+ * since there's no need to worry about signedness this way.
+ */
+ st.wYear = 2106;
+ st.wMonth = 2;
+ st.wDay = 9;
+ st.wHour = 0;
+ st.wMinute = 0;
+ st.wSecond = 0;
+ st.wMilliseconds = 0;
+
+ g_assert_true (SystemTimeToFileTime (&st, &ft));
+
+ f = g_fopen (p0, "w");
+ g_assert_nonnull (f);
+
+ h = (HANDLE) _get_osfhandle (fileno (f));
+ g_assert (h != INVALID_HANDLE_VALUE);
+
+ fprintf (f, "1");
+ fflush (f);
+
+ g_assert_true (SetFileTime (h, &ft, &ft, &ft));
+
+ fclose (f);
+
+ f = g_fopen (p1, "w");
+ g_assert_nonnull (f);
+
+ fclose (f);
+
+ memset (&statbuf_p0, 0, sizeof (statbuf_p0));
+ memset (&statbuf_p1, 0, sizeof (statbuf_p1));
+
+ g_assert_cmpint (g_stat (p0, &statbuf_p0), ==, 0);
+ g_assert_cmpint (g_stat (p1, &statbuf_p1), ==, 0);
+
+ gf_p0 = g_file_new_for_path (p0);
+ gf_p1 = g_file_new_for_path (p1);
+
+ fi_p0 = g_file_query_info (gf_p0,
+ G_FILE_ATTRIBUTE_STANDARD_SIZE ","
+ G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE ","
+ G_FILE_ATTRIBUTE_ID_FILE ","
+ G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
+
+ fi_p1 = g_file_query_info (gf_p1,
+ G_FILE_ATTRIBUTE_STANDARD_SIZE ","
+ G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE ","
+ G_FILE_ATTRIBUTE_ID_FILE ","
+ G_FILE_ATTRIBUTE_TIME_MODIFIED,
+ G_FILE_QUERY_INFO_NONE,
+ NULL, NULL);
+
+ g_assert (g_file_info_has_attribute (fi_p0, G_FILE_ATTRIBUTE_STANDARD_SIZE));
+ g_assert (g_file_info_has_attribute (fi_p0, G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE));
+ g_assert (g_file_info_has_attribute (fi_p0, G_FILE_ATTRIBUTE_ID_FILE));
+ g_assert (g_file_info_has_attribute (fi_p0, G_FILE_ATTRIBUTE_TIME_MODIFIED));
+
+ g_assert (g_file_info_has_attribute (fi_p1, G_FILE_ATTRIBUTE_STANDARD_SIZE));
+ g_assert (g_file_info_has_attribute (fi_p1, G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE));
+ g_assert (g_file_info_has_attribute (fi_p1, G_FILE_ATTRIBUTE_ID_FILE));
+ g_assert (g_file_info_has_attribute (fi_p1, G_FILE_ATTRIBUTE_TIME_MODIFIED));
+
+ size_p0 = g_file_info_get_attribute_uint64 (fi_p0, G_FILE_ATTRIBUTE_STANDARD_SIZE);
+ alsize_p0 = g_file_info_get_attribute_uint64 (fi_p0, G_FILE_ATTRIBUTE_STANDARD_ALLOCATED_SIZE);
+
+ /* size should be 1, allocated size should be something else
+ * (could be 0 or the size of the FS cluster, but never 1).
+ */
+ g_assert_cmpuint (size_p0, ==, statbuf_p0.st_size);
+ g_assert_cmpuint (size_p0, ==, 1);
+ g_assert_cmpuint (alsize_p0, !=, size_p0);
+
+ id_p0 = g_file_info_get_attribute_string (fi_p0, G_FILE_ATTRIBUTE_ID_FILE);
+ id_p1 = g_file_info_get_attribute_string (fi_p1, G_FILE_ATTRIBUTE_ID_FILE);
+
+ /* st_ino from W32 stat() is useless for file identification.
+ * It will be either 0, or it will be the same for both files.
+ */
+ g_assert (statbuf_p0.st_ino == statbuf_p1.st_ino);
+ g_assert_cmpstr (id_p0, !=, id_p1);
+
+ time_p0 = g_file_info_get_attribute_uint64 (fi_p0, G_FILE_ATTRIBUTE_TIME_MODIFIED);
+
+ /* Check that GFileInfo doesn't suffer from Y2106 problem.
+ * Don't check stat(), as its contents may vary depending on
+ * the host platform architecture
+ * (time fields are 32-bit on 32-bit Windows,
+ * and 64-bit on 64-bit Windows, usually),
+ * so it *can* pass this test in some cases.
+ */
+ g_assert (time_p0 > G_GUINT64_CONSTANT (0xFFFFFFFF));
+
+ g_object_unref (fi_p0);
+ g_object_unref (fi_p1);
+ g_object_unref (gf_p0);
+ g_object_unref (gf_p1);
+ g_remove (p0);
+ g_remove (p1);
+ g_free (p0);
+ g_free (p1);
+ g_rmdir (tmp_dir);
+}
+#endif
+
+
int
main (int argc,
char *argv[])
@@ -139,6 +503,9 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/g-file-info/test_g_file_info", test_g_file_info);
+#ifdef G_OS_WIN32
+ g_test_add_func ("/g-file-info/internal-enhanced-stdio", test_internal_enhanced_stdio);
+#endif
return g_test_run();
}
diff --git a/gio/tests/gdbus-proxy.c b/gio/tests/gdbus-proxy.c
index fff1f48da..8a2c324a2 100644
--- a/gio/tests/gdbus-proxy.c
+++ b/gio/tests/gdbus-proxy.c
@@ -74,11 +74,15 @@ test_methods (GDBusProxy *proxy)
g_assert_cmpstr (error->message, ==, "Yo is not a proper greeting");
g_clear_error (&error);
- /* Check that we get a timeout if the method handling is taking longer than timeout */
+ /* Check that we get a timeout if the method handling is taking longer than
+ * timeout. We use such a long sleep because on slow machines, if the
+ * sleep isn't much longer than the timeout and we're doing a parallel
+ * build, there's no guarantee we'll be scheduled in the window between
+ * the timeout being hit and the sleep finishing. */
error = NULL;
result = g_dbus_proxy_call_sync (proxy,
"Sleep",
- g_variant_new ("(i)", 500 /* msec */),
+ g_variant_new ("(i)", 10000 /* msec */),
G_DBUS_CALL_FLAGS_NONE,
100 /* msec */,
NULL,
@@ -104,12 +108,14 @@ test_methods (GDBusProxy *proxy)
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
- /* now set the proxy-default timeout to 250 msec and try the 500 msec call - this should FAIL */
+ /* Now set the proxy-default timeout to 250 msec and try the 10000 msec
+ * call - this should FAIL. Again, we use such a long sleep because on slow
+ * machines there's no guarantee we'll be scheduled when we want to be. */
g_dbus_proxy_set_default_timeout (proxy, 250);
g_assert_cmpint (g_dbus_proxy_get_default_timeout (proxy), ==, 250);
result = g_dbus_proxy_call_sync (proxy,
"Sleep",
- g_variant_new ("(i)", 500 /* msec */),
+ g_variant_new ("(i)", 10000 /* msec */),
G_DBUS_CALL_FLAGS_NONE,
-1, /* use proxy default (e.g. 250 msec) */
NULL,
@@ -829,6 +835,8 @@ fail_test (gpointer user_data)
static void
test_async (void)
{
+ guint id;
+
g_dbus_proxy_new_for_bus (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_NONE,
NULL, /* GDBusInterfaceInfo */
@@ -842,8 +850,10 @@ test_async (void)
/* this is safe; testserver will exit once the bus goes away */
g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
- g_timeout_add (10000, fail_test, NULL);
+ id = g_timeout_add (10000, fail_test, NULL);
g_main_loop_run (loop);
+
+ g_source_remove (id);
}
static void
@@ -889,6 +899,7 @@ test_wellknown_noauto (void)
{
GError *error = NULL;
GDBusProxy *proxy;
+ guint id;
proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
@@ -898,9 +909,10 @@ test_wellknown_noauto (void)
g_assert (proxy != NULL);
g_dbus_proxy_call (proxy, "method", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, check_error, NULL);
- g_timeout_add (10000, fail_test, NULL);
+ id = g_timeout_add (10000, fail_test, NULL);
g_main_loop_run (loop);
g_object_unref (proxy);
+ g_source_remove (id);
}
int
diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c
index f18db77d6..a604f996f 100644
--- a/gio/tests/gmenumodel.c
+++ b/gio/tests/gmenumodel.c
@@ -2,33 +2,6 @@
#include "gdbus-sessionbus.h"
-static gboolean
-time_out (gpointer unused G_GNUC_UNUSED)
-{
- g_error ("Timed out");
- /* not reached */
- return FALSE;
-}
-
-static guint
-add_timeout (guint seconds)
-{
-#ifdef G_OS_UNIX
- /* Safety-catch against the main loop having blocked */
- alarm (seconds + 5);
-#endif
- return g_timeout_add_seconds (seconds, time_out, NULL);
-}
-
-static void
-cancel_timeout (guint timeout_id)
-{
-#ifdef G_OS_UNIX
- alarm (0);
-#endif
- g_source_remove (timeout_id);
-}
-
/* Markup printing {{{1 */
/* This used to be part of GLib, but it was removed before the stable
@@ -845,9 +818,7 @@ test_dbus_subscriptions (void)
GMainLoop *loop;
GError *error = NULL;
guint export_id;
- guint timeout_id;
- timeout_id = add_timeout (60);
loop = g_main_loop_new (NULL, FALSE);
bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
@@ -868,42 +839,32 @@ test_dbus_subscriptions (void)
g_assert_cmpint (items_changed_count, ==, 0);
- /* We don't subscribe to change-notification until we look at the items */
g_timeout_add (100, stop_loop, loop);
g_main_loop_run (loop);
- /* Looking at the items triggers subscription */
g_menu_model_get_n_items (G_MENU_MODEL (proxy));
- while (items_changed_count < 1)
- g_main_context_iteration (NULL, TRUE);
+ g_timeout_add (100, stop_loop, loop);
+ g_main_loop_run (loop);
- /* We get all three items in one batch */
g_assert_cmpint (items_changed_count, ==, 1);
g_assert_cmpint (g_menu_model_get_n_items (G_MENU_MODEL (proxy)), ==, 3);
- /* If we wait, we don't get any more */
g_timeout_add (100, stop_loop, loop);
g_main_loop_run (loop);
- g_assert_cmpint (items_changed_count, ==, 1);
- g_assert_cmpint (g_menu_model_get_n_items (G_MENU_MODEL (proxy)), ==, 3);
- /* Now we're subscribed, we get changes individually */
g_menu_append (menu, "item4", NULL);
g_menu_append (menu, "item5", NULL);
g_menu_append (menu, "item6", NULL);
g_menu_remove (menu, 0);
g_menu_remove (menu, 0);
- while (items_changed_count < 6)
- g_main_context_iteration (NULL, TRUE);
+ g_timeout_add (200, stop_loop, loop);
+ g_main_loop_run (loop);
g_assert_cmpint (items_changed_count, ==, 6);
g_assert_cmpint (g_menu_model_get_n_items (G_MENU_MODEL (proxy)), ==, 4);
-
- /* After destroying the proxy and waiting a bit, we don't get any more
- * items-changed signals */
g_object_unref (proxy);
g_timeout_add (100, stop_loop, loop);
@@ -922,7 +883,6 @@ test_dbus_subscriptions (void)
g_main_loop_unref (loop);
g_object_unref (bus);
- cancel_timeout (timeout_id);
}
static gpointer
diff --git a/gio/tests/gschema-compile.c b/gio/tests/gschema-compile.c
index 40a396d2f..65f656c52 100644
--- a/gio/tests/gschema-compile.c
+++ b/gio/tests/gschema-compile.c
@@ -86,6 +86,7 @@ static const SchemaTest tests[] = {
{ "enum", NULL, NULL },
{ "enum-with-aliases", NULL, NULL },
{ "enum-with-invalid-alias", NULL, "*“banger” is not in enumerated type*" },
+ { "enum-with-invalid-value", NULL, "*Invalid numeric value*" },
{ "enum-with-repeated-alias", NULL, "*<alias value='sausages'/> already specified*" },
{ "enum-with-repeated-nick", NULL, "*<value nick='spam'/> already specified*" },
{ "enum-with-repeated-value", NULL, "*value='1' already specified*" },
diff --git a/gio/tests/httpd.c b/gio/tests/httpd.c
index 41bc6c8b8..9bca6c96c 100644
--- a/gio/tests/httpd.c
+++ b/gio/tests/httpd.c
@@ -67,12 +67,19 @@ handler (GThreadedSocketService *service,
version = NULL;
tmp = strchr (escaped, ' ');
- if (tmp != NULL)
+ if (tmp == NULL)
{
- *tmp = 0;
- version = tmp + 1;
+ send_error (out, 400, "Bad Request");
+ goto out;
+ }
+ *tmp = 0;
+
+ version = tmp + 1;
+ if (!g_str_has_prefix (version, "HTTP/1."))
+ {
+ send_error(out, 505, "HTTP Version Not Supported");
+ goto out;
}
- version = version; /* To avoid -Wunused-but-set-variable */
query = strchr (escaped, '?');
if (query != NULL)
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index e149a4bb3..fb17cc407 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -113,7 +113,9 @@ if host_machine.system() != 'windows'
'socket-address',
'stream-rw_all',
'unix-fd',
+ 'unix-mounts',
'unix-streams',
+ 'g-file-info-filesystem-readonly',
'gschema-compile',
]
@@ -145,6 +147,7 @@ if host_machine.system() != 'windows'
input : ['test-codegen.xml'],
output : ['gdbus-test-codegen-generated.h',
'gdbus-test-codegen-generated.c'],
+ depend_files : gdbus_codegen_built_files,
command : [python, gdbus_codegen,
'--interface-prefix', 'org.project.',
'--output-directory', '@OUTDIR@',
diff --git a/gio/tests/resources.c b/gio/tests/resources.c
index b002325b8..8163aa141 100644
--- a/gio/tests/resources.c
+++ b/gio/tests/resources.c
@@ -134,6 +134,32 @@ test_resource (GResource *resource)
g_assert_no_error (error);
g_assert_cmpint (g_strv_length (children), ==, 2);
g_strfreev (children);
+
+ /* Test the preferred lookup where we have a trailing slash. */
+ children = g_resource_enumerate_children (resource,
+ "/a_prefix/",
+ G_RESOURCE_LOOKUP_FLAGS_NONE,
+ &error);
+ g_assert (children != NULL);
+ g_assert_no_error (error);
+ g_assert_cmpint (g_strv_length (children), ==, 2);
+ g_strfreev (children);
+
+ /* test with a path > 256 and no trailing slash to test the
+ * slow path of resources where we allocate a modified path.
+ */
+ children = g_resource_enumerate_children (resource,
+ "/not/here/not/here/not/here/not/here/not/here/not/here/not/here"
+ "/not/here/not/here/not/here/not/here/not/here/not/here/not/here"
+ "/not/here/not/here/not/here/not/here/not/here/not/here/not/here"
+ "/not/here/not/here/not/here/not/here/not/here/not/here/not/here"
+ "/not/here/not/here/not/here/not/here/not/here/not/here/not/here"
+ "/with/no/trailing/slash",
+ G_RESOURCE_LOOKUP_FLAGS_NONE,
+ &error);
+ g_assert (children == NULL);
+ g_assert_error (error, G_RESOURCE_ERROR, G_RESOURCE_ERROR_NOT_FOUND);
+ g_clear_error (&error);
}
static void
@@ -156,6 +182,49 @@ test_resource_file (void)
}
static void
+test_resource_file_path (void)
+{
+ static const struct {
+ const gchar *input;
+ const gchar *expected;
+ } test_uris[] = {
+ { "resource://", "resource:///" },
+ { "resource:///", "resource:///" },
+ { "resource://////", "resource:///" },
+ { "resource:///../../../", "resource:///" },
+ { "resource:///../../..", "resource:///" },
+ { "resource://abc", "resource:///abc" },
+ { "resource:///abc/", "resource:///abc" },
+ { "resource:/a/b/../c/", "resource:///a/c" },
+ { "resource://../a/b/../c/../", "resource:///a" },
+ { "resource://a/b/cc//bb//a///", "resource:///a/b/cc/bb/a" },
+ { "resource://././././", "resource:///" },
+ { "resource://././././../", "resource:///" },
+ { "resource://a/b/c/d.png", "resource:///a/b/c/d.png" },
+ { "resource://a/b/c/..png", "resource:///a/b/c/..png" },
+ { "resource://a/b/c/./png", "resource:///a/b/c/png" },
+ };
+ guint i;
+
+ for (i = 0; i < G_N_ELEMENTS (test_uris); i++)
+ {
+ GFile *file;
+ gchar *uri;
+
+ file = g_file_new_for_uri (test_uris[i].input);
+ g_assert (file != NULL);
+
+ uri = g_file_get_uri (file);
+ g_assert (uri != NULL);
+
+ g_assert_cmpstr (uri, ==, test_uris[i].expected);
+
+ g_object_unref (file);
+ g_free (uri);
+ }
+}
+
+static void
test_resource_data (void)
{
GResource *resource;
@@ -181,6 +250,36 @@ test_resource_data (void)
}
static void
+test_resource_data_unaligned (void)
+{
+ GResource *resource;
+ GError *error = NULL;
+ gboolean loaded_file;
+ char *content, *content_copy;
+ gsize content_size;
+ GBytes *data;
+
+ loaded_file = g_file_get_contents (g_test_get_filename (G_TEST_BUILT, "test.gresource", NULL),
+ &content, &content_size, NULL);
+ g_assert (loaded_file);
+
+ content_copy = g_new (char, content_size + 1);
+ memcpy (content_copy + 1, content, content_size);
+
+ data = g_bytes_new_with_free_func (content_copy + 1, content_size,
+ (GDestroyNotify) g_free, content_copy);
+ g_free (content);
+ resource = g_resource_new_from_data (data, &error);
+ g_bytes_unref (data);
+ g_assert (resource != NULL);
+ g_assert_no_error (error);
+
+ test_resource (resource);
+
+ g_resource_unref (resource);
+}
+
+static void
test_resource_registered (void)
{
GResource *resource;
@@ -643,7 +742,9 @@ main (int argc,
_g_test2_register_resource ();
g_test_add_func ("/resource/file", test_resource_file);
+ g_test_add_func ("/resource/file-path", test_resource_file_path);
g_test_add_func ("/resource/data", test_resource_data);
+ g_test_add_func ("/resource/data_unaligned", test_resource_data_unaligned);
g_test_add_func ("/resource/registered", test_resource_registered);
g_test_add_func ("/resource/manual", test_resource_manual);
g_test_add_func ("/resource/manual2", test_resource_manual2);
diff --git a/gio/tests/schema-tests/enum-with-invalid-value.gschema.xml b/gio/tests/schema-tests/enum-with-invalid-value.gschema.xml
new file mode 100644
index 000000000..02071e070
--- /dev/null
+++ b/gio/tests/schema-tests/enum-with-invalid-value.gschema.xml
@@ -0,0 +1,10 @@
+<schemalist>
+ <enum id='org.gtk.test.MyEnum'>
+ <value nick='nospam' value='*'/>
+ <value nick='spam' value='1'/>
+ <value nick='ham' value='2'/>
+ <value nick='eggs' value='3'/>
+ <value nick='bangers' value='4'/>
+ <value nick='mash' value='5'/>
+ </enum>
+</schemalist>
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index 4343dd537..0835a6655 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -1386,6 +1386,53 @@ test_unix_connection_ancillary_data (void)
* g_unix_connection_receive_credentials().
*/
}
+
+static gboolean
+postmortem_source_cb (GSocket *socket,
+ GIOCondition condition,
+ gpointer user_data)
+{
+ gboolean *been_here = user_data;
+
+ g_assert_cmpint (condition, ==, G_IO_NVAL);
+
+ *been_here = TRUE;
+ return FALSE;
+}
+
+static void
+test_source_postmortem (void)
+{
+ GMainContext *context;
+ GSocket *socket;
+ GSource *source;
+ GError *error = NULL;
+ gboolean callback_visited = FALSE;
+
+ socket = g_socket_new (G_SOCKET_FAMILY_UNIX, G_SOCKET_TYPE_STREAM, G_SOCKET_PROTOCOL_DEFAULT, &error);
+ g_assert_no_error (error);
+
+ context = g_main_context_new ();
+
+ source = g_socket_create_source (socket, G_IO_IN, NULL);
+ g_source_set_callback (source, (GSourceFunc) postmortem_source_cb,
+ &callback_visited, NULL);
+ g_source_attach (source, context);
+ g_source_unref (source);
+
+ g_socket_close (socket, &error);
+ g_assert_no_error (error);
+ g_object_unref (socket);
+
+ /* Test that, after a socket is closed, its source callback should be called
+ * exactly once. */
+ g_main_context_iteration (context, FALSE);
+ g_assert (callback_visited);
+ g_assert (!g_main_context_pending (context));
+
+ g_main_context_unref (context);
+}
+
#endif /* G_OS_UNIX */
static void
@@ -1643,6 +1690,7 @@ main (int argc,
g_test_add_func ("/socket/unix-from-fd", test_unix_from_fd);
g_test_add_func ("/socket/unix-connection", test_unix_connection);
g_test_add_func ("/socket/unix-connection-ancillary-data", test_unix_connection_ancillary_data);
+ g_test_add_func ("/socket/source-postmortem", test_source_postmortem);
#endif
g_test_add_func ("/socket/reuse/tcp", test_reuse_tcp);
g_test_add_func ("/socket/reuse/udp", test_reuse_udp);
diff --git a/gio/tests/unix-mounts.c b/gio/tests/unix-mounts.c
new file mode 100644
index 000000000..3d54047dc
--- /dev/null
+++ b/gio/tests/unix-mounts.c
@@ -0,0 +1,57 @@
+/* GLib testing framework examples and tests
+ *
+ * Copyright © 2017 Endless Mobile, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <glib.h>
+
+#ifndef G_OS_UNIX
+#error This is a Unix-specific test
+#endif
+
+#include <errno.h>
+#include <locale.h>
+#include <glib/gstdio.h>
+#include <gio/gio.h>
+#include <gio/gunixmounts.h>
+
+static void
+test_is_system_fs_type (void)
+{
+ g_assert_true (g_unix_is_system_fs_type ("tmpfs"));
+ g_assert_false (g_unix_is_system_fs_type ("ext4"));
+}
+
+static void
+test_is_system_device_path (void)
+{
+ g_assert_true (g_unix_is_system_device_path ("devpts"));
+ g_assert_false (g_unix_is_system_device_path ("/"));
+}
+
+int
+main (int argc,
+ char *argv[])
+{
+ setlocale (LC_ALL, "");
+
+ g_test_init (&argc, &argv, NULL);
+
+ g_test_add_func ("/unix-mounts/is-system-fs-type", test_is_system_fs_type);
+ g_test_add_func ("/unix-mounts/is-system-device-path", test_is_system_device_path);
+
+ return g_test_run ();
+}
diff --git a/glib-gettextize.in b/glib-gettextize.in
index b07078bc5..b07078bc5 100644..100755
--- a/glib-gettextize.in
+++ b/glib-gettextize.in
diff --git a/glib/Makefile.am b/glib/Makefile.am
index 5478edbfa..8da549c7f 100644
--- a/glib/Makefile.am
+++ b/glib/Makefile.am
@@ -161,6 +161,7 @@ libglib_2_0_la_SOURCES = \
gslice.c \
gslist.c \
gstdio.c \
+ gstdioprivate.h \
gstrfuncs.c \
gstring.c \
gstringchunk.c \
@@ -478,6 +479,7 @@ dist-hook: $(BUILT_EXTRA_DIST) $(top_builddir)/win32/vs9/glib.vcproj $(top_build
gdbdir = $(datadir)/glib-2.0/gdb
dist_gdb_DATA = glib_gdb.py
+all-local: libglib-gdb.py
libglib-gdb.py: libglib-gdb.py.in
$(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libglib-gdb.py.in > $(builddir)/libglib-gdb.py
diff --git a/glib/docs.c b/glib/docs.c
index da236231e..d6ac4b392 100644
--- a/glib/docs.c
+++ b/glib/docs.c
@@ -32,18 +32,20 @@
* and portability
*
* GLib defines a number of commonly used types, which can be divided
- * into 4 groups:
+ * into several groups:
* - New types which are not part of standard C (but are defined in
- * various C standard library header files) - #gboolean, #gsize,
- * #gssize, #goffset, #gintptr, #guintptr.
+ * various C standard library header files) — #gboolean, #gssize.
* - Integer types which are guaranteed to be the same size across
- * all platforms - #gint8, #guint8, #gint16, #guint16, #gint32,
+ * all platforms — #gint8, #guint8, #gint16, #guint16, #gint32,
* #guint32, #gint64, #guint64.
* - Types which are easier to use than their standard C counterparts -
* #gpointer, #gconstpointer, #guchar, #guint, #gushort, #gulong.
* - Types which correspond exactly to standard C types, but are
- * included for completeness - #gchar, #gint, #gshort, #glong,
+ * included for completeness — #gchar, #gint, #gshort, #glong,
* #gfloat, #gdouble.
+ * - Types which correspond exactly to standard C99 types, but are available
+ * to use even if your compiler does not support C99 — #gsize, #goffset,
+ * #gintptr, #guintptr.
*
* GLib also defines macros for the limits of some of the standard
* integer and floating point types, as well as macros for suitable
@@ -1997,6 +1999,8 @@
/**
* G_GNUC_CHECK_VERSION:
+ * @major: major version to check against
+ * @minor: minor version to check against
*
* Expands to a a check for a compiler with __GNUC__ defined and a version
* greater than or equal to the major and minor numbers provided. For example,
diff --git a/glib/gbase64.c b/glib/gbase64.c
index 651840e52..7d8b20dee 100644
--- a/glib/gbase64.c
+++ b/glib/gbase64.c
@@ -298,10 +298,10 @@ static const unsigned char mime_base64_rank[256] = {
};
/**
- * g_base64_decode_step:
+ * g_base64_decode_step: (skip)
* @in: (array length=len) (element-type guint8): binary input data
* @len: max length of @in data to decode
- * @out: (out) (array) (element-type guint8): output buffer
+ * @out: (out caller-allocates) (array) (element-type guint8): output buffer
* @state: (inout): Saved state between steps, initialize to 0
* @save: (inout): Saved state between steps, initialize to 0
*
diff --git a/glib/gbookmarkfile.c b/glib/gbookmarkfile.c
index 7d7da0399..596e370e8 100644
--- a/glib/gbookmarkfile.c
+++ b/glib/gbookmarkfile.c
@@ -1566,7 +1566,7 @@ G_DEFINE_QUARK (g-bookmark-file-error-quark, g_bookmark_file_error)
********************/
/**
- * g_bookmark_file_new:
+ * g_bookmark_file_new: (constructor)
*
* Creates a new empty #GBookmarkFile object.
*
diff --git a/glib/gbytes.c b/glib/gbytes.c
index a68b17d04..747c41bc7 100644
--- a/glib/gbytes.c
+++ b/glib/gbytes.c
@@ -99,7 +99,7 @@ g_bytes_new (gconstpointer data,
/**
* g_bytes_new_take:
* @data: (transfer full) (array length=size) (element-type guint8) (nullable):
- the data to be used for the bytes
+ * the data to be used for the bytes
* @size: the size of @data
*
* Creates a new #GBytes from @data.
@@ -130,7 +130,7 @@ g_bytes_new_take (gpointer data,
/**
* g_bytes_new_static: (skip)
* @data: (transfer full) (array length=size) (element-type guint8) (nullable):
- the data to be used for the bytes
+ * the data to be used for the bytes
* @size: the size of @data
*
* Creates a new #GBytes from static data.
@@ -152,7 +152,7 @@ g_bytes_new_static (gconstpointer data,
/**
* g_bytes_new_with_free_func: (skip)
* @data: (array length=size) (element-type guint8) (nullable):
- the data to be used for the bytes
+ * the data to be used for the bytes
* @size: the size of @data
* @free_func: the function to call to release the data
* @user_data: data to pass to @free_func
@@ -407,7 +407,8 @@ try_steal_and_unref (GBytes *bytes,
{
gpointer result;
- if (bytes->free_func != free_func || bytes->data == NULL)
+ if (bytes->free_func != free_func || bytes->data == NULL ||
+ bytes->user_data != bytes->data)
return NULL;
/* Are we the only reference? */
diff --git a/glib/gconvert.c b/glib/gconvert.c
index 64fd98107..194b2fc3f 100644
--- a/glib/gconvert.c
+++ b/glib/gconvert.c
@@ -128,7 +128,6 @@
* ## Checklist for Application Writers
*
* This section is a practical summary of the detailed
-
* things to do to make sure your applications process file
* name encodings correctly.
*
@@ -202,7 +201,7 @@ try_to_aliases (const char **to_aliases,
}
/**
- * g_iconv_open:
+ * g_iconv_open: (skip)
* @to_codeset: destination codeset
* @from_codeset: source codeset
*
@@ -251,7 +250,7 @@ g_iconv_open (const gchar *to_codeset,
}
/**
- * g_iconv:
+ * g_iconv: (skip)
* @converter: conversion descriptor from g_iconv_open()
* @inbuf: bytes to convert
* @inbytes_left: inout parameter, bytes remaining to convert in @inbuf
@@ -280,7 +279,7 @@ g_iconv (GIConv converter,
}
/**
- * g_iconv_close:
+ * g_iconv_close: (skip)
* @converter: a conversion descriptor from g_iconv_open()
*
* Same as the standard UNIX routine iconv_close(), but
@@ -340,7 +339,7 @@ close_converter (GIConv cd)
}
/**
- * g_convert_with_iconv:
+ * g_convert_with_iconv: (skip)
* @str: the string to convert
* @len: the length of the string in bytes, or -1 if the string is
* nul-terminated (Note that some encodings may allow nul
@@ -583,8 +582,8 @@ g_convert (const gchar *str,
* @fallback: UTF-8 string to use in place of character not
* present in the target encoding. (The string must be
* representable in the target encoding).
- If %NULL, characters not in the target encoding will
- be represented as Unicode escapes \uxxxx or \Uxxxxyyyy.
+ * If %NULL, characters not in the target encoding will
+ * be represented as Unicode escapes \uxxxx or \Uxxxxyyyy.
* @bytes_read: location to store the number of bytes in the
* input string that were successfully converted, or %NULL.
* Even if the conversion was successful, this may be
diff --git a/glib/gconvert.h b/glib/gconvert.h
index ab6ab4f6b..f064e4188 100644
--- a/glib/gconvert.h
+++ b/glib/gconvert.h
@@ -69,7 +69,7 @@ GLIB_AVAILABLE_IN_ALL
GQuark g_convert_error_quark (void);
/**
- * GIConv:
+ * GIConv: (skip)
*
* The GIConv struct wraps an iconv() conversion descriptor. It contains
* private data and should only be accessed using the following functions.
diff --git a/glib/gdataset.c b/glib/gdataset.c
index 28ec0c0b5..ae36e9e2f 100644
--- a/glib/gdataset.c
+++ b/glib/gdataset.c
@@ -243,7 +243,7 @@ g_datalist_clear_i (GData **datalist)
}
/**
- * g_datalist_clear:
+ * g_datalist_clear: (skip)
* @datalist: a datalist.
*
* Frees all the data elements of the datalist.
@@ -486,7 +486,7 @@ g_data_set_internal (GData **datalist,
}
/**
- * g_dataset_id_set_data_full:
+ * g_dataset_id_set_data_full: (skip)
* @dataset_location: (not nullable): the location identifying the dataset.
* @key_id: the #GQuark id to identify the data element.
* @data: the data element.
@@ -501,7 +501,7 @@ g_data_set_internal (GData **datalist,
* is called.
**/
/**
- * g_dataset_set_data_full:
+ * g_dataset_set_data_full: (skip)
* @l: the location identifying the dataset.
* @k: the string to identify the data element.
* @d: the data element.
@@ -585,12 +585,12 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
}
/**
- * g_datalist_id_set_data_full:
+ * g_datalist_id_set_data_full: (skip)
* @datalist: a datalist.
* @key_id: the #GQuark to identify the data element.
* @data: (nullable): the data element or %NULL to remove any previous element
* corresponding to @key_id.
- * @destroy_func: the function to call when the data element is
+ * @destroy_func: (nullable): the function to call when the data element is
* removed. This function will be called with the data
* element and can be used to free any memory allocated
* for it. If @data is %NULL, then @destroy_func must
@@ -602,13 +602,13 @@ g_dataset_id_set_data_full (gconstpointer dataset_location,
* function is called.
**/
/**
- * g_datalist_set_data_full:
+ * g_datalist_set_data_full: (skip)
* @dl: a datalist.
* @k: the string to identify the data element.
* @d: (nullable): the data element, or %NULL to remove any previous element
* corresponding to @k.
- * @f: the function to call when the data element is removed. This
- * function will be called with the data element and can be used to
+ * @f: (nullable): the function to call when the data element is removed.
+ * This function will be called with the data element and can be used to
* free any memory allocated for it. If @d is %NULL, then @f must
* also be %NULL.
*
@@ -671,17 +671,18 @@ g_datalist_id_set_data_full (GData **datalist,
}
/**
- * g_dataset_id_remove_no_notify:
+ * g_dataset_id_remove_no_notify: (skip)
* @dataset_location: (not nullable): the location identifying the dataset.
* @key_id: the #GQuark ID identifying the data element.
*
* Removes an element, without calling its destroy notification
* function.
*
- * Returns: the data previously stored at @key_id, or %NULL if none.
+ * Returns: (nullable): the data previously stored at @key_id,
+ * or %NULL if none.
**/
/**
- * g_dataset_remove_no_notify:
+ * g_dataset_remove_no_notify: (skip)
* @l: the location identifying the dataset.
* @k: the string identifying the data element.
*
@@ -710,17 +711,18 @@ g_dataset_id_remove_no_notify (gconstpointer dataset_location,
}
/**
- * g_datalist_id_remove_no_notify:
+ * g_datalist_id_remove_no_notify: (skip)
* @datalist: a datalist.
* @key_id: the #GQuark identifying a data element.
*
* Removes an element, without calling its destroy notification
* function.
*
- * Returns: the data previously stored at @key_id, or %NULL if none.
+ * Returns: (nullable): the data previously stored at @key_id,
+ * or %NULL if none.
**/
/**
- * g_datalist_remove_no_notify:
+ * g_datalist_remove_no_notify: (skip)
* @dl: a datalist.
* @k: the string identifying the data element.
*
@@ -747,8 +749,8 @@ g_datalist_id_remove_no_notify (GData **datalist,
*
* Gets the data element corresponding to a #GQuark.
*
- * Returns: the data element corresponding to the #GQuark, or %NULL if
- * it is not found.
+ * Returns: (transfer none) (nullable): the data element corresponding to
+ * the #GQuark, or %NULL if it is not found.
**/
/**
* g_dataset_get_data:
@@ -757,8 +759,8 @@ g_datalist_id_remove_no_notify (GData **datalist,
*
* Gets the data element corresponding to a string.
*
- * Returns: the data element corresponding to the string, or %NULL if
- * it is not found.
+ * Returns: (transfer none) (nullable): the data element corresponding to
+ * the string, or %NULL if it is not found.
**/
gpointer
g_dataset_id_get_data (gconstpointer dataset_location,
@@ -789,7 +791,8 @@ g_dataset_id_get_data (gconstpointer dataset_location,
*
* Retrieves the data element corresponding to @key_id.
*
- * Returns: the data element, or %NULL if it is not found.
+ * Returns: (transfer none) (nullable): the data element, or %NULL if
+ * it is not found.
*/
gpointer
g_datalist_id_get_data (GData **datalist,
@@ -801,7 +804,8 @@ g_datalist_id_get_data (GData **datalist,
/**
* GDuplicateFunc:
* @data: the data to duplicate
- * @user_data: user data that was specified in g_datalist_id_dup_data()
+ * @user_data: (closure): user data that was specified in
+ * g_datalist_id_dup_data()
*
* The type of functions that are used to 'duplicate' an object.
* What this means depends on the context, it could just be
@@ -812,11 +816,11 @@ g_datalist_id_get_data (GData **datalist,
*/
/**
- * g_datalist_id_dup_data:
+ * g_datalist_id_dup_data: (skip)
* @datalist: location of a datalist
* @key_id: the #GQuark identifying a data element
- * @dup_func: (nullable): function to duplicate the old value
- * @user_data: (nullable): passed as user_data to @dup_func
+ * @dup_func: (nullable) (scope call): function to duplicate the old value
+ * @user_data: (closure): passed as user_data to @dup_func
*
* This is a variant of g_datalist_id_get_data() which
* returns a 'duplicate' of the value. @dup_func defines the
@@ -832,7 +836,7 @@ g_datalist_id_get_data (GData **datalist,
* This function can be useful to avoid races when multiple
* threads are using the same datalist and the same key.
*
- * Returns: the result of calling @dup_func on the value
+ * Returns: (nullable): the result of calling @dup_func on the value
* associated with @key_id in @datalist, or %NULL if not set.
* If @dup_func is %NULL, the value is returned unmodified.
*
@@ -879,13 +883,13 @@ g_datalist_id_dup_data (GData **datalist,
}
/**
- * g_datalist_id_replace_data:
+ * g_datalist_id_replace_data: (skip)
* @datalist: location of a datalist
* @key_id: the #GQuark identifying a data element
* @oldval: (nullable): the old value to compare against
* @newval: (nullable): the new value to replace it with
* @destroy: (nullable): destroy notify for the new value
- * @old_destroy: (nullable): destroy notify for the existing value
+ * @old_destroy: (out) (optional): destroy notify for the existing value
*
* Compares the member that is associated with @key_id in
* @datalist to @oldval, and if they are the same, replace
@@ -1006,7 +1010,8 @@ g_datalist_id_replace_data (GData **datalist,
* Gets a data element, using its string identifier. This is slower than
* g_datalist_id_get_data() because it compares strings.
*
- * Returns: the data element, or %NULL if it is not found.
+ * Returns: (transfer none) (nullable): the data element, or %NULL if it
+ * is not found.
**/
gpointer
g_datalist_get_data (GData **datalist,
@@ -1045,7 +1050,7 @@ g_datalist_get_data (GData **datalist,
* GDataForeachFunc:
* @key_id: the #GQuark id to identifying the data element.
* @data: the data element.
- * @user_data: user data passed to g_dataset_foreach().
+ * @user_data: (closure): user data passed to g_dataset_foreach().
*
* Specifies the type of function passed to g_dataset_foreach(). It is
* called with each #GQuark id and associated data element, together
@@ -1055,8 +1060,8 @@ g_datalist_get_data (GData **datalist,
/**
* g_dataset_foreach:
* @dataset_location: (not nullable): the location identifying the dataset.
- * @func: the function to call for each data element.
- * @user_data: user data to pass to the function.
+ * @func: (scope call): the function to call for each data element.
+ * @user_data: (closure): user data to pass to the function.
*
* Calls the given function for each data element which is associated
* with the given location. Note that this function is NOT thread-safe.
@@ -1090,8 +1095,8 @@ g_dataset_foreach (gconstpointer dataset_location,
/**
* g_datalist_foreach:
* @datalist: a datalist.
- * @func: the function to call for each data element.
- * @user_data: user data to pass to the function.
+ * @func: (scope call): the function to call for each data element.
+ * @user_data: (closure): user data to pass to the function.
*
* Calls the given function for each data element of the datalist. The
* function is called with each data element's #GQuark id and data,
@@ -1143,7 +1148,7 @@ g_datalist_foreach (GData **datalist,
}
/**
- * g_datalist_init:
+ * g_datalist_init: (skip)
* @datalist: a pointer to a pointer to a datalist.
*
* Resets the datalist to %NULL. It does not free any memory or call
diff --git a/glib/gdate.c b/glib/gdate.c
index 1519cf024..58cb75cb4 100644
--- a/glib/gdate.c
+++ b/glib/gdate.c
@@ -343,6 +343,35 @@ g_date_free (GDate *date)
}
/**
+ * g_date_copy:
+ * @date: a #GDate to copy
+ *
+ * Copies a GDate to a newly-allocated GDate. If the input was invalid
+ * (as determined by g_date_valid()), the invalid state will be copied
+ * as is into the new object.
+ *
+ * Returns: (transfer full): a newly-allocated #GDate initialized from @date
+ *
+ * Since: 2.56
+ */
+GDate *
+g_date_copy (const GDate *date)
+{
+ GDate *res;
+ g_return_val_if_fail (date != NULL, NULL);
+
+ if (g_date_valid (date))
+ res = g_date_new_julian (g_date_get_julian (date));
+ else
+ {
+ res = g_date_new ();
+ *res = *date;
+ }
+
+ return res;
+}
+
+/**
* g_date_valid:
* @date: a #GDate to check
*
diff --git a/glib/gdate.h b/glib/gdate.h
index bc7e93120..63feb3535 100644
--- a/glib/gdate.h
+++ b/glib/gdate.h
@@ -127,6 +127,8 @@ GLIB_AVAILABLE_IN_ALL
GDate* g_date_new_julian (guint32 julian_day);
GLIB_AVAILABLE_IN_ALL
void g_date_free (GDate *date);
+GLIB_AVAILABLE_IN_2_56
+GDate* g_date_copy (const GDate *date);
/* check g_date_valid() after doing an operation that might fail, like
* _parse. Almost all g_date operations are undefined on invalid
diff --git a/glib/gdatetime.c b/glib/gdatetime.c
index c78bc4cac..e1c726047 100644
--- a/glib/gdatetime.c
+++ b/glib/gdatetime.c
@@ -22,6 +22,7 @@
* Thiago Santos <thiago.sousa.santos@collabora.co.uk>
* Emmanuele Bassi <ebassi@linux.intel.com>
* Ryan Lortie <desrt@desrt.ca>
+ * Robert Ancell <robert.ancell@canonical.com>
*/
/* Algorithms within this file are based on the Calendar FAQ by
@@ -902,6 +903,342 @@ g_date_time_new_from_timeval_utc (const GTimeVal *tv)
return datetime;
}
+/* Parse integers in the form d (week days), dd (hours etc), ddd (ordinal days) or dddd (years) */
+static gboolean
+get_iso8601_int (const gchar *text, gsize length, gint *value)
+{
+ gint i, v = 0;
+
+ if (length < 1 || length > 4)
+ return FALSE;
+
+ for (i = 0; i < length; i++)
+ {
+ const gchar c = text[i];
+ if (c < '0' || c > '9')
+ return FALSE;
+ v = v * 10 + (c - '0');
+ }
+
+ *value = v;
+ return TRUE;
+}
+
+/* Parse seconds in the form ss or ss.sss (variable length decimal) */
+static gboolean
+get_iso8601_seconds (const gchar *text, gsize length, gdouble *value)
+{
+ gint i;
+ gdouble multiplier = 0.1, v = 0;
+
+ if (length < 2)
+ return FALSE;
+
+ for (i = 0; i < 2; i++)
+ {
+ const gchar c = text[i];
+ if (c < '0' || c > '9')
+ return FALSE;
+ v = v * 10 + (c - '0');
+ }
+
+ if (length > 2 && !(text[i] == '.' || text[i] == ','))
+ return FALSE;
+ i++;
+ if (i == length)
+ return FALSE;
+
+ for (; i < length; i++)
+ {
+ const gchar c = text[i];
+ if (c < '0' || c > '9')
+ return FALSE;
+ v += (c - '0') * multiplier;
+ multiplier *= 0.1;
+ }
+
+ *value = v;
+ return TRUE;
+}
+
+static GDateTime *
+g_date_time_new_ordinal (GTimeZone *tz, gint year, gint ordinal_day, gint hour, gint minute, gdouble seconds)
+{
+ GDateTime *dt;
+
+ if (ordinal_day < 1 || ordinal_day > (GREGORIAN_LEAP (year) ? 366 : 365))
+ return NULL;
+
+ dt = g_date_time_new (tz, year, 1, 1, hour, minute, seconds);
+ dt->days += ordinal_day - 1;
+
+ return dt;
+}
+
+static GDateTime *
+g_date_time_new_week (GTimeZone *tz, gint year, gint week, gint week_day, gint hour, gint minute, gdouble seconds)
+{
+ gint64 p;
+ gint max_week, jan4_week_day, ordinal_day;
+ GDateTime *dt;
+
+ p = (year * 365 + (year / 4) - (year / 100) + (year / 400)) % 7;
+ max_week = p == 4 ? 53 : 52;
+
+ if (week < 1 || week > max_week || week_day < 1 || week_day > 7)
+ return NULL;
+
+ dt = g_date_time_new (tz, year, 1, 4, 0, 0, 0);
+ g_date_time_get_week_number (dt, NULL, &jan4_week_day, NULL);
+ ordinal_day = (week * 7) + week_day - (jan4_week_day + 3);
+ if (ordinal_day < 0)
+ {
+ year--;
+ ordinal_day += GREGORIAN_LEAP (year) ? 366 : 365;
+ }
+ else if (ordinal_day > (GREGORIAN_LEAP (year) ? 366 : 365))
+ {
+ ordinal_day -= (GREGORIAN_LEAP (year) ? 366 : 365);
+ year++;
+ }
+
+ return g_date_time_new_ordinal (tz, year, ordinal_day, hour, minute, seconds);
+}
+
+static GDateTime *
+parse_iso8601_date (const gchar *text, gsize length,
+ gint hour, gint minute, gdouble seconds, GTimeZone *tz)
+{
+ /* YYYY-MM-DD */
+ if (length == 10 && text[4] == '-' && text[7] == '-')
+ {
+ int year, month, day;
+ if (!get_iso8601_int (text, 4, &year) ||
+ !get_iso8601_int (text + 5, 2, &month) ||
+ !get_iso8601_int (text + 8, 2, &day))
+ return NULL;
+ return g_date_time_new (tz, year, month, day, hour, minute, seconds);
+ }
+ /* YYYY-DDD */
+ else if (length == 8 && text[4] == '-')
+ {
+ gint year, ordinal_day;
+ if (!get_iso8601_int (text, 4, &year) ||
+ !get_iso8601_int (text + 5, 3, &ordinal_day))
+ return NULL;
+ return g_date_time_new_ordinal (tz, year, ordinal_day, hour, minute, seconds);
+ }
+ /* YYYY-Www-D */
+ else if (length == 10 && text[4] == '-' && text[5] == 'W' && text[8] == '-')
+ {
+ gint year, week, week_day;
+ if (!get_iso8601_int (text, 4, &year) ||
+ !get_iso8601_int (text + 6, 2, &week) ||
+ !get_iso8601_int (text + 9, 1, &week_day))
+ return NULL;
+ return g_date_time_new_week (tz, year, week, week_day, hour, minute, seconds);
+ }
+ /* YYYYWwwD */
+ else if (length == 8 && text[4] == 'W')
+ {
+ gint year, week, week_day;
+ if (!get_iso8601_int (text, 4, &year) ||
+ !get_iso8601_int (text + 5, 2, &week) ||
+ !get_iso8601_int (text + 7, 1, &week_day))
+ return NULL;
+ return g_date_time_new_week (tz, year, week, week_day, hour, minute, seconds);
+ }
+ /* YYYYMMDD */
+ else if (length == 8)
+ {
+ int year, month, day;
+ if (!get_iso8601_int (text, 4, &year) ||
+ !get_iso8601_int (text + 4, 2, &month) ||
+ !get_iso8601_int (text + 6, 2, &day))
+ return NULL;
+ return g_date_time_new (tz, year, month, day, hour, minute, seconds);
+ }
+ /* YYYYDDD */
+ else if (length == 7)
+ {
+ gint year, ordinal_day;
+ if (!get_iso8601_int (text, 4, &year) ||
+ !get_iso8601_int (text + 4, 3, &ordinal_day))
+ return NULL;
+ return g_date_time_new_ordinal (tz, year, ordinal_day, hour, minute, seconds);
+ }
+ else
+ return FALSE;
+}
+
+static GTimeZone *
+parse_iso8601_timezone (const gchar *text, gsize length, gssize *tz_offset)
+{
+ gint i, tz_length, offset_sign = 1, offset_hours, offset_minutes;
+ GTimeZone *tz;
+
+ /* UTC uses Z suffix */
+ if (length > 0 && text[length - 1] == 'Z')
+ {
+ *tz_offset = length - 1;
+ return g_time_zone_new_utc ();
+ }
+
+ /* Look for '+' or '-' of offset */
+ for (i = length - 1; i >= 0; i--)
+ if (text[i] == '+' || text[i] == '-')
+ {
+ offset_sign = text[i] == '-' ? -1 : 1;
+ break;
+ }
+ if (i < 0)
+ return NULL;
+ tz_length = length - i;
+
+ /* +hh:mm or -hh:mm */
+ if (tz_length == 6 && text[i+3] == ':')
+ {
+ if (!get_iso8601_int (text + i + 1, 2, &offset_hours) ||
+ !get_iso8601_int (text + i + 4, 2, &offset_minutes))
+ return NULL;
+ }
+ /* +hhmm or -hhmm */
+ else if (tz_length == 5)
+ {
+ if (!get_iso8601_int (text + i + 1, 2, &offset_hours) ||
+ !get_iso8601_int (text + i + 3, 2, &offset_minutes))
+ return NULL;
+ }
+ /* +hh or -hh */
+ else if (tz_length == 3)
+ {
+ if (!get_iso8601_int (text + i + 1, 2, &offset_hours))
+ return NULL;
+ offset_minutes = 0;
+ }
+ else
+ return NULL;
+
+ *tz_offset = i;
+ tz = g_time_zone_new (text + i);
+
+ /* Double-check that the GTimeZone matches our interpretation of the timezone.
+ * Failure would indicate a bug either here of in the GTimeZone code. */
+ g_assert (g_time_zone_get_offset (tz, 0) == offset_sign * (offset_hours * 3600 + offset_minutes * 60));
+
+ return tz;
+}
+
+static gboolean
+parse_iso8601_time (const gchar *text, gsize length,
+ gint *hour, gint *minute, gdouble *seconds, GTimeZone **tz)
+{
+ gssize tz_offset = -1;
+
+ /* Check for timezone suffix */
+ *tz = parse_iso8601_timezone (text, length, &tz_offset);
+ if (tz_offset >= 0)
+ length = tz_offset;
+
+ /* hh:mm:ss(.sss) */
+ if (length >= 8 && text[2] == ':' && text[5] == ':')
+ {
+ return get_iso8601_int (text, 2, hour) &&
+ get_iso8601_int (text + 3, 2, minute) &&
+ get_iso8601_seconds (text + 6, length - 6, seconds);
+ }
+ /* hhmmss(.sss) */
+ else if (length >= 6)
+ {
+ return get_iso8601_int (text, 2, hour) &&
+ get_iso8601_int (text + 2, 2, minute) &&
+ get_iso8601_seconds (text + 4, length - 4, seconds);
+ }
+ else
+ return FALSE;
+}
+
+/**
+ * g_date_time_new_from_iso8601:
+ * @text: an ISO 8601 formatted time string.
+ * @default_tz: (nullable): a #GTimeZone to use if the text doesn't contain a
+ * timezone, or %NULL.
+ *
+ * Creates a #GDateTime corresponding to the given
+ * [ISO 8601 formatted string](https://en.wikipedia.org/wiki/ISO_8601)
+ * @text. ISO 8601 strings of the form <date><sep><time><tz> are supported.
+ *
+ * <sep> is the separator and can be either 'T', 't' or ' '.
+ *
+ * <date> is in the form:
+ *
+ * - `YYYY-MM-DD` - Year/month/day, e.g. 2016-08-24.
+ * - `YYYYMMDD` - Same as above without dividers.
+ * - `YYYY-DDD` - Ordinal day where DDD is from 001 to 366, e.g. 2016-237.
+ * - `YYYYDDD` - Same as above without dividers.
+ * - `YYYY-Www-D` - Week day where ww is from 01 to 52 and D from 1-7,
+ * e.g. 2016-W34-3.
+ * - `YYYYWwwD` - Same as above without dividers.
+ *
+ * <time> is in the form:
+ *
+ * - `hh:mm:ss(.sss)` - Hours, minutes, seconds (subseconds), e.g. 22:10:42.123.
+ * - `hhmmss(.sss)` - Same as above without dividers.
+ *
+ * <tz> is an optional timezone suffix of the form:
+ *
+ * - `Z` - UTC.
+ * - `+hh:mm` or `-hh:mm` - Offset from UTC in hours and minutes, e.g. +12:00.
+ * - `+hh` or `-hh` - Offset from UTC in hours, e.g. +12.
+ *
+ * If the timezone is not provided in @text it must be provided in @default_tz
+ * (this field is otherwise ignored).
+ *
+ * This call can fail (returning %NULL) if @text is not a valid ISO 8601
+ * formatted string.
+ *
+ * You should release the return value by calling g_date_time_unref()
+ * when you are done with it.
+ *
+ * Returns: (transfer full) (nullable): a new #GDateTime, or %NULL
+ *
+ * Since: 2.56
+ */
+GDateTime *
+g_date_time_new_from_iso8601 (const gchar *text, GTimeZone *default_tz)
+{
+ gint length, date_length = -1;
+ gint hour = 0, minute = 0;
+ gdouble seconds = 0.0;
+ GTimeZone *tz = NULL;
+ GDateTime *datetime = NULL;
+
+ g_return_val_if_fail (text != NULL, NULL);
+
+ /* Count length of string and find date / time separator ('T', 't', or ' ') */
+ for (length = 0; text[length] != '\0'; length++)
+ {
+ if (date_length < 0 && (text[length] == 'T' || text[length] == 't' || text[length] == ' '))
+ date_length = length;
+ }
+
+ if (date_length < 0)
+ return NULL;
+
+ if (!parse_iso8601_time (text + date_length + 1, length - (date_length + 1),
+ &hour, &minute, &seconds, &tz))
+ goto out;
+ if (tz == NULL && default_tz == NULL)
+ return NULL;
+
+ datetime = parse_iso8601_date (text, date_length, hour, minute, seconds, tz ? tz : default_tz);
+
+out:
+ if (tz != NULL)
+ g_time_zone_unref (tz);
+ return datetime;
+}
+
/* full new functions {{{1 */
/**
diff --git a/glib/gdatetime.h b/glib/gdatetime.h
index 927e29cfc..025e452a2 100644
--- a/glib/gdatetime.h
+++ b/glib/gdatetime.h
@@ -118,6 +118,10 @@ GDateTime * g_date_time_new_from_timeval_local (const G
GLIB_AVAILABLE_IN_ALL
GDateTime * g_date_time_new_from_timeval_utc (const GTimeVal *tv);
+GLIB_AVAILABLE_IN_2_56
+GDateTime * g_date_time_new_from_iso8601 (const gchar *text,
+ GTimeZone *default_tz);
+
GLIB_AVAILABLE_IN_ALL
GDateTime * g_date_time_new (GTimeZone *tz,
gint year,
diff --git a/glib/genviron.c b/glib/genviron.c
index aa4681753..70cbce931 100644
--- a/glib/genviron.c
+++ b/glib/genviron.c
@@ -67,15 +67,15 @@ g_environ_find (gchar **envp,
/**
* g_environ_getenv:
- * @envp: (nullable) (array zero-terminated=1) (transfer none): an environment
- * list (eg, as returned from g_get_environ()), or %NULL
+ * @envp: (nullable) (array zero-terminated=1) (transfer none) (element-type filename):
+ * an environment list (eg, as returned from g_get_environ()), or %NULL
* for an empty environment list
- * @variable: the environment variable to get
+ * @variable: (type filename): the environment variable to get
*
* Returns the value of the environment variable @variable in the
* provided list @envp.
*
- * Returns: the value of the environment variable, or %NULL if
+ * Returns: (type filename): the value of the environment variable, or %NULL if
* the environment variable is not set in @envp. The returned
* string is owned by @envp, and will be freed if @variable is
* set or unset again.
@@ -99,19 +99,20 @@ g_environ_getenv (gchar **envp,
/**
* g_environ_setenv:
- * @envp: (nullable) (array zero-terminated=1) (transfer full): an
- * environment list that can be freed using g_strfreev() (e.g., as
+ * @envp: (nullable) (array zero-terminated=1) (element-type filename) (transfer full):
+ * an environment list that can be freed using g_strfreev() (e.g., as
* returned from g_get_environ()), or %NULL for an empty
* environment list
- * @variable: the environment variable to set, must not contain '='
- * @value: the value for to set the variable to
+ * @variable: (type filename): the environment variable to set, must not
+ * contain '='
+ * @value: (type filename): the value for to set the variable to
* @overwrite: whether to change the variable if it already exists
*
* Sets the environment variable @variable in the provided list
* @envp to @value.
*
- * Returns: (array zero-terminated=1) (transfer full): the
- * updated environment list. Free it using g_strfreev().
+ * Returns: (array zero-terminated=1) (element-type filename) (transfer full):
+ * the updated environment list. Free it using g_strfreev().
*
* Since: 2.32
*/
@@ -186,16 +187,17 @@ g_environ_unsetenv_internal (gchar **envp,
/**
* g_environ_unsetenv:
- * @envp: (nullable) (array zero-terminated=1) (transfer full): an environment
- * list that can be freed using g_strfreev() (e.g., as returned from g_get_environ()),
- * or %NULL for an empty environment list
- * @variable: the environment variable to remove, must not contain '='
+ * @envp: (nullable) (array zero-terminated=1) (element-type filename) (transfer full):
+ * an environment list that can be freed using g_strfreev() (e.g., as
+ * returned from g_get_environ()), or %NULL for an empty environment list
+ * @variable: (type filename): the environment variable to remove, must not
+ * contain '='
*
* Removes the environment variable @variable from the provided
* environment @envp.
*
- * Returns: (array zero-terminated=1) (transfer full): the
- * updated environment list. Free it using g_strfreev().
+ * Returns: (array zero-terminated=1) (element-type filename) (transfer full):
+ * the updated environment list. Free it using g_strfreev().
*
* Since: 2.32
*/
@@ -217,7 +219,7 @@ g_environ_unsetenv (gchar **envp,
/**
* g_getenv:
- * @variable: the environment variable to get
+ * @variable: (type filename): the environment variable to get
*
* Returns the value of an environment variable.
*
@@ -227,7 +229,7 @@ g_environ_unsetenv (gchar **envp,
* On Windows, in case the environment variable's value contains
* references to other environment variables, they are expanded.
*
- * Returns: the value of the environment variable, or %NULL if
+ * Returns: (type filename): the value of the environment variable, or %NULL if
* the environment variable is not found. The returned string
* may be overwritten by the next call to g_getenv(), g_setenv()
* or g_unsetenv().
@@ -242,8 +244,9 @@ g_getenv (const gchar *variable)
/**
* g_setenv:
- * @variable: the environment variable to set, must not contain '='.
- * @value: the value for to set the variable to.
+ * @variable: (type filename): the environment variable to set, must not
+ * contain '='.
+ * @value: (type filename): the value for to set the variable to.
* @overwrite: whether to change the variable if it already exists.
*
* Sets an environment variable. On UNIX, both the variable's name and
@@ -311,7 +314,8 @@ extern char **environ;
/**
* g_unsetenv:
- * @variable: the environment variable to remove, must not contain '='
+ * @variable: (type filename): the environment variable to remove, must
+ * not contain '='
*
* Removes an environment variable from the environment.
*
@@ -361,8 +365,9 @@ g_unsetenv (const gchar *variable)
* use cases for environment variables in GLib-using programs you want
* the UTF-8 encoding that this function and g_getenv() provide.
*
- * Returns: (array zero-terminated=1) (transfer full): a %NULL-terminated
- * list of strings which must be freed with g_strfreev().
+ * Returns: (array zero-terminated=1) (element-type filename) (transfer full):
+ * a %NULL-terminated list of strings which must be freed with
+ * g_strfreev().
*
* Since: 2.8
*/
@@ -402,8 +407,8 @@ g_listenv (void)
* The return value is freshly allocated and it should be freed with
* g_strfreev() when it is no longer needed.
*
- * Returns: (array zero-terminated=1) (transfer full): the list of
- * environment variables
+ * Returns: (array zero-terminated=1) (element-type filename) (transfer full):
+ * the list of environment variables
*
* Since: 2.28
*/
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index e52f284eb..a084dfcc2 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -49,6 +49,7 @@
#include "gfileutils.h"
#include "gstdio.h"
+#include "gstdioprivate.h"
#include "glibintl.h"
#ifdef HAVE_LINUX_MAGIC_H /* for btrfs check */
@@ -62,6 +63,10 @@
* @title: File Utilities
* @short_description: various file-related functions
*
+ * Do not use these APIs unless you are porting a POSIX application to Windows.
+ * A more high-level file access API is provided as GIO — see the documentation
+ * for #GFile.
+ *
* There is a group of functions which wrap the common POSIX functions
* dealing with filenames (g_open(), g_rename(), g_mkdir(), g_stat(),
* g_unlink(), g_remove(), g_fopen(), g_freopen()). The point of these
@@ -69,6 +74,11 @@
* characters in them on Windows without having to use ifdefs and the
* wide character API in the application code.
*
+ * On some Unix systems, these APIs may be defined as identical to their POSIX
+ * counterparts. For this reason, you must check for and include the necessary
+ * header files (such as `fcntl.h`) before using functions like g_creat(). You
+ * must also define the relevant feature test macros.
+ *
* The pathname argument should be in the GLib file name encoding.
* On POSIX this is the actual on-disk encoding which might correspond
* to the locale settings of the process (or the `G_FILENAME_ENCODING`
@@ -1600,6 +1610,8 @@ g_file_open_tmp (const gchar *tmpl,
gchar *fulltemplate;
gint result;
+ g_return_val_if_fail (error == NULL || *error == NULL, -1);
+
result = g_get_tmp_name (tmpl, &fulltemplate,
wrap_g_open,
O_CREAT | O_EXCL | O_RDWR | O_BINARY,
@@ -1647,6 +1659,8 @@ g_dir_make_tmp (const gchar *tmpl,
{
gchar *fulltemplate;
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
if (g_get_tmp_name (tmpl, &fulltemplate, wrap_g_mkdir, 0, 0700, error) == -1)
return NULL;
else
@@ -1951,6 +1965,44 @@ g_build_pathname_va (const gchar *first_element,
#endif
+static gchar *
+g_build_filename_va (const gchar *first_argument,
+ va_list *args,
+ gchar **str_array)
+{
+ gchar *str;
+
+#ifndef G_OS_WIN32
+ str = g_build_path_va (G_DIR_SEPARATOR_S, first_argument, args, str_array);
+#else
+ str = g_build_pathname_va (first_argument, args, str_array);
+#endif
+
+ return str;
+}
+
+/**
+ * g_build_filename_valist:
+ * @first_element: (type filename): the first element in the path
+ * @args: va_list of remaining elements in path
+ *
+ * Behaves exactly like g_build_filename(), but takes the path elements
+ * as a va_list. This function is mainly meant for language bindings.
+ *
+ * Returns: (type filename): a newly-allocated string that must be freed
+ * with g_free().
+ *
+ * Since: 2.56
+ */
+gchar *
+g_build_filename_valist (const gchar *first_element,
+ va_list *args)
+{
+ g_return_val_if_fail (first_element != NULL, NULL);
+
+ return g_build_filename_va (first_element, args, NULL);
+}
+
/**
* g_build_filenamev:
* @args: (array zero-terminated=1) (element-type filename): %NULL-terminated
@@ -1968,15 +2020,7 @@ g_build_pathname_va (const gchar *first_element,
gchar *
g_build_filenamev (gchar **args)
{
- gchar *str;
-
-#ifndef G_OS_WIN32
- str = g_build_path_va (G_DIR_SEPARATOR_S, NULL, NULL, args);
-#else
- str = g_build_pathname_va (NULL, NULL, args);
-#endif
-
- return str;
+ return g_build_filename_va (NULL, NULL, args);
}
/**
@@ -2011,11 +2055,7 @@ g_build_filename (const gchar *first_element,
va_list args;
va_start (args, first_element);
-#ifndef G_OS_WIN32
- str = g_build_path_va (G_DIR_SEPARATOR_S, first_element, &args, NULL);
-#else
- str = g_build_pathname_va (first_element, &args, NULL);
-#endif
+ str = g_build_filename_va (first_element, &args, NULL);
va_end (args);
return str;
@@ -2039,17 +2079,24 @@ gchar *
g_file_read_link (const gchar *filename,
GError **error)
{
-#ifdef HAVE_READLINK
+#if defined (HAVE_READLINK) || defined (G_OS_WIN32)
gchar *buffer;
size_t size;
- ssize_t read_size;
+ gssize read_size;
- size = 256;
+ g_return_val_if_fail (filename != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ size = 256;
buffer = g_malloc (size);
while (TRUE)
{
+#ifndef G_OS_WIN32
read_size = readlink (filename, buffer, size);
+#else
+ read_size = g_win32_readlink_utf8 (filename, buffer, size);
+#endif
if (read_size < 0)
{
int saved_errno = errno;
@@ -2071,6 +2118,9 @@ g_file_read_link (const gchar *filename,
buffer = g_realloc (buffer, size);
}
#else
+ g_return_val_if_fail (filename != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
g_set_error_literal (error,
G_FILE_ERROR,
G_FILE_ERROR_INVAL,
@@ -2095,7 +2145,7 @@ g_file_read_link (const gchar *filename,
* an absolute file name one that either begins with a directory
* separator such as "\Users\tml" or begins with the root on a drive,
* for example "C:\Windows". The first case also includes UNC paths
- * such as "\\myserver\docs\foo". In all cases, either slashes or
+ * such as "\\\\myserver\docs\foo". In all cases, either slashes or
* backslashes are accepted.
*
* Note that a file name relative to the current drive root does not
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
index fd119d737..4b4b1f952 100644
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -131,6 +131,9 @@ gchar *g_build_filename (const gchar *first_element,
...) G_GNUC_MALLOC G_GNUC_NULL_TERMINATED;
GLIB_AVAILABLE_IN_ALL
gchar *g_build_filenamev (gchar **args) G_GNUC_MALLOC;
+GLIB_AVAILABLE_IN_2_56
+gchar *g_build_filename_valist (const gchar *first_element,
+ va_list *args) G_GNUC_MALLOC;
GLIB_AVAILABLE_IN_ALL
gint g_mkdir_with_parents (const gchar *pathname,
diff --git a/glib/ghook.c b/glib/ghook.c
index 39550e2d2..00187bf79 100644
--- a/glib/ghook.c
+++ b/glib/ghook.c
@@ -136,7 +136,7 @@
* @hook: a #GHook
*
* Returns %TRUE if the #GHook is not in a #GHookList.
-
+ *
* Returns: %TRUE if the #GHook is not in a #GHookList
*/
diff --git a/glib/giochannel.c b/glib/giochannel.c
index fa90ea274..a9567c90d 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -2515,7 +2515,7 @@ g_io_channel_write_unichar (GIOChannel *channel,
if (channel->partial_write_buf[0] != '\0')
{
- g_warning ("Partial charater written before writing unichar.\n");
+ g_warning ("Partial character written before writing unichar.\n");
channel->partial_write_buf[0] = '\0';
}
diff --git a/glib/giowin32.c b/glib/giowin32.c
index 098238845..68eeb6504 100644
--- a/glib/giowin32.c
+++ b/glib/giowin32.c
@@ -2043,8 +2043,8 @@ g_io_channel_win32_new_fd_internal (gint fd,
* same C runtime as GLib uses, which is msvcrt.dll. Note that in
* current Microsoft compilers it is near impossible to convince it to
* build code that would use msvcrt.dll. The last Microsoft compiler
- * version that supported using msvcrt.dll as the C runtime was version
- * 6. The GNU compiler and toolchain for Windows, also known as Mingw,
+ * version that supported using msvcrt.dll as the C runtime was version 6.
+ * The GNU compiler and toolchain for Windows, also known as Mingw,
* fully supports msvcrt.dll.
*
* If you have created a #GIOChannel for a file descriptor and started
diff --git a/glib/gkeyfile.c b/glib/gkeyfile.c
index 4a69642cf..e45661a69 100644
--- a/glib/gkeyfile.c
+++ b/glib/gkeyfile.c
@@ -119,7 +119,7 @@
* are optional.
* Space before and after the '=' character are ignored. Newline, tab,
* carriage return and backslash characters in value are escaped as \n,
- * \t, \r, and \\, respectively. To preserve leading spaces in values,
+ * \t, \r, and \\\\, respectively. To preserve leading spaces in values,
* these can also be escaped as \s.
*
* Key files can store strings (possibly with localized variants), integers,
@@ -152,6 +152,58 @@
* multiple groups with the same name; they are merged together.
* Another difference is that keys and group names in key files are not
* restricted to ASCII characters.
+ *
+ * Here is an example of loading a key file and reading a value:
+ * |[<!-- language="C" -->
+ * g_autoptr(GError) error = NULL;
+ * g_autoptr(GKeyFile) key_file = g_key_file_new ();
+ *
+ * if (!g_key_file_load_from_file (key_file, "key-file.ini", flags, &error))
+ * {
+ * if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+ * g_warning ("Error loading key file: %s", error->message);
+ * return;
+ * }
+ *
+ * g_autofree gchar *val = g_key_file_get_string (key_file, "Group Name", "SomeKey", &error);
+ * if (val == NULL &&
+ * !g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
+ * {
+ * g_warning ("Error finding key in key file: %s", error->message);
+ * return;
+ * }
+ * else if (val == NULL)
+ * {
+ * // Fall back to a default value.
+ * val = g_strdup ("default-value");
+ * }
+ * ]|
+ *
+ * Here is an example of creating and saving a key file:
+ * |[<!-- language="C" -->
+ * g_autoptr(GKeyFile) key_file = g_key_file_new ();
+ * const gchar *val = …;
+ * g_autoptr(GError) error = NULL;
+ *
+ * g_key_file_set_string (key_file, "Group Name", "SomeKey", val);
+ *
+ * // Save as a file.
+ * if (!g_key_file_save_to_file (key_file, "key-file.ini", &error))
+ * {
+ * g_warning ("Error saving key file: %s", error->message);
+ * return;
+ * }
+ *
+ * // Or store to a GBytes for use elsewhere.
+ * gsize data_len;
+ * g_autofree guint8 *data = (guint8 *) g_key_file_to_data (key_file, &data_len, &error);
+ * if (data == NULL)
+ * {
+ * g_warning ("Error saving key file: %s", error->message);
+ * return;
+ * }
+ * g_autoptr(GBytes) bytes = g_bytes_new_take (g_steal_pointer (&data), data_len);
+ * ]|
*/
/**
@@ -2218,7 +2270,7 @@ g_key_file_get_locale_string (GKeyFile *key_file,
* Returns the values associated with @key under @group_name
* translated in the given @locale if available. If @locale is
* %NULL then the current locale is assumed.
-
+ *
* If @key cannot be found then %NULL is returned and @error is set
* to #G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated
* with @key cannot be interpreted or no suitable translations
diff --git a/glib/glib-private.c b/glib/glib-private.c
index 290cc8dbd..d2aea9f4c 100644
--- a/glib/glib-private.c
+++ b/glib/glib-private.c
@@ -48,6 +48,13 @@ glib__private__ (void)
g_dir_new_from_dirp,
glib_init,
+
+#ifdef G_OS_WIN32
+ g_win32_stat_utf8,
+ g_win32_lstat_utf8,
+ g_win32_readlink_utf8,
+ g_win32_fstat,
+#endif
};
return &table;
diff --git a/glib/glib-private.h b/glib/glib-private.h
index 84f42dfbb..31acd9386 100644
--- a/glib/glib-private.h
+++ b/glib/glib-private.h
@@ -20,6 +20,7 @@
#include <glib.h>
#include "gwakeup.h"
+#include "gstdioprivate.h"
#if defined(__GNUC__)
# define _g_alignof(type) (__alignof__ (type))
@@ -64,6 +65,23 @@ typedef struct {
/* See glib-init.c */
void (* glib_init) (void);
+ /* See gstdio.c */
+#ifdef G_OS_WIN32
+ int (* g_win32_stat_utf8) (const gchar *filename,
+ GWin32PrivateStat *buf);
+
+ int (* g_win32_lstat_utf8) (const gchar *filename,
+ GWin32PrivateStat *buf);
+
+ int (* g_win32_readlink_utf8) (const gchar *filename,
+ gchar *buf,
+ gsize buf_size);
+
+ int (* g_win32_fstat) (int fd,
+ GWin32PrivateStat *buf);
+#endif
+
+
/* Add other private functions here, initialize them in glib-private.c */
} GLibPrivateVTable;
diff --git a/glib/glib-unix.c b/glib/glib-unix.c
index a456357d5..6a5faf02f 100644
--- a/glib/glib-unix.c
+++ b/glib/glib-unix.c
@@ -392,7 +392,7 @@ g_unix_fd_add_full (gint priority,
* g_unix_fd_add:
* @fd: a file descriptor
* @condition: IO conditions to watch for on @fd
- * @function: a #GPollFDFunc
+ * @function: a #GUnixFDSourceFunc
* @user_data: data to pass to @function
*
* Sets a function to be called when the IO condition, as specified by
diff --git a/glib/glibconfig.h.win32.in b/glib/glibconfig.h.win32.in
index a8d8c0c35..d16e7c821 100644
--- a/glib/glibconfig.h.win32.in
+++ b/glib/glibconfig.h.win32.in
@@ -15,6 +15,13 @@
#include <limits.h>
#include <float.h>
+/* #undef GLIB_HAVE_ALLOCA_H */
+
+/* Specifies that GLib's g_print*() functions wrap the
+ * system printf functions. This is useful to know, for example,
+ * when using glibc's register_printf_function().
+ */
+#define GLIB_USING_SYSTEM_PRINTF
G_BEGIN_DECLS
@@ -46,24 +53,11 @@ typedef unsigned int guint32;
#define G_GUINT32_FORMAT "u"
#define G_HAVE_GINT64 1 /* deprecated, always true */
-#ifndef _MSC_VER
G_GNUC_EXTENSION typedef signed long long gint64;
G_GNUC_EXTENSION typedef unsigned long long guint64;
-#else /* _MSC_VER */
-typedef signed __int64 gint64;
-typedef unsigned __int64 guint64;
-#endif /* _MSC_VER */
-#ifndef _MSC_VER
#define G_GINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##LL))
-#else /* _MSC_VER */
-#define G_GINT64_CONSTANT(val) (val##i64)
-#endif /* _MSC_VER */
-#ifndef _MSC_VER
#define G_GUINT64_CONSTANT(val) (G_GNUC_EXTENSION (val##ULL))
-#else /* _MSC_VER */
-#define G_GUINT64_CONSTANT(val) (val##Ui64)
-#endif /* _MSC_VER */
#define G_GINT64_MODIFIER "I64"
#define G_GINT64_FORMAT "I64i"
#define G_GUINT64_FORMAT "I64u"
@@ -79,7 +73,7 @@ typedef unsigned long long gsize;
#define G_GSIZE_MODIFIER "I64"
#define G_GSSIZE_MODIFIER "I64"
#define G_GSIZE_FORMAT "I64u"
-#define G_GSSIZE_FORMAT "I64d"
+#define G_GSSIZE_FORMAT "I64i"
#define G_MAXSIZE G_MAXUINT64
#define G_MINSSIZE G_MININT64
@@ -113,45 +107,35 @@ typedef gint64 goffset;
#define G_GOFFSET_CONSTANT(val) G_GINT64_CONSTANT(val)
-#ifndef _WIN64
-
-#define G_POLLFD_FORMAT "%#x"
-
-#define GPOINTER_TO_INT(p) ((gint) (p))
-#define GPOINTER_TO_UINT(p) ((guint) (p))
+#ifdef _WIN64
+# define G_POLLFD_FORMAT "%#I64x"
+# define GPOINTER_TO_INT(p) ((gint) (gint64) (p))
+# define GPOINTER_TO_UINT(p) ((guint) (guint64) (p))
-#define GINT_TO_POINTER(i) ((gpointer) (i))
-#define GUINT_TO_POINTER(u) ((gpointer) (u))
+# define GINT_TO_POINTER(i) ((gpointer) (gint64) (i))
+# define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u))
-typedef signed int gintptr;
-typedef unsigned int guintptr;
-
-#define G_GINTPTR_MODIFIER ""
-#define G_GINTPTR_FORMAT "i"
-#define G_GUINTPTR_FORMAT "u"
+typedef signed long long gintptr;
+typedef unsigned long long guintptr;
+# define G_GINTPTR_MODIFIER "I64"
+# define G_GINTPTR_FORMAT "I64i"
+# define G_GUINTPTR_FORMAT "I64u"
#else
+# define G_POLLFD_FORMAT "%#x"
-#define G_POLLFD_FORMAT "%#I64x"
-
-#define GPOINTER_TO_INT(p) ((gint) (gint64) (p))
-#define GPOINTER_TO_UINT(p) ((guint) (guint64) (p))
+# define GPOINTER_TO_INT(p) ((gint) (gint) (p))
+# define GPOINTER_TO_UINT(p) ((guint) (guint) (p))
-#define GINT_TO_POINTER(i) ((gpointer) (gint64) (i))
-#define GUINT_TO_POINTER(u) ((gpointer) (guint64) (u))
-
-#ifndef _MSC_VER
-typedef signed long long gintptr;
-typedef unsigned long long guintptr;
-#else
-typedef signed __int64 gintptr;
-typedef unsigned __int64 guintptr;
-#endif
+# define GINT_TO_POINTER(i) ((gpointer) (gint) (i))
+# define GUINT_TO_POINTER(u) ((gpointer) (guint) (u))
-#define G_GINTPTR_MODIFIER "I64"
-#define G_GINTPTR_FORMAT "I64i"
-#define G_GUINTPTR_FORMAT "I64u"
+typedef signed int gintptr;
+typedef unsigned int guintptr;
+# define G_GINTPTR_MODIFIER ""
+# define G_GINTPTR_FORMAT "i"
+# define G_GUINTPTR_FORMAT "u"
#endif
#ifndef G_DISABLE_DEPRECATED
@@ -173,7 +157,9 @@ typedef unsigned __int64 guintptr;
#endif /* not _MSC_VER or 2013 or later */
#ifndef _MSC_VER
-#define G_HAVE_ISO_VARARGS 1
+# define G_HAVE_ISO_VARARGS 1
+# define G_HAVE_GNUC_VARARGS 1
+# define G_HAVE_GNUC_VISIBILITY 1
/* gcc-2.95.x supports both gnu style and ISO varargs, but if -ansi
* is passed ISO vararg support is turned off, and there is no work
@@ -183,16 +169,21 @@ typedef unsigned __int64 guintptr;
# undef G_HAVE_ISO_VARARGS
#endif
-#define G_HAVE_GNUC_VARARGS 1
+#define G_HAVE_GROWING_STACK 0
+
#else /* _MSC_VER */
-/* varargs macros available since msvc8 (vs2005) */
-# if _MSC_VER >= 1400
-# define G_HAVE_ISO_VARARGS 1
-# endif
+# define G_HAVE_ISO_VARARGS 1
#endif /* not _MSC_VER */
-#define G_HAVE_GROWING_STACK 0
-#define G_GNUC_INTERNAL
+#if defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)
+# define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
+# define G_GNUC_INTERNAL __hidden
+#elif defined (__GNUC__) && defined (G_HAVE_GNUC_VISIBILITY)
+# define G_GNUC_INTERNAL __attribute__((visibility("hidden")))
+#else
+# define G_GNUC_INTERNAL
+#endif
#define G_THREADS_ENABLED
#define G_THREADS_IMPL_WIN32
@@ -234,12 +225,12 @@ typedef unsigned __int64 guintptr;
#define G_BYTE_ORDER G_LITTLE_ENDIAN
-#define GLIB_SYSDEF_POLLIN =1
-#define GLIB_SYSDEF_POLLOUT =4
-#define GLIB_SYSDEF_POLLPRI =2
-#define GLIB_SYSDEF_POLLHUP =16
-#define GLIB_SYSDEF_POLLERR =8
-#define GLIB_SYSDEF_POLLNVAL =32
+#define GLIB_SYSDEF_POLLIN =768
+#define GLIB_SYSDEF_POLLOUT =16
+#define GLIB_SYSDEF_POLLPRI =1024
+#define GLIB_SYSDEF_POLLHUP =2
+#define GLIB_SYSDEF_POLLERR =1
+#define GLIB_SYSDEF_POLLNVAL =4
#define G_MODULE_SUFFIX "dll"
diff --git a/glib/gmacros.h b/glib/gmacros.h
index ceb74289a..7b980fb34 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -165,7 +165,13 @@
#define G_GNUC_DEPRECATED_FOR(f) G_GNUC_DEPRECATED
#endif /* __GNUC__ */
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#ifdef __ICC
+#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+ _Pragma ("warning (push)") \
+ _Pragma ("warning (disable:1478)")
+#define G_GNUC_END_IGNORE_DEPRECATIONS \
+ _Pragma ("warning (pop)")
+#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
_Pragma ("GCC diagnostic push") \
_Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
diff --git a/glib/gmain.c b/glib/gmain.c
index 8ca54de3a..7e7e44b27 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -277,7 +277,8 @@ struct _GMainContext
guint next_id;
GList *source_lists;
- gint in_check_or_prepare;
+ gboolean in_check_or_prepare;
+ gboolean need_wakeup;
GPollRec *poll_records;
guint n_poll_records;
@@ -651,6 +652,7 @@ g_main_context_new (void)
context->pending_dispatches = g_ptr_array_new ();
+ context->need_wakeup = FALSE;
context->time_is_fresh = FALSE;
context->wakeup = g_wakeup_new ();
@@ -753,7 +755,7 @@ static GPrivate thread_context_stack = G_PRIVATE_INIT (free_context_stack);
* g_main_context_push_thread_default() / g_main_context_pop_thread_default()
* pair, otherwise threads that are re-used will end up never explicitly
* releasing the #GMainContext reference they hold.
-
+ *
* In some cases you may want to schedule a single operation in a
* non-default context, or temporarily use a non-default context in
* the main thread. In that case, you can wrap the call to the
@@ -1127,17 +1129,11 @@ source_remove_from_context (GSource *source,
static void
conditional_wakeup (GMainContext *context)
{
- /* We want to signal wakeups in two cases:
- * 1 When the context is owned by another thread
- * 2 When the context owner is NULL (two subcases)
- * 2a Possible if the context has never been acquired
- * 2b Or if the context has no current owner
- *
- * At least case 2a) is necessary to ensure backwards compatibility with
- * qemu's use of GMainContext.
- * https://bugzilla.gnome.org/show_bug.cgi?id=761102#c14
+ /* This flag is set if at the start of prepare() we have no other ready
+ * sources, and hence would wait in poll(). In that case, any other threads
+ * attaching sources will need to signal a wakeup.
*/
- if (context->owner != G_THREAD_SELF)
+ if (context->need_wakeup)
g_wakeup_signal (context->wakeup);
}
@@ -1847,29 +1843,16 @@ g_source_set_ready_time (GSource *source,
GMainContext *context;
g_return_if_fail (source != NULL);
- /* We deliberately don't check for ref_count > 0 here, because that
- * breaks cancellable_source_cancelled() in GCancellable: it has no
- * way to find out that the last-unref has happened until the
- * finalize() function is called, but that's too late, because the
- * ref_count already has already reached 0 before that time.
- * However, priv is only poisoned (set to NULL) after finalize(),
- * so we can use this as a simple guard against use-after-free.
- * See https://bugzilla.gnome.org/show_bug.cgi?id=791754 */
- g_return_if_fail (source->priv != NULL);
+ g_return_if_fail (source->ref_count > 0);
+
+ if (source->priv->ready_time == ready_time)
+ return;
context = source->context;
if (context)
LOCK_CONTEXT (context);
- if (source->priv->ready_time == ready_time)
- {
- if (context)
- UNLOCK_CONTEXT (context);
-
- return;
- }
-
source->priv->ready_time = ready_time;
TRACE (GLIB_SOURCE_SET_READY_TIME (source, ready_time));
@@ -2430,6 +2413,40 @@ g_source_remove_by_funcs_user_data (GSourceFuncs *funcs,
return FALSE;
}
+/**
+ * g_clear_handle_id: (skip)
+ * @tag_ptr: (not nullable): a pointer to the handler ID
+ * @clear_func: (not nullable): the function to call to clear the handler
+ *
+ * Clears a numeric handler, such as a #GSource ID.
+ *
+ * @tag_ptr must be a valid pointer to the variable holding the handler.
+ *
+ * If the ID is zero then this function does nothing.
+ * Otherwise, clear_func() is called with the ID as a parameter, and the tag is
+ * set to zero.
+ *
+ * A macro is also included that allows this function to be used without
+ * pointer casts.
+ *
+ * Since: 2.56
+ */
+#undef g_clear_handle_id
+void
+g_clear_handle_id (guint *tag_ptr,
+ GClearHandleFunc clear_func)
+{
+ guint _handle_id;
+
+ _handle_id = *tag_ptr;
+ if (_handle_id > 0)
+ {
+ *tag_ptr = 0;
+ if (clear_func != NULL)
+ clear_func (_handle_id);
+ }
+}
+
#ifdef G_OS_UNIX
/**
* g_source_add_unix_fd:
@@ -3400,6 +3417,10 @@ g_main_context_prepare (GMainContext *context,
LOCK_CONTEXT (context);
+ /* context->need_wakeup is protected by LOCK_CONTEXT/UNLOCK_CONTEXT,
+ * so need not set it yet.
+ */
+
context->time_is_fresh = FALSE;
if (context->in_check_or_prepare)
@@ -3525,6 +3546,8 @@ g_main_context_prepare (GMainContext *context,
}
}
g_source_iter_clear (&iter);
+ /* See conditional_wakeup() where this is used */
+ context->need_wakeup = (n_ready == 0);
TRACE (GLIB_MAIN_CONTEXT_AFTER_PREPARE (context, current_priority, n_ready));
@@ -3659,6 +3682,12 @@ g_main_context_check (GMainContext *context,
TRACE (GLIB_MAIN_CONTEXT_BEFORE_CHECK (context, max_priority, fds, n_fds));
+ /* We don't need to wakeup during check or dispatch, because
+ * all sources will be re-evaluated during prepare/query.
+ */
+ context->need_wakeup = FALSE;
+
+ /* And if we have a wakeup pending, acknowledge it */
for (i = 0; i < n_fds; i++)
{
if (fds[i].fd == context->wake_up_rec.fd)
@@ -5030,7 +5059,7 @@ dispatch_unix_signals_unlocked (void)
GSList *node;
gint i;
- /* clear this first incase another one arrives while we're processing */
+ /* clear this first in case another one arrives while we're processing */
any_unix_signal_pending = FALSE;
/* We atomically test/clear the bit from the global array in case
@@ -5085,7 +5114,7 @@ dispatch_unix_signals_unlocked (void)
}
else if (pid == -1 && errno == ECHILD)
{
- g_warning ("GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_child_watch_add()/g_spawn_sync() either directly or indirectly.");
+ g_warning ("GChildWatchSource: Exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.");
source->child_exited = TRUE;
source->child_status = 0;
wake_source ((GSource *) source);
@@ -5326,14 +5355,24 @@ g_unix_signal_handler (int signum)
* source is still active. Typically, you will want to call
* g_spawn_close_pid() in the callback function for the source.
*
- * Note further that using g_child_watch_source_new() is not
- * compatible with calling `waitpid` with a nonpositive first
- * argument in the application. Calling waitpid() for individual
- * pids will still work fine.
+ * On POSIX platforms, the following restrictions apply to this API
+ * due to limitations in POSIX process interfaces:
+ *
+ * * @pid must be a child of this process
+ * * @pid must be positive
+ * * the application must not call `waitpid` with a non-positive
+ * first argument, for instance in another thread
+ * * the application must not wait for @pid to exit by any other
+ * mechanism, including `waitpid(pid, ...)` or a second child-watch
+ * source for the same @pid
+ * * the application must not ignore SIGCHILD
+ *
+ * If any of those conditions are not met, this and related APIs will
+ * not work correctly. This can often be diagnosed via a GLib warning
+ * stating that `ECHILD` was received by `waitpid`.
*
- * Similarly, on POSIX platforms, the @pid passed to this function must
- * be greater than 0 (i.e. this function must wait for a specific child,
- * and cannot wait for one of many children by using a nonpositive argument).
+ * Calling `waitpid` for specific processes other than @pid remains a
+ * valid thing to do.
*
* Returns: the newly-created child watch source
*
@@ -5398,6 +5437,8 @@ g_child_watch_source_new (GPid pid)
* in the callback function for the source.
*
* GLib supports only a single callback per process id.
+ * On POSIX platforms, the same restrictions mentioned for
+ * g_child_watch_source_new() apply to this function.
*
* This internally creates a main loop source using
* g_child_watch_source_new() and attaches it to the main loop context
@@ -5456,6 +5497,8 @@ g_child_watch_add_full (gint priority,
* g_spawn_close_pid() in the callback function for the source.
*
* GLib supports only a single callback per process id.
+ * On POSIX platforms, the same restrictions mentioned for
+ * g_child_watch_source_new() apply to this function.
*
* This internally creates a main loop source using
* g_child_watch_source_new() and attaches it to the main loop context
@@ -5681,7 +5724,7 @@ g_main_context_invoke (GMainContext *context,
* invocation of @function.
*
* This function is the same as g_main_context_invoke() except that it
- * lets you specify the priority incase @function ends up being
+ * lets you specify the priority in case @function ends up being
* scheduled as an idle and also lets you give a #GDestroyNotify for @data.
*
* @notify should not assume that it is called from any particular
diff --git a/glib/gmain.h b/glib/gmain.h
index 497992789..a7da20d84 100644
--- a/glib/gmain.h
+++ b/glib/gmain.h
@@ -70,7 +70,7 @@ typedef struct _GSourcePrivate GSourcePrivate;
* @unref: Called when a reference to the callback object is dropped
* @get: Called to extract the callback function and data from the
* callback object.
-
+ *
* The `GSourceCallbackFuncs` struct contains
* functions for managing callback objects.
*/
@@ -563,6 +563,38 @@ GLIB_AVAILABLE_IN_ALL
gboolean g_source_remove_by_funcs_user_data (GSourceFuncs *funcs,
gpointer user_data);
+/**
+ * GClearHandleFunc:
+ * @handle_id: the handle ID to clear
+ *
+ * Specifies the type of function passed to g_clear_handle_id().
+ * The implementation is expected to free the resource identified
+ * by @handle_id; for instance, if @handle_id is a #GSource ID,
+ * g_source_remove() can be used.
+ *
+ * Since: 2.56
+ */
+typedef void (* GClearHandleFunc) (guint handle_id);
+
+GLIB_AVAILABLE_IN_2_56
+void g_clear_handle_id (guint *tag_ptr,
+ GClearHandleFunc clear_func);
+
+#define g_clear_handle_id(tag_ptr, clear_func) \
+ G_STMT_START { \
+ G_STATIC_ASSERT (sizeof *(tag_ptr) == sizeof (guint)); \
+ guint *_tag_ptr = (guint *) (tag_ptr); \
+ guint _handle_id; \
+ \
+ _handle_id = *_tag_ptr; \
+ if (_handle_id > 0) \
+ { \
+ *_tag_ptr = 0; \
+ if (clear_func != NULL) \
+ clear_func (_handle_id); \
+ } \
+ } G_STMT_END
+
/* Idles, child watchers and timeouts */
GLIB_AVAILABLE_IN_ALL
guint g_timeout_add_full (gint priority,
diff --git a/glib/gmem.c b/glib/gmem.c
index aa981de1c..0140d4b71 100644
--- a/glib/gmem.c
+++ b/glib/gmem.c
@@ -475,7 +475,8 @@ g_mem_is_system_malloc (void)
* in GLib and GIO, because those use the GLib allocators before main is
* reached. Therefore this function is now deprecated and is just a stub.
*
- * Deprecated: 2.46: Use other memory profiling tools instead
+ * Deprecated: 2.46: This function now does nothing. Use other memory
+ * profiling tools instead
*/
void
g_mem_set_vtable (GMemVTable *vtable)
diff --git a/glib/gmessages.c b/glib/gmessages.c
index f3e343bf5..8c9f558a9 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -94,7 +94,7 @@
* * Color output needed to be supported on the terminal, to make reading
* through logs easier.
*
- * ## Using Structured Logging
+ * ## Using Structured Logging ## {#using-structured-logging}
*
* To use structured logging (rather than the old-style logging), either use
* the g_log_structured() and g_log_structured_array() functions; or define
@@ -104,7 +104,7 @@
* You do not need to define `G_LOG_USE_STRUCTURED` to use g_log_structured(),
* but it is a good idea to avoid confusion.
*
- * ## Log Domains
+ * ## Log Domains ## {#log-domains}
*
* Log domains may be used to broadly split up the origins of log messages.
* Typically, there are one or a few log domains per application or library.
@@ -116,7 +116,7 @@
* application or library name, optionally followed by a hyphen and a sub-domain
* name. For example, `bloatpad` or `bloatpad-io`.
*
- * ## Debug Message Output
+ * ## Debug Message Output ## {#debug-message-output}
*
* The default log functions (g_log_default_handler() for the old-style API and
* g_log_writer_default() for the structured API) both drop debug and
@@ -129,7 +129,7 @@
* so that developers can re-use the same debugging techniques and tools across
* projects.
*
- * ## Testing for Messages
+ * ## Testing for Messages ## {#testing-for-messages}
*
* With the old g_log() API, g_test_expect_message() and
* g_test_assert_expected_messages() could be used in simple cases to check
@@ -189,6 +189,7 @@
#include "gcharset.h"
#include "gconvert.h"
#include "genviron.h"
+#include "gmain.h"
#include "gmem.h"
#include "gprintfint.h"
#include "gtestutils.h"
@@ -273,19 +274,27 @@ myInvalidParameterHandler(const wchar_t *expression,
/**
* G_LOG_DOMAIN:
*
- * Defines the log domain.
+ * Defines the log domain. See [Log Domains](#log-domains).
*
* Libraries should define this so that any messages
* which they log can be differentiated from messages from other
* libraries and application code. But be careful not to define
* it in any public header files.
*
- * For example, GTK+ uses this in its Makefile.am:
+ * Log domains must be unique, and it is recommended that they are the
+ * application or library name, optionally followed by a hyphen and a sub-domain
+ * name. For example, `bloatpad` or `bloatpad-io`.
+ *
+ * If undefined, it defaults to the default %NULL (or `""`) log domain; this is
+ * not advisable, as it cannot be filtered against using the `G_MESSAGES_DEBUG`
+ * environment variable.
+ *
+ * For example, GTK+ uses this in its `Makefile.am`:
* |[
* AM_CPPFLAGS = -DG_LOG_DOMAIN=\"Gtk\"
* ]|
*
- * Applications can choose to leave it as the default %NULL (or "")
+ * Applications can choose to leave it as the default %NULL (or `""`)
* domain. However, defining the domain offers the same advantages as
* above.
*
@@ -371,7 +380,8 @@ myInvalidParameterHandler(const wchar_t *expression,
* @...: format string, followed by parameters to insert
* into the format string (as with printf())
*
- * A convenience function/macro to log a warning message.
+ * A convenience function/macro to log a warning message. The message should
+ * typically *not* be translated to the user's language.
*
* This is not intended for end user error reporting. Use of #GError is
* preferred for that instead, as it allows calling functions to perform actions
@@ -379,7 +389,14 @@ myInvalidParameterHandler(const wchar_t *expression,
*
* You can make warnings fatal at runtime by setting the `G_DEBUG`
* environment variable (see
- * [Running GLib Applications](glib-running.html)).
+ * [Running GLib Applications](glib-running.html)):
+ *
+ * |[
+ * G_DEBUG=fatal-warnings gdb ./my-program
+ * ]|
+ *
+ * Any unrelated failures can be skipped over in
+ * [gdb](https://www.gnu.org/software/gdb/) using the `continue` command.
*
* If g_log_default_handler() is used as the log handler function,
* a newline character will automatically be appended to @..., and
@@ -404,7 +421,17 @@ myInvalidParameterHandler(const wchar_t *expression,
*
* You can also make critical warnings fatal at runtime by
* setting the `G_DEBUG` environment variable (see
- * [Running GLib Applications](glib-running.html)).
+ * [Running GLib Applications](glib-running.html)):
+ *
+ * |[
+ * G_DEBUG=fatal-warnings gdb ./my-program
+ * ]|
+ *
+ * Any unrelated failures can be skipped over in
+ * [gdb](https://www.gnu.org/software/gdb/) using the `continue` command.
+ *
+ * The message should typically *not* be translated to the
+ * user's language.
*
* If g_log_default_handler() is used as the log handler function, a new-line
* character will automatically be appended to @..., and need not be entered
@@ -420,7 +447,8 @@ myInvalidParameterHandler(const wchar_t *expression,
* @...: format string, followed by parameters to insert
* into the format string (as with printf())
*
- * A convenience function/macro to log an error message.
+ * A convenience function/macro to log an error message. The message should
+ * typically *not* be translated to the user's language.
*
* This is not intended for end user error reporting. Use of #GError is
* preferred for that instead, as it allows calling functions to perform actions
@@ -468,7 +496,8 @@ myInvalidParameterHandler(const wchar_t *expression,
* @...: format string, followed by parameters to insert
* into the format string (as with printf())
*
- * A convenience function/macro to log a debug message.
+ * A convenience function/macro to log a debug message. The message should
+ * typically *not* be translated to the user's language.
*
* If g_log_default_handler() is used as the log handler function, a new-line
* character will automatically be appended to @..., and need not be entered
@@ -846,7 +875,7 @@ g_log_set_handler (const gchar *log_domain,
* @user_data: data passed to the log handler
* @destroy: destroy notify for @user_data, or %NULL
*
- * Like g_log_sets_handler(), but takes a destroy notify for the @user_data.
+ * Like g_log_set_handler(), but takes a destroy notify for the @user_data.
*
* This has no effect if structured logging is enabled; see
* [Using Structured Logging][using-structured-logging].
@@ -2191,6 +2220,10 @@ g_log_writer_format_fields (GLogLevelFlags log_level,
const gchar *log_domain = NULL;
gchar level_prefix[STRING_BUFFER_SIZE];
GString *gstring;
+ gint64 now;
+ time_t now_secs;
+ struct tm *now_tm;
+ gchar time_buf[128];
/* Extract some common fields. */
for (i = 0; (message == NULL || log_domain == NULL) && i < n_fields; i++)
@@ -2232,6 +2265,18 @@ g_log_writer_format_fields (GLogLevelFlags log_level,
g_string_append (gstring, level_prefix);
g_string_append (gstring, ": ");
+
+ /* Timestamp */
+ now = g_get_real_time ();
+ now_secs = (time_t) now / 1000000;
+ now_tm = localtime (&now_secs);
+ strftime (time_buf, sizeof (time_buf), "%H:%M:%S", now_tm);
+
+ g_string_append_printf (gstring, "%s%s.%03d%s: ",
+ use_color ? "\033[34m" : "",
+ time_buf, (gint) ((now / 1000) % 1000),
+ color_reset (use_color));
+
if (message == NULL)
{
g_string_append (gstring, "(NULL) message");
@@ -2262,7 +2307,12 @@ g_log_writer_format_fields (GLogLevelFlags log_level,
return g_string_free (gstring, FALSE);
}
-#if defined(__linux__) && !defined(__BIONIC__)
+/* Enable support for the journal if we're on a recent enough Linux */
+#if defined(__linux__) && !defined(__BIONIC__) && defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
+#define ENABLE_JOURNAL_SENDV
+#endif
+
+#ifdef ENABLE_JOURNAL_SENDV
static int
journal_sendv (struct iovec *iov,
gsize iovlen)
@@ -2346,7 +2396,7 @@ retry2:
return -1;
}
-#endif
+#endif /* ENABLE_JOURNAL_SENDV */
/**
* g_log_writer_journald:
@@ -2376,7 +2426,7 @@ g_log_writer_journald (GLogLevelFlags log_level,
gsize n_fields,
gpointer user_data)
{
-#if defined(__linux__) && !defined(__BIONIC__)
+#ifdef ENABLE_JOURNAL_SENDV
const char equals = '=';
const char newline = '\n';
gsize i, k;
@@ -2456,7 +2506,7 @@ g_log_writer_journald (GLogLevelFlags log_level,
return retval == 0 ? G_LOG_WRITER_HANDLED : G_LOG_WRITER_UNHANDLED;
#else
return G_LOG_WRITER_UNHANDLED;
-#endif
+#endif /* ENABLE_JOURNAL_SENDV */
}
/**
diff --git a/glib/gmessages.h b/glib/gmessages.h
index ee0dca85c..1815186c0 100644
--- a/glib/gmessages.h
+++ b/glib/gmessages.h
@@ -411,7 +411,7 @@ void g_assert_warning (const char *log_domain,
static void g_error (const gchar *format, ...) G_GNUC_NORETURN G_ANALYZER_NORETURN;
static void g_critical (const gchar *format, ...) G_ANALYZER_NORETURN;
-static void
+static inline void
g_error (const gchar *format,
...)
{
@@ -422,7 +422,7 @@ g_error (const gchar *format,
for(;;) ;
}
-static void
+static inline void
g_message (const gchar *format,
...)
{
@@ -431,7 +431,7 @@ g_message (const gchar *format,
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, format, args);
va_end (args);
}
-static void
+static inline void
g_critical (const gchar *format,
...)
{
@@ -440,7 +440,7 @@ g_critical (const gchar *format,
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, format, args);
va_end (args);
}
-static void
+static inline void
g_warning (const gchar *format,
...)
{
@@ -449,7 +449,7 @@ g_warning (const gchar *format,
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, format, args);
va_end (args);
}
-static void
+static inline void
g_info (const gchar *format,
...)
{
@@ -458,7 +458,7 @@ g_info (const gchar *format,
g_logv (G_LOG_DOMAIN, G_LOG_LEVEL_INFO, format, args);
va_end (args);
}
-static void
+static inline void
g_debug (const gchar *format,
...)
{
@@ -533,8 +533,19 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
* the result is usually that a critical message is logged and the current
* function returns.
*
- * If G_DISABLE_CHECKS is defined then the check is not performed. You
+ * If `G_DISABLE_CHECKS` is defined then the check is not performed. You
* should therefore not depend on any side effects of @expr.
+ *
+ * To debug failure of a g_return_if_fail() check, run the code under a debugger
+ * with `G_DEBUG=fatal-criticals` or `G_DEBUG=fatal-warnings` defined in the
+ * environment (see [Running GLib Applications](glib-running.html)):
+ *
+ * |[
+ * G_DEBUG=fatal-warnings gdb ./my-program
+ * ]|
+ *
+ * Any unrelated failures can be skipped over in
+ * [gdb](https://www.gnu.org/software/gdb/) using the `continue` command.
*/
#define g_return_if_fail(expr) G_STMT_START{ (void)0; }G_STMT_END
@@ -557,8 +568,10 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
* the result is usually that a critical message is logged and @val is
* returned from the current function.
*
- * If G_DISABLE_CHECKS is defined then the check is not performed. You
+ * If `G_DISABLE_CHECKS` is defined then the check is not performed. You
* should therefore not depend on any side effects of @expr.
+ *
+ * See g_return_if_fail() for guidance on how to debug failure of this check.
*/
#define g_return_val_if_fail(expr,val) G_STMT_START{ (void)0; }G_STMT_END
@@ -567,6 +580,8 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
*
* Logs a critical message and returns from the current function.
* This can only be used in functions which do not return a value.
+ *
+ * See g_return_if_fail() for guidance on how to debug failure of this check.
*/
#define g_return_if_reached() G_STMT_START{ return; }G_STMT_END
@@ -575,6 +590,8 @@ GPrintFunc g_set_printerr_handler (GPrintFunc func);
* @val: the value to return from the current function
*
* Logs a critical message and returns @val.
+ *
+ * See g_return_if_fail() for guidance on how to debug failure of this check.
*/
#define g_return_val_if_reached(val) G_STMT_START{ return (val); }G_STMT_END
diff --git a/glib/goption.c b/glib/goption.c
index 78698ccb9..dc9ec3bc9 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -489,7 +489,7 @@ g_option_context_get_ignore_unknown_options (GOptionContext *context)
/**
* g_option_context_set_strict_posix:
- * @context: a #GoptionContext
+ * @context: a #GOptionContext
* @strict_posix: the new value
*
* Sets strict POSIX mode.
@@ -530,7 +530,7 @@ g_option_context_set_strict_posix (GOptionContext *context,
/**
* g_option_context_get_strict_posix:
- * @context: a #GoptionContext
+ * @context: a #GOptionContext
*
* Returns whether strict POSIX code is enabled.
*
diff --git a/glib/gpoll.c b/glib/gpoll.c
index 06ba70543..849a04ed3 100644
--- a/glib/gpoll.c
+++ b/glib/gpoll.c
@@ -99,9 +99,9 @@ extern gboolean _g_main_poll_debug;
* don't want to run the full main loop.
*
* Each element of @fds is a #GPollFD describing a single file
- * descriptor to poll. The %fd field indicates the file descriptor,
- * and the %events field indicates the events to poll for. On return,
- * the %revents fields will be filled with the events that actually
+ * descriptor to poll. The @fd field indicates the file descriptor,
+ * and the @events field indicates the events to poll for. On return,
+ * the @revents fields will be filled with the events that actually
* occurred.
*
* On POSIX systems, the file descriptors in @fds can be any sort of
@@ -110,7 +110,7 @@ extern gboolean _g_main_poll_debug;
* Windows, the easiest solution is to construct all of your
* #GPollFDs with g_io_channel_win32_make_pollfd().
*
- * Returns: the number of entries in @fds whose %revents fields
+ * Returns: the number of entries in @fds whose @revents fields
* were filled in, or 0 if the operation timed out, or -1 on error or
* if the call was interrupted.
*
diff --git a/glib/gprintf.c b/glib/gprintf.c
index 2d41f2b89..9293c83e6 100644
--- a/glib/gprintf.c
+++ b/glib/gprintf.c
@@ -38,6 +38,8 @@
* new-line character to the message, so typically @format should end with its
* own new-line character.
*
+ * `glib/gprintf.h` must be explicitly included in order to use this function.
+ *
* Returns: the number of bytes printed.
*
* Since: 2.2
@@ -66,6 +68,8 @@ g_printf (gchar const *format,
* An implementation of the standard fprintf() function which supports
* positional parameters, as specified in the Single Unix Specification.
*
+ * `glib/gprintf.h` must be explicitly included in order to use this function.
+ *
* Returns: the number of bytes printed.
*
* Since: 2.2
@@ -100,6 +104,8 @@ g_fprintf (FILE *file,
* Note that it is usually better to use g_snprintf(), to avoid the
* risk of buffer overflow.
*
+ * `glib/gprintf.h` must be explicitly included in order to use this function.
+ *
* See also g_strdup_printf().
*
* Returns: the number of bytes printed.
@@ -176,6 +182,8 @@ g_snprintf (gchar *string,
* An implementation of the standard vprintf() function which supports
* positional parameters, as specified in the Single Unix Specification.
*
+ * `glib/gprintf.h` must be explicitly included in order to use this function.
+ *
* Returns: the number of bytes printed.
*
* Since: 2.2
@@ -199,6 +207,8 @@ g_vprintf (gchar const *format,
* An implementation of the standard fprintf() function which supports
* positional parameters, as specified in the Single Unix Specification.
*
+ * `glib/gprintf.h` must be explicitly included in order to use this function.
+ *
* Returns: the number of bytes printed.
*
* Since: 2.2
@@ -223,6 +233,8 @@ g_vfprintf (FILE *file,
* An implementation of the standard vsprintf() function which supports
* positional parameters, as specified in the Single Unix Specification.
*
+ * `glib/gprintf.h` must be explicitly included in order to use this function.
+ *
* Returns: the number of bytes printed.
*
* Since: 2.2
@@ -293,6 +305,8 @@ g_vsnprintf (gchar *string,
* string to hold the output, instead of putting the output in a buffer
* you allocate in advance.
*
+ * `glib/gprintf.h` must be explicitly included in order to use this function.
+ *
* Returns: the number of bytes printed.
*
* Since: 2.4
diff --git a/glib/gregex.c b/glib/gregex.c
index a9f6814e2..225b8967c 100644
--- a/glib/gregex.c
+++ b/glib/gregex.c
@@ -2765,7 +2765,7 @@ interpolation_list_needs_match (GList *list)
* to the captured subexpression with the given name. '\0' refers
* to the complete match, but '\0' followed by a number is the octal
* representation of a character. To include a literal '\' in the
- * replacement, write '\\'.
+ * replacement, write '\\\\'.
*
* There are also escapes that changes the case of the following text:
*
diff --git a/glib/gregex.h b/glib/gregex.h
index afae54e6c..45e198df6 100644
--- a/glib/gregex.h
+++ b/glib/gregex.h
@@ -230,7 +230,7 @@ GQuark g_regex_error_quark (void);
* newline in the string, respectively, as well as at the very start
* and end. This can be changed within a pattern by a "(?m)" option
* setting.
- * @G_REGEX_DOTALL: A dot metacharater (".") in the pattern matches all
+ * @G_REGEX_DOTALL: A dot metacharacter (".") in the pattern matches all
* characters, including newlines. Without it, newlines are excluded.
* This option can be changed within a pattern by a ("?s") option setting.
* @G_REGEX_EXTENDED: Whitespace data characters in the pattern are
@@ -243,7 +243,7 @@ GQuark g_regex_error_quark (void);
* it is constrained to match only at the first matching point in the
* string that is being searched. This effect can also be achieved by
* appropriate constructs in the pattern itself such as the "^"
- * metacharater.
+ * metacharacter.
* @G_REGEX_DOLLAR_ENDONLY: A dollar metacharacter ("$") in the pattern
* matches only at the end of the string. Without this option, a
* dollar also matches immediately before the final character if
@@ -321,7 +321,7 @@ typedef enum
* it is constrained to match only at the first matching point in the
* string that is being searched. This effect can also be achieved by
* appropriate constructs in the pattern itself such as the "^"
- * metacharater.
+ * metacharacter.
* @G_REGEX_MATCH_NOTBOL: Specifies that first character of the string is
* not the beginning of a line, so the circumflex metacharacter should
* not match before it. Setting this without #G_REGEX_MULTILINE (at
diff --git a/glib/gscanner.c b/glib/gscanner.c
index ebcd6e9dd..389376c59 100644
--- a/glib/gscanner.c
+++ b/glib/gscanner.c
@@ -712,7 +712,7 @@ g_scanner_scope_add_symbol (GScanner *scanner,
c++;
}
}
- g_hash_table_insert (scanner->symbol_table, key, key);
+ g_hash_table_add (scanner->symbol_table, key);
}
else
key->value = value;
diff --git a/glib/gshell.c b/glib/gshell.c
index f955d93a2..aabf7bcb5 100644
--- a/glib/gshell.c
+++ b/glib/gshell.c
@@ -188,7 +188,7 @@ unquote_string_inplace (gchar* str, gchar** end, GError** err)
/**
* g_shell_quote:
- * @unquoted_string: a literal string
+ * @unquoted_string: (type filename): a literal string
*
* Quotes a string so that the shell (/bin/sh) will interpret the
* quoted string to mean @unquoted_string. If you pass a filename to
@@ -197,7 +197,7 @@ unquote_string_inplace (gchar* str, gchar** end, GError** err)
* quoting style used is undefined (single or double quotes may be
* used).
*
- * Returns: quoted string
+ * Returns: (type filename): quoted string
**/
gchar*
g_shell_quote (const gchar *unquoted_string)
@@ -238,7 +238,7 @@ g_shell_quote (const gchar *unquoted_string)
/**
* g_shell_unquote:
- * @quoted_string: shell-quoted string
+ * @quoted_string: (type filename): shell-quoted string
* @error: error return location or NULL
*
* Unquotes a string as the shell (/bin/sh) would. Only handles
@@ -263,7 +263,7 @@ g_shell_quote (const gchar *unquoted_string)
* be escaped with backslash. Otherwise double quotes preserve things
* literally.
*
- * Returns: an unquoted string
+ * Returns: (type filename): an unquoted string
**/
gchar*
g_shell_unquote (const gchar *quoted_string,
@@ -616,10 +616,10 @@ tokenize_command_line (const gchar *command_line,
/**
* g_shell_parse_argv:
- * @command_line: command line to parse
+ * @command_line: (type filename): command line to parse
* @argcp: (out) (optional): return location for number of args
- * @argvp: (out) (optional) (array length=argcp zero-terminated=1): return
- * location for array of args
+ * @argvp: (out) (optional) (array length=argcp zero-terminated=1) (element-type filename):
+ * return location for array of args
* @error: (optional): return location for error
*
* Parses a command line into an argument vector, in much the same way
diff --git a/glib/gslice.c b/glib/gslice.c
index 6ff3597bb..454c8a602 100644
--- a/glib/gslice.c
+++ b/glib/gslice.c
@@ -118,7 +118,7 @@
*
* // Allocate one block, using the g_slice_new() macro.
* array = g_slice_new (GRealArray);
-
+ *
* // We can now use array just like a normal pointer to a structure.
* array->data = NULL;
* array->len = 0;
@@ -972,7 +972,7 @@ thread_memory_magazine2_free (ThreadMemory *tmem,
* @block_size: the number of bytes to allocate
*
* Allocates a block of memory from the slice allocator.
- * The block adress handed out can be expected to be aligned
+ * The block address handed out can be expected to be aligned
* to at least 1 * sizeof (void*),
* though in general slices are 2 * sizeof (void*) bytes aligned,
* if a malloc() fallback implementation is used instead,
@@ -1492,18 +1492,18 @@ static void
smc_notify_alloc (void *pointer,
size_t size)
{
- size_t adress = (size_t) pointer;
+ size_t address = (size_t) pointer;
if (pointer)
- smc_tree_insert (adress, size);
+ smc_tree_insert (address, size);
}
#if 0
static void
smc_notify_ignore (void *pointer)
{
- size_t adress = (size_t) pointer;
+ size_t address = (size_t) pointer;
if (pointer)
- smc_tree_remove (adress);
+ smc_tree_remove (address);
}
#endif
@@ -1511,13 +1511,13 @@ static int
smc_notify_free (void *pointer,
size_t size)
{
- size_t adress = (size_t) pointer;
+ size_t address = (size_t) pointer;
SmcVType real_size;
gboolean found_one;
if (!pointer)
return 1; /* ignore */
- found_one = smc_tree_lookup (adress, &real_size);
+ found_one = smc_tree_lookup (address, &real_size);
if (!found_one)
{
fprintf (stderr, "GSlice: MemChecker: attempt to release non-allocated block: %p size=%" G_GSIZE_FORMAT "\n", pointer, size);
@@ -1528,7 +1528,7 @@ smc_notify_free (void *pointer,
fprintf (stderr, "GSlice: MemChecker: attempt to release block with invalid size: %p size=%" G_GSIZE_FORMAT " invalid-size=%" G_GSIZE_FORMAT "\n", pointer, real_size, size);
return 0;
}
- if (!smc_tree_remove (adress))
+ if (!smc_tree_remove (address))
{
fprintf (stderr, "GSlice: MemChecker: attempt to release non-allocated block: %p size=%" G_GSIZE_FORMAT "\n", pointer, size);
return 0;
diff --git a/glib/gslist.c b/glib/gslist.c
index 518ee08f7..028237d3d 100644
--- a/glib/gslist.c
+++ b/glib/gslist.c
@@ -386,6 +386,32 @@ g_slist_concat (GSList *list1, GSList *list2)
return list1;
}
+static GSList*
+_g_slist_remove_data (GSList *list,
+ gconstpointer data,
+ gboolean all)
+{
+ GSList *tmp = NULL;
+ GSList **previous_ptr = &list;
+
+ while (*previous_ptr)
+ {
+ tmp = *previous_ptr;
+ if (tmp->data == data)
+ {
+ *previous_ptr = tmp->next;
+ g_slist_free_1 (tmp);
+ if (!all)
+ break;
+ }
+ else
+ {
+ previous_ptr = &tmp->next;
+ }
+ }
+
+ return list;
+}
/**
* g_slist_remove:
* @list: a #GSList
@@ -401,26 +427,7 @@ GSList*
g_slist_remove (GSList *list,
gconstpointer data)
{
- GSList *tmp, *prev = NULL;
-
- tmp = list;
- while (tmp)
- {
- if (tmp->data == data)
- {
- if (prev)
- prev->next = tmp->next;
- else
- list = tmp->next;
-
- g_slist_free_1 (tmp);
- break;
- }
- prev = tmp;
- tmp = prev->next;
- }
-
- return list;
+ return _g_slist_remove_data (list, data, FALSE);
}
/**
@@ -439,58 +446,27 @@ GSList*
g_slist_remove_all (GSList *list,
gconstpointer data)
{
- GSList *tmp, *prev = NULL;
-
- tmp = list;
- while (tmp)
- {
- if (tmp->data == data)
- {
- GSList *next = tmp->next;
-
- if (prev)
- prev->next = next;
- else
- list = next;
-
- g_slist_free_1 (tmp);
- tmp = next;
- }
- else
- {
- prev = tmp;
- tmp = prev->next;
- }
- }
-
- return list;
+ return _g_slist_remove_data (list, data, TRUE);
}
static inline GSList*
_g_slist_remove_link (GSList *list,
GSList *link)
{
- GSList *tmp;
- GSList *prev;
+ GSList *tmp = NULL;
+ GSList **previous_ptr = &list;
- prev = NULL;
- tmp = list;
-
- while (tmp)
+ while (*previous_ptr)
{
+ tmp = *previous_ptr;
if (tmp == link)
{
- if (prev)
- prev->next = tmp->next;
- if (list == tmp)
- list = list->next;
-
+ *previous_ptr = tmp->next;
tmp->next = NULL;
break;
}
- prev = tmp;
- tmp = tmp->next;
+ previous_ptr = &tmp->next;
}
return list;
diff --git a/glib/gspawn.c b/glib/gspawn.c
index 85da03d53..512257050 100644
--- a/glib/gspawn.c
+++ b/glib/gspawn.c
@@ -146,9 +146,12 @@ G_DEFINE_QUARK (g-spawn-exit-error-quark, g_spawn_exit_error)
/**
* g_spawn_async:
- * @working_directory: (type filename) (nullable): child's current working directory, or %NULL to inherit parent's
- * @argv: (array zero-terminated=1): child's argument vector
- * @envp: (array zero-terminated=1) (nullable): child's environment, or %NULL to inherit parent's
+ * @working_directory: (type filename) (nullable): child's current working
+ * directory, or %NULL to inherit parent's
+ * @argv: (array zero-terminated=1) (element-type filename):
+ * child's argument vector
+ * @envp: (array zero-terminated=1) (element-type filename) (nullable):
+ * child's environment, or %NULL to inherit parent's
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before exec()
* @user_data: (closure): user data for @child_setup
@@ -164,7 +167,7 @@ G_DEFINE_QUARK (g-spawn-exit-error-quark, g_spawn_exit_error)
* If you are writing a GTK+ application, and the program you are spawning is a
* graphical application too, then to ensure that the spawned program opens its
* windows on the right screen, you may want to use #GdkAppLaunchContext,
- * #GAppLaunchcontext, or set the %DISPLAY environment variable.
+ * #GAppLaunchContext, or set the %DISPLAY environment variable.
*
* Note that the returned @child_pid on Windows is a handle to the child
* process and not its identifier. Process handles and process identifiers
@@ -256,9 +259,12 @@ read_data (GString *str,
/**
* g_spawn_sync:
- * @working_directory: (type filename) (nullable): child's current working directory, or %NULL to inherit parent's
- * @argv: (array zero-terminated=1): child's argument vector
- * @envp: (array zero-terminated=1) (nullable): child's environment, or %NULL to inherit parent's
+ * @working_directory: (type filename) (nullable): child's current working
+ * directory, or %NULL to inherit parent's
+ * @argv: (array zero-terminated=1) (element-type filename):
+ * child's argument vector
+ * @envp: (array zero-terminated=1) (element-type filename) (nullable):
+ * child's environment, or %NULL to inherit parent's
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before exec()
* @user_data: (closure): user data for @child_setup
@@ -277,7 +283,8 @@ read_data (GString *str,
* the child is stored there; see the documentation of
* g_spawn_check_exit_status() for how to use and interpret this.
* Note that it is invalid to pass %G_SPAWN_DO_NOT_REAP_CHILD in
- * @flags.
+ * @flags, and on POSIX platforms, the same restrictions as for
+ * g_child_watch_source_new() apply.
*
* If an error occurs, no data is returned in @standard_output,
* @standard_error, or @exit_status.
@@ -458,7 +465,7 @@ g_spawn_sync (const gchar *working_directory,
{
if (exit_status)
{
- g_warning ("In call to g_spawn_sync(), exit status of a child process was requested but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a nonpositive first argument; either behavior can break applications that use g_spawn_sync either directly or indirectly.");
+ g_warning ("In call to g_spawn_sync(), exit status of a child process was requested but ECHILD was received by waitpid(). See the documentation of g_child_watch_source_new() for possible causes.");
}
else
{
@@ -508,9 +515,13 @@ g_spawn_sync (const gchar *working_directory,
/**
* g_spawn_async_with_pipes:
- * @working_directory: (type filename) (nullable): child's current working directory, or %NULL to inherit parent's, in the GLib file name encoding
- * @argv: (array zero-terminated=1): child's argument vector, in the GLib file name encoding
- * @envp: (array zero-terminated=1) (nullable): child's environment, or %NULL to inherit parent's, in the GLib file name encoding
+ * @working_directory: (type filename) (nullable): child's current working
+ * directory, or %NULL to inherit parent's, in the GLib file name encoding
+ * @argv: (array zero-terminated=1) (element-type filename): child's argument
+ * vector, in the GLib file name encoding
+ * @envp: (array zero-terminated=1) (element-type filename) (nullable):
+ * child's environment, or %NULL to inherit parent's, in the GLib file
+ * name encoding
* @flags: flags from #GSpawnFlags
* @child_setup: (scope async) (nullable): function to run in the child just before exec()
* @user_data: (closure): user data for @child_setup
@@ -669,7 +680,7 @@ g_spawn_sync (const gchar *working_directory,
* If you are writing a GTK+ application, and the program you are spawning is a
* graphical application too, then to ensure that the spawned program opens its
* windows on the right screen, you may want to use #GdkAppLaunchContext,
- * #GAppLaunchcontext, or set the %DISPLAY environment variable.
+ * #GAppLaunchContext, or set the %DISPLAY environment variable.
*
* Returns: %TRUE on success, %FALSE if an error was set
*/
@@ -718,7 +729,7 @@ g_spawn_async_with_pipes (const gchar *working_directory,
/**
* g_spawn_command_line_sync:
- * @command_line: a command line
+ * @command_line: (type filename): a command line
* @standard_output: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child output
* @standard_error: (out) (array zero-terminated=1) (element-type guint8) (optional): return location for child errors
* @exit_status: (out) (optional): return location for child exit status, as returned by waitpid()
@@ -783,7 +794,7 @@ g_spawn_command_line_sync (const gchar *command_line,
/**
* g_spawn_command_line_async:
- * @command_line: a command line
+ * @command_line: (type filename): a command line
* @error: return location for errors
*
* A simple version of g_spawn_async() that parses a command line with
diff --git a/glib/gspawn.h b/glib/gspawn.h
index 6489f4a87..055743ea2 100644
--- a/glib/gspawn.h
+++ b/glib/gspawn.h
@@ -104,7 +104,7 @@ typedef enum
/**
* GSpawnChildSetupFunc:
- * @user_data: user data to pass to the function.
+ * @user_data: (closure): user data to pass to the function.
*
* Specifies the type of the setup function passed to g_spawn_async(),
* g_spawn_sync() and g_spawn_async_with_pipes(), which can, in very
diff --git a/glib/gstdio.c b/glib/gstdio.c
index 1c2587022..858d56999 100644
--- a/glib/gstdio.c
+++ b/glib/gstdio.c
@@ -42,7 +42,7 @@
#endif
#include "gstdio.h"
-
+#include "gstdioprivate.h"
#if !defined (G_OS_UNIX) && !defined (G_OS_WIN32)
#error Please port this to your operating system
@@ -53,6 +53,538 @@
#define _wstat _wstat32
#endif
+#if defined (G_OS_WIN32)
+
+/* We can't include Windows DDK and Windows SDK simultaneously,
+ * so let's copy this here from MinGW-w64 DDK.
+ * The structure is ultimately documented here:
+ * https://msdn.microsoft.com/en-us/library/ff552012(v=vs.85).aspx
+ */
+typedef struct _REPARSE_DATA_BUFFER
+{
+ ULONG ReparseTag;
+ USHORT ReparseDataLength;
+ USHORT Reserved;
+ union
+ {
+ struct
+ {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[1];
+ } SymbolicLinkReparseBuffer;
+ struct
+ {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[1];
+ } MountPointReparseBuffer;
+ struct
+ {
+ UCHAR DataBuffer[1];
+ } GenericReparseBuffer;
+ };
+} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
+
+static int
+w32_error_to_errno (DWORD error_code)
+{
+ switch (error_code)
+ {
+ case ERROR_ACCESS_DENIED:
+ return EACCES;
+ break;
+ case ERROR_INVALID_HANDLE:
+ return EBADF;
+ break;
+ case ERROR_INVALID_FUNCTION:
+ return EFAULT;
+ break;
+ case ERROR_FILE_NOT_FOUND:
+ return ENOENT;
+ break;
+ case ERROR_PATH_NOT_FOUND:
+ return ENOENT; /* or ELOOP, or ENAMETOOLONG */
+ break;
+ case ERROR_NOT_ENOUGH_MEMORY:
+ case ERROR_OUTOFMEMORY:
+ return ENOMEM;
+ break;
+ default:
+ return EIO;
+ break;
+ }
+}
+
+static int
+_g_win32_stat_utf16_no_trailing_slashes (const gunichar2 *filename,
+ int fd,
+ GWin32PrivateStat *buf,
+ gboolean for_symlink)
+{
+ HANDLE file_handle;
+ gboolean succeeded_so_far;
+ DWORD error_code;
+ struct __stat64 statbuf;
+ BY_HANDLE_FILE_INFORMATION handle_info;
+ FILE_STANDARD_INFO std_info;
+ WIN32_FIND_DATAW finddata;
+ DWORD immediate_attributes;
+ gboolean is_symlink = FALSE;
+ gboolean is_directory;
+ DWORD open_flags;
+ wchar_t *filename_target = NULL;
+ int result;
+
+ if (fd < 0)
+ {
+ immediate_attributes = GetFileAttributesW (filename);
+
+ if (immediate_attributes == INVALID_FILE_ATTRIBUTES)
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+
+ return -1;
+ }
+
+ is_symlink = (immediate_attributes & FILE_ATTRIBUTE_REPARSE_POINT) == FILE_ATTRIBUTE_REPARSE_POINT;
+ is_directory = (immediate_attributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
+
+ open_flags = FILE_ATTRIBUTE_NORMAL;
+
+ if (for_symlink && is_symlink)
+ open_flags |= FILE_FLAG_OPEN_REPARSE_POINT;
+
+ if (is_directory)
+ open_flags |= FILE_FLAG_BACKUP_SEMANTICS;
+
+ file_handle = CreateFileW (filename, FILE_READ_ATTRIBUTES,
+ FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ open_flags,
+ NULL);
+
+ if (file_handle == INVALID_HANDLE_VALUE)
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+ return -1;
+ }
+ }
+ else
+ {
+ file_handle = (HANDLE) _get_osfhandle (fd);
+
+ if (file_handle == INVALID_HANDLE_VALUE)
+ return -1;
+ }
+
+ succeeded_so_far = GetFileInformationByHandle (file_handle,
+ &handle_info);
+ error_code = GetLastError ();
+
+ if (succeeded_so_far)
+ {
+ succeeded_so_far = GetFileInformationByHandleEx (file_handle,
+ FileStandardInfo,
+ &std_info,
+ sizeof (std_info));
+ error_code = GetLastError ();
+ }
+
+ if (!succeeded_so_far)
+ {
+ CloseHandle (file_handle);
+ errno = w32_error_to_errno (error_code);
+ return -1;
+ }
+
+ /* It's tempting to use GetFileInformationByHandleEx(FileAttributeTagInfo),
+ * but it always reports that the ReparseTag is 0.
+ */
+ if (fd < 0)
+ {
+ HANDLE tmp = FindFirstFileW (filename,
+ &finddata);
+
+ if (tmp == INVALID_HANDLE_VALUE)
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+ CloseHandle (file_handle);
+ return -1;
+ }
+
+ FindClose (tmp);
+
+ if (is_symlink && !for_symlink)
+ {
+ /* If filename is a symlink, _wstat64 obtains information about
+ * the symlink (except that st_size will be 0).
+ * To get information about the target we need to resolve
+ * the symlink first. And we need _wstat64() to get st_dev,
+ * it's a bother to try finding it ourselves.
+ */
+ DWORD filename_target_len;
+ DWORD new_len;
+
+ /* Just in case, give it a real memory location instead of NULL */
+ new_len = GetFinalPathNameByHandleW (file_handle,
+ (wchar_t *) &filename_target_len,
+ 0,
+ FILE_NAME_NORMALIZED);
+
+#define SANE_LIMIT 1024 * 10
+ if (new_len >= SANE_LIMIT)
+#undef SANE_LIMIT
+ {
+ new_len = 0;
+ error_code = ERROR_BUFFER_OVERFLOW;
+ }
+ else if (new_len == 0)
+ {
+ error_code = GetLastError ();
+ }
+
+ if (new_len > 0)
+ {
+ const wchar_t *extended_prefix = L"\\\\?\\";
+ const gsize extended_prefix_len = wcslen (extended_prefix);
+ const gsize extended_prefix_len_bytes = sizeof (wchar_t) * extended_prefix_len;
+
+ /* Pretend that new_len doesn't count the terminating NUL char,
+ * and ask for a bit more space than is needed.
+ */
+ filename_target_len = new_len + 5;
+ filename_target = g_malloc (filename_target_len * sizeof (wchar_t));
+
+ new_len = GetFinalPathNameByHandleW (file_handle,
+ filename_target,
+ filename_target_len,
+ FILE_NAME_NORMALIZED);
+
+ /* filename_target_len is already larger than needed,
+ * new_len should be smaller than that, even if the size
+ * is off by 1 for some reason.
+ */
+ if (new_len >= filename_target_len - 1)
+ {
+ new_len = 0;
+ error_code = ERROR_BUFFER_OVERFLOW;
+ g_clear_pointer (&filename_target, g_free);
+ }
+ /* GetFinalPathNameByHandle() is documented to return extended paths,
+ * strip the extended prefix.
+ */
+ else if (new_len > extended_prefix_len &&
+ memcmp (filename_target, extended_prefix, extended_prefix_len_bytes) == 0)
+ {
+ new_len -= extended_prefix_len;
+ memmove (filename_target,
+ filename_target + extended_prefix_len,
+ (new_len + 1) * sizeof (wchar_t));
+ }
+ }
+
+ if (new_len == 0)
+ succeeded_so_far = FALSE;
+ }
+
+ CloseHandle (file_handle);
+ }
+ /* else if fd >= 0 the file_handle was obtained via _get_osfhandle()
+ * and must not be closed, it is owned by fd.
+ */
+
+ if (!succeeded_so_far)
+ {
+ errno = w32_error_to_errno (error_code);
+ return -1;
+ }
+
+ if (fd < 0)
+ result = _wstat64 (filename_target != NULL ? filename_target : filename, &statbuf);
+ else
+ result = _fstat64 (fd, &statbuf);
+
+ if (result != 0)
+ {
+ int errsv = errno;
+
+ g_free (filename_target);
+ errno = errsv;
+
+ return -1;
+ }
+
+ g_free (filename_target);
+
+ buf->st_dev = statbuf.st_dev;
+ buf->st_mode = statbuf.st_mode;
+ buf->volume_serial = handle_info.dwVolumeSerialNumber;
+ buf->file_index = (((guint64) handle_info.nFileIndexHigh) << 32) | handle_info.nFileIndexLow;
+ /* Note that immediate_attributes is for the symlink
+ * (if it's a symlink), while handle_info contains info
+ * about the symlink or the target, depending on the flags
+ * we used earlier.
+ */
+ buf->attributes = handle_info.dwFileAttributes;
+ buf->st_nlink = handle_info.nNumberOfLinks;
+ buf->st_size = (((guint64) handle_info.nFileSizeHigh) << 32) | handle_info.nFileSizeLow;
+ buf->allocated_size = std_info.AllocationSize.QuadPart;
+
+ if (fd < 0 && buf->attributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ buf->reparse_tag = finddata.dwReserved0;
+ else
+ buf->reparse_tag = 0;
+
+ buf->st_ctime = statbuf.st_ctime;
+ buf->st_atime = statbuf.st_atime;
+ buf->st_mtime = statbuf.st_mtime;
+
+ return 0;
+}
+
+static int
+_g_win32_stat_utf8 (const gchar *filename,
+ GWin32PrivateStat *buf,
+ gboolean for_symlink)
+{
+ wchar_t *wfilename;
+ int result;
+ gsize len;
+
+ len = strlen (filename);
+
+ while (len > 0 && G_IS_DIR_SEPARATOR (filename[len - 1]))
+ len--;
+
+ if (len <= 0 ||
+ (g_path_is_absolute (filename) && len <= g_path_skip_root (filename) - filename))
+ len = strlen (filename);
+
+ wfilename = g_utf8_to_utf16 (filename, len, NULL, NULL, NULL);
+
+ if (wfilename == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ result = _g_win32_stat_utf16_no_trailing_slashes (wfilename, -1, buf, for_symlink);
+
+ g_free (wfilename);
+
+ return result;
+}
+
+int
+g_win32_stat_utf8 (const gchar *filename,
+ GWin32PrivateStat *buf)
+{
+ return _g_win32_stat_utf8 (filename, buf, FALSE);
+}
+
+int
+g_win32_lstat_utf8 (const gchar *filename,
+ GWin32PrivateStat *buf)
+{
+ return _g_win32_stat_utf8 (filename, buf, TRUE);
+}
+
+int
+g_win32_fstat (int fd,
+ GWin32PrivateStat *buf)
+{
+ return _g_win32_stat_utf16_no_trailing_slashes (NULL, fd, buf, FALSE);
+}
+
+static int
+_g_win32_readlink_utf16_raw (const gunichar2 *filename,
+ gunichar2 *buf,
+ gsize buf_size)
+{
+ DWORD returned_bytes;
+ BYTE returned_data[MAXIMUM_REPARSE_DATA_BUFFER_SIZE]; /* This is 16k, by the way */
+ HANDLE h;
+ DWORD attributes;
+ REPARSE_DATA_BUFFER *rep_buf;
+ DWORD to_copy;
+ DWORD error_code;
+
+ if (buf_size > G_MAXSIZE / sizeof (wchar_t))
+ {
+ /* "buf_size * sizeof (wchar_t)" overflows */
+ errno = EFAULT;
+ return -1;
+ }
+
+ if ((attributes = GetFileAttributesW (filename)) == 0)
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+ return -1;
+ }
+
+ if ((attributes & FILE_ATTRIBUTE_REPARSE_POINT) == 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* To read symlink target we need to open the file as a reparse
+ * point and use DeviceIoControl() on it.
+ */
+ h = CreateFileW (filename,
+ FILE_READ_ATTRIBUTES | SYNCHRONIZE | GENERIC_READ,
+ FILE_SHARE_READ, NULL, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL
+ | FILE_FLAG_OPEN_REPARSE_POINT
+ | (attributes & FILE_ATTRIBUTE_DIRECTORY ? FILE_FLAG_BACKUP_SEMANTICS : 0),
+ NULL);
+
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+ return -1;
+ }
+
+ if (!DeviceIoControl (h, FSCTL_GET_REPARSE_POINT, NULL, 0,
+ returned_data, MAXIMUM_REPARSE_DATA_BUFFER_SIZE,
+ &returned_bytes, NULL))
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+ CloseHandle (h);
+ return -1;
+ }
+
+ rep_buf = (REPARSE_DATA_BUFFER *) returned_data;
+ to_copy = 0;
+
+ if (rep_buf->ReparseTag == IO_REPARSE_TAG_SYMLINK)
+ {
+ to_copy = rep_buf->SymbolicLinkReparseBuffer.SubstituteNameLength;
+
+ if (to_copy > buf_size * sizeof (wchar_t))
+ to_copy = buf_size * sizeof (wchar_t);
+
+ memcpy (buf,
+ &((BYTE *) rep_buf->SymbolicLinkReparseBuffer.PathBuffer)[rep_buf->SymbolicLinkReparseBuffer.SubstituteNameOffset],
+ to_copy);
+ }
+ else if (rep_buf->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
+ {
+ to_copy = rep_buf->MountPointReparseBuffer.SubstituteNameLength;
+
+ if (to_copy > buf_size * sizeof (wchar_t))
+ to_copy = buf_size * sizeof (wchar_t);
+
+ memcpy (buf,
+ &((BYTE *) rep_buf->MountPointReparseBuffer.PathBuffer)[rep_buf->MountPointReparseBuffer.SubstituteNameOffset],
+ to_copy);
+ }
+
+ CloseHandle (h);
+
+ return to_copy;
+}
+
+static int
+_g_win32_readlink_utf16 (const gunichar2 *filename,
+ gunichar2 *buf,
+ gsize buf_size)
+{
+ const wchar_t *ntobjm_prefix = L"\\??\\";
+ const gsize ntobjm_prefix_len_unichar2 = wcslen (ntobjm_prefix);
+ const gsize ntobjm_prefix_len_bytes = sizeof (gunichar2) * ntobjm_prefix_len_unichar2;
+ int result = _g_win32_readlink_utf16_raw (filename, buf, buf_size);
+
+ if (result <= 0)
+ return result;
+
+ /* Ensure that output is a multiple of sizeof (gunichar2),
+ * cutting any trailing partial gunichar2, if present.
+ */
+ result -= result % sizeof (gunichar2);
+
+ if (result <= 0)
+ return result;
+
+ /* DeviceIoControl () tends to return filenames as NT Object Manager
+ * names , i.e. "\\??\\C:\\foo\\bar".
+ * Remove the leading 4-byte \??\ prefix, as glib (as well as many W32 API
+ * functions) is unprepared to deal with it.
+ */
+ if (result > ntobjm_prefix_len_bytes &&
+ memcmp (buf, ntobjm_prefix, ntobjm_prefix_len_bytes) == 0)
+ {
+ result -= ntobjm_prefix_len_bytes;
+ memmove (buf, buf + ntobjm_prefix_len_unichar2, result);
+ }
+
+ return result;
+}
+
+int
+g_win32_readlink_utf8 (const gchar *filename,
+ gchar *buf,
+ gsize buf_size)
+{
+ wchar_t *wfilename;
+ int result;
+
+ wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
+
+ if (wfilename == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ result = _g_win32_readlink_utf16 (wfilename, (gunichar2 *) buf, buf_size);
+
+ g_free (wfilename);
+
+ if (result > 0)
+ {
+ glong tmp_len;
+ gchar *tmp = g_utf16_to_utf8 ((const gunichar2 *) buf,
+ result / sizeof (gunichar2),
+ NULL,
+ &tmp_len,
+ NULL);
+
+ if (tmp == NULL)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (tmp_len > buf_size - 1)
+ tmp_len = buf_size - 1;
+
+ memcpy (buf, tmp, tmp_len);
+ /* readlink() doesn't NUL-terminate, but we do.
+ * To be compliant, however, we return the
+ * number of bytes without the NUL-terminator.
+ */
+ buf[tmp_len] = '\0';
+ result = tmp_len;
+ g_free (tmp);
+ }
+
+ return result;
+}
+
+#endif
+
/**
* g_access:
* @filename: (type filename): a pathname in the GLib file name encoding
@@ -229,7 +761,7 @@ g_open (const gchar *filename,
* A wrapper for the POSIX creat() function. The creat() function is
* used to convert a pathname into a file descriptor, creating a file
* if necessary.
-
+ *
* On POSIX systems file descriptors are implemented by the operating
* system. On Windows, it's the C library that implements creat() and
* file descriptors. The actual Windows API for opening files is
@@ -482,30 +1014,21 @@ g_stat (const gchar *filename,
GStatBuf *buf)
{
#ifdef G_OS_WIN32
- wchar_t *wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
- int retval;
- int save_errno;
- int len;
-
- if (wfilename == NULL)
- {
- errno = EINVAL;
- return -1;
- }
-
- len = wcslen (wfilename);
- while (len > 0 && G_IS_DIR_SEPARATOR (wfilename[len-1]))
- len--;
- if (len > 0 &&
- (!g_path_is_absolute (filename) || len > g_path_skip_root (filename) - filename))
- wfilename[len] = '\0';
-
- retval = _wstat (wfilename, buf);
- save_errno = errno;
+ GWin32PrivateStat w32_buf;
+ int retval = g_win32_stat_utf8 (filename, &w32_buf);
+
+ buf->st_dev = w32_buf.st_dev;
+ buf->st_ino = w32_buf.st_ino;
+ buf->st_mode = w32_buf.st_mode;
+ buf->st_nlink = w32_buf.st_nlink;
+ buf->st_uid = w32_buf.st_uid;
+ buf->st_gid = w32_buf.st_gid;
+ buf->st_rdev = w32_buf.st_dev;
+ buf->st_size = w32_buf.st_size;
+ buf->st_atime = w32_buf.st_atime;
+ buf->st_mtime = w32_buf.st_mtime;
+ buf->st_ctime = w32_buf.st_ctime;
- g_free (wfilename);
-
- errno = save_errno;
return retval;
#else
return stat (filename, buf);
@@ -539,6 +1062,23 @@ g_lstat (const gchar *filename,
#ifdef HAVE_LSTAT
/* This can't be Win32, so don't do the widechar dance. */
return lstat (filename, buf);
+#elif defined (G_OS_WIN32)
+ GWin32PrivateStat w32_buf;
+ int retval = g_win32_lstat_utf8 (filename, &w32_buf);
+
+ buf->st_dev = w32_buf.st_dev;
+ buf->st_ino = w32_buf.st_ino;
+ buf->st_mode = w32_buf.st_mode;
+ buf->st_nlink = w32_buf.st_nlink;
+ buf->st_uid = w32_buf.st_uid;
+ buf->st_gid = w32_buf.st_gid;
+ buf->st_rdev = w32_buf.st_dev;
+ buf->st_size = w32_buf.st_size;
+ buf->st_atime = w32_buf.st_atime;
+ buf->st_mtime = w32_buf.st_mtime;
+ buf->st_ctime = w32_buf.st_ctime;
+
+ return retval;
#else
return g_stat (filename, buf);
#endif
diff --git a/glib/gstdioprivate.h b/glib/gstdioprivate.h
new file mode 100644
index 000000000..a100abb5e
--- /dev/null
+++ b/glib/gstdioprivate.h
@@ -0,0 +1,65 @@
+/* gstdioprivate.h - Private GLib stdio functions
+ *
+ * Copyright 2017 Руслан Ижбулатов
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __G_STDIOPRIVATE_H__
+#define __G_STDIOPRIVATE_H__
+
+G_BEGIN_DECLS
+
+#if defined (G_OS_WIN32)
+
+struct _GWin32PrivateStat
+{
+ guint32 volume_serial;
+ guint64 file_index;
+ guint64 attributes;
+ guint64 allocated_size;
+ guint32 reparse_tag;
+
+ guint32 st_dev;
+ guint32 st_ino;
+ guint16 st_mode;
+ guint16 st_uid;
+ guint16 st_gid;
+ guint32 st_nlink;
+ guint64 st_size;
+ guint64 st_ctime;
+ guint64 st_atime;
+ guint64 st_mtime;
+};
+
+typedef struct _GWin32PrivateStat GWin32PrivateStat;
+
+int g_win32_stat_utf8 (const gchar *filename,
+ GWin32PrivateStat *buf);
+
+int g_win32_lstat_utf8 (const gchar *filename,
+ GWin32PrivateStat *buf);
+
+int g_win32_readlink_utf8 (const gchar *filename,
+ gchar *buf,
+ gsize buf_size);
+
+int g_win32_fstat (int fd,
+ GWin32PrivateStat *buf);
+
+#endif
+
+G_END_DECLS
+
+#endif /* __G_STDIOPRIVATE_H__ */
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
index fbcca14c0..e7240b612 100644
--- a/glib/gstrfuncs.c
+++ b/glib/gstrfuncs.c
@@ -64,7 +64,7 @@
* duplicating, and manipulating strings.
*
* Note that the functions g_printf(), g_fprintf(), g_sprintf(),
- * g_snprintf(), g_vprintf(), g_vfprintf(), g_vsprintf() and g_vsnprintf()
+ * g_vprintf(), g_vfprintf(), g_vsprintf() and g_vasprintf()
* are declared in the header `gprintf.h` which is not included in `glib.h`
* (otherwise using `glib.h` would drag in `stdio.h`), so you'll have to
* explicitly include `<glib/gprintf.h>` in order to use the GLib
@@ -703,7 +703,7 @@ g_ascii_strtod (const gchar *nptr,
struct lconv *locale_data;
#endif
const char *decimal_point;
- int decimal_point_len;
+ gsize decimal_point_len;
const char *p, *decimal_point_pos;
const char *end = NULL; /* Silence gcc */
int strtod_errno;
@@ -920,7 +920,7 @@ g_ascii_formatd (gchar *buffer,
struct lconv *locale_data;
#endif
const char *decimal_point;
- int decimal_point_len;
+ gsize decimal_point_len;
gchar *p;
int rest_len;
gchar format_char;
@@ -980,8 +980,8 @@ g_ascii_formatd (gchar *buffer,
p++;
if (decimal_point_len > 1)
{
- rest_len = strlen (p + (decimal_point_len-1));
- memmove (p, p + (decimal_point_len-1), rest_len);
+ rest_len = strlen (p + (decimal_point_len - 1));
+ memmove (p, p + (decimal_point_len - 1), rest_len);
p[rest_len] = 0;
}
}
@@ -1522,9 +1522,9 @@ g_ascii_strdown (const gchar *str,
g_return_val_if_fail (str != NULL, NULL);
if (len < 0)
- len = strlen (str);
+ len = (gssize) strlen (str);
- result = g_strndup (str, len);
+ result = g_strndup (str, (gsize) len);
for (s = result; *s; s++)
*s = g_ascii_tolower (*s);
@@ -1552,9 +1552,9 @@ g_ascii_strup (const gchar *str,
g_return_val_if_fail (str != NULL, NULL);
if (len < 0)
- len = strlen (str);
+ len = (gssize) strlen (str);
- result = g_strndup (str, len);
+ result = g_strndup (str, (gsize) len);
for (s = result; *s; s++)
*s = g_ascii_toupper (*s);
@@ -2841,8 +2841,8 @@ gboolean
g_str_has_suffix (const gchar *str,
const gchar *suffix)
{
- int str_len;
- int suffix_len;
+ gsize str_len;
+ gsize suffix_len;
g_return_val_if_fail (str != NULL, FALSE);
g_return_val_if_fail (suffix != NULL, FALSE);
@@ -3095,11 +3095,11 @@ g_str_tokenize_and_fold (const gchar *string,
* call g_str_tokenize_and_fold() on the search term and
* perform lookups into that index.
*
- * As some examples, searching for "fred" would match the potential hit
- * "Smith, Fred" and also "Frédéric". Searching for "Fréd" would match
- * "Frédéric" but not "Frederic" (due to the one-directional nature of
- * accent matching). Searching "fo" would match "Foo" and "Bar Foo
- * Baz", but not "SFO" (because no word as "fo" as a prefix).
+ * As some examples, searching for ‘fred’ would match the potential hit
+ * ‘Smith, Fred’ and also ‘Frédéric’. Searching for ‘Fréd’ would match
+ * ‘Frédéric’ but not ‘Frederic’ (due to the one-directional nature of
+ * accent matching). Searching ‘fo’ would match ‘Foo’ and ‘Bar Foo
+ * Baz’, but not ‘SFO’ (because no word has ‘fo’ as a prefix).
*
* Returns: %TRUE if @potential_hit is a hit
*
diff --git a/glib/gstringchunk.c b/glib/gstringchunk.c
index 6b7e7b470..524eadcef 100644
--- a/glib/gstringchunk.c
+++ b/glib/gstringchunk.c
@@ -248,7 +248,7 @@ g_string_chunk_insert_const (GStringChunk *chunk,
if (!lookup)
{
lookup = g_string_chunk_insert (chunk, string);
- g_hash_table_insert (chunk->const_table, lookup, lookup);
+ g_hash_table_add (chunk->const_table, lookup);
}
return lookup;
diff --git a/glib/gtester-report b/glib/gtester-report
index 7d3139f58..d11b255bc 100755
--- a/glib/gtester-report
+++ b/glib/gtester-report
@@ -75,7 +75,7 @@ def attribute_as_text (node, aname, node_name = None):
def html_indent_string (n):
uncollapsible_space = ' &nbsp;' # HTML won't compress alternating sequences of ' ' and '&nbsp;'
string = ''
- for i in range (0, int((n + 1) / 2)):
+ for i in range (0, (n + 1) / 2):
string += uncollapsible_space
return string
@@ -239,9 +239,10 @@ class HTMLReportWriter(ReportWriter):
if message:
self.lastchar = message[-1]
def handle_info (self):
- self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
- if self.info['revision']:
- self.oprint ('<h5>Report generated from: %(revision)s</h5>\n' % self.info)
+ if 'package' in self.info and 'version' in self.info:
+ self.oprint ('<h3>Package: %(package)s, version: %(version)s</h3>\n' % self.info)
+ if 'revision' in self.info:
+ self.oprint ('<h5>Report generated from: %(revision)s</h5>\n' % self.info)
def handle_text (self, node):
self.oprint (node.nodeValue)
def handle_testcase (self, node, binary):
diff --git a/glib/gtester.c b/glib/gtester.c
index 9451aea56..38a7f9610 100644
--- a/glib/gtester.c
+++ b/glib/gtester.c
@@ -102,37 +102,21 @@ testcase_close (long double duration,
gint exit_status,
guint n_forks)
{
- gboolean success;
-
g_return_if_fail (testcase_open > 0);
test_log_printfe ("%s<duration>%.6Lf</duration>\n", sindent (log_indent), duration);
- success = exit_status == G_TEST_RUN_SUCCESS || exit_status == G_TEST_RUN_SKIPPED;
test_log_printfe ("%s<status exit-status=\"%d\" n-forks=\"%d\" result=\"%s\"/>\n",
sindent (log_indent), exit_status, n_forks,
- success ? "failed" : "success");
+ exit_status ? "failed" : "success");
log_indent -= 2;
test_log_printfe ("%s</testcase>\n", sindent (log_indent));
testcase_open--;
if (gtester_verbose)
- {
- switch (exit_status)
- {
- case G_TEST_RUN_SUCCESS:
- g_print ("OK\n");
- break;
- case G_TEST_RUN_SKIPPED:
- g_print ("SKIP\n");
- break;
- default:
- g_print ("FAIL\n");
- break;
- }
- }
- if (!success && subtest_last_seed)
+ g_print ("%s\n", exit_status ? "FAIL" : "OK");
+ if (exit_status && subtest_last_seed)
g_print ("GTester: last random seed: %s\n", subtest_last_seed);
- if (!success)
+ if (exit_status)
testcase_fail_count += 1;
- if (subtest_mode_fatal && !success)
+ if (subtest_mode_fatal && exit_status)
terminate();
}
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index a9c7a424b..dd8513a5b 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -94,10 +94,6 @@
* variants over plain g_assert() is that the assertion messages can be
* more elaborate, and include the values of the compared entities.
*
- * GLib ships with two utilities called [gtester][gtester] and
- * [gtester-report][gtester-report] to facilitate running tests and producing
- * nicely formatted test reports.
- *
* A full example of creating a test suite with two tests using fixtures:
* |[<!-- language="C" -->
* #include <glib.h>
@@ -161,6 +157,78 @@
* return g_test_run ();
* }
* ]|
+ *
+ * ### Integrating GTest in your project
+ *
+ * If you are using the [Meson](http://mesonbuild.com) build system, you will
+ * typically use the provided `test()` primitive to call the test binaries,
+ * e.g.:
+ *
+ * |[<!-- language="plain" -->
+ * test(
+ * 'foo',
+ * executable('foo', 'foo.c', dependencies: deps),
+ * env: [
+ * 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ * 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ * ],
+ * )
+ *
+ * test(
+ * 'bar',
+ * executable('bar', 'bar.c', dependencies: deps),
+ * env: [
+ * 'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
+ * 'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
+ * ],
+ * )
+ * ]|
+ *
+ * If you are using Autotools, you're strongly encouraged to use the Automake
+ * [TAP](https://testanything.org/) harness; GLib provides template files for
+ * easily integrating with it:
+ *
+ * - [glib-tap.mk](https://git.gnome.org/browse/glib/tree/glib-tap.mk)
+ * - [tap-test](https://git.gnome.org/browse/glib/tree/tap-test)
+ * - [tap-driver.sh](https://git.gnome.org/browse/glib/tree/tap-driver.sh)
+ *
+ * You can copy these files in your own project's root directory, and then
+ * set up your `Makefile.am` file to reference them, for instance:
+ *
+ * |[<!-- language="plain" -->
+ * include $(top_srcdir)/glib-tap.mk
+ *
+ * # test binaries
+ * test_programs = \
+ * foo \
+ * bar
+ *
+ * # data distributed in the tarball
+ * dist_test_data = \
+ * foo.data.txt \
+ * bar.data.txt
+ *
+ * # data not distributed in the tarball
+ * test_data = \
+ * blah.data.txt
+ * ]|
+ *
+ * Make sure to distribute the TAP files, using something like the following
+ * in your top-level `Makefile.am`:
+ *
+ * |[<!-- language="plain" -->
+ * EXTRA_DIST += \
+ * tap-driver.sh \
+ * tap-test
+ * ]|
+ *
+ * `glib-tap.mk` will be distributed implicitly due to being included in a
+ * `Makefile.am`. All three files should be added to version control.
+ *
+ * If you don't have access to the Autotools TAP harness, you can use the
+ * [gtester][gtester] and [gtester-report][gtester-report] tools, and use
+ * the [glib.mk](https://git.gnome.org/browse/glib/tree/glib.mk) Automake
+ * template provided by GLib.
*/
/**
@@ -268,7 +336,7 @@
*
* Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(),
* which is deprecated. g_test_trap_subprocess() uses
- * #GTestTrapSubprocessFlags.
+ * #GTestSubprocessFlags.
*/
/**
@@ -663,6 +731,12 @@ static void gtest_default_log_handler (const gchar *log_domain,
gpointer unused_data);
+typedef enum {
+ G_TEST_RUN_SUCCESS,
+ G_TEST_RUN_SKIPPED,
+ G_TEST_RUN_FAILURE,
+ G_TEST_RUN_INCOMPLETE
+} GTestResult;
static const char * const g_test_result_names[] = {
"OK",
"SKIP",
@@ -706,6 +780,7 @@ static char *test_argv0_dirname;
static const char *test_disted_files_dir;
static const char *test_built_files_dir;
static char *test_initial_cwd = NULL;
+static gboolean test_in_forked_child = FALSE;
static gboolean test_in_subprocess = FALSE;
static GTestConfig mutable_test_config_vars = {
FALSE, /* test_initialized */
@@ -801,7 +876,7 @@ g_test_log (GTestLogType lbit,
case G_TEST_LOG_START_BINARY:
if (test_tap_log)
g_print ("# random seed: %s\n", string2);
- else if (g_test_verbose())
+ else if (g_test_verbose ())
g_print ("GTest: random seed: %s\n", string2);
break;
case G_TEST_LOG_START_SUITE:
@@ -833,15 +908,15 @@ g_test_log (GTestLogType lbit,
else
g_print ("\n");
}
- else if (g_test_verbose())
+ else if (g_test_verbose ())
g_print ("GTest: result: %s\n", g_test_result_names[result]);
- else if (!g_test_quiet())
+ else if (!g_test_quiet ())
g_print ("%s\n", g_test_result_names[result]);
if (fail && test_mode_fatal)
{
if (test_tap_log)
g_print ("Bail out!\n");
- g_abort();
+ g_abort ();
}
if (result == G_TEST_RUN_SKIPPED)
test_skipped_count++;
@@ -849,22 +924,27 @@ g_test_log (GTestLogType lbit,
case G_TEST_LOG_MIN_RESULT:
if (test_tap_log)
g_print ("# min perf: %s\n", string1);
- else if (g_test_verbose())
+ else if (g_test_verbose ())
g_print ("(MINPERF:%s)\n", string1);
break;
case G_TEST_LOG_MAX_RESULT:
if (test_tap_log)
g_print ("# max perf: %s\n", string1);
- else if (g_test_verbose())
+ else if (g_test_verbose ())
g_print ("(MAXPERF:%s)\n", string1);
break;
case G_TEST_LOG_MESSAGE:
- case G_TEST_LOG_ERROR:
if (test_tap_log)
g_print ("# %s\n", string1);
- else if (g_test_verbose())
+ else if (g_test_verbose ())
g_print ("(MSG: %s)\n", string1);
break;
+ case G_TEST_LOG_ERROR:
+ if (test_tap_log)
+ g_print ("Bail out! %s\n", string1);
+ else if (g_test_verbose ())
+ g_print ("(ERROR: %s)\n", string1);
+ break;
default: ;
}
@@ -884,9 +964,9 @@ g_test_log (GTestLogType lbit,
case G_TEST_LOG_START_CASE:
if (test_tap_log)
;
- else if (g_test_verbose())
+ else if (g_test_verbose ())
g_print ("GTest: run: %s\n", string1);
- else if (!g_test_quiet())
+ else if (!g_test_quiet ())
g_print ("%s: ", string1);
break;
default: ;
@@ -2297,7 +2377,6 @@ g_test_suite_count (GTestSuite *suite)
* test path arguments (`-p testpath` and `-s testpath`) as parsed by
* g_test_init(). See the g_test_run() documentation for more
* information on the order that tests are run in.
-
*
* g_test_run_suite() or g_test_run() may only be called once
* in a program.
@@ -2399,7 +2478,12 @@ g_assertion_message (const char *domain,
" ", message, NULL);
g_printerr ("**\n%s\n", s);
- g_test_log (G_TEST_LOG_ERROR, s, NULL, 0, NULL);
+ /* Don't print a fatal error indication if assertions are non-fatal, or
+ * if we are a child process that might be sharing the parent's stdout. */
+ if (test_nonfatal_assertions || test_in_subprocess || test_in_forked_child)
+ g_test_log (G_TEST_LOG_MESSAGE, s, NULL, 0, NULL);
+ else
+ g_test_log (G_TEST_LOG_ERROR, s, NULL, 0, NULL);
if (test_nonfatal_assertions)
{
@@ -2832,6 +2916,7 @@ g_test_trap_fork (guint64 usec_timeout,
if (test_trap_last_pid == 0) /* child */
{
int fd0 = -1;
+ test_in_forked_child = TRUE;
close (stdout_pipe[0]);
close (stderr_pipe[0]);
if (!(test_trap_flags & G_TEST_TRAP_INHERIT_STDIN))
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index ae74aba1d..e120562c0 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -48,32 +48,33 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
gint64 __n1 = (n1), __n2 = (n2); \
if (__n1 cmp __n2) ; else \
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
- #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'i'); \
+ #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'i'); \
} G_STMT_END
#define g_assert_cmpuint(n1, cmp, n2) G_STMT_START { \
guint64 __n1 = (n1), __n2 = (n2); \
if (__n1 cmp __n2) ; else \
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
- #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'i'); \
+ #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'i'); \
} G_STMT_END
#define g_assert_cmphex(n1, cmp, n2) G_STMT_START {\
guint64 __n1 = (n1), __n2 = (n2); \
if (__n1 cmp __n2) ; else \
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
- #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'x'); \
+ #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'x'); \
} G_STMT_END
#define g_assert_cmpfloat(n1,cmp,n2) G_STMT_START { \
long double __n1 = (n1), __n2 = (n2); \
if (__n1 cmp __n2) ; else \
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
- #n1 " " #cmp " " #n2, __n1, #cmp, __n2, 'f'); \
+ #n1 " " #cmp " " #n2, (long double) __n1, #cmp, (long double) __n2, 'f'); \
} G_STMT_END
#define g_assert_cmpmem(m1, l1, m2, l2) G_STMT_START {\
gconstpointer __m1 = m1, __m2 = m2; \
int __l1 = l1, __l2 = l2; \
if (__l1 != __l2) \
g_assertion_message_cmpnum (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
- #l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", __l1, "==", __l2, 'i'); \
+ #l1 " (len(" #m1 ")) == " #l2 " (len(" #m2 "))", \
+ (long double) __l1, "==", (long double) __l2, 'i'); \
else if (__l1 != 0 && memcmp (__m1, __m2, __l1) != 0) \
g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
"assertion failed (" #m1 " == " #m2 ")"); \
@@ -354,13 +355,6 @@ GLIB_VAR const GTestConfig * const g_test_config_vars;
/* internal logging API */
typedef enum {
- G_TEST_RUN_SUCCESS,
- G_TEST_RUN_SKIPPED,
- G_TEST_RUN_FAILURE,
- G_TEST_RUN_INCOMPLETE
-} GTestResult;
-
-typedef enum {
G_TEST_LOG_NONE,
G_TEST_LOG_ERROR, /* s:msg */
G_TEST_LOG_START_BINARY, /* s:binaryname s:seed */
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index aa0e36e3a..364c9eb24 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -246,7 +246,7 @@ g_mutex_unlock (GMutex *mutex)
* non-recursive. As such, calling g_mutex_lock() on a #GMutex that has
* already been locked by the same thread results in undefined behaviour
* (including but not limited to deadlocks or arbitrary return values).
-
+ *
* Returns: %TRUE if @mutex could be locked
*/
gboolean
@@ -538,7 +538,10 @@ g_rw_lock_clear (GRWLock *rw_lock)
void
g_rw_lock_writer_lock (GRWLock *rw_lock)
{
- pthread_rwlock_wrlock (g_rw_lock_get_impl (rw_lock));
+ int retval = pthread_rwlock_wrlock (g_rw_lock_get_impl (rw_lock));
+
+ if (retval != 0)
+ g_critical ("Failed to get RW lock %p: %s", rw_lock, g_strerror (retval));
}
/**
@@ -588,14 +591,18 @@ g_rw_lock_writer_unlock (GRWLock *rw_lock)
* thread will block. Read locks can be taken recursively.
*
* It is implementation-defined how many threads are allowed to
- * hold read locks on the same lock simultaneously.
+ * hold read locks on the same lock simultaneously. If the limit is hit,
+ * or if a deadlock is detected, a critical warning will be emitted.
*
* Since: 2.32
*/
void
g_rw_lock_reader_lock (GRWLock *rw_lock)
{
- pthread_rwlock_rdlock (g_rw_lock_get_impl (rw_lock));
+ int retval = pthread_rwlock_rdlock (g_rw_lock_get_impl (rw_lock));
+
+ if (retval != 0)
+ g_critical ("Failed to get RW lock %p: %s", rw_lock, g_strerror (retval));
}
/**
@@ -944,7 +951,7 @@ g_cond_wait_until (GCond *cond,
* A macro to assist with the static initialisation of a #GPrivate.
*
* This macro is useful for the case that a #GDestroyNotify function
- * should be associated the key. This is needed when the key will be
+ * should be associated with the key. This is needed when the key will be
* used to point at memory that should be deallocated when the thread
* exits.
*
diff --git a/glib/gtypes.h b/glib/gtypes.h
index 0a5a27604..047ac6227 100644
--- a/glib/gtypes.h
+++ b/glib/gtypes.h
@@ -181,8 +181,8 @@ typedef const gchar * (*GTranslateFunc) (const gchar *str,
#if defined (__GNUC__) && (__GNUC__ >= 2) && defined (__OPTIMIZE__)
# if __GNUC__ >= 4 && defined (__GNUC_MINOR__) && __GNUC_MINOR__ >= 3
-# define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 ((gint32) (val)))
-# define GUINT64_SWAP_LE_BE(val) ((guint64) __builtin_bswap64 ((gint64) (val)))
+# define GUINT32_SWAP_LE_BE(val) ((guint32) __builtin_bswap32 ((guint32) (val)))
+# define GUINT64_SWAP_LE_BE(val) ((guint64) __builtin_bswap64 ((guint64) (val)))
# endif
# if defined (__i386__)
diff --git a/glib/gunicode.h b/glib/gunicode.h
index e81767732..e6934d2b7 100644
--- a/glib/gunicode.h
+++ b/glib/gunicode.h
@@ -411,10 +411,10 @@ typedef enum
* @G_UNICODE_SCRIPT_NEWA: Newa. Since: 2.50
* @G_UNICODE_SCRIPT_OSAGE: Osage. Since: 2.50
* @G_UNICODE_SCRIPT_TANGUT: Tangut. Since: 2.50
- * @G_UNICODE_SCRIPT_MASARAM_GONDI, Masaram Gondi. Since: 2.54
- * @G_UNICODE_SCRIPT_NUSHU, Nushu. Since: 2.54
- * @G_UNICODE_SCRIPT_SOYOMBO, Soyombo. Since: 2.54
- * @G_UNICODE_SCRIPT_ZANABAZAR_SQUARE Zanabazar Square. Since: 2.54
+ * @G_UNICODE_SCRIPT_MASARAM_GONDI: Masaram Gondi. Since: 2.54
+ * @G_UNICODE_SCRIPT_NUSHU: Nushu. Since: 2.54
+ * @G_UNICODE_SCRIPT_SOYOMBO: Soyombo. Since: 2.54
+ * @G_UNICODE_SCRIPT_ZANABAZAR_SQUARE: Zanabazar Square. Since: 2.54
*
* The #GUnicodeScript enumeration identifies different writing
* systems. The values correspond to the names as defined in the
diff --git a/glib/gutf8.c b/glib/gutf8.c
index e0d085001..ace4ee5a4 100644
--- a/glib/gutf8.c
+++ b/glib/gutf8.c
@@ -1803,7 +1803,7 @@ g_utf8_make_valid (const gchar *str,
if (string == NULL)
return g_strndup (str, len);
- g_string_append (string, remainder);
+ g_string_append_len (string, remainder, remaining_bytes);
g_string_append_c (string, '\0');
g_assert (g_utf8_validate (string->str, -1, NULL));
diff --git a/glib/gutils.c b/glib/gutils.c
index eb44f179f..de4401ad3 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -970,6 +970,8 @@ g_get_tmp_dir (void)
* name can be determined, a default fixed string "localhost" is
* returned.
*
+ * The encoding of the returned string is UTF-8.
+ *
* Returns: the host name of the machine.
*
* Since: 2.8
@@ -982,16 +984,25 @@ g_get_host_name (void)
if (g_once_init_enter (&hostname))
{
gboolean failed;
- gchar tmp[100];
+ gchar *utmp;
#ifndef G_OS_WIN32
- failed = (gethostname (tmp, sizeof (tmp)) == -1);
+ gchar *tmp = g_malloc (sizeof (gchar) * 100);
+ failed = (gethostname (tmp, sizeof (gchar) * 100) == -1);
+ if (failed)
+ g_clear_pointer (&tmp, g_free);
+ utmp = tmp;
#else
- DWORD size = sizeof (tmp);
- failed = (!GetComputerName (tmp, &size));
+ wchar_t tmp[MAX_COMPUTERNAME_LENGTH + 1];
+ DWORD size = sizeof (tmp) / sizeof (tmp[0]);
+ failed = (!GetComputerNameW (tmp, &size));
+ if (!failed)
+ utmp = g_utf16_to_utf8 (tmp, size, NULL, NULL, NULL);
+ if (utmp == NULL)
+ failed = TRUE;
#endif
- g_once_init_leave (&hostname, g_strdup (failed ? "localhost" : tmp));
+ g_once_init_leave (&hostname, failed ? g_strdup ("localhost") : utmp);
}
return hostname;
@@ -2171,6 +2182,8 @@ g_format_size (guint64 size)
* suffixes. IEC units should only be used for reporting things with
* a strong "power of 2" basis, like RAM sizes or RAID stripe sizes.
* Network and storage sizes should be reported in the normal SI units.
+ * @G_FORMAT_SIZE_BITS: set the size as a quantity in bits, rather than
+ * bytes, and return units in bits. For example, ‘Mb’ rather than ‘MB’.
*
* Flags to modify the format of the string returned by g_format_size_full().
*/
@@ -2197,63 +2210,118 @@ gchar *
g_format_size_full (guint64 size,
GFormatSizeFlags flags)
{
- GString *string;
+ struct Format
+ {
+ guint64 factor;
+ char string[9];
+ };
- string = g_string_new (NULL);
+ typedef enum
+ {
+ FORMAT_BYTES,
+ FORMAT_BYTES_IEC,
+ FORMAT_BITS,
+ FORMAT_BITS_IEC
+ } FormatIndex;
- if (flags & G_FORMAT_SIZE_IEC_UNITS)
+ const struct Format formats[4][6] = {
{
- if (size < KIBIBYTE_FACTOR)
- {
- g_string_printf (string,
- g_dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes", (guint) size),
- (guint) size);
- flags &= ~G_FORMAT_SIZE_LONG_FORMAT;
- }
+ { KILOBYTE_FACTOR, N_("%.1f kB") },
+ { MEGABYTE_FACTOR, N_("%.1f MB") },
+ { GIGABYTE_FACTOR, N_("%.1f GB") },
+ { TERABYTE_FACTOR, N_("%.1f TB") },
+ { PETABYTE_FACTOR, N_("%.1f PB") },
+ { EXABYTE_FACTOR, N_("%.1f EB") }
+ },
+ {
+ { KIBIBYTE_FACTOR, N_("%.1f KiB") },
+ { MEBIBYTE_FACTOR, N_("%.1f MiB") },
+ { GIBIBYTE_FACTOR, N_("%.1f GiB") },
+ { TEBIBYTE_FACTOR, N_("%.1f TiB") },
+ { PEBIBYTE_FACTOR, N_("%.1f PiB") },
+ { EXBIBYTE_FACTOR, N_("%.1f EiB") }
+ },
+ {
+ { KILOBYTE_FACTOR, N_("%.1f kb") },
+ { MEGABYTE_FACTOR, N_("%.1f Mb") },
+ { GIGABYTE_FACTOR, N_("%.1f Gb") },
+ { TERABYTE_FACTOR, N_("%.1f Tb") },
+ { PETABYTE_FACTOR, N_("%.1f Pb") },
+ { EXABYTE_FACTOR, N_("%.1f Eb") }
+ },
+ {
+ { KIBIBYTE_FACTOR, N_("%.1f Kib") },
+ { MEBIBYTE_FACTOR, N_("%.1f Mib") },
+ { GIBIBYTE_FACTOR, N_("%.1f Gib") },
+ { TEBIBYTE_FACTOR, N_("%.1f Tib") },
+ { PEBIBYTE_FACTOR, N_("%.1f Pib") },
+ { EXBIBYTE_FACTOR, N_("%.1f Eib") }
+ }
+ };
- else if (size < MEBIBYTE_FACTOR)
- g_string_printf (string, _("%.1f KiB"), (gdouble) size / (gdouble) KIBIBYTE_FACTOR);
- else if (size < GIBIBYTE_FACTOR)
- g_string_printf (string, _("%.1f MiB"), (gdouble) size / (gdouble) MEBIBYTE_FACTOR);
+ GString *string;
+ FormatIndex index;
- else if (size < TEBIBYTE_FACTOR)
- g_string_printf (string, _("%.1f GiB"), (gdouble) size / (gdouble) GIBIBYTE_FACTOR);
+ string = g_string_new (NULL);
- else if (size < PEBIBYTE_FACTOR)
- g_string_printf (string, _("%.1f TiB"), (gdouble) size / (gdouble) TEBIBYTE_FACTOR);
+ switch (flags & ~G_FORMAT_SIZE_LONG_FORMAT)
+ {
+ case G_FORMAT_SIZE_DEFAULT:
+ index = FORMAT_BYTES;
+ break;
+ case (G_FORMAT_SIZE_DEFAULT | G_FORMAT_SIZE_IEC_UNITS):
+ index = FORMAT_BYTES_IEC;
+ break;
+ case G_FORMAT_SIZE_BITS:
+ index = FORMAT_BITS;
+ break;
+ case (G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS):
+ index = FORMAT_BITS_IEC;
+ break;
+ default:
+ g_assert_not_reached ();
+ }
- else if (size < EXBIBYTE_FACTOR)
- g_string_printf (string, _("%.1f PiB"), (gdouble) size / (gdouble) PEBIBYTE_FACTOR);
- else
- g_string_printf (string, _("%.1f EiB"), (gdouble) size / (gdouble) EXBIBYTE_FACTOR);
- }
- else
+ if (size < formats[index][0].factor)
{
- if (size < KILOBYTE_FACTOR)
+ const char * format;
+
+ if (index == FORMAT_BYTES || index == FORMAT_BYTES_IEC)
{
- g_string_printf (string,
- g_dngettext(GETTEXT_PACKAGE, "%u byte", "%u bytes", (guint) size),
- (guint) size);
- flags &= ~G_FORMAT_SIZE_LONG_FORMAT;
+ format = g_dngettext (GETTEXT_PACKAGE, "%u byte", "%u bytes", (guint) size);
+ }
+ else
+ {
+ format = g_dngettext (GETTEXT_PACKAGE, "%u bit", "%u bits", (guint) size);
}
- else if (size < MEGABYTE_FACTOR)
- g_string_printf (string, _("%.1f kB"), (gdouble) size / (gdouble) KILOBYTE_FACTOR);
+ g_string_printf (string, format, (guint) size);
- else if (size < GIGABYTE_FACTOR)
- g_string_printf (string, _("%.1f MB"), (gdouble) size / (gdouble) MEGABYTE_FACTOR);
+ flags &= ~G_FORMAT_SIZE_LONG_FORMAT;
+ }
+ else
+ {
+ const gsize n = G_N_ELEMENTS (formats[index]);
+ gsize i;
- else if (size < TERABYTE_FACTOR)
- g_string_printf (string, _("%.1f GB"), (gdouble) size / (gdouble) GIGABYTE_FACTOR);
- else if (size < PETABYTE_FACTOR)
- g_string_printf (string, _("%.1f TB"), (gdouble) size / (gdouble) TERABYTE_FACTOR);
+ /*
+ * Point the last format (the highest unit) by default
+ * and then then scan all formats, starting with the 2nd one
+ * because the 1st is already managed by with the plural form
+ */
+ const struct Format * f = &formats[index][n - 1];
- else if (size < EXABYTE_FACTOR)
- g_string_printf (string, _("%.1f PB"), (gdouble) size / (gdouble) PETABYTE_FACTOR);
+ for (i = 1; i < n; i++)
+ {
+ if (size < formats[index][i].factor)
+ {
+ f = &formats[index][i - 1];
+ break;
+ }
+ }
- else
- g_string_printf (string, _("%.1f EB"), (gdouble) size / (gdouble) EXABYTE_FACTOR);
+ g_string_printf (string, _(f->string), (gdouble) size / (gdouble) f->factor);
}
if (flags & G_FORMAT_SIZE_LONG_FORMAT)
@@ -2278,19 +2346,27 @@ g_format_size_full (guint64 size,
*/
guint plural_form = size < 1000 ? size : size % 1000 + 1000;
- /* Second problem: we need to translate the string "%u byte" and
- * "%u bytes" for pluralisation, but the correct number format to
+ /* Second problem: we need to translate the string "%u byte/bit" and
+ * "%u bytes/bits" for pluralisation, but the correct number format to
* use for a gsize is different depending on which architecture
* we're on.
*
- * Solution: format the number separately and use "%s bytes" on
+ * Solution: format the number separately and use "%s bytes/bits" on
* all platforms.
*/
const gchar *translated_format;
gchar *formatted_number;
- /* Translators: the %s in "%s bytes" will always be replaced by a number. */
- translated_format = g_dngettext(GETTEXT_PACKAGE, "%s byte", "%s bytes", plural_form);
+ if (index == FORMAT_BYTES || index == FORMAT_BYTES_IEC)
+ {
+ /* Translators: the %s in "%s bytes" will always be replaced by a number. */
+ translated_format = g_dngettext (GETTEXT_PACKAGE, "%s byte", "%s bytes", plural_form);
+ }
+ else
+ {
+ /* Translators: the %s in "%s bits" will always be replaced by a number. */
+ translated_format = g_dngettext (GETTEXT_PACKAGE, "%s bit", "%s bits", plural_form);
+ }
/* XXX: Windows doesn't support the "'" format modifier, so we
* must not use it there. Instead, just display the number
* without separation. Bug #655336 is open until a solution is
diff --git a/glib/gutils.h b/glib/gutils.h
index 356c64370..c48699aaa 100644
--- a/glib/gutils.h
+++ b/glib/gutils.h
@@ -181,7 +181,8 @@ typedef enum
{
G_FORMAT_SIZE_DEFAULT = 0,
G_FORMAT_SIZE_LONG_FORMAT = 1 << 0,
- G_FORMAT_SIZE_IEC_UNITS = 1 << 1
+ G_FORMAT_SIZE_IEC_UNITS = 1 << 1,
+ G_FORMAT_SIZE_BITS = 1 << 2
} GFormatSizeFlags;
GLIB_AVAILABLE_IN_2_30
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index e4ba19270..3261bc1af 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -1724,6 +1724,7 @@ bytestring_parse (TokenStream *stream,
parser_set_error (error, &ref, NULL,
G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
"unterminated string constant");
+ g_free (str);
g_free (token);
return NULL;
@@ -1734,6 +1735,7 @@ bytestring_parse (TokenStream *stream,
parser_set_error (error, &ref, NULL,
G_VARIANT_PARSE_ERROR_UNTERMINATED_STRING_CONSTANT,
"unterminated string constant");
+ g_free (str);
g_free (token);
return NULL;
diff --git a/glib/gvariant.c b/glib/gvariant.c
index 6c4f81796..98b32e71c 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -4259,7 +4259,7 @@ g_variant_dict_unref (GVariantDict *dict)
* returned. If @endptr is non-%NULL then it is updated to point to the
* first character after the format string.
*
- * If @limit is non-%NULL then @limit (and any charater after it) will
+ * If @limit is non-%NULL then @limit (and any character after it) will
* not be accessed and the effect is otherwise equivalent to if the
* character at @limit were nul.
*
diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h
index c23c40247..df6585c2f 100644
--- a/glib/gversionmacros.h
+++ b/glib/gversionmacros.h
@@ -185,6 +185,16 @@
*/
#define GLIB_VERSION_2_54 (G_ENCODE_VERSION (2, 54))
+/**
+ * GLIB_VERSION_2_56:
+ *
+ * A macro that evaluates to the 2.56 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.56
+ */
+#define GLIB_VERSION_2_56 (G_ENCODE_VERSION (2, 56))
+
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
*/
@@ -486,4 +496,18 @@
# define GLIB_AVAILABLE_IN_2_54 _GLIB_EXTERN
#endif
+#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_56
+# define GLIB_DEPRECATED_IN_2_56 GLIB_DEPRECATED
+# define GLIB_DEPRECATED_IN_2_56_FOR(f) GLIB_DEPRECATED_FOR(f)
+#else
+# define GLIB_DEPRECATED_IN_2_56 _GLIB_EXTERN
+# define GLIB_DEPRECATED_IN_2_56_FOR(f) _GLIB_EXTERN
+#endif
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_56
+# define GLIB_AVAILABLE_IN_2_56 GLIB_UNAVAILABLE(2, 56)
+#else
+# define GLIB_AVAILABLE_IN_2_56 _GLIB_EXTERN
+#endif
+
#endif /* __G_VERSION_MACROS_H__ */
diff --git a/glib/meson.build b/glib/meson.build
index 1da0bcd3c..223b7feaa 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -279,12 +279,21 @@ install_data('glib_gdb.py', install_dir : join_paths(glib_pkgdatadir, 'gdb'))
gdb_conf = configuration_data()
gdb_conf.set('datadir', glib_datadir)
+# This is also used in gobject/meson.build
+if host_system != 'windows'
+ # XXX: We add a leading './' because glib_libdir is an absolute path and we
+ # need it to be a relative path so that join_paths appends it to the end.
+ gdb_install_dir = join_paths(glib_datadir, 'gdb', 'auto-load', './' + glib_libdir)
+else
+ # FIXME: Cannot install on Windows because the path will contain a drive
+ # letter and colons are not allowed in paths.
+ gdb_install_dir = false
+endif
configure_file(
input: 'libglib-gdb.py.in',
output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
- install: true,
- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + get_option('libdir'))
+ install_dir: gdb_install_dir,
)
if enable_systemtap
diff --git a/glib/pcre/pcre_compile.c b/glib/pcre/pcre_compile.c
index 01c09236e..d0ed8fbed 100644
--- a/glib/pcre/pcre_compile.c
+++ b/glib/pcre/pcre_compile.c
@@ -4858,7 +4858,7 @@ for (;; ptr++)
else
#endif /* SUPPORT_UTF */
- /* Handle the case of a single charater - either with no UTF support, or
+ /* Handle the case of a single character - either with no UTF support, or
with UTF disabled, or for a single character UTF character. */
{
c = code[-1];
diff --git a/glib/tests/array-test.c b/glib/tests/array-test.c
index f696f0f18..d23ff2467 100644
--- a/glib/tests/array-test.c
+++ b/glib/tests/array-test.c
@@ -887,7 +887,7 @@ main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
- g_test_bug_base ("http://bugs.gnome.org/");
+ g_test_bug_base ("https://bugzilla.gnome.org/");
/* array tests */
g_test_add_func ("/array/append", array_append);
diff --git a/glib/tests/autoptr.c b/glib/tests/autoptr.c
index b44cf138b..754999cf1 100644
--- a/glib/tests/autoptr.c
+++ b/glib/tests/autoptr.c
@@ -17,6 +17,8 @@ test_autofree (void)
g_autofree gchar *alwaysnull_again = NULL;
buf[0] = 1;
+
+ g_assert_null (alwaysnull_again);
}
if (TRUE)
@@ -25,6 +27,8 @@ test_autofree (void)
buf2[255] = 42;
}
+
+ g_assert_null (alwaysnull);
}
static void
@@ -226,6 +230,7 @@ test_g_queue (void)
g_autoptr(GQueue) val = g_queue_new ();
g_auto(GQueue) stackval = G_QUEUE_INIT;
g_assert (val != NULL);
+ g_assert_null (stackval.head);
}
static void
diff --git a/glib/tests/bytes.c b/glib/tests/bytes.c
index 518824312..a436eaebf 100644
--- a/glib/tests/bytes.c
+++ b/glib/tests/bytes.c
@@ -329,7 +329,7 @@ main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
- g_test_bug_base ("http://bugs.gnome.org/");
+ g_test_bug_base ("https://bugzilla.gnome.org/");
g_test_add_func ("/bytes/new", test_new);
g_test_add_func ("/bytes/new-take", test_new_take);
diff --git a/glib/tests/convert.c b/glib/tests/convert.c
index 5855a340d..5f13a2d2b 100644
--- a/glib/tests/convert.c
+++ b/glib/tests/convert.c
@@ -168,7 +168,7 @@ check_utf8_to_ucs4 (const char *utf8,
error2 = NULL;
result2 = g_utf8_to_ucs4 (utf8, -1, &items_read2, &items_written2, &error2);
g_assert (error || items_read2 == items_read);
- g_assert (error || items_written2 == items_written2);
+ g_assert (error || items_written2 == items_written);
g_assert_cmpint (!!result, ==, !!result2);
g_assert_cmpint (!!error, ==, !!error2);
if (result)
@@ -309,7 +309,7 @@ check_utf8_to_utf16 (const char *utf8,
error2 = NULL;
result2 = g_utf8_to_utf16 (utf8, -1, &items_read2, &items_written2, &error2);
g_assert (error || items_read2 == items_read);
- g_assert (error || items_written2 == items_written2);
+ g_assert (error || items_written2 == items_written);
g_assert_cmpint (!!result, ==, !!result2);
g_assert_cmpint (!!error, ==, !!error2);
if (result)
@@ -526,7 +526,7 @@ check_utf16_to_ucs4 (const gunichar2 *utf16,
error2 = NULL;
result2 = g_utf16_to_ucs4 (utf16, -1, &items_read2, &items_written2, &error2);
g_assert (error || items_read2 == items_read);
- g_assert (error || items_written2 == items_written2);
+ g_assert (error || items_written2 == items_written);
g_assert_cmpint (!!result, ==, !!result2);
g_assert_cmpint (!!error, ==, !!error2);
if (result)
diff --git a/glib/tests/date.c b/glib/tests/date.c
index 012e70713..73234d2d1 100644
--- a/glib/tests/date.c
+++ b/glib/tests/date.c
@@ -357,6 +357,32 @@ test_order (void)
g_assert (g_date_compare (&d1, &d2) == 1);
}
+static void
+test_copy (void)
+{
+ GDate *d;
+ GDate *c;
+
+ d = g_date_new ();
+ g_assert_false (g_date_valid (d));
+
+ c = g_date_copy (d);
+ g_assert_nonnull (c);
+ g_assert_false (g_date_valid (c));
+ g_date_free (c);
+
+ g_date_set_day (d, 10);
+
+ c = g_date_copy (d);
+ g_date_set_month (c, 1);
+ g_date_set_year (c, 2015);
+ g_assert_true (g_date_valid (c));
+ g_assert_cmpuint (g_date_get_day (c), ==, 10);
+ g_date_free (c);
+
+ g_date_free (d);
+}
+
int
main (int argc, char** argv)
{
@@ -401,6 +427,7 @@ main (int argc, char** argv)
g_test_add_data_func (path, GINT_TO_POINTER(check_years[i]), test_year);
g_free (path);
}
+ g_test_add_func ("/date/copy", test_copy);
return g_test_run ();
}
diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c
index 2fe22cc0e..78fca7dd2 100644
--- a/glib/tests/fileutils.c
+++ b/glib/tests/fileutils.c
@@ -551,6 +551,36 @@ test_format_size_for_display (void)
check_string (g_format_size_full (238472938, G_FORMAT_SIZE_IEC_UNITS), "227.4 MiB");
check_string (g_format_size_full (238472938, G_FORMAT_SIZE_DEFAULT), "238.5 MB");
check_string (g_format_size_full (238472938, G_FORMAT_SIZE_LONG_FORMAT), "238.5 MB (238472938 bytes)");
+
+
+ check_string (g_format_size_full (0, G_FORMAT_SIZE_BITS), "0 bits");
+ check_string (g_format_size_full (1, G_FORMAT_SIZE_BITS), "1 bit");
+ check_string (g_format_size_full (2, G_FORMAT_SIZE_BITS), "2 bits");
+
+ check_string (g_format_size_full (2000ULL, G_FORMAT_SIZE_BITS), "2.0 kb");
+ check_string (g_format_size_full (2000ULL * 1000, G_FORMAT_SIZE_BITS), "2.0 Mb");
+ check_string (g_format_size_full (2000ULL * 1000 * 1000, G_FORMAT_SIZE_BITS), "2.0 Gb");
+ check_string (g_format_size_full (2000ULL * 1000 * 1000 * 1000, G_FORMAT_SIZE_BITS), "2.0 Tb");
+ check_string (g_format_size_full (2000ULL * 1000 * 1000 * 1000 * 1000, G_FORMAT_SIZE_BITS), "2.0 Pb");
+ check_string (g_format_size_full (2000ULL * 1000 * 1000 * 1000 * 1000 * 1000, G_FORMAT_SIZE_BITS), "2.0 Eb");
+
+ check_string (g_format_size_full (238472938, G_FORMAT_SIZE_BITS), "238.5 Mb");
+ check_string (g_format_size_full (238472938, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_LONG_FORMAT), "238.5 Mb (238472938 bits)");
+
+
+ check_string (g_format_size_full (0, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "0 bits");
+ check_string (g_format_size_full (1, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "1 bit");
+ check_string (g_format_size_full (2, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "2 bits");
+
+ check_string (g_format_size_full (2048ULL, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "2.0 Kib");
+ check_string (g_format_size_full (2048ULL * 1024, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "2.0 Mib");
+ check_string (g_format_size_full (2048ULL * 1024 * 1024, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "2.0 Gib");
+ check_string (g_format_size_full (2048ULL * 1024 * 1024 * 1024, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "2.0 Tib");
+ check_string (g_format_size_full (2048ULL * 1024 * 1024 * 1024 * 1024, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "2.0 Pib");
+ check_string (g_format_size_full (2048ULL * 1024 * 1024 * 1024 * 1024 * 1024, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "2.0 Eib");
+
+ check_string (g_format_size_full (238472938, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS), "227.4 Mib");
+ check_string (g_format_size_full (238472938, G_FORMAT_SIZE_BITS | G_FORMAT_SIZE_IEC_UNITS | G_FORMAT_SIZE_LONG_FORMAT), "227.4 Mib (238472938 bits)");
}
static void
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 014be0b44..f13b9def5 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -25,14 +25,17 @@
#include <locale.h>
#define ASSERT_DATE(dt,y,m,d) G_STMT_START { \
+ g_assert_nonnull ((dt)); \
g_assert_cmpint ((y), ==, g_date_time_get_year ((dt))); \
g_assert_cmpint ((m), ==, g_date_time_get_month ((dt))); \
g_assert_cmpint ((d), ==, g_date_time_get_day_of_month ((dt))); \
} G_STMT_END
-#define ASSERT_TIME(dt,H,M,S) G_STMT_START { \
+#define ASSERT_TIME(dt,H,M,S,U) G_STMT_START { \
+ g_assert_nonnull ((dt)); \
g_assert_cmpint ((H), ==, g_date_time_get_hour ((dt))); \
g_assert_cmpint ((M), ==, g_date_time_get_minute ((dt))); \
g_assert_cmpint ((S), ==, g_date_time_get_second ((dt))); \
+ g_assert_cmpint ((U), ==, g_date_time_get_microsecond ((dt))); \
} G_STMT_END
static void
@@ -340,7 +343,7 @@ test_GDateTime_hash (void)
h = g_hash_table_new_full (g_date_time_hash, g_date_time_equal,
(GDestroyNotify)g_date_time_unref,
NULL);
- g_hash_table_insert (h, g_date_time_new_now_local (), NULL);
+ g_hash_table_add (h, g_date_time_new_now_local ());
g_hash_table_remove_all (h);
g_hash_table_destroy (h);
}
@@ -469,6 +472,311 @@ test_GDateTime_new_from_timeval_utc (void)
}
static void
+test_GDateTime_new_from_iso8601 (void)
+{
+ GDateTime *dt;
+ GTimeZone *tz;
+
+ /* Need non-empty string */
+ dt = g_date_time_new_from_iso8601 ("", NULL);
+ g_assert_null (dt);
+
+ /* Needs to be correctly formatted */
+ dt = g_date_time_new_from_iso8601 ("not a date", NULL);
+ g_assert_null (dt);
+
+ /* Check common case */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+
+ /* Timezone is required in text or passed as arg */
+ tz = g_time_zone_new_utc ();
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42", tz);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ g_date_time_unref (dt);
+ g_time_zone_unref (tz);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42", NULL);
+ g_assert_null (dt);
+
+ /* Can't have whitespace */
+ dt = g_date_time_new_from_iso8601 ("2016 08 24T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42Z ", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 (" 2016-08-24T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Check lowercase time separator or space allowed */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24t22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24 22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+
+ /* Check dates without separators allowed */
+ dt = g_date_time_new_from_iso8601 ("20160824T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+
+ /* Months are two digits */
+ dt = g_date_time_new_from_iso8601 ("2016-1-01T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Days are two digits */
+ dt = g_date_time_new_from_iso8601 ("2016-01-1T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Need consistent usage of separators */
+ dt = g_date_time_new_from_iso8601 ("2016-0824T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("201608-24T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Check month within valid range */
+ dt = g_date_time_new_from_iso8601 ("2016-00-13T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-13-13T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Check day within valid range */
+ dt = g_date_time_new_from_iso8601 ("2016-01-00T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-01-31T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 1, 31);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-01-32T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-02-29T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 2, 29);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-02-30T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2017-02-28T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2017, 2, 28);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2017-02-29T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-03-31T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 3, 31);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-03-32T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-04-30T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 4, 30);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-04-31T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-05-31T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 5, 31);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-05-32T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-06-30T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 6, 30);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-06-31T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-07-31T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 7, 31);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-07-32T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-31T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 31);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-32T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-09-30T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 9, 30);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-09-31T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-10-31T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 10, 31);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-10-32T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-11-30T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 11, 30);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-11-31T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-12-31T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 12, 31);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-12-32T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Check ordinal days work */
+ dt = g_date_time_new_from_iso8601 ("2016-237T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016237T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+
+ /* Check ordinal leap days */
+ dt = g_date_time_new_from_iso8601 ("2016-366T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 12, 31);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2017-365T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2017, 12, 31);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2017-366T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Days start at 1 */
+ dt = g_date_time_new_from_iso8601 ("2016-000T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Limited to number of days in the year (2016 is a leap year) */
+ dt = g_date_time_new_from_iso8601 ("2016-367T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Days are two digits */
+ dt = g_date_time_new_from_iso8601 ("2016-1T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-12T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Check week days work */
+ dt = g_date_time_new_from_iso8601 ("2016-W34-3T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016W343T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_date_time_unref (dt);
+
+ /* We don't support weeks without weekdays (valid ISO 8601) */
+ dt = g_date_time_new_from_iso8601 ("2016-W34T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016W34T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Weeks are two digits */
+ dt = g_date_time_new_from_iso8601 ("2016-W3-1T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Weeks start at 1 */
+ dt = g_date_time_new_from_iso8601 ("2016-W00-1T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Week one might be in the previous year */
+ dt = g_date_time_new_from_iso8601 ("2015-W01-1T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2014, 12, 29);
+ g_date_time_unref (dt);
+
+ /* Last week might be in next year */
+ dt = g_date_time_new_from_iso8601 ("2015-W53-7T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 1, 3);
+ g_date_time_unref (dt);
+
+ /* Week 53 doesn't always exist */
+ dt = g_date_time_new_from_iso8601 ("2016-W53-1T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Limited to number of days in the week */
+ dt = g_date_time_new_from_iso8601 ("2016-W34-0T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-W34-8T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Days are one digit */
+ dt = g_date_time_new_from_iso8601 ("2016-W34-99T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Check week day changes depending on year */
+ dt = g_date_time_new_from_iso8601 ("2017-W34-1T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2017, 8, 21);
+ g_date_time_unref (dt);
+
+ /* Check week day changes depending on leap years */
+ dt = g_date_time_new_from_iso8601 ("1900-W01-1T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 1900, 1, 1);
+ g_date_time_unref (dt);
+
+ /* YYYY-MM not allowed (NOT valid ISO 8601) */
+ dt = g_date_time_new_from_iso8601 ("2016-08T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* We don't support omitted year (valid ISO 8601) */
+ dt = g_date_time_new_from_iso8601 ("--08-24T22:10:42Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("--0824T22:10:42Z", NULL);
+ g_assert_null (dt);
+
+ /* Check subseconds work */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42.123456Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 123456);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42,123456Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 123456);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42.Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T221042.123456Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 123456);
+ g_date_time_unref (dt);
+
+ /* We don't support times without minutes / seconds (valid ISO 8601) */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10Z", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T2210Z", NULL);
+ g_assert_null (dt);
+
+ /* UTC time uses 'Z' */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42Z", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_assert_cmpint (g_date_time_get_utc_offset (dt), ==, 0);
+ g_date_time_unref (dt);
+
+ /* Check timezone works */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42+12:00", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_assert_cmpint (g_date_time_get_utc_offset (dt), ==, 12 * G_TIME_SPAN_HOUR);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42+12", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_assert_cmpint (g_date_time_get_utc_offset (dt), ==, 12 * G_TIME_SPAN_HOUR);
+ g_date_time_unref (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22:10:42-02", NULL);
+ ASSERT_DATE (dt, 2016, 8, 24);
+ ASSERT_TIME (dt, 22, 10, 42, 0);
+ g_assert_cmpint (g_date_time_get_utc_offset (dt), ==, -2 * G_TIME_SPAN_HOUR);
+ g_date_time_unref (dt);
+
+ /* Timezone seconds not allowed */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22-12:00:00", NULL);
+ g_assert_null (dt);
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22-12:00:00.000", NULL);
+ g_assert_null (dt);
+
+ /* Timezone hours two digits */
+ dt = g_date_time_new_from_iso8601 ("2016-08-24T22-2Z", NULL);
+ g_assert_null (dt);
+}
+
+static void
test_GDateTime_to_unix (void)
{
GDateTime *dt;
@@ -1125,14 +1433,14 @@ test_non_utf8_printf (void)
*/
TEST_PRINTF ("%a", "\345\234\237");
TEST_PRINTF ("%A", "\345\234\237\346\233\234\346\227\245");
-#ifndef HAVE_CARBON /* OSX just returns the number */
+#ifndef __APPLE__ /* OSX just returns the number */
TEST_PRINTF ("%b", "10\346\234\210");
#endif
TEST_PRINTF ("%B", "10\346\234\210");
TEST_PRINTF ("%d", "24");
TEST_PRINTF_DATE (2009, 1, 1, "%d", "01");
TEST_PRINTF ("%e", "24"); // fixme
-#ifndef HAVE_CARBON /* OSX just returns the number */
+#ifndef __APPLE__ /* OSX just returns the number */
TEST_PRINTF ("%h", "10\346\234\210");
#endif
TEST_PRINTF ("%H", "00");
@@ -1149,7 +1457,7 @@ test_non_utf8_printf (void)
TEST_PRINTF_TIME (10, 13, 13, "%l", "10");
TEST_PRINTF ("%m", "10");
TEST_PRINTF ("%M", "00");
-#ifndef HAVE_CARBON /* OSX returns latin "AM", not japanese */
+#ifndef __APPLE__ /* OSX returns latin "AM", not japanese */
TEST_PRINTF ("%p", "\345\215\210\345\211\215");
TEST_PRINTF_TIME (13, 13, 13, "%p", "\345\215\210\345\276\214");
TEST_PRINTF ("%P", "\345\215\210\345\211\215");
@@ -1162,7 +1470,7 @@ test_non_utf8_printf (void)
TEST_PRINTF ("%S", "00");
TEST_PRINTF ("%t", " ");
TEST_PRINTF ("%u", "6");
-#ifndef HAVE_CARBON /* OSX returns YYYY/MM/DD in ASCII */
+#ifndef __APPLE__ /* OSX returns YYYY/MM/DD in ASCII */
TEST_PRINTF ("%x", "2009\345\271\26410\346\234\21024\346\227\245");
#endif
TEST_PRINTF ("%X", "00\346\231\20200\345\210\20600\347\247\222");
@@ -1813,6 +2121,7 @@ main (gint argc,
g_test_add_func ("/GDateTime/new_from_timeval", test_GDateTime_new_from_timeval);
g_test_add_func ("/GDateTime/new_from_timeval_utc", test_GDateTime_new_from_timeval_utc);
g_test_add_func ("/GDateTime/new_from_timeval/overflow", test_GDateTime_new_from_timeval_overflow);
+ g_test_add_func ("/GDateTime/new_from_iso8601", test_GDateTime_new_from_iso8601);
g_test_add_func ("/GDateTime/new_full", test_GDateTime_new_full);
g_test_add_func ("/GDateTime/now", test_GDateTime_now);
g_test_add_func ("/GDateTime/printf", test_GDateTime_printf);
diff --git a/glib/tests/slist.c b/glib/tests/slist.c
index f1a84956f..beb476765 100644
--- a/glib/tests/slist.c
+++ b/glib/tests/slist.c
@@ -325,6 +325,77 @@ test_slist_concat (void)
g_assert (s == NULL);
}
+static void
+test_slist_copy (void)
+{
+ GSList *slist = NULL, *copy;
+ GSList *s1, *s2;
+ guint nums[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+ gsize i;
+
+ /* Copy and test a many-element list. */
+ for (i = 0; i < 10; i++)
+ slist = g_slist_append (slist, &nums[i]);
+
+ copy = g_slist_copy (slist);
+
+ g_assert_cmpuint (g_slist_length (copy), ==, g_slist_length (slist));
+
+ for (s1 = copy, s2 = slist; s1 != NULL && s2 != NULL; s1 = s1->next, s2 = s2->next)
+ g_assert (s1->data == s2->data);
+
+ g_slist_free (copy);
+ g_slist_free (slist);
+
+ /* Copy a NULL list. */
+ copy = g_slist_copy (NULL);
+ g_assert_null (copy);
+}
+
+static gpointer
+copy_and_count_string (gconstpointer src,
+ gpointer data)
+{
+ const gchar *str = src;
+ gsize *count = data;
+
+ *count = *count + 1;
+ return g_strdup (str);
+}
+
+static void
+test_slist_copy_deep (void)
+{
+ GSList *slist = NULL, *copy;
+ GSList *s1, *s2;
+ gsize count;
+
+ /* Deep-copy a simple list. */
+ slist = g_slist_append (slist, "a");
+ slist = g_slist_append (slist, "b");
+ slist = g_slist_append (slist, "c");
+
+ count = 0;
+ copy = g_slist_copy_deep (slist, copy_and_count_string, &count);
+
+ g_assert_cmpuint (count, ==, g_slist_length (slist));
+ g_assert_cmpuint (g_slist_length (copy), ==, count);
+ for (s1 = slist, s2 = copy; s1 != NULL && s2 != NULL; s1 = s1->next, s2 = s2->next)
+ {
+ g_assert_cmpstr (s1->data, ==, s2->data);
+ g_assert (s1->data != s2->data);
+ }
+
+ g_slist_free_full (copy, g_free);
+ g_slist_free (slist);
+
+ /* Try with an empty list. */
+ count = 0;
+ copy = g_slist_copy_deep (NULL, copy_and_count_string, &count);
+ g_assert_cmpuint (count, ==, 0);
+ g_assert_null (copy);
+}
+
int
main (int argc, char *argv[])
{
@@ -347,6 +418,8 @@ main (int argc, char *argv[])
g_test_add_func ("/slist/insert", test_slist_insert);
g_test_add_func ("/slist/position", test_slist_position);
g_test_add_func ("/slist/concat", test_slist_concat);
+ g_test_add_func ("/slist/copy", test_slist_copy);
+ g_test_add_func ("/slist/copy/deep", test_slist_copy_deep);
return g_test_run ();
}
diff --git a/glib/tests/unix.c b/glib/tests/unix.c
index 3543458dc..9d55a6c58 100644
--- a/glib/tests/unix.c
+++ b/glib/tests/unix.c
@@ -32,7 +32,7 @@ test_pipe (void)
GError *error = NULL;
int pipefd[2];
char buf[1024];
- ssize_t bytes_read;
+ gssize bytes_read;
gboolean res;
res = g_unix_open_pipe (pipefd, FD_CLOEXEC, &error);
diff --git a/glib/tests/utf8-misc.c b/glib/tests/utf8-misc.c
index a2d22df3f..7a8c37448 100644
--- a/glib/tests/utf8-misc.c
+++ b/glib/tests/utf8-misc.c
@@ -145,6 +145,11 @@ test_utf8_make_valid (void)
g_assert_cmpstr (r, ==, "\xe2\x82\xa0gh\xef\xbf\xbd\xef\xbf\xbdjl");
g_free (r);
+ /* invalid UTF8 without nul terminator followed by something unfortunate */
+ r = g_utf8_make_valid ("Bj\xc3\xb8", 3);
+ g_assert_cmpstr (r, ==, "Bj\xef\xbf\xbd");
+ g_free (r);
+
/* invalid UTF8 with embedded nul */
r = g_utf8_make_valid ("\xe2\x82\xa0gh\xe2\x00jl", 9);
g_assert_cmpstr (r, ==, "\xe2\x82\xa0gh\xef\xbf\xbd\xef\xbf\xbdjl");
diff --git a/glib/tests/utils.c b/glib/tests/utils.c
index 65ca806e0..7f8edd8da 100644
--- a/glib/tests/utils.c
+++ b/glib/tests/utils.c
@@ -391,6 +391,7 @@ test_hostname (void)
name = g_get_host_name ();
g_assert (name != NULL);
+ g_assert_true (g_utf8_validate (name, -1, NULL));
}
#ifdef G_OS_UNIX
@@ -477,6 +478,31 @@ test_desktop_special_dir (void)
g_assert (dir2 != NULL);
}
+static gboolean
+source_test (gpointer data)
+{
+ g_assert_not_reached ();
+ return G_SOURCE_REMOVE;
+}
+
+static void
+test_clear_source (void)
+{
+ guint id;
+
+ id = g_idle_add (source_test, NULL);
+ g_assert_cmpuint (id, >, 0);
+
+ g_clear_handle_id (&id, g_source_remove);
+ g_assert_cmpuint (id, ==, 0);
+
+ id = g_timeout_add (100, source_test, NULL);
+ g_assert_cmpuint (id, >, 0);
+
+ g_clear_handle_id (&id, g_source_remove);
+ g_assert_cmpuint (id, ==, 0);
+}
+
static void
test_clear_pointer (void)
{
@@ -631,6 +657,7 @@ main (int argc,
g_test_add_func ("/utils/specialdir/desktop", test_desktop_special_dir);
g_test_add_func ("/utils/clear-pointer", test_clear_pointer);
g_test_add_func ("/utils/take-pointer", test_take_pointer);
+ g_test_add_func ("/utils/clear-source", test_clear_source);
g_test_add_func ("/utils/misc-mem", test_misc_mem);
g_test_add_func ("/utils/nullify", test_nullify);
g_test_add_func ("/utils/atexit", test_atexit);
diff --git a/gmodule/gmodule-dl.c b/gmodule/gmodule-dl.c
index 42363aac5..5d0200c9d 100644
--- a/gmodule/gmodule-dl.c
+++ b/gmodule/gmodule-dl.c
@@ -115,10 +115,11 @@ _g_module_self (void)
/* On Android 32 bit (i.e. not __LP64__), dlopen(NULL)
* does not work reliable and generally no symbols are found
* at all. RTLD_DEFAULT works though.
- * On Android 64 bit, dlopen(NULL) seems to work but RTLD_DEFAULT
- * is NULL, which is considered an invalid module.
+ * On Android 64 bit, dlopen(NULL) seems to work but dlsym(handle)
+ * always returns 'undefined symbol'. Only if RTLD_DEFAULT or
+ * NULL is given, dlsym returns an appropriate pointer.
*/
-#if defined(__BIONIC__) && !defined(__LP64__)
+#if defined(__BIONIC__)
handle = RTLD_DEFAULT;
#else
handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
@@ -138,7 +139,7 @@ _g_module_close (gpointer handle,
*
* See above for the Android special case
*/
-#if defined(__BIONIC__) && !defined(__LP64__)
+#if defined(__BIONIC__)
is_unref = (handle != RTLD_DEFAULT);
#else
is_unref |= 1;
diff --git a/gmodule/gmodule-win32.c b/gmodule/gmodule-win32.c
index 4f707b525..20459f372 100644
--- a/gmodule/gmodule-win32.c
+++ b/gmodule/gmodule-win32.c
@@ -70,6 +70,8 @@ _g_module_open (const gchar *file_name,
{
HINSTANCE handle;
wchar_t *wfilename;
+ DWORD old_mode;
+ BOOL success;
#ifdef G_WITH_CYGWIN
gchar tmp[MAX_PATH];
@@ -78,7 +80,13 @@ _g_module_open (const gchar *file_name,
#endif
wfilename = g_utf8_to_utf16 (file_name, -1, NULL, NULL, NULL);
+ /* suppress error dialog */
+ success = SetThreadErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS, &old_mode);
+ if (!success)
+ set_error ("");
handle = LoadLibraryW (wfilename);
+ if (success)
+ SetThreadErrorMode (old_mode, NULL);
g_free (wfilename);
if (!handle)
diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c
index c55fc762e..886eb85b0 100644
--- a/gmodule/gmodule.c
+++ b/gmodule/gmodule.c
@@ -510,7 +510,11 @@ g_module_open (const gchar *file_name,
if (!main_module)
{
handle = _g_module_self ();
+/* On Android 64 bit, RTLD_DEFAULT is (void *)0x0
+ * so it always fails to create main_module if file_name is NULL */
+#if !defined(__BIONIC__) || !defined(__LP64__)
if (handle)
+#endif
{
main_module = g_new (GModule, 1);
main_module->file_name = NULL;
diff --git a/gobject/Makefile.am b/gobject/Makefile.am
index 73967627d..b6f21de29 100644
--- a/gobject/Makefile.am
+++ b/gobject/Makefile.am
@@ -248,6 +248,7 @@ distclean-local:
gdbdir = $(datadir)/glib-2.0/gdb
dist_gdb_DATA = gobject_gdb.py
+all-local: libgobject-gdb.py
libgobject-gdb.py: libgobject-gdb.py.in
$(AM_V_GEN) $(SED) -e "s|\@datadir\@|$(datadir)|" $(srcdir)/libgobject-gdb.py.in > $(builddir)/libgobject-gdb.py
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index 97aa07587..cc7166456 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -109,12 +109,6 @@ _g_boxed_type_init (void)
g_assert (type == G_TYPE_BOXED);
}
-static GDate *
-gdate_copy (GDate *date)
-{
- return g_date_new_julian (g_date_get_julian (date));
-}
-
static GString *
gstring_copy (GString *src_gstring)
{
@@ -130,7 +124,7 @@ gstring_free (GString *gstring)
G_DEFINE_BOXED_TYPE (GClosure, g_closure, g_closure_ref, g_closure_unref)
G_DEFINE_BOXED_TYPE (GValue, g_value, value_copy, value_free)
G_DEFINE_BOXED_TYPE (GValueArray, g_value_array, g_value_array_copy, g_value_array_free)
-G_DEFINE_BOXED_TYPE (GDate, g_date, gdate_copy, g_date_free)
+G_DEFINE_BOXED_TYPE (GDate, g_date, g_date_copy, g_date_free)
/* the naming is a bit odd, but GString is obviously not G_TYPE_STRING */
G_DEFINE_BOXED_TYPE (GString, g_gstring, gstring_copy, gstring_free)
G_DEFINE_BOXED_TYPE (GHashTable, g_hash_table, g_hash_table_ref, g_hash_table_unref)
diff --git a/gobject/gclosure.c b/gobject/gclosure.c
index 27de53f8d..4d3031cd2 100644
--- a/gobject/gclosure.c
+++ b/gobject/gclosure.c
@@ -184,7 +184,7 @@ enum {
* }
* ]|
*
- * Returns: (transfer full): a newly allocated #GClosure
+ * Returns: (transfer none): a floating reference to a new #GClosure
*/
GClosure*
g_closure_new_simple (guint sizeof_closure,
@@ -930,7 +930,7 @@ _g_closure_set_va_marshal (GClosure *closure,
* Creates a new closure which invokes @callback_func with @user_data as
* the last parameter.
*
- * Returns: a new #GCClosure
+ * Returns: (transfer none): a floating reference to a new #GCClosure
*/
GClosure*
g_cclosure_new (GCallback callback_func,
@@ -958,7 +958,7 @@ g_cclosure_new (GCallback callback_func,
* Creates a new closure which invokes @callback_func with @user_data as
* the first parameter.
*
- * Returns: (transfer full): a new #GCClosure
+ * Returns: (transfer none): a floating reference to a new #GCClosure
*/
GClosure*
g_cclosure_new_swap (GCallback callback_func,
@@ -1126,7 +1126,7 @@ g_type_iface_meta_marshalv (GClosure *closure,
* @struct_offset in the class structure of the interface or classed type
* identified by @itype.
*
- * Returns: a new #GCClosure
+ * Returns: (transfer none): a floating reference to a new #GCClosure
*/
GClosure*
g_signal_type_cclosure_new (GType itype,
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
index 3656bf93c..2560f9fb2 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -1034,20 +1034,19 @@ if __name__ == '__main__':
elif args.body:
if args.verbose:
print_info('Generating definition for {}'.format(line.strip()))
- generate_std_alias = False
- if args.stdinc:
- std_marshaller = generate_marshaller_name(STD_PREFIX, retval, params)
- if std_marshaller in GOBJECT_MARSHALLERS:
- if args.verbose:
- print_info('Skipping default marshaller {}'.format(line.strip()))
- generate_std_alias = True
+ if compatibility_mode:
+ generate_std_alias = False
+ if args.stdinc:
+ std_marshaller = generate_marshaller_name(STD_PREFIX, retval, params)
+ if std_marshaller in GOBJECT_MARSHALLERS:
+ if args.verbose:
+ print_info('Skipping default marshaller {}'.format(line.strip()))
+ generate_std_alias = True
marshaller = generate_marshaller_name(args.prefix, retval, params)
- if generate_std_alias:
- # We need to generate the alias if we are in compatibility mode
- if compatibility_mode:
- generate_marshaller_alias(args.output, marshaller, std_marshaller,
- source_location=location,
- include_va=args.valist_marshallers)
+ if compatibility_mode and generate_std_alias:
+ generate_marshaller_alias(args.output, marshaller, std_marshaller,
+ source_location=location,
+ include_va=args.valist_marshallers)
else:
generate_marshallers_body(args.output, retval, params,
prefix=args.prefix,
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index d551cdcf4..e8124b8f3 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -26,6 +26,14 @@ the GNU General Public License which can be found in the
GLib source package. Sources, examples and contact
information are available at http://www.gtk.org'''
+# Python 2 defaults to ASCII in case stdout is redirected.
+# This should make it match Python 3, which uses the locale encoding.
+if sys.stdout.encoding is None:
+ output_stream = codecs.getwriter(
+ locale.getpreferredencoding())(sys.stdout)
+else:
+ output_stream = sys.stdout
+
# pylint: disable=too-few-public-methods
class Color:
'''ANSI Terminal colors'''
@@ -73,29 +81,6 @@ def write_output(output):
global output_stream
print(output, file=output_stream)
-
-# Python 2 defaults to ASCII in case stdout is redirected.
-# This should make it match Python 3, which uses the locale encoding.
-if sys.stdout.encoding is None:
- output_stream = codecs.getwriter(
- locale.getpreferredencoding())(sys.stdout)
-else:
- output_stream = sys.stdout
-
-
-# Some source files aren't UTF-8 and the old perl version didn't care.
-# Replace invalid data with a replacement character to keep things working.
-# https://bugzilla.gnome.org/show_bug.cgi?id=785113#c20
-def replace_and_warn(err):
- # 7 characters of context either side of the offending character
- print_warning('UnicodeWarning: {} at {} ({})'.format(
- err.reason, err.start,
- err.object[err.start - 7:err.end + 7]))
- return ('?', err.end)
-
-codecs.register_error('replace_and_warn', replace_and_warn)
-
-
# glib-mkenums.py
# Information about the current enumeration
flags = None # Is enumeration a bitmask?
@@ -172,8 +157,7 @@ def parse_entries(file, file_name):
m = re.match(r'\#include\s*<([^>]*)>', line)
if m:
newfilename = os.path.join("..", m.group(1))
- newfile = io.open(newfilename, encoding="utf-8",
- errors="replace_and_warn")
+ newfile = io.open(newfilename, encoding="utf-8")
if not parse_entries(newfile, newfilename):
return False
@@ -269,7 +253,7 @@ def read_template_file(file):
}
in_ = 'junk'
- ifile = io.open(file, encoding="utf-8", errors="replace_and_warn")
+ ifile = io.open(file, encoding="utf-8")
for line in ifile:
m = re.match(r'\/\*\*\*\s+(BEGIN|END)\s+([\w-]+)\s+\*\*\*\/', line)
if m:
@@ -429,8 +413,7 @@ def process_file(curfilename):
firstenum = True
try:
- curfile = io.open(curfilename, encoding="utf-8",
- errors="replace_and_warn")
+ curfile = io.open(curfilename, encoding="utf-8")
except IOError as e:
if e.errno == errno.ENOENT:
print_warning('No file "{}" found.'.format(curfilename))
diff --git a/gobject/gobject.c b/gobject/gobject.c
index e79c5e512..99f6ec998 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -1007,7 +1007,7 @@ g_object_init (GObject *object,
{
G_LOCK (debug_objects);
debug_objects_count++;
- g_hash_table_insert (debug_objects_ht, object, object);
+ g_hash_table_add (debug_objects_ht, object);
G_UNLOCK (debug_objects);
});
}
@@ -1062,7 +1062,7 @@ g_object_finalize (GObject *object)
GOBJECT_IF_DEBUG (OBJECTS,
{
G_LOCK (debug_objects);
- g_assert (g_hash_table_lookup (debug_objects_ht, object) == object);
+ g_assert (g_hash_table_contains (debug_objects_ht, object));
g_hash_table_remove (debug_objects_ht, object);
debug_objects_count--;
G_UNLOCK (debug_objects);
@@ -3335,7 +3335,7 @@ g_object_unref (gpointer _object)
{
/* catch objects not chaining finalize handlers */
G_LOCK (debug_objects);
- g_assert (g_hash_table_lookup (debug_objects_ht, object) == NULL);
+ g_assert (!g_hash_table_contains (debug_objects_ht, object));
G_UNLOCK (debug_objects);
});
g_type_free_instance ((GTypeInstance*) object);
@@ -3375,7 +3375,7 @@ g_clear_object (volatile GObject **object_ptr)
* This function gets back user data pointers stored via
* g_object_set_qdata().
*
- * Returns: (transfer none): The user data pointer set, or %NULL
+ * Returns: (transfer none) (nullable): The user data pointer set, or %NULL
*/
gpointer
g_object_get_qdata (GObject *object,
@@ -3390,7 +3390,7 @@ g_object_get_qdata (GObject *object,
* g_object_set_qdata: (skip)
* @object: The GObject to set store a user data pointer
* @quark: A #GQuark, naming the user data pointer
- * @data: An opaque user data pointer
+ * @data: (nullable): An opaque user data pointer
*
* This sets an opaque, named pointer on an object.
* The name is specified through a #GQuark (retrived e.g. via
@@ -3413,7 +3413,7 @@ g_object_set_qdata (GObject *object,
}
/**
- * g_object_dup_qdata:
+ * g_object_dup_qdata: (skip)
* @object: the #GObject to store user data on
* @quark: a #GQuark, naming the user data pointer
* @dup_func: (nullable): function to dup the value
@@ -3454,13 +3454,13 @@ g_object_dup_qdata (GObject *object,
}
/**
- * g_object_replace_qdata:
+ * g_object_replace_qdata: (skip)
* @object: the #GObject to store user data on
* @quark: a #GQuark, naming the user data pointer
* @oldval: (nullable): the old value to compare against
* @newval: (nullable): the new value
* @destroy: (nullable): a destroy notify for the new value
- * @old_destroy: (nullable): destroy notify for the existing value
+ * @old_destroy: (out) (optional): destroy notify for the existing value
*
* Compares the user data for the key @quark on @object with
* @oldval, and if they are the same, replaces @oldval with
@@ -3501,8 +3501,8 @@ g_object_replace_qdata (GObject *object,
* g_object_set_qdata_full: (skip)
* @object: The GObject to set store a user data pointer
* @quark: A #GQuark, naming the user data pointer
- * @data: An opaque user data pointer
- * @destroy: Function to invoke with @data as argument, when @data
+ * @data: (nullable): An opaque user data pointer
+ * @destroy: (nullable): Function to invoke with @data as argument, when @data
* needs to be freed
*
* This function works like g_object_set_qdata(), but in addition,
@@ -3565,7 +3565,7 @@ g_object_set_qdata_full (GObject *object,
* and thus the partial string list would have been freed upon
* g_object_set_qdata_full().
*
- * Returns: (transfer full): The user data pointer set, or %NULL
+ * Returns: (transfer full) (nullable): The user data pointer set, or %NULL
*/
gpointer
g_object_steal_qdata (GObject *object,
@@ -3584,7 +3584,8 @@ g_object_steal_qdata (GObject *object,
*
* Gets a named field from the objects table of associations (see g_object_set_data()).
*
- * Returns: (transfer none): the data if found, or %NULL if no such data exists.
+ * Returns: (transfer none) (nullable): the data if found,
+ * or %NULL if no such data exists.
*/
gpointer
g_object_get_data (GObject *object,
@@ -3600,7 +3601,7 @@ g_object_get_data (GObject *object,
* g_object_set_data:
* @object: #GObject containing the associations.
* @key: name of the key
- * @data: data to associate with that key
+ * @data: (nullable): data to associate with that key
*
* Each object carries around a table of associations from
* strings to pointers. This function lets you set an association.
@@ -3620,7 +3621,7 @@ g_object_set_data (GObject *object,
}
/**
- * g_object_dup_data:
+ * g_object_dup_data: (skip)
* @object: the #GObject to store user data on
* @key: a string, naming the user data pointer
* @dup_func: (nullable): function to dup the value
@@ -3663,13 +3664,13 @@ g_object_dup_data (GObject *object,
}
/**
- * g_object_replace_data:
+ * g_object_replace_data: (skip)
* @object: the #GObject to store user data on
* @key: a string, naming the user data pointer
* @oldval: (nullable): the old value to compare against
* @newval: (nullable): the new value
* @destroy: (nullable): a destroy notify for the new value
- * @old_destroy: (nullable): destroy notify for the existing value
+ * @old_destroy: (out) (optional): destroy notify for the existing value
*
* Compares the user data for the key @key on @object with
* @oldval, and if they are the same, replaces @oldval with
@@ -3711,8 +3712,8 @@ g_object_replace_data (GObject *object,
* g_object_set_data_full: (skip)
* @object: #GObject containing the associations
* @key: name of the key
- * @data: data to associate with that key
- * @destroy: function to call when the association is destroyed
+ * @data: (nullable): data to associate with that key
+ * @destroy: (nullable): function to call when the association is destroyed
*
* Like g_object_set_data() except it adds notification
* for when the association is destroyed, either by setting it
@@ -3741,7 +3742,8 @@ g_object_set_data_full (GObject *object,
* Remove a specified datum from the object's data associations,
* without invoking the association's destroy handler.
*
- * Returns: (transfer full): the data if found, or %NULL if no such data exists.
+ * Returns: (transfer full) (nullable): the data if found, or %NULL
+ * if no such data exists.
*/
gpointer
g_object_steal_data (GObject *object,
diff --git a/gobject/gparam.c b/gobject/gparam.c
index b7f71f5d2..79ee834d5 100644
--- a/gobject/gparam.c
+++ b/gobject/gparam.c
@@ -948,7 +948,7 @@ g_param_spec_pool_insert (GParamSpecPool *pool,
g_mutex_lock (&pool->mutex);
pspec->owner_type = owner_type;
g_param_spec_ref (pspec);
- g_hash_table_insert (pool->hash_table, pspec, pspec);
+ g_hash_table_add (pool->hash_table, pspec);
g_mutex_unlock (&pool->mutex);
}
else
@@ -1529,7 +1529,7 @@ g_value_dup_param (const GValue *value)
*
* Gets the default value of @pspec as a pointer to a #GValue.
*
- * The #GValue will remain value for the life of @pspec.
+ * The #GValue will remain valid for the life of @pspec.
*
* Returns: a pointer to a #GValue which must not be modified
*
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index 82ca20182..b22dfcca8 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -76,7 +76,7 @@
* 4. Invocation of user provided signal handlers (where the @after flag is set)
*
* 5. Invocation of the object method handler for %G_SIGNAL_RUN_CLEANUP signals
-
+ *
* The user-provided signal handlers are called in the order they were
* connected in.
*
@@ -3804,6 +3804,8 @@ invalid_closure_notify (gpointer instance,
SIGNAL_LOCK ();
handler = handler_lookup (instance, 0, closure, &signal_id);
+ /* See https://bugzilla.gnome.org/show_bug.cgi?id=730296 for discussion about this... */
+ g_assert (handler != NULL);
g_assert (handler->closure == closure);
handler->sequential_number = 0;
diff --git a/gobject/gvalue.h b/gobject/gvalue.h
index e4760f4b8..9d8f03482 100644
--- a/gobject/gvalue.h
+++ b/gobject/gvalue.h
@@ -88,6 +88,8 @@ G_BEGIN_DECLS
*
* The type of value transformation functions which can be registered with
* g_value_register_transform_func().
+ *
+ * @dest_value will be initialized to the correct destination type.
*/
typedef void (*GValueTransform) (const GValue *src_value,
GValue *dest_value);
diff --git a/gobject/gvaluearray.c b/gobject/gvaluearray.c
index 76d946846..6648c7318 100644
--- a/gobject/gvaluearray.c
+++ b/gobject/gvaluearray.c
@@ -147,7 +147,7 @@ g_value_array_new (guint n_prealloced)
}
/**
- * g_value_array_free:
+ * g_value_array_free: (skip)
* @value_array: #GValueArray to free
*
* Free a #GValueArray including its contents.
diff --git a/gobject/meson.build b/gobject/meson.build
index aecca57c7..4a392c29d 100644
--- a/gobject/meson.build
+++ b/gobject/meson.build
@@ -76,7 +76,6 @@ python_tools_conf.set('VERSION', glib_version)
python_tools_conf.set('PYTHON', python.path())
foreach tool: python_tools
- # FIXME: Ensure we set the appropriate permissions
tool_bin = configure_file(
input : tool + '.in',
output : tool,
@@ -101,8 +100,7 @@ configure_file(
input: 'libgobject-gdb.py.in',
output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
- install: true,
- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + get_option('libdir'))
+ install_dir: gdb_install_dir,
)
if enable_systemtap
diff --git a/m4macros/glib-2.0.m4 b/m4macros/glib-2.0.m4
index d8f03d420..4b1901947 100644
--- a/m4macros/glib-2.0.m4
+++ b/m4macros/glib-2.0.m4
@@ -1,6 +1,9 @@
# Configure paths for GLIB
# Owen Taylor 1997-2001
+# Increment this whenever this file is changed.
+#serial 1
+
dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
dnl gthread, or gio is specified in MODULES, pass to pkg-config
@@ -90,7 +93,7 @@ dnl
#include <stdlib.h>
int
-main ()
+main (void)
{
unsigned int major, minor, micro;
diff --git a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
index dc17a98db..df6fbf012 100644
--- a/m4macros/glib-gettext.m4
+++ b/m4macros/glib-gettext.m4
@@ -25,7 +25,10 @@
#
# Modified to require ngettext
# Matthias Clasen <mclasen@redhat.com> 08/06/2004
-#
+
+# Increment this whenever this file is changed.
+#serial 1
+
# We need this here as well, since someone might use autoconf-2.5x
# to configure GLib then an older version to configure a package
# using AM_GLIB_GNU_GETTEXT
diff --git a/m4macros/glibtests.m4 b/m4macros/glibtests.m4
index 7d5920a43..581726a51 100644
--- a/m4macros/glibtests.m4
+++ b/m4macros/glibtests.m4
@@ -1,3 +1,6 @@
+# Increment this whenever this file is changed.
+#serial 1
+
dnl GLIB_TESTS
dnl
diff --git a/m4macros/gsettings.m4 b/m4macros/gsettings.m4
index 35ee5aa92..03c16fb80 100644
--- a/m4macros/gsettings.m4
+++ b/m4macros/gsettings.m4
@@ -1,3 +1,6 @@
+# Increment this whenever this file is changed.
+#serial 1
+
dnl GLIB_GSETTINGS
dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
dnl the schema should be compiled
diff --git a/meson.build b/meson.build
index af6ca0dc2..cd9cbf2ce 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('glib', 'c', 'cpp',
- version : '2.54.3',
+ version : '2.55.0',
meson_version : '>= 0.38.1',
default_options : [
'warning_level=1',
@@ -451,6 +451,14 @@ else
endif
message('Checking whether to use statfs or statvfs .. ' + stat_func_to_use)
+if host_system == 'linux'
+ if cc.has_function('mkostemp',
+ prefix: '''#define _GNU_SOURCE
+ #include <stdlib.h>''')
+ glib_conf.set('HAVE_MKOSTEMP', 1)
+ endif
+endif
+
# Mac OS X Carbon support
glib_have_carbon = cc.compiles('''#include <Carbon/Carbon.h>
#include <CoreServices/CoreServices.h>''',
@@ -1456,7 +1464,7 @@ else
if libz_dep.found()
zlib_libname = '-lzlib'
else
- zlib_dep = subproject('zlib').get_variable('zlib_dep')
+ libz_dep = subproject('zlib').get_variable('zlib_dep')
endif
endif
endif
@@ -1484,7 +1492,7 @@ libmount_opt = get_option('enable-libmount')
if host_system == 'linux' and libmount_opt != 'no'
libmount_dep = [dependency('mount', version : '>=2.28', required : false)]
if not libmount_dep[0].found()
- libmount_dep = [cc.find_library('mount')]
+ libmount_dep = [cc.find_library('mount', required : false)]
libmount_h = cc.has_header('libmount/libmount.h')
libmount_needed = libmount_opt == 'yes' and host_system == 'linux'
if libmount_needed and (not libmount_dep[0].found() or not libmount_h)
@@ -1527,6 +1535,7 @@ if use_system_pcre
endif
if libmount_dep.length() == 1 and libmount_dep[0].found()
glib_conf.set('LIBMOUNT_LIBS', '-lmount')
+ glib_conf.set('HAVE_LIBMOUNT', 1)
endif
glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules')
# FIXME: Missing:
diff --git a/po/cs.po b/po/cs.po
index e5e762315..fe3dc85d1 100644
--- a/po/cs.po
+++ b/po/cs.po
@@ -16,8 +16,8 @@ msgstr ""
"Project-Id-Version: glib\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=glib&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2017-08-07 06:44+0000\n"
-"PO-Revision-Date: 2017-08-22 16:38+0200\n"
+"POT-Creation-Date: 2017-11-02 13:40+0000\n"
+"PO-Revision-Date: 2017-11-03 12:38+0100\n"
"Last-Translator: Marek Černocký <marek@manet.cz>\n"
"Language-Team: čeština <gnome-cs-list@gnome.org>\n"
"Language: cs\n"
@@ -293,8 +293,8 @@ msgid "Truncate not supported on base stream"
msgstr "Zkrácování není v proudu podporováno"
#: ../gio/gcancellable.c:317 ../gio/gdbusconnection.c:1849
-#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:870
-#: ../gio/gsimpleasyncresult.c:896
+#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:871
+#: ../gio/gsimpleasyncresult.c:897
#, c-format
msgid "Operation was cancelled"
msgstr "Operace byla zrušena"
@@ -313,23 +313,23 @@ msgstr "Cíl nemá dostatek místa"
#: ../gio/gcharsetconverter.c:342 ../gio/gdatainputstream.c:848
#: ../gio/gdatainputstream.c:1257 ../glib/gconvert.c:438 ../glib/gconvert.c:845
-#: ../glib/giochannel.c:1556 ../glib/giochannel.c:1598
-#: ../glib/giochannel.c:2442 ../glib/gutf8.c:866 ../glib/gutf8.c:1319
+#: ../glib/giochannel.c:1557 ../glib/giochannel.c:1599
+#: ../glib/giochannel.c:2443 ../glib/gutf8.c:866 ../glib/gutf8.c:1319
msgid "Invalid byte sequence in conversion input"
msgstr "Neplatná posloupnost bajtů na vstupu převodu"
#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:446 ../glib/gconvert.c:770
-#: ../glib/giochannel.c:1563 ../glib/giochannel.c:2454
+#: ../glib/giochannel.c:1564 ../glib/giochannel.c:2455
#, c-format
msgid "Error during conversion: %s"
msgstr "Chyba při převodu: %s"
-#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1096
+#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1101
msgid "Cancellable initialization not supported"
msgstr "Zrušitelné spuštění není podporováno"
#: ../gio/gcharsetconverter.c:456 ../glib/gconvert.c:321
-#: ../glib/giochannel.c:1384
+#: ../glib/giochannel.c:1385
#, c-format
msgid "Conversion from character set “%s” to “%s” is not supported"
msgstr "Převod ze znakové sady „%s“ do „%s“ není podporován"
@@ -552,7 +552,7 @@ msgid ""
msgstr ""
"Vyčerpány všechny dostupné ověřovací mechanismy (pokusů: %s) (dostupných: %s)"
-#: ../gio/gdbusauth.c:1174
+#: ../gio/gdbusauth.c:1171
msgid "Cancelled via GDBusAuthObserver::authorize-authenticated-peer"
msgstr "Zrušeno přes GDBusAuthObserver::authorize-authenticated-peer"
@@ -578,24 +578,24 @@ msgstr "Chyba při vytváření složky %s: %s"
msgid "Error opening keyring “%s” for reading: "
msgstr "Chyba při otevírání klíčenky „%s“ ke čtení: "
-#: ../gio/gdbusauthmechanismsha1.c:403 ../gio/gdbusauthmechanismsha1.c:721
+#: ../gio/gdbusauthmechanismsha1.c:402 ../gio/gdbusauthmechanismsha1.c:720
#, c-format
msgid "Line %d of the keyring at “%s” with content “%s” is malformed"
msgstr "Řádek %d klíčenky na „%s“ s obsahem „%s“ má chybný formát"
-#: ../gio/gdbusauthmechanismsha1.c:417 ../gio/gdbusauthmechanismsha1.c:735
+#: ../gio/gdbusauthmechanismsha1.c:416 ../gio/gdbusauthmechanismsha1.c:734
#, c-format
msgid ""
"First token of line %d of the keyring at “%s” with content “%s” is malformed"
msgstr "První symbol řádku %d klíčenky na „%s“ s obsahem „%s“ má chybný formát"
-#: ../gio/gdbusauthmechanismsha1.c:432 ../gio/gdbusauthmechanismsha1.c:749
+#: ../gio/gdbusauthmechanismsha1.c:430 ../gio/gdbusauthmechanismsha1.c:748
#, c-format
msgid ""
"Second token of line %d of the keyring at “%s” with content “%s” is malformed"
msgstr "Druhý symbol řádku %d klíčenky na „%s“ s obsahem „%s“ má chybný formát"
-#: ../gio/gdbusauthmechanismsha1.c:456
+#: ../gio/gdbusauthmechanismsha1.c:454
#, c-format
msgid "Didn’t find cookie with id %d in the keyring at “%s”"
msgstr "Nenalezena cookie s id %d v klíčence na „%s“"
@@ -605,27 +605,27 @@ msgstr "Nenalezena cookie s id %d v klíčence na „%s“"
msgid "Error deleting stale lock file “%s”: %s"
msgstr "Chyba při mazání zastaralého zamykacího souboru „%s“: %s"
-#: ../gio/gdbusauthmechanismsha1.c:569
+#: ../gio/gdbusauthmechanismsha1.c:568
#, c-format
msgid "Error creating lock file “%s”: %s"
msgstr "Chyba při vytváření zamykacího souboru „%s“: %s"
-#: ../gio/gdbusauthmechanismsha1.c:600
+#: ../gio/gdbusauthmechanismsha1.c:599
#, c-format
msgid "Error closing (unlinked) lock file “%s”: %s"
msgstr "Chyba při zavírání (neodkazovaného) zamykacího souboru „%s“: %s"
-#: ../gio/gdbusauthmechanismsha1.c:611
+#: ../gio/gdbusauthmechanismsha1.c:610
#, c-format
msgid "Error unlinking lock file “%s”: %s"
msgstr "Chyba mazámí zamykacího souboru „%s“: %s"
-#: ../gio/gdbusauthmechanismsha1.c:688
+#: ../gio/gdbusauthmechanismsha1.c:687
#, c-format
msgid "Error opening keyring “%s” for writing: "
msgstr "Chyba při otevírání klíčenky „%s“ k zápisu: "
-#: ../gio/gdbusauthmechanismsha1.c:885
+#: ../gio/gdbusauthmechanismsha1.c:883
#, c-format
msgid "(Additionally, releasing the lock for “%s” also failed: %s) "
msgstr "(Navíc selhalo také uvolnění zámku pro „%s“: %s) "
@@ -791,17 +791,17 @@ msgstr ""
"Očekáván platný řetězec UTF-8, ale byly nalezeny neplatné bajty na pozici %d "
"(délka řetězce je %d). Platný řetězec UTF-8 až do příslušného bodu byl „%s“"
-#: ../gio/gdbusmessage.c:1589
+#: ../gio/gdbusmessage.c:1593
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus object path"
msgstr "Analyzovaná hodnota „%s“ není platná cesta objektu D-Bus"
-#: ../gio/gdbusmessage.c:1611
+#: ../gio/gdbusmessage.c:1615
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature"
msgstr "Analyzovaná hodnota „%s“ není platný podpis D-Bus"
-#: ../gio/gdbusmessage.c:1658
+#: ../gio/gdbusmessage.c:1662
#, c-format
msgid ""
"Encountered array of length %u byte. Maximum length is 2<<26 bytes (64 MiB)."
@@ -814,7 +814,7 @@ msgstr[1] ""
msgstr[2] ""
"Zjištěno pole o délce %u bajtů. Maximální délka je 2<<26 bajtů (64 MiB)."
-#: ../gio/gdbusmessage.c:1678
+#: ../gio/gdbusmessage.c:1682
#, c-format
msgid ""
"Encountered array of type “a%c”, expected to have a length a multiple of %u "
@@ -823,12 +823,12 @@ msgstr ""
"Vyskytlo se pole typu „a%c“, které by mělo mít délku v násobku %u bajtů, ale "
"skutečná délka je %u bajtů"
-#: ../gio/gdbusmessage.c:1845
+#: ../gio/gdbusmessage.c:1849
#, c-format
msgid "Parsed value “%s” for variant is not a valid D-Bus signature"
msgstr "Analyzovaná hodnota „%s“ varianty není platným podpisem D-Bus"
-#: ../gio/gdbusmessage.c:1869
+#: ../gio/gdbusmessage.c:1873
#, c-format
msgid ""
"Error deserializing GVariant with type string “%s” from the D-Bus wire format"
@@ -836,7 +836,7 @@ msgstr ""
"Chyba při rušení serializace GVariant s řetězcem typu „%s“ z přenosového "
"formátu D-Bus"
-#: ../gio/gdbusmessage.c:2053
+#: ../gio/gdbusmessage.c:2055
#, c-format
msgid ""
"Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value "
@@ -845,22 +845,22 @@ msgstr ""
"Neplatná hodnota endianity. Očekávána 0x6c („l“) nebo 0x42 („B“), ale "
"nalezena hodnota 0x%02x"
-#: ../gio/gdbusmessage.c:2066
+#: ../gio/gdbusmessage.c:2068
#, c-format
msgid "Invalid major protocol version. Expected 1 but found %d"
msgstr "Neplatná verze hlavního protokolu. Očekávána 1, ale nalezena %d"
-#: ../gio/gdbusmessage.c:2122
+#: ../gio/gdbusmessage.c:2124
#, c-format
msgid "Signature header with signature “%s” found but message body is empty"
msgstr "Nalezeno záhlaví podpisu s podpisem „%s“, ale tělo zprávy je prázdné"
-#: ../gio/gdbusmessage.c:2136
+#: ../gio/gdbusmessage.c:2138
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature (for body)"
msgstr "Analyzovaná hodnota „%s“ není platným podpisem D-Bus (pro tělo)"
-#: ../gio/gdbusmessage.c:2166
+#: ../gio/gdbusmessage.c:2168
#, c-format
msgid "No signature header in message but the message body is %u byte"
msgid_plural "No signature header in message but the message body is %u bytes"
@@ -868,11 +868,11 @@ msgstr[0] "Ve zprávě není záhlaví s podpisem, ale tělo zprávy má %u bajt
msgstr[1] "Ve zprávě není záhlaví s podpisem, ale tělo zprávy má %u bajty"
msgstr[2] "Ve zprávě není záhlaví s podpisem, ale tělo zprávy má %u bajtů"
-#: ../gio/gdbusmessage.c:2176
+#: ../gio/gdbusmessage.c:2178
msgid "Cannot deserialize message: "
msgstr "Nelze zrušit serializaci zprávy: "
-#: ../gio/gdbusmessage.c:2517
+#: ../gio/gdbusmessage.c:2519
#, c-format
msgid ""
"Error serializing GVariant with type string “%s” to the D-Bus wire format"
@@ -880,7 +880,7 @@ msgstr ""
"Chyba při serializaci GVariant s řetězcem typu „%s“ do přenosového formátu D-"
"Bus"
-#: ../gio/gdbusmessage.c:2654
+#: ../gio/gdbusmessage.c:2656
#, c-format
msgid ""
"Message has %d file descriptors but the header field indicates %d file "
@@ -888,33 +888,33 @@ msgid ""
msgstr ""
"Zpráva má %d popisovačů souboru, ale pole se záhlavím uvádí %d popisovačů"
-#: ../gio/gdbusmessage.c:2662
+#: ../gio/gdbusmessage.c:2664
msgid "Cannot serialize message: "
msgstr "Nelze serializovat zprávu: "
-#: ../gio/gdbusmessage.c:2706
+#: ../gio/gdbusmessage.c:2708
#, c-format
msgid "Message body has signature “%s” but there is no signature header"
msgstr "Tělo zprávy má podpis „%s“, ale záhlaví s podpisem neexistuje"
-#: ../gio/gdbusmessage.c:2716
+#: ../gio/gdbusmessage.c:2718
#, c-format
msgid ""
"Message body has type signature “%s” but signature in the header field is "
"“%s”"
msgstr "Tělo zprávy má podpis typu „%s“, ale podpis v poli se záhlavím je „%s“"
-#: ../gio/gdbusmessage.c:2732
+#: ../gio/gdbusmessage.c:2734
#, c-format
msgid "Message body is empty but signature in the header field is “(%s)”"
msgstr "Tělo zprávy je prázdné, ale podpis v poli se záhlavím je „(%s)“"
-#: ../gio/gdbusmessage.c:3285
+#: ../gio/gdbusmessage.c:3287
#, c-format
msgid "Error return with body of type “%s”"
msgstr "Navrácena chyba s tělem typu „%s“"
-#: ../gio/gdbusmessage.c:3293
+#: ../gio/gdbusmessage.c:3295
msgid "Error return with empty body"
msgstr "Navrácena chyba s prázdným tělem"
@@ -991,60 +991,60 @@ msgstr ""
"\n"
"Nápovědu k jednotlivým příkazům získáte použitím „%s PŘÍKAZ --help“.\n"
-#: ../gio/gdbus-tool.c:165 ../gio/gdbus-tool.c:227 ../gio/gdbus-tool.c:299
-#: ../gio/gdbus-tool.c:323 ../gio/gdbus-tool.c:725 ../gio/gdbus-tool.c:1068
-#: ../gio/gdbus-tool.c:1510
+#: ../gio/gdbus-tool.c:167 ../gio/gdbus-tool.c:234 ../gio/gdbus-tool.c:306
+#: ../gio/gdbus-tool.c:330 ../gio/gdbus-tool.c:811 ../gio/gdbus-tool.c:1150
+#: ../gio/gdbus-tool.c:1592
#, c-format
msgid "Error: %s\n"
msgstr "Chyba: %s\n"
-#: ../gio/gdbus-tool.c:176 ../gio/gdbus-tool.c:240 ../gio/gdbus-tool.c:1526
+#: ../gio/gdbus-tool.c:178 ../gio/gdbus-tool.c:247 ../gio/gdbus-tool.c:1608
#, c-format
msgid "Error parsing introspection XML: %s\n"
msgstr "Chyba při analýze introspection XML: %s\n"
-#: ../gio/gdbus-tool.c:209
+#: ../gio/gdbus-tool.c:216
#, c-format
msgid "Error: %s is not a valid name\n"
msgstr "Chyba: %s není platným názvem\n"
-#: ../gio/gdbus-tool.c:357
+#: ../gio/gdbus-tool.c:364
msgid "Connect to the system bus"
msgstr "Připojit k systémové sběrnici"
-#: ../gio/gdbus-tool.c:358
+#: ../gio/gdbus-tool.c:365
msgid "Connect to the session bus"
msgstr "Připojit ke sběrnici sezení"
-#: ../gio/gdbus-tool.c:359
+#: ../gio/gdbus-tool.c:366
msgid "Connect to given D-Bus address"
msgstr "Připojit k dané adrese D-Bus"
-#: ../gio/gdbus-tool.c:369
+#: ../gio/gdbus-tool.c:376
msgid "Connection Endpoint Options:"
msgstr "Volby koncového bodu spojení:"
-#: ../gio/gdbus-tool.c:370
+#: ../gio/gdbus-tool.c:377
msgid "Options specifying the connection endpoint"
msgstr "Volby určující koncový bod spojení"
-#: ../gio/gdbus-tool.c:392
+#: ../gio/gdbus-tool.c:399
#, c-format
msgid "No connection endpoint specified"
msgstr "Neurčen žádný koncový bod spojení"
-#: ../gio/gdbus-tool.c:402
+#: ../gio/gdbus-tool.c:409
#, c-format
msgid "Multiple connection endpoints specified"
msgstr "Určeno více koncových bodů spojení"
-#: ../gio/gdbus-tool.c:472
+#: ../gio/gdbus-tool.c:479
#, c-format
msgid ""
"Warning: According to introspection data, interface “%s” does not exist\n"
msgstr "Varování: Podle introspektivních dat rozhraní „%s“ neexistuje\n"
-#: ../gio/gdbus-tool.c:481
+#: ../gio/gdbus-tool.c:488
#, c-format
msgid ""
"Warning: According to introspection data, method “%s” does not exist on "
@@ -1053,168 +1053,169 @@ msgstr ""
"Varování: Podle introspektivních dat metoda „%s“ neexistuje na rozhraní "
"„%s“\n"
-#: ../gio/gdbus-tool.c:543
+#: ../gio/gdbus-tool.c:550
msgid "Optional destination for signal (unique name)"
msgstr "Volitelný cíl signálu (jedinečný název)"
-#: ../gio/gdbus-tool.c:544
+#: ../gio/gdbus-tool.c:551
msgid "Object path to emit signal on"
msgstr "Cesta objektu, na kterou se má vyslat signál"
-#: ../gio/gdbus-tool.c:545
+#: ../gio/gdbus-tool.c:552
msgid "Signal and interface name"
msgstr "Název signálu a rozhraní"
-#: ../gio/gdbus-tool.c:579
+#: ../gio/gdbus-tool.c:587
msgid "Emit a signal."
msgstr "Vyslat signál."
-#: ../gio/gdbus-tool.c:613 ../gio/gdbus-tool.c:858 ../gio/gdbus-tool.c:1616
-#: ../gio/gdbus-tool.c:1851 ../gio/gdbus-tool.c:2067
+#: ../gio/gdbus-tool.c:642 ../gio/gdbus-tool.c:944 ../gio/gdbus-tool.c:1698
+#: ../gio/gdbus-tool.c:1931 ../gio/gdbus-tool.c:2152
#, c-format
msgid "Error connecting: %s\n"
msgstr "Chyba při spojení: %s\n"
-#: ../gio/gdbus-tool.c:625
+#: ../gio/gdbus-tool.c:659 ../gio/gdbus-tool.c:961 ../gio/gdbus-tool.c:1715
+#: ../gio/gdbus-tool.c:1956
#, c-format
-msgid "Error: object path not specified.\n"
-msgstr "Chyba: neurčena cesta objektu.\n"
+msgid "Error: Destination is not specified\n"
+msgstr "Chyba: Není určen žádný cíl\n"
+
+#: ../gio/gdbus-tool.c:670
+#, c-format
+msgid "Error: %s is not a valid unique bus name.\n"
+msgstr "Chyba: %s není platným jedinečným názvem sběrnice.\n"
+
+#: ../gio/gdbus-tool.c:685 ../gio/gdbus-tool.c:987 ../gio/gdbus-tool.c:1741
+#, c-format
+msgid "Error: Object path is not specified\n"
+msgstr "Chyba: Není určena žádná cesta k objektu\n"
-#: ../gio/gdbus-tool.c:630 ../gio/gdbus-tool.c:925 ../gio/gdbus-tool.c:1681
-#: ../gio/gdbus-tool.c:1917
+#: ../gio/gdbus-tool.c:705 ../gio/gdbus-tool.c:1007 ../gio/gdbus-tool.c:1761
+#: ../gio/gdbus-tool.c:2002
#, c-format
msgid "Error: %s is not a valid object path\n"
msgstr "Chyba: %s není platnou cestou objektu\n"
-#: ../gio/gdbus-tool.c:636
+#: ../gio/gdbus-tool.c:720
#, c-format
-msgid "Error: signal not specified.\n"
-msgstr "Chyba: neurčen žádný signál.\n"
+msgid "Error: Signal name is not specified\n"
+msgstr "Chyba: Není určen název signálu\n"
-#: ../gio/gdbus-tool.c:643
+#: ../gio/gdbus-tool.c:731
#, c-format
-msgid "Error: signal must be the fully-qualified name.\n"
-msgstr "Chyba: signál musí být úplný název.\n"
+msgid "Error: Signal name “%s” is invalid\n"
+msgstr "Chyba: Název signálu „%s“ je neplatný\n"
-#: ../gio/gdbus-tool.c:651
+#: ../gio/gdbus-tool.c:743
#, c-format
msgid "Error: %s is not a valid interface name\n"
msgstr "Chyba: %s není platným názvem rozhraní\n"
-#: ../gio/gdbus-tool.c:657
+#: ../gio/gdbus-tool.c:749
#, c-format
msgid "Error: %s is not a valid member name\n"
msgstr "Chyba: %s není platným názvem členu\n"
-#: ../gio/gdbus-tool.c:663
-#, c-format
-msgid "Error: %s is not a valid unique bus name.\n"
-msgstr "Chyba: %s není platným jedinečným názvem sběrnice.\n"
-
#. Use the original non-"parse-me-harder" error
-#: ../gio/gdbus-tool.c:700 ../gio/gdbus-tool.c:1037
+#: ../gio/gdbus-tool.c:786 ../gio/gdbus-tool.c:1119
#, c-format
msgid "Error parsing parameter %d: %s\n"
msgstr "Chyba při analyzování parametru %d: %s\n"
-#: ../gio/gdbus-tool.c:732
+#: ../gio/gdbus-tool.c:818
#, c-format
msgid "Error flushing connection: %s\n"
msgstr "Chyba při vyprazdňování spojení: %s\n"
-#: ../gio/gdbus-tool.c:759
+#: ../gio/gdbus-tool.c:845
msgid "Destination name to invoke method on"
msgstr "Název cíle, u kterého se má spustit metoda"
-#: ../gio/gdbus-tool.c:760
+#: ../gio/gdbus-tool.c:846
msgid "Object path to invoke method on"
msgstr "Cesta objektu, u kterého se má spustit metoda"
-#: ../gio/gdbus-tool.c:761
+#: ../gio/gdbus-tool.c:847
msgid "Method and interface name"
msgstr "Název metody a rozhraní"
-#: ../gio/gdbus-tool.c:762
+#: ../gio/gdbus-tool.c:848
msgid "Timeout in seconds"
msgstr "Časový limit v sekundách"
-#: ../gio/gdbus-tool.c:803
+#: ../gio/gdbus-tool.c:889
msgid "Invoke a method on a remote object."
msgstr "Spustit metodu na vzdáleném objektu."
-#: ../gio/gdbus-tool.c:878 ../gio/gdbus-tool.c:1635 ../gio/gdbus-tool.c:1870
-#, c-format
-msgid "Error: Destination is not specified\n"
-msgstr "Chyba: Neurčen žádný cíl\n"
-
-#: ../gio/gdbus-tool.c:890 ../gio/gdbus-tool.c:1652 ../gio/gdbus-tool.c:1882
+#: ../gio/gdbus-tool.c:972 ../gio/gdbus-tool.c:1732 ../gio/gdbus-tool.c:1967
#, c-format
msgid "Error: %s is not a valid bus name\n"
msgstr "Chyba: %s není platným názvem sběrnice\n"
-#: ../gio/gdbus-tool.c:905 ../gio/gdbus-tool.c:1661
-#, c-format
-msgid "Error: Object path is not specified\n"
-msgstr "Chyba: Neurčena žádná cesta objektu\n"
-
-#: ../gio/gdbus-tool.c:940
+#: ../gio/gdbus-tool.c:1022
#, c-format
msgid "Error: Method name is not specified\n"
-msgstr "Chyba: Název metody neurčen\n"
+msgstr "Chyba: Není určen název metody\n"
-#: ../gio/gdbus-tool.c:951
+#: ../gio/gdbus-tool.c:1033
#, c-format
msgid "Error: Method name “%s” is invalid\n"
msgstr "Chyba: Název metody „%s“ je neplatný\n"
-#: ../gio/gdbus-tool.c:1029
+#: ../gio/gdbus-tool.c:1111
#, c-format
msgid "Error parsing parameter %d of type “%s”: %s\n"
msgstr "Chyba při analyzování parametru %d typu „%s“: %s\n"
-#: ../gio/gdbus-tool.c:1473
+#: ../gio/gdbus-tool.c:1555
msgid "Destination name to introspect"
msgstr "Název cíle, u kterého provést introspection"
-#: ../gio/gdbus-tool.c:1474
+#: ../gio/gdbus-tool.c:1556
msgid "Object path to introspect"
msgstr "Cesta objektu, u které provést introspection"
-#: ../gio/gdbus-tool.c:1475
+#: ../gio/gdbus-tool.c:1557
msgid "Print XML"
msgstr "Vypsat XML"
-#: ../gio/gdbus-tool.c:1476
+#: ../gio/gdbus-tool.c:1558
msgid "Introspect children"
msgstr "Provést introspection potomka"
-#: ../gio/gdbus-tool.c:1477
+#: ../gio/gdbus-tool.c:1559
msgid "Only print properties"
msgstr "Vypsat pouze vlastnosti"
-#: ../gio/gdbus-tool.c:1568
+#: ../gio/gdbus-tool.c:1650
msgid "Introspect a remote object."
msgstr "Provést introspection vzdáleného objektu."
-#: ../gio/gdbus-tool.c:1773
+#: ../gio/gdbus-tool.c:1853
msgid "Destination name to monitor"
msgstr "Název cíle určený ke sledování"
-#: ../gio/gdbus-tool.c:1774
+#: ../gio/gdbus-tool.c:1854
msgid "Object path to monitor"
msgstr "Cesta objektu určená ke sledování"
-#: ../gio/gdbus-tool.c:1803
+#: ../gio/gdbus-tool.c:1883
msgid "Monitor a remote object."
msgstr "Sledovat vzdálený objekt."
-#: ../gio/gdbus-tool.c:1980
+#: ../gio/gdbus-tool.c:1941
+#, c-format
+msgid "Error: can’t monitor a non-message-bus connection\n"
+msgstr "Chyba: nelze monitorovat připojení na sběrnici bez zpráv\n"
+
+#: ../gio/gdbus-tool.c:2065
msgid "Service to activate before waiting for the other one (well-known name)"
msgstr ""
"Služba, která se má aktivovat před čekáním na jinou službu (oficiálně známý "
"název)"
-#: ../gio/gdbus-tool.c:1983
+#: ../gio/gdbus-tool.c:2068
msgid ""
"Timeout to wait for before exiting with an error (seconds); 0 for no timeout "
"(default)"
@@ -1222,35 +1223,35 @@ msgstr ""
"Časové omezení čekaní, po kterém se skončí s chybou (v sekundách). 0 znamená "
"bez omezení (výchozí)"
-#: ../gio/gdbus-tool.c:2031
+#: ../gio/gdbus-tool.c:2116
msgid "[OPTION…] BUS-NAME"
msgstr "[PŘEPÍNAČ…] NÁZEV-SBĚRNICE"
-#: ../gio/gdbus-tool.c:2033
+#: ../gio/gdbus-tool.c:2118
msgid "Wait for a bus name to appear."
msgstr "Čekat, než se objeví název sběrnice."
-#: ../gio/gdbus-tool.c:2109
+#: ../gio/gdbus-tool.c:2194
#, c-format
msgid "Error: A service to activate for must be specified.\n"
msgstr "Chyba: Musí být určena služba, pro kterou provádíte aktivaci.\n"
-#: ../gio/gdbus-tool.c:2114
+#: ../gio/gdbus-tool.c:2199
#, c-format
msgid "Error: A service to wait for must be specified.\n"
msgstr "Chyba: Musí být určena služba, na kterou čekáte.\n"
-#: ../gio/gdbus-tool.c:2119
+#: ../gio/gdbus-tool.c:2204
#, c-format
msgid "Error: Too many arguments.\n"
msgstr "Chyba: Příliš mnoho argumentů.\n"
-#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134
+#: ../gio/gdbus-tool.c:2212 ../gio/gdbus-tool.c:2219
#, c-format
msgid "Error: %s is not a valid well-known bus name.\n"
msgstr "Chyba: %s není platným oficiálně známým názvem sběrnice.\n"
-#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4533
+#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4531
msgid "Unnamed"
msgstr "Bez názvu"
@@ -1258,30 +1259,30 @@ msgstr "Bez názvu"
msgid "Desktop file didn’t specify Exec field"
msgstr "V souboru .desktop není určeno pole Exec"
-#: ../gio/gdesktopappinfo.c:2696
+#: ../gio/gdesktopappinfo.c:2694
msgid "Unable to find terminal required for application"
msgstr "Nezdařilo se najít terminál vyžadovaný pro aplikaci"
-#: ../gio/gdesktopappinfo.c:3129
+#: ../gio/gdesktopappinfo.c:3127
#, c-format
msgid "Can’t create user application configuration folder %s: %s"
msgstr "Nezdařilo se vytvořit složku %s s uživatelským nastavením aplikace: %s"
-#: ../gio/gdesktopappinfo.c:3133
+#: ../gio/gdesktopappinfo.c:3131
#, c-format
msgid "Can’t create user MIME configuration folder %s: %s"
msgstr "Nezdařilo se vytvořit složku %s s uživatelským nastavením MIME: %s"
-#: ../gio/gdesktopappinfo.c:3373 ../gio/gdesktopappinfo.c:3397
+#: ../gio/gdesktopappinfo.c:3371 ../gio/gdesktopappinfo.c:3395
msgid "Application information lacks an identifier"
msgstr "Informace o aplikaci postrádá identifikátor"
-#: ../gio/gdesktopappinfo.c:3631
+#: ../gio/gdesktopappinfo.c:3629
#, c-format
msgid "Can’t create user desktop file %s"
msgstr "Nezdařilo se vytvořit uživatelský soubor .desktop %s"
-#: ../gio/gdesktopappinfo.c:3765
+#: ../gio/gdesktopappinfo.c:3763
#, c-format
msgid "Custom definition for %s"
msgstr "Vlastní definice %s"
@@ -1345,11 +1346,11 @@ msgstr "Očekáváno GEmblem u GEmblemedIcon"
#: ../gio/gfile.c:969 ../gio/gfile.c:1207 ../gio/gfile.c:1345
#: ../gio/gfile.c:1583 ../gio/gfile.c:1638 ../gio/gfile.c:1696
#: ../gio/gfile.c:1780 ../gio/gfile.c:1837 ../gio/gfile.c:1901
-#: ../gio/gfile.c:1956 ../gio/gfile.c:3614 ../gio/gfile.c:3669
-#: ../gio/gfile.c:3905 ../gio/gfile.c:3947 ../gio/gfile.c:4415
-#: ../gio/gfile.c:4826 ../gio/gfile.c:4911 ../gio/gfile.c:5001
-#: ../gio/gfile.c:5098 ../gio/gfile.c:5185 ../gio/gfile.c:5286
-#: ../gio/gfile.c:7827 ../gio/gfile.c:7917 ../gio/gfile.c:8001
+#: ../gio/gfile.c:1956 ../gio/gfile.c:3602 ../gio/gfile.c:3657
+#: ../gio/gfile.c:3893 ../gio/gfile.c:3935 ../gio/gfile.c:4403
+#: ../gio/gfile.c:4814 ../gio/gfile.c:4899 ../gio/gfile.c:4989
+#: ../gio/gfile.c:5086 ../gio/gfile.c:5173 ../gio/gfile.c:5274
+#: ../gio/gfile.c:7817 ../gio/gfile.c:7907 ../gio/gfile.c:7991
#: ../gio/win32/gwinhttpfile.c:437
msgid "Operation not supported"
msgstr "Operace není podporována"
@@ -1362,7 +1363,7 @@ msgstr "Operace není podporována"
msgid "Containing mount does not exist"
msgstr "Obsahující připojené neexistuje"
-#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2377
+#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2378
msgid "Can’t copy over directory"
msgstr "Nelze kopírovat nad složku"
@@ -1379,49 +1380,49 @@ msgid "Can’t recursively copy directory"
msgstr "Složku nelze kopírovat rekurzivně"
# For splice(), see http://en.wikipedia.org/w/index.php?title=Splice_(system_call)&oldid=334434835
-#: ../gio/gfile.c:2889
+#: ../gio/gfile.c:2877
msgid "Splice not supported"
msgstr "splice() není podporováno"
-#: ../gio/gfile.c:2893
+#: ../gio/gfile.c:2881
#, c-format
msgid "Error splicing file: %s"
msgstr "Chyba při spojování souboru: %s"
-#: ../gio/gfile.c:3025
+#: ../gio/gfile.c:3013
msgid "Copy (reflink/clone) between mounts is not supported"
msgstr "Kopírování (reflink/clone) mezi připojeními není podporováno"
-#: ../gio/gfile.c:3029
+#: ../gio/gfile.c:3017
msgid "Copy (reflink/clone) is not supported or invalid"
msgstr "Kopírování (reflink/clone) není podporováno nebo je neplatné"
-#: ../gio/gfile.c:3034
+#: ../gio/gfile.c:3022
msgid "Copy (reflink/clone) is not supported or didn’t work"
msgstr "Kopírování (reflink/clone) není podporováno nebo neproběhlo správně"
-#: ../gio/gfile.c:3097
+#: ../gio/gfile.c:3085
msgid "Can’t copy special file"
msgstr "Nelze kopírovat zvláštní soubor"
-#: ../gio/gfile.c:3895
+#: ../gio/gfile.c:3883
msgid "Invalid symlink value given"
msgstr "Zadaný symbolický odkaz je neplatný"
-#: ../gio/gfile.c:4056
+#: ../gio/gfile.c:4044
msgid "Trash not supported"
msgstr "Zahozené není podporováno"
-#: ../gio/gfile.c:4168
+#: ../gio/gfile.c:4156
#, c-format
msgid "File names cannot contain “%c”"
msgstr "Názvy souborů nemohou obsahovat „%c“"
-#: ../gio/gfile.c:6614 ../gio/gvolume.c:363
+#: ../gio/gfile.c:6602 ../gio/gvolume.c:363
msgid "volume doesn’t implement mount"
msgstr "svazek neumí připojení"
-#: ../gio/gfile.c:6723
+#: ../gio/gfile.c:6711
msgid "No application is registered as handling this file"
msgstr "Žádná aplikace není zaregistrována k obsluze tohoto souboru"
@@ -1669,27 +1670,27 @@ msgstr "Vypsat obsah umístění ve stromu"
msgid "Use %s to get detailed help.\n"
msgstr "Podrobnou nápovědu získáte spuštěním %s.\n"
-#: ../gio/gio-tool-cat.c:83
+#: ../gio/gio-tool-cat.c:87
msgid "Error writing to stdout"
msgstr "Chyba při zápisu do standardního výstupu"
#. Translators: commandline placeholder
-#: ../gio/gio-tool-cat.c:127 ../gio/gio-tool-info.c:282
+#: ../gio/gio-tool-cat.c:133 ../gio/gio-tool-info.c:282
#: ../gio/gio-tool-list.c:165 ../gio/gio-tool-mkdir.c:48
#: ../gio/gio-tool-monitor.c:37 ../gio/gio-tool-monitor.c:39
#: ../gio/gio-tool-monitor.c:41 ../gio/gio-tool-monitor.c:43
#: ../gio/gio-tool-monitor.c:203 ../gio/gio-tool-mount.c:1141
-#: ../gio/gio-tool-open.c:45 ../gio/gio-tool-remove.c:48
+#: ../gio/gio-tool-open.c:113 ../gio/gio-tool-remove.c:48
#: ../gio/gio-tool-rename.c:45 ../gio/gio-tool-set.c:89
#: ../gio/gio-tool-trash.c:81 ../gio/gio-tool-tree.c:239
msgid "LOCATION"
msgstr "UMÍSTĚNÍ"
-#: ../gio/gio-tool-cat.c:132
+#: ../gio/gio-tool-cat.c:138
msgid "Concatenate files and print to standard output."
msgstr "Spojit soubory a vypsat je do standardního výstupu."
-#: ../gio/gio-tool-cat.c:134
+#: ../gio/gio-tool-cat.c:140
msgid ""
"gio cat works just like the traditional cat utility, but using GIO\n"
"locations instead of local files: for example, you can use something\n"
@@ -1699,9 +1700,9 @@ msgstr ""
"lokálních souborů používá umístění GIO: například můžete pro umístění\n"
"použít něco jako smb://server/cesta/soubor.txt"
-#: ../gio/gio-tool-cat.c:156 ../gio/gio-tool-info.c:313
+#: ../gio/gio-tool-cat.c:162 ../gio/gio-tool-info.c:313
#: ../gio/gio-tool-mkdir.c:76 ../gio/gio-tool-monitor.c:228
-#: ../gio/gio-tool-open.c:71 ../gio/gio-tool-remove.c:72
+#: ../gio/gio-tool-open.c:139 ../gio/gio-tool-remove.c:72
msgid "No locations given"
msgstr "Nebylo zadáno žádné umístění"
@@ -1742,7 +1743,7 @@ msgstr "ZDROJ"
#. Translators: commandline placeholder
#: ../gio/gio-tool-copy.c:98 ../gio/gio-tool-move.c:94
-#: ../gio/gio-tool-save.c:165
+#: ../gio/gio-tool-save.c:160
msgid "DESTINATION"
msgstr "CÍL"
@@ -2090,7 +2091,7 @@ msgstr ""
msgid "Target %s is not a directory"
msgstr "Cíl %s není složka"
-#: ../gio/gio-tool-open.c:50
+#: ../gio/gio-tool-open.c:118
msgid ""
"Open files with the default application that\n"
"is registered to handle files of this type."
@@ -2118,7 +2119,7 @@ msgstr "Přejmenovat soubor."
msgid "Missing argument"
msgstr "Schází argument"
-#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:195
+#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:190
#: ../gio/gio-tool-set.c:137
msgid "Too many arguments"
msgstr "Příliš mnoho argumentů"
@@ -2158,21 +2159,21 @@ msgstr "Etag souboru, který je přepisován"
msgid "ETAG"
msgstr "ETAG"
-#: ../gio/gio-tool-save.c:119
+#: ../gio/gio-tool-save.c:113
msgid "Error reading from standard input"
msgstr "Chyba při čtení ze standardního vstupu"
#. Translators: The "etag" is a token allowing to verify whether a file has been modified
-#: ../gio/gio-tool-save.c:145
+#: ../gio/gio-tool-save.c:139
#, c-format
msgid "Etag not available\n"
msgstr "Etag není dostupný\n"
-#: ../gio/gio-tool-save.c:168
+#: ../gio/gio-tool-save.c:163
msgid "Read from standard input and save to DEST."
msgstr "Číst ze standardního vstupu a uložit do CÍLE."
-#: ../gio/gio-tool-save.c:188
+#: ../gio/gio-tool-save.c:183
msgid "No destination given"
msgstr "Nebylo zadán žádný cíl"
@@ -2830,218 +2831,218 @@ msgstr "Chyba při přejmenovávání souboru %s: %s"
msgid "Can’t rename file, filename already exists"
msgstr "Soubor nelze přejmenovat, název souboru již existuje"
-#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2253 ../gio/glocalfile.c:2281
-#: ../gio/glocalfile.c:2438 ../gio/glocalfileoutputstream.c:549
+#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2254 ../gio/glocalfile.c:2282
+#: ../gio/glocalfile.c:2439 ../gio/glocalfileoutputstream.c:551
msgid "Invalid filename"
msgstr "Neplatný název souboru"
-#: ../gio/glocalfile.c:1404 ../gio/glocalfile.c:1419
+#: ../gio/glocalfile.c:1405 ../gio/glocalfile.c:1420
#, c-format
msgid "Error opening file %s: %s"
msgstr "Chyba při otevírání souboru %s: %s"
-#: ../gio/glocalfile.c:1544
+#: ../gio/glocalfile.c:1545
#, c-format
msgid "Error removing file %s: %s"
msgstr "Chyba při odstraňování souboru %s: %s"
-#: ../gio/glocalfile.c:1928
+#: ../gio/glocalfile.c:1929
#, c-format
msgid "Error trashing file %s: %s"
msgstr "Chyba při zahazování souboru %s do koše: %s"
-#: ../gio/glocalfile.c:1951
+#: ../gio/glocalfile.c:1952
#, c-format
msgid "Unable to create trash dir %s: %s"
msgstr "Nelze vytvořit složku koše %s: %s"
-#: ../gio/glocalfile.c:1971
+#: ../gio/glocalfile.c:1972
#, c-format
msgid "Unable to find toplevel directory to trash %s"
msgstr "Nelze nalézt složku nejvyšší úrovně pro vyhození %s"
-#: ../gio/glocalfile.c:2050 ../gio/glocalfile.c:2070
+#: ../gio/glocalfile.c:2051 ../gio/glocalfile.c:2071
#, c-format
msgid "Unable to find or create trash directory for %s"
msgstr "Nelze nalézt nebo vytvořit složku koše pro %s"
-#: ../gio/glocalfile.c:2105
+#: ../gio/glocalfile.c:2106
#, c-format
msgid "Unable to create trashing info file for %s: %s"
msgstr "Nelze vytvořit informační soubor o koši pro %s: %s"
-#: ../gio/glocalfile.c:2164
+#: ../gio/glocalfile.c:2165
#, c-format
msgid "Unable to trash file %s across filesystem boundaries"
msgstr "Nelze zahodit soubor %s do koše mimo hranice souborového systému"
-#: ../gio/glocalfile.c:2168 ../gio/glocalfile.c:2224
+#: ../gio/glocalfile.c:2169 ../gio/glocalfile.c:2225
#, c-format
msgid "Unable to trash file %s: %s"
msgstr "Nelze zahodit soubor %s do koše: %s"
-#: ../gio/glocalfile.c:2230
+#: ../gio/glocalfile.c:2231
#, c-format
msgid "Unable to trash file %s"
msgstr "Nelze zahodit soubor %s do koše"
-#: ../gio/glocalfile.c:2256
+#: ../gio/glocalfile.c:2257
#, c-format
msgid "Error creating directory %s: %s"
msgstr "Chyba při vytváření složky %s: %s"
-#: ../gio/glocalfile.c:2285
+#: ../gio/glocalfile.c:2286
#, c-format
msgid "Filesystem does not support symbolic links"
msgstr "Systém souborů nepodporuje symbolické odkazy"
-#: ../gio/glocalfile.c:2288
+#: ../gio/glocalfile.c:2289
#, c-format
msgid "Error making symbolic link %s: %s"
msgstr "Chyba při vytváření symbolického odkazu %s: %s"
-#: ../gio/glocalfile.c:2294 ../glib/gfileutils.c:2077
+#: ../gio/glocalfile.c:2295 ../glib/gfileutils.c:2101
msgid "Symbolic links not supported"
msgstr "Symbolické odkazy nejsou podporovány"
-#: ../gio/glocalfile.c:2349 ../gio/glocalfile.c:2384 ../gio/glocalfile.c:2441
+#: ../gio/glocalfile.c:2350 ../gio/glocalfile.c:2385 ../gio/glocalfile.c:2442
#, c-format
msgid "Error moving file %s: %s"
msgstr "Chyba při přesunování souboru %s: %s"
-#: ../gio/glocalfile.c:2372
+#: ../gio/glocalfile.c:2373
msgid "Can’t move directory over directory"
msgstr "Složku nelze přesunout nad složku"
-#: ../gio/glocalfile.c:2398 ../gio/glocalfileoutputstream.c:933
-#: ../gio/glocalfileoutputstream.c:947 ../gio/glocalfileoutputstream.c:962
-#: ../gio/glocalfileoutputstream.c:979 ../gio/glocalfileoutputstream.c:993
+#: ../gio/glocalfile.c:2399 ../gio/glocalfileoutputstream.c:935
+#: ../gio/glocalfileoutputstream.c:949 ../gio/glocalfileoutputstream.c:964
+#: ../gio/glocalfileoutputstream.c:981 ../gio/glocalfileoutputstream.c:995
msgid "Backup file creation failed"
msgstr "Vytvoření záložního souboru selhalo"
-#: ../gio/glocalfile.c:2417
+#: ../gio/glocalfile.c:2418
#, c-format
msgid "Error removing target file: %s"
msgstr "Chyba při odstraňování cílového souboru: %s"
-#: ../gio/glocalfile.c:2431
+#: ../gio/glocalfile.c:2432
msgid "Move between mounts not supported"
msgstr "Přesunování mezi připojeními není podporováno"
-#: ../gio/glocalfile.c:2622
+#: ../gio/glocalfile.c:2623
#, c-format
msgid "Could not determine the disk usage of %s: %s"
msgstr "Nelze zjistit využití disku %s: %s"
-#: ../gio/glocalfileinfo.c:731
+#: ../gio/glocalfileinfo.c:742
msgid "Attribute value must be non-NULL"
msgstr "Hodnota atributu nesmí být prázdná"
-#: ../gio/glocalfileinfo.c:738
+#: ../gio/glocalfileinfo.c:749
msgid "Invalid attribute type (string expected)"
msgstr "Neplatný typ atributu (očekáván řetězec)"
-#: ../gio/glocalfileinfo.c:745
+#: ../gio/glocalfileinfo.c:756
msgid "Invalid extended attribute name"
msgstr "Neplatný název rozšířeného atributu"
-#: ../gio/glocalfileinfo.c:785
+#: ../gio/glocalfileinfo.c:796
#, c-format
msgid "Error setting extended attribute “%s”: %s"
msgstr "Chyba při nastavování rozšířeného atributu „%s“: %s"
-#: ../gio/glocalfileinfo.c:1586
+#: ../gio/glocalfileinfo.c:1604
msgid " (invalid encoding)"
msgstr " (neplatné kódování)"
-#: ../gio/glocalfileinfo.c:1777 ../gio/glocalfileoutputstream.c:811
+#: ../gio/glocalfileinfo.c:1773 ../gio/glocalfileoutputstream.c:813
#, c-format
msgid "Error when getting information for file “%s”: %s"
msgstr "Chyba při získávání informací pro soubor „%s“: %s"
-#: ../gio/glocalfileinfo.c:2028
+#: ../gio/glocalfileinfo.c:2031
#, c-format
msgid "Error when getting information for file descriptor: %s"
msgstr "Chyba při získávání informací pro popisovače souboru: %s"
-#: ../gio/glocalfileinfo.c:2073
+#: ../gio/glocalfileinfo.c:2076
msgid "Invalid attribute type (uint32 expected)"
msgstr "Neplatný typ atributu (očekáván uint32)"
-#: ../gio/glocalfileinfo.c:2091
+#: ../gio/glocalfileinfo.c:2094
msgid "Invalid attribute type (uint64 expected)"
msgstr "Neplatný typ atributu (očekáván uint64)"
-#: ../gio/glocalfileinfo.c:2110 ../gio/glocalfileinfo.c:2129
+#: ../gio/glocalfileinfo.c:2113 ../gio/glocalfileinfo.c:2132
msgid "Invalid attribute type (byte string expected)"
msgstr "Neplatný typ atributu (očekáván bajtový řetězec)"
-#: ../gio/glocalfileinfo.c:2164
+#: ../gio/glocalfileinfo.c:2177
msgid "Cannot set permissions on symlinks"
msgstr "Nelze nastavit oprávnění na symbolických odkazech"
-#: ../gio/glocalfileinfo.c:2180
+#: ../gio/glocalfileinfo.c:2193
#, c-format
msgid "Error setting permissions: %s"
msgstr "Chyba při nastavování oprávnění: %s"
-#: ../gio/glocalfileinfo.c:2231
+#: ../gio/glocalfileinfo.c:2244
#, c-format
msgid "Error setting owner: %s"
msgstr "Chyba při nastavování vlastníka: %s"
-#: ../gio/glocalfileinfo.c:2254
+#: ../gio/glocalfileinfo.c:2267
msgid "symlink must be non-NULL"
msgstr "symbolický odkaz nesmí být prázdný"
-#: ../gio/glocalfileinfo.c:2264 ../gio/glocalfileinfo.c:2283
-#: ../gio/glocalfileinfo.c:2294
+#: ../gio/glocalfileinfo.c:2277 ../gio/glocalfileinfo.c:2296
+#: ../gio/glocalfileinfo.c:2307
#, c-format
msgid "Error setting symlink: %s"
msgstr "Chyba při nastavování symbolického odkazu: %s"
-#: ../gio/glocalfileinfo.c:2273
+#: ../gio/glocalfileinfo.c:2286
msgid "Error setting symlink: file is not a symlink"
msgstr ""
"Chyba při nastavování symbolického odkazu: soubor není symbolickým odkazem"
-#: ../gio/glocalfileinfo.c:2399
+#: ../gio/glocalfileinfo.c:2412
#, c-format
msgid "Error setting modification or access time: %s"
msgstr "Chyba při nastavování změny nebo času přístupu: %s"
-#: ../gio/glocalfileinfo.c:2422
+#: ../gio/glocalfileinfo.c:2435
msgid "SELinux context must be non-NULL"
msgstr "Kontext SELinux nesmí být prázdný"
-#: ../gio/glocalfileinfo.c:2437
+#: ../gio/glocalfileinfo.c:2450
#, c-format
msgid "Error setting SELinux context: %s"
msgstr "Chyba při nastavování kontextu SELinux: %s"
-#: ../gio/glocalfileinfo.c:2444
+#: ../gio/glocalfileinfo.c:2457
msgid "SELinux is not enabled on this system"
msgstr "V tomto systému není SELinux povolen"
-#: ../gio/glocalfileinfo.c:2536
+#: ../gio/glocalfileinfo.c:2549
#, c-format
msgid "Setting attribute %s not supported"
msgstr "Nastavení atributu %s není podporováno"
-#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:694
+#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:696
#, c-format
msgid "Error reading from file: %s"
msgstr "Chyba při čtení ze souboru: %s"
#: ../gio/glocalfileinputstream.c:199 ../gio/glocalfileinputstream.c:211
#: ../gio/glocalfileinputstream.c:225 ../gio/glocalfileinputstream.c:333
-#: ../gio/glocalfileoutputstream.c:456 ../gio/glocalfileoutputstream.c:1011
+#: ../gio/glocalfileoutputstream.c:458 ../gio/glocalfileoutputstream.c:1013
#, c-format
msgid "Error seeking in file: %s"
msgstr "Chyba při hledání v souboru: %s"
-#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:246
-#: ../gio/glocalfileoutputstream.c:340
+#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:248
+#: ../gio/glocalfileoutputstream.c:342
#, c-format
msgid "Error closing file: %s"
msgstr "Chyba při zavírání souboru: %s"
@@ -3050,51 +3051,51 @@ msgstr "Chyba při zavírání souboru: %s"
msgid "Unable to find default local file monitor type"
msgstr "Nelze nalézt výchozí typ sledování místního souboru"
-#: ../gio/glocalfileoutputstream.c:194 ../gio/glocalfileoutputstream.c:226
-#: ../gio/glocalfileoutputstream.c:715
+#: ../gio/glocalfileoutputstream.c:196 ../gio/glocalfileoutputstream.c:228
+#: ../gio/glocalfileoutputstream.c:717
#, c-format
msgid "Error writing to file: %s"
msgstr "Chyba při zápisu do souboru: %s"
-#: ../gio/glocalfileoutputstream.c:273
+#: ../gio/glocalfileoutputstream.c:275
#, c-format
msgid "Error removing old backup link: %s"
msgstr "Chyba při odstraňování starého záložního odkazu: %s"
-#: ../gio/glocalfileoutputstream.c:287 ../gio/glocalfileoutputstream.c:300
+#: ../gio/glocalfileoutputstream.c:289 ../gio/glocalfileoutputstream.c:302
#, c-format
msgid "Error creating backup copy: %s"
msgstr "Chyba při vytváření záložní kopie: %s"
-#: ../gio/glocalfileoutputstream.c:318
+#: ../gio/glocalfileoutputstream.c:320
#, c-format
msgid "Error renaming temporary file: %s"
msgstr "Chyba při přejmenovávání dočasného souboru: %s"
-#: ../gio/glocalfileoutputstream.c:502 ../gio/glocalfileoutputstream.c:1062
+#: ../gio/glocalfileoutputstream.c:504 ../gio/glocalfileoutputstream.c:1064
#, c-format
msgid "Error truncating file: %s"
msgstr "Chyba při zkracování souboru: %s"
-#: ../gio/glocalfileoutputstream.c:555 ../gio/glocalfileoutputstream.c:793
-#: ../gio/glocalfileoutputstream.c:1043 ../gio/gsubprocess.c:380
+#: ../gio/glocalfileoutputstream.c:557 ../gio/glocalfileoutputstream.c:795
+#: ../gio/glocalfileoutputstream.c:1045 ../gio/gsubprocess.c:380
#, c-format
msgid "Error opening file “%s”: %s"
msgstr "Chyba při otevírání souboru %s: %s"
-#: ../gio/glocalfileoutputstream.c:824
+#: ../gio/glocalfileoutputstream.c:826
msgid "Target file is a directory"
msgstr "Cílový soubor je složka"
-#: ../gio/glocalfileoutputstream.c:829
+#: ../gio/glocalfileoutputstream.c:831
msgid "Target file is not a regular file"
msgstr "Cílový soubor není obyčejným souborem"
-#: ../gio/glocalfileoutputstream.c:841
+#: ../gio/glocalfileoutputstream.c:843
msgid "The file was externally modified"
msgstr "Soubor byl externě pozměněn"
-#: ../gio/glocalfileoutputstream.c:1027
+#: ../gio/glocalfileoutputstream.c:1029
#, c-format
msgid "Error removing old file: %s"
msgstr "Chyba při odstraňování starého souboru: %s"
@@ -3138,21 +3139,21 @@ msgstr "Požadováno hledání za ukončením proudu"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement unmount.
-#: ../gio/gmount.c:393
+#: ../gio/gmount.c:396
msgid "mount doesn’t implement “unmount”"
msgstr "připojené neprovádí odpojovací operaci „unmount“"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement eject.
-#: ../gio/gmount.c:469
+#: ../gio/gmount.c:472
msgid "mount doesn’t implement “eject”"
msgstr "připojené neumí vysouvací operaci „eject“"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of unmount or unmount_with_operation.
-#: ../gio/gmount.c:547
+#: ../gio/gmount.c:550
msgid "mount doesn’t implement “unmount” or “unmount_with_operation”"
msgstr ""
"připojené neumí odpojovací operaci „unmount“ nebo „unmount_with_operation“"
@@ -3160,28 +3161,28 @@ msgstr ""
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of eject or eject_with_operation.
-#: ../gio/gmount.c:632
+#: ../gio/gmount.c:635
msgid "mount doesn’t implement “eject” or “eject_with_operation”"
msgstr "připojené neumí vysouvací operaci „eject“ nebo „eject_with_operation“"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement remount.
-#: ../gio/gmount.c:720
+#: ../gio/gmount.c:723
msgid "mount doesn’t implement “remount”"
msgstr "připojené neumí operaci opakovaného připojení „remount“"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:802
+#: ../gio/gmount.c:805
msgid "mount doesn’t implement content type guessing"
msgstr "připojené neumí odhad typu obsahu"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:889
+#: ../gio/gmount.c:892
msgid "mount doesn’t implement synchronous content type guessing"
msgstr "připojené neumí synchronní odhad typu obsahu"
@@ -3614,145 +3615,175 @@ msgstr "Poskytnut prázdný název schématu\n"
msgid "No such key “%s”\n"
msgstr "Klíč „%s“ neexistuje\n"
-#: ../gio/gsocket.c:379
+#: ../gio/gsocket.c:384
msgid "Invalid socket, not initialized"
msgstr "Neplatný soket, nebyl spuštěn"
-#: ../gio/gsocket.c:386
+#: ../gio/gsocket.c:391
#, c-format
msgid "Invalid socket, initialization failed due to: %s"
msgstr "Neplatný soket, spuštění selhalo kvůli: %s"
-#: ../gio/gsocket.c:394
+#: ../gio/gsocket.c:399
msgid "Socket is already closed"
msgstr "Soket je již ukončen"
-#: ../gio/gsocket.c:409 ../gio/gsocket.c:2765 ../gio/gsocket.c:3950
-#: ../gio/gsocket.c:4008
+#: ../gio/gsocket.c:414 ../gio/gsocket.c:2995 ../gio/gsocket.c:4205
+#: ../gio/gsocket.c:4263
msgid "Socket I/O timed out"
msgstr "Časový limit V/V soketu vypršel"
-#: ../gio/gsocket.c:541
+#: ../gio/gsocket.c:546
#, c-format
msgid "creating GSocket from fd: %s"
msgstr "vytváří se GSocket z fd: %s"
-#: ../gio/gsocket.c:570 ../gio/gsocket.c:624 ../gio/gsocket.c:631
+#: ../gio/gsocket.c:575 ../gio/gsocket.c:629 ../gio/gsocket.c:636
#, c-format
msgid "Unable to create socket: %s"
msgstr "Nelze vytvořit soket: %s"
-#: ../gio/gsocket.c:624
+#: ../gio/gsocket.c:629
msgid "Unknown family was specified"
msgstr "Byla zadána neznámá rodina"
-#: ../gio/gsocket.c:631
+#: ../gio/gsocket.c:636
msgid "Unknown protocol was specified"
msgstr "Byl zadán neznámý protokol"
-#: ../gio/gsocket.c:1122
+#: ../gio/gsocket.c:1127
#, c-format
msgid "Cannot use datagram operations on a non-datagram socket."
msgstr "Nelze používat datagramové operace na nedatagramovém soketu."
-#: ../gio/gsocket.c:1139
+#: ../gio/gsocket.c:1144
#, c-format
msgid "Cannot use datagram operations on a socket with a timeout set."
msgstr ""
"Nelze používat datagramové operace na soketu s nastaveným časovým limitem."
-#: ../gio/gsocket.c:1943
+#: ../gio/gsocket.c:1948
#, c-format
msgid "could not get local address: %s"
msgstr "nezdařilo se získat místní adresu: %s"
-#: ../gio/gsocket.c:1986
+#: ../gio/gsocket.c:1991
#, c-format
msgid "could not get remote address: %s"
msgstr "nezdařilo se získat vzdálenou adresu: %s"
-#: ../gio/gsocket.c:2052
+#: ../gio/gsocket.c:2057
#, c-format
msgid "could not listen: %s"
msgstr "nezdařilo se naslouchání: %s"
-#: ../gio/gsocket.c:2151
+#: ../gio/gsocket.c:2156
#, c-format
msgid "Error binding to address: %s"
msgstr "Chyba při propojení na adresu: %s"
-#: ../gio/gsocket.c:2266 ../gio/gsocket.c:2303
+#: ../gio/gsocket.c:2214 ../gio/gsocket.c:2251 ../gio/gsocket.c:2361
+#: ../gio/gsocket.c:2379 ../gio/gsocket.c:2449 ../gio/gsocket.c:2507
+#: ../gio/gsocket.c:2525
#, c-format
msgid "Error joining multicast group: %s"
msgstr "Chyba připojování ke skupině hromadného vysílání: %s"
-#: ../gio/gsocket.c:2267 ../gio/gsocket.c:2304
+#: ../gio/gsocket.c:2215 ../gio/gsocket.c:2252 ../gio/gsocket.c:2362
+#: ../gio/gsocket.c:2380 ../gio/gsocket.c:2450 ../gio/gsocket.c:2508
+#: ../gio/gsocket.c:2526
#, c-format
msgid "Error leaving multicast group: %s"
msgstr "Chyba při opouštění skupiny hromadného vysílání: %s"
-#: ../gio/gsocket.c:2268
+#: ../gio/gsocket.c:2216
msgid "No support for source-specific multicast"
msgstr "Není podpora pro hromadné vysílání určené zdrojem"
-#: ../gio/gsocket.c:2488
+#: ../gio/gsocket.c:2363
+msgid "Unsupported socket family"
+msgstr "Nepodporovaná rodina soketů"
+
+#: ../gio/gsocket.c:2381
+msgid "source-specific not an IPv4 address"
+msgstr "určení zdroje není adresa IPv4"
+
+#: ../gio/gsocket.c:2399 ../gio/gsocket.c:2428 ../gio/gsocket.c:2475
+#, c-format
+msgid "Interface not found: %s"
+msgstr "Rozhraní nebylo nalezeno: %s"
+
+#: ../gio/gsocket.c:2415
+#, c-format
+msgid "Interface name too long"
+msgstr "Název rozhraní je příliš dlouhý"
+
+#: ../gio/gsocket.c:2451
+msgid "No support for IPv4 source-specific multicast"
+msgstr "Není podpora pro hromadné vysílání určené zdrojem IPv4"
+
+#: ../gio/gsocket.c:2509
+msgid "No support for IPv6 source-specific multicast"
+msgstr "Není podpora pro hromadné vysílání určené zdrojem IPv6"
+
+#: ../gio/gsocket.c:2718
#, c-format
msgid "Error accepting connection: %s"
msgstr "Chyba při přijímání spojení: %s"
-#: ../gio/gsocket.c:2609
+#: ../gio/gsocket.c:2839
msgid "Connection in progress"
msgstr "Probíhá spojení"
-#: ../gio/gsocket.c:2658
+#: ../gio/gsocket.c:2888
msgid "Unable to get pending error: "
msgstr "Nelze získat nevyřízenou chybu: "
-#: ../gio/gsocket.c:2828
+#: ../gio/gsocket.c:3058
#, c-format
msgid "Error receiving data: %s"
msgstr "Chyba při získávání dat: %s"
-#: ../gio/gsocket.c:3023
+#: ../gio/gsocket.c:3253
#, c-format
msgid "Error sending data: %s"
msgstr "Chyba při odesílání dat: %s"
-#: ../gio/gsocket.c:3210
+#: ../gio/gsocket.c:3440
#, c-format
msgid "Unable to shutdown socket: %s"
msgstr "Nelze ukončit soket: %s"
-#: ../gio/gsocket.c:3291
+#: ../gio/gsocket.c:3521
#, c-format
msgid "Error closing socket: %s"
msgstr "Chyba při zavírání soketu: %s"
-#: ../gio/gsocket.c:3943
+#: ../gio/gsocket.c:4198
#, c-format
msgid "Waiting for socket condition: %s"
msgstr "Čeká se na stav soketu: %s"
-#: ../gio/gsocket.c:4417 ../gio/gsocket.c:4497 ../gio/gsocket.c:4675
+#: ../gio/gsocket.c:4672 ../gio/gsocket.c:4752 ../gio/gsocket.c:4930
#, c-format
msgid "Error sending message: %s"
msgstr "Chyba při odesílání zprávy: %s"
-#: ../gio/gsocket.c:4441
+#: ../gio/gsocket.c:4696
msgid "GSocketControlMessage not supported on Windows"
msgstr "GSocketControlMessage nepodporováno na Windows"
-#: ../gio/gsocket.c:4894 ../gio/gsocket.c:4967 ../gio/gsocket.c:5193
+#: ../gio/gsocket.c:5149 ../gio/gsocket.c:5222 ../gio/gsocket.c:5448
#, c-format
msgid "Error receiving message: %s"
msgstr "Chyba při získávání zprávy: %s"
-#: ../gio/gsocket.c:5465
+#: ../gio/gsocket.c:5720
#, c-format
msgid "Unable to read socket credentials: %s"
msgstr "Nelze číst pověření k soketu: %s"
-#: ../gio/gsocket.c:5474
+#: ../gio/gsocket.c:5729
msgid "g_socket_get_credentials not implemented for this OS"
msgstr "g_socket_get_credentials není u tohoto OS implementováno"
@@ -3893,18 +3924,18 @@ msgstr "Nebyly nalezeny žádné platné adresy"
msgid "Error reverse-resolving “%s”: %s"
msgstr "Chyba při reverzním řešení „%s“: %s"
-#: ../gio/gthreadedresolver.c:550 ../gio/gthreadedresolver.c:630
-#: ../gio/gthreadedresolver.c:728 ../gio/gthreadedresolver.c:778
+#: ../gio/gthreadedresolver.c:549 ../gio/gthreadedresolver.c:628
+#: ../gio/gthreadedresolver.c:726 ../gio/gthreadedresolver.c:776
#, c-format
msgid "No DNS record of the requested type for “%s”"
msgstr "Záznam DNS požadovaného typu pro „%s“ neexistuje"
-#: ../gio/gthreadedresolver.c:555 ../gio/gthreadedresolver.c:733
+#: ../gio/gthreadedresolver.c:554 ../gio/gthreadedresolver.c:731
#, c-format
msgid "Temporarily unable to resolve “%s”"
msgstr "Dočasně není možné vyřešit „%s“"
-#: ../gio/gthreadedresolver.c:560 ../gio/gthreadedresolver.c:738
+#: ../gio/gthreadedresolver.c:559 ../gio/gthreadedresolver.c:736
#, c-format
msgid "Error resolving “%s”"
msgstr "Chyba při řešení „%s“"
@@ -4017,7 +4048,7 @@ msgstr "Chyba při čtení z popisovače souboru: %s"
msgid "Error closing file descriptor: %s"
msgstr "Chyba při zavírání popisovače souboru: %s"
-#: ../gio/gunixmounts.c:2430 ../gio/gunixmounts.c:2483
+#: ../gio/gunixmounts.c:2539 ../gio/gunixmounts.c:2592
msgid "Filesystem root"
msgstr "Kořen systému souborů"
@@ -4209,231 +4240,231 @@ msgid "The pathname “%s” is not an absolute path"
msgstr "Název cesty „%s“ není absolutní cestou"
#. Translators: this is the preferred format for expressing the date and the time
-#: ../glib/gdatetime.c:202
+#: ../glib/gdatetime.c:203
msgctxt "GDateTime"
msgid "%a %b %e %H:%M:%S %Y"
msgstr "%a %-d. %B %Y, %H:%M:%S %Z"
# This might be e.g. %Y-%m-%d or %e. %m. %Y as well. See also http://prirucka.ujc.cas.cz/?id=810.
#. Translators: this is the preferred format for expressing the date
-#: ../glib/gdatetime.c:205
+#: ../glib/gdatetime.c:206
msgctxt "GDateTime"
msgid "%m/%d/%y"
msgstr "%d.%m.%Y"
# This might be e.g. %k:%M:%S or %k.%M.%S as well. See also http://prirucka.ujc.cas.cz/?id=820.
#. Translators: this is the preferred format for expressing the time
-#: ../glib/gdatetime.c:208
+#: ../glib/gdatetime.c:209
msgctxt "GDateTime"
msgid "%H:%M:%S"
msgstr "%H:%M:%S"
#. Translators: this is the preferred format for expressing 12 hour time
-#: ../glib/gdatetime.c:211
+#: ../glib/gdatetime.c:212
msgctxt "GDateTime"
msgid "%I:%M:%S %p"
msgstr "%I:%M:%S"
-#: ../glib/gdatetime.c:224
+#: ../glib/gdatetime.c:225
msgctxt "full month name"
msgid "January"
msgstr "leden"
-#: ../glib/gdatetime.c:226
+#: ../glib/gdatetime.c:227
msgctxt "full month name"
msgid "February"
msgstr "únor"
-#: ../glib/gdatetime.c:228
+#: ../glib/gdatetime.c:229
msgctxt "full month name"
msgid "March"
msgstr "březen"
-#: ../glib/gdatetime.c:230
+#: ../glib/gdatetime.c:231
msgctxt "full month name"
msgid "April"
msgstr "duben"
-#: ../glib/gdatetime.c:232
+#: ../glib/gdatetime.c:233
msgctxt "full month name"
msgid "May"
msgstr "květen"
-#: ../glib/gdatetime.c:234
+#: ../glib/gdatetime.c:235
msgctxt "full month name"
msgid "June"
msgstr "červen"
-#: ../glib/gdatetime.c:236
+#: ../glib/gdatetime.c:237
msgctxt "full month name"
msgid "July"
msgstr "červenec"
-#: ../glib/gdatetime.c:238
+#: ../glib/gdatetime.c:239
msgctxt "full month name"
msgid "August"
msgstr "srpen"
-#: ../glib/gdatetime.c:240
+#: ../glib/gdatetime.c:241
msgctxt "full month name"
msgid "September"
msgstr "září"
-#: ../glib/gdatetime.c:242
+#: ../glib/gdatetime.c:243
msgctxt "full month name"
msgid "October"
msgstr "říjen"
-#: ../glib/gdatetime.c:244
+#: ../glib/gdatetime.c:245
msgctxt "full month name"
msgid "November"
msgstr "listopad"
-#: ../glib/gdatetime.c:246
+#: ../glib/gdatetime.c:247
msgctxt "full month name"
msgid "December"
msgstr "prosinec"
-#: ../glib/gdatetime.c:261
+#: ../glib/gdatetime.c:262
msgctxt "abbreviated month name"
msgid "Jan"
msgstr "led"
-#: ../glib/gdatetime.c:263
+#: ../glib/gdatetime.c:264
msgctxt "abbreviated month name"
msgid "Feb"
msgstr "úno"
-#: ../glib/gdatetime.c:265
+#: ../glib/gdatetime.c:266
msgctxt "abbreviated month name"
msgid "Mar"
msgstr "bře"
-#: ../glib/gdatetime.c:267
+#: ../glib/gdatetime.c:268
msgctxt "abbreviated month name"
msgid "Apr"
msgstr "dub"
-#: ../glib/gdatetime.c:269
+#: ../glib/gdatetime.c:270
msgctxt "abbreviated month name"
msgid "May"
msgstr "kvě"
# Might be e.g. "čer" as well.
-#: ../glib/gdatetime.c:271
+#: ../glib/gdatetime.c:272
msgctxt "abbreviated month name"
msgid "Jun"
msgstr "čen"
# Might be e.g. "čvc" as well.
-#: ../glib/gdatetime.c:273
+#: ../glib/gdatetime.c:274
msgctxt "abbreviated month name"
msgid "Jul"
msgstr "čec"
-#: ../glib/gdatetime.c:275
+#: ../glib/gdatetime.c:276
msgctxt "abbreviated month name"
msgid "Aug"
msgstr "srp"
-#: ../glib/gdatetime.c:277
+#: ../glib/gdatetime.c:278
msgctxt "abbreviated month name"
msgid "Sep"
msgstr "zář"
-#: ../glib/gdatetime.c:279
+#: ../glib/gdatetime.c:280
msgctxt "abbreviated month name"
msgid "Oct"
msgstr "říj"
-#: ../glib/gdatetime.c:281
+#: ../glib/gdatetime.c:282
msgctxt "abbreviated month name"
msgid "Nov"
msgstr "lis"
-#: ../glib/gdatetime.c:283
+#: ../glib/gdatetime.c:284
msgctxt "abbreviated month name"
msgid "Dec"
msgstr "pro"
-#: ../glib/gdatetime.c:298
+#: ../glib/gdatetime.c:299
msgctxt "full weekday name"
msgid "Monday"
msgstr "pondělí"
-#: ../glib/gdatetime.c:300
+#: ../glib/gdatetime.c:301
msgctxt "full weekday name"
msgid "Tuesday"
msgstr "úterý"
-#: ../glib/gdatetime.c:302
+#: ../glib/gdatetime.c:303
msgctxt "full weekday name"
msgid "Wednesday"
msgstr "středa"
-#: ../glib/gdatetime.c:304
+#: ../glib/gdatetime.c:305
msgctxt "full weekday name"
msgid "Thursday"
msgstr "čtvrtek"
-#: ../glib/gdatetime.c:306
+#: ../glib/gdatetime.c:307
msgctxt "full weekday name"
msgid "Friday"
msgstr "pátek"
-#: ../glib/gdatetime.c:308
+#: ../glib/gdatetime.c:309
msgctxt "full weekday name"
msgid "Saturday"
msgstr "sobota"
-#: ../glib/gdatetime.c:310
+#: ../glib/gdatetime.c:311
msgctxt "full weekday name"
msgid "Sunday"
msgstr "neděle"
-#: ../glib/gdatetime.c:325
+#: ../glib/gdatetime.c:326
msgctxt "abbreviated weekday name"
msgid "Mon"
msgstr "po"
-#: ../glib/gdatetime.c:327
+#: ../glib/gdatetime.c:328
msgctxt "abbreviated weekday name"
msgid "Tue"
msgstr "út"
-#: ../glib/gdatetime.c:329
+#: ../glib/gdatetime.c:330
msgctxt "abbreviated weekday name"
msgid "Wed"
msgstr "st"
-#: ../glib/gdatetime.c:331
+#: ../glib/gdatetime.c:332
msgctxt "abbreviated weekday name"
msgid "Thu"
msgstr "čt"
-#: ../glib/gdatetime.c:333
+#: ../glib/gdatetime.c:334
msgctxt "abbreviated weekday name"
msgid "Fri"
msgstr "pá"
-#: ../glib/gdatetime.c:335
+#: ../glib/gdatetime.c:336
msgctxt "abbreviated weekday name"
msgid "Sat"
msgstr "so"
-#: ../glib/gdatetime.c:337
+#: ../glib/gdatetime.c:338
msgctxt "abbreviated weekday name"
msgid "Sun"
msgstr "ne"
#. Translators: 'before midday' indicator
-#: ../glib/gdatetime.c:354
+#: ../glib/gdatetime.c:355
msgctxt "GDateTime"
msgid "AM"
msgstr "dop."
#. Translators: 'after midday' indicator
-#: ../glib/gdatetime.c:357
+#: ../glib/gdatetime.c:358
msgctxt "GDateTime"
msgid "PM"
msgstr "odp."
@@ -4443,7 +4474,7 @@ msgstr "odp."
msgid "Error opening directory “%s”: %s"
msgstr "Chyba při otevírání složky „%s“: %s"
-#: ../glib/gfileutils.c:706 ../glib/gfileutils.c:798
+#: ../glib/gfileutils.c:716 ../glib/gfileutils.c:808
#, c-format
msgid "Could not allocate %lu byte to read file “%s”"
msgid_plural "Could not allocate %lu bytes to read file “%s”"
@@ -4451,107 +4482,107 @@ msgstr[0] "Nelze alokovat %lu bajtů k přečtení souboru „%s“"
msgstr[1] "Nelze alokovat %lu bajty k přečtení souboru „%s“"
msgstr[2] "Nelze alokovat %lu bajtů k přečtení souboru „%s“"
-#: ../glib/gfileutils.c:723
+#: ../glib/gfileutils.c:733
#, c-format
msgid "Error reading file “%s”: %s"
msgstr "Chyba čtení souboru „%s“: %s"
-#: ../glib/gfileutils.c:759
+#: ../glib/gfileutils.c:769
#, c-format
msgid "File “%s” is too large"
msgstr "Soubor „%s“ je příliš velký"
-#: ../glib/gfileutils.c:823
+#: ../glib/gfileutils.c:833
#, c-format
msgid "Failed to read from file “%s”: %s"
msgstr "Chyba při čtení ze souboru „%s“: %s"
-#: ../glib/gfileutils.c:871 ../glib/gfileutils.c:943
+#: ../glib/gfileutils.c:881 ../glib/gfileutils.c:953
#, c-format
msgid "Failed to open file “%s”: %s"
msgstr "Nelze otevřít soubor „%s“: %s"
-#: ../glib/gfileutils.c:883
+#: ../glib/gfileutils.c:893
#, c-format
msgid "Failed to get attributes of file “%s”: fstat() failed: %s"
msgstr "Nelze získat atributy souboru „%s“: funkce fstat() selhala: %s"
-#: ../glib/gfileutils.c:913
+#: ../glib/gfileutils.c:923
#, c-format
msgid "Failed to open file “%s”: fdopen() failed: %s"
msgstr "Nelze otevřít soubor „%s“: funkce fdopen() selhala: %s"
-#: ../glib/gfileutils.c:1012
+#: ../glib/gfileutils.c:1022
#, c-format
msgid "Failed to rename file “%s” to “%s”: g_rename() failed: %s"
msgstr "Nelze přejmenovat soubor „%s“ na „%s“: funkce g_rename() selhala: %s"
-#: ../glib/gfileutils.c:1047 ../glib/gfileutils.c:1554
+#: ../glib/gfileutils.c:1057 ../glib/gfileutils.c:1564
#, c-format
msgid "Failed to create file “%s”: %s"
msgstr "Nelze vytvořit soubor „%s“: %s"
-#: ../glib/gfileutils.c:1074
+#: ../glib/gfileutils.c:1084
#, c-format
msgid "Failed to write file “%s”: write() failed: %s"
msgstr "Nelze zapisovat do souboru „%s“: funkce write() selhala: %s"
-#: ../glib/gfileutils.c:1117
+#: ../glib/gfileutils.c:1127
#, c-format
msgid "Failed to write file “%s”: fsync() failed: %s"
msgstr "Nelze zapisovat do souboru „%s“: funkce fsync() selhala: %s"
-#: ../glib/gfileutils.c:1241
+#: ../glib/gfileutils.c:1251
#, c-format
msgid "Existing file “%s” could not be removed: g_unlink() failed: %s"
msgstr "Existující soubor „%s“ nelze odstranit: funkce g_unlink() selhala: %s"
-#: ../glib/gfileutils.c:1520
+#: ../glib/gfileutils.c:1530
#, c-format
msgid "Template “%s” invalid, should not contain a “%s”"
msgstr "Šablona „%s“ je neplatná, neměla by obsahovat „%s“"
-#: ../glib/gfileutils.c:1533
+#: ../glib/gfileutils.c:1543
#, c-format
msgid "Template “%s” doesn’t contain XXXXXX"
msgstr "Šablona „%s“ neobsahuje XXXXXX"
-#: ../glib/gfileutils.c:2058
+#: ../glib/gfileutils.c:2079
#, c-format
msgid "Failed to read the symbolic link “%s”: %s"
msgstr "Nelze přečíst symbolický odkaz „%s“: %s"
-#: ../glib/giochannel.c:1388
+#: ../glib/giochannel.c:1389
#, c-format
msgid "Could not open converter from “%s” to “%s”: %s"
msgstr "Nelze otevřít převodník z „%s“ do „%s“: %s"
-#: ../glib/giochannel.c:1733
+#: ../glib/giochannel.c:1734
msgid "Can’t do a raw read in g_io_channel_read_line_string"
msgstr "Nelze přímo číst v g_io_channel_read_line_string"
-#: ../glib/giochannel.c:1780 ../glib/giochannel.c:2038
-#: ../glib/giochannel.c:2125
+#: ../glib/giochannel.c:1781 ../glib/giochannel.c:2039
+#: ../glib/giochannel.c:2126
msgid "Leftover unconverted data in read buffer"
msgstr "Ve vstupní vyrovnávací paměti zbyla nepřevedená data"
-#: ../glib/giochannel.c:1861 ../glib/giochannel.c:1938
+#: ../glib/giochannel.c:1862 ../glib/giochannel.c:1939
msgid "Channel terminates in a partial character"
msgstr "Kanál ukončen částí znaku"
-#: ../glib/giochannel.c:1924
+#: ../glib/giochannel.c:1925
msgid "Can’t do a raw read in g_io_channel_read_to_end"
msgstr "Nelze přímo číst v g_io_channel_read_to_end"
-#: ../glib/gkeyfile.c:736
+#: ../glib/gkeyfile.c:788
msgid "Valid key file could not be found in search dirs"
msgstr "V složkách hledání nelze najít platný soubor klíče"
-#: ../glib/gkeyfile.c:773
+#: ../glib/gkeyfile.c:825
msgid "Not a regular file"
msgstr "Není obyčejným souborem"
-#: ../glib/gkeyfile.c:1218
+#: ../glib/gkeyfile.c:1270
#, c-format
msgid ""
"Key file contains line “%s” which is not a key-value pair, group, or comment"
@@ -4559,50 +4590,50 @@ msgstr ""
"Soubor klíče obsahuje „%s“, což není dvojice klíč-hodnota, skupina ani "
"komentář"
-#: ../glib/gkeyfile.c:1275
+#: ../glib/gkeyfile.c:1327
#, c-format
msgid "Invalid group name: %s"
msgstr "Neplatný název skupiny: %s"
-#: ../glib/gkeyfile.c:1297
+#: ../glib/gkeyfile.c:1349
msgid "Key file does not start with a group"
msgstr "Soubor klíče nezačíná skupinou"
-#: ../glib/gkeyfile.c:1323
+#: ../glib/gkeyfile.c:1375
#, c-format
msgid "Invalid key name: %s"
msgstr "Neplatný název klíče: %s"
-#: ../glib/gkeyfile.c:1350
+#: ../glib/gkeyfile.c:1402
#, c-format
msgid "Key file contains unsupported encoding “%s”"
msgstr "Soubor klíče obsahuje nepodporované kódování „%s“"
-#: ../glib/gkeyfile.c:1593 ../glib/gkeyfile.c:1766 ../glib/gkeyfile.c:3146
-#: ../glib/gkeyfile.c:3209 ../glib/gkeyfile.c:3339 ../glib/gkeyfile.c:3469
-#: ../glib/gkeyfile.c:3613 ../glib/gkeyfile.c:3842 ../glib/gkeyfile.c:3909
+#: ../glib/gkeyfile.c:1645 ../glib/gkeyfile.c:1818 ../glib/gkeyfile.c:3198
+#: ../glib/gkeyfile.c:3261 ../glib/gkeyfile.c:3391 ../glib/gkeyfile.c:3521
+#: ../glib/gkeyfile.c:3665 ../glib/gkeyfile.c:3894 ../glib/gkeyfile.c:3961
#, c-format
msgid "Key file does not have group “%s”"
msgstr "Soubor klíče nemá skupinu „%s“"
-#: ../glib/gkeyfile.c:1721
+#: ../glib/gkeyfile.c:1773
#, c-format
msgid "Key file does not have key “%s” in group “%s”"
msgstr "Soubor klíče nemá klíč „%s“ ve skupině „%s“"
-#: ../glib/gkeyfile.c:1883 ../glib/gkeyfile.c:1999
+#: ../glib/gkeyfile.c:1935 ../glib/gkeyfile.c:2051
#, c-format
msgid "Key file contains key “%s” with value “%s” which is not UTF-8"
msgstr "Soubor klíče obsahuje klíč „%s“ s hodnotou „%s“, která není v UTF-8"
-#: ../glib/gkeyfile.c:1903 ../glib/gkeyfile.c:2019 ../glib/gkeyfile.c:2388
+#: ../glib/gkeyfile.c:1955 ../glib/gkeyfile.c:2071 ../glib/gkeyfile.c:2440
#, c-format
msgid ""
"Key file contains key “%s” which has a value that cannot be interpreted."
msgstr ""
"Soubor klíče obsahuje klíč „%s“, který má neinterpretovatelnou hodnotu."
-#: ../glib/gkeyfile.c:2606 ../glib/gkeyfile.c:2975
+#: ../glib/gkeyfile.c:2658 ../glib/gkeyfile.c:3027
#, c-format
msgid ""
"Key file contains key “%s” in group “%s” which has a value that cannot be "
@@ -4611,36 +4642,36 @@ msgstr ""
"Soubor klíče obsahuje klíč „%s“ ve skupině „%s“, který má "
"neinterpretovatelnou hodnotu."
-#: ../glib/gkeyfile.c:2684 ../glib/gkeyfile.c:2761
+#: ../glib/gkeyfile.c:2736 ../glib/gkeyfile.c:2813
#, c-format
msgid "Key “%s” in group “%s” has value “%s” where %s was expected"
msgstr "Klíč „%s“ ve skupině „%s“ má hodnotu „%s“, když byla očekávána „%s“"
-#: ../glib/gkeyfile.c:4149
+#: ../glib/gkeyfile.c:4201
msgid "Key file contains escape character at end of line"
msgstr "Soubor klíče obsahuje na konci řádku znak změny"
-#: ../glib/gkeyfile.c:4171
+#: ../glib/gkeyfile.c:4223
#, c-format
msgid "Key file contains invalid escape sequence “%s”"
msgstr "Soubor klíče obsahuje neplatnou únikovou sekvenci „%s“"
-#: ../glib/gkeyfile.c:4315
+#: ../glib/gkeyfile.c:4367
#, c-format
msgid "Value “%s” cannot be interpreted as a number."
msgstr "Hodnotu „%s“ nelze interpretovat jako číslo."
-#: ../glib/gkeyfile.c:4329
+#: ../glib/gkeyfile.c:4381
#, c-format
msgid "Integer value “%s” out of range"
msgstr "Celočíselná hodnota „%s“ je mimo rozsah"
-#: ../glib/gkeyfile.c:4362
+#: ../glib/gkeyfile.c:4414
#, c-format
msgid "Value “%s” cannot be interpreted as a float number."
msgstr "Hodnotu „%s“ nelze interpretovat jako reálné (plovoucí) číslo."
-#: ../glib/gkeyfile.c:4401
+#: ../glib/gkeyfile.c:4453
#, c-format
msgid "Value “%s” cannot be interpreted as a boolean."
msgstr "Hodnotu „%s“ nelze interpretovat jako pravdivostní hodnotu."
@@ -5316,77 +5347,77 @@ msgstr ""
msgid "Text was empty (or contained only whitespace)"
msgstr "Text je prázdný (nebo obsahuje pouze mezery)"
-#: ../glib/gspawn.c:250
+#: ../glib/gspawn.c:253
#, c-format
msgid "Failed to read data from child process (%s)"
msgstr "Nelze číst data z procesu potomka (%s)"
-#: ../glib/gspawn.c:394
+#: ../glib/gspawn.c:401
#, c-format
msgid "Unexpected error in select() reading data from a child process (%s)"
msgstr "Neočekávaná chyba v select() při čtení dat z procesu potomka (%s)"
-#: ../glib/gspawn.c:479
+#: ../glib/gspawn.c:486
#, c-format
msgid "Unexpected error in waitpid() (%s)"
msgstr "Neočekávaná chyba v waitpid() (%s)"
-#: ../glib/gspawn.c:886 ../glib/gspawn-win32.c:1231
+#: ../glib/gspawn.c:897 ../glib/gspawn-win32.c:1231
#, c-format
msgid "Child process exited with code %ld"
msgstr "Proces potomka skončil s kódem %ld"
-#: ../glib/gspawn.c:894
+#: ../glib/gspawn.c:905
#, c-format
msgid "Child process killed by signal %ld"
msgstr "Proces potomka byl zabit signálem %ld"
-#: ../glib/gspawn.c:901
+#: ../glib/gspawn.c:912
#, c-format
msgid "Child process stopped by signal %ld"
msgstr "Proces potomka byl zastaven signálem %ld"
-#: ../glib/gspawn.c:908
+#: ../glib/gspawn.c:919
#, c-format
msgid "Child process exited abnormally"
msgstr "Proces potomka neskončil normálně"
-#: ../glib/gspawn.c:1313 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
+#: ../glib/gspawn.c:1324 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
#, c-format
msgid "Failed to read from child pipe (%s)"
msgstr "Nelze číst z roury potomka (%s)"
-#: ../glib/gspawn.c:1383
+#: ../glib/gspawn.c:1394
#, c-format
msgid "Failed to fork (%s)"
msgstr "Nelze rozvětvit (%s)"
-#: ../glib/gspawn.c:1532 ../glib/gspawn-win32.c:368
+#: ../glib/gspawn.c:1543 ../glib/gspawn-win32.c:368
#, c-format
msgid "Failed to change to directory “%s” (%s)"
msgstr "Nelze přejít do složky „%s“ (%s)"
-#: ../glib/gspawn.c:1542
+#: ../glib/gspawn.c:1553
#, c-format
msgid "Failed to execute child process “%s” (%s)"
msgstr "Nelze spustit proces potomka „%s“ (%s)"
-#: ../glib/gspawn.c:1552
+#: ../glib/gspawn.c:1563
#, c-format
msgid "Failed to redirect output or input of child process (%s)"
msgstr "Nelze přesměrovat vstup nebo výstup procesu potomka (%s)"
-#: ../glib/gspawn.c:1561
+#: ../glib/gspawn.c:1572
#, c-format
msgid "Failed to fork child process (%s)"
msgstr "Nelze rozvětvit proces potomka (%s)"
-#: ../glib/gspawn.c:1569
+#: ../glib/gspawn.c:1580
#, c-format
msgid "Unknown error executing child process “%s”"
msgstr "Neznámá chyba při běhu procesu potomka „%s“"
-#: ../glib/gspawn.c:1593
+#: ../glib/gspawn.c:1604
#, c-format
msgid "Failed to read enough data from child pid pipe (%s)"
msgstr "Nelze přečíst dostatek dat z roury pid potomka (%s)"
@@ -5473,76 +5504,144 @@ msgstr "Neplatná posloupnost na vstupu převodu"
msgid "Character out of range for UTF-16"
msgstr "Znak je mimo rozsah UTF-16"
-#: ../glib/gutils.c:2149 ../glib/gutils.c:2176 ../glib/gutils.c:2282
+#: ../glib/gutils.c:2227
#, c-format
-msgid "%u byte"
-msgid_plural "%u bytes"
-msgstr[0] "%u bajt"
-msgstr[1] "%u bajty"
-msgstr[2] "%u bajtů"
+msgid "%.1f kB"
+msgstr "%.1f kB"
+
+#: ../glib/gutils.c:2228 ../glib/gutils.c:2434
+#, c-format
+msgid "%.1f MB"
+msgstr "%.1f MB"
+
+#: ../glib/gutils.c:2229 ../glib/gutils.c:2439
+#, c-format
+msgid "%.1f GB"
+msgstr "%.1f GB"
+
+#: ../glib/gutils.c:2230 ../glib/gutils.c:2444
+#, c-format
+msgid "%.1f TB"
+msgstr "%.1f TB"
+
+#: ../glib/gutils.c:2231 ../glib/gutils.c:2449
+#, c-format
+msgid "%.1f PB"
+msgstr "%.1f PB"
-#: ../glib/gutils.c:2155
+#: ../glib/gutils.c:2232 ../glib/gutils.c:2454
+#, c-format
+msgid "%.1f EB"
+msgstr "%.1f EB"
+
+#: ../glib/gutils.c:2235
#, c-format
msgid "%.1f KiB"
msgstr "%.1f KiB"
-#: ../glib/gutils.c:2157
+#: ../glib/gutils.c:2236
#, c-format
msgid "%.1f MiB"
msgstr "%.1f MiB"
-#: ../glib/gutils.c:2160
+#: ../glib/gutils.c:2237
#, c-format
msgid "%.1f GiB"
msgstr "%.1f GiB"
-#: ../glib/gutils.c:2163
+#: ../glib/gutils.c:2238
#, c-format
msgid "%.1f TiB"
msgstr "%.1f TiB"
-#: ../glib/gutils.c:2166
+#: ../glib/gutils.c:2239
#, c-format
msgid "%.1f PiB"
msgstr "%.1f PiB"
-#: ../glib/gutils.c:2169
+#: ../glib/gutils.c:2240
#, c-format
msgid "%.1f EiB"
msgstr "%.1f EiB"
-#: ../glib/gutils.c:2182
+#: ../glib/gutils.c:2243
#, c-format
-msgid "%.1f kB"
-msgstr "%.1f kB"
+msgid "%.1f kb"
+msgstr "%.1f kb"
-#: ../glib/gutils.c:2185 ../glib/gutils.c:2300
+#: ../glib/gutils.c:2244
#, c-format
-msgid "%.1f MB"
-msgstr "%.1f MB"
+msgid "%.1f Mb"
+msgstr "%.1f Mb"
-#: ../glib/gutils.c:2188 ../glib/gutils.c:2305
+#: ../glib/gutils.c:2245
#, c-format
-msgid "%.1f GB"
-msgstr "%.1f GB"
+msgid "%.1f Gb"
+msgstr "%.1f Gb"
-#: ../glib/gutils.c:2190 ../glib/gutils.c:2310
+#: ../glib/gutils.c:2246
#, c-format
-msgid "%.1f TB"
-msgstr "%.1f TB"
+msgid "%.1f Tb"
+msgstr "%.1f Tb"
-#: ../glib/gutils.c:2193 ../glib/gutils.c:2315
+#: ../glib/gutils.c:2247
#, c-format
-msgid "%.1f PB"
-msgstr "%.1f PB"
+msgid "%.1f Pb"
+msgstr "%.1f Pb"
-#: ../glib/gutils.c:2196 ../glib/gutils.c:2320
+#: ../glib/gutils.c:2248
#, c-format
-msgid "%.1f EB"
-msgstr "%.1f EB"
+msgid "%.1f Eb"
+msgstr "%.1f Eb"
+
+#: ../glib/gutils.c:2251
+#, c-format
+msgid "%.1f Kib"
+msgstr "%.1f Kib"
+
+#: ../glib/gutils.c:2252
+#, c-format
+msgid "%.1f Mib"
+msgstr "%.1f Mib"
+
+#: ../glib/gutils.c:2253
+#, c-format
+msgid "%.1f Gib"
+msgstr "%.1f Gib"
+
+#: ../glib/gutils.c:2254
+#, c-format
+msgid "%.1f Tib"
+msgstr "%.1f Tib"
+
+#: ../glib/gutils.c:2255
+#, c-format
+msgid "%.1f Pib"
+msgstr "%.1f Pib"
+
+#: ../glib/gutils.c:2256
+#, c-format
+msgid "%.1f Eib"
+msgstr "%.1f Eib"
+
+#: ../glib/gutils.c:2290 ../glib/gutils.c:2416
+#, c-format
+msgid "%u byte"
+msgid_plural "%u bytes"
+msgstr[0] "%u bajt"
+msgstr[1] "%u bajty"
+msgstr[2] "%u bajtů"
+
+#: ../glib/gutils.c:2294
+#, c-format
+msgid "%u bit"
+msgid_plural "%u bits"
+msgstr[0] "%u bit"
+msgstr[1] "%u bity"
+msgstr[2] "%u bitů"
#. Translators: the %s in "%s bytes" will always be replaced by a number.
-#: ../glib/gutils.c:2233
+#: ../glib/gutils.c:2361
#, c-format
msgid "%s byte"
msgid_plural "%s bytes"
@@ -5550,12 +5649,21 @@ msgstr[0] "%s bajt"
msgstr[1] "%s bajty"
msgstr[2] "%s bajtů"
+#. Translators: the %s in "%s bits" will always be replaced by a number.
+#: ../glib/gutils.c:2366
+#, c-format
+msgid "%s bit"
+msgid_plural "%s bits"
+msgstr[0] "%s bit"
+msgstr[1] "%s bity"
+msgstr[2] "%s bitů"
+
#. Translators: this is from the deprecated function g_format_size_for_display() which uses 'KB' to
#. * mean 1024 bytes. I am aware that 'KB' is not correct, but it has been preserved for reasons of
#. * compatibility. Users will not see this string unless a program is using this deprecated function.
#. * Please translate as literally as possible.
#.
-#: ../glib/gutils.c:2295
+#: ../glib/gutils.c:2429
#, c-format
msgid "%.1f KB"
msgstr "%.1f KB"
diff --git a/po/de.po b/po/de.po
index 155d0c80b..f758174e3 100644
--- a/po/de.po
+++ b/po/de.po
@@ -17,9 +17,9 @@ msgstr ""
"Project-Id-Version: glib master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=glib&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2017-08-23 23:06+0000\n"
-"PO-Revision-Date: 2017-08-26 21:32+0200\n"
-"Last-Translator: Christian Kirbach <christian.kirbach@gmail.com>\n"
+"POT-Creation-Date: 2017-11-02 13:40+0000\n"
+"PO-Revision-Date: 2017-11-02 20:13+0100\n"
+"Last-Translator: Mario Blättermann <mario.blaettermann@gmail.com>\n"
"Language-Team: Deutsch <gnome-de@gnome.org>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
@@ -291,8 +291,8 @@ msgid "Truncate not supported on base stream"
msgstr "Abschneiden wird vom Basis-Datenstrom nicht unterstützt"
#: ../gio/gcancellable.c:317 ../gio/gdbusconnection.c:1849
-#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:870
-#: ../gio/gsimpleasyncresult.c:896
+#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:871
+#: ../gio/gsimpleasyncresult.c:897
#, c-format
msgid "Operation was cancelled"
msgstr "Vorgang wurde abgebrochen"
@@ -311,23 +311,23 @@ msgstr "Nicht genug Platz im Ziel"
#: ../gio/gcharsetconverter.c:342 ../gio/gdatainputstream.c:848
#: ../gio/gdatainputstream.c:1257 ../glib/gconvert.c:438 ../glib/gconvert.c:845
-#: ../glib/giochannel.c:1556 ../glib/giochannel.c:1598
-#: ../glib/giochannel.c:2442 ../glib/gutf8.c:866 ../glib/gutf8.c:1319
+#: ../glib/giochannel.c:1557 ../glib/giochannel.c:1599
+#: ../glib/giochannel.c:2443 ../glib/gutf8.c:866 ../glib/gutf8.c:1319
msgid "Invalid byte sequence in conversion input"
msgstr "Ungültige Bytefolge in Konvertierungseingabe"
#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:446 ../glib/gconvert.c:770
-#: ../glib/giochannel.c:1563 ../glib/giochannel.c:2454
+#: ../glib/giochannel.c:1564 ../glib/giochannel.c:2455
#, c-format
msgid "Error during conversion: %s"
msgstr "Fehler bei der Umwandlung: %s"
-#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1096
+#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1101
msgid "Cancellable initialization not supported"
msgstr "Abbrechbare Initialisierung wird nicht unterstützt"
#: ../gio/gcharsetconverter.c:456 ../glib/gconvert.c:321
-#: ../glib/giochannel.c:1384
+#: ../glib/giochannel.c:1385
#, c-format
msgid "Conversion from character set “%s” to “%s” is not supported"
msgstr "Umwandlung von Zeichensatz »%s« in »%s« wird nicht unterstützt"
@@ -564,7 +564,7 @@ msgstr ""
"Alle verfügbaren Legitimierungsmechanismen sind ausgeschöpft (%s Versuche) "
"(verfügbar: %s)"
-#: ../gio/gdbusauth.c:1174
+#: ../gio/gdbusauth.c:1171
msgid "Cancelled via GDBusAuthObserver::authorize-authenticated-peer"
msgstr "Abgebrochen durch GDBusAuthObserver::authorize-authenticated-peer"
@@ -591,12 +591,12 @@ msgstr "Fehler beim Erstellen des Ordners »%s«: %s"
msgid "Error opening keyring “%s” for reading: "
msgstr "Fehler beim Öffnen des Schlüsselbundes »%s« zum Lesen: "
-#: ../gio/gdbusauthmechanismsha1.c:403 ../gio/gdbusauthmechanismsha1.c:721
+#: ../gio/gdbusauthmechanismsha1.c:402 ../gio/gdbusauthmechanismsha1.c:720
#, c-format
msgid "Line %d of the keyring at “%s” with content “%s” is malformed"
msgstr "Zeile %d des Schlüsselbundes auf »%s« mit Inhalt »%s« ist inkorrekt"
-#: ../gio/gdbusauthmechanismsha1.c:417 ../gio/gdbusauthmechanismsha1.c:735
+#: ../gio/gdbusauthmechanismsha1.c:416 ../gio/gdbusauthmechanismsha1.c:734
#, c-format
msgid ""
"First token of line %d of the keyring at “%s” with content “%s” is malformed"
@@ -604,7 +604,7 @@ msgstr ""
"Der erste Token in Zeile %d des Schlüsselbundes bei »%s« mit dem Inhalt »%s« "
"ist inkorrekt"
-#: ../gio/gdbusauthmechanismsha1.c:432 ../gio/gdbusauthmechanismsha1.c:749
+#: ../gio/gdbusauthmechanismsha1.c:430 ../gio/gdbusauthmechanismsha1.c:748
#, c-format
msgid ""
"Second token of line %d of the keyring at “%s” with content “%s” is malformed"
@@ -612,7 +612,7 @@ msgstr ""
"Der zweite Token in Zeile %d des Schlüsselbundes bei »%s« mit dem Inhalt "
"»%s« ist inkorrekt"
-#: ../gio/gdbusauthmechanismsha1.c:456
+#: ../gio/gdbusauthmechanismsha1.c:454
#, c-format
msgid "Didn’t find cookie with id %d in the keyring at “%s”"
msgstr ""
@@ -623,27 +623,27 @@ msgstr ""
msgid "Error deleting stale lock file “%s”: %s"
msgstr "Fehler beim Löschen der alten Sperrdatei »%s«: %s"
-#: ../gio/gdbusauthmechanismsha1.c:569
+#: ../gio/gdbusauthmechanismsha1.c:568
#, c-format
msgid "Error creating lock file “%s”: %s"
msgstr "Fehler beim Erstellen der Sperrdatei »%s«: %s"
-#: ../gio/gdbusauthmechanismsha1.c:600
+#: ../gio/gdbusauthmechanismsha1.c:599
#, c-format
msgid "Error closing (unlinked) lock file “%s”: %s"
msgstr "Fehler beim Schließen der entknüpften Sperrdatei »%s«: %s"
-#: ../gio/gdbusauthmechanismsha1.c:611
+#: ../gio/gdbusauthmechanismsha1.c:610
#, c-format
msgid "Error unlinking lock file “%s”: %s"
msgstr "Fehler beim Entknüpfen der Sperrdatei »%s«: %s"
-#: ../gio/gdbusauthmechanismsha1.c:688
+#: ../gio/gdbusauthmechanismsha1.c:687
#, c-format
msgid "Error opening keyring “%s” for writing: "
msgstr "Fehler beim Öffnen des Schlüsselbundes »%s« zum Schreiben: "
-#: ../gio/gdbusauthmechanismsha1.c:885
+#: ../gio/gdbusauthmechanismsha1.c:883
#, c-format
msgid "(Additionally, releasing the lock for “%s” also failed: %s) "
msgstr "(Außerdem schlug das Entsperren von »%s« ebenso fehl: %s) "
@@ -813,17 +813,17 @@ msgstr ""
"Position %d gefunden (Länge der Zeichenkette ist %d). Die gültige UTF-8-"
"Zeichenkette bis zu diesem Punkt war »%s«."
-#: ../gio/gdbusmessage.c:1589
+#: ../gio/gdbusmessage.c:1593
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus object path"
msgstr "Verarbeiteter Wert »%s« ist kein gültiger D-Bus-Objektpfad"
-#: ../gio/gdbusmessage.c:1611
+#: ../gio/gdbusmessage.c:1615
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature"
msgstr "Verarbeiteter Wert »%s« ist keine gültige D-Bus-Signatur"
-#: ../gio/gdbusmessage.c:1658
+#: ../gio/gdbusmessage.c:1662
#, c-format
msgid ""
"Encountered array of length %u byte. Maximum length is 2<<26 bytes (64 MiB)."
@@ -836,7 +836,7 @@ msgstr[1] ""
"Array der Länge %u Bytes wurde erkannt. Maximale Länge ist 2<<26 Bytes (64 "
"MiB)."
-#: ../gio/gdbusmessage.c:1678
+#: ../gio/gdbusmessage.c:1682
#, c-format
msgid ""
"Encountered array of type “a%c”, expected to have a length a multiple of %u "
@@ -845,12 +845,12 @@ msgstr ""
"Es wurde ein Feld des Typs »a%c« gefunden. Erwartet wurde als Länge ein "
"Vielfaches von %u Byte, aber es waren %u Byte Länge"
-#: ../gio/gdbusmessage.c:1845
+#: ../gio/gdbusmessage.c:1849
#, c-format
msgid "Parsed value “%s” for variant is not a valid D-Bus signature"
msgstr "Verarbeiteter Wert »%s« für Variante ist keine gültige D-Bus-Signatur"
-#: ../gio/gdbusmessage.c:1869
+#: ../gio/gdbusmessage.c:1873
#, c-format
msgid ""
"Error deserializing GVariant with type string “%s” from the D-Bus wire format"
@@ -858,7 +858,7 @@ msgstr ""
"Fehler beim Deserialisieren von GVariant mit der Typenzeichenkette »%s« aus "
"dem D-Bus Wire-Format"
-#: ../gio/gdbusmessage.c:2053
+#: ../gio/gdbusmessage.c:2055
#, c-format
msgid ""
"Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value "
@@ -867,25 +867,25 @@ msgstr ""
"Ungültiger Wert für die Speicherreihenfolge. Es wird entweder 0x6c (»l«) "
"oder 0x42 (»B«) erwartet, aber der Wert 0x%02x gefunden"
-#: ../gio/gdbusmessage.c:2066
+#: ../gio/gdbusmessage.c:2068
#, c-format
msgid "Invalid major protocol version. Expected 1 but found %d"
msgstr ""
"Ungültige Version des Hauptprotokolls. Erwartet wurde 1, jedoch %d gefunden"
-#: ../gio/gdbusmessage.c:2122
+#: ../gio/gdbusmessage.c:2124
#, c-format
msgid "Signature header with signature “%s” found but message body is empty"
msgstr ""
"Signatur-Kopfzeilenfeld mit Signatur »%s« gefunden, aber Nachrichtenrumpf "
"ist leer"
-#: ../gio/gdbusmessage.c:2136
+#: ../gio/gdbusmessage.c:2138
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature (for body)"
msgstr "Verarbeiteter Wert »%s« ist keine gültige D-Bus-Signatur (für Rumpf)"
-#: ../gio/gdbusmessage.c:2166
+#: ../gio/gdbusmessage.c:2168
#, c-format
msgid "No signature header in message but the message body is %u byte"
msgid_plural "No signature header in message but the message body is %u bytes"
@@ -896,11 +896,11 @@ msgstr[1] ""
"Kein Signatur-Kopfzeilenfeld in der Nachricht, aber der Nachrichtenrumpf ist "
"%u Bytes groß"
-#: ../gio/gdbusmessage.c:2176
+#: ../gio/gdbusmessage.c:2178
msgid "Cannot deserialize message: "
msgstr "Meldung kann nicht deserialisiert werden: "
-#: ../gio/gdbusmessage.c:2517
+#: ../gio/gdbusmessage.c:2519
#, c-format
msgid ""
"Error serializing GVariant with type string “%s” to the D-Bus wire format"
@@ -908,7 +908,7 @@ msgstr ""
"Fehler beim Deserialisieren von GVariant mit der Typenzeichenkette »%s« in "
"das D-Bus Wire-Format"
-#: ../gio/gdbusmessage.c:2654
+#: ../gio/gdbusmessage.c:2656
#, c-format
msgid ""
"Message has %d file descriptors but the header field indicates %d file "
@@ -917,18 +917,18 @@ msgstr ""
"Meldung hat %d Dateideskriptoren, aber das Kopfzeilenfeld kündigt %d "
"Dateideskriptoren an"
-#: ../gio/gdbusmessage.c:2662
+#: ../gio/gdbusmessage.c:2664
msgid "Cannot serialize message: "
msgstr "Meldung kann nicht serialisiert werden: "
-#: ../gio/gdbusmessage.c:2706
+#: ../gio/gdbusmessage.c:2708
#, c-format
msgid "Message body has signature “%s” but there is no signature header"
msgstr ""
"Nachrichtenrumpf hat den Signaturtyp »%s«, aber es gibt keine Signatur im "
"Kopfzeilenfeld"
-#: ../gio/gdbusmessage.c:2716
+#: ../gio/gdbusmessage.c:2718
#, c-format
msgid ""
"Message body has type signature “%s” but signature in the header field is "
@@ -937,18 +937,18 @@ msgstr ""
"Nachrichtenrumpf hat den Signaturtyp »%s«, aber die Signatur im "
"Kopfzeilenfeld ist »%s«"
-#: ../gio/gdbusmessage.c:2732
+#: ../gio/gdbusmessage.c:2734
#, c-format
msgid "Message body is empty but signature in the header field is “(%s)”"
msgstr ""
"Nachrichtenrumpf ist leer, aber die Signatur im Kopfzeilenfeld ist »(%s)«"
-#: ../gio/gdbusmessage.c:3285
+#: ../gio/gdbusmessage.c:3287
#, c-format
msgid "Error return with body of type “%s”"
msgstr "Fehlerrückmeldung mit Inhalt des Typs »%s«"
-#: ../gio/gdbusmessage.c:3293
+#: ../gio/gdbusmessage.c:3295
msgid "Error return with empty body"
msgstr "Fehlerrückmeldung mit leerem Inhalt"
@@ -1027,54 +1027,54 @@ msgstr ""
"\n"
"Mit »%s BEFEHL --help« erhalten Sie Hilfe zu jedem der Befehle.\n"
-#: ../gio/gdbus-tool.c:165 ../gio/gdbus-tool.c:227 ../gio/gdbus-tool.c:299
-#: ../gio/gdbus-tool.c:323 ../gio/gdbus-tool.c:725 ../gio/gdbus-tool.c:1068
-#: ../gio/gdbus-tool.c:1510
+#: ../gio/gdbus-tool.c:167 ../gio/gdbus-tool.c:234 ../gio/gdbus-tool.c:306
+#: ../gio/gdbus-tool.c:330 ../gio/gdbus-tool.c:811 ../gio/gdbus-tool.c:1150
+#: ../gio/gdbus-tool.c:1592
#, c-format
msgid "Error: %s\n"
msgstr "Fehler: %s\n"
-#: ../gio/gdbus-tool.c:176 ../gio/gdbus-tool.c:240 ../gio/gdbus-tool.c:1526
+#: ../gio/gdbus-tool.c:178 ../gio/gdbus-tool.c:247 ../gio/gdbus-tool.c:1608
#, c-format
msgid "Error parsing introspection XML: %s\n"
msgstr "Fehler beim Verarbeiten des XML-Codes der Inspektion: %s\n"
-#: ../gio/gdbus-tool.c:209
+#: ../gio/gdbus-tool.c:216
#, c-format
msgid "Error: %s is not a valid name\n"
msgstr "Fehler: %s ist kein gültiger Name\n"
-#: ../gio/gdbus-tool.c:357
+#: ../gio/gdbus-tool.c:364
msgid "Connect to the system bus"
msgstr "Zum Systembus verbinden"
-#: ../gio/gdbus-tool.c:358
+#: ../gio/gdbus-tool.c:365
msgid "Connect to the session bus"
msgstr "Zum Sitzungsbus verbinden"
-#: ../gio/gdbus-tool.c:359
+#: ../gio/gdbus-tool.c:366
msgid "Connect to given D-Bus address"
msgstr "Zur angegebenen D-Bus-Adresse verbinden"
-#: ../gio/gdbus-tool.c:369
+#: ../gio/gdbus-tool.c:376
msgid "Connection Endpoint Options:"
msgstr "Optionen für Gegenstelle der Verbindung:"
-#: ../gio/gdbus-tool.c:370
+#: ../gio/gdbus-tool.c:377
msgid "Options specifying the connection endpoint"
msgstr "Optionen zur Gegenstelle der Verbindung"
-#: ../gio/gdbus-tool.c:392
+#: ../gio/gdbus-tool.c:399
#, c-format
msgid "No connection endpoint specified"
msgstr "Keine Gegenstelle der Verbindung angegeben"
-#: ../gio/gdbus-tool.c:402
+#: ../gio/gdbus-tool.c:409
#, c-format
msgid "Multiple connection endpoints specified"
msgstr "Mehrere Gegenstellen der Verbindung angegeben"
-#: ../gio/gdbus-tool.c:472
+#: ../gio/gdbus-tool.c:479
#, c-format
msgid ""
"Warning: According to introspection data, interface “%s” does not exist\n"
@@ -1082,7 +1082,7 @@ msgstr ""
"Warnung: Entsprechend den Inspektionsdaten existiert die Schnittstelle »%s« "
"nicht\n"
-#: ../gio/gdbus-tool.c:481
+#: ../gio/gdbus-tool.c:488
#, c-format
msgid ""
"Warning: According to introspection data, method “%s” does not exist on "
@@ -1091,168 +1091,170 @@ msgstr ""
"Warnung: Entsprechend den Inspektionsdaten existiert die Methode »%s« nicht "
"in der Schnittstelle »%s«\n"
-#: ../gio/gdbus-tool.c:543
+#: ../gio/gdbus-tool.c:550
msgid "Optional destination for signal (unique name)"
msgstr "Optionales Ziel des Signals (eindeutiger Name)"
-#: ../gio/gdbus-tool.c:544
+#: ../gio/gdbus-tool.c:551
msgid "Object path to emit signal on"
msgstr "Objektpfad, auf den das Signal ausgegeben werden soll"
-#: ../gio/gdbus-tool.c:545
+#: ../gio/gdbus-tool.c:552
msgid "Signal and interface name"
msgstr "Signal und Schnittstellenname"
-#: ../gio/gdbus-tool.c:579
+#: ../gio/gdbus-tool.c:587
msgid "Emit a signal."
msgstr "Ein Signal ausgeben."
-#: ../gio/gdbus-tool.c:613 ../gio/gdbus-tool.c:858 ../gio/gdbus-tool.c:1616
-#: ../gio/gdbus-tool.c:1851 ../gio/gdbus-tool.c:2067
+#: ../gio/gdbus-tool.c:642 ../gio/gdbus-tool.c:944 ../gio/gdbus-tool.c:1698
+#: ../gio/gdbus-tool.c:1931 ../gio/gdbus-tool.c:2152
#, c-format
msgid "Error connecting: %s\n"
msgstr "Fehler beim Verbinden: %s\n"
-#: ../gio/gdbus-tool.c:625
+#: ../gio/gdbus-tool.c:659 ../gio/gdbus-tool.c:961 ../gio/gdbus-tool.c:1715
+#: ../gio/gdbus-tool.c:1956
#, c-format
-msgid "Error: object path not specified.\n"
-msgstr "Fehler: Objektpfad wurde nicht angegeben.\n"
+msgid "Error: Destination is not specified\n"
+msgstr "Fehler: Ziel wurde nicht angegeben\n"
+
+#: ../gio/gdbus-tool.c:670
+#, c-format
+msgid "Error: %s is not a valid unique bus name.\n"
+msgstr "Fehler: %s ist kein gültiger eindeutiger Bus-Name.\n"
-#: ../gio/gdbus-tool.c:630 ../gio/gdbus-tool.c:925 ../gio/gdbus-tool.c:1681
-#: ../gio/gdbus-tool.c:1917
+#: ../gio/gdbus-tool.c:685 ../gio/gdbus-tool.c:987 ../gio/gdbus-tool.c:1741
+#, c-format
+msgid "Error: Object path is not specified\n"
+msgstr "Fehler: Objektpfad wurde nicht angegeben\n"
+
+#: ../gio/gdbus-tool.c:705 ../gio/gdbus-tool.c:1007 ../gio/gdbus-tool.c:1761
+#: ../gio/gdbus-tool.c:2002
#, c-format
msgid "Error: %s is not a valid object path\n"
msgstr "Fehler: %s ist kein gültiger Objektpfad\n"
-#: ../gio/gdbus-tool.c:636
+#: ../gio/gdbus-tool.c:720
#, c-format
-msgid "Error: signal not specified.\n"
-msgstr "Fehler: Signal wurde nicht angegeben.\n"
+msgid "Error: Signal name is not specified\n"
+msgstr "Fehler: Signalname wurde nicht angegeben\n"
-#: ../gio/gdbus-tool.c:643
+#: ../gio/gdbus-tool.c:731
#, c-format
-msgid "Error: signal must be the fully-qualified name.\n"
-msgstr "Fehler: Signal muss ein vollwertiger Name sein.\n"
+msgid "Error: Signal name “%s” is invalid\n"
+msgstr "Fehler: Signalname »%s« ist ungültig\n"
-#: ../gio/gdbus-tool.c:651
+#: ../gio/gdbus-tool.c:743
#, c-format
msgid "Error: %s is not a valid interface name\n"
msgstr "Fehler: %s ist kein gültiger Schnittstellenname\n"
-#: ../gio/gdbus-tool.c:657
+#: ../gio/gdbus-tool.c:749
#, c-format
msgid "Error: %s is not a valid member name\n"
msgstr "Fehler: %s ist kein gültiger Mitgliedsname\n"
-#: ../gio/gdbus-tool.c:663
-#, c-format
-msgid "Error: %s is not a valid unique bus name.\n"
-msgstr "Fehler: %s ist kein gültiger eindeutiger Bus-Name.\n"
-
#. Use the original non-"parse-me-harder" error
-#: ../gio/gdbus-tool.c:700 ../gio/gdbus-tool.c:1037
+#: ../gio/gdbus-tool.c:786 ../gio/gdbus-tool.c:1119
#, c-format
msgid "Error parsing parameter %d: %s\n"
msgstr "Fehler bei der Verarbeitung des Parameters %d: %s\n"
-#: ../gio/gdbus-tool.c:732
+#: ../gio/gdbus-tool.c:818
#, c-format
msgid "Error flushing connection: %s\n"
msgstr "Fehler beim Löschen der Verbindung: %s\n"
-#: ../gio/gdbus-tool.c:759
+#: ../gio/gdbus-tool.c:845
msgid "Destination name to invoke method on"
msgstr "Name des Ziels, für das die Methode aufgerufen werden soll"
-#: ../gio/gdbus-tool.c:760
+#: ../gio/gdbus-tool.c:846
msgid "Object path to invoke method on"
msgstr "Objektpfad, für den die Methode aufgerufen werden soll"
-#: ../gio/gdbus-tool.c:761
+#: ../gio/gdbus-tool.c:847
msgid "Method and interface name"
msgstr "Methode und Schnittstellenname"
-#: ../gio/gdbus-tool.c:762
+#: ../gio/gdbus-tool.c:848
msgid "Timeout in seconds"
msgstr "Zeitablauf in Sekunden"
-#: ../gio/gdbus-tool.c:803
+#: ../gio/gdbus-tool.c:889
msgid "Invoke a method on a remote object."
msgstr "Eine Methode für ein entferntes Objekt aufrufen."
-#: ../gio/gdbus-tool.c:878 ../gio/gdbus-tool.c:1635 ../gio/gdbus-tool.c:1870
-#, c-format
-msgid "Error: Destination is not specified\n"
-msgstr "Fehler: Ziel wurde nicht angegeben\n"
-
-#: ../gio/gdbus-tool.c:890 ../gio/gdbus-tool.c:1652 ../gio/gdbus-tool.c:1882
+#: ../gio/gdbus-tool.c:972 ../gio/gdbus-tool.c:1732 ../gio/gdbus-tool.c:1967
#, c-format
msgid "Error: %s is not a valid bus name\n"
msgstr "Fehler: %s ist kein gültiger Bus-Name\n"
-#: ../gio/gdbus-tool.c:905 ../gio/gdbus-tool.c:1661
-#, c-format
-msgid "Error: Object path is not specified\n"
-msgstr "Fehler: Objektpfad wurde nicht angegeben\n"
-
-#: ../gio/gdbus-tool.c:940
+#: ../gio/gdbus-tool.c:1022
#, c-format
msgid "Error: Method name is not specified\n"
msgstr "Fehler: Name der Methode wurde nicht angegeben\n"
-#: ../gio/gdbus-tool.c:951
+#: ../gio/gdbus-tool.c:1033
#, c-format
msgid "Error: Method name “%s” is invalid\n"
msgstr "Fehler: Name der Methode »%s« ist ungültig\n"
-#: ../gio/gdbus-tool.c:1029
+#: ../gio/gdbus-tool.c:1111
#, c-format
msgid "Error parsing parameter %d of type “%s”: %s\n"
msgstr "Fehler bei der Verarbeitung des Parameters %d vom Typ »%s«: %s\n"
-#: ../gio/gdbus-tool.c:1473
+#: ../gio/gdbus-tool.c:1555
msgid "Destination name to introspect"
msgstr "Name des Ziels der Inspektion"
-#: ../gio/gdbus-tool.c:1474
+#: ../gio/gdbus-tool.c:1556
msgid "Object path to introspect"
msgstr "Zu inspizierender Objektpfad"
-#: ../gio/gdbus-tool.c:1475
+#: ../gio/gdbus-tool.c:1557
msgid "Print XML"
msgstr "XML drucken"
-#: ../gio/gdbus-tool.c:1476
+#: ../gio/gdbus-tool.c:1558
msgid "Introspect children"
msgstr "Unterelemente inspizieren"
-#: ../gio/gdbus-tool.c:1477
+#: ../gio/gdbus-tool.c:1559
msgid "Only print properties"
msgstr "Nur Eigenschaften ausgeben"
-#: ../gio/gdbus-tool.c:1568
+#: ../gio/gdbus-tool.c:1650
msgid "Introspect a remote object."
msgstr "Ein entferntes Objekt inspizieren."
-#: ../gio/gdbus-tool.c:1773
+#: ../gio/gdbus-tool.c:1853
msgid "Destination name to monitor"
msgstr "Name des zu überwachenden Ziels"
-#: ../gio/gdbus-tool.c:1774
+#: ../gio/gdbus-tool.c:1854
msgid "Object path to monitor"
msgstr "Zu überwachender Objektpfad"
-#: ../gio/gdbus-tool.c:1803
+#: ../gio/gdbus-tool.c:1883
msgid "Monitor a remote object."
msgstr "Ein entferntes Objekt überwachen."
-#: ../gio/gdbus-tool.c:1980
+#: ../gio/gdbus-tool.c:1941
+#, c-format
+msgid "Error: can’t monitor a non-message-bus connection\n"
+msgstr ""
+"Fehler: eine Nicht-Message-Bus-Verbindung kann nicht überwacht werden\n"
+
+#: ../gio/gdbus-tool.c:2065
msgid "Service to activate before waiting for the other one (well-known name)"
msgstr ""
"Zu aktivierender Dienst, bevor auf den anderen gewartet wird (allgemein "
"bekannter Name)"
-#: ../gio/gdbus-tool.c:1983
+#: ../gio/gdbus-tool.c:2068
msgid ""
"Timeout to wait for before exiting with an error (seconds); 0 for no timeout "
"(default)"
@@ -1260,32 +1262,32 @@ msgstr ""
"Zeitspanne, die gewartet werden soll, bis mit einer Fehlermeldung "
"abgebrochen wird (Sekunden); 0 für keine Zeitspanne (Voreinstellung)"
-#: ../gio/gdbus-tool.c:2031
+#: ../gio/gdbus-tool.c:2116
msgid "[OPTION…] BUS-NAME"
msgstr "[OPTION …] BUS-NAME"
-#: ../gio/gdbus-tool.c:2033
+#: ../gio/gdbus-tool.c:2118
msgid "Wait for a bus name to appear."
msgstr "Name eines Busses, auf dessen Verfügbarkeit gewartet werden soll."
-#: ../gio/gdbus-tool.c:2109
+#: ../gio/gdbus-tool.c:2194
#, c-format
msgid "Error: A service to activate for must be specified.\n"
msgstr ""
"Fehler: Es muss ein Dienst angegeben werden, der gestartet werden soll.\n"
-#: ../gio/gdbus-tool.c:2114
+#: ../gio/gdbus-tool.c:2199
#, c-format
msgid "Error: A service to wait for must be specified.\n"
msgstr ""
"Fehler: Es muss ein Dienst angegeben werden, auf den gewartet werden soll.\n"
-#: ../gio/gdbus-tool.c:2119
+#: ../gio/gdbus-tool.c:2204
#, c-format
msgid "Error: Too many arguments.\n"
msgstr "Fehler: Zu viele Argumente.\n"
-#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134
+#: ../gio/gdbus-tool.c:2212 ../gio/gdbus-tool.c:2219
#, c-format
msgid "Error: %s is not a valid well-known bus name.\n"
msgstr "Fehler: %s ist kein gültiger, bekannter Bus-Name\n"
@@ -1392,7 +1394,7 @@ msgstr "Es wurde ein GEmblem für GEmblemedIcon erwartet"
#: ../gio/gfile.c:3893 ../gio/gfile.c:3935 ../gio/gfile.c:4403
#: ../gio/gfile.c:4814 ../gio/gfile.c:4899 ../gio/gfile.c:4989
#: ../gio/gfile.c:5086 ../gio/gfile.c:5173 ../gio/gfile.c:5274
-#: ../gio/gfile.c:7815 ../gio/gfile.c:7905 ../gio/gfile.c:7989
+#: ../gio/gfile.c:7817 ../gio/gfile.c:7907 ../gio/gfile.c:7991
#: ../gio/win32/gwinhttpfile.c:437
msgid "Operation not supported"
msgstr "Vorgang wird nicht unterstützt"
@@ -1405,7 +1407,7 @@ msgstr "Vorgang wird nicht unterstützt"
msgid "Containing mount does not exist"
msgstr "Enthaltender Einhängepunkt existiert nicht"
-#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2377
+#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2378
msgid "Can’t copy over directory"
msgstr "Es kann nicht über den Ordner kopiert werden"
@@ -1722,7 +1724,7 @@ msgstr "Fehler beim Schreiben in die Standardausgabe"
#: ../gio/gio-tool-monitor.c:37 ../gio/gio-tool-monitor.c:39
#: ../gio/gio-tool-monitor.c:41 ../gio/gio-tool-monitor.c:43
#: ../gio/gio-tool-monitor.c:203 ../gio/gio-tool-mount.c:1141
-#: ../gio/gio-tool-open.c:45 ../gio/gio-tool-remove.c:48
+#: ../gio/gio-tool-open.c:113 ../gio/gio-tool-remove.c:48
#: ../gio/gio-tool-rename.c:45 ../gio/gio-tool-set.c:89
#: ../gio/gio-tool-trash.c:81 ../gio/gio-tool-tree.c:239
msgid "LOCATION"
@@ -1744,7 +1746,7 @@ msgstr ""
#: ../gio/gio-tool-cat.c:162 ../gio/gio-tool-info.c:313
#: ../gio/gio-tool-mkdir.c:76 ../gio/gio-tool-monitor.c:228
-#: ../gio/gio-tool-open.c:71 ../gio/gio-tool-remove.c:72
+#: ../gio/gio-tool-open.c:139 ../gio/gio-tool-remove.c:72
msgid "No locations given"
msgstr "Keine Orte angegeben"
@@ -2143,7 +2145,7 @@ msgstr ""
msgid "Target %s is not a directory"
msgstr "Das Ziel »%s« ist kein Ordner"
-#: ../gio/gio-tool-open.c:50
+#: ../gio/gio-tool-open.c:118
msgid ""
"Open files with the default application that\n"
"is registered to handle files of this type."
@@ -2897,224 +2899,224 @@ msgstr "Fehler beim Umbenennen der Datei %s: %s"
msgid "Can’t rename file, filename already exists"
msgstr "Datei kann nicht umbenannt werden, da der Dateiname bereits existiert"
-#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2253 ../gio/glocalfile.c:2281
-#: ../gio/glocalfile.c:2438 ../gio/glocalfileoutputstream.c:549
+#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2254 ../gio/glocalfile.c:2282
+#: ../gio/glocalfile.c:2439 ../gio/glocalfileoutputstream.c:551
msgid "Invalid filename"
msgstr "Ungültiger Dateiname"
-#: ../gio/glocalfile.c:1404 ../gio/glocalfile.c:1419
+#: ../gio/glocalfile.c:1405 ../gio/glocalfile.c:1420
#, c-format
msgid "Error opening file %s: %s"
msgstr "Fehler beim Öffnen der Datei »%s«: %s"
-#: ../gio/glocalfile.c:1544
+#: ../gio/glocalfile.c:1545
#, c-format
msgid "Error removing file %s: %s"
msgstr "Fehler beim Entfernen der Datei »%s«: %s"
-#: ../gio/glocalfile.c:1928
+#: ../gio/glocalfile.c:1929
#, c-format
msgid "Error trashing file %s: %s"
msgstr "Fehler beim Verschieben der Datei %s in den Papierkorb: %s"
-#: ../gio/glocalfile.c:1951
+#: ../gio/glocalfile.c:1952
#, c-format
msgid "Unable to create trash dir %s: %s"
msgstr "Papierkorb-Ordner %s konnte nicht angelegt werden: %s"
-#: ../gio/glocalfile.c:1971
+#: ../gio/glocalfile.c:1972
#, c-format
msgid "Unable to find toplevel directory to trash %s"
msgstr ""
"Oberster Ordner konnte zum Verschieben von %s in den Papierkorb nicht "
"gefunden werden"
-#: ../gio/glocalfile.c:2050 ../gio/glocalfile.c:2070
+#: ../gio/glocalfile.c:2051 ../gio/glocalfile.c:2071
#, c-format
msgid "Unable to find or create trash directory for %s"
msgstr "Papierkorb-Ordner konnte für %s nicht gefunden oder angelegt werden"
-#: ../gio/glocalfile.c:2105
+#: ../gio/glocalfile.c:2106
#, c-format
msgid "Unable to create trashing info file for %s: %s"
msgstr "Löschprotokoll-Datei für %s konnte nicht angelegt werden: %s"
-#: ../gio/glocalfile.c:2164
+#: ../gio/glocalfile.c:2165
#, c-format
msgid "Unable to trash file %s across filesystem boundaries"
msgstr ""
"Datei %s kann nicht über Dateisystemgrenzen hinweg in den Papierkorb "
"verschoben werden"
-#: ../gio/glocalfile.c:2168 ../gio/glocalfile.c:2224
+#: ../gio/glocalfile.c:2169 ../gio/glocalfile.c:2225
#, c-format
msgid "Unable to trash file %s: %s"
msgstr "Datei %s kann nicht in den Papierkorb verschoben werden: %s"
-#: ../gio/glocalfile.c:2230
+#: ../gio/glocalfile.c:2231
#, c-format
msgid "Unable to trash file %s"
msgstr "Datei %s kann nicht in den Papierkorb verschoben werden"
-#: ../gio/glocalfile.c:2256
+#: ../gio/glocalfile.c:2257
#, c-format
msgid "Error creating directory %s: %s"
msgstr "Fehler beim Erstellen des Ordners »%s«: %s"
-#: ../gio/glocalfile.c:2285
+#: ../gio/glocalfile.c:2286
#, c-format
msgid "Filesystem does not support symbolic links"
msgstr "Das Dateisystem unterstützt keine symbolische Verknüpfungen"
-#: ../gio/glocalfile.c:2288
+#: ../gio/glocalfile.c:2289
#, c-format
msgid "Error making symbolic link %s: %s"
msgstr "Fehler beim Erstellen der symbolischen Verknüpfung %s: %s"
-#: ../gio/glocalfile.c:2294 ../glib/gfileutils.c:2077
+#: ../gio/glocalfile.c:2295 ../glib/gfileutils.c:2101
msgid "Symbolic links not supported"
msgstr "Symbolische Verknüpfungen nicht unterstützt"
-#: ../gio/glocalfile.c:2349 ../gio/glocalfile.c:2384 ../gio/glocalfile.c:2441
+#: ../gio/glocalfile.c:2350 ../gio/glocalfile.c:2385 ../gio/glocalfile.c:2442
#, c-format
msgid "Error moving file %s: %s"
msgstr "Fehler beim Verschieben der Datei %s: %s"
-#: ../gio/glocalfile.c:2372
+#: ../gio/glocalfile.c:2373
msgid "Can’t move directory over directory"
msgstr "Ordner kann nicht über Ordner verschoben werden"
-#: ../gio/glocalfile.c:2398 ../gio/glocalfileoutputstream.c:933
-#: ../gio/glocalfileoutputstream.c:947 ../gio/glocalfileoutputstream.c:962
-#: ../gio/glocalfileoutputstream.c:979 ../gio/glocalfileoutputstream.c:993
+#: ../gio/glocalfile.c:2399 ../gio/glocalfileoutputstream.c:935
+#: ../gio/glocalfileoutputstream.c:949 ../gio/glocalfileoutputstream.c:964
+#: ../gio/glocalfileoutputstream.c:981 ../gio/glocalfileoutputstream.c:995
msgid "Backup file creation failed"
msgstr "Erstellen der Sicherungsdatei gescheitert"
-#: ../gio/glocalfile.c:2417
+#: ../gio/glocalfile.c:2418
#, c-format
msgid "Error removing target file: %s"
msgstr "Fehler beim Entfernen der Zieldatei: %s"
-#: ../gio/glocalfile.c:2431
+#: ../gio/glocalfile.c:2432
msgid "Move between mounts not supported"
msgstr "Verschieben zwischen Einhängepunkten nicht unterstützt"
-#: ../gio/glocalfile.c:2622
+#: ../gio/glocalfile.c:2623
#, c-format
msgid "Could not determine the disk usage of %s: %s"
msgstr "Konnte die Festplattenbelegung von %s nicht bestimmen: %s"
-#: ../gio/glocalfileinfo.c:731
+#: ../gio/glocalfileinfo.c:742
msgid "Attribute value must be non-NULL"
msgstr "Attributwert darf nicht NULL sein"
-#: ../gio/glocalfileinfo.c:738
+#: ../gio/glocalfileinfo.c:749
msgid "Invalid attribute type (string expected)"
msgstr "Ungültiger Attributtyp (»string« erwartet)"
-#: ../gio/glocalfileinfo.c:745
+#: ../gio/glocalfileinfo.c:756
msgid "Invalid extended attribute name"
msgstr "Ungültiger erweiterter Attributname"
-#: ../gio/glocalfileinfo.c:785
+#: ../gio/glocalfileinfo.c:796
#, c-format
msgid "Error setting extended attribute “%s”: %s"
msgstr "Fehler beim Setzen des erweiterten Attributs »%s«: %s"
-#: ../gio/glocalfileinfo.c:1586
+#: ../gio/glocalfileinfo.c:1604
msgid " (invalid encoding)"
msgstr " (ungültige Kodierung)"
-#: ../gio/glocalfileinfo.c:1777 ../gio/glocalfileoutputstream.c:811
+#: ../gio/glocalfileinfo.c:1773 ../gio/glocalfileoutputstream.c:813
#, c-format
msgid "Error when getting information for file “%s”: %s"
msgstr "Fehler beim Holen der Informationen für Datei »%s«: %s"
-#: ../gio/glocalfileinfo.c:2028
+#: ../gio/glocalfileinfo.c:2031
#, c-format
msgid "Error when getting information for file descriptor: %s"
msgstr "Fehler beim Holen der Informationen für Dateideskriptor: %s"
-#: ../gio/glocalfileinfo.c:2073
+#: ../gio/glocalfileinfo.c:2076
msgid "Invalid attribute type (uint32 expected)"
msgstr "Ungültiger Attributtyp (»uint32« erwartet)"
-#: ../gio/glocalfileinfo.c:2091
+#: ../gio/glocalfileinfo.c:2094
msgid "Invalid attribute type (uint64 expected)"
msgstr "Ungültiger Attributtyp (»uint64« erwartet)"
-#: ../gio/glocalfileinfo.c:2110 ../gio/glocalfileinfo.c:2129
+#: ../gio/glocalfileinfo.c:2113 ../gio/glocalfileinfo.c:2132
msgid "Invalid attribute type (byte string expected)"
msgstr "Ungültiger Attributtyp (»byte string« erwartet)"
-#: ../gio/glocalfileinfo.c:2164
+#: ../gio/glocalfileinfo.c:2177
msgid "Cannot set permissions on symlinks"
msgstr ""
"Zugriffsrechte für symbolische Verknüpfungen können nicht gesetzt werden"
-#: ../gio/glocalfileinfo.c:2180
+#: ../gio/glocalfileinfo.c:2193
#, c-format
msgid "Error setting permissions: %s"
msgstr "Fehler beim Setzen der Zugriffsrechte: %s"
-#: ../gio/glocalfileinfo.c:2231
+#: ../gio/glocalfileinfo.c:2244
#, c-format
msgid "Error setting owner: %s"
msgstr "Fehler beim Setzen des Besitzers: %s"
-#: ../gio/glocalfileinfo.c:2254
+#: ../gio/glocalfileinfo.c:2267
msgid "symlink must be non-NULL"
msgstr "Symbolische Verknüpfung darf nicht NULL sein"
-#: ../gio/glocalfileinfo.c:2264 ../gio/glocalfileinfo.c:2283
-#: ../gio/glocalfileinfo.c:2294
+#: ../gio/glocalfileinfo.c:2277 ../gio/glocalfileinfo.c:2296
+#: ../gio/glocalfileinfo.c:2307
#, c-format
msgid "Error setting symlink: %s"
msgstr "Fehler beim Setzen der symbolischen Verknüpfung: %s"
-#: ../gio/glocalfileinfo.c:2273
+#: ../gio/glocalfileinfo.c:2286
msgid "Error setting symlink: file is not a symlink"
msgstr ""
"Fehler beim Setzen der symbolischen Verknüpfung: Datei ist keine symbolische "
"Verknüpfung"
-#: ../gio/glocalfileinfo.c:2399
+#: ../gio/glocalfileinfo.c:2412
#, c-format
msgid "Error setting modification or access time: %s"
msgstr "Fehler beim Setzen der Zugriffsrechte oder der Zugriffszeit: %s"
-#: ../gio/glocalfileinfo.c:2422
+#: ../gio/glocalfileinfo.c:2435
msgid "SELinux context must be non-NULL"
msgstr "SELinux-Kontext darf nicht NULL sein"
-#: ../gio/glocalfileinfo.c:2437
+#: ../gio/glocalfileinfo.c:2450
#, c-format
msgid "Error setting SELinux context: %s"
msgstr "Fehler beim Setzen des SELinux-Kontexts: %s"
-#: ../gio/glocalfileinfo.c:2444
+#: ../gio/glocalfileinfo.c:2457
msgid "SELinux is not enabled on this system"
msgstr "SELinux ist auf diesem System nicht aktiviert"
-#: ../gio/glocalfileinfo.c:2536
+#: ../gio/glocalfileinfo.c:2549
#, c-format
msgid "Setting attribute %s not supported"
msgstr "Setzen des Attributs %s nicht unterstützt"
-#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:694
+#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:696
#, c-format
msgid "Error reading from file: %s"
msgstr "Fehler beim Lesen aus Datei: %s"
#: ../gio/glocalfileinputstream.c:199 ../gio/glocalfileinputstream.c:211
#: ../gio/glocalfileinputstream.c:225 ../gio/glocalfileinputstream.c:333
-#: ../gio/glocalfileoutputstream.c:456 ../gio/glocalfileoutputstream.c:1011
+#: ../gio/glocalfileoutputstream.c:458 ../gio/glocalfileoutputstream.c:1013
#, c-format
msgid "Error seeking in file: %s"
msgstr "Fehler beim Suchen in Datei: %s"
-#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:246
-#: ../gio/glocalfileoutputstream.c:340
+#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:248
+#: ../gio/glocalfileoutputstream.c:342
#, c-format
msgid "Error closing file: %s"
msgstr "Fehler beim Schließen der Datei: %s"
@@ -3124,51 +3126,51 @@ msgid "Unable to find default local file monitor type"
msgstr ""
"Vorgegebener Überwachungstyp für lokale Dateien konnte nicht gefunden werden"
-#: ../gio/glocalfileoutputstream.c:194 ../gio/glocalfileoutputstream.c:226
-#: ../gio/glocalfileoutputstream.c:715
+#: ../gio/glocalfileoutputstream.c:196 ../gio/glocalfileoutputstream.c:228
+#: ../gio/glocalfileoutputstream.c:717
#, c-format
msgid "Error writing to file: %s"
msgstr "Fehler beim Schreiben in Datei: %s"
-#: ../gio/glocalfileoutputstream.c:273
+#: ../gio/glocalfileoutputstream.c:275
#, c-format
msgid "Error removing old backup link: %s"
msgstr "Fehler beim Entfernen der alten Sicherungsverknüpfung: %s"
-#: ../gio/glocalfileoutputstream.c:287 ../gio/glocalfileoutputstream.c:300
+#: ../gio/glocalfileoutputstream.c:289 ../gio/glocalfileoutputstream.c:302
#, c-format
msgid "Error creating backup copy: %s"
msgstr "Fehler beim Erzeugen der Sicherungskopie: %s"
-#: ../gio/glocalfileoutputstream.c:318
+#: ../gio/glocalfileoutputstream.c:320
#, c-format
msgid "Error renaming temporary file: %s"
msgstr "Fehler beim Umbenennen der temporären Datei: %s"
-#: ../gio/glocalfileoutputstream.c:502 ../gio/glocalfileoutputstream.c:1062
+#: ../gio/glocalfileoutputstream.c:504 ../gio/glocalfileoutputstream.c:1064
#, c-format
msgid "Error truncating file: %s"
msgstr "Fehler beim Abschneiden der Datei: %s"
-#: ../gio/glocalfileoutputstream.c:555 ../gio/glocalfileoutputstream.c:793
-#: ../gio/glocalfileoutputstream.c:1043 ../gio/gsubprocess.c:380
+#: ../gio/glocalfileoutputstream.c:557 ../gio/glocalfileoutputstream.c:795
+#: ../gio/glocalfileoutputstream.c:1045 ../gio/gsubprocess.c:380
#, c-format
msgid "Error opening file “%s”: %s"
msgstr "Fehler beim Öffnen der Datei »%s«: %s"
-#: ../gio/glocalfileoutputstream.c:824
+#: ../gio/glocalfileoutputstream.c:826
msgid "Target file is a directory"
msgstr "Zieldatei ist ein Ordner"
-#: ../gio/glocalfileoutputstream.c:829
+#: ../gio/glocalfileoutputstream.c:831
msgid "Target file is not a regular file"
msgstr "Zieldatei ist keine reguläre Datei"
-#: ../gio/glocalfileoutputstream.c:841
+#: ../gio/glocalfileoutputstream.c:843
msgid "The file was externally modified"
msgstr "Die Datei wurde extern verändert"
-#: ../gio/glocalfileoutputstream.c:1027
+#: ../gio/glocalfileoutputstream.c:1029
#, c-format
msgid "Error removing old file: %s"
msgstr "Fehler beim Entfernen der alten Datei: %s"
@@ -3212,21 +3214,21 @@ msgstr "Angeforderte Suche nach dem Ende des Datenstroms"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement unmount.
-#: ../gio/gmount.c:393
+#: ../gio/gmount.c:396
msgid "mount doesn’t implement “unmount”"
msgstr "Einhängepunkt unterstützt Aushängen nicht"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement eject.
-#: ../gio/gmount.c:469
+#: ../gio/gmount.c:472
msgid "mount doesn’t implement “eject”"
msgstr "Einhängepunkt unterstützt Auswerfen nicht"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of unmount or unmount_with_operation.
-#: ../gio/gmount.c:547
+#: ../gio/gmount.c:550
msgid "mount doesn’t implement “unmount” or “unmount_with_operation”"
msgstr ""
"Einhängepunkt unterstützt nicht das Aushängen oder »unmount_with_operation«"
@@ -3234,28 +3236,28 @@ msgstr ""
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of eject or eject_with_operation.
-#: ../gio/gmount.c:632
+#: ../gio/gmount.c:635
msgid "mount doesn’t implement “eject” or “eject_with_operation”"
msgstr "Einhängepunkt unterstützt Auswerfen oder »eject_with_operation« nicht"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement remount.
-#: ../gio/gmount.c:720
+#: ../gio/gmount.c:723
msgid "mount doesn’t implement “remount”"
msgstr "Einhängepunkt unterstützt erneutes Einhängen nicht"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:802
+#: ../gio/gmount.c:805
msgid "mount doesn’t implement content type guessing"
msgstr "Einhängepunkt unterstützt Erraten des Inhaltstyps nicht"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:889
+#: ../gio/gmount.c:892
msgid "mount doesn’t implement synchronous content type guessing"
msgstr "Einhängepunkt unterstützt synchrones Erraten des Inhaltstyps nicht"
@@ -3694,148 +3696,178 @@ msgstr "Leerer Schema-Name wurde angegeben\n"
msgid "No such key “%s”\n"
msgstr "Kein derartiger Schlüssel »%s«\n"
-#: ../gio/gsocket.c:379
+#: ../gio/gsocket.c:384
msgid "Invalid socket, not initialized"
msgstr "Ungültiger Socket, wurde nicht initialisiert"
-#: ../gio/gsocket.c:386
+#: ../gio/gsocket.c:391
#, c-format
msgid "Invalid socket, initialization failed due to: %s"
msgstr "Ungültiger Socket, Initialisierung schlug fehl wegen: %s"
-#: ../gio/gsocket.c:394
+#: ../gio/gsocket.c:399
msgid "Socket is already closed"
msgstr "Der Socket ist bereits geschlossen"
-#: ../gio/gsocket.c:409 ../gio/gsocket.c:2765 ../gio/gsocket.c:3950
-#: ../gio/gsocket.c:4008
+#: ../gio/gsocket.c:414 ../gio/gsocket.c:2995 ../gio/gsocket.c:4205
+#: ../gio/gsocket.c:4263
msgid "Socket I/O timed out"
msgstr "Zeitüberschreitung bei Ein-/Ausgabeoperation des Sockets"
-#: ../gio/gsocket.c:541
+#: ../gio/gsocket.c:546
#, c-format
msgid "creating GSocket from fd: %s"
msgstr "GSocket wird erstellt von Dateideskriptor: %s"
-#: ../gio/gsocket.c:570 ../gio/gsocket.c:624 ../gio/gsocket.c:631
+#: ../gio/gsocket.c:575 ../gio/gsocket.c:629 ../gio/gsocket.c:636
#, c-format
msgid "Unable to create socket: %s"
msgstr "Socket kann nicht angelegt werden: %s"
-#: ../gio/gsocket.c:624
+#: ../gio/gsocket.c:629
msgid "Unknown family was specified"
msgstr "Eine unbekannte Familie wurde angegeben"
-#: ../gio/gsocket.c:631
+#: ../gio/gsocket.c:636
msgid "Unknown protocol was specified"
msgstr "Ein unbekanntes Protokoll wurde angegeben"
-#: ../gio/gsocket.c:1122
+#: ../gio/gsocket.c:1127
#, c-format
msgid "Cannot use datagram operations on a non-datagram socket."
msgstr ""
"Datagramm-Operationen können nicht auf einem Nicht-Datagramm-Socket "
"ausgeführt werden."
-#: ../gio/gsocket.c:1139
+#: ../gio/gsocket.c:1144
#, c-format
msgid "Cannot use datagram operations on a socket with a timeout set."
msgstr ""
"Datagramm-Operationen können nicht auf einem Socket mit gesetzter "
"Zeitüberschreitung ausgeführt werden."
-#: ../gio/gsocket.c:1943
+#: ../gio/gsocket.c:1948
#, c-format
msgid "could not get local address: %s"
msgstr "Lokale Adresse konnte nicht gelesen werden: %s"
-#: ../gio/gsocket.c:1986
+#: ../gio/gsocket.c:1991
#, c-format
msgid "could not get remote address: %s"
msgstr "Entfernte Adresse konnte nicht gelesen werden: %s"
-#: ../gio/gsocket.c:2052
+#: ../gio/gsocket.c:2057
#, c-format
msgid "could not listen: %s"
msgstr "Es konnte nicht gelauscht werden: %s"
-#: ../gio/gsocket.c:2151
+#: ../gio/gsocket.c:2156
#, c-format
msgid "Error binding to address: %s"
msgstr "Fehler beim Binden an Adresse: %s"
-#: ../gio/gsocket.c:2266 ../gio/gsocket.c:2303
+#: ../gio/gsocket.c:2214 ../gio/gsocket.c:2251 ../gio/gsocket.c:2361
+#: ../gio/gsocket.c:2379 ../gio/gsocket.c:2449 ../gio/gsocket.c:2507
+#: ../gio/gsocket.c:2525
#, c-format
msgid "Error joining multicast group: %s"
msgstr "Fehler beim Beitreten zur Multicast-Gruppe: %s"
-#: ../gio/gsocket.c:2267 ../gio/gsocket.c:2304
+#: ../gio/gsocket.c:2215 ../gio/gsocket.c:2252 ../gio/gsocket.c:2362
+#: ../gio/gsocket.c:2380 ../gio/gsocket.c:2450 ../gio/gsocket.c:2508
+#: ../gio/gsocket.c:2526
#, c-format
msgid "Error leaving multicast group: %s"
msgstr "Fehler beim Verlassen der Multicast-Gruppe: %s"
-#: ../gio/gsocket.c:2268
+#: ../gio/gsocket.c:2216
msgid "No support for source-specific multicast"
msgstr "Quellen-spezifisches Multicast wird nicht unterstützt"
-#: ../gio/gsocket.c:2488
+#: ../gio/gsocket.c:2363
+msgid "Unsupported socket family"
+msgstr "Nicht unterstützte Socket-Familie"
+
+#: ../gio/gsocket.c:2381
+msgid "source-specific not an IPv4 address"
+msgstr "Quellen-spezifisch ist keine IPv4-Adresse"
+
+#: ../gio/gsocket.c:2399 ../gio/gsocket.c:2428 ../gio/gsocket.c:2475
+#, c-format
+msgid "Interface not found: %s"
+msgstr "Schnittstelle nicht gefunden: %s"
+
+#: ../gio/gsocket.c:2415
+#, c-format
+msgid "Interface name too long"
+msgstr "Schnittstellenname ist zu lang"
+
+#: ../gio/gsocket.c:2451
+msgid "No support for IPv4 source-specific multicast"
+msgstr "Quellen-spezifisches IPv4-Multicast wird nicht unterstützt"
+
+#: ../gio/gsocket.c:2509
+msgid "No support for IPv6 source-specific multicast"
+msgstr "Quellen-spezifisches IPv6-Multicast wird nicht unterstützt"
+
+#: ../gio/gsocket.c:2718
#, c-format
msgid "Error accepting connection: %s"
msgstr "Fehler bei Annahme der Verbindung: %s"
-#: ../gio/gsocket.c:2609
+#: ../gio/gsocket.c:2839
msgid "Connection in progress"
msgstr "Verbindungsvorgang läuft"
-#: ../gio/gsocket.c:2658
+#: ../gio/gsocket.c:2888
msgid "Unable to get pending error: "
msgstr "Ausstehender Fehler konnte nicht erhalten werden: "
-#: ../gio/gsocket.c:2828
+#: ../gio/gsocket.c:3058
#, c-format
msgid "Error receiving data: %s"
msgstr "Fehler beim Erhalt von Daten: %s"
-#: ../gio/gsocket.c:3023
+#: ../gio/gsocket.c:3253
#, c-format
msgid "Error sending data: %s"
msgstr "Fehler beim Senden von Daten: %s"
-#: ../gio/gsocket.c:3210
+#: ../gio/gsocket.c:3440
#, c-format
msgid "Unable to shutdown socket: %s"
msgstr "Socket kann nicht heruntergefahren werden: %s"
-#: ../gio/gsocket.c:3291
+#: ../gio/gsocket.c:3521
#, c-format
msgid "Error closing socket: %s"
msgstr "Fehler beim Schließen des Sockets: %s"
-#: ../gio/gsocket.c:3943
+#: ../gio/gsocket.c:4198
#, c-format
msgid "Waiting for socket condition: %s"
msgstr "Es wird auf eine Socket-Bedingung gewartet: %s"
-#: ../gio/gsocket.c:4417 ../gio/gsocket.c:4497 ../gio/gsocket.c:4675
+#: ../gio/gsocket.c:4672 ../gio/gsocket.c:4752 ../gio/gsocket.c:4930
#, c-format
msgid "Error sending message: %s"
msgstr "Fehler beim Senden der Nachricht: %s"
-#: ../gio/gsocket.c:4441
+#: ../gio/gsocket.c:4696
msgid "GSocketControlMessage not supported on Windows"
msgstr "GSocketControlMessage wird unter Windows nicht unterstützt"
-#: ../gio/gsocket.c:4894 ../gio/gsocket.c:4967 ../gio/gsocket.c:5193
+#: ../gio/gsocket.c:5149 ../gio/gsocket.c:5222 ../gio/gsocket.c:5448
#, c-format
msgid "Error receiving message: %s"
msgstr "Fehler beim Empfang der Nachricht: %s"
-#: ../gio/gsocket.c:5465
+#: ../gio/gsocket.c:5720
#, c-format
msgid "Unable to read socket credentials: %s"
msgstr "Socket-Berechtigungen konnten nicht gelesen werden: %s"
-#: ../gio/gsocket.c:5474
+#: ../gio/gsocket.c:5729
msgid "g_socket_get_credentials not implemented for this OS"
msgstr ""
"g_socket_get_credentials ist für dieses Betriebssystem nicht implementiert"
@@ -3979,18 +4011,18 @@ msgstr "Es wurden keine gültigen Adressen gefunden"
msgid "Error reverse-resolving “%s”: %s"
msgstr "Fehler beim Rückwärtsauflösen von »%s«: %s"
-#: ../gio/gthreadedresolver.c:550 ../gio/gthreadedresolver.c:630
-#: ../gio/gthreadedresolver.c:728 ../gio/gthreadedresolver.c:778
+#: ../gio/gthreadedresolver.c:549 ../gio/gthreadedresolver.c:628
+#: ../gio/gthreadedresolver.c:726 ../gio/gthreadedresolver.c:776
#, c-format
msgid "No DNS record of the requested type for “%s”"
msgstr "Kein DNS-Datensatz des angeforderten Typs für »%s«"
-#: ../gio/gthreadedresolver.c:555 ../gio/gthreadedresolver.c:733
+#: ../gio/gthreadedresolver.c:554 ../gio/gthreadedresolver.c:731
#, c-format
msgid "Temporarily unable to resolve “%s”"
msgstr "»%s« kann vorübergehend nicht aufgelöst werden"
-#: ../gio/gthreadedresolver.c:560 ../gio/gthreadedresolver.c:738
+#: ../gio/gthreadedresolver.c:559 ../gio/gthreadedresolver.c:736
#, c-format
msgid "Error resolving “%s”"
msgstr "Fehler beim Auflösen von »%s«"
@@ -4102,7 +4134,7 @@ msgstr "Fehler beim Lesen aus dem Dateideskriptor: %s"
msgid "Error closing file descriptor: %s"
msgstr "Fehler beim Schließen des Dateideskriptors: %s"
-#: ../gio/gunixmounts.c:2430 ../gio/gunixmounts.c:2483
+#: ../gio/gunixmounts.c:2539 ../gio/gunixmounts.c:2592
msgid "Filesystem root"
msgstr "Wurzelordner des Dateisystems"
@@ -4304,227 +4336,227 @@ msgid "The pathname “%s” is not an absolute path"
msgstr "Der Pfadname »%s« ist kein absoluter Pfad"
#. Translators: this is the preferred format for expressing the date and the time
-#: ../glib/gdatetime.c:202
+#: ../glib/gdatetime.c:203
msgctxt "GDateTime"
msgid "%a %b %e %H:%M:%S %Y"
msgstr "%a %e. %b %Y %T %Z"
#. Translators: this is the preferred format for expressing the date
-#: ../glib/gdatetime.c:205
+#: ../glib/gdatetime.c:206
msgctxt "GDateTime"
msgid "%m/%d/%y"
msgstr "%d.%m.%y"
#. Translators: this is the preferred format for expressing the time
-#: ../glib/gdatetime.c:208
+#: ../glib/gdatetime.c:209
msgctxt "GDateTime"
msgid "%H:%M:%S"
msgstr "%H:%M:%S"
#. Translators: this is the preferred format for expressing 12 hour time
-#: ../glib/gdatetime.c:211
+#: ../glib/gdatetime.c:212
msgctxt "GDateTime"
msgid "%I:%M:%S %p"
msgstr "%I:%M:%S"
-#: ../glib/gdatetime.c:224
+#: ../glib/gdatetime.c:225
msgctxt "full month name"
msgid "January"
msgstr "Januar"
-#: ../glib/gdatetime.c:226
+#: ../glib/gdatetime.c:227
msgctxt "full month name"
msgid "February"
msgstr "Februar"
-#: ../glib/gdatetime.c:228
+#: ../glib/gdatetime.c:229
msgctxt "full month name"
msgid "March"
msgstr "März"
-#: ../glib/gdatetime.c:230
+#: ../glib/gdatetime.c:231
msgctxt "full month name"
msgid "April"
msgstr "April"
-#: ../glib/gdatetime.c:232
+#: ../glib/gdatetime.c:233
msgctxt "full month name"
msgid "May"
msgstr "Mai"
-#: ../glib/gdatetime.c:234
+#: ../glib/gdatetime.c:235
msgctxt "full month name"
msgid "June"
msgstr "Juni"
-#: ../glib/gdatetime.c:236
+#: ../glib/gdatetime.c:237
msgctxt "full month name"
msgid "July"
msgstr "Juli"
-#: ../glib/gdatetime.c:238
+#: ../glib/gdatetime.c:239
msgctxt "full month name"
msgid "August"
msgstr "August"
-#: ../glib/gdatetime.c:240
+#: ../glib/gdatetime.c:241
msgctxt "full month name"
msgid "September"
msgstr "September"
-#: ../glib/gdatetime.c:242
+#: ../glib/gdatetime.c:243
msgctxt "full month name"
msgid "October"
msgstr "Oktober"
-#: ../glib/gdatetime.c:244
+#: ../glib/gdatetime.c:245
msgctxt "full month name"
msgid "November"
msgstr "November"
-#: ../glib/gdatetime.c:246
+#: ../glib/gdatetime.c:247
msgctxt "full month name"
msgid "December"
msgstr "Dezember"
-#: ../glib/gdatetime.c:261
+#: ../glib/gdatetime.c:262
msgctxt "abbreviated month name"
msgid "Jan"
msgstr "Jan"
-#: ../glib/gdatetime.c:263
+#: ../glib/gdatetime.c:264
msgctxt "abbreviated month name"
msgid "Feb"
msgstr "Feb"
-#: ../glib/gdatetime.c:265
+#: ../glib/gdatetime.c:266
msgctxt "abbreviated month name"
msgid "Mar"
msgstr "Mär"
-#: ../glib/gdatetime.c:267
+#: ../glib/gdatetime.c:268
msgctxt "abbreviated month name"
msgid "Apr"
msgstr "Apr"
-#: ../glib/gdatetime.c:269
+#: ../glib/gdatetime.c:270
msgctxt "abbreviated month name"
msgid "May"
msgstr "Mai"
-#: ../glib/gdatetime.c:271
+#: ../glib/gdatetime.c:272
msgctxt "abbreviated month name"
msgid "Jun"
msgstr "Jun"
-#: ../glib/gdatetime.c:273
+#: ../glib/gdatetime.c:274
msgctxt "abbreviated month name"
msgid "Jul"
msgstr "Jul"
-#: ../glib/gdatetime.c:275
+#: ../glib/gdatetime.c:276
msgctxt "abbreviated month name"
msgid "Aug"
msgstr "Aug"
-#: ../glib/gdatetime.c:277
+#: ../glib/gdatetime.c:278
msgctxt "abbreviated month name"
msgid "Sep"
msgstr "Sep"
-#: ../glib/gdatetime.c:279
+#: ../glib/gdatetime.c:280
msgctxt "abbreviated month name"
msgid "Oct"
msgstr "Okt"
-#: ../glib/gdatetime.c:281
+#: ../glib/gdatetime.c:282
msgctxt "abbreviated month name"
msgid "Nov"
msgstr "Nov"
-#: ../glib/gdatetime.c:283
+#: ../glib/gdatetime.c:284
msgctxt "abbreviated month name"
msgid "Dec"
msgstr "Dez"
-#: ../glib/gdatetime.c:298
+#: ../glib/gdatetime.c:299
msgctxt "full weekday name"
msgid "Monday"
msgstr "Montag"
-#: ../glib/gdatetime.c:300
+#: ../glib/gdatetime.c:301
msgctxt "full weekday name"
msgid "Tuesday"
msgstr "Dienstag"
-#: ../glib/gdatetime.c:302
+#: ../glib/gdatetime.c:303
msgctxt "full weekday name"
msgid "Wednesday"
msgstr "Mittwoch"
-#: ../glib/gdatetime.c:304
+#: ../glib/gdatetime.c:305
msgctxt "full weekday name"
msgid "Thursday"
msgstr "Donnerstag"
-#: ../glib/gdatetime.c:306
+#: ../glib/gdatetime.c:307
msgctxt "full weekday name"
msgid "Friday"
msgstr "Freitag"
-#: ../glib/gdatetime.c:308
+#: ../glib/gdatetime.c:309
msgctxt "full weekday name"
msgid "Saturday"
msgstr "Samstag"
-#: ../glib/gdatetime.c:310
+#: ../glib/gdatetime.c:311
msgctxt "full weekday name"
msgid "Sunday"
msgstr "Sonntag"
-#: ../glib/gdatetime.c:325
+#: ../glib/gdatetime.c:326
msgctxt "abbreviated weekday name"
msgid "Mon"
msgstr "Mo"
-#: ../glib/gdatetime.c:327
+#: ../glib/gdatetime.c:328
msgctxt "abbreviated weekday name"
msgid "Tue"
msgstr "Di"
-#: ../glib/gdatetime.c:329
+#: ../glib/gdatetime.c:330
msgctxt "abbreviated weekday name"
msgid "Wed"
msgstr "Mi"
-#: ../glib/gdatetime.c:331
+#: ../glib/gdatetime.c:332
msgctxt "abbreviated weekday name"
msgid "Thu"
msgstr "Do"
-#: ../glib/gdatetime.c:333
+#: ../glib/gdatetime.c:334
msgctxt "abbreviated weekday name"
msgid "Fri"
msgstr "Fr"
-#: ../glib/gdatetime.c:335
+#: ../glib/gdatetime.c:336
msgctxt "abbreviated weekday name"
msgid "Sat"
msgstr "Sa"
-#: ../glib/gdatetime.c:337
+#: ../glib/gdatetime.c:338
msgctxt "abbreviated weekday name"
msgid "Sun"
msgstr "So"
#. Translators: 'before midday' indicator
-#: ../glib/gdatetime.c:354
+#: ../glib/gdatetime.c:355
msgctxt "GDateTime"
msgid "AM"
msgstr "a. m."
#. Translators: 'after midday' indicator
-#: ../glib/gdatetime.c:357
+#: ../glib/gdatetime.c:358
msgctxt "GDateTime"
msgid "PM"
msgstr "p. m."
@@ -4534,121 +4566,121 @@ msgstr "p. m."
msgid "Error opening directory “%s”: %s"
msgstr "Fehler beim Öffnen des Ordners »%s«: %s"
-#: ../glib/gfileutils.c:706 ../glib/gfileutils.c:798
+#: ../glib/gfileutils.c:716 ../glib/gfileutils.c:808
#, c-format
msgid "Could not allocate %lu byte to read file “%s”"
msgid_plural "Could not allocate %lu bytes to read file “%s”"
msgstr[0] "%lu Byte konnte nicht zugeordnet werden, um Datei »%s« zu lesen"
msgstr[1] "%lu Bytes konnten nicht zugeordnet werden, um Datei »%s« zu lesen"
-#: ../glib/gfileutils.c:723
+#: ../glib/gfileutils.c:733
#, c-format
msgid "Error reading file “%s”: %s"
msgstr "Fehler beim Lesen der Datei »%s«: %s"
-#: ../glib/gfileutils.c:759
+#: ../glib/gfileutils.c:769
#, c-format
msgid "File “%s” is too large"
msgstr "Datei »%s« ist zu groß"
-#: ../glib/gfileutils.c:823
+#: ../glib/gfileutils.c:833
#, c-format
msgid "Failed to read from file “%s”: %s"
msgstr "Aus der Datei »%s« konnte nicht gelesen werden: %s"
-#: ../glib/gfileutils.c:871 ../glib/gfileutils.c:943
+#: ../glib/gfileutils.c:881 ../glib/gfileutils.c:953
#, c-format
msgid "Failed to open file “%s”: %s"
msgstr "Datei »%s« konnte nicht geöffnet werden: %s"
-#: ../glib/gfileutils.c:883
+#: ../glib/gfileutils.c:893
#, c-format
msgid "Failed to get attributes of file “%s”: fstat() failed: %s"
msgstr ""
"Attribute der Datei »%s« konnten nicht ermittelt werden: fstat() "
"gescheitert: %s"
-#: ../glib/gfileutils.c:913
+#: ../glib/gfileutils.c:923
#, c-format
msgid "Failed to open file “%s”: fdopen() failed: %s"
msgstr "Datei »%s« konnte nicht geöffnet werden: fdopen() gescheitert: %s"
-#: ../glib/gfileutils.c:1012
+#: ../glib/gfileutils.c:1022
#, c-format
msgid "Failed to rename file “%s” to “%s”: g_rename() failed: %s"
msgstr ""
"Datei »%s« konnte nicht in »%s« umbenannt werden: g_rename() ist "
"gescheitert: %s"
-#: ../glib/gfileutils.c:1047 ../glib/gfileutils.c:1554
+#: ../glib/gfileutils.c:1057 ../glib/gfileutils.c:1564
#, c-format
msgid "Failed to create file “%s”: %s"
msgstr "Datei »%s« konnte nicht angelegt werden: %s"
-#: ../glib/gfileutils.c:1074
+#: ../glib/gfileutils.c:1084
#, c-format
msgid "Failed to write file “%s”: write() failed: %s"
msgstr "Schreiben der Datei »%s« schlug fehl: write() ist gescheitert: %s"
-#: ../glib/gfileutils.c:1117
+#: ../glib/gfileutils.c:1127
#, c-format
msgid "Failed to write file “%s”: fsync() failed: %s"
msgstr ""
"Datei »%s« konnte nicht geschrieben werden: fsync() ist gescheitert: %s"
-#: ../glib/gfileutils.c:1241
+#: ../glib/gfileutils.c:1251
#, c-format
msgid "Existing file “%s” could not be removed: g_unlink() failed: %s"
msgstr ""
"Die vorhandene Datei »%s« konnte nicht entfernt werden: g_unlink() ist "
"gescheitert: %s"
-#: ../glib/gfileutils.c:1520
+#: ../glib/gfileutils.c:1530
#, c-format
msgid "Template “%s” invalid, should not contain a “%s”"
msgstr "Vorlage »%s« ungültig, sollte kein »%s« enthalten"
-#: ../glib/gfileutils.c:1533
+#: ../glib/gfileutils.c:1543
#, c-format
msgid "Template “%s” doesn’t contain XXXXXX"
msgstr "Vorlage »%s« enthält nicht XXXXXX"
-#: ../glib/gfileutils.c:2058
+#: ../glib/gfileutils.c:2079
#, c-format
msgid "Failed to read the symbolic link “%s”: %s"
msgstr "Die symbolische Verknüpfung »%s« konnte nicht gelesen werden: %s"
-#: ../glib/giochannel.c:1388
+#: ../glib/giochannel.c:1389
#, c-format
msgid "Could not open converter from “%s” to “%s”: %s"
msgstr "Konverter von »%s« in »%s« konnte nicht geöffnet werden: %s"
-#: ../glib/giochannel.c:1733
+#: ../glib/giochannel.c:1734
msgid "Can’t do a raw read in g_io_channel_read_line_string"
msgstr "Raw-read in g_io_channel_read_line_string nicht möglich"
-#: ../glib/giochannel.c:1780 ../glib/giochannel.c:2038
-#: ../glib/giochannel.c:2125
+#: ../glib/giochannel.c:1781 ../glib/giochannel.c:2039
+#: ../glib/giochannel.c:2126
msgid "Leftover unconverted data in read buffer"
msgstr "Nicht konvertierte Daten befinden sich noch im Lesepuffer "
-#: ../glib/giochannel.c:1861 ../glib/giochannel.c:1938
+#: ../glib/giochannel.c:1862 ../glib/giochannel.c:1939
msgid "Channel terminates in a partial character"
msgstr "Kanal endet mit einem Teilzeichen"
-#: ../glib/giochannel.c:1924
+#: ../glib/giochannel.c:1925
msgid "Can’t do a raw read in g_io_channel_read_to_end"
msgstr "Raw-read in g_io_channel_read_to_end nicht möglich"
-#: ../glib/gkeyfile.c:736
+#: ../glib/gkeyfile.c:788
msgid "Valid key file could not be found in search dirs"
msgstr "Es wurde keine gültige Schlüsselwertedatei in den Suchordnern gefunden"
-#: ../glib/gkeyfile.c:773
+#: ../glib/gkeyfile.c:825
msgid "Not a regular file"
msgstr "Keine reguläre Datei"
-#: ../glib/gkeyfile.c:1218
+#: ../glib/gkeyfile.c:1270
#, c-format
msgid ""
"Key file contains line “%s” which is not a key-value pair, group, or comment"
@@ -4656,45 +4688,45 @@ msgstr ""
"Die Schlüsselwertedatei enthält die Zeile »%s«, welche kein zulässiges "
"Schlüssel-Wert-Paar, keine Gruppe und kein Kommentar ist."
-#: ../glib/gkeyfile.c:1275
+#: ../glib/gkeyfile.c:1327
#, c-format
msgid "Invalid group name: %s"
msgstr "Ungültiger Gruppenname: %s"
-#: ../glib/gkeyfile.c:1297
+#: ../glib/gkeyfile.c:1349
msgid "Key file does not start with a group"
msgstr "Die Schlüsselwertedatei beginnt nicht mit einer Gruppe"
-#: ../glib/gkeyfile.c:1323
+#: ../glib/gkeyfile.c:1375
#, c-format
msgid "Invalid key name: %s"
msgstr "Ungültiger Schlüsselname: %s"
-#: ../glib/gkeyfile.c:1350
+#: ../glib/gkeyfile.c:1402
#, c-format
msgid "Key file contains unsupported encoding “%s”"
msgstr "Die Schlüsselwertedatei enthält die nicht unterstützte Kodierung »%s«"
-#: ../glib/gkeyfile.c:1593 ../glib/gkeyfile.c:1766 ../glib/gkeyfile.c:3146
-#: ../glib/gkeyfile.c:3209 ../glib/gkeyfile.c:3339 ../glib/gkeyfile.c:3469
-#: ../glib/gkeyfile.c:3613 ../glib/gkeyfile.c:3842 ../glib/gkeyfile.c:3909
+#: ../glib/gkeyfile.c:1645 ../glib/gkeyfile.c:1818 ../glib/gkeyfile.c:3198
+#: ../glib/gkeyfile.c:3261 ../glib/gkeyfile.c:3391 ../glib/gkeyfile.c:3521
+#: ../glib/gkeyfile.c:3665 ../glib/gkeyfile.c:3894 ../glib/gkeyfile.c:3961
#, c-format
msgid "Key file does not have group “%s”"
msgstr "Die Schlüsselwertedatei enthält nicht die Gruppe »%s«"
-#: ../glib/gkeyfile.c:1721
+#: ../glib/gkeyfile.c:1773
#, c-format
msgid "Key file does not have key “%s” in group “%s”"
msgstr "Die Schlüsselwertedatei hat keinen Schlüssel »%s« in der Gruppe »%s«"
-#: ../glib/gkeyfile.c:1883 ../glib/gkeyfile.c:1999
+#: ../glib/gkeyfile.c:1935 ../glib/gkeyfile.c:2051
#, c-format
msgid "Key file contains key “%s” with value “%s” which is not UTF-8"
msgstr ""
"Die Schlüsselwertedatei enthält den Schlüssel »%s« mit dem Wert »%s«, der "
"nicht in UTF-8 kodiert ist"
-#: ../glib/gkeyfile.c:1903 ../glib/gkeyfile.c:2019 ../glib/gkeyfile.c:2388
+#: ../glib/gkeyfile.c:1955 ../glib/gkeyfile.c:2071 ../glib/gkeyfile.c:2440
#, c-format
msgid ""
"Key file contains key “%s” which has a value that cannot be interpreted."
@@ -4702,7 +4734,7 @@ msgstr ""
"Die Schlüsselwertedatei enthält den Schlüssel »%s« mit einem Wert, der nicht "
"interpretiert werden konnte."
-#: ../glib/gkeyfile.c:2606 ../glib/gkeyfile.c:2975
+#: ../glib/gkeyfile.c:2658 ../glib/gkeyfile.c:3027
#, c-format
msgid ""
"Key file contains key “%s” in group “%s” which has a value that cannot be "
@@ -4711,39 +4743,39 @@ msgstr ""
"Die Schlüsselwertedatei enthält den Schlüssel »%s« in der Gruppe »%s« mit "
"einem Wert, der nicht interpretiert werden konnte."
-#: ../glib/gkeyfile.c:2684 ../glib/gkeyfile.c:2761
+#: ../glib/gkeyfile.c:2736 ../glib/gkeyfile.c:2813
#, c-format
msgid "Key “%s” in group “%s” has value “%s” where %s was expected"
msgstr ""
"Der Schlüssel »%s« in der Gruppe »%s« enthält den Wert »%s«, obwohl %s "
"erwartet wurde"
-#: ../glib/gkeyfile.c:4149
+#: ../glib/gkeyfile.c:4201
msgid "Key file contains escape character at end of line"
msgstr "Die Schlüsselwertedatei enthält ein Escape-Zeichen am Zeilenende"
# CHECK
-#: ../glib/gkeyfile.c:4171
+#: ../glib/gkeyfile.c:4223
#, c-format
msgid "Key file contains invalid escape sequence “%s”"
msgstr "Die Schlüsselwertedatei enthält das ungültige Escape-Zeichen »%s«"
-#: ../glib/gkeyfile.c:4315
+#: ../glib/gkeyfile.c:4367
#, c-format
msgid "Value “%s” cannot be interpreted as a number."
msgstr "Der Wert »%s« konnte nicht als Zahl interpretiert werden."
-#: ../glib/gkeyfile.c:4329
+#: ../glib/gkeyfile.c:4381
#, c-format
msgid "Integer value “%s” out of range"
-msgstr "Ganzzahliger Wert »%s« ist außerhalb des Wertebereiches."
+msgstr "Ganzzahliger Wert »%s« ist außerhalb des Wertebereiches"
-#: ../glib/gkeyfile.c:4362
+#: ../glib/gkeyfile.c:4414
#, c-format
msgid "Value “%s” cannot be interpreted as a float number."
msgstr "Der Wert »%s« konnte nicht als Gleitkommazahl interpretiert werden."
-#: ../glib/gkeyfile.c:4401
+#: ../glib/gkeyfile.c:4453
#, c-format
msgid "Value “%s” cannot be interpreted as a boolean."
msgstr ""
@@ -5445,78 +5477,78 @@ msgstr ""
msgid "Text was empty (or contained only whitespace)"
msgstr "Text war leer (oder enthielt nur Leerraum)"
-#: ../glib/gspawn.c:250
+#: ../glib/gspawn.c:253
#, c-format
msgid "Failed to read data from child process (%s)"
msgstr "Daten vom Kindprozess konnten nicht gelesen werden (%s)"
-#: ../glib/gspawn.c:394
+#: ../glib/gspawn.c:401
#, c-format
msgid "Unexpected error in select() reading data from a child process (%s)"
msgstr ""
"Unerwarteter Fehler in select() beim Lesen von Daten eines Kindprozesses (%s)"
-#: ../glib/gspawn.c:479
+#: ../glib/gspawn.c:486
#, c-format
msgid "Unexpected error in waitpid() (%s)"
msgstr "Unerwarteter Fehler in waitpid() (%s)"
-#: ../glib/gspawn.c:886 ../glib/gspawn-win32.c:1231
+#: ../glib/gspawn.c:897 ../glib/gspawn-win32.c:1231
#, c-format
msgid "Child process exited with code %ld"
msgstr "Der Kindprozess wurde mit Status %ld beendet"
-#: ../glib/gspawn.c:894
+#: ../glib/gspawn.c:905
#, c-format
msgid "Child process killed by signal %ld"
msgstr "Der Kindprozess wurde mit Signal %ld beendet"
-#: ../glib/gspawn.c:901
+#: ../glib/gspawn.c:912
#, c-format
msgid "Child process stopped by signal %ld"
msgstr "Der Kindprozess wurde mit Signal %ld beendet"
-#: ../glib/gspawn.c:908
+#: ../glib/gspawn.c:919
#, c-format
msgid "Child process exited abnormally"
msgstr "Der Kindprozess wurde gewaltsam beendet"
-#: ../glib/gspawn.c:1313 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
+#: ../glib/gspawn.c:1324 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
#, c-format
msgid "Failed to read from child pipe (%s)"
msgstr "Lesen aus Weiterleitung zum Kind (%s) gescheitert"
-#: ../glib/gspawn.c:1383
+#: ../glib/gspawn.c:1394
#, c-format
msgid "Failed to fork (%s)"
msgstr "Abspalten gescheitert (%s)"
-#: ../glib/gspawn.c:1532 ../glib/gspawn-win32.c:368
+#: ../glib/gspawn.c:1543 ../glib/gspawn-win32.c:368
#, c-format
msgid "Failed to change to directory “%s” (%s)"
msgstr "In Ordner »%s« (%s) konnte nicht gewechselt werden"
-#: ../glib/gspawn.c:1542
+#: ../glib/gspawn.c:1553
#, c-format
msgid "Failed to execute child process “%s” (%s)"
msgstr "Kindprozess »%s« konnte nicht ausgeführt werden (%s)"
-#: ../glib/gspawn.c:1552
+#: ../glib/gspawn.c:1563
#, c-format
msgid "Failed to redirect output or input of child process (%s)"
msgstr "Umleiten der Ausgabe oder Eingabe des Kindprozesses (%s) gescheitert"
-#: ../glib/gspawn.c:1561
+#: ../glib/gspawn.c:1572
#, c-format
msgid "Failed to fork child process (%s)"
msgstr "Abspalten des Kindprozesses gescheitert (%s)"
-#: ../glib/gspawn.c:1569
+#: ../glib/gspawn.c:1580
#, c-format
msgid "Unknown error executing child process “%s”"
msgstr "Unbekannter Fehler beim Ausführen des Kindprozesses »%s«"
-#: ../glib/gspawn.c:1593
+#: ../glib/gspawn.c:1604
#, c-format
msgid "Failed to read enough data from child pid pipe (%s)"
msgstr ""
@@ -5608,87 +5640,178 @@ msgstr "Ungültige Folge in Umwandlungseingabe"
msgid "Character out of range for UTF-16"
msgstr "Zeichen außerhalb des Bereiches für UTF-16"
-#: ../glib/gutils.c:2209 ../glib/gutils.c:2236 ../glib/gutils.c:2342
+#: ../glib/gutils.c:2227
#, c-format
-msgid "%u byte"
-msgid_plural "%u bytes"
-msgstr[0] "%u Byte"
-msgstr[1] "%u Bytes"
+msgid "%.1f kB"
+msgstr "%.1f kB"
+
+#: ../glib/gutils.c:2228 ../glib/gutils.c:2434
+#, c-format
+msgid "%.1f MB"
+msgstr "%.1f MB"
+
+#: ../glib/gutils.c:2229 ../glib/gutils.c:2439
+#, c-format
+msgid "%.1f GB"
+msgstr "%.1f GB"
-#: ../glib/gutils.c:2215
+#: ../glib/gutils.c:2230 ../glib/gutils.c:2444
+#, c-format
+msgid "%.1f TB"
+msgstr "%.1f TB"
+
+#: ../glib/gutils.c:2231 ../glib/gutils.c:2449
+#, c-format
+msgid "%.1f PB"
+msgstr "%.1f PB"
+
+#: ../glib/gutils.c:2232 ../glib/gutils.c:2454
+#, c-format
+msgid "%.1f EB"
+msgstr "%.1f EB"
+
+#: ../glib/gutils.c:2235
#, c-format
msgid "%.1f KiB"
msgstr "%.1f kiB"
-#: ../glib/gutils.c:2217
+#: ../glib/gutils.c:2236
#, c-format
msgid "%.1f MiB"
msgstr "%.1f MiB"
-#: ../glib/gutils.c:2220
+#: ../glib/gutils.c:2237
#, c-format
msgid "%.1f GiB"
msgstr "%.1f GiB"
-#: ../glib/gutils.c:2223
+#: ../glib/gutils.c:2238
#, c-format
msgid "%.1f TiB"
msgstr "%.1f TiB"
-#: ../glib/gutils.c:2226
+#: ../glib/gutils.c:2239
#, c-format
msgid "%.1f PiB"
msgstr "%.1f PiB"
-#: ../glib/gutils.c:2229
+#: ../glib/gutils.c:2240
#, c-format
msgid "%.1f EiB"
msgstr "%.1f EiB"
-#: ../glib/gutils.c:2242
+#: ../glib/gutils.c:2243
#, c-format
-msgid "%.1f kB"
-msgstr "%.1f kB"
+#| msgid "%.1f kB"
+msgid "%.1f kb"
+msgstr "%.1f kbit"
-#: ../glib/gutils.c:2245 ../glib/gutils.c:2360
+#: ../glib/gutils.c:2244
#, c-format
-msgid "%.1f MB"
-msgstr "%.1f MB"
+#| msgid "%.1f MB"
+msgid "%.1f Mb"
+msgstr "%.1f Mbit"
-#: ../glib/gutils.c:2248 ../glib/gutils.c:2365
+#: ../glib/gutils.c:2245
#, c-format
-msgid "%.1f GB"
-msgstr "%.1f GB"
+#| msgid "%.1f GB"
+msgid "%.1f Gb"
+msgstr "%.1f Gbit"
-#: ../glib/gutils.c:2250 ../glib/gutils.c:2370
+#: ../glib/gutils.c:2246
#, c-format
-msgid "%.1f TB"
-msgstr "%.1f TB"
+#| msgid "%.1f TB"
+msgid "%.1f Tb"
+msgstr "%.1f Tbit"
-#: ../glib/gutils.c:2253 ../glib/gutils.c:2375
+#: ../glib/gutils.c:2247
#, c-format
-msgid "%.1f PB"
-msgstr "%.1f PB"
+#| msgid "%.1f PB"
+msgid "%.1f Pb"
+msgstr "%.1f Pbit"
-#: ../glib/gutils.c:2256 ../glib/gutils.c:2380
+#: ../glib/gutils.c:2248
#, c-format
-msgid "%.1f EB"
-msgstr "%.1f EB"
+#| msgid "%.1f EB"
+msgid "%.1f Eb"
+msgstr "%.1f Ebit"
+
+#: ../glib/gutils.c:2251
+#, c-format
+#| msgid "%.1f KiB"
+msgid "%.1f Kib"
+msgstr "%.1f Kibit"
+
+#: ../glib/gutils.c:2252
+#, c-format
+#| msgid "%.1f MiB"
+msgid "%.1f Mib"
+msgstr "%.1f Mibit"
+
+#: ../glib/gutils.c:2253
+#, c-format
+#| msgid "%.1f GiB"
+msgid "%.1f Gib"
+msgstr "%.1f Gibit"
+
+#: ../glib/gutils.c:2254
+#, c-format
+#| msgid "%.1f TiB"
+msgid "%.1f Tib"
+msgstr "%.1f Tibit"
+
+#: ../glib/gutils.c:2255
+#, c-format
+#| msgid "%.1f PiB"
+msgid "%.1f Pib"
+msgstr "%.1f Pibit"
+
+#: ../glib/gutils.c:2256
+#, c-format
+#| msgid "%.1f EiB"
+msgid "%.1f Eib"
+msgstr "%.1f Eibit"
+
+#: ../glib/gutils.c:2290 ../glib/gutils.c:2416
+#, c-format
+msgid "%u byte"
+msgid_plural "%u bytes"
+msgstr[0] "%u Byte"
+msgstr[1] "%u Bytes"
+
+#: ../glib/gutils.c:2294
+#, c-format
+#| msgid "%u byte"
+#| msgid_plural "%u bytes"
+msgid "%u bit"
+msgid_plural "%u bits"
+msgstr[0] "%u bit"
+msgstr[1] "%u bits"
#. Translators: the %s in "%s bytes" will always be replaced by a number.
-#: ../glib/gutils.c:2293
+#: ../glib/gutils.c:2361
#, c-format
msgid "%s byte"
msgid_plural "%s bytes"
msgstr[0] "%s Byte"
msgstr[1] "%s Bytes"
+#. Translators: the %s in "%s bits" will always be replaced by a number.
+#: ../glib/gutils.c:2366
+#, c-format
+#| msgid "%s byte"
+#| msgid_plural "%s bytes"
+msgid "%s bit"
+msgid_plural "%s bits"
+msgstr[0] "%s bit"
+msgstr[1] "%s bits"
+
#. Translators: this is from the deprecated function g_format_size_for_display() which uses 'KB' to
#. * mean 1024 bytes. I am aware that 'KB' is not correct, but it has been preserved for reasons of
#. * compatibility. Users will not see this string unless a program is using this deprecated function.
#. * Please translate as literally as possible.
#.
-#: ../glib/gutils.c:2355
+#: ../glib/gutils.c:2429
#, c-format
msgid "%.1f KB"
msgstr "%.1f KB"
diff --git a/po/es.po b/po/es.po
index 9f1c3b316..deb11bac4 100644
--- a/po/es.po
+++ b/po/es.po
@@ -8,15 +8,15 @@
#
#
# Jorge González <jorgegonz@svn.gnome.org>, 2007, 2008, 2009, 2010, 2011, 2012.
-# Daniel Mustieles <daniel.mustieles@gmail.com>, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017.
+# Daniel Mustieles <daniel.mustieles@gmail.com>, 2010-2017, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: glib.master\n"
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=glib&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2017-08-07 19:40+0000\n"
-"PO-Revision-Date: 2017-08-22 13:33+0200\n"
+"POT-Creation-Date: 2017-11-02 13:40+0000\n"
+"PO-Revision-Date: 2017-11-03 13:53+0100\n"
"Last-Translator: Daniel Mustieles <daniel.mustieles@gmail.com>\n"
"Language-Team: es <gnome-es-list@gnome.org>\n"
"Language: es\n"
@@ -295,8 +295,8 @@ msgid "Truncate not supported on base stream"
msgstr "No se soporta el truncado en el flujo base"
#: ../gio/gcancellable.c:317 ../gio/gdbusconnection.c:1849
-#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:870
-#: ../gio/gsimpleasyncresult.c:896
+#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:871
+#: ../gio/gsimpleasyncresult.c:897
#, c-format
msgid "Operation was cancelled"
msgstr "Se canceló la operación"
@@ -315,23 +315,23 @@ msgstr "No hay suficiente espacio en el destino"
#: ../gio/gcharsetconverter.c:342 ../gio/gdatainputstream.c:848
#: ../gio/gdatainputstream.c:1257 ../glib/gconvert.c:438
-#: ../glib/gconvert.c:845 ../glib/giochannel.c:1556 ../glib/giochannel.c:1598
-#: ../glib/giochannel.c:2442 ../glib/gutf8.c:866 ../glib/gutf8.c:1319
+#: ../glib/gconvert.c:845 ../glib/giochannel.c:1557 ../glib/giochannel.c:1599
+#: ../glib/giochannel.c:2443 ../glib/gutf8.c:866 ../glib/gutf8.c:1319
msgid "Invalid byte sequence in conversion input"
msgstr "Hay una secuencia de bytes no válida en la entrada de conversión"
#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:446
-#: ../glib/gconvert.c:770 ../glib/giochannel.c:1563 ../glib/giochannel.c:2454
+#: ../glib/gconvert.c:770 ../glib/giochannel.c:1564 ../glib/giochannel.c:2455
#, c-format
msgid "Error during conversion: %s"
msgstr "Falló durante la conversión: %s"
-#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1096
+#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1101
msgid "Cancellable initialization not supported"
msgstr "La inicialización cancelable no eestá soportada"
#: ../gio/gcharsetconverter.c:456 ../glib/gconvert.c:321
-#: ../glib/giochannel.c:1384
+#: ../glib/giochannel.c:1385
#, c-format
msgid "Conversion from character set “%s” to “%s” is not supported"
msgstr ""
@@ -572,7 +572,7 @@ msgstr ""
"Se agotaron todos los mecanismos de autenticación (intentados: %s) "
"(disponibles: %s)"
-#: ../gio/gdbusauth.c:1174
+#: ../gio/gdbusauth.c:1171
msgid "Cancelled via GDBusAuthObserver::authorize-authenticated-peer"
msgstr "Cancelado a través de GDBusAuthObserver::authorize-authenticated-peer"
@@ -599,14 +599,14 @@ msgstr "Error al crear la carpeta %s: %s"
msgid "Error opening keyring “%s” for reading: "
msgstr "Error al abrir el depósito de claves «%s» para su lectura: "
-#: ../gio/gdbusauthmechanismsha1.c:403 ../gio/gdbusauthmechanismsha1.c:721
+#: ../gio/gdbusauthmechanismsha1.c:402 ../gio/gdbusauthmechanismsha1.c:720
#, c-format
msgid "Line %d of the keyring at “%s” with content “%s” is malformed"
msgstr ""
"La línea %d del depósito de claves en «%s» con contenido «%s» está mal "
"formada"
-#: ../gio/gdbusauthmechanismsha1.c:417 ../gio/gdbusauthmechanismsha1.c:735
+#: ../gio/gdbusauthmechanismsha1.c:416 ../gio/gdbusauthmechanismsha1.c:734
#, c-format
msgid ""
"First token of line %d of the keyring at “%s” with content “%s” is malformed"
@@ -614,7 +614,7 @@ msgstr ""
"El primer token de la línea %d del depósito de claves en «%s» con contenido "
"«%s» está mal formado"
-#: ../gio/gdbusauthmechanismsha1.c:432 ../gio/gdbusauthmechanismsha1.c:749
+#: ../gio/gdbusauthmechanismsha1.c:430 ../gio/gdbusauthmechanismsha1.c:748
#, c-format
msgid ""
"Second token of line %d of the keyring at “%s” with content “%s” is malformed"
@@ -622,7 +622,7 @@ msgstr ""
"El segundo token de la línea %d del depósito de claves en «%s» con contenido "
"«%s» está mal formado"
-#: ../gio/gdbusauthmechanismsha1.c:456
+#: ../gio/gdbusauthmechanismsha1.c:454
#, c-format
msgid "Didn’t find cookie with id %d in the keyring at “%s”"
msgstr "No se encontró la «cookie» con ID %d en el depósito de claves en «%s»"
@@ -632,27 +632,27 @@ msgstr "No se encontró la «cookie» con ID %d en el depósito de claves en «%
msgid "Error deleting stale lock file “%s”: %s"
msgstr "Error al eliminar el archivo de bloqueo antiguo «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:569
+#: ../gio/gdbusauthmechanismsha1.c:568
#, c-format
msgid "Error creating lock file “%s”: %s"
msgstr "Error al crear el archivo de bloqueo «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:600
+#: ../gio/gdbusauthmechanismsha1.c:599
#, c-format
msgid "Error closing (unlinked) lock file “%s”: %s"
msgstr "Error al cerrar (desenlazar) el archivo de bloqueo «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:611
+#: ../gio/gdbusauthmechanismsha1.c:610
#, c-format
msgid "Error unlinking lock file “%s”: %s"
msgstr "Error al desenlazar el archivo de bloqueo «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:688
+#: ../gio/gdbusauthmechanismsha1.c:687
#, c-format
msgid "Error opening keyring “%s” for writing: "
msgstr "Error al abrir el depósito de claves «%s» para su escritura:"
-#: ../gio/gdbusauthmechanismsha1.c:885
+#: ../gio/gdbusauthmechanismsha1.c:883
#, c-format
msgid "(Additionally, releasing the lock for “%s” also failed: %s) "
msgstr ""
@@ -824,17 +824,17 @@ msgstr ""
"en el byte desplazado %d (la longitud de la cadena es %d). La cadena UTF-8 "
"válida hasta ese punto era «%s»."
-#: ../gio/gdbusmessage.c:1589
+#: ../gio/gdbusmessage.c:1593
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus object path"
msgstr "El valor analizado «%s» no es un objeto de ruta D-Bus válido"
-#: ../gio/gdbusmessage.c:1611
+#: ../gio/gdbusmessage.c:1615
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature"
msgstr "El valor analizado «%s» no es una firma de D-Bus válida"
-#: ../gio/gdbusmessage.c:1658
+#: ../gio/gdbusmessage.c:1662
#, c-format
msgid ""
"Encountered array of length %u byte. Maximum length is 2<<26 bytes (64 MiB)."
@@ -847,7 +847,7 @@ msgstr[1] ""
"Se encontró un array de longitud %u bytes. La longitud máxima es 2<<26 bytes "
"(64 MiB)."
-#: ../gio/gdbusmessage.c:1678
+#: ../gio/gdbusmessage.c:1682
#, c-format
msgid ""
"Encountered array of type “a%c”, expected to have a length a multiple of %u "
@@ -856,13 +856,13 @@ msgstr ""
"Encontrado un vector de tipo «a%c», esperando que su longitud fuese múltiplo "
"de %u bytes, pero su longitud es de %u"
-#: ../gio/gdbusmessage.c:1845
+#: ../gio/gdbusmessage.c:1849
#, c-format
msgid "Parsed value “%s” for variant is not a valid D-Bus signature"
msgstr ""
"El valor analizado «%s» para la variante no es una firma de D-Bus válida"
-#: ../gio/gdbusmessage.c:1869
+#: ../gio/gdbusmessage.c:1873
#, c-format
msgid ""
"Error deserializing GVariant with type string “%s” from the D-Bus wire format"
@@ -870,7 +870,7 @@ msgstr ""
"Error al deserializar GVariant con el tipo de cadena «%s» al formato de "
"mensaje de D-Bus"
-#: ../gio/gdbusmessage.c:2053
+#: ../gio/gdbusmessage.c:2055
#, c-format
msgid ""
"Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value "
@@ -879,27 +879,27 @@ msgstr ""
"Valor endian no válido. Se esperaba 0x6c («l») o 0x42 («B»)» pero se obtuvo "
"el valor 0x%02x"
-#: ../gio/gdbusmessage.c:2066
+#: ../gio/gdbusmessage.c:2068
#, c-format
msgid "Invalid major protocol version. Expected 1 but found %d"
msgstr ""
"La versión principal del protocolo no es válida. Se esperaba 1 pero se "
"encontró %d."
-#: ../gio/gdbusmessage.c:2122
+#: ../gio/gdbusmessage.c:2124
#, c-format
msgid "Signature header with signature “%s” found but message body is empty"
msgstr ""
"Se encontró la cabecera de firma con firma «%s» pero el cuerpo del mensaje "
"está vacío"
-#: ../gio/gdbusmessage.c:2136
+#: ../gio/gdbusmessage.c:2138
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature (for body)"
msgstr ""
"El valor analizado «%s» no es una firma de D-Bus válida (para el cuerpo)"
-#: ../gio/gdbusmessage.c:2166
+#: ../gio/gdbusmessage.c:2168
#, c-format
msgid "No signature header in message but the message body is %u byte"
msgid_plural "No signature header in message but the message body is %u bytes"
@@ -910,11 +910,11 @@ msgstr[1] ""
"No existe la cabecera de firma en el mensaje pero el cuerpo del mensaje "
"tiene %u bytes"
-#: ../gio/gdbusmessage.c:2176
+#: ../gio/gdbusmessage.c:2178
msgid "Cannot deserialize message: "
msgstr "No se puede deserializar el mensaje: "
-#: ../gio/gdbusmessage.c:2517
+#: ../gio/gdbusmessage.c:2519
#, c-format
msgid ""
"Error serializing GVariant with type string “%s” to the D-Bus wire format"
@@ -922,7 +922,7 @@ msgstr ""
"Error al serializar GVariant con el tipo de cadena «%s» al formato de "
"mensaje de D-Bus"
-#: ../gio/gdbusmessage.c:2654
+#: ../gio/gdbusmessage.c:2656
#, c-format
msgid ""
"Message has %d file descriptors but the header field indicates %d file "
@@ -931,17 +931,17 @@ msgstr ""
"El mensaje tiene %d descriptores de archivo pero el campo de cabecera indica "
"%d descriptores de archivo"
-#: ../gio/gdbusmessage.c:2662
+#: ../gio/gdbusmessage.c:2664
msgid "Cannot serialize message: "
msgstr "No se puede serializar el mensaje: "
-#: ../gio/gdbusmessage.c:2706
+#: ../gio/gdbusmessage.c:2708
#, c-format
msgid "Message body has signature “%s” but there is no signature header"
msgstr ""
"El cuerpo del mensaje tiene la firma «%s» pero no existe la cabecera de firma"
-#: ../gio/gdbusmessage.c:2716
+#: ../gio/gdbusmessage.c:2718
#, c-format
msgid ""
"Message body has type signature “%s” but signature in the header field is "
@@ -950,19 +950,19 @@ msgstr ""
"El cuerpo del mensaje tiene un tipo de firma «%s» pero la firma en el campo "
"de cabecera es «%s»"
-#: ../gio/gdbusmessage.c:2732
+#: ../gio/gdbusmessage.c:2734
#, c-format
msgid "Message body is empty but signature in the header field is “(%s)”"
msgstr ""
"El cuerpo del mensaje está vacío pero la firma en el campo de cabecera es "
"«(%s)»"
-#: ../gio/gdbusmessage.c:3285
+#: ../gio/gdbusmessage.c:3287
#, c-format
msgid "Error return with body of type “%s”"
msgstr "Error al devolver el cuerpo de tipo «%s»"
-#: ../gio/gdbusmessage.c:3293
+#: ../gio/gdbusmessage.c:3295
msgid "Error return with empty body"
msgstr "Error al devolver un cuepro vacío"
@@ -1042,54 +1042,54 @@ msgstr ""
"\n"
"Use «%s COMANDO --help» para obtener ayuda de cada comando.\n"
-#: ../gio/gdbus-tool.c:165 ../gio/gdbus-tool.c:227 ../gio/gdbus-tool.c:299
-#: ../gio/gdbus-tool.c:323 ../gio/gdbus-tool.c:725 ../gio/gdbus-tool.c:1068
-#: ../gio/gdbus-tool.c:1510
+#: ../gio/gdbus-tool.c:167 ../gio/gdbus-tool.c:234 ../gio/gdbus-tool.c:306
+#: ../gio/gdbus-tool.c:330 ../gio/gdbus-tool.c:811 ../gio/gdbus-tool.c:1150
+#: ../gio/gdbus-tool.c:1592
#, c-format
msgid "Error: %s\n"
msgstr "Error: %s\n"
-#: ../gio/gdbus-tool.c:176 ../gio/gdbus-tool.c:240 ../gio/gdbus-tool.c:1526
+#: ../gio/gdbus-tool.c:178 ../gio/gdbus-tool.c:247 ../gio/gdbus-tool.c:1608
#, c-format
msgid "Error parsing introspection XML: %s\n"
msgstr "Error al analizar la introspección XML: %s\n"
-#: ../gio/gdbus-tool.c:209
+#: ../gio/gdbus-tool.c:216
#, c-format
msgid "Error: %s is not a valid name\n"
msgstr "Error: %s no es un nombre válido\n"
-#: ../gio/gdbus-tool.c:357
+#: ../gio/gdbus-tool.c:364
msgid "Connect to the system bus"
msgstr "Conectar con el bus del sistema"
-#: ../gio/gdbus-tool.c:358
+#: ../gio/gdbus-tool.c:365
msgid "Connect to the session bus"
msgstr "Conectar con el bus de sesión"
-#: ../gio/gdbus-tool.c:359
+#: ../gio/gdbus-tool.c:366
msgid "Connect to given D-Bus address"
msgstr "Conectar con la dirección de D-Bus proporcionada"
-#: ../gio/gdbus-tool.c:369
+#: ../gio/gdbus-tool.c:376
msgid "Connection Endpoint Options:"
msgstr "Opciones de conexión del extremo:"
-#: ../gio/gdbus-tool.c:370
+#: ../gio/gdbus-tool.c:377
msgid "Options specifying the connection endpoint"
msgstr "Opciones para especificar la conexión del extremo:"
-#: ../gio/gdbus-tool.c:392
+#: ../gio/gdbus-tool.c:399
#, c-format
msgid "No connection endpoint specified"
msgstr "No se especificó ningún punto de conexión extremo"
-#: ../gio/gdbus-tool.c:402
+#: ../gio/gdbus-tool.c:409
#, c-format
msgid "Multiple connection endpoints specified"
msgstr "Se especificaron varios puntos de conexión extremos"
-#: ../gio/gdbus-tool.c:472
+#: ../gio/gdbus-tool.c:479
#, c-format
msgid ""
"Warning: According to introspection data, interface “%s” does not exist\n"
@@ -1097,7 +1097,7 @@ msgstr ""
"Advertencia: según la introspección de los datos, la interfaz «%s» no "
"existe\n"
-#: ../gio/gdbus-tool.c:481
+#: ../gio/gdbus-tool.c:488
#, c-format
msgid ""
"Warning: According to introspection data, method “%s” does not exist on "
@@ -1106,166 +1106,170 @@ msgstr ""
"Advertencia: según la introspección de los datos, el método «%s» no existe "
"en la interfaz «%s»\n"
-#: ../gio/gdbus-tool.c:543
+#: ../gio/gdbus-tool.c:550
msgid "Optional destination for signal (unique name)"
msgstr "Destino opcional para la señal (nombre único)"
-#: ../gio/gdbus-tool.c:544
+#: ../gio/gdbus-tool.c:551
msgid "Object path to emit signal on"
msgstr "Ruta del objeto sobre el que emitir la señal"
-#: ../gio/gdbus-tool.c:545
+#: ../gio/gdbus-tool.c:552
msgid "Signal and interface name"
msgstr "Nombres de la interfaz y señal"
-#: ../gio/gdbus-tool.c:579
+#: ../gio/gdbus-tool.c:587
msgid "Emit a signal."
msgstr "Emitir una señal."
-#: ../gio/gdbus-tool.c:613 ../gio/gdbus-tool.c:858 ../gio/gdbus-tool.c:1616
-#: ../gio/gdbus-tool.c:1851 ../gio/gdbus-tool.c:2067
+#: ../gio/gdbus-tool.c:642 ../gio/gdbus-tool.c:944 ../gio/gdbus-tool.c:1698
+#: ../gio/gdbus-tool.c:1931 ../gio/gdbus-tool.c:2152
#, c-format
msgid "Error connecting: %s\n"
msgstr "Error al conectar: %s\n"
-#: ../gio/gdbus-tool.c:625
+#: ../gio/gdbus-tool.c:659 ../gio/gdbus-tool.c:961 ../gio/gdbus-tool.c:1715
+#: ../gio/gdbus-tool.c:1956
#, c-format
-msgid "Error: object path not specified.\n"
-msgstr "Error: no se especificó la ruta del objeto.\n"
+msgid "Error: Destination is not specified\n"
+msgstr "Error: el destino no está especificado\n"
+
+#: ../gio/gdbus-tool.c:670
+#, c-format
+msgid "Error: %s is not a valid unique bus name.\n"
+msgstr "Error: %s no es un nombre de bus único válido.\n"
-#: ../gio/gdbus-tool.c:630 ../gio/gdbus-tool.c:925 ../gio/gdbus-tool.c:1681
-#: ../gio/gdbus-tool.c:1917
+#: ../gio/gdbus-tool.c:685 ../gio/gdbus-tool.c:987 ../gio/gdbus-tool.c:1741
+#, c-format
+msgid "Error: Object path is not specified\n"
+msgstr "Error: no se especificó la ruta del objeto\n"
+
+#: ../gio/gdbus-tool.c:705 ../gio/gdbus-tool.c:1007 ../gio/gdbus-tool.c:1761
+#: ../gio/gdbus-tool.c:2002
#, c-format
msgid "Error: %s is not a valid object path\n"
msgstr "Error: %s no es una ruta de objeto válida\n"
-#: ../gio/gdbus-tool.c:636
+#: ../gio/gdbus-tool.c:720
#, c-format
-msgid "Error: signal not specified.\n"
-msgstr "Error: no se especificó la señal.\n"
+#| msgid "Error: Method name is not specified\n"
+msgid "Error: Signal name is not specified\n"
+msgstr "Error: no se especificó el nombre de la señal\n"
-#: ../gio/gdbus-tool.c:643
+#: ../gio/gdbus-tool.c:731
#, c-format
-msgid "Error: signal must be the fully-qualified name.\n"
-msgstr "Error: la señal debe ser el nombre completamente cualificado.\n"
+#| msgid "Error: Method name “%s” is invalid\n"
+msgid "Error: Signal name “%s” is invalid\n"
+msgstr "Error: el nombre de la señal «%s» no es válido\n"
-#: ../gio/gdbus-tool.c:651
+#: ../gio/gdbus-tool.c:743
#, c-format
msgid "Error: %s is not a valid interface name\n"
msgstr "Error: %s no es un nombre de interfaz válida\n"
-#: ../gio/gdbus-tool.c:657
+#: ../gio/gdbus-tool.c:749
#, c-format
msgid "Error: %s is not a valid member name\n"
msgstr "Error: %s no es un nombre de miembro válido\n"
-#: ../gio/gdbus-tool.c:663
-#, c-format
-msgid "Error: %s is not a valid unique bus name.\n"
-msgstr "Error: %s no es un nombre de bus único válido.\n"
-
#. Use the original non-"parse-me-harder" error
-#: ../gio/gdbus-tool.c:700 ../gio/gdbus-tool.c:1037
+#: ../gio/gdbus-tool.c:786 ../gio/gdbus-tool.c:1119
#, c-format
msgid "Error parsing parameter %d: %s\n"
msgstr "Error al analizar el parámetro %d: %s\n"
-#: ../gio/gdbus-tool.c:732
+#: ../gio/gdbus-tool.c:818
#, c-format
msgid "Error flushing connection: %s\n"
msgstr "Error al limpiar la conexión: %s\n"
-#: ../gio/gdbus-tool.c:759
+#: ../gio/gdbus-tool.c:845
msgid "Destination name to invoke method on"
msgstr "Nombre del detino sobre el que invocar elmétodo"
-#: ../gio/gdbus-tool.c:760
+#: ../gio/gdbus-tool.c:846
msgid "Object path to invoke method on"
msgstr "Ruta del objeto sobre la que invocar el método"
-#: ../gio/gdbus-tool.c:761
+#: ../gio/gdbus-tool.c:847
msgid "Method and interface name"
msgstr "Nombre de la interfaz y método"
-#: ../gio/gdbus-tool.c:762
+#: ../gio/gdbus-tool.c:848
msgid "Timeout in seconds"
msgstr "Tiempo de expiración en segundos"
-#: ../gio/gdbus-tool.c:803
+#: ../gio/gdbus-tool.c:889
msgid "Invoke a method on a remote object."
msgstr "Invocar un método en un objeto remoto."
-#: ../gio/gdbus-tool.c:878 ../gio/gdbus-tool.c:1635 ../gio/gdbus-tool.c:1870
-#, c-format
-msgid "Error: Destination is not specified\n"
-msgstr "Error: el destino no está especificado\n"
-
-#: ../gio/gdbus-tool.c:890 ../gio/gdbus-tool.c:1652 ../gio/gdbus-tool.c:1882
+#: ../gio/gdbus-tool.c:972 ../gio/gdbus-tool.c:1732 ../gio/gdbus-tool.c:1967
#, c-format
msgid "Error: %s is not a valid bus name\n"
msgstr "Error: %s no es un nombre de bus válido\n"
-#: ../gio/gdbus-tool.c:905 ../gio/gdbus-tool.c:1661
-#, c-format
-msgid "Error: Object path is not specified\n"
-msgstr "Error: no se especificó la ruta del objeto\n"
-
-#: ../gio/gdbus-tool.c:940
+#: ../gio/gdbus-tool.c:1022
#, c-format
msgid "Error: Method name is not specified\n"
msgstr "Error: no se especificó el nombre del método\n"
-#: ../gio/gdbus-tool.c:951
+#: ../gio/gdbus-tool.c:1033
#, c-format
msgid "Error: Method name “%s” is invalid\n"
msgstr "Error: el nombre del método «%s» no es válido\n"
-#: ../gio/gdbus-tool.c:1029
+#: ../gio/gdbus-tool.c:1111
#, c-format
msgid "Error parsing parameter %d of type “%s”: %s\n"
msgstr "Error al analizar el parámetro %d del tipo «%s»: %s\n"
-#: ../gio/gdbus-tool.c:1473
+#: ../gio/gdbus-tool.c:1555
msgid "Destination name to introspect"
msgstr "Nombre de destino que introspeccionar"
-#: ../gio/gdbus-tool.c:1474
+#: ../gio/gdbus-tool.c:1556
msgid "Object path to introspect"
msgstr "Ruta del objeto que introspeccionar"
-#: ../gio/gdbus-tool.c:1475
+#: ../gio/gdbus-tool.c:1557
msgid "Print XML"
msgstr "Imprimir XML"
-#: ../gio/gdbus-tool.c:1476
+#: ../gio/gdbus-tool.c:1558
msgid "Introspect children"
msgstr "Introspeccionar hijo"
-#: ../gio/gdbus-tool.c:1477
+#: ../gio/gdbus-tool.c:1559
msgid "Only print properties"
msgstr "Solo mostrar propiedades"
-#: ../gio/gdbus-tool.c:1568
+#: ../gio/gdbus-tool.c:1650
msgid "Introspect a remote object."
msgstr "Introspeccionar un objeto remoto."
-#: ../gio/gdbus-tool.c:1773
+#: ../gio/gdbus-tool.c:1853
msgid "Destination name to monitor"
msgstr "Nombre de destino para monitorizar"
-#: ../gio/gdbus-tool.c:1774
+#: ../gio/gdbus-tool.c:1854
msgid "Object path to monitor"
msgstr "Ruta objeto para monitorizar"
-#: ../gio/gdbus-tool.c:1803
+#: ../gio/gdbus-tool.c:1883
msgid "Monitor a remote object."
msgstr "Monitorizar un objeto remoto."
-#: ../gio/gdbus-tool.c:1980
+#: ../gio/gdbus-tool.c:1941
+#, c-format
+msgid "Error: can’t monitor a non-message-bus connection\n"
+msgstr ""
+"Error: no se puede monitorizar una conexión que no sea de mensajes del bus\n"
+
+#: ../gio/gdbus-tool.c:2065
msgid "Service to activate before waiting for the other one (well-known name)"
msgstr "Servicio que activar antes de esperar a otro (nombre conocido)"
-#: ../gio/gdbus-tool.c:1983
+#: ../gio/gdbus-tool.c:2068
msgid ""
"Timeout to wait for before exiting with an error (seconds); 0 for no timeout "
"(default)"
@@ -1273,35 +1277,35 @@ msgstr ""
"Tiempo que esperar antes de salir con un error (en segundos); 0 para que no "
"haya tiempo de expiración (predeterminado)"
-#: ../gio/gdbus-tool.c:2031
+#: ../gio/gdbus-tool.c:2116
msgid "[OPTION…] BUS-NAME"
msgstr "[OPCIÓN…] NOMBRE-BUS"
-#: ../gio/gdbus-tool.c:2033
+#: ../gio/gdbus-tool.c:2118
msgid "Wait for a bus name to appear."
msgstr "Esperar a que aparezca el nombre del bus."
-#: ../gio/gdbus-tool.c:2109
+#: ../gio/gdbus-tool.c:2194
#, c-format
msgid "Error: A service to activate for must be specified.\n"
msgstr "Error: se debe especificar un servicio que activar.\n"
-#: ../gio/gdbus-tool.c:2114
+#: ../gio/gdbus-tool.c:2199
#, c-format
msgid "Error: A service to wait for must be specified.\n"
msgstr "Error: se debe especificar un servicio al que esperar.\n"
-#: ../gio/gdbus-tool.c:2119
+#: ../gio/gdbus-tool.c:2204
#, c-format
msgid "Error: Too many arguments.\n"
msgstr "Demasiados argumentos.\n"
-#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134
+#: ../gio/gdbus-tool.c:2212 ../gio/gdbus-tool.c:2219
#, c-format
msgid "Error: %s is not a valid well-known bus name.\n"
msgstr "Error: %s no es un nombre de bus conocido válido\n"
-#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4533
+#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4531
msgid "Unnamed"
msgstr "Sin nombre"
@@ -1309,32 +1313,32 @@ msgstr "Sin nombre"
msgid "Desktop file didn’t specify Exec field"
msgstr "El archivo de escritorio no especificó el campo Exec"
-#: ../gio/gdesktopappinfo.c:2696
+#: ../gio/gdesktopappinfo.c:2694
msgid "Unable to find terminal required for application"
msgstr "Imposible encontrar el terminal requerido por la aplicación"
-#: ../gio/gdesktopappinfo.c:3129
+#: ../gio/gdesktopappinfo.c:3127
#, c-format
msgid "Can’t create user application configuration folder %s: %s"
msgstr ""
"No se puede crear la carpeta de configuración de la aplicación %s del "
"usuario: %s"
-#: ../gio/gdesktopappinfo.c:3133
+#: ../gio/gdesktopappinfo.c:3131
#, c-format
msgid "Can’t create user MIME configuration folder %s: %s"
msgstr "No se puede crear la carpeta de configuración MIME %s del usuario: %s"
-#: ../gio/gdesktopappinfo.c:3373 ../gio/gdesktopappinfo.c:3397
+#: ../gio/gdesktopappinfo.c:3371 ../gio/gdesktopappinfo.c:3395
msgid "Application information lacks an identifier"
msgstr "La información de la aplicación carece de un identificador"
-#: ../gio/gdesktopappinfo.c:3631
+#: ../gio/gdesktopappinfo.c:3629
#, c-format
msgid "Can’t create user desktop file %s"
msgstr "No se puede crear el archivo de escritorio %s del usuario"
-#: ../gio/gdesktopappinfo.c:3765
+#: ../gio/gdesktopappinfo.c:3763
#, c-format
msgid "Custom definition for %s"
msgstr "Definición personalizada para %s"
@@ -1398,11 +1402,11 @@ msgstr "Se esperaba un GEmblem para GEmblemedIconjo"
#: ../gio/gfile.c:969 ../gio/gfile.c:1207 ../gio/gfile.c:1345
#: ../gio/gfile.c:1583 ../gio/gfile.c:1638 ../gio/gfile.c:1696
#: ../gio/gfile.c:1780 ../gio/gfile.c:1837 ../gio/gfile.c:1901
-#: ../gio/gfile.c:1956 ../gio/gfile.c:3614 ../gio/gfile.c:3669
-#: ../gio/gfile.c:3905 ../gio/gfile.c:3947 ../gio/gfile.c:4415
-#: ../gio/gfile.c:4826 ../gio/gfile.c:4911 ../gio/gfile.c:5001
-#: ../gio/gfile.c:5098 ../gio/gfile.c:5185 ../gio/gfile.c:5286
-#: ../gio/gfile.c:7827 ../gio/gfile.c:7917 ../gio/gfile.c:8001
+#: ../gio/gfile.c:1956 ../gio/gfile.c:3602 ../gio/gfile.c:3657
+#: ../gio/gfile.c:3893 ../gio/gfile.c:3935 ../gio/gfile.c:4403
+#: ../gio/gfile.c:4814 ../gio/gfile.c:4899 ../gio/gfile.c:4989
+#: ../gio/gfile.c:5086 ../gio/gfile.c:5173 ../gio/gfile.c:5274
+#: ../gio/gfile.c:7817 ../gio/gfile.c:7907 ../gio/gfile.c:7991
#: ../gio/win32/gwinhttpfile.c:437
msgid "Operation not supported"
msgstr "Operación no soportada"
@@ -1415,7 +1419,7 @@ msgstr "Operación no soportada"
msgid "Containing mount does not exist"
msgstr "El punto de montaje contenido no existe"
-#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2377
+#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2378
msgid "Can’t copy over directory"
msgstr "No se puede copiar sobre la carpeta"
@@ -1431,49 +1435,49 @@ msgstr "El archivo destino ya existe"
msgid "Can’t recursively copy directory"
msgstr "No se puede copiar la carpeta recursivamente"
-#: ../gio/gfile.c:2889
+#: ../gio/gfile.c:2877
msgid "Splice not supported"
msgstr "La unión no está soportada"
-#: ../gio/gfile.c:2893
+#: ../gio/gfile.c:2881
#, c-format
msgid "Error splicing file: %s"
msgstr "Error al unir el archivo: %s"
-#: ../gio/gfile.c:3025
+#: ../gio/gfile.c:3013
msgid "Copy (reflink/clone) between mounts is not supported"
msgstr "Copiar (reflink/clone) entre puntos de montaje no está soportado"
-#: ../gio/gfile.c:3029
+#: ../gio/gfile.c:3017
msgid "Copy (reflink/clone) is not supported or invalid"
msgstr "Copiar (reflink/clone) no está soportado o no es válido"
-#: ../gio/gfile.c:3034
+#: ../gio/gfile.c:3022
msgid "Copy (reflink/clone) is not supported or didn’t work"
msgstr "Copiar (reflink/clone) no está soportado o no ha funcionado"
-#: ../gio/gfile.c:3097
+#: ../gio/gfile.c:3085
msgid "Can’t copy special file"
msgstr "No se puede copiar el archivo especial"
-#: ../gio/gfile.c:3895
+#: ../gio/gfile.c:3883
msgid "Invalid symlink value given"
msgstr "El valor del enlace simbólico dado no es válido"
-#: ../gio/gfile.c:4056
+#: ../gio/gfile.c:4044
msgid "Trash not supported"
msgstr "No se soporta mover a la papelera"
-#: ../gio/gfile.c:4168
+#: ../gio/gfile.c:4156
#, c-format
msgid "File names cannot contain “%c”"
msgstr "Los nombres de archivo no pueden contener «%c»"
-#: ../gio/gfile.c:6614 ../gio/gvolume.c:363
+#: ../gio/gfile.c:6602 ../gio/gvolume.c:363
msgid "volume doesn’t implement mount"
msgstr "el volumen no implementa el montaje"
-#: ../gio/gfile.c:6723
+#: ../gio/gfile.c:6711
msgid "No application is registered as handling this file"
msgstr "No hay ninguna aplicación registrada para manejar este archivo"
@@ -1724,27 +1728,27 @@ msgstr ""
"Use %s para obtener ayuda detallada.\n"
"\n"
-#: ../gio/gio-tool-cat.c:83
+#: ../gio/gio-tool-cat.c:87
msgid "Error writing to stdout"
msgstr "Error al escribir en la salida estándar"
#. Translators: commandline placeholder
-#: ../gio/gio-tool-cat.c:127 ../gio/gio-tool-info.c:282
+#: ../gio/gio-tool-cat.c:133 ../gio/gio-tool-info.c:282
#: ../gio/gio-tool-list.c:165 ../gio/gio-tool-mkdir.c:48
#: ../gio/gio-tool-monitor.c:37 ../gio/gio-tool-monitor.c:39
#: ../gio/gio-tool-monitor.c:41 ../gio/gio-tool-monitor.c:43
#: ../gio/gio-tool-monitor.c:203 ../gio/gio-tool-mount.c:1141
-#: ../gio/gio-tool-open.c:45 ../gio/gio-tool-remove.c:48
+#: ../gio/gio-tool-open.c:113 ../gio/gio-tool-remove.c:48
#: ../gio/gio-tool-rename.c:45 ../gio/gio-tool-set.c:89
#: ../gio/gio-tool-trash.c:81 ../gio/gio-tool-tree.c:239
msgid "LOCATION"
msgstr "UBICACIÓN"
-#: ../gio/gio-tool-cat.c:132
+#: ../gio/gio-tool-cat.c:138
msgid "Concatenate files and print to standard output."
msgstr "Concatenar archivos e imprimir por la salida estándar."
-#: ../gio/gio-tool-cat.c:134
+#: ../gio/gio-tool-cat.c:140
msgid ""
"gio cat works just like the traditional cat utility, but using GIO\n"
"locations instead of local files: for example, you can use something\n"
@@ -1754,9 +1758,9 @@ msgstr ""
"ubicaciones GIO en lugar de archivos locales: por ejemplo, puede\n"
"usar algo como smb://servidor/recurso/archivo.txt como ubicación."
-#: ../gio/gio-tool-cat.c:156 ../gio/gio-tool-info.c:313
+#: ../gio/gio-tool-cat.c:162 ../gio/gio-tool-info.c:313
#: ../gio/gio-tool-mkdir.c:76 ../gio/gio-tool-monitor.c:228
-#: ../gio/gio-tool-open.c:71 ../gio/gio-tool-remove.c:72
+#: ../gio/gio-tool-open.c:139 ../gio/gio-tool-remove.c:72
msgid "No locations given"
msgstr "No se han proporcionado ubicaciones"
@@ -1797,7 +1801,7 @@ msgstr "ORIGEN"
#. Translators: commandline placeholder
#: ../gio/gio-tool-copy.c:98 ../gio/gio-tool-move.c:94
-#: ../gio/gio-tool-save.c:165
+#: ../gio/gio-tool-save.c:160
msgid "DESTINATION"
msgstr "DESTINO"
@@ -2155,7 +2159,7 @@ msgstr ""
msgid "Target %s is not a directory"
msgstr "El destino %s no es una carpeta"
-#: ../gio/gio-tool-open.c:50
+#: ../gio/gio-tool-open.c:118
msgid ""
"Open files with the default application that\n"
"is registered to handle files of this type."
@@ -2183,7 +2187,7 @@ msgstr "Renombrar un archivo."
msgid "Missing argument"
msgstr "Falta el argumento"
-#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:195
+#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:190
#: ../gio/gio-tool-set.c:137
msgid "Too many arguments"
msgstr "Demasiados argumentos"
@@ -2223,21 +2227,21 @@ msgstr "La etag del archivo que se está sobrescribiendo"
msgid "ETAG"
msgstr "ETAG"
-#: ../gio/gio-tool-save.c:119
+#: ../gio/gio-tool-save.c:113
msgid "Error reading from standard input"
msgstr "Error al leer de la entrada estándar"
#. Translators: The "etag" is a token allowing to verify whether a file has been modified
-#: ../gio/gio-tool-save.c:145
+#: ../gio/gio-tool-save.c:139
#, c-format
msgid "Etag not available\n"
msgstr "Etag no disponible\n"
-#: ../gio/gio-tool-save.c:168
+#: ../gio/gio-tool-save.c:163
msgid "Read from standard input and save to DEST."
msgstr "Leer de la entrada estándar y guardar en DESTINO."
-#: ../gio/gio-tool-save.c:188
+#: ../gio/gio-tool-save.c:183
msgid "No destination given"
msgstr "No se ha indicado el destino"
@@ -2454,7 +2458,6 @@ msgstr "<%s> debe contener al menos un <value>"
#: ../gio/glib-compile-schemas.c:315
#, c-format
-#| msgid "No connection endpoint specified"
msgid "<%s> is not contained in the specified range"
msgstr "<%s> no está dentro del rango especificado"
@@ -2564,7 +2567,6 @@ msgstr "<alias value='%s'/> ya especificado"
#: ../gio/glib-compile-schemas.c:605
#, c-format
-#| msgid "“%s” is not a signed number"
msgid "alias target “%s” is not in enumerated type"
msgstr "el alias del objetivo «%s» no está en el tipo enumerado"
@@ -2904,219 +2906,219 @@ msgstr "Error al leer el archivo %s: %s"
msgid "Can’t rename file, filename already exists"
msgstr "No se puede renombrar el archivo, el nombre de archivo ya existe"
-#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2253 ../gio/glocalfile.c:2281
-#: ../gio/glocalfile.c:2438 ../gio/glocalfileoutputstream.c:549
+#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2254 ../gio/glocalfile.c:2282
+#: ../gio/glocalfile.c:2439 ../gio/glocalfileoutputstream.c:551
msgid "Invalid filename"
msgstr "Nombre de archivo no válido"
-#: ../gio/glocalfile.c:1404 ../gio/glocalfile.c:1419
+#: ../gio/glocalfile.c:1405 ../gio/glocalfile.c:1420
#, c-format
msgid "Error opening file %s: %s"
msgstr "Error al abrir el archivo %s: %s"
-#: ../gio/glocalfile.c:1544
+#: ../gio/glocalfile.c:1545
#, c-format
msgid "Error removing file %s: %s"
msgstr "Error al eliminar el archivo %s: %s"
-#: ../gio/glocalfile.c:1928
+#: ../gio/glocalfile.c:1929
#, c-format
msgid "Error trashing file %s: %s"
msgstr "Error al mover a la papelera el archivo %s: %s"
-#: ../gio/glocalfile.c:1951
+#: ../gio/glocalfile.c:1952
#, c-format
msgid "Unable to create trash dir %s: %s"
msgstr "No se pudo crear la carpeta de papelera %s: %s"
-#: ../gio/glocalfile.c:1971
+#: ../gio/glocalfile.c:1972
#, c-format
msgid "Unable to find toplevel directory to trash %s"
msgstr "No se pudo encontrar la carpeta de nivel superior para la papelera %s"
-#: ../gio/glocalfile.c:2050 ../gio/glocalfile.c:2070
+#: ../gio/glocalfile.c:2051 ../gio/glocalfile.c:2071
#, c-format
msgid "Unable to find or create trash directory for %s"
msgstr "No se pudo encontrar o crear la carpeta de la papelera para %s"
-#: ../gio/glocalfile.c:2105
+#: ../gio/glocalfile.c:2106
#, c-format
msgid "Unable to create trashing info file for %s: %s"
msgstr "No se pudo crear la información de papelera para el archivo %s: %s"
-#: ../gio/glocalfile.c:2164
+#: ../gio/glocalfile.c:2165
#, c-format
msgid "Unable to trash file %s across filesystem boundaries"
msgstr ""
"No se pudo enviar a la papelera el archivo %s entre sistemas de archivos"
-#: ../gio/glocalfile.c:2168 ../gio/glocalfile.c:2224
+#: ../gio/glocalfile.c:2169 ../gio/glocalfile.c:2225
#, c-format
msgid "Unable to trash file %s: %s"
msgstr "No se pudo enviar a la papelera el archivo %s: %s"
-#: ../gio/glocalfile.c:2230
+#: ../gio/glocalfile.c:2231
#, c-format
msgid "Unable to trash file %s"
msgstr "No se pudo enviar a la papelera el archivo %s"
-#: ../gio/glocalfile.c:2256
+#: ../gio/glocalfile.c:2257
#, c-format
msgid "Error creating directory %s: %s"
msgstr "Error al crear la carpeta %s: %s"
-#: ../gio/glocalfile.c:2285
+#: ../gio/glocalfile.c:2286
#, c-format
msgid "Filesystem does not support symbolic links"
msgstr "El sistema de archivos no soporta enlaces simbólicos"
-#: ../gio/glocalfile.c:2288
+#: ../gio/glocalfile.c:2289
#, c-format
msgid "Error making symbolic link %s: %s"
msgstr "Error al crear el enlace simbólico %s: %s"
-#: ../gio/glocalfile.c:2294 ../glib/gfileutils.c:2077
+#: ../gio/glocalfile.c:2295 ../glib/gfileutils.c:2101
msgid "Symbolic links not supported"
msgstr "Enlaces simbólicos no soportados"
-#: ../gio/glocalfile.c:2349 ../gio/glocalfile.c:2384 ../gio/glocalfile.c:2441
+#: ../gio/glocalfile.c:2350 ../gio/glocalfile.c:2385 ../gio/glocalfile.c:2442
#, c-format
msgid "Error moving file %s: %s"
msgstr "Error al mover el archivo %s: %s"
-#: ../gio/glocalfile.c:2372
+#: ../gio/glocalfile.c:2373
msgid "Can’t move directory over directory"
msgstr "No se puede mover una carpeta sobre una carpeta"
-#: ../gio/glocalfile.c:2398 ../gio/glocalfileoutputstream.c:933
-#: ../gio/glocalfileoutputstream.c:947 ../gio/glocalfileoutputstream.c:962
-#: ../gio/glocalfileoutputstream.c:979 ../gio/glocalfileoutputstream.c:993
+#: ../gio/glocalfile.c:2399 ../gio/glocalfileoutputstream.c:935
+#: ../gio/glocalfileoutputstream.c:949 ../gio/glocalfileoutputstream.c:964
+#: ../gio/glocalfileoutputstream.c:981 ../gio/glocalfileoutputstream.c:995
msgid "Backup file creation failed"
msgstr "Falló la creación del archivo de respaldo"
-#: ../gio/glocalfile.c:2417
+#: ../gio/glocalfile.c:2418
#, c-format
msgid "Error removing target file: %s"
msgstr "Error al eliminar el archivo destino: %s"
-#: ../gio/glocalfile.c:2431
+#: ../gio/glocalfile.c:2432
msgid "Move between mounts not supported"
msgstr "No se soporta mover archivos entre puntos de montaje"
-#: ../gio/glocalfile.c:2622
+#: ../gio/glocalfile.c:2623
#, c-format
msgid "Could not determine the disk usage of %s: %s"
msgstr "No se pudo determinar el uso de disco de %s: %s"
-#: ../gio/glocalfileinfo.c:731
+#: ../gio/glocalfileinfo.c:742
msgid "Attribute value must be non-NULL"
msgstr "El valor del atributo de ser no nulo"
-#: ../gio/glocalfileinfo.c:738
+#: ../gio/glocalfileinfo.c:749
msgid "Invalid attribute type (string expected)"
msgstr "Tipo de atributo no válido (se esperaba una cadena)"
-#: ../gio/glocalfileinfo.c:745
+#: ../gio/glocalfileinfo.c:756
msgid "Invalid extended attribute name"
msgstr "Nombre extendido del atributo no válido"
-#: ../gio/glocalfileinfo.c:785
+#: ../gio/glocalfileinfo.c:796
#, c-format
msgid "Error setting extended attribute “%s”: %s"
msgstr "Error al establecer el atributo extendido «%s»: %s"
-#: ../gio/glocalfileinfo.c:1586
+#: ../gio/glocalfileinfo.c:1604
msgid " (invalid encoding)"
msgstr " (codificación no válida)"
-#: ../gio/glocalfileinfo.c:1777 ../gio/glocalfileoutputstream.c:811
+#: ../gio/glocalfileinfo.c:1773 ../gio/glocalfileoutputstream.c:813
#, c-format
msgid "Error when getting information for file “%s”: %s"
msgstr "Error al obtener la información del archivo «%s»: %s"
-#: ../gio/glocalfileinfo.c:2028
+#: ../gio/glocalfileinfo.c:2031
#, c-format
msgid "Error when getting information for file descriptor: %s"
msgstr "Error al obtener la información del descriptor del archivo: %s"
-#: ../gio/glocalfileinfo.c:2073
+#: ../gio/glocalfileinfo.c:2076
msgid "Invalid attribute type (uint32 expected)"
msgstr "Tipo de atributo no válido (se esperaba uint32)"
-#: ../gio/glocalfileinfo.c:2091
+#: ../gio/glocalfileinfo.c:2094
msgid "Invalid attribute type (uint64 expected)"
msgstr "Tipo de atributo no válido (se esperaba uint64)"
-#: ../gio/glocalfileinfo.c:2110 ../gio/glocalfileinfo.c:2129
+#: ../gio/glocalfileinfo.c:2113 ../gio/glocalfileinfo.c:2132
msgid "Invalid attribute type (byte string expected)"
msgstr "Tipo de atributo no válido (se esperaba una cadena byte)"
-#: ../gio/glocalfileinfo.c:2164
+#: ../gio/glocalfileinfo.c:2177
msgid "Cannot set permissions on symlinks"
msgstr "No se pueden establecer permisos en enlaces simbólicos"
-#: ../gio/glocalfileinfo.c:2180
+#: ../gio/glocalfileinfo.c:2193
#, c-format
msgid "Error setting permissions: %s"
msgstr "Error al establecer permisos: %s"
-#: ../gio/glocalfileinfo.c:2231
+#: ../gio/glocalfileinfo.c:2244
#, c-format
msgid "Error setting owner: %s"
msgstr "Error al establecer el propietario: %s"
-#: ../gio/glocalfileinfo.c:2254
+#: ../gio/glocalfileinfo.c:2267
msgid "symlink must be non-NULL"
msgstr "el enlace simbólico debe ser no nulo"
-#: ../gio/glocalfileinfo.c:2264 ../gio/glocalfileinfo.c:2283
-#: ../gio/glocalfileinfo.c:2294
+#: ../gio/glocalfileinfo.c:2277 ../gio/glocalfileinfo.c:2296
+#: ../gio/glocalfileinfo.c:2307
#, c-format
msgid "Error setting symlink: %s"
msgstr "Error al establecer el enlace simbólico: %s"
-#: ../gio/glocalfileinfo.c:2273
+#: ../gio/glocalfileinfo.c:2286
msgid "Error setting symlink: file is not a symlink"
msgstr ""
"Error al establecer el enlace simbólico: el archivo no es un enlace simbólico"
-#: ../gio/glocalfileinfo.c:2399
+#: ../gio/glocalfileinfo.c:2412
#, c-format
msgid "Error setting modification or access time: %s"
msgstr "Error al establecer o modificar el tiempo de acceso: %s"
-#: ../gio/glocalfileinfo.c:2422
+#: ../gio/glocalfileinfo.c:2435
msgid "SELinux context must be non-NULL"
msgstr "El contexto SELinux debe ser no nulo"
-#: ../gio/glocalfileinfo.c:2437
+#: ../gio/glocalfileinfo.c:2450
#, c-format
msgid "Error setting SELinux context: %s"
msgstr "Error al establecer el contexto SELinux: %s"
-#: ../gio/glocalfileinfo.c:2444
+#: ../gio/glocalfileinfo.c:2457
msgid "SELinux is not enabled on this system"
msgstr "SELinux no está activado en este sistema"
-#: ../gio/glocalfileinfo.c:2536
+#: ../gio/glocalfileinfo.c:2549
#, c-format
msgid "Setting attribute %s not supported"
msgstr "Establecer el atributo %s no está soportado"
-#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:694
+#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:696
#, c-format
msgid "Error reading from file: %s"
msgstr "Error al leer del archivo: %s"
#: ../gio/glocalfileinputstream.c:199 ../gio/glocalfileinputstream.c:211
#: ../gio/glocalfileinputstream.c:225 ../gio/glocalfileinputstream.c:333
-#: ../gio/glocalfileoutputstream.c:456 ../gio/glocalfileoutputstream.c:1011
+#: ../gio/glocalfileoutputstream.c:458 ../gio/glocalfileoutputstream.c:1013
#, c-format
msgid "Error seeking in file: %s"
msgstr "Error al buscar en el archivo: %s"
-#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:246
-#: ../gio/glocalfileoutputstream.c:340
+#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:248
+#: ../gio/glocalfileoutputstream.c:342
#, c-format
msgid "Error closing file: %s"
msgstr "Error al cerrar el archivo: %s"
@@ -3127,51 +3129,51 @@ msgstr ""
"No se pudo encontrar el tipo de monitorización del archivo local "
"predeterminado"
-#: ../gio/glocalfileoutputstream.c:194 ../gio/glocalfileoutputstream.c:226
-#: ../gio/glocalfileoutputstream.c:715
+#: ../gio/glocalfileoutputstream.c:196 ../gio/glocalfileoutputstream.c:228
+#: ../gio/glocalfileoutputstream.c:717
#, c-format
msgid "Error writing to file: %s"
msgstr "Error al escribir en el archivo: %s"
-#: ../gio/glocalfileoutputstream.c:273
+#: ../gio/glocalfileoutputstream.c:275
#, c-format
msgid "Error removing old backup link: %s"
msgstr "Error al eliminar el enlace de respaldo antiguo: %s"
-#: ../gio/glocalfileoutputstream.c:287 ../gio/glocalfileoutputstream.c:300
+#: ../gio/glocalfileoutputstream.c:289 ../gio/glocalfileoutputstream.c:302
#, c-format
msgid "Error creating backup copy: %s"
msgstr "Error al crear una copia de respaldo: %s"
-#: ../gio/glocalfileoutputstream.c:318
+#: ../gio/glocalfileoutputstream.c:320
#, c-format
msgid "Error renaming temporary file: %s"
msgstr "Error al renombrar el archivo temporal: %s"
-#: ../gio/glocalfileoutputstream.c:502 ../gio/glocalfileoutputstream.c:1062
+#: ../gio/glocalfileoutputstream.c:504 ../gio/glocalfileoutputstream.c:1064
#, c-format
msgid "Error truncating file: %s"
msgstr "Error al truncar el archivo: %s"
-#: ../gio/glocalfileoutputstream.c:555 ../gio/glocalfileoutputstream.c:793
-#: ../gio/glocalfileoutputstream.c:1043 ../gio/gsubprocess.c:380
+#: ../gio/glocalfileoutputstream.c:557 ../gio/glocalfileoutputstream.c:795
+#: ../gio/glocalfileoutputstream.c:1045 ../gio/gsubprocess.c:380
#, c-format
msgid "Error opening file “%s”: %s"
msgstr "Error al abrir el archivo %s: %s"
-#: ../gio/glocalfileoutputstream.c:824
+#: ../gio/glocalfileoutputstream.c:826
msgid "Target file is a directory"
msgstr "El archivo destino es una carpeta"
-#: ../gio/glocalfileoutputstream.c:829
+#: ../gio/glocalfileoutputstream.c:831
msgid "Target file is not a regular file"
msgstr "El archivo destino no es un archivo regular"
-#: ../gio/glocalfileoutputstream.c:841
+#: ../gio/glocalfileoutputstream.c:843
msgid "The file was externally modified"
msgstr "El archivo se modificó externamente"
-#: ../gio/glocalfileoutputstream.c:1027
+#: ../gio/glocalfileoutputstream.c:1029
#, c-format
msgid "Error removing old file: %s"
msgstr "Error al eliminar el archivo antiguo: %s"
@@ -3215,21 +3217,21 @@ msgstr "La búsqueda solicitada después del final del flujo"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement unmount.
-#: ../gio/gmount.c:393
+#: ../gio/gmount.c:396
msgid "mount doesn’t implement “unmount”"
msgstr "el punto de montaje no implementa el desmontado («unmount»)"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement eject.
-#: ../gio/gmount.c:469
+#: ../gio/gmount.c:472
msgid "mount doesn’t implement “eject”"
msgstr "el punto de montaje no implementa la expulsión («eject»)"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of unmount or unmount_with_operation.
-#: ../gio/gmount.c:547
+#: ../gio/gmount.c:550
msgid "mount doesn’t implement “unmount” or “unmount_with_operation”"
msgstr ""
"el punto de montaje no implementa desmontado («umount») o desmontado con "
@@ -3238,7 +3240,7 @@ msgstr ""
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of eject or eject_with_operation.
-#: ../gio/gmount.c:632
+#: ../gio/gmount.c:635
msgid "mount doesn’t implement “eject” or “eject_with_operation”"
msgstr ""
"el punto de montaje no implementa la expulsión («eject») o expulsión con "
@@ -3247,21 +3249,21 @@ msgstr ""
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement remount.
-#: ../gio/gmount.c:720
+#: ../gio/gmount.c:723
msgid "mount doesn’t implement “remount”"
msgstr "el punto de montaje no implementa el remontado («remount»)"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:802
+#: ../gio/gmount.c:805
msgid "mount doesn’t implement content type guessing"
msgstr "el punto de montaje no implementa averiguación del tipo de contenido"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:889
+#: ../gio/gmount.c:892
msgid "mount doesn’t implement synchronous content type guessing"
msgstr ""
"el punto de montaje no implementa averiguación síncrona del tipo de contenido"
@@ -3697,148 +3699,181 @@ msgstr "Se proporcionó un nombre de esquema vacío\n"
msgid "No such key “%s”\n"
msgstr "No existe la clave «%s»\n"
-#: ../gio/gsocket.c:379
+#: ../gio/gsocket.c:384
msgid "Invalid socket, not initialized"
msgstr "Socket no válido, no inicializado"
-#: ../gio/gsocket.c:386
+#: ../gio/gsocket.c:391
#, c-format
msgid "Invalid socket, initialization failed due to: %s"
msgstr "Socket no válido, falló la instalación debido a: %s"
-#: ../gio/gsocket.c:394
+#: ../gio/gsocket.c:399
msgid "Socket is already closed"
msgstr "El socket ya está cerrado"
-#: ../gio/gsocket.c:409 ../gio/gsocket.c:2765 ../gio/gsocket.c:3950
-#: ../gio/gsocket.c:4008
+#: ../gio/gsocket.c:414 ../gio/gsocket.c:2995 ../gio/gsocket.c:4205
+#: ../gio/gsocket.c:4263
msgid "Socket I/O timed out"
msgstr "Expiró la E/S del socket"
-#: ../gio/gsocket.c:541
+#: ../gio/gsocket.c:546
#, c-format
msgid "creating GSocket from fd: %s"
msgstr "creando el GSocket desde fd: %s"
-#: ../gio/gsocket.c:570 ../gio/gsocket.c:624 ../gio/gsocket.c:631
+#: ../gio/gsocket.c:575 ../gio/gsocket.c:629 ../gio/gsocket.c:636
#, c-format
msgid "Unable to create socket: %s"
msgstr "No se pudo crear el socket: %s"
-#: ../gio/gsocket.c:624
+#: ../gio/gsocket.c:629
msgid "Unknown family was specified"
msgstr "Se especificó una familia desconocida"
-#: ../gio/gsocket.c:631
+#: ../gio/gsocket.c:636
msgid "Unknown protocol was specified"
msgstr "Se especificó un protocolo desconocido"
-#: ../gio/gsocket.c:1122
+#: ../gio/gsocket.c:1127
#, c-format
msgid "Cannot use datagram operations on a non-datagram socket."
msgstr ""
"No se pueden usar operaciones de datagrama en un zócalo que no es de "
"datagrama."
-#: ../gio/gsocket.c:1139
+#: ../gio/gsocket.c:1144
#, c-format
msgid "Cannot use datagram operations on a socket with a timeout set."
msgstr ""
"No se pueden usar operaciones de datagrama en un zócalo sin un tiempo de "
"expiración establecido."
-#: ../gio/gsocket.c:1943
+#: ../gio/gsocket.c:1948
#, c-format
msgid "could not get local address: %s"
msgstr "no se pudo obtener la dirección local: %s"
-#: ../gio/gsocket.c:1986
+#: ../gio/gsocket.c:1991
#, c-format
msgid "could not get remote address: %s"
msgstr "no se pudo obtener la dirección remota: %s"
-#: ../gio/gsocket.c:2052
+#: ../gio/gsocket.c:2057
#, c-format
msgid "could not listen: %s"
msgstr "no se pudo escuchar: %s"
-#: ../gio/gsocket.c:2151
+#: ../gio/gsocket.c:2156
#, c-format
msgid "Error binding to address: %s"
msgstr "Error al vincular con la dirección: %s"
-#: ../gio/gsocket.c:2266 ../gio/gsocket.c:2303
+#: ../gio/gsocket.c:2214 ../gio/gsocket.c:2251 ../gio/gsocket.c:2361
+#: ../gio/gsocket.c:2379 ../gio/gsocket.c:2449 ../gio/gsocket.c:2507
+#: ../gio/gsocket.c:2525
#, c-format
msgid "Error joining multicast group: %s"
msgstr "Error al unirse al grupo de multicast: %s"
-#: ../gio/gsocket.c:2267 ../gio/gsocket.c:2304
+#: ../gio/gsocket.c:2215 ../gio/gsocket.c:2252 ../gio/gsocket.c:2362
+#: ../gio/gsocket.c:2380 ../gio/gsocket.c:2450 ../gio/gsocket.c:2508
+#: ../gio/gsocket.c:2526
#, c-format
msgid "Error leaving multicast group: %s"
msgstr "Error al abandonar al grupo de multicast: %s"
-#: ../gio/gsocket.c:2268
+#: ../gio/gsocket.c:2216
msgid "No support for source-specific multicast"
msgstr "No se soporta el multicast específico de la fuente"
-#: ../gio/gsocket.c:2488
+#: ../gio/gsocket.c:2363
+#| msgid "Unsupported socket address"
+msgid "Unsupported socket family"
+msgstr "Familia del socket no soportada"
+
+#: ../gio/gsocket.c:2381
+msgid "source-specific not an IPv4 address"
+msgstr "la fuente específica no es una dirección IPv4"
+
+#: ../gio/gsocket.c:2399 ../gio/gsocket.c:2428 ../gio/gsocket.c:2475
+#, c-format
+msgid "Interface not found: %s"
+msgstr "Interfaz no encontrada: %s"
+
+#: ../gio/gsocket.c:2415
+#, c-format
+msgid "Interface name too long"
+msgstr "El nombre de la interfaz es demasiado largo"
+
+#: ../gio/gsocket.c:2451
+#| msgid "No support for source-specific multicast"
+msgid "No support for IPv4 source-specific multicast"
+msgstr "No se soporta el multicast específico de la fuente para IPv4"
+
+#: ../gio/gsocket.c:2509
+#| msgid "No support for source-specific multicast"
+msgid "No support for IPv6 source-specific multicast"
+msgstr "No se soporta el multicast específico de la fuente para IPv6"
+
+#: ../gio/gsocket.c:2718
#, c-format
msgid "Error accepting connection: %s"
msgstr "Error al aceptar la conexión: %s"
-#: ../gio/gsocket.c:2609
+#: ../gio/gsocket.c:2839
msgid "Connection in progress"
msgstr "Conexión en progreso"
-#: ../gio/gsocket.c:2658
+#: ../gio/gsocket.c:2888
msgid "Unable to get pending error: "
msgstr "No se pudo obtener el error pendiente: "
-#: ../gio/gsocket.c:2828
+#: ../gio/gsocket.c:3058
#, c-format
msgid "Error receiving data: %s"
msgstr "Error al recibir los datos: %s"
-#: ../gio/gsocket.c:3023
+#: ../gio/gsocket.c:3253
#, c-format
msgid "Error sending data: %s"
msgstr "Error al enviar los datos: %s"
-#: ../gio/gsocket.c:3210
+#: ../gio/gsocket.c:3440
#, c-format
msgid "Unable to shutdown socket: %s"
msgstr "No se pudo desconectar el socket: %s"
-#: ../gio/gsocket.c:3291
+#: ../gio/gsocket.c:3521
#, c-format
msgid "Error closing socket: %s"
msgstr "Error al cerrar el socket: %s"
-#: ../gio/gsocket.c:3943
+#: ../gio/gsocket.c:4198
#, c-format
msgid "Waiting for socket condition: %s"
msgstr "Esperando la condición del socket: %s"
-#: ../gio/gsocket.c:4417 ../gio/gsocket.c:4497 ../gio/gsocket.c:4675
+#: ../gio/gsocket.c:4672 ../gio/gsocket.c:4752 ../gio/gsocket.c:4930
#, c-format
msgid "Error sending message: %s"
msgstr "Error al enviar el mensaje: %s"
-#: ../gio/gsocket.c:4441
+#: ../gio/gsocket.c:4696
msgid "GSocketControlMessage not supported on Windows"
msgstr "GSocketControlMessage no está soportado en Windows"
-#: ../gio/gsocket.c:4894 ../gio/gsocket.c:4967 ../gio/gsocket.c:5193
+#: ../gio/gsocket.c:5149 ../gio/gsocket.c:5222 ../gio/gsocket.c:5448
#, c-format
msgid "Error receiving message: %s"
msgstr "Error al recibir el mensaje: %s"
-#: ../gio/gsocket.c:5465
+#: ../gio/gsocket.c:5720
#, c-format
msgid "Unable to read socket credentials: %s"
msgstr "No se pudieron leer las credenciales del socket: %s"
-#: ../gio/gsocket.c:5474
+#: ../gio/gsocket.c:5729
msgid "g_socket_get_credentials not implemented for this OS"
msgstr "g_socket_get_credentials no está implementado en este SO"
@@ -3984,18 +4019,18 @@ msgstr "No se han encontrado direcciones válidas"
msgid "Error reverse-resolving “%s”: %s"
msgstr "Error al resolver «%s» de forma inversa: %s"
-#: ../gio/gthreadedresolver.c:550 ../gio/gthreadedresolver.c:630
-#: ../gio/gthreadedresolver.c:728 ../gio/gthreadedresolver.c:778
+#: ../gio/gthreadedresolver.c:549 ../gio/gthreadedresolver.c:628
+#: ../gio/gthreadedresolver.c:726 ../gio/gthreadedresolver.c:776
#, c-format
msgid "No DNS record of the requested type for “%s”"
msgstr "No hay un registro de DNS del tipo solicitado para «%s»"
-#: ../gio/gthreadedresolver.c:555 ../gio/gthreadedresolver.c:733
+#: ../gio/gthreadedresolver.c:554 ../gio/gthreadedresolver.c:731
#, c-format
msgid "Temporarily unable to resolve “%s”"
msgstr "No se puede resolver «%s» temporalmente"
-#: ../gio/gthreadedresolver.c:560 ../gio/gthreadedresolver.c:738
+#: ../gio/gthreadedresolver.c:559 ../gio/gthreadedresolver.c:736
#, c-format
msgid "Error resolving “%s”"
msgstr "Error al resolver «%s»"
@@ -4106,7 +4141,7 @@ msgstr "Error al leer del descriptor del archivo: %s"
msgid "Error closing file descriptor: %s"
msgstr "Error al cerrar el descriptor del archivo: %s"
-#: ../gio/gunixmounts.c:2430 ../gio/gunixmounts.c:2483
+#: ../gio/gunixmounts.c:2539 ../gio/gunixmounts.c:2592
msgid "Filesystem root"
msgstr "Sistema de archivos raíz"
@@ -4301,227 +4336,227 @@ msgid "The pathname “%s” is not an absolute path"
msgstr "El nombre de la ruta «%s» no es una ruta absoluta"
#. Translators: this is the preferred format for expressing the date and the time
-#: ../glib/gdatetime.c:202
+#: ../glib/gdatetime.c:203
msgctxt "GDateTime"
msgid "%a %b %e %H:%M:%S %Y"
msgstr "%a %H:%M:%S, %e de %B de %Y"
#. Translators: this is the preferred format for expressing the date
-#: ../glib/gdatetime.c:205
+#: ../glib/gdatetime.c:206
msgctxt "GDateTime"
msgid "%m/%d/%y"
msgstr "%d/%m/%y"
#. Translators: this is the preferred format for expressing the time
-#: ../glib/gdatetime.c:208
+#: ../glib/gdatetime.c:209
msgctxt "GDateTime"
msgid "%H:%M:%S"
msgstr "%H:%M:%S"
#. Translators: this is the preferred format for expressing 12 hour time
-#: ../glib/gdatetime.c:211
+#: ../glib/gdatetime.c:212
msgctxt "GDateTime"
msgid "%I:%M:%S %p"
msgstr "%I:%M:%S %p"
-#: ../glib/gdatetime.c:224
+#: ../glib/gdatetime.c:225
msgctxt "full month name"
msgid "January"
msgstr "Enero"
-#: ../glib/gdatetime.c:226
+#: ../glib/gdatetime.c:227
msgctxt "full month name"
msgid "February"
msgstr "Febrero"
-#: ../glib/gdatetime.c:228
+#: ../glib/gdatetime.c:229
msgctxt "full month name"
msgid "March"
msgstr "Marzo"
-#: ../glib/gdatetime.c:230
+#: ../glib/gdatetime.c:231
msgctxt "full month name"
msgid "April"
msgstr "Abril"
-#: ../glib/gdatetime.c:232
+#: ../glib/gdatetime.c:233
msgctxt "full month name"
msgid "May"
msgstr "Mayo"
-#: ../glib/gdatetime.c:234
+#: ../glib/gdatetime.c:235
msgctxt "full month name"
msgid "June"
msgstr "Junio"
-#: ../glib/gdatetime.c:236
+#: ../glib/gdatetime.c:237
msgctxt "full month name"
msgid "July"
msgstr "Julio"
-#: ../glib/gdatetime.c:238
+#: ../glib/gdatetime.c:239
msgctxt "full month name"
msgid "August"
msgstr "Agosto"
-#: ../glib/gdatetime.c:240
+#: ../glib/gdatetime.c:241
msgctxt "full month name"
msgid "September"
msgstr "Septiembre"
-#: ../glib/gdatetime.c:242
+#: ../glib/gdatetime.c:243
msgctxt "full month name"
msgid "October"
msgstr "Octubre"
-#: ../glib/gdatetime.c:244
+#: ../glib/gdatetime.c:245
msgctxt "full month name"
msgid "November"
msgstr "Noviembre"
-#: ../glib/gdatetime.c:246
+#: ../glib/gdatetime.c:247
msgctxt "full month name"
msgid "December"
msgstr "Diciembre"
-#: ../glib/gdatetime.c:261
+#: ../glib/gdatetime.c:262
msgctxt "abbreviated month name"
msgid "Jan"
msgstr "Ene"
-#: ../glib/gdatetime.c:263
+#: ../glib/gdatetime.c:264
msgctxt "abbreviated month name"
msgid "Feb"
msgstr "Feb"
-#: ../glib/gdatetime.c:265
+#: ../glib/gdatetime.c:266
msgctxt "abbreviated month name"
msgid "Mar"
msgstr "Mar"
-#: ../glib/gdatetime.c:267
+#: ../glib/gdatetime.c:268
msgctxt "abbreviated month name"
msgid "Apr"
msgstr "Abr"
-#: ../glib/gdatetime.c:269
+#: ../glib/gdatetime.c:270
msgctxt "abbreviated month name"
msgid "May"
msgstr "May"
-#: ../glib/gdatetime.c:271
+#: ../glib/gdatetime.c:272
msgctxt "abbreviated month name"
msgid "Jun"
msgstr "Jun"
-#: ../glib/gdatetime.c:273
+#: ../glib/gdatetime.c:274
msgctxt "abbreviated month name"
msgid "Jul"
msgstr "Jul"
-#: ../glib/gdatetime.c:275
+#: ../glib/gdatetime.c:276
msgctxt "abbreviated month name"
msgid "Aug"
msgstr "Ago"
-#: ../glib/gdatetime.c:277
+#: ../glib/gdatetime.c:278
msgctxt "abbreviated month name"
msgid "Sep"
msgstr "Sep"
-#: ../glib/gdatetime.c:279
+#: ../glib/gdatetime.c:280
msgctxt "abbreviated month name"
msgid "Oct"
msgstr "Oct"
-#: ../glib/gdatetime.c:281
+#: ../glib/gdatetime.c:282
msgctxt "abbreviated month name"
msgid "Nov"
msgstr "Nov"
-#: ../glib/gdatetime.c:283
+#: ../glib/gdatetime.c:284
msgctxt "abbreviated month name"
msgid "Dec"
msgstr "Dic"
-#: ../glib/gdatetime.c:298
+#: ../glib/gdatetime.c:299
msgctxt "full weekday name"
msgid "Monday"
msgstr "Lunes"
-#: ../glib/gdatetime.c:300
+#: ../glib/gdatetime.c:301
msgctxt "full weekday name"
msgid "Tuesday"
msgstr "Martes"
-#: ../glib/gdatetime.c:302
+#: ../glib/gdatetime.c:303
msgctxt "full weekday name"
msgid "Wednesday"
msgstr "Miércoles"
-#: ../glib/gdatetime.c:304
+#: ../glib/gdatetime.c:305
msgctxt "full weekday name"
msgid "Thursday"
msgstr "Jueves"
-#: ../glib/gdatetime.c:306
+#: ../glib/gdatetime.c:307
msgctxt "full weekday name"
msgid "Friday"
msgstr "Viernes"
-#: ../glib/gdatetime.c:308
+#: ../glib/gdatetime.c:309
msgctxt "full weekday name"
msgid "Saturday"
msgstr "Sábado"
-#: ../glib/gdatetime.c:310
+#: ../glib/gdatetime.c:311
msgctxt "full weekday name"
msgid "Sunday"
msgstr "Domingo"
-#: ../glib/gdatetime.c:325
+#: ../glib/gdatetime.c:326
msgctxt "abbreviated weekday name"
msgid "Mon"
msgstr "Lun"
-#: ../glib/gdatetime.c:327
+#: ../glib/gdatetime.c:328
msgctxt "abbreviated weekday name"
msgid "Tue"
msgstr "Mar"
-#: ../glib/gdatetime.c:329
+#: ../glib/gdatetime.c:330
msgctxt "abbreviated weekday name"
msgid "Wed"
msgstr "Mié"
-#: ../glib/gdatetime.c:331
+#: ../glib/gdatetime.c:332
msgctxt "abbreviated weekday name"
msgid "Thu"
msgstr "Jue"
-#: ../glib/gdatetime.c:333
+#: ../glib/gdatetime.c:334
msgctxt "abbreviated weekday name"
msgid "Fri"
msgstr "Vie"
-#: ../glib/gdatetime.c:335
+#: ../glib/gdatetime.c:336
msgctxt "abbreviated weekday name"
msgid "Sat"
msgstr "Sáb"
-#: ../glib/gdatetime.c:337
+#: ../glib/gdatetime.c:338
msgctxt "abbreviated weekday name"
msgid "Sun"
msgstr "Dom"
#. Translators: 'before midday' indicator
-#: ../glib/gdatetime.c:354
+#: ../glib/gdatetime.c:355
msgctxt "GDateTime"
msgid "AM"
msgstr "AM"
#. Translators: 'after midday' indicator
-#: ../glib/gdatetime.c:357
+#: ../glib/gdatetime.c:358
msgctxt "GDateTime"
msgid "PM"
msgstr "PM"
@@ -4531,117 +4566,117 @@ msgstr "PM"
msgid "Error opening directory “%s”: %s"
msgstr "Falló al abrir la carpeta «%s»: %s"
-#: ../glib/gfileutils.c:706 ../glib/gfileutils.c:798
+#: ../glib/gfileutils.c:716 ../glib/gfileutils.c:808
#, c-format
msgid "Could not allocate %lu byte to read file “%s”"
msgid_plural "Could not allocate %lu bytes to read file “%s”"
msgstr[0] "No se pudo asignar %lu byte para leer el archivo «%s»"
msgstr[1] "No se pudieron asignar %lu bytes para leer el archivo «%s»"
-#: ../glib/gfileutils.c:723
+#: ../glib/gfileutils.c:733
#, c-format
msgid "Error reading file “%s”: %s"
msgstr "Error al leer el archivo %s: %s"
-#: ../glib/gfileutils.c:759
+#: ../glib/gfileutils.c:769
#, c-format
msgid "File “%s” is too large"
msgstr "El archivo «%s» es demasiado grande"
-#: ../glib/gfileutils.c:823
+#: ../glib/gfileutils.c:833
#, c-format
msgid "Failed to read from file “%s”: %s"
msgstr "Falló al leer del archivo «%s»: %s"
-#: ../glib/gfileutils.c:871 ../glib/gfileutils.c:943
+#: ../glib/gfileutils.c:881 ../glib/gfileutils.c:953
#, c-format
msgid "Failed to open file “%s”: %s"
msgstr "Falló al abrir el archivo «%s»: %s"
-#: ../glib/gfileutils.c:883
+#: ../glib/gfileutils.c:893
#, c-format
msgid "Failed to get attributes of file “%s”: fstat() failed: %s"
msgstr "Falló al obtener los atributos del archivo «%s»: fstat() falló: %s"
-#: ../glib/gfileutils.c:913
+#: ../glib/gfileutils.c:923
#, c-format
msgid "Failed to open file “%s”: fdopen() failed: %s"
msgstr "Falló al abrir el archivo «%s»: fdopen() falló: %s"
-#: ../glib/gfileutils.c:1012
+#: ../glib/gfileutils.c:1022
#, c-format
msgid "Failed to rename file “%s” to “%s”: g_rename() failed: %s"
msgstr "Falló al renombrar el archivo «%s» a «%s»: g_rename() falló: %s"
-#: ../glib/gfileutils.c:1047 ../glib/gfileutils.c:1554
+#: ../glib/gfileutils.c:1057 ../glib/gfileutils.c:1564
#, c-format
msgid "Failed to create file “%s”: %s"
msgstr "Falló al crear el archivo «%s»: %s"
-#: ../glib/gfileutils.c:1074
+#: ../glib/gfileutils.c:1084
#, c-format
msgid "Failed to write file “%s”: write() failed: %s"
msgstr "Falló al escribir el archivo «%s»: falló write(): %s"
-#: ../glib/gfileutils.c:1117
+#: ../glib/gfileutils.c:1127
#, c-format
msgid "Failed to write file “%s”: fsync() failed: %s"
msgstr "Falló al escribir el archivo «%s»: falló fsync(): %s"
-#: ../glib/gfileutils.c:1241
+#: ../glib/gfileutils.c:1251
#, c-format
msgid "Existing file “%s” could not be removed: g_unlink() failed: %s"
msgstr "El archivo existente «%s» no se pudo eliminar: g_unlink() falló: %s"
-#: ../glib/gfileutils.c:1520
+#: ../glib/gfileutils.c:1530
#, c-format
msgid "Template “%s” invalid, should not contain a “%s”"
msgstr "La plantilla «%s» no es válida, no debería contener un «%s»"
-#: ../glib/gfileutils.c:1533
+#: ../glib/gfileutils.c:1543
#, c-format
msgid "Template “%s” doesn’t contain XXXXXX"
msgstr "La plantilla «%s» no contiene XXXXXX"
-#: ../glib/gfileutils.c:2058
+#: ../glib/gfileutils.c:2079
#, c-format
msgid "Failed to read the symbolic link “%s”: %s"
msgstr "Falló al leer el enlace simbólico «%s»: %s"
-#: ../glib/giochannel.c:1388
+#: ../glib/giochannel.c:1389
#, c-format
msgid "Could not open converter from “%s” to “%s”: %s"
msgstr "No se pudo abrir el conversor de «%s» a «%s»: %s"
-#: ../glib/giochannel.c:1733
+#: ../glib/giochannel.c:1734
msgid "Can’t do a raw read in g_io_channel_read_line_string"
msgstr ""
"No se puede hacer una lectura en bruto (raw) en g_io_channel_read_line_string"
-#: ../glib/giochannel.c:1780 ../glib/giochannel.c:2038
-#: ../glib/giochannel.c:2125
+#: ../glib/giochannel.c:1781 ../glib/giochannel.c:2039
+#: ../glib/giochannel.c:2126
msgid "Leftover unconverted data in read buffer"
msgstr "Se han dejado datos no convertidos en el búfer de lectura"
-#: ../glib/giochannel.c:1861 ../glib/giochannel.c:1938
+#: ../glib/giochannel.c:1862 ../glib/giochannel.c:1939
msgid "Channel terminates in a partial character"
msgstr "El canal termina en un carácter parcial"
-#: ../glib/giochannel.c:1924
+#: ../glib/giochannel.c:1925
msgid "Can’t do a raw read in g_io_channel_read_to_end"
msgstr ""
"No se puede hacer una lectura en bruto (raw) en g_io_channel_read_to_end"
-#: ../glib/gkeyfile.c:736
+#: ../glib/gkeyfile.c:788
msgid "Valid key file could not be found in search dirs"
msgstr ""
"No se pudo encontrar la clave de archivo válida en las carpetas de búsqueda"
-#: ../glib/gkeyfile.c:773
+#: ../glib/gkeyfile.c:825
msgid "Not a regular file"
msgstr "No es un archivo regular"
-#: ../glib/gkeyfile.c:1218
+#: ../glib/gkeyfile.c:1270
#, c-format
msgid ""
"Key file contains line “%s” which is not a key-value pair, group, or comment"
@@ -4649,45 +4684,45 @@ msgstr ""
"El archivo de claves contiene la línea «%s» que no es un par valor-clave, "
"grupo o comentario"
-#: ../glib/gkeyfile.c:1275
+#: ../glib/gkeyfile.c:1327
#, c-format
msgid "Invalid group name: %s"
msgstr "Nombre de grupo no válido: %s"
-#: ../glib/gkeyfile.c:1297
+#: ../glib/gkeyfile.c:1349
msgid "Key file does not start with a group"
msgstr "El archivo de claves no empieza por un grupo"
-#: ../glib/gkeyfile.c:1323
+#: ../glib/gkeyfile.c:1375
#, c-format
msgid "Invalid key name: %s"
msgstr "Nombre de clave no válida: %s"
-#: ../glib/gkeyfile.c:1350
+#: ../glib/gkeyfile.c:1402
#, c-format
msgid "Key file contains unsupported encoding “%s”"
msgstr "El archivo de claves contiene una codificación «%s» no soportada"
-#: ../glib/gkeyfile.c:1593 ../glib/gkeyfile.c:1766 ../glib/gkeyfile.c:3146
-#: ../glib/gkeyfile.c:3209 ../glib/gkeyfile.c:3339 ../glib/gkeyfile.c:3469
-#: ../glib/gkeyfile.c:3613 ../glib/gkeyfile.c:3842 ../glib/gkeyfile.c:3909
+#: ../glib/gkeyfile.c:1645 ../glib/gkeyfile.c:1818 ../glib/gkeyfile.c:3198
+#: ../glib/gkeyfile.c:3261 ../glib/gkeyfile.c:3391 ../glib/gkeyfile.c:3521
+#: ../glib/gkeyfile.c:3665 ../glib/gkeyfile.c:3894 ../glib/gkeyfile.c:3961
#, c-format
msgid "Key file does not have group “%s”"
msgstr "El archivo de claves no tiene el grupo «%s»"
-#: ../glib/gkeyfile.c:1721
+#: ../glib/gkeyfile.c:1773
#, c-format
msgid "Key file does not have key “%s” in group “%s”"
msgstr "El archivo de claves no tiene la clave «%s» en el grupo «%s»"
-#: ../glib/gkeyfile.c:1883 ../glib/gkeyfile.c:1999
+#: ../glib/gkeyfile.c:1935 ../glib/gkeyfile.c:2051
#, c-format
msgid "Key file contains key “%s” with value “%s” which is not UTF-8"
msgstr ""
"El archivo de claves contiene la clave «%s» con el valor «%s» el cual no es "
"UTF-8"
-#: ../glib/gkeyfile.c:1903 ../glib/gkeyfile.c:2019 ../glib/gkeyfile.c:2388
+#: ../glib/gkeyfile.c:1955 ../glib/gkeyfile.c:2071 ../glib/gkeyfile.c:2440
#, c-format
msgid ""
"Key file contains key “%s” which has a value that cannot be interpreted."
@@ -4695,7 +4730,7 @@ msgstr ""
"El archivo de claves contiene la clave «%s» que tiene un valor que no se "
"puede interpretar."
-#: ../glib/gkeyfile.c:2606 ../glib/gkeyfile.c:2975
+#: ../glib/gkeyfile.c:2658 ../glib/gkeyfile.c:3027
#, c-format
msgid ""
"Key file contains key “%s” in group “%s” which has a value that cannot be "
@@ -4704,38 +4739,38 @@ msgstr ""
"El archivo de claves contiene la clave «%s» en el grupo «%s» que tiene un "
"valor que no puede interpretarse."
-#: ../glib/gkeyfile.c:2684 ../glib/gkeyfile.c:2761
+#: ../glib/gkeyfile.c:2736 ../glib/gkeyfile.c:2813
#, c-format
msgid "Key “%s” in group “%s” has value “%s” where %s was expected"
msgstr ""
"La clave «%s» en el grupo «%s» tiene el valor «%s», pero se esperaba %s"
-#: ../glib/gkeyfile.c:4149
+#: ../glib/gkeyfile.c:4201
msgid "Key file contains escape character at end of line"
msgstr ""
"El archivo de claves contiene un carácter de escape al final de la línea"
-#: ../glib/gkeyfile.c:4171
+#: ../glib/gkeyfile.c:4223
#, c-format
msgid "Key file contains invalid escape sequence “%s”"
msgstr "El archivo de claves contiene la secuencia de escape no válida «%s»"
-#: ../glib/gkeyfile.c:4315
+#: ../glib/gkeyfile.c:4367
#, c-format
msgid "Value “%s” cannot be interpreted as a number."
msgstr "El valor «%s» no puede interpretarse como un número."
-#: ../glib/gkeyfile.c:4329
+#: ../glib/gkeyfile.c:4381
#, c-format
msgid "Integer value “%s” out of range"
msgstr "El valor entero «%s» está fuera de rango"
-#: ../glib/gkeyfile.c:4362
+#: ../glib/gkeyfile.c:4414
#, c-format
msgid "Value “%s” cannot be interpreted as a float number."
msgstr "El valor «%s» no puede interpretarse como un número de coma flotante."
-#: ../glib/gkeyfile.c:4401
+#: ../glib/gkeyfile.c:4453
#, c-format
msgid "Value “%s” cannot be interpreted as a boolean."
msgstr "El valor «%s» no puede interpretarse como un booleano."
@@ -5435,77 +5470,77 @@ msgstr ""
msgid "Text was empty (or contained only whitespace)"
msgstr "El texto está vacío (o sólo contiene espacios en blanco)"
-#: ../glib/gspawn.c:250
+#: ../glib/gspawn.c:253
#, c-format
msgid "Failed to read data from child process (%s)"
msgstr "Falló en la lectura de datos desde el proceso hijo (%s)"
-#: ../glib/gspawn.c:394
+#: ../glib/gspawn.c:401
#, c-format
msgid "Unexpected error in select() reading data from a child process (%s)"
msgstr "Falló inesperado en select() leyendo datos desde el proceso hijo (%s)"
-#: ../glib/gspawn.c:479
+#: ../glib/gspawn.c:486
#, c-format
msgid "Unexpected error in waitpid() (%s)"
msgstr "Falló inesperado en waitpid() (%s)"
-#: ../glib/gspawn.c:886 ../glib/gspawn-win32.c:1231
+#: ../glib/gspawn.c:897 ../glib/gspawn-win32.c:1231
#, c-format
msgid "Child process exited with code %ld"
msgstr "El proceso hijo terminó con el código %ld"
-#: ../glib/gspawn.c:894
+#: ../glib/gspawn.c:905
#, c-format
msgid "Child process killed by signal %ld"
msgstr "El proceso hijo terminado por la señal %ld"
-#: ../glib/gspawn.c:901
+#: ../glib/gspawn.c:912
#, c-format
msgid "Child process stopped by signal %ld"
msgstr "El proceso hijo se detuvo por la señal %ld"
-#: ../glib/gspawn.c:908
+#: ../glib/gspawn.c:919
#, c-format
msgid "Child process exited abnormally"
msgstr "El proceso hijo terminó de forma anormal"
-#: ../glib/gspawn.c:1313 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
+#: ../glib/gspawn.c:1324 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
#, c-format
msgid "Failed to read from child pipe (%s)"
msgstr "Falló al leer desde el conducto hijo (%s)"
-#: ../glib/gspawn.c:1383
+#: ../glib/gspawn.c:1394
#, c-format
msgid "Failed to fork (%s)"
msgstr "Falló al bifurcar (fork) (%s)"
-#: ../glib/gspawn.c:1532 ../glib/gspawn-win32.c:368
+#: ../glib/gspawn.c:1543 ../glib/gspawn-win32.c:368
#, c-format
msgid "Failed to change to directory “%s” (%s)"
msgstr "Falló al cambiar a la carpeta «%s» (%s)"
-#: ../glib/gspawn.c:1542
+#: ../glib/gspawn.c:1553
#, c-format
msgid "Failed to execute child process “%s” (%s)"
msgstr "Falló al ejecutar el proceso hijo «%s» (%s)"
-#: ../glib/gspawn.c:1552
+#: ../glib/gspawn.c:1563
#, c-format
msgid "Failed to redirect output or input of child process (%s)"
msgstr "Falló al redirigir la salida o la entrada del proceso hijo (%s)"
-#: ../glib/gspawn.c:1561
+#: ../glib/gspawn.c:1572
#, c-format
msgid "Failed to fork child process (%s)"
msgstr "Falló al bifurcar el proceso hijo (%s)"
-#: ../glib/gspawn.c:1569
+#: ../glib/gspawn.c:1580
#, c-format
msgid "Unknown error executing child process “%s”"
msgstr "Error desconocido al ejecutar el proceso hijo «%s»"
-#: ../glib/gspawn.c:1593
+#: ../glib/gspawn.c:1604
#, c-format
msgid "Failed to read enough data from child pid pipe (%s)"
msgstr "Falló al leer suficientes datos desde el conducto del pid hijo (%s)"
@@ -5595,91 +5630,191 @@ msgstr "Secuencia no válida en la entrada de conversión"
msgid "Character out of range for UTF-16"
msgstr "El carácter se sale del rango para UTF-16"
-#: ../glib/gutils.c:2149 ../glib/gutils.c:2176 ../glib/gutils.c:2282
+#: ../glib/gutils.c:2227
#, c-format
-msgid "%u byte"
-msgid_plural "%u bytes"
-msgstr[0] "%u byte"
-msgstr[1] "%u bytes"
+msgid "%.1f kB"
+msgstr "%.1f kB"
+
+#: ../glib/gutils.c:2228 ../glib/gutils.c:2434
+#, c-format
+msgid "%.1f MB"
+msgstr "%.1f MB"
+
+#: ../glib/gutils.c:2229 ../glib/gutils.c:2439
+#, c-format
+msgid "%.1f GB"
+msgstr "%.1f GB"
+
+#: ../glib/gutils.c:2230 ../glib/gutils.c:2444
+#, c-format
+msgid "%.1f TB"
+msgstr "%.1f TB"
+
+#: ../glib/gutils.c:2231 ../glib/gutils.c:2449
+#, c-format
+msgid "%.1f PB"
+msgstr "%.1f PB"
+
+#: ../glib/gutils.c:2232 ../glib/gutils.c:2454
+#, c-format
+msgid "%.1f EB"
+msgstr "%.1f EB"
-#: ../glib/gutils.c:2155
+#: ../glib/gutils.c:2235
#, c-format
msgid "%.1f KiB"
msgstr "%.1f KiB"
-#: ../glib/gutils.c:2157
+#: ../glib/gutils.c:2236
#, c-format
msgid "%.1f MiB"
msgstr "%.1f MiB"
-#: ../glib/gutils.c:2160
+#: ../glib/gutils.c:2237
#, c-format
msgid "%.1f GiB"
msgstr "%.1f GiB"
-#: ../glib/gutils.c:2163
+#: ../glib/gutils.c:2238
#, c-format
msgid "%.1f TiB"
msgstr "%.1f TiB"
-#: ../glib/gutils.c:2166
+#: ../glib/gutils.c:2239
#, c-format
msgid "%.1f PiB"
msgstr "%.1f PiB"
-#: ../glib/gutils.c:2169
+#: ../glib/gutils.c:2240
#, c-format
msgid "%.1f EiB"
msgstr "%.1f EiB"
-#: ../glib/gutils.c:2182
+#: ../glib/gutils.c:2243
#, c-format
-msgid "%.1f kB"
-msgstr "%.1f kB"
+#| msgid "%.1f kB"
+msgid "%.1f kb"
+msgstr "%.1f kb"
-#: ../glib/gutils.c:2185 ../glib/gutils.c:2300
+#: ../glib/gutils.c:2244
#, c-format
-msgid "%.1f MB"
-msgstr "%.1f MB"
+#| msgid "%.1f MB"
+msgid "%.1f Mb"
+msgstr "%.1f Mb"
-#: ../glib/gutils.c:2188 ../glib/gutils.c:2305
+#: ../glib/gutils.c:2245
#, c-format
-msgid "%.1f GB"
-msgstr "%.1f GB"
+#| msgid "%.1f GB"
+msgid "%.1f Gb"
+msgstr "%.1f Gb"
-#: ../glib/gutils.c:2190 ../glib/gutils.c:2310
+#: ../glib/gutils.c:2246
#, c-format
-msgid "%.1f TB"
-msgstr "%.1f TB"
+#| msgid "%.1f TB"
+msgid "%.1f Tb"
+msgstr "%.1f Tb"
-#: ../glib/gutils.c:2193 ../glib/gutils.c:2315
+#: ../glib/gutils.c:2247
#, c-format
-msgid "%.1f PB"
-msgstr "%.1f PB"
+#| msgid "%.1f PB"
+msgid "%.1f Pb"
+msgstr "%.1f Pb"
-#: ../glib/gutils.c:2196 ../glib/gutils.c:2320
+#: ../glib/gutils.c:2248
#, c-format
-msgid "%.1f EB"
-msgstr "%.1f EB"
+#| msgid "%.1f EB"
+msgid "%.1f Eb"
+msgstr "%.1f Eb"
+
+#: ../glib/gutils.c:2251
+#, c-format
+#| msgid "%.1f KiB"
+msgid "%.1f Kib"
+msgstr "%.1f Kib"
+
+#: ../glib/gutils.c:2252
+#, c-format
+#| msgid "%.1f MiB"
+msgid "%.1f Mib"
+msgstr "%.1f Mib"
+
+#: ../glib/gutils.c:2253
+#, c-format
+#| msgid "%.1f GiB"
+msgid "%.1f Gib"
+msgstr "%.1f Gib"
+
+#: ../glib/gutils.c:2254
+#, c-format
+#| msgid "%.1f TiB"
+msgid "%.1f Tib"
+msgstr "%.1f Tib"
+
+#: ../glib/gutils.c:2255
+#, c-format
+#| msgid "%.1f PiB"
+msgid "%.1f Pib"
+msgstr "%.1f Pib"
+
+#: ../glib/gutils.c:2256
+#, c-format
+#| msgid "%.1f EiB"
+msgid "%.1f Eib"
+msgstr "%.1f Eib"
+
+#: ../glib/gutils.c:2290 ../glib/gutils.c:2416
+#, c-format
+msgid "%u byte"
+msgid_plural "%u bytes"
+msgstr[0] "%u byte"
+msgstr[1] "%u bytes"
+
+#: ../glib/gutils.c:2294
+#, c-format
+#| msgid "%u byte"
+#| msgid_plural "%u bytes"
+msgid "%u bit"
+msgid_plural "%u bits"
+msgstr[0] "%u bit"
+msgstr[1] "%u bits"
#. Translators: the %s in "%s bytes" will always be replaced by a number.
-#: ../glib/gutils.c:2233
+#: ../glib/gutils.c:2361
#, c-format
msgid "%s byte"
msgid_plural "%s bytes"
msgstr[0] "%s byte"
msgstr[1] "%s bytes"
+#. Translators: the %s in "%s bits" will always be replaced by a number.
+#: ../glib/gutils.c:2366
+#, c-format
+#| msgid "%s byte"
+#| msgid_plural "%s bytes"
+msgid "%s bit"
+msgid_plural "%s bits"
+msgstr[0] "%s bit"
+msgstr[1] "%s bits"
+
#. Translators: this is from the deprecated function g_format_size_for_display() which uses 'KB' to
#. * mean 1024 bytes. I am aware that 'KB' is not correct, but it has been preserved for reasons of
#. * compatibility. Users will not see this string unless a program is using this deprecated function.
#. * Please translate as literally as possible.
#.
-#: ../glib/gutils.c:2295
+#: ../glib/gutils.c:2429
#, c-format
msgid "%.1f KB"
msgstr "%.1f KB"
+#~ msgid "Error: object path not specified.\n"
+#~ msgstr "Error: no se especificó la ruta del objeto.\n"
+
+#~ msgid "Error: signal not specified.\n"
+#~ msgstr "Error: no se especificó la señal.\n"
+
+#~ msgid "Error: signal must be the fully-qualified name.\n"
+#~ msgstr "Error: la señal debe ser el nombre completamente cualificado.\n"
+
#~ msgid "No such interface"
#~ msgstr "No existe tal interfaz"
diff --git a/po/nb.po b/po/nb.po
index 68ad8eaa9..7e4f812e6 100644
--- a/po/nb.po
+++ b/po/nb.po
@@ -7,9 +7,10 @@
msgid ""
msgstr ""
"Project-Id-Version: glib 2.54.x\n"
-"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?product=glib&keywords=I18N+L10N&component=general\n"
-"POT-Creation-Date: 2017-09-11 18:30+0000\n"
-"PO-Revision-Date: 2017-11-06 13:56+0100\n"
+"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
+"product=glib&keywords=I18N+L10N&component=general\n"
+"POT-Creation-Date: 2017-11-06 12:56+0000\n"
+"PO-Revision-Date: 2017-11-11 17:09+0100\n"
"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
"Language-Team: Norwegian bokmål <i18n-nb@lister.ping.uio.no>\n"
"Language: nb\n"
@@ -278,8 +279,8 @@ msgid "Truncate not supported on base stream"
msgstr "Avkorting er ikke støttet på grunnstrøm"
#: ../gio/gcancellable.c:317 ../gio/gdbusconnection.c:1849
-#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:870
-#: ../gio/gsimpleasyncresult.c:896
+#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:871
+#: ../gio/gsimpleasyncresult.c:897
#, c-format
msgid "Operation was cancelled"
msgstr "Operasjonen ble avbrutt"
@@ -309,7 +310,7 @@ msgstr "Ugyldig bytesekvens i inndata for konvertering"
msgid "Error during conversion: %s"
msgstr "Feil under konvertering: %s"
-#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1096
+#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1101
msgid "Cancellable initialization not supported"
msgstr "Avbrytbar initiering er ikke støttet"
@@ -540,7 +541,7 @@ msgstr ""
"Brukte opp alle tilgjengelige autentiseringsmekanismer (forsøkt: %s) "
"(tilgjengelig: %s)"
-#: ../gio/gdbusauth.c:1174
+#: ../gio/gdbusauth.c:1171
msgid "Cancelled via GDBusAuthObserver::authorize-authenticated-peer"
msgstr "Avbrutt via GDBusAuthObserver::authorize-authenticated-peer"
@@ -566,12 +567,12 @@ msgstr "Feil under oppretting av katalog «%s»: %s"
msgid "Error opening keyring “%s” for reading: "
msgstr "Feil under åpning av nøkkelring «%s» for lesing: "
-#: ../gio/gdbusauthmechanismsha1.c:403 ../gio/gdbusauthmechanismsha1.c:721
+#: ../gio/gdbusauthmechanismsha1.c:402 ../gio/gdbusauthmechanismsha1.c:720
#, c-format
msgid "Line %d of the keyring at “%s” with content “%s” is malformed"
msgstr "Linje %d av nøkkelring ved «%s» med innhold «%s» er feilutformet"
-#: ../gio/gdbusauthmechanismsha1.c:417 ../gio/gdbusauthmechanismsha1.c:735
+#: ../gio/gdbusauthmechanismsha1.c:416 ../gio/gdbusauthmechanismsha1.c:734
#, c-format
msgid ""
"First token of line %d of the keyring at “%s” with content “%s” is malformed"
@@ -579,7 +580,7 @@ msgstr ""
"Første symbol på linje %d av nøkkelring ved «%s» med innhold «%s» er "
"feilutformet"
-#: ../gio/gdbusauthmechanismsha1.c:432 ../gio/gdbusauthmechanismsha1.c:749
+#: ../gio/gdbusauthmechanismsha1.c:430 ../gio/gdbusauthmechanismsha1.c:748
#, c-format
msgid ""
"Second token of line %d of the keyring at “%s” with content “%s” is malformed"
@@ -587,7 +588,7 @@ msgstr ""
"Andre symbol av linje %d i nøkkelring ved «%s» med innhold «%s» er "
"feilutformet"
-#: ../gio/gdbusauthmechanismsha1.c:456
+#: ../gio/gdbusauthmechanismsha1.c:454
#, c-format
msgid "Didn’t find cookie with id %d in the keyring at “%s”"
msgstr "Fant ingen informasjonskapsel med id %d i nøkkelring ved «%s»"
@@ -597,27 +598,27 @@ msgstr "Fant ingen informasjonskapsel med id %d i nøkkelring ved «%s»"
msgid "Error deleting stale lock file “%s”: %s"
msgstr "Feil under sletting av gammel låsfil «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:569
+#: ../gio/gdbusauthmechanismsha1.c:568
#, c-format
msgid "Error creating lock file “%s”: %s"
msgstr "Feil under oppretting av låsfil «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:600
+#: ../gio/gdbusauthmechanismsha1.c:599
#, c-format
msgid "Error closing (unlinked) lock file “%s”: %s"
msgstr "Feil under lukking av (unlink()et) låsfil «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:611
+#: ../gio/gdbusauthmechanismsha1.c:610
#, c-format
msgid "Error unlinking lock file “%s”: %s"
msgstr "Feil under unlink()ing av låsfil «%s»: %s"
-#: ../gio/gdbusauthmechanismsha1.c:688
+#: ../gio/gdbusauthmechanismsha1.c:687
#, c-format
msgid "Error opening keyring “%s” for writing: "
msgstr "Feil under åpning av nøkkelring «%s» for skriving: "
-#: ../gio/gdbusauthmechanismsha1.c:885
+#: ../gio/gdbusauthmechanismsha1.c:883
#, c-format
msgid "(Additionally, releasing the lock for “%s” also failed: %s) "
msgstr "(I tillegg feilet frislipp av lås for «%s» også: %s) "
@@ -780,17 +781,17 @@ msgstr ""
"(lengden av strengen er %d). Gydldig UTF-8 streng opp til det punktet var "
"«%s»"
-#: ../gio/gdbusmessage.c:1589
+#: ../gio/gdbusmessage.c:1593
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus object path"
msgstr "Lest verdi «%s» er ikke en gyldig objektsti for D-Bus"
-#: ../gio/gdbusmessage.c:1611
+#: ../gio/gdbusmessage.c:1615
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature"
msgstr "Tolket verdi «%s» er ikke en gyldig D-Bus-signatur"
-#: ../gio/gdbusmessage.c:1658
+#: ../gio/gdbusmessage.c:1662
#, c-format
msgid ""
"Encountered array of length %u byte. Maximum length is 2<<26 bytes (64 MiB)."
@@ -801,7 +802,7 @@ msgstr[0] ""
msgstr[1] ""
"Fant en array med lengde %u bytes. Maksimal lengde er 2<<26 byte (64 MiB)."
-#: ../gio/gdbusmessage.c:1678
+#: ../gio/gdbusmessage.c:1682
#, c-format
msgid ""
"Encountered array of type “a%c”, expected to have a length a multiple of %u "
@@ -810,19 +811,19 @@ msgstr ""
"Fant en matrise av type «a%c» som var forventet å ha en lengde som er en "
"multippel av %u bytes, men var %u bytes lang"
-#: ../gio/gdbusmessage.c:1845
+#: ../gio/gdbusmessage.c:1849
#, c-format
msgid "Parsed value “%s” for variant is not a valid D-Bus signature"
msgstr "Lest verdi «%s» for variant er ikke en gyldig D-Bus-signatur"
-#: ../gio/gdbusmessage.c:1869
+#: ../gio/gdbusmessage.c:1873
#, c-format
msgid ""
"Error deserializing GVariant with type string “%s” from the D-Bus wire format"
msgstr ""
"Feil ved deserialisering av GVariant med strengtype «%s» fra D-Bus-format"
-#: ../gio/gdbusmessage.c:2053
+#: ../gio/gdbusmessage.c:2055
#, c-format
msgid ""
"Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value "
@@ -831,22 +832,22 @@ msgstr ""
"Ugyldig verdi for endianness. Forventet 0x6c ('l') eller 0x42 ('B'), men "
"fant verdien 0x%02x"
-#: ../gio/gdbusmessage.c:2066
+#: ../gio/gdbusmessage.c:2068
#, c-format
msgid "Invalid major protocol version. Expected 1 but found %d"
msgstr "Ugyldig hovedversjon for protokoll. Forventet en men fikk %d"
-#: ../gio/gdbusmessage.c:2122
+#: ../gio/gdbusmessage.c:2124
#, c-format
msgid "Signature header with signature “%s” found but message body is empty"
msgstr "Signaturtopptekst med signatur «%s» funnet, men meldingskroppen er tom"
-#: ../gio/gdbusmessage.c:2136
+#: ../gio/gdbusmessage.c:2138
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature (for body)"
msgstr "Lest verdi «%s» er ikke en gyldig D-Bus-signatur (for kropp)"
-#: ../gio/gdbusmessage.c:2166
+#: ../gio/gdbusmessage.c:2168
#, c-format
msgid "No signature header in message but the message body is %u byte"
msgid_plural "No signature header in message but the message body is %u bytes"
@@ -854,18 +855,18 @@ msgstr[0] "Ingen signaturtopptekst i meldingen, men meldingskroppen er %u byte"
msgstr[1] ""
"Ingen signaturtopptekst i meldingen, men meldingskroppen er %u bytes"
-#: ../gio/gdbusmessage.c:2176
+#: ../gio/gdbusmessage.c:2178
msgid "Cannot deserialize message: "
msgstr "Kan ikke deserialisere melding: "
-#: ../gio/gdbusmessage.c:2517
+#: ../gio/gdbusmessage.c:2519
#, c-format
msgid ""
"Error serializing GVariant with type string “%s” to the D-Bus wire format"
msgstr ""
"Feil ved serialisering av GVariant med strengtype «%s» til D-Bus-format"
-#: ../gio/gdbusmessage.c:2654
+#: ../gio/gdbusmessage.c:2656
#, c-format
msgid ""
"Message has %d file descriptors but the header field indicates %d file "
@@ -874,17 +875,17 @@ msgstr ""
"Meldingen har %d fildeskriptorer men topptekstfeltet indikerer %d "
"fildeskriptorer"
-#: ../gio/gdbusmessage.c:2662
+#: ../gio/gdbusmessage.c:2664
msgid "Cannot serialize message: "
msgstr "Kan ikke serialisere melding: "
-#: ../gio/gdbusmessage.c:2706
+#: ../gio/gdbusmessage.c:2708
#, c-format
msgid "Message body has signature “%s” but there is no signature header"
msgstr ""
"Meldingskroppen har signatur «%s» men det finnes ingen signaturtopptekst"
-#: ../gio/gdbusmessage.c:2716
+#: ../gio/gdbusmessage.c:2718
#, c-format
msgid ""
"Message body has type signature “%s” but signature in the header field is "
@@ -893,17 +894,17 @@ msgstr ""
"Meldingskroppen har signaturtype «%s», men signaturen i topptekstfeltet et "
"«%s»"
-#: ../gio/gdbusmessage.c:2732
+#: ../gio/gdbusmessage.c:2734
#, c-format
msgid "Message body is empty but signature in the header field is “(%s)”"
msgstr "Meldingskroppen er tom men signatur i topptekstfeltet er «(%s)»"
-#: ../gio/gdbusmessage.c:3285
+#: ../gio/gdbusmessage.c:3287
#, c-format
msgid "Error return with body of type “%s”"
msgstr "Feil retur med kropp av type «%s»"
-#: ../gio/gdbusmessage.c:3293
+#: ../gio/gdbusmessage.c:3295
msgid "Error return with empty body"
msgstr "Feil retur med tom kropp"
@@ -980,61 +981,61 @@ msgstr ""
" \n"
"Bruk «%s COMMAND --help» for å få hjelp om hver kommando.\n"
-#: ../gio/gdbus-tool.c:165 ../gio/gdbus-tool.c:227 ../gio/gdbus-tool.c:299
-#: ../gio/gdbus-tool.c:323 ../gio/gdbus-tool.c:725 ../gio/gdbus-tool.c:1068
-#: ../gio/gdbus-tool.c:1510
+#: ../gio/gdbus-tool.c:167 ../gio/gdbus-tool.c:234 ../gio/gdbus-tool.c:306
+#: ../gio/gdbus-tool.c:330 ../gio/gdbus-tool.c:811 ../gio/gdbus-tool.c:1150
+#: ../gio/gdbus-tool.c:1592
#, c-format
msgid "Error: %s\n"
msgstr "Feil: %s\n"
-#: ../gio/gdbus-tool.c:176 ../gio/gdbus-tool.c:240 ../gio/gdbus-tool.c:1526
+#: ../gio/gdbus-tool.c:178 ../gio/gdbus-tool.c:247 ../gio/gdbus-tool.c:1608
#, c-format
msgid "Error parsing introspection XML: %s\n"
msgstr "Feil under tolking av introspeksjons-XML: %s\n"
-#: ../gio/gdbus-tool.c:209
+#: ../gio/gdbus-tool.c:216
#, c-format
msgid "Error: %s is not a valid name\n"
msgstr "Feil: %s er ikke et gyldig navn\n"
-#: ../gio/gdbus-tool.c:357
+#: ../gio/gdbus-tool.c:364
msgid "Connect to the system bus"
msgstr "Koble til systembussen"
-#: ../gio/gdbus-tool.c:358
+#: ../gio/gdbus-tool.c:365
msgid "Connect to the session bus"
msgstr "Koble til øktbussen"
-#: ../gio/gdbus-tool.c:359
+#: ../gio/gdbus-tool.c:366
msgid "Connect to given D-Bus address"
msgstr "Koble til gitt D-Bus-adresse"
-#: ../gio/gdbus-tool.c:369
+#: ../gio/gdbus-tool.c:376
msgid "Connection Endpoint Options:"
msgstr "Alternativer for tilkoblingssluttpunkt:"
-#: ../gio/gdbus-tool.c:370
+#: ../gio/gdbus-tool.c:377
msgid "Options specifying the connection endpoint"
msgstr "Alternativer som spesifiserer sluttpunkt for tilkobling"
-#: ../gio/gdbus-tool.c:392
+#: ../gio/gdbus-tool.c:399
#, c-format
msgid "No connection endpoint specified"
msgstr "Sluttpunkt for tilkobling ikke oppgitt"
-#: ../gio/gdbus-tool.c:402
+#: ../gio/gdbus-tool.c:409
#, c-format
msgid "Multiple connection endpoints specified"
msgstr "Flere sluttpunkt oppgitt for tilkobling"
-#: ../gio/gdbus-tool.c:472
+#: ../gio/gdbus-tool.c:479
#, c-format
msgid ""
"Warning: According to introspection data, interface “%s” does not exist\n"
msgstr ""
"Advarsel: I følge introspeksjonsdata eksisterer ikke grensesnitt «%s»\n"
-#: ../gio/gdbus-tool.c:481
+#: ../gio/gdbus-tool.c:488
#, c-format
msgid ""
"Warning: According to introspection data, method “%s” does not exist on "
@@ -1043,195 +1044,196 @@ msgstr ""
"Advarsel: I følge introspeksjonsdata eksisterer ikke metode «%s» på "
"grensesnitt «%s»\n"
-#: ../gio/gdbus-tool.c:543
+#: ../gio/gdbus-tool.c:550
msgid "Optional destination for signal (unique name)"
msgstr "Valgfri destinasjon for signal (unikt navn)"
-#: ../gio/gdbus-tool.c:544
+#: ../gio/gdbus-tool.c:551
msgid "Object path to emit signal on"
msgstr "Objektsti signal skal sendes ut på"
-#: ../gio/gdbus-tool.c:545
+#: ../gio/gdbus-tool.c:552
msgid "Signal and interface name"
msgstr "Navn på signal og grensesnitt"
-#: ../gio/gdbus-tool.c:579
+#: ../gio/gdbus-tool.c:587
msgid "Emit a signal."
msgstr "Send ut et signal."
-#: ../gio/gdbus-tool.c:613 ../gio/gdbus-tool.c:858 ../gio/gdbus-tool.c:1616
-#: ../gio/gdbus-tool.c:1851 ../gio/gdbus-tool.c:2067
+#: ../gio/gdbus-tool.c:642 ../gio/gdbus-tool.c:944 ../gio/gdbus-tool.c:1698
+#: ../gio/gdbus-tool.c:1931 ../gio/gdbus-tool.c:2152
#, c-format
msgid "Error connecting: %s\n"
msgstr "Feil under tilkobling: %s\n"
-#: ../gio/gdbus-tool.c:625
+#: ../gio/gdbus-tool.c:659 ../gio/gdbus-tool.c:961 ../gio/gdbus-tool.c:1715
+#: ../gio/gdbus-tool.c:1956
#, c-format
-msgid "Error: object path not specified.\n"
-msgstr "Feil: Objektsti er ikke oppgitt.\n"
+msgid "Error: Destination is not specified\n"
+msgstr "Feil: Mål er ikke oppgitt\n"
-#: ../gio/gdbus-tool.c:630 ../gio/gdbus-tool.c:925 ../gio/gdbus-tool.c:1681
-#: ../gio/gdbus-tool.c:1917
+#: ../gio/gdbus-tool.c:670
+#, c-format
+msgid "Error: %s is not a valid unique bus name.\n"
+msgstr "Feil: %s er ikke et gyldig unikt bussnavn.\n"
+
+#: ../gio/gdbus-tool.c:685 ../gio/gdbus-tool.c:987 ../gio/gdbus-tool.c:1741
+#, c-format
+msgid "Error: Object path is not specified\n"
+msgstr "Feil: Objektsti er ikke oppgitt\n"
+
+#: ../gio/gdbus-tool.c:705 ../gio/gdbus-tool.c:1007 ../gio/gdbus-tool.c:1761
+#: ../gio/gdbus-tool.c:2002
#, c-format
msgid "Error: %s is not a valid object path\n"
msgstr "Feil: %s er ikke en gyldig objektsti\n"
-#: ../gio/gdbus-tool.c:636
+#: ../gio/gdbus-tool.c:720
#, c-format
-msgid "Error: signal not specified.\n"
-msgstr "Feil: signal er ikke oppgitt.\n"
+msgid "Error: Signal name is not specified\n"
+msgstr "Feil: Signalnavn er ikke oppgitt\n"
-#: ../gio/gdbus-tool.c:643
+#: ../gio/gdbus-tool.c:731
#, c-format
-msgid "Error: signal must be the fully-qualified name.\n"
-msgstr "Feil: signalet må være et full-kvalifisert navn.\n"
+msgid "Error: Signal name “%s” is invalid\n"
+msgstr "Feil: Signalnavn «%s» er ugyldig\n"
-#: ../gio/gdbus-tool.c:651
+#: ../gio/gdbus-tool.c:743
#, c-format
msgid "Error: %s is not a valid interface name\n"
msgstr "Feil: %s er ikke en gyldig navn på grensesnitt\n"
-#: ../gio/gdbus-tool.c:657
+#: ../gio/gdbus-tool.c:749
#, c-format
msgid "Error: %s is not a valid member name\n"
msgstr "Feil: %s er ikke et gyldig medlemsnavn\n"
-#: ../gio/gdbus-tool.c:663
-#, c-format
-msgid "Error: %s is not a valid unique bus name.\n"
-msgstr "Feil: %s er ikke et gyldig unikt bussnavn.\n"
-
#. Use the original non-"parse-me-harder" error
-#: ../gio/gdbus-tool.c:700 ../gio/gdbus-tool.c:1037
+#: ../gio/gdbus-tool.c:786 ../gio/gdbus-tool.c:1119
#, c-format
msgid "Error parsing parameter %d: %s\n"
msgstr "Feil under tolking av parameter %d: %s\n"
-#: ../gio/gdbus-tool.c:732
+#: ../gio/gdbus-tool.c:818
#, c-format
msgid "Error flushing connection: %s\n"
msgstr "Feil ved nullstilling av tilkobling: %s\n"
-#: ../gio/gdbus-tool.c:759
+#: ../gio/gdbus-tool.c:845
msgid "Destination name to invoke method on"
msgstr "Målnavn metoden skal invokeres på"
-#: ../gio/gdbus-tool.c:760
+#: ../gio/gdbus-tool.c:846
msgid "Object path to invoke method on"
msgstr "Objektsti metoden skal invokeres på"
-#: ../gio/gdbus-tool.c:761
+#: ../gio/gdbus-tool.c:847
msgid "Method and interface name"
msgstr "Navn på metode og grensesnitt"
-#: ../gio/gdbus-tool.c:762
+#: ../gio/gdbus-tool.c:848
msgid "Timeout in seconds"
msgstr "Tidsavbrudd i sekunder"
-#: ../gio/gdbus-tool.c:803
+#: ../gio/gdbus-tool.c:889
msgid "Invoke a method on a remote object."
msgstr "Kjør en metode på et eksternt objekt."
-#: ../gio/gdbus-tool.c:878 ../gio/gdbus-tool.c:1635 ../gio/gdbus-tool.c:1870
-#, c-format
-msgid "Error: Destination is not specified\n"
-msgstr "Feil: Mål er ikke oppgitt\n"
-
-#: ../gio/gdbus-tool.c:890 ../gio/gdbus-tool.c:1652 ../gio/gdbus-tool.c:1882
+#: ../gio/gdbus-tool.c:972 ../gio/gdbus-tool.c:1732 ../gio/gdbus-tool.c:1967
#, c-format
msgid "Error: %s is not a valid bus name\n"
msgstr "Feil: %s er ikke et gyldig navn på buss\n"
-#: ../gio/gdbus-tool.c:905 ../gio/gdbus-tool.c:1661
-#, c-format
-msgid "Error: Object path is not specified\n"
-msgstr "Feil: Objektsti er ikke oppgitt\n"
-
-#: ../gio/gdbus-tool.c:940
+#: ../gio/gdbus-tool.c:1022
#, c-format
msgid "Error: Method name is not specified\n"
msgstr "Feil: metodenavn er ikke oppgitt\n"
-#: ../gio/gdbus-tool.c:951
+#: ../gio/gdbus-tool.c:1033
#, c-format
msgid "Error: Method name “%s” is invalid\n"
msgstr "Feil: metodenavn «%s» er ugyldig\n"
-#: ../gio/gdbus-tool.c:1029
+#: ../gio/gdbus-tool.c:1111
#, c-format
msgid "Error parsing parameter %d of type “%s”: %s\n"
msgstr "Feil under tolking av parameter %d av type «%s»: %s\n"
-#: ../gio/gdbus-tool.c:1473
+#: ../gio/gdbus-tool.c:1555
msgid "Destination name to introspect"
msgstr "Målnavn som skal inspiseres"
-#: ../gio/gdbus-tool.c:1474
+#: ../gio/gdbus-tool.c:1556
msgid "Object path to introspect"
msgstr "Objektsti som skal inspiseres"
-#: ../gio/gdbus-tool.c:1475
+#: ../gio/gdbus-tool.c:1557
msgid "Print XML"
msgstr "Skriv ut XML"
-#: ../gio/gdbus-tool.c:1476
+#: ../gio/gdbus-tool.c:1558
msgid "Introspect children"
msgstr "Bruk introspeksjon for barn"
-#: ../gio/gdbus-tool.c:1477
+#: ../gio/gdbus-tool.c:1559
msgid "Only print properties"
msgstr "Skriv kun ut egenskaper"
-#: ../gio/gdbus-tool.c:1568
+#: ../gio/gdbus-tool.c:1650
msgid "Introspect a remote object."
msgstr "Inspiser et eksternt objekt."
-#: ../gio/gdbus-tool.c:1773
+#: ../gio/gdbus-tool.c:1853
msgid "Destination name to monitor"
msgstr "Navn på mål som skal overvåkes"
-#: ../gio/gdbus-tool.c:1774
+#: ../gio/gdbus-tool.c:1854
msgid "Object path to monitor"
msgstr "Objektsti som skal overvåkes"
-#: ../gio/gdbus-tool.c:1803
+#: ../gio/gdbus-tool.c:1883
msgid "Monitor a remote object."
msgstr "Overvåk et eksternt objekt."
-#: ../gio/gdbus-tool.c:1980
+#: ../gio/gdbus-tool.c:1941
+#, c-format
+msgid "Error: can’t monitor a non-message-bus connection\n"
+msgstr ""
+
+#: ../gio/gdbus-tool.c:2065
msgid "Service to activate before waiting for the other one (well-known name)"
msgstr ""
-#: ../gio/gdbus-tool.c:1983
+#: ../gio/gdbus-tool.c:2068
msgid ""
"Timeout to wait for before exiting with an error (seconds); 0 for no timeout "
"(default)"
msgstr ""
-#: ../gio/gdbus-tool.c:2031
+#: ../gio/gdbus-tool.c:2116
msgid "[OPTION…] BUS-NAME"
msgstr "[FLAGG …] BUSS-NAVN"
-#: ../gio/gdbus-tool.c:2033
+#: ../gio/gdbus-tool.c:2118
msgid "Wait for a bus name to appear."
msgstr "Vent på et bussnavn."
-#: ../gio/gdbus-tool.c:2109
+#: ../gio/gdbus-tool.c:2194
#, c-format
msgid "Error: A service to activate for must be specified.\n"
msgstr "Feil: En tjeneste å aktivere for må oppgis.\n"
-#: ../gio/gdbus-tool.c:2114
+#: ../gio/gdbus-tool.c:2199
#, c-format
msgid "Error: A service to wait for must be specified.\n"
msgstr "Feil: En tjeneste å vente på må oppgis.\n"
-#: ../gio/gdbus-tool.c:2119
+#: ../gio/gdbus-tool.c:2204
#, c-format
msgid "Error: Too many arguments.\n"
msgstr "Feil: For mange argumenter.\n"
-#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134
+#: ../gio/gdbus-tool.c:2212 ../gio/gdbus-tool.c:2219
#, c-format
msgid "Error: %s is not a valid well-known bus name.\n"
msgstr "Feil: %s er ikke et gyldig og velkjent navn på en buss.\n"
@@ -1335,7 +1337,7 @@ msgstr "Ventet et GEmblem for GEmblemedIcon"
#: ../gio/gfile.c:3893 ../gio/gfile.c:3935 ../gio/gfile.c:4403
#: ../gio/gfile.c:4814 ../gio/gfile.c:4899 ../gio/gfile.c:4989
#: ../gio/gfile.c:5086 ../gio/gfile.c:5173 ../gio/gfile.c:5274
-#: ../gio/gfile.c:7815 ../gio/gfile.c:7905 ../gio/gfile.c:7989
+#: ../gio/gfile.c:7817 ../gio/gfile.c:7907 ../gio/gfile.c:7991
#: ../gio/win32/gwinhttpfile.c:437
msgid "Operation not supported"
msgstr "Operasjonen er ikke støttet"
@@ -1348,7 +1350,7 @@ msgstr "Operasjonen er ikke støttet"
msgid "Containing mount does not exist"
msgstr "Omsluttende monteringspunkt finnes ikke"
-#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2377
+#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2380
msgid "Can’t copy over directory"
msgstr "Kan ikke kopiere over katalog"
@@ -1586,7 +1588,6 @@ msgid "Commands:"
msgstr "Kommandoer:"
#: ../gio/gio-tool.c:229
-#, fuzzy
msgid "Concatenate files to standard output"
msgstr "Spleis filer til standard utdata"
@@ -1665,7 +1666,7 @@ msgstr "Feil under skriving til standard utdata"
#: ../gio/gio-tool-monitor.c:37 ../gio/gio-tool-monitor.c:39
#: ../gio/gio-tool-monitor.c:41 ../gio/gio-tool-monitor.c:43
#: ../gio/gio-tool-monitor.c:203 ../gio/gio-tool-mount.c:1141
-#: ../gio/gio-tool-open.c:45 ../gio/gio-tool-remove.c:48
+#: ../gio/gio-tool-open.c:113 ../gio/gio-tool-remove.c:48
#: ../gio/gio-tool-rename.c:45 ../gio/gio-tool-set.c:89
#: ../gio/gio-tool-trash.c:81 ../gio/gio-tool-tree.c:239
msgid "LOCATION"
@@ -1684,7 +1685,7 @@ msgstr ""
#: ../gio/gio-tool-cat.c:162 ../gio/gio-tool-info.c:313
#: ../gio/gio-tool-mkdir.c:76 ../gio/gio-tool-monitor.c:228
-#: ../gio/gio-tool-open.c:71 ../gio/gio-tool-remove.c:72
+#: ../gio/gio-tool-open.c:139 ../gio/gio-tool-remove.c:72
msgid "No locations given"
msgstr "Ingen lokasjoner oppgitt"
@@ -2052,7 +2053,7 @@ msgstr ""
msgid "Target %s is not a directory"
msgstr "Mål %s er ikke en katalog"
-#: ../gio/gio-tool-open.c:50
+#: ../gio/gio-tool-open.c:118
msgid ""
"Open files with the default application that\n"
"is registered to handle files of this type."
@@ -2341,9 +2342,9 @@ msgid "<%s> must contain at least one <value>"
msgstr "<%s> må inneholde minst en <value>"
#: ../gio/glib-compile-schemas.c:315
-#, c-format, fuzzy
+#, c-format
msgid "<%s> is not contained in the specified range"
-msgstr "Sluttpunkt for tilkobling ikke oppgitt"
+msgstr "<%s> finnes ikke i oppgitt område"
#: ../gio/glib-compile-schemas.c:327
#, c-format
@@ -2388,10 +2389,9 @@ msgid "translation context given for value without l10n enabled"
msgstr ""
#: ../gio/glib-compile-schemas.c:475
-#, fuzzy, c-format
-#| msgid "Failed to create file “%s”: %s"
+#, c-format
msgid "Failed to parse <default> value of type “%s”: "
-msgstr "Klarte ikke å opprette fil «%s»: %s"
+msgstr "Klarte ikke å tolke <default> verdi av type «%s»: "
#: ../gio/glib-compile-schemas.c:492
msgid ""
@@ -2410,10 +2410,9 @@ msgid "<choices> not allowed for keys of type “%s”"
msgstr ""
#: ../gio/glib-compile-schemas.c:529
-#, fuzzy, c-format
-#| msgid "<child name='%s'> already specified"
+#, c-format
msgid "<choice value='%s'/> already given"
-msgstr "<child name='%s'> allerede oppgitt"
+msgstr "<choice value='%s'> allerede oppgitt"
#: ../gio/glib-compile-schemas.c:544
#, c-format
@@ -2421,10 +2420,8 @@ msgid "<choices> must contain at least one <choice>"
msgstr ""
#: ../gio/glib-compile-schemas.c:558
-#, fuzzy
-#| msgid "<child name='%s'> already specified"
msgid "<aliases> already specified for this key"
-msgstr "<child name='%s'> allerede oppgitt"
+msgstr "<aliases> er allerede oppgitt for denne nøkkelen"
#: ../gio/glib-compile-schemas.c:562
msgid ""
@@ -2478,12 +2475,15 @@ msgstr "Ugyldig navn «%s»: navn må starte med liten bokstav"
msgid ""
"Invalid name “%s”: invalid character “%c”; only lowercase letters, numbers "
"and hyphen (“-”) are permitted"
-msgstr "Ugyldig navn «%s»: ugyldig tegn «%c»; kun små bokstaver, tall og bindestrek («-») er tillatt"
+msgstr ""
+"Ugyldig navn «%s»: ugyldig tegn «%c»; kun små bokstaver, tall og bindestrek "
+"(«-») er tillatt"
#: ../gio/glib-compile-schemas.c:817
#, c-format
msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted"
-msgstr "Ugyldig navn «%s»: to etterfølgende bindestreker («--») er ikke tillatt"
+msgstr ""
+"Ugyldig navn «%s»: to etterfølgende bindestreker («--») er ikke tillatt"
#: ../gio/glib-compile-schemas.c:826
#, c-format
@@ -2523,7 +2523,9 @@ msgstr ""
msgid ""
"Exactly one of “type”, “enum” or “flags” must be specified as an attribute "
"to <key>"
-msgstr "Eksakt en av 'type', 'enum' eller 'flags' må oppgis som en attributt for <key>"
+msgstr ""
+"Eksakt en av 'type', 'enum' eller 'flags' må oppgis som en attributt for "
+"<key>"
#: ../gio/glib-compile-schemas.c:989
#, c-format
@@ -2587,7 +2589,9 @@ msgstr ""
msgid ""
"<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” "
"does not extend “%s”"
-msgstr "<schema id='%s' list-of='%s'> utvider <schema id='%s' list-of='%s'> men «%s» utvider ikke «%s»"
+msgstr ""
+"<schema id='%s' list-of='%s'> utvider <schema id='%s' list-of='%s'> men «%s» "
+"utvider ikke «%s»"
#: ../gio/glib-compile-schemas.c:1211
#, c-format
@@ -2751,7 +2755,7 @@ msgstr "fjernet eksisterende utdatafil.\n"
msgid "Invalid filename %s"
msgstr "Ugyldig filnavn %s"
-#: ../gio/glocalfile.c:1037
+#: ../gio/glocalfile.c:1039
#, c-format
msgid "Error getting filesystem info for %s: %s"
msgstr "Feil under lesing av informasjon om filsystem %s: %s"
@@ -2760,235 +2764,235 @@ msgstr "Feil under lesing av informasjon om filsystem %s: %s"
#. * the enclosing (user visible) mount of a file, but none
#. * exists.
#.
-#: ../gio/glocalfile.c:1176
+#: ../gio/glocalfile.c:1178
#, c-format
msgid "Containing mount for file %s not found"
msgstr "Fant ikke omsluttende monteringspunkt for fil %s"
-#: ../gio/glocalfile.c:1199
+#: ../gio/glocalfile.c:1201
msgid "Can’t rename root directory"
msgstr "Kan ikke endre navn på rotkatalogen"
-#: ../gio/glocalfile.c:1217 ../gio/glocalfile.c:1240
+#: ../gio/glocalfile.c:1219 ../gio/glocalfile.c:1242
#, c-format
msgid "Error renaming file %s: %s"
msgstr "Feil ved endring av navn på fil %s: %s"
-#: ../gio/glocalfile.c:1224
+#: ../gio/glocalfile.c:1226
msgid "Can’t rename file, filename already exists"
msgstr "Kan ikke endre navn på filen. Filnavnet eksisterer allerede"
-#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2253 ../gio/glocalfile.c:2281
-#: ../gio/glocalfile.c:2438 ../gio/glocalfileoutputstream.c:549
+#: ../gio/glocalfile.c:1239 ../gio/glocalfile.c:2256 ../gio/glocalfile.c:2284
+#: ../gio/glocalfile.c:2441 ../gio/glocalfileoutputstream.c:551
msgid "Invalid filename"
msgstr "Ugyldig filnavn"
-#: ../gio/glocalfile.c:1404 ../gio/glocalfile.c:1419
+#: ../gio/glocalfile.c:1407 ../gio/glocalfile.c:1422
#, c-format
msgid "Error opening file %s: %s"
msgstr "Feil under åpning av fil %s: %s"
-#: ../gio/glocalfile.c:1544
+#: ../gio/glocalfile.c:1547
#, c-format
msgid "Error removing file %s: %s"
msgstr "Feil ved fjerning av fil %s: %s"
-#: ../gio/glocalfile.c:1928
+#: ../gio/glocalfile.c:1931
#, c-format
msgid "Error trashing file %s: %s"
msgstr "Feil ved plassering av fil %s i papirkurv : %s"
-#: ../gio/glocalfile.c:1951
+#: ../gio/glocalfile.c:1954
#, c-format
msgid "Unable to create trash dir %s: %s"
msgstr "Kan ikke legge katalog %s i papirkurven: %s"
-#: ../gio/glocalfile.c:1971
-#, c-format, fuzzy
+#: ../gio/glocalfile.c:1974
+#, fuzzy, c-format
msgid "Unable to find toplevel directory to trash %s"
msgstr "Kan ikke finne toppnivå for papirkurv"
-#: ../gio/glocalfile.c:2050 ../gio/glocalfile.c:2070
+#: ../gio/glocalfile.c:2053 ../gio/glocalfile.c:2073
#, c-format
msgid "Unable to find or create trash directory for %s"
msgstr "Kan ikke finne eller opprette mappe for papirkurv for %s"
-#: ../gio/glocalfile.c:2105
+#: ../gio/glocalfile.c:2108
#, c-format
msgid "Unable to create trashing info file for %s: %s"
msgstr "Kan ikke opprette informasjonsfil for papirkurv for %s: %s"
-#: ../gio/glocalfile.c:2164
+#: ../gio/glocalfile.c:2167
#, c-format
msgid "Unable to trash file %s across filesystem boundaries"
msgstr "Kan ikke legge fil %s i papirkurven på tvers av filsystemgrenser"
-#: ../gio/glocalfile.c:2168 ../gio/glocalfile.c:2224
+#: ../gio/glocalfile.c:2171 ../gio/glocalfile.c:2227
#, c-format
msgid "Unable to trash file %s: %s"
msgstr "Kan ikke legge fil %s i papirkurven: %s"
-#: ../gio/glocalfile.c:2230
+#: ../gio/glocalfile.c:2233
#, c-format
msgid "Unable to trash file %s"
msgstr "Kan ikke legge fil %s i papirkurven"
-#: ../gio/glocalfile.c:2256
+#: ../gio/glocalfile.c:2259
#, c-format
msgid "Error creating directory %s: %s"
msgstr "Feil under oppretting av katalog %s: %s"
-#: ../gio/glocalfile.c:2285
+#: ../gio/glocalfile.c:2288
#, c-format
msgid "Filesystem does not support symbolic links"
msgstr "Filsystemet støtter ikke symbolske lenker"
-#: ../gio/glocalfile.c:2288
+#: ../gio/glocalfile.c:2291
#, c-format
msgid "Error making symbolic link %s: %s"
msgstr "Feil ved oppretting av symbolsk lenke %s: %s"
-#: ../gio/glocalfile.c:2294 ../glib/gfileutils.c:2077
+#: ../gio/glocalfile.c:2297 ../glib/gfileutils.c:2101
msgid "Symbolic links not supported"
msgstr "Symbolske lenker er ikke støttet"
-#: ../gio/glocalfile.c:2349 ../gio/glocalfile.c:2384 ../gio/glocalfile.c:2441
+#: ../gio/glocalfile.c:2352 ../gio/glocalfile.c:2387 ../gio/glocalfile.c:2444
#, c-format
msgid "Error moving file %s: %s"
msgstr "Feil under flytting av fil %s: %s"
-#: ../gio/glocalfile.c:2372
+#: ../gio/glocalfile.c:2375
msgid "Can’t move directory over directory"
msgstr "Kan ikke flytte katalog over katalog"
-#: ../gio/glocalfile.c:2398 ../gio/glocalfileoutputstream.c:933
-#: ../gio/glocalfileoutputstream.c:947 ../gio/glocalfileoutputstream.c:962
-#: ../gio/glocalfileoutputstream.c:979 ../gio/glocalfileoutputstream.c:993
+#: ../gio/glocalfile.c:2401 ../gio/glocalfileoutputstream.c:935
+#: ../gio/glocalfileoutputstream.c:949 ../gio/glocalfileoutputstream.c:964
+#: ../gio/glocalfileoutputstream.c:981 ../gio/glocalfileoutputstream.c:995
msgid "Backup file creation failed"
msgstr "Oppretting av sikkerhetskopi feilet"
-#: ../gio/glocalfile.c:2417
+#: ../gio/glocalfile.c:2420
#, c-format
msgid "Error removing target file: %s"
msgstr "Feil under fjerning av målfil: %s"
-#: ../gio/glocalfile.c:2431
+#: ../gio/glocalfile.c:2434
msgid "Move between mounts not supported"
msgstr "Flytting mellom monteringspunkter er ikke støttet"
-#: ../gio/glocalfile.c:2622
+#: ../gio/glocalfile.c:2625
#, c-format
msgid "Could not determine the disk usage of %s: %s"
msgstr "Kunne ikke bestemme diskbruk for %s: %s"
-#: ../gio/glocalfileinfo.c:731
+#: ../gio/glocalfileinfo.c:742
msgid "Attribute value must be non-NULL"
msgstr "Attributtverdi må ikke være NULL"
-#: ../gio/glocalfileinfo.c:738
+#: ../gio/glocalfileinfo.c:749
msgid "Invalid attribute type (string expected)"
msgstr "Ugyldig type attributt (streng forventet)"
-#: ../gio/glocalfileinfo.c:745
+#: ../gio/glocalfileinfo.c:756
msgid "Invalid extended attribute name"
msgstr "Ugyldig navn på utvidet attributt"
-#: ../gio/glocalfileinfo.c:785
+#: ../gio/glocalfileinfo.c:796
#, c-format
msgid "Error setting extended attribute “%s”: %s"
msgstr "Feil under setting av utvidet attributt «%s»: %s"
-#: ../gio/glocalfileinfo.c:1586
+#: ../gio/glocalfileinfo.c:1604
msgid " (invalid encoding)"
msgstr " (ugyldig koding)"
-#: ../gio/glocalfileinfo.c:1777 ../gio/glocalfileoutputstream.c:811
+#: ../gio/glocalfileinfo.c:1773 ../gio/glocalfileoutputstream.c:813
#, c-format
msgid "Error when getting information for file “%s”: %s"
msgstr "Feil ved henting av informasjon for fil «%s»: %s"
-#: ../gio/glocalfileinfo.c:2028
+#: ../gio/glocalfileinfo.c:2031
#, c-format
msgid "Error when getting information for file descriptor: %s"
msgstr "Feil ved henting av informasjon om fildeskriptor: %s"
-#: ../gio/glocalfileinfo.c:2073
+#: ../gio/glocalfileinfo.c:2076
msgid "Invalid attribute type (uint32 expected)"
msgstr "Ugyldig type attributt (uint32 forventet)"
-#: ../gio/glocalfileinfo.c:2091
+#: ../gio/glocalfileinfo.c:2094
msgid "Invalid attribute type (uint64 expected)"
msgstr "Ugyldig type attributt (uint64 forventet)"
-#: ../gio/glocalfileinfo.c:2110 ../gio/glocalfileinfo.c:2129
+#: ../gio/glocalfileinfo.c:2113 ../gio/glocalfileinfo.c:2132
msgid "Invalid attribute type (byte string expected)"
msgstr "Ugyldig type attributt (byte-streng forventet)"
-#: ../gio/glocalfileinfo.c:2164
+#: ../gio/glocalfileinfo.c:2177
msgid "Cannot set permissions on symlinks"
msgstr "Kan ikke sette rettigheter på symbolske lenker"
-#: ../gio/glocalfileinfo.c:2180
+#: ../gio/glocalfileinfo.c:2193
#, c-format
msgid "Error setting permissions: %s"
msgstr "Feil ved setting av rettigheter: %s"
-#: ../gio/glocalfileinfo.c:2231
+#: ../gio/glocalfileinfo.c:2244
#, c-format
msgid "Error setting owner: %s"
msgstr "Feil ved setting av eier: %s"
-#: ../gio/glocalfileinfo.c:2254
+#: ../gio/glocalfileinfo.c:2267
msgid "symlink must be non-NULL"
msgstr "symbolsk lenke kan ikke være NULL"
-#: ../gio/glocalfileinfo.c:2264 ../gio/glocalfileinfo.c:2283
-#: ../gio/glocalfileinfo.c:2294
+#: ../gio/glocalfileinfo.c:2277 ../gio/glocalfileinfo.c:2296
+#: ../gio/glocalfileinfo.c:2307
#, c-format
msgid "Error setting symlink: %s"
msgstr "Feil ved setting av symbolsk lenke: %s"
-#: ../gio/glocalfileinfo.c:2273
+#: ../gio/glocalfileinfo.c:2286
msgid "Error setting symlink: file is not a symlink"
msgstr "Feil ved setting av symbolsk lenke: filen er ikke en symbolsk lenke"
-#: ../gio/glocalfileinfo.c:2399
+#: ../gio/glocalfileinfo.c:2412
#, c-format
msgid "Error setting modification or access time: %s"
msgstr "Feil ved setting av endrings- eller aksesstid: %s"
-#: ../gio/glocalfileinfo.c:2422
+#: ../gio/glocalfileinfo.c:2435
msgid "SELinux context must be non-NULL"
msgstr "SELinux-kontekst kan ikke være NULL"
-#: ../gio/glocalfileinfo.c:2437
+#: ../gio/glocalfileinfo.c:2450
#, c-format
msgid "Error setting SELinux context: %s"
msgstr "Feil ved setting av SELinux-kontekst: %s"
-#: ../gio/glocalfileinfo.c:2444
+#: ../gio/glocalfileinfo.c:2457
msgid "SELinux is not enabled on this system"
msgstr "SELinux er ikke slått på på dette systemet"
-#: ../gio/glocalfileinfo.c:2536
+#: ../gio/glocalfileinfo.c:2549
#, c-format
msgid "Setting attribute %s not supported"
msgstr "Støtter ikke å sette attributt %s"
-#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:694
+#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:696
#, c-format
msgid "Error reading from file: %s"
msgstr "Feil under lesing fra fil: %s"
#: ../gio/glocalfileinputstream.c:199 ../gio/glocalfileinputstream.c:211
#: ../gio/glocalfileinputstream.c:225 ../gio/glocalfileinputstream.c:333
-#: ../gio/glocalfileoutputstream.c:456 ../gio/glocalfileoutputstream.c:1011
+#: ../gio/glocalfileoutputstream.c:458 ../gio/glocalfileoutputstream.c:1013
#, c-format
msgid "Error seeking in file: %s"
msgstr "Feil under søking i fil: %s"
-#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:246
-#: ../gio/glocalfileoutputstream.c:340
+#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:248
+#: ../gio/glocalfileoutputstream.c:342
#, c-format
msgid "Error closing file: %s"
msgstr "Feil under lukking av fil: %s"
@@ -2997,51 +3001,51 @@ msgstr "Feil under lukking av fil: %s"
msgid "Unable to find default local file monitor type"
msgstr "Kan ikke finne forvalgt lokal filovervåkingstype"
-#: ../gio/glocalfileoutputstream.c:194 ../gio/glocalfileoutputstream.c:226
-#: ../gio/glocalfileoutputstream.c:715
+#: ../gio/glocalfileoutputstream.c:196 ../gio/glocalfileoutputstream.c:228
+#: ../gio/glocalfileoutputstream.c:717
#, c-format
msgid "Error writing to file: %s"
msgstr "Feil under skriving til fil: %s"
-#: ../gio/glocalfileoutputstream.c:273
+#: ../gio/glocalfileoutputstream.c:275
#, c-format
msgid "Error removing old backup link: %s"
msgstr "Feil ved fjerning av gammel sikkerhetskopi av lenke: %s"
-#: ../gio/glocalfileoutputstream.c:287 ../gio/glocalfileoutputstream.c:300
+#: ../gio/glocalfileoutputstream.c:289 ../gio/glocalfileoutputstream.c:302
#, c-format
msgid "Error creating backup copy: %s"
msgstr "Feil under oppretting av sikkerhetskopi: %s"
-#: ../gio/glocalfileoutputstream.c:318
+#: ../gio/glocalfileoutputstream.c:320
#, c-format
msgid "Error renaming temporary file: %s"
msgstr "Feil ved endring av navn på midlertidig fil: %s"
-#: ../gio/glocalfileoutputstream.c:502 ../gio/glocalfileoutputstream.c:1062
+#: ../gio/glocalfileoutputstream.c:504 ../gio/glocalfileoutputstream.c:1064
#, c-format
msgid "Error truncating file: %s"
msgstr "Feil under avkorting av fil: %s"
-#: ../gio/glocalfileoutputstream.c:555 ../gio/glocalfileoutputstream.c:793
-#: ../gio/glocalfileoutputstream.c:1043 ../gio/gsubprocess.c:380
+#: ../gio/glocalfileoutputstream.c:557 ../gio/glocalfileoutputstream.c:795
+#: ../gio/glocalfileoutputstream.c:1045 ../gio/gsubprocess.c:380
#, c-format
msgid "Error opening file “%s”: %s"
msgstr "Feil under åpning av fil «%s»: %s"
-#: ../gio/glocalfileoutputstream.c:824
+#: ../gio/glocalfileoutputstream.c:826
msgid "Target file is a directory"
msgstr "Målfilen er en katalog"
-#: ../gio/glocalfileoutputstream.c:829
+#: ../gio/glocalfileoutputstream.c:831
msgid "Target file is not a regular file"
msgstr "Målfilen er ikke en vanlig fil"
-#: ../gio/glocalfileoutputstream.c:841
+#: ../gio/glocalfileoutputstream.c:843
msgid "The file was externally modified"
msgstr "Filen ble endret eksternt"
-#: ../gio/glocalfileoutputstream.c:1027
+#: ../gio/glocalfileoutputstream.c:1029
#, c-format
msgid "Error removing old file: %s"
msgstr "Feil ved fjerning av gammel fil: %s"
@@ -3085,21 +3089,21 @@ msgstr "Forespurt søk forbi slutten på strømmen"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement unmount.
-#: ../gio/gmount.c:393
+#: ../gio/gmount.c:396
msgid "mount doesn’t implement “unmount”"
msgstr "monteringspunkt implementerer ikke «unmount»"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement eject.
-#: ../gio/gmount.c:469
+#: ../gio/gmount.c:472
msgid "mount doesn’t implement “eject”"
msgstr "monteringspunkt implementerer ikke «eject»"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of unmount or unmount_with_operation.
-#: ../gio/gmount.c:547
+#: ../gio/gmount.c:550
msgid "mount doesn’t implement “unmount” or “unmount_with_operation”"
msgstr ""
"monteringspunkt implementerer ikke «unmount» eller «unmount_with_operation»"
@@ -3107,7 +3111,7 @@ msgstr ""
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of eject or eject_with_operation.
-#: ../gio/gmount.c:632
+#: ../gio/gmount.c:635
msgid "mount doesn’t implement “eject” or “eject_with_operation”"
msgstr ""
"monteringspunkt implementerer ikke «eject» eller «eject_with_operation»"
@@ -3115,21 +3119,21 @@ msgstr ""
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement remount.
-#: ../gio/gmount.c:720
+#: ../gio/gmount.c:723
msgid "mount doesn’t implement “remount”"
msgstr "monteringspunkt implementerer ikke «remount»"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:802
+#: ../gio/gmount.c:805
msgid "mount doesn’t implement content type guessing"
msgstr "monteringspunkt implementerer ikke gjetting av innholdstype"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: ../gio/gmount.c:889
+#: ../gio/gmount.c:892
msgid "mount doesn’t implement synchronous content type guessing"
msgstr "monteringspunkt implementerer ikke synkron gjetting av innholdstype"
@@ -3562,145 +3566,181 @@ msgstr "Tomt navn på schema oppgitt\n"
msgid "No such key “%s”\n"
msgstr "Nøkkel «%s» finnes ikke\n"
-#: ../gio/gsocket.c:379
+#: ../gio/gsocket.c:384
msgid "Invalid socket, not initialized"
msgstr "Ugyldig plugg, ikke initiert"
-#: ../gio/gsocket.c:386
+#: ../gio/gsocket.c:391
#, c-format
msgid "Invalid socket, initialization failed due to: %s"
msgstr "Ugyldig plugg, initiering feilet pga: %s"
-#: ../gio/gsocket.c:394
+#: ../gio/gsocket.c:399
msgid "Socket is already closed"
msgstr "Pluggen er allerede lukket"
-#: ../gio/gsocket.c:409 ../gio/gsocket.c:2765 ../gio/gsocket.c:3950
-#: ../gio/gsocket.c:4008
+#: ../gio/gsocket.c:414 ../gio/gsocket.c:2995 ../gio/gsocket.c:4205
+#: ../gio/gsocket.c:4263
msgid "Socket I/O timed out"
msgstr "Tidsavbrudd for I/U mot plugg"
-#: ../gio/gsocket.c:541
+#: ../gio/gsocket.c:546
#, c-format
msgid "creating GSocket from fd: %s"
msgstr "lager GSocket fra fd: %s"
-#: ../gio/gsocket.c:570 ../gio/gsocket.c:624 ../gio/gsocket.c:631
+#: ../gio/gsocket.c:575 ../gio/gsocket.c:629 ../gio/gsocket.c:636
#, c-format
msgid "Unable to create socket: %s"
msgstr "Kunne ikke lage plugg: %s"
-#: ../gio/gsocket.c:624
+#: ../gio/gsocket.c:629
msgid "Unknown family was specified"
msgstr "Ukjent familie ble oppgitt"
-#: ../gio/gsocket.c:631
+#: ../gio/gsocket.c:636
msgid "Unknown protocol was specified"
msgstr "Ukjent protokoll ble oppgitt"
-#: ../gio/gsocket.c:1122
+#: ../gio/gsocket.c:1127
#, c-format
msgid "Cannot use datagram operations on a non-datagram socket."
msgstr ""
"Kan ikke bruke datagramoperasjoner på en plugg som ikke er av type datagram."
-#: ../gio/gsocket.c:1139
+#: ../gio/gsocket.c:1144
#, c-format
msgid "Cannot use datagram operations on a socket with a timeout set."
msgstr "Kan ikke bruke datagramoperasjoner på en plugg med tidsavbrudd satt."
-#: ../gio/gsocket.c:1943
+#: ../gio/gsocket.c:1948
#, c-format
msgid "could not get local address: %s"
msgstr "kunne ikke hente lokal adresse: %s"
-#: ../gio/gsocket.c:1986
+#: ../gio/gsocket.c:1991
#, c-format
msgid "could not get remote address: %s"
msgstr "kunne ikke hente ekstern adresse: %s"
-#: ../gio/gsocket.c:2052
+#: ../gio/gsocket.c:2057
#, c-format
msgid "could not listen: %s"
msgstr "kunne ikke lytte: %s"
-#: ../gio/gsocket.c:2151
+#: ../gio/gsocket.c:2156
#, c-format
msgid "Error binding to address: %s"
msgstr "Feil ved binding til adresse: %s"
-#: ../gio/gsocket.c:2266 ../gio/gsocket.c:2303
+#: ../gio/gsocket.c:2214 ../gio/gsocket.c:2251 ../gio/gsocket.c:2361
+#: ../gio/gsocket.c:2379 ../gio/gsocket.c:2449 ../gio/gsocket.c:2507
+#: ../gio/gsocket.c:2525
#, c-format
msgid "Error joining multicast group: %s"
msgstr "Feil ved forsøk på å bli med i multicast-gruppe: %s"
-#: ../gio/gsocket.c:2267 ../gio/gsocket.c:2304
+#: ../gio/gsocket.c:2215 ../gio/gsocket.c:2252 ../gio/gsocket.c:2362
+#: ../gio/gsocket.c:2380 ../gio/gsocket.c:2450 ../gio/gsocket.c:2508
+#: ../gio/gsocket.c:2526
#, c-format
msgid "Error leaving multicast group: %s"
msgstr "Feil ved forsøk på å forlate multicast-gruppe: %s"
-#: ../gio/gsocket.c:2268
+#: ../gio/gsocket.c:2216
msgid "No support for source-specific multicast"
msgstr "Ingen støtte for kildespesifikk multicast"
-#: ../gio/gsocket.c:2488
+#: ../gio/gsocket.c:2363
+#, fuzzy
+#| msgid "Unsupported socket address"
+msgid "Unsupported socket family"
+msgstr "Adresse for plugg er ikke støttet"
+
+#: ../gio/gsocket.c:2381
+msgid "source-specific not an IPv4 address"
+msgstr ""
+
+#: ../gio/gsocket.c:2399 ../gio/gsocket.c:2428 ../gio/gsocket.c:2475
+#, c-format
+msgid "Interface not found: %s"
+msgstr "Fant ikke grensesnitt: %s"
+
+#: ../gio/gsocket.c:2415
+#, c-format
+msgid "Interface name too long"
+msgstr "Navnet på grensesnittet er for langt"
+
+#: ../gio/gsocket.c:2451
+#, fuzzy
+#| msgid "No support for source-specific multicast"
+msgid "No support for IPv4 source-specific multicast"
+msgstr "Ingen støtte for kildespesifikk multicast"
+
+#: ../gio/gsocket.c:2509
+#, fuzzy
+#| msgid "No support for source-specific multicast"
+msgid "No support for IPv6 source-specific multicast"
+msgstr "Ingen støtte for kildespesifikk multicast"
+
+#: ../gio/gsocket.c:2718
#, c-format
msgid "Error accepting connection: %s"
msgstr "Feil ved godkjenning av tilkobling: %s"
-#: ../gio/gsocket.c:2609
+#: ../gio/gsocket.c:2839
msgid "Connection in progress"
msgstr "Tilkobling pågår"
-#: ../gio/gsocket.c:2658
+#: ../gio/gsocket.c:2888
msgid "Unable to get pending error: "
msgstr "Kan ikke hente utestående feil: "
-#: ../gio/gsocket.c:2828
+#: ../gio/gsocket.c:3058
#, c-format
msgid "Error receiving data: %s"
msgstr "Feil ved mottak av data: %s"
-#: ../gio/gsocket.c:3023
+#: ../gio/gsocket.c:3253
#, c-format
msgid "Error sending data: %s"
msgstr "Feil ved sending av data: %s"
-#: ../gio/gsocket.c:3210
+#: ../gio/gsocket.c:3440
#, c-format
msgid "Unable to shutdown socket: %s"
msgstr "Kan ikke stenge ned plugg: %s"
-#: ../gio/gsocket.c:3291
+#: ../gio/gsocket.c:3521
#, c-format
msgid "Error closing socket: %s"
msgstr "Feil ved lukking av plugg: %s"
-#: ../gio/gsocket.c:3943
+#: ../gio/gsocket.c:4198
#, c-format
msgid "Waiting for socket condition: %s"
msgstr "Venter på tilstand for plugg: %s"
-#: ../gio/gsocket.c:4417 ../gio/gsocket.c:4497 ../gio/gsocket.c:4675
+#: ../gio/gsocket.c:4672 ../gio/gsocket.c:4752 ../gio/gsocket.c:4930
#, c-format
msgid "Error sending message: %s"
msgstr "Feil ved sending av melding: %s"
-#: ../gio/gsocket.c:4441
+#: ../gio/gsocket.c:4696
msgid "GSocketControlMessage not supported on Windows"
msgstr "GSocketControlMessage er ikke støttet på Windows"
-#: ../gio/gsocket.c:4894 ../gio/gsocket.c:4967 ../gio/gsocket.c:5193
+#: ../gio/gsocket.c:5149 ../gio/gsocket.c:5222 ../gio/gsocket.c:5448
#, c-format
msgid "Error receiving message: %s"
msgstr "Feil ved mottak av melding: %s"
-#: ../gio/gsocket.c:5465
+#: ../gio/gsocket.c:5720
#, c-format
msgid "Unable to read socket credentials: %s"
msgstr "Kunne ikke lese autentiseringsinformasjon for plugg: %s"
-#: ../gio/gsocket.c:5474
+#: ../gio/gsocket.c:5729
msgid "g_socket_get_credentials not implemented for this OS"
msgstr "g_socket_get_credentials ikke implementert for dette OSet"
@@ -3840,18 +3880,18 @@ msgstr "Ingen gyldige adresser ble funnet"
msgid "Error reverse-resolving “%s”: %s"
msgstr "Feil under omvendt oppslag av «%s»: %s"
-#: ../gio/gthreadedresolver.c:550 ../gio/gthreadedresolver.c:630
-#: ../gio/gthreadedresolver.c:728 ../gio/gthreadedresolver.c:778
+#: ../gio/gthreadedresolver.c:549 ../gio/gthreadedresolver.c:628
+#: ../gio/gthreadedresolver.c:726 ../gio/gthreadedresolver.c:776
#, c-format
msgid "No DNS record of the requested type for “%s”"
msgstr "Ingen DNS-oppføring av forespurt type for «%s»"
-#: ../gio/gthreadedresolver.c:555 ../gio/gthreadedresolver.c:733
+#: ../gio/gthreadedresolver.c:554 ../gio/gthreadedresolver.c:731
#, c-format
msgid "Temporarily unable to resolve “%s”"
msgstr "Midlertidig ute av stand til å slå opp «%s»"
-#: ../gio/gthreadedresolver.c:560 ../gio/gthreadedresolver.c:738
+#: ../gio/gthreadedresolver.c:559 ../gio/gthreadedresolver.c:736
#, c-format
msgid "Error resolving “%s”"
msgstr "Feil ved oppslag av «%s»"
@@ -3961,7 +4001,7 @@ msgstr "Feil under lesing fra fildeskriptor: %s"
msgid "Error closing file descriptor: %s"
msgstr "Feil under lukking av fildeskriptor: %s"
-#: ../gio/gunixmounts.c:2430 ../gio/gunixmounts.c:2483
+#: ../gio/gunixmounts.c:2539 ../gio/gunixmounts.c:2592
msgid "Filesystem root"
msgstr "Filsystemrot"
@@ -4153,227 +4193,227 @@ msgid "The pathname “%s” is not an absolute path"
msgstr "Stinavnet «%s» er ikke en absolutt sti"
#. Translators: this is the preferred format for expressing the date and the time
-#: ../glib/gdatetime.c:202
+#: ../glib/gdatetime.c:203
msgctxt "GDateTime"
msgid "%a %b %e %H:%M:%S %Y"
msgstr "%a %e %b %H.%M.%S"
#. Translators: this is the preferred format for expressing the date
-#: ../glib/gdatetime.c:205
+#: ../glib/gdatetime.c:206
msgctxt "GDateTime"
msgid "%m/%d/%y"
msgstr "%d.%m.%y"
#. Translators: this is the preferred format for expressing the time
-#: ../glib/gdatetime.c:208
+#: ../glib/gdatetime.c:209
msgctxt "GDateTime"
msgid "%H:%M:%S"
msgstr "%H.%M.%S"
#. Translators: this is the preferred format for expressing 12 hour time
-#: ../glib/gdatetime.c:211
+#: ../glib/gdatetime.c:212
msgctxt "GDateTime"
msgid "%I:%M:%S %p"
msgstr "%H.%M.%S"
-#: ../glib/gdatetime.c:224
+#: ../glib/gdatetime.c:225
msgctxt "full month name"
msgid "January"
msgstr "Januar"
-#: ../glib/gdatetime.c:226
+#: ../glib/gdatetime.c:227
msgctxt "full month name"
msgid "February"
msgstr "Februar"
-#: ../glib/gdatetime.c:228
+#: ../glib/gdatetime.c:229
msgctxt "full month name"
msgid "March"
msgstr "Mars"
-#: ../glib/gdatetime.c:230
+#: ../glib/gdatetime.c:231
msgctxt "full month name"
msgid "April"
msgstr "April"
-#: ../glib/gdatetime.c:232
+#: ../glib/gdatetime.c:233
msgctxt "full month name"
msgid "May"
msgstr "Mai"
-#: ../glib/gdatetime.c:234
+#: ../glib/gdatetime.c:235
msgctxt "full month name"
msgid "June"
msgstr "Juni"
-#: ../glib/gdatetime.c:236
+#: ../glib/gdatetime.c:237
msgctxt "full month name"
msgid "July"
msgstr "Juli"
-#: ../glib/gdatetime.c:238
+#: ../glib/gdatetime.c:239
msgctxt "full month name"
msgid "August"
msgstr "August"
-#: ../glib/gdatetime.c:240
+#: ../glib/gdatetime.c:241
msgctxt "full month name"
msgid "September"
msgstr "September"
-#: ../glib/gdatetime.c:242
+#: ../glib/gdatetime.c:243
msgctxt "full month name"
msgid "October"
msgstr "Oktober"
-#: ../glib/gdatetime.c:244
+#: ../glib/gdatetime.c:245
msgctxt "full month name"
msgid "November"
msgstr "November"
-#: ../glib/gdatetime.c:246
+#: ../glib/gdatetime.c:247
msgctxt "full month name"
msgid "December"
msgstr "Desember"
-#: ../glib/gdatetime.c:261
+#: ../glib/gdatetime.c:262
msgctxt "abbreviated month name"
msgid "Jan"
msgstr "Jan"
-#: ../glib/gdatetime.c:263
+#: ../glib/gdatetime.c:264
msgctxt "abbreviated month name"
msgid "Feb"
msgstr "Feb"
-#: ../glib/gdatetime.c:265
+#: ../glib/gdatetime.c:266
msgctxt "abbreviated month name"
msgid "Mar"
msgstr "Mar"
-#: ../glib/gdatetime.c:267
+#: ../glib/gdatetime.c:268
msgctxt "abbreviated month name"
msgid "Apr"
msgstr "Apr"
-#: ../glib/gdatetime.c:269
+#: ../glib/gdatetime.c:270
msgctxt "abbreviated month name"
msgid "May"
msgstr "Mai"
-#: ../glib/gdatetime.c:271
+#: ../glib/gdatetime.c:272
msgctxt "abbreviated month name"
msgid "Jun"
msgstr "Jun"
-#: ../glib/gdatetime.c:273
+#: ../glib/gdatetime.c:274
msgctxt "abbreviated month name"
msgid "Jul"
msgstr "Jul"
-#: ../glib/gdatetime.c:275
+#: ../glib/gdatetime.c:276
msgctxt "abbreviated month name"
msgid "Aug"
msgstr "Aug"
-#: ../glib/gdatetime.c:277
+#: ../glib/gdatetime.c:278
msgctxt "abbreviated month name"
msgid "Sep"
msgstr "Sep"
-#: ../glib/gdatetime.c:279
+#: ../glib/gdatetime.c:280
msgctxt "abbreviated month name"
msgid "Oct"
msgstr "Okt"
-#: ../glib/gdatetime.c:281
+#: ../glib/gdatetime.c:282
msgctxt "abbreviated month name"
msgid "Nov"
msgstr "Nov"
-#: ../glib/gdatetime.c:283
+#: ../glib/gdatetime.c:284
msgctxt "abbreviated month name"
msgid "Dec"
msgstr "Des"
-#: ../glib/gdatetime.c:298
+#: ../glib/gdatetime.c:299
msgctxt "full weekday name"
msgid "Monday"
msgstr "Mandag"
-#: ../glib/gdatetime.c:300
+#: ../glib/gdatetime.c:301
msgctxt "full weekday name"
msgid "Tuesday"
msgstr "Tirsdag"
-#: ../glib/gdatetime.c:302
+#: ../glib/gdatetime.c:303
msgctxt "full weekday name"
msgid "Wednesday"
msgstr "Onsdag"
-#: ../glib/gdatetime.c:304
+#: ../glib/gdatetime.c:305
msgctxt "full weekday name"
msgid "Thursday"
msgstr "Torsdag"
-#: ../glib/gdatetime.c:306
+#: ../glib/gdatetime.c:307
msgctxt "full weekday name"
msgid "Friday"
msgstr "Fredag"
-#: ../glib/gdatetime.c:308
+#: ../glib/gdatetime.c:309
msgctxt "full weekday name"
msgid "Saturday"
msgstr "Lørdag"
-#: ../glib/gdatetime.c:310
+#: ../glib/gdatetime.c:311
msgctxt "full weekday name"
msgid "Sunday"
msgstr "Søndag"
-#: ../glib/gdatetime.c:325
+#: ../glib/gdatetime.c:326
msgctxt "abbreviated weekday name"
msgid "Mon"
msgstr "Man"
-#: ../glib/gdatetime.c:327
+#: ../glib/gdatetime.c:328
msgctxt "abbreviated weekday name"
msgid "Tue"
msgstr "Tir"
-#: ../glib/gdatetime.c:329
+#: ../glib/gdatetime.c:330
msgctxt "abbreviated weekday name"
msgid "Wed"
msgstr "Ons"
-#: ../glib/gdatetime.c:331
+#: ../glib/gdatetime.c:332
msgctxt "abbreviated weekday name"
msgid "Thu"
msgstr "Tor"
-#: ../glib/gdatetime.c:333
+#: ../glib/gdatetime.c:334
msgctxt "abbreviated weekday name"
msgid "Fri"
msgstr "Fre"
-#: ../glib/gdatetime.c:335
+#: ../glib/gdatetime.c:336
msgctxt "abbreviated weekday name"
msgid "Sat"
msgstr "Lør"
-#: ../glib/gdatetime.c:337
+#: ../glib/gdatetime.c:338
msgctxt "abbreviated weekday name"
msgid "Sun"
msgstr "Søn"
#. Translators: 'before midday' indicator
-#: ../glib/gdatetime.c:354
+#: ../glib/gdatetime.c:355
msgctxt "GDateTime"
msgid "AM"
msgstr "AM"
#. Translators: 'after midday' indicator
-#: ../glib/gdatetime.c:357
+#: ../glib/gdatetime.c:358
msgctxt "GDateTime"
msgid "PM"
msgstr "PM"
@@ -4383,79 +4423,79 @@ msgstr "PM"
msgid "Error opening directory “%s”: %s"
msgstr "Feil under åpning av katalog «%s»: %s"
-#: ../glib/gfileutils.c:706 ../glib/gfileutils.c:798
+#: ../glib/gfileutils.c:716 ../glib/gfileutils.c:808
#, c-format
msgid "Could not allocate %lu byte to read file “%s”"
msgid_plural "Could not allocate %lu bytes to read file “%s”"
msgstr[0] "Kunne ikke allokere %lu byte til lest fil «%s»"
msgstr[1] "Kunne ikke allokere %lu bytes til lest fil «%s»"
-#: ../glib/gfileutils.c:723
+#: ../glib/gfileutils.c:733
#, c-format
msgid "Error reading file “%s”: %s"
msgstr "Feil ved lesing av fil «%s»: %s"
-#: ../glib/gfileutils.c:759
+#: ../glib/gfileutils.c:769
#, c-format
msgid "File “%s” is too large"
msgstr "Fil «%s» er for stor"
-#: ../glib/gfileutils.c:823
+#: ../glib/gfileutils.c:833
#, c-format
msgid "Failed to read from file “%s”: %s"
msgstr "Klarte ikke å lese fra fil «%s»: %s"
-#: ../glib/gfileutils.c:871 ../glib/gfileutils.c:943
+#: ../glib/gfileutils.c:881 ../glib/gfileutils.c:953
#, c-format
msgid "Failed to open file “%s”: %s"
msgstr "Klarte ikke å åpne fil «%s»: %s"
-#: ../glib/gfileutils.c:883
+#: ../glib/gfileutils.c:893
#, c-format
msgid "Failed to get attributes of file “%s”: fstat() failed: %s"
msgstr "Klarte ikke å hente attributter for fil «%s»: fstat() feilet: %s"
-#: ../glib/gfileutils.c:913
+#: ../glib/gfileutils.c:923
#, c-format
msgid "Failed to open file “%s”: fdopen() failed: %s"
msgstr "Klarte ikke å åpne fil «%s»: fdopen() feilet: %s"
-#: ../glib/gfileutils.c:1012
+#: ../glib/gfileutils.c:1022
#, c-format
msgid "Failed to rename file “%s” to “%s”: g_rename() failed: %s"
msgstr "Klarte ikke å endre navn på fil «%s» til «%s»: g_rename() feilet: %s"
-#: ../glib/gfileutils.c:1047 ../glib/gfileutils.c:1554
+#: ../glib/gfileutils.c:1057 ../glib/gfileutils.c:1564
#, c-format
msgid "Failed to create file “%s”: %s"
msgstr "Klarte ikke å opprette fil «%s»: %s"
-#: ../glib/gfileutils.c:1074
+#: ../glib/gfileutils.c:1084
#, c-format
msgid "Failed to write file “%s”: write() failed: %s"
msgstr "Klarte ikke å skrive fil «%s»: write() feilet: %s"
-#: ../glib/gfileutils.c:1117
+#: ../glib/gfileutils.c:1127
#, c-format
msgid "Failed to write file “%s”: fsync() failed: %s"
msgstr "Klarte ikke å skrive fil «%s»: fsync() feilet: %s"
-#: ../glib/gfileutils.c:1241
+#: ../glib/gfileutils.c:1251
#, c-format
msgid "Existing file “%s” could not be removed: g_unlink() failed: %s"
msgstr "Eksisterende fil «%s» kunne ikke fjernes: g_unlink() feilet: %s"
-#: ../glib/gfileutils.c:1520
+#: ../glib/gfileutils.c:1530
#, c-format
msgid "Template “%s” invalid, should not contain a “%s”"
msgstr "Mal «%s» er ugyldig, må ikke inneholde «%s»"
-#: ../glib/gfileutils.c:1533
+#: ../glib/gfileutils.c:1543
#, c-format
msgid "Template “%s” doesn’t contain XXXXXX"
msgstr "Mal «%s» inneholder ikke XXXXXX"
-#: ../glib/gfileutils.c:2058
+#: ../glib/gfileutils.c:2079
#, c-format
msgid "Failed to read the symbolic link “%s”: %s"
msgstr "Klarte ikke å lese symbolsk lenke «%s»: %s"
@@ -4482,15 +4522,15 @@ msgstr "Kanalen terminerer i et oppdelt tegn"
msgid "Can’t do a raw read in g_io_channel_read_to_end"
msgstr "Kan ikke utføre rå avlesing i g_io_channel_read_to_end"
-#: ../glib/gkeyfile.c:736
+#: ../glib/gkeyfile.c:788
msgid "Valid key file could not be found in search dirs"
msgstr "Gyldig nøkkelfil ble ikke funnet i søkemapper"
-#: ../glib/gkeyfile.c:773
+#: ../glib/gkeyfile.c:825
msgid "Not a regular file"
msgstr "Ikke en vanlig fil"
-#: ../glib/gkeyfile.c:1218
+#: ../glib/gkeyfile.c:1270
#, c-format
msgid ""
"Key file contains line “%s” which is not a key-value pair, group, or comment"
@@ -4498,50 +4538,50 @@ msgstr ""
"Nøkkelfil inneholder linjen «%s» som ikke er et par med nøkkelverdier, "
"gruppe eller kommentar"
-#: ../glib/gkeyfile.c:1275
+#: ../glib/gkeyfile.c:1327
#, c-format
msgid "Invalid group name: %s"
msgstr "Ugyldig navn på gruppe: %s"
-#: ../glib/gkeyfile.c:1297
+#: ../glib/gkeyfile.c:1349
msgid "Key file does not start with a group"
msgstr "Nøkkelfil starter ikke med en gruppe"
-#: ../glib/gkeyfile.c:1323
+#: ../glib/gkeyfile.c:1375
#, c-format
msgid "Invalid key name: %s"
msgstr "Ugyldig navn på nøkkel: %s"
-#: ../glib/gkeyfile.c:1350
+#: ../glib/gkeyfile.c:1402
#, c-format
msgid "Key file contains unsupported encoding “%s”"
msgstr "Nøkkelfil inneholder ustøttet tegnkoding «%s»"
-#: ../glib/gkeyfile.c:1593 ../glib/gkeyfile.c:1766 ../glib/gkeyfile.c:3146
-#: ../glib/gkeyfile.c:3209 ../glib/gkeyfile.c:3339 ../glib/gkeyfile.c:3469
-#: ../glib/gkeyfile.c:3613 ../glib/gkeyfile.c:3842 ../glib/gkeyfile.c:3909
+#: ../glib/gkeyfile.c:1645 ../glib/gkeyfile.c:1818 ../glib/gkeyfile.c:3198
+#: ../glib/gkeyfile.c:3261 ../glib/gkeyfile.c:3391 ../glib/gkeyfile.c:3521
+#: ../glib/gkeyfile.c:3665 ../glib/gkeyfile.c:3894 ../glib/gkeyfile.c:3961
#, c-format
msgid "Key file does not have group “%s”"
msgstr "Nøkkelfil har ikke gruppe «%s»"
-#: ../glib/gkeyfile.c:1721
+#: ../glib/gkeyfile.c:1773
#, c-format
msgid "Key file does not have key “%s” in group “%s”"
msgstr "Nøkkelfilen har ikke nøkkel «%s» i gruppe «%s»"
-#: ../glib/gkeyfile.c:1883 ../glib/gkeyfile.c:1999
+#: ../glib/gkeyfile.c:1935 ../glib/gkeyfile.c:2051
#, c-format
msgid "Key file contains key “%s” with value “%s” which is not UTF-8"
msgstr "Nøkkelfilen inneholder nøkkel «%s» med verdi «%s» som ikke er UTF-8"
-#: ../glib/gkeyfile.c:1903 ../glib/gkeyfile.c:2019 ../glib/gkeyfile.c:2388
+#: ../glib/gkeyfile.c:1955 ../glib/gkeyfile.c:2071 ../glib/gkeyfile.c:2440
#, c-format
msgid ""
"Key file contains key “%s” which has a value that cannot be interpreted."
msgstr ""
"Nøkkelfilen inneholder nøkkel «%s» som har en verdi som ikke kan bli tolket."
-#: ../glib/gkeyfile.c:2606 ../glib/gkeyfile.c:2975
+#: ../glib/gkeyfile.c:2658 ../glib/gkeyfile.c:3027
#, c-format
msgid ""
"Key file contains key “%s” in group “%s” which has a value that cannot be "
@@ -4550,36 +4590,36 @@ msgstr ""
"Nøkkelfilen inneholder nøkkel «%s» i gruppe «%s» som har en verdi som ikke "
"kan bli tolket."
-#: ../glib/gkeyfile.c:2684 ../glib/gkeyfile.c:2761
+#: ../glib/gkeyfile.c:2736 ../glib/gkeyfile.c:2813
#, c-format
msgid "Key “%s” in group “%s” has value “%s” where %s was expected"
msgstr "Nøkkel «%s» i gruppe «%s» har en verdi «%s» hvor %s var forventet"
-#: ../glib/gkeyfile.c:4149
+#: ../glib/gkeyfile.c:4201
msgid "Key file contains escape character at end of line"
msgstr "Nøkkelfilen inneholder skiftetegn ved linjeslutt"
-#: ../glib/gkeyfile.c:4171
+#: ../glib/gkeyfile.c:4223
#, c-format
msgid "Key file contains invalid escape sequence “%s”"
msgstr "Nøkkelfil inneholder ugyldig skiftesekvens «%s»"
-#: ../glib/gkeyfile.c:4315
+#: ../glib/gkeyfile.c:4367
#, c-format
msgid "Value “%s” cannot be interpreted as a number."
msgstr "Vedi «%s» kan ikke tolkes som et tall."
-#: ../glib/gkeyfile.c:4329
+#: ../glib/gkeyfile.c:4381
#, c-format
msgid "Integer value “%s” out of range"
msgstr "Heltallsverdi «%s» er utenfor gyldig område"
-#: ../glib/gkeyfile.c:4362
+#: ../glib/gkeyfile.c:4414
#, c-format
msgid "Value “%s” cannot be interpreted as a float number."
msgstr "Verdi «%s» kan ikke tolkes som et flyttall."
-#: ../glib/gkeyfile.c:4401
+#: ../glib/gkeyfile.c:4453
#, c-format
msgid "Value “%s” cannot be interpreted as a boolean."
msgstr "Verdi «%s» kan ikke tolkes som en bolsk verdi."
@@ -5255,77 +5295,77 @@ msgstr ""
msgid "Text was empty (or contained only whitespace)"
msgstr "Teksten var tom (eller inneholdt kun blanke tegn)"
-#: ../glib/gspawn.c:250
+#: ../glib/gspawn.c:253
#, c-format
msgid "Failed to read data from child process (%s)"
msgstr "Feil under lesing av data fra underprosess (%s)"
-#: ../glib/gspawn.c:394
+#: ../glib/gspawn.c:401
#, c-format
msgid "Unexpected error in select() reading data from a child process (%s)"
msgstr "Uventet feil i select() ved lesing av data fra underprosess (%s)"
-#: ../glib/gspawn.c:479
+#: ../glib/gspawn.c:486
#, c-format
msgid "Unexpected error in waitpid() (%s)"
msgstr "Uventet feil i waitpid() (%s)"
-#: ../glib/gspawn.c:886 ../glib/gspawn-win32.c:1231
+#: ../glib/gspawn.c:897 ../glib/gspawn-win32.c:1231
#, c-format
msgid "Child process exited with code %ld"
msgstr "Underprosess avsluttet med kode %ld"
-#: ../glib/gspawn.c:894
+#: ../glib/gspawn.c:905
#, c-format
msgid "Child process killed by signal %ld"
msgstr "Underprosess terminert av signal %ld"
-#: ../glib/gspawn.c:901
+#: ../glib/gspawn.c:912
#, c-format
msgid "Child process stopped by signal %ld"
msgstr "Underprosess stoppet av signal %ld"
-#: ../glib/gspawn.c:908
+#: ../glib/gspawn.c:919
#, c-format
msgid "Child process exited abnormally"
msgstr "Underprosess avsluttet unormalt"
-#: ../glib/gspawn.c:1313 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
+#: ../glib/gspawn.c:1324 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
#, c-format
msgid "Failed to read from child pipe (%s)"
msgstr "Feil under lesing fra \"child pipe\" (%s)"
-#: ../glib/gspawn.c:1383
+#: ../glib/gspawn.c:1394
#, c-format
msgid "Failed to fork (%s)"
msgstr "Feil under kjøring av fork (%s)"
-#: ../glib/gspawn.c:1532 ../glib/gspawn-win32.c:368
+#: ../glib/gspawn.c:1543 ../glib/gspawn-win32.c:368
#, c-format
msgid "Failed to change to directory “%s” (%s)"
msgstr "Klarte ikke å skifte til katalog «%s» (%s)"
-#: ../glib/gspawn.c:1542
+#: ../glib/gspawn.c:1553
#, c-format
msgid "Failed to execute child process “%s” (%s)"
msgstr "Klarte ikke å kjøre underprosess «%s» (%s)"
-#: ../glib/gspawn.c:1552
+#: ../glib/gspawn.c:1563
#, c-format
msgid "Failed to redirect output or input of child process (%s)"
msgstr "Feil under omdirigering av utdata eller inndata for underprosess (%s)"
-#: ../glib/gspawn.c:1561
+#: ../glib/gspawn.c:1572
#, c-format
msgid "Failed to fork child process (%s)"
msgstr "Feil under kjøring av fork() for underprosess (%s)"
-#: ../glib/gspawn.c:1569
+#: ../glib/gspawn.c:1580
#, c-format
msgid "Unknown error executing child process “%s”"
msgstr "Ukjent feil under kjøring av underprosess «%s»"
-#: ../glib/gspawn.c:1593
+#: ../glib/gspawn.c:1604
#, c-format
msgid "Failed to read enough data from child pid pipe (%s)"
msgstr "Klarte ikke å lese nok data fra underprosessens pid-rør (%s)"
@@ -5389,11 +5429,10 @@ msgstr "«%s» er ikke et "
#: ../glib/gstrfuncs.c:3281 ../glib/gstrfuncs.c:3384
#, c-format
msgid "Number “%s” is out of bounds [%s, %s]"
-msgstr ""
+msgstr "Tallet «%s» er utenfor grensene [%s, %s]"
#: ../glib/gstrfuncs.c:3374
-#, fuzzy, c-format
-#| msgid "'%s' is not a valid name"
+#, c-format, fuzzy
msgid "“%s” is not an unsigned number"
msgstr "«%s» er ikke et gyldig navn"
@@ -5414,87 +5453,162 @@ msgstr "Ugyldig sekvens i inndata for konvertering"
msgid "Character out of range for UTF-16"
msgstr "Tegn utenfor gyldig område for UTF-16"
-#: ../glib/gutils.c:2209 ../glib/gutils.c:2236 ../glib/gutils.c:2342
+#: ../glib/gutils.c:2229
#, c-format
-msgid "%u byte"
-msgid_plural "%u bytes"
-msgstr[0] "%u byte"
-msgstr[1] "%u bytes"
+msgid "%.1f kB"
+msgstr "%.1f kB"
+
+#: ../glib/gutils.c:2230 ../glib/gutils.c:2436
+#, c-format
+msgid "%.1f MB"
+msgstr "%.1f MB"
+
+#: ../glib/gutils.c:2231 ../glib/gutils.c:2441
+#, c-format
+msgid "%.1f GB"
+msgstr "%.1f GB"
+
+#: ../glib/gutils.c:2232 ../glib/gutils.c:2446
+#, c-format
+msgid "%.1f TB"
+msgstr "%.1f TB"
+
+#: ../glib/gutils.c:2233 ../glib/gutils.c:2451
+#, c-format
+msgid "%.1f PB"
+msgstr "%.1f PB"
+
+#: ../glib/gutils.c:2234 ../glib/gutils.c:2456
+#, c-format
+msgid "%.1f EB"
+msgstr "%.1f EB"
-#: ../glib/gutils.c:2215
+#: ../glib/gutils.c:2237
#, c-format
msgid "%.1f KiB"
msgstr "%.1f KiB"
-#: ../glib/gutils.c:2217
+#: ../glib/gutils.c:2238
#, c-format
msgid "%.1f MiB"
msgstr "%.1f MiB"
-#: ../glib/gutils.c:2220
+#: ../glib/gutils.c:2239
#, c-format
msgid "%.1f GiB"
msgstr "%.1f GiB"
-#: ../glib/gutils.c:2223
+#: ../glib/gutils.c:2240
#, c-format
msgid "%.1f TiB"
msgstr "%.1f TiB"
-#: ../glib/gutils.c:2226
+#: ../glib/gutils.c:2241
#, c-format
msgid "%.1f PiB"
msgstr "%.1f PiB"
-#: ../glib/gutils.c:2229
+#: ../glib/gutils.c:2242
#, c-format
msgid "%.1f EiB"
msgstr "%.1f EiB"
-#: ../glib/gutils.c:2242
+#: ../glib/gutils.c:2245
#, c-format
-msgid "%.1f kB"
-msgstr "%.1f kB"
+msgid "%.1f kb"
+msgstr "%.1f kb"
-#: ../glib/gutils.c:2245 ../glib/gutils.c:2360
+#: ../glib/gutils.c:2246
#, c-format
-msgid "%.1f MB"
-msgstr "%.1f MB"
+msgid "%.1f Mb"
+msgstr "%.1f Mb"
-#: ../glib/gutils.c:2248 ../glib/gutils.c:2365
+#: ../glib/gutils.c:2247
#, c-format
-msgid "%.1f GB"
-msgstr "%.1f GB"
+msgid "%.1f Gb"
+msgstr "%.1f Gb"
-#: ../glib/gutils.c:2250 ../glib/gutils.c:2370
+#: ../glib/gutils.c:2248
#, c-format
-msgid "%.1f TB"
-msgstr "%.1f TB"
+msgid "%.1f Tb"
+msgstr "%.1f Tb"
-#: ../glib/gutils.c:2253 ../glib/gutils.c:2375
+#: ../glib/gutils.c:2249
#, c-format
-msgid "%.1f PB"
-msgstr "%.1f PB"
+msgid "%.1f Pb"
+msgstr "%.1f Pb"
-#: ../glib/gutils.c:2256 ../glib/gutils.c:2380
+#: ../glib/gutils.c:2250
#, c-format
-msgid "%.1f EB"
-msgstr "%.1f EB"
+msgid "%.1f Eb"
+msgstr "%.1f Eb"
+
+#: ../glib/gutils.c:2253
+#, c-format
+msgid "%.1f Kib"
+msgstr "%.1f Kib"
+
+#: ../glib/gutils.c:2254
+#, c-format
+msgid "%.1f Mib"
+msgstr "%.1f Mib"
+
+#: ../glib/gutils.c:2255
+#, c-format
+msgid "%.1f Gib"
+msgstr "%.1f Gib"
+
+#: ../glib/gutils.c:2256
+#, c-format
+msgid "%.1f Tib"
+msgstr "%.1f Tib"
+
+#: ../glib/gutils.c:2257
+#, c-format
+msgid "%.1f Pib"
+msgstr "%.1f Pib"
+
+#: ../glib/gutils.c:2258
+#, c-format
+msgid "%.1f Eib"
+msgstr "%.1f Eib"
+
+#: ../glib/gutils.c:2292 ../glib/gutils.c:2418
+#, c-format
+msgid "%u byte"
+msgid_plural "%u bytes"
+msgstr[0] "%u byte"
+msgstr[1] "%u bytes"
+
+#: ../glib/gutils.c:2296
+#, c-format
+msgid "%u bit"
+msgid_plural "%u bits"
+msgstr[0] "%u bit"
+msgstr[1] "%u bits"
#. Translators: the %s in "%s bytes" will always be replaced by a number.
-#: ../glib/gutils.c:2293
+#: ../glib/gutils.c:2363
#, c-format
msgid "%s byte"
msgid_plural "%s bytes"
msgstr[0] "%s byte"
msgstr[1] "%s bytes"
+#. Translators: the %s in "%s bits" will always be replaced by a number.
+#: ../glib/gutils.c:2368
+#, c-format
+msgid "%s bit"
+msgid_plural "%s bits"
+msgstr[0] "%s bit"
+msgstr[1] "%s bits"
+
#. Translators: this is from the deprecated function g_format_size_for_display() which uses 'KB' to
#. * mean 1024 bytes. I am aware that 'KB' is not correct, but it has been preserved for reasons of
#. * compatibility. Users will not see this string unless a program is using this deprecated function.
#. * Please translate as literally as possible.
#.
-#: ../glib/gutils.c:2355
+#: ../glib/gutils.c:2431
#, c-format
msgid "%.1f KB"
msgstr "%.1f KB"
diff --git a/po/sl.po b/po/sl.po
index f86257f19..8934906b5 100644
--- a/po/sl.po
+++ b/po/sl.po
@@ -11,7 +11,7 @@ msgstr ""
"Report-Msgid-Bugs-To: https://bugzilla.gnome.org/enter_bug.cgi?"
"product=glib&keywords=I18N+L10N&component=general\n"
"POT-Creation-Date: 2017-09-28 19:20+0200\n"
-"PO-Revision-Date: 2017-10-17 20:52+0200\n"
+"PO-Revision-Date: 2017-09-28 19:20+0200\n"
"Last-Translator: Matej Urbančič <mateju@svn.gnome.org>\n"
"Language-Team: Slovenian GNOME Translation Team <gnome-si@googlegroups.com>\n"
"Language: sl_SI\n"
@@ -21,7 +21,7 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 1 : n%100==2 ? 2 : n%100==3 || n"
"%100==4 ? 3 : 0);\n"
"X-Poedit-SourceCharset: utf-8\n"
-"X-Generator: Poedit 2.0.4\n"
+"X-Generator: Poedit 2.0.1\n"
#: ../gio/gapplication.c:490
msgid "GApplication options"
@@ -229,7 +229,8 @@ msgid ""
"action names must consist of only alphanumerics, “-” and “.”\n"
msgstr ""
"neveljavno ime dejanja: »%s«\n"
-"imena dejanj lahko tvorijo le številke in črke, vezaj » - « in pika » . «.\n"
+"imena dejanj lahko tvorijo le alfanumerični znaki, vezaj » - « in pika » . "
+"«.\n"
#: ../gio/gapplication-tool.c:344
#, c-format
@@ -445,7 +446,7 @@ msgstr ""
#, c-format
msgid "Error in address “%s” — the noncefile attribute is missing or malformed"
msgstr ""
-"Napaka v naslovu »%s« – atribut enkratne datoteke manjka ali pa je "
+"Napaka v naslovu »%s« – atribut enkratne datoteke manjka ali pa je "
"nepravilno oblikovan"
#: ../gio/gdbusaddress.c:658
@@ -495,7 +496,7 @@ msgstr "Ni mogoče oživiti vodila sporočila brez predmeta machine-id:"
#: ../gio/gdbusaddress.c:1086
#, c-format
msgid "Cannot autolaunch D-Bus without X11 $DISPLAY"
-msgstr "Ni mogoče samodejno zagnati vodila D-Bus brez nastavitve X11 $DISPLAY"
+msgstr "Ni mogoče samodejno zagnati vodila D-Bus brez nastaviteve X11 $DISPLAY"
#: ../gio/gdbusaddress.c:1128
#, c-format
@@ -569,7 +570,7 @@ msgstr "Napaka med pridobivanjem podrobnosti mape »%s«: %s"
msgid ""
"Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o"
msgstr ""
-"Dovoljenja na mapi »%s« so napačno oblikovana. Pričakovano je dovoljenje "
+"Dovoljenja na mapi »%s« so napalno oblikovana. Pričakovano je dovoljenje "
"0700, pridobljeno pa 0%o"
#: ../gio/gdbusauthmechanismsha1.c:296
@@ -760,7 +761,7 @@ msgstr "Sporočilo ERROR: manjka polje glave REPLY_SERIAL ali ERROR_NAME"
#: ../gio/gdbusmessage.c:1293
msgid "SIGNAL message: PATH, INTERFACE or MEMBER header field is missing"
-msgstr "Sporočilo SIGNAL: manjka polje glave PATH, INTERFACE ali MEMBER"
+msgstr "Sporočilo SIGNAL: mankja polje glave PATH, INTERFACE ali MEMBER"
#: ../gio/gdbusmessage.c:1301
msgid ""
@@ -995,7 +996,16 @@ msgid "Cannot listen on unsupported transport “%s”"
msgstr "Na nepodprtem načinu prenosa »%s« ni mogoče poslušati"
#: ../gio/gdbus-tool.c:95
-#, c-format
+#, fuzzy, c-format
+#| msgid ""
+#| "Commands:\n"
+#| " help Shows this information\n"
+#| " introspect Introspect a remote object\n"
+#| " monitor Monitor a remote object\n"
+#| " call Invoke a method on a remote object\n"
+#| " emit Emit a signal\n"
+#| "\n"
+#| "Use “%s COMMAND --help” to get help on each command.\n"
msgid ""
"Commands:\n"
" help Shows this information\n"
@@ -1011,9 +1021,8 @@ msgstr ""
" help Prikaže te podrobnosti\n"
" introspect Samo-preveri oddaljen predmet\n"
" monitor Nadzoruje oddaljen predmet\n"
-" call Pokliče metodo nad oddaljenim predmetom\n"
-" emit Odda signal\n"
-" wait Zahteva prikaz imena vodila\n"
+" call Pokliči metodo nad oddaljenim predmetom\n"
+" emit Oddaj signal\n"
"\n"
"Uporabite »%s COMMAND --help« za pomoč o posameznem ukazu.\n"
@@ -1158,7 +1167,7 @@ msgstr "Pot do predmeta za sklicanje načina"
#: ../gio/gdbus-tool.c:761
msgid "Method and interface name"
-msgstr "Ime načina in vmesnika"
+msgstr "Ime načina in vmesnika"
#: ../gio/gdbus-tool.c:762
msgid "Timeout in seconds"
@@ -1236,15 +1245,13 @@ msgstr "Nadzoruj oddaljeni predmet."
#: ../gio/gdbus-tool.c:1980
msgid "Service to activate before waiting for the other one (well-known name)"
-msgstr "Storitev, ki naj se začne, preden začne program čakati na drugo (ime)"
+msgstr ""
#: ../gio/gdbus-tool.c:1983
msgid ""
"Timeout to wait for before exiting with an error (seconds); 0 for no timeout "
"(default)"
msgstr ""
-"Časovni zamik, po katerem je program končan z napako (v sekundah); vrednost "
-"0 onemogoči zamik (privzeto)"
#: ../gio/gdbus-tool.c:2031
msgid "[OPTION…] BUS-NAME"
@@ -1255,26 +1262,28 @@ msgid "Wait for a bus name to appear."
msgstr "Počakaj na izpis imena vodila."
#: ../gio/gdbus-tool.c:2109
-#, c-format
+#, fuzzy, c-format
+#| msgid "Error: object path not specified.\n"
msgid "Error: A service to activate for must be specified.\n"
-msgstr "Napaka: storitev za omogočanje mora biti določena.\n"
+msgstr "Napaka: pot predmeta ni določena.\n"
#: ../gio/gdbus-tool.c:2114
-#, c-format
+#, fuzzy, c-format
+#| msgid "Error: object path not specified.\n"
msgid "Error: A service to wait for must be specified.\n"
-msgstr ""
-"Napaka: storitev za čakanje mora biti določena.\n"
-"\n"
+msgstr "Napaka: pot predmeta ni določena.\n"
#: ../gio/gdbus-tool.c:2119
-#, c-format
+#, fuzzy, c-format
+#| msgid "Too many arguments"
msgid "Error: Too many arguments.\n"
-msgstr "Napaka: navedenih je preveč argumentov.\n"
+msgstr "Navedenih je preveč argumentov"
#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134
-#, c-format
+#, fuzzy, c-format
+#| msgid "Error: %s is not a valid bus name\n"
msgid "Error: %s is not a valid well-known bus name.\n"
-msgstr "Napaka: %s ni veljavno enoznačno ime vodila.\n"
+msgstr "Napaka: %s ni veljavno ime vodila\n"
#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4531
msgid "Unnamed"
@@ -1696,8 +1705,10 @@ msgid "Use %s to get detailed help.\n"
msgstr "Z ukazom %s se izpiše podrobna pomoč.\n"
#: ../gio/gio-tool-cat.c:87
+#, fuzzy
+#| msgid "Error writing to file: %s"
msgid "Error writing to stdout"
-msgstr "Napaka med pisanjem v standardni odvod"
+msgstr "Napaka med pisanjem v datoteko: %s"
#. Translators: commandline placeholder
#: ../gio/gio-tool-cat.c:133 ../gio/gio-tool-info.c:282
@@ -1972,9 +1983,10 @@ msgid "No recommended applications\n"
msgstr "Ni priporočenih programov.\n"
#: ../gio/gio-tool-mime.c:162
-#, c-format
+#, fuzzy, c-format
+#| msgid "Failed to load info for handler “%s”\n"
msgid "Failed to load info for handler “%s”"
-msgstr "Nalaganje podrobnosti ročnika »%s« je spodletelo."
+msgstr "Nalaganje podrobnosti ročnika »%s« je spodletelo.\n"
#: ../gio/gio-tool-mime.c:168
#, c-format
@@ -2080,8 +2092,10 @@ msgid "Show extra information"
msgstr "Pokaži dodatne podrobnosti"
#: ../gio/gio-tool-mount.c:246 ../gio/gio-tool-mount.c:276
+#, fuzzy
+#| msgid "Error mounting location: Anonymous access denied\n"
msgid "Anonymous access denied"
-msgstr "Brezimen dostop ni dovoljen!"
+msgstr "Napaka med priklapljanjem: brezimni dostop ni dovoljen.\n"
#: ../gio/gio-tool-mount.c:897
#, c-format
@@ -2089,8 +2103,10 @@ msgid "Mounted %s at %s\n"
msgstr "Priklopljen %s na %s\n"
#: ../gio/gio-tool-mount.c:950
+#, fuzzy
+#| msgid "No volume for device file %s\n"
msgid "No volume for device file"
-msgstr "Ni določenega nosilca za datoteko naprave"
+msgstr "Ni pogona za datoteko naprave %s\n"
#: ../gio/gio-tool-mount.c:1145
msgid "Mount or unmount the locations."
@@ -2188,8 +2204,10 @@ msgid "ETAG"
msgstr "ETAG"
#: ../gio/gio-tool-save.c:113
+#, fuzzy
+#| msgid "Error reading from handle: %s"
msgid "Error reading from standard input"
-msgstr "Napaka branja prek standardnega dovoda"
+msgstr "Napaka branja iz ročnika: %s"
#. Translators: The "etag" is a token allowing to verify whether a file has been modified
#: ../gio/gio-tool-save.c:139
@@ -2238,9 +2256,10 @@ msgid "Value not specified"
msgstr "Vrednost ni določena"
#: ../gio/gio-tool-set.c:180
-#, c-format
+#, fuzzy, c-format
+#| msgid "Invalid attribute type %s\n"
msgid "Invalid attribute type “%s”"
-msgstr "Neveljavna vrsta atributa »%s«"
+msgstr "Neveljavna vrsta atributa %s\n"
#: ../gio/gio-tool-trash.c:32
msgid "Empty the trash"
@@ -2383,122 +2402,132 @@ msgstr "Podati je treba natanko eno ime datoteke\n"
#: ../gio/glib-compile-schemas.c:95
#, c-format
msgid "nick must be a minimum of 2 characters"
-msgstr "vzdevek mora vsebovati najmanj 2 znaka"
+msgstr ""
#: ../gio/glib-compile-schemas.c:106
-#, c-format
+#, fuzzy, c-format
+#| msgid "Invalid symlink value given"
msgid "Invalid numeric value"
-msgstr "Neveljavna številčna vrednost"
+msgstr "Neveljavna vrednost simbolne povezave"
#: ../gio/glib-compile-schemas.c:114
-#, c-format
+#, fuzzy, c-format
+#| msgid "<%s id='%s'> already specified"
msgid "<value nick='%s'/> already specified"
-msgstr "<alias value='%s'/> je že določeno"
+msgstr "<%s id='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:122
-#, c-format
+#, fuzzy, c-format
+#| msgid "<key name='%s'> already specified"
msgid "value='%s' already specified"
-msgstr "<alias value='%s'/> je že določena"
+msgstr "<key name='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:136
#, c-format
msgid "flags values must have at most 1 bit set"
-msgstr "zastavice morajo biti nastavljene vsaj kot 1 bitni niz"
+msgstr ""
#: ../gio/glib-compile-schemas.c:161
#, c-format
msgid "<%s> must contain at least one <value>"
-msgstr "<%s> oznaka mora vsebovati vsaj eno <value>"
+msgstr ""
#: ../gio/glib-compile-schemas.c:315
-#, c-format
+#, fuzzy, c-format
+#| msgid "No connection endpoint specified"
msgid "<%s> is not contained in the specified range"
-msgstr "<%s> ni znotraj določenega obsega"
+msgstr "Ni določene končne točke povezave"
#: ../gio/glib-compile-schemas.c:327
-#, c-format
+#, fuzzy, c-format
+#| msgid "No connection endpoint specified"
msgid "<%s> is not a valid member of the specified enumerated type"
-msgstr "<%s> ni veljavni član določene oštevilčene vrste"
+msgstr "Ni določene končne točke povezave"
#: ../gio/glib-compile-schemas.c:333
-#, c-format
+#, fuzzy, c-format
+#| msgid "No connection endpoint specified"
msgid "<%s> contains string not in the specified flags type"
-msgstr "<%s> vsebuje niz, ki ni med določenimi vrstami zastavic"
+msgstr "Ni določene končne točke povezave"
#: ../gio/glib-compile-schemas.c:339
#, c-format
msgid "<%s> contains a string not in <choices>"
-msgstr "<%s> vsebuje niz, ki ni med izbirami <choices>"
+msgstr ""
#: ../gio/glib-compile-schemas.c:373
+#, fuzzy
+#| msgid "<key name='%s'> already specified"
msgid "<range/> already specified for this key"
-msgstr "<range/> je za ta ključ že določen"
+msgstr "<key name='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:391
#, c-format
msgid "<range> not allowed for keys of type “%s”"
-msgstr "<range> ni dovoljena vrednost vrste »%s«"
+msgstr ""
#: ../gio/glib-compile-schemas.c:408
#, c-format
msgid "<range> specified minimum is greater than maximum"
-msgstr "najmanjša vrednost <range> je večja od največje vrednosti"
+msgstr ""
#: ../gio/glib-compile-schemas.c:433
#, c-format
msgid "unsupported l10n category: %s"
-msgstr "nepodprta kategorija l10n: %s"
+msgstr ""
#: ../gio/glib-compile-schemas.c:441
msgid "l10n requested, but no gettext domain given"
-msgstr "zahtevan je predmet l10n, vendar pa ni podana domena gettext"
+msgstr ""
#: ../gio/glib-compile-schemas.c:453
msgid "translation context given for value without l10n enabled"
-msgstr "podan je prevod, ni pa omogočena podpora za l10n"
+msgstr ""
#: ../gio/glib-compile-schemas.c:475
-#, c-format
+#, fuzzy, c-format
+#| msgid "Failed to set '%s' as the default handler for '%s': %s\n"
msgid "Failed to parse <default> value of type “%s”: "
-msgstr "Razčlenjevanje vrednosti <default> vrste »%s« je spodletelo:"
+msgstr "Določanje »%s« kot privzet ročnik za »%s« je spodletelo: %s\n"
#: ../gio/glib-compile-schemas.c:492
msgid ""
"<choices> cannot be specified for keys tagged as having an enumerated type"
-msgstr "<choices> ni mogoče določiti za ključe, označene kot oštevilčene vrste"
+msgstr ""
#: ../gio/glib-compile-schemas.c:501
+#, fuzzy
+#| msgid "<child name='%s'> already specified"
msgid "<choices> already specified for this key"
-msgstr "<choices> so za ta ključ že določene"
+msgstr "<child name='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:513
#, c-format
msgid "<choices> not allowed for keys of type “%s”"
-msgstr "<choices> ni dovoljena vrednost vrste »%s«"
+msgstr ""
#: ../gio/glib-compile-schemas.c:529
-#, c-format
+#, fuzzy, c-format
#| msgid "<child name='%s'> already specified"
msgid "<choice value='%s'/> already given"
-msgstr "<choice value='%s'/> je že podano"
+msgstr "<child name='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:544
#, c-format
msgid "<choices> must contain at least one <choice>"
-msgstr "vrednost <choices> mora vsebovati vsaj en <choice>"
+msgstr ""
#: ../gio/glib-compile-schemas.c:558
+#, fuzzy
#| msgid "<child name='%s'> already specified"
msgid "<aliases> already specified for this key"
-msgstr "<aliases> je za ta ključ že določen"
+msgstr "<child name='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:562
msgid ""
"<aliases> can only be specified for keys with enumerated or flags types or "
"after <choices>"
msgstr ""
-"<aliases> je mogoče določiti le za ključe z oštevilčenimi vrednostmi, z "
-"vrsto zastavic ali za <choices>"
#: ../gio/glib-compile-schemas.c:581
#, c-format
@@ -2506,48 +2535,52 @@ msgid ""
"<alias value='%s'/> given when “%s” is already a member of the enumerated "
"type"
msgstr ""
-"vrednost <alias value='%s'/> je podana, čeprav je »%s« že veljaven član "
-"oštevilčene vrste"
#: ../gio/glib-compile-schemas.c:587
-#, c-format
+#, fuzzy, c-format
#| msgid "<child name='%s'> already specified"
msgid "<alias value='%s'/> given when <choice value='%s'/> was already given"
-msgstr ""
-"<alias value='%s'/> je podano, vendar je <choice value='%s'/> že podan given"
+msgstr "<child name='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:595
-#, c-format
+#, fuzzy, c-format
#| msgid "<%s id='%s'> already specified"
msgid "<alias value='%s'/> already specified"
-msgstr "<alias value='%s'/> je že določeno"
+msgstr "<%s id='%s'> je že določeno"
#: ../gio/glib-compile-schemas.c:605
-#, c-format
+#, fuzzy, c-format
+#| msgid "“%s” is not a signed number"
msgid "alias target “%s” is not in enumerated type"
-msgstr "cilj vzdevka »%s« ni oštevilčene vrste"
+msgstr "»%s« ni podpisano število"
#: ../gio/glib-compile-schemas.c:606
#, c-format
msgid "alias target “%s” is not in <choices>"
-msgstr "cilj vzdevka »%s« ni med izbirami <choices>"
+msgstr ""
#: ../gio/glib-compile-schemas.c:621
#, c-format
msgid "<aliases> must contain at least one <alias>"
-msgstr "vrednost <aliases> mora vsebovati vsaj en <alias>"
+msgstr ""
#: ../gio/glib-compile-schemas.c:786
+#, fuzzy
+#| msgid "empty names are not permitted"
msgid "Empty names are not permitted"
-msgstr "Prazna polja imen niso dovoljena."
+msgstr "prazna imena niso dovoljena"
#: ../gio/glib-compile-schemas.c:796
-#, c-format
+#, fuzzy, c-format
+#| msgid "invalid name '%s': names must begin with a lowercase letter"
msgid "Invalid name “%s”: names must begin with a lowercase letter"
-msgstr "Neveljavno ime »%s«: imena se morajo začeti z malo črko."
+msgstr "neveljavno ime »%s«: imena se morajo začeti z malo črko"
#: ../gio/glib-compile-schemas.c:808
-#, c-format
+#, fuzzy, c-format
+#| msgid ""
+#| "invalid name '%s': invalid character '%c'; only lowercase letters, "
+#| "numbers and hyphen ('-') are permitted."
msgid ""
"Invalid name “%s”: invalid character “%c”; only lowercase letters, numbers "
"and hyphen (“-”) are permitted"
@@ -2556,19 +2589,22 @@ msgstr ""
"številke in vezaj (» - «)."
#: ../gio/glib-compile-schemas.c:817
-#, c-format
+#, fuzzy, c-format
+#| msgid "invalid name '%s': two successive hyphens ('--') are not permitted."
msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted"
msgstr "Neveljavno ime »%s«: zaporedna vezaja (» -- «) nista dovoljena."
#: ../gio/glib-compile-schemas.c:826
-#, c-format
+#, fuzzy, c-format
+#| msgid "invalid name '%s': the last character may not be a hyphen ('-')."
msgid "Invalid name “%s”: the last character may not be a hyphen (“-”)"
msgstr "Neveljavno ime »%s«: zadnji znak ne sme biti vezaj (» - «)."
#: ../gio/glib-compile-schemas.c:834
-#, c-format
+#, fuzzy, c-format
+#| msgid "invalid name '%s': maximum length is 1024"
msgid "Invalid name “%s”: maximum length is 1024"
-msgstr "Neveljavno ime »%s«: največja dolžina je 1024"
+msgstr "neveljavno ime »%s«: največja dolžina je 1024"
#: ../gio/glib-compile-schemas.c:904
#, c-format
@@ -2576,8 +2612,10 @@ msgid "<child name='%s'> already specified"
msgstr "<child name=»%s«> je že določeno"
#: ../gio/glib-compile-schemas.c:930
+#, fuzzy
+#| msgid "cannot add keys to a 'list-of' schema"
msgid "Cannot add keys to a “list-of” schema"
-msgstr "Shemi »list-of« ni mogoče dodati ključev."
+msgstr "ključev ni mogoče dodati shemi »list-of«"
#: ../gio/glib-compile-schemas.c:941
#, c-format
@@ -2594,12 +2632,15 @@ msgstr ""
"vrednosti uporabite <override>"
#: ../gio/glib-compile-schemas.c:970
-#, c-format
+#, fuzzy, c-format
+#| msgid ""
+#| "exactly one of 'type', 'enum' or 'flags' must be specified as an "
+#| "attribute to <key>"
msgid ""
"Exactly one of “type”, “enum” or “flags” must be specified as an attribute "
"to <key>"
msgstr ""
-"Natanko ena izmed možnosti »vrste«, »enum« ali »zastavice« mora biti "
+"natančno ena izmed možnosti »vrste«, »enum« ali »zastavice« mora biti "
"določena kot lastnost ključa <key>"
#: ../gio/glib-compile-schemas.c:989
@@ -2608,16 +2649,20 @@ msgid "<%s id='%s'> not (yet) defined."
msgstr "<%s id=»%s«> (še) ni določen."
#: ../gio/glib-compile-schemas.c:1004
-#, c-format
+#, fuzzy, c-format
+#| msgid "invalid GVariant type string '%s'"
msgid "Invalid GVariant type string “%s”"
-msgstr "Neveljavna vrsta niza GVariant »%s«"
+msgstr "neveljavna vrsta niza GVariant »%s«"
#: ../gio/glib-compile-schemas.c:1034
+#, fuzzy
+#| msgid "<override> given but schema isn't extending anything"
msgid "<override> given but schema isn’t extending anything"
msgstr "<override> je podan, vendar shema ne razširja ničesar"
#: ../gio/glib-compile-schemas.c:1047
-#, c-format
+#, fuzzy, c-format
+#| msgid "no <key name='%s'> to override"
msgid "No <key name='%s'> to override"
msgstr "<key name='%s'> za prepis ni na voljo"
@@ -2632,22 +2677,26 @@ msgid "<schema id='%s'> already specified"
msgstr "<schema id=»%s«> je že določeno"
#: ../gio/glib-compile-schemas.c:1140
-#, c-format
+#, fuzzy, c-format
+#| msgid "<schema id='%s'> extends not yet existing schema '%s'"
msgid "<schema id='%s'> extends not yet existing schema “%s”"
msgstr "<schema id='%s'> razširja še neobstoječo shemo »%s«"
#: ../gio/glib-compile-schemas.c:1156
-#, c-format
+#, fuzzy, c-format
+#| msgid "<schema id='%s'> is list of not yet existing schema '%s'"
msgid "<schema id='%s'> is list of not yet existing schema “%s”"
msgstr "<schema id='%s'> je seznam še neobstoječe sheme »%s«"
#: ../gio/glib-compile-schemas.c:1164
-#, c-format
+#, fuzzy, c-format
+#| msgid "Can not be a list of a schema with a path"
msgid "Cannot be a list of a schema with a path"
msgstr "Seznam sheme s potjo ni mogoč"
#: ../gio/glib-compile-schemas.c:1174
-#, c-format
+#, fuzzy, c-format
+#| msgid "Can not extend a schema with a path"
msgid "Cannot extend a schema with a path"
msgstr "Sheme ni mogoče razširiti s potjo"
@@ -2658,7 +2707,10 @@ msgid ""
msgstr "<schema id=»%s«> je seznam, ki razširja <schema id=»%s«>, ki ni seznam"
#: ../gio/glib-compile-schemas.c:1194
-#, c-format
+#, fuzzy, c-format
+#| msgid ""
+#| "<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but "
+#| "'%s' does not extend '%s'"
msgid ""
"<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” "
"does not extend “%s”"
@@ -2667,14 +2719,16 @@ msgstr ""
"»%s« ne razširja »%s«"
#: ../gio/glib-compile-schemas.c:1211
-#, c-format
+#, fuzzy, c-format
+#| msgid "a path, if given, must begin and end with a slash"
msgid "A path, if given, must begin and end with a slash"
-msgstr "Pot, če je podana, se mora začeti in končati s poševnico"
+msgstr "pot, če je podana, se mora začeti in končati s poševnico"
#: ../gio/glib-compile-schemas.c:1218
-#, c-format
+#, fuzzy, c-format
+#| msgid "the path of a list must end with ':/'"
msgid "The path of a list must end with “:/”"
-msgstr "Pot seznama se mora končati z » :/ «"
+msgstr "pot seznama se mora končati z » :/ «"
#: ../gio/glib-compile-schemas.c:1227
#, c-format
@@ -2682,8 +2736,6 @@ msgid ""
"Warning: Schema “%s” has path “%s”. Paths starting with “/apps/”, “/"
"desktop/” or “/system/” are deprecated."
msgstr ""
-"Opozorilo: shema »%s« ima določeno pot »%s«. Poti, ki se začnejo z »/apps/«, "
-"»/desktop/« ali »/system/« so opuščene."
#: ../gio/glib-compile-schemas.c:1257
#, c-format
@@ -2702,7 +2754,7 @@ msgstr "Predmet <%s> na vrhnji ravni ni dovoljen"
#: ../gio/glib-compile-schemas.c:1523
msgid "Element <default> is required in <key>"
-msgstr "Predmet <default> mora biti zapisan v ključu <key>"
+msgstr "Prednet <default> mora biti zapisan v ključu <key>"
#: ../gio/glib-compile-schemas.c:1613
#, c-format
@@ -2786,7 +2838,7 @@ msgstr "kje naj se shrani datoteka gschemas.compiled"
#: ../gio/glib-compile-schemas.c:2069
msgid "Abort on any errors in schemas"
-msgstr "Prekini ob vsakršni napaki v shemi"
+msgstr "Prekini ob vsakršnji napaki v shemi"
#: ../gio/glib-compile-schemas.c:2070
msgid "Do not write the gschema.compiled file"
@@ -3041,7 +3093,7 @@ msgstr "Napaka med določanjem sprememb ali časa dostopa: %s"
#: ../gio/glocalfileinfo.c:2422
msgid "SELinux context must be non-NULL"
-msgstr "Atributa SELinux ni mogoče določiti kot NULL"
+msgstr "SELinux atributa ni mogoče določiti kot NULL"
#: ../gio/glocalfileinfo.c:2437
#, c-format
@@ -3275,7 +3327,7 @@ msgstr "Vira »%s« ni mogoče razširiti"
#: ../gio/gresourcefile.c:709
#, c-format
msgid "The resource at “%s” is not a directory"
-msgstr "Vir »%s« ni mapa."
+msgstr "VIr »%s« ni mapa."
#: ../gio/gresourcefile.c:917
msgid "Input stream doesn’t implement seek"
@@ -3476,7 +3528,7 @@ msgid ""
"If no SCHEMA is given, list all keys\n"
msgstr ""
"Rekurzivno izpiši ključe in vrednosti,\n"
-"če ni podana SHEMA, pa izpiši vse ključe\n"
+"če ni podanana SHEMA, pa izpiši vse ključe\n"
#: ../gio/gsettings-tool.c:560
msgid "[SCHEMA[:PATH]]"
@@ -3854,7 +3906,7 @@ msgstr "Posredniški strežnik SOCKSv5 zahteva overitev."
msgid ""
"The SOCKSv5 proxy requires an authentication method that is not supported by "
"GLib."
-msgstr "Strežnik SOCKSv5 zahteva overitveni način, ki ni podprt v GLib."
+msgstr "SOCKSv5 zahteva overitveni način, ki ni podprt v GLib."
#: ../gio/gsocks5proxy.c:206
msgid "Username or password is too long for SOCKSv5 protocol."
@@ -3967,12 +4019,16 @@ msgstr ""
#. Translators: This is not the 'This is the last chance' string. It is
#. * displayed when more than one attempt is allowed.
#: ../gio/gtlspassword.c:115
+#, fuzzy
+#| msgid ""
+#| "Several password entered have been incorrect, and your access will be "
+#| "locked out after further failures."
msgid ""
"Several passwords entered have been incorrect, and your access will be "
"locked out after further failures."
msgstr ""
-"Neuspešnih je bilo več poskusov vnosa gesla, zato bo dostop ob naslednjem "
-"napačnem vnosu zaklenjen."
+"Več poskusov vnosa gesla je bilo neuspešnih, zato bo dostop ob nadaljnjih "
+"napakah zaklenjen."
#: ../gio/gtlspassword.c:117
msgid "The password entered is incorrect."
@@ -4684,7 +4740,7 @@ msgstr "Vrednosti »%s« ni mogoče obravnavati kot logično Boolovo vrednost."
#, c-format
msgid "Failed to get attributes of file “%s%s%s%s”: fstat() failed: %s"
msgstr ""
-"Ni mogoče pridobiti atributov datoteke »%s%s%s%s«: ukaz fstat() je "
+"Ni mogoče pridobiti atributov datoteke »%s%s%s%s«: ukaz fstat() je "
"spodletel: %s"
#: ../glib/gmappedfile.c:195
@@ -4706,7 +4762,7 @@ msgstr "Napaka v vrstici %d, znak %d:"
#: ../glib/gmarkup.c:461 ../glib/gmarkup.c:544
#, c-format
msgid "Invalid UTF-8 encoded text in name - not valid '%s'"
-msgstr "Neveljavno UTF-8 kodirano besedilo imena – neveljaven »%s«"
+msgstr "Neveljavno UTF-8 kodirano besedilo imena - neveljaven »%s«"
#: ../glib/gmarkup.c:472
#, c-format
@@ -4730,7 +4786,7 @@ msgid ""
"reference (&#234; for example) - perhaps the digit is too large"
msgstr ""
"Ni mogoče razčleniti '%-.*s', ki bi morala določati številko znotraj sklica "
-"znaka (na primer &#234;) – morda je številka prevelika"
+"znaka (na primer &#234;) - morda je številka prevelika"
#: ../glib/gmarkup.c:687
msgid ""
@@ -4739,7 +4795,7 @@ msgid ""
"as &amp;"
msgstr ""
"Sklic znaka se ni končal s podpičjem; najverjetneje je uporabljen znak '&' "
-"brez povezave z entiteto – znak '&' mora biti zapisan kot '&amp;'"
+"brez povezave z entiteto - znak '&' mora biti zapisan kot '&amp;'"
#: ../glib/gmarkup.c:713
#, c-format
@@ -4764,7 +4820,7 @@ msgid ""
"character without intending to start an entity - escape ampersand as &amp;"
msgstr ""
"Entiteta se ne zaključi s podpičjem; najverjetneje je uporabljen znak '&' "
-"brez povezave z entiteto – znak '&' mora biti zapisan kot '&amp;'"
+"brez povezave z entiteto - znak '&' mora biti zapisan kot '&amp;'"
#: ../glib/gmarkup.c:1170
msgid "Document must begin with an element (e.g. <book>)"
@@ -5059,7 +5115,7 @@ msgstr "neprepoznan znak za (? ali (?-"
#: ../glib/gregex.c:363
msgid "POSIX named classes are supported only within a class"
-msgstr "razredi POSIX so podprti le znotraj razreda"
+msgstr "POSIX razredi so podprti le znotraj razreda"
#: ../glib/gregex.c:366
msgid "missing terminating )"
@@ -5118,11 +5174,11 @@ msgstr "(?R ali (?[+-] številom mora slediti )"
#: ../glib/gregex.c:412
msgid "unknown POSIX class name"
-msgstr "neznano ime razreda POSIX"
+msgstr "neznano POSIX ime razreda"
#: ../glib/gregex.c:415
msgid "POSIX collating elements are not supported"
-msgstr "zbirni predmeti POSIX niso podprti"
+msgstr "POSIX zbirni predmeti niso podprti"
#: ../glib/gregex.c:418
msgid "character value in \\x{...} sequence is too large"
@@ -5197,8 +5253,8 @@ msgid ""
"\\g is not followed by a braced, angle-bracketed, or quoted name or number, "
"or by a plain number"
msgstr ""
-"\\g ne sledi ime oziroma število v oklepajih, oglatih oklepajih ali "
-"narekovajih, niti navadno število"
+"\\g ne sledi ime oz. število v oklepajih, oglatih oklepajih ali narekovajih, "
+"niti navadno število"
#: ../glib/gregex.c:480
msgid "a numbered reference must not be zero"
@@ -5297,7 +5353,7 @@ msgstr "pričakovano šestnajstiško število"
#: ../glib/gregex.c:2469
msgid "missing “<” in symbolic reference"
-msgstr "manjka znak » < « v simbolni povezavi"
+msgstr "manjkaja znak » < « v simbolni povezavi"
#: ../glib/gregex.c:2478
msgid "unfinished symbolic reference"
@@ -5345,7 +5401,7 @@ msgstr "Besedilo je končano takoj za znakom » \\ « (besedilo je »%s«)."
#, c-format
msgid "Text ended before matching quote was found for %c. (The text was “%s”)"
msgstr ""
-"Besedilo je končano pred zaključnim narekovajem za %c (besedilo je »%s«)."
+"Besedilo je končano pred zaključnim narekovajem za %c (besedilo je »%s«)."
#: ../glib/gshell.c:599
msgid "Text was empty (or contained only whitespace)"
diff --git a/tests/assert-msg-test.gdb b/tests/assert-msg-test.gdb
index dbecaaf2a..63a254152 100644
--- a/tests/assert-msg-test.gdb
+++ b/tests/assert-msg-test.gdb
@@ -1,5 +1,4 @@
run
set print elements 0
-# Work around https://sourceware.org/bugzilla/show_bug.cgi?id=22501
-print *((char**) &__glib_assert_msg)
+print (char*) __glib_assert_msg
quit
diff --git a/tests/timeloop-basic.c b/tests/timeloop-basic.c
index 7f952263a..d2bc41eec 100644
--- a/tests/timeloop-basic.c
+++ b/tests/timeloop-basic.c
@@ -35,7 +35,7 @@ int
read_all (int fd, char *buf, int len)
{
size_t bytes_read = 0;
- ssize_t count;
+ gssize count;
while (bytes_read < len)
{
@@ -58,7 +58,7 @@ int
write_all (int fd, char *buf, int len)
{
size_t bytes_written = 0;
- ssize_t count;
+ gssize count;
while (bytes_written < len)
{
diff --git a/win32/gen_util_scripts.py b/win32/gen_util_scripts.py
index a3dfdee65..2ecba4408 100644
--- a/win32/gen_util_scripts.py
+++ b/win32/gen_util_scripts.py
@@ -14,7 +14,6 @@ def main(argv):
args = parser.parse_args()
replace_items = {'@PYTHON@': 'python',
- '@PERL_PATH@': 'perl',
'@GLIB_VERSION@': args.version,
'@VERSION@': args.version}
diff --git a/win32/setup.py b/win32/setup.py
index ec57dc88e..74e4a1312 100644
--- a/win32/setup.py
+++ b/win32/setup.py
@@ -292,7 +292,6 @@ def main(argv):
#------------ submodule gobject -------------------
mkenums_vars = ver.copy()
- mkenums_vars.update({'PERL_PATH': opt.perl})
process_in(os.path.join(srcroot, 'gobject', 'glib-mkenums.in'),
os.path.join(srcroot, 'gobject', 'glib-mkenums'),
mkenums_vars)
diff --git a/win32/vs10/glib-version-paths.props.in b/win32/vs10/glib-version-paths.props.in
index e711df9e8..f55157c5e 100644
--- a/win32/vs10/glib-version-paths.props.in
+++ b/win32/vs10/glib-version-paths.props.in
@@ -6,12 +6,8 @@
<ApiVersion>2.0</ApiVersion>
<GlibEtcInstallRoot>..\..\..\vs$(VSVer)\$(Platform)</GlibEtcInstallRoot>
<CopyDir>$(GlibEtcInstallRoot)</CopyDir>
- <GlibLibtoolCompatibleDllPrefix>lib</GlibLibtoolCompatibleDllPrefix>
- <GlibLibtoolCompatibleDllSuffix>-$(ApiVersion)-0</GlibLibtoolCompatibleDllSuffix>
- <GlibSeparateVSDllPrefix />
- <GlibSeparateVSDllSuffix>-2-vs$(VSVer)</GlibSeparateVSDllSuffix>
- <GlibDllPrefix>$(GlibSeparateVSDllPrefix)</GlibDllPrefix>
- <GlibDllSuffix>$(GlibSeparateVSDllSuffix)</GlibDllSuffix>
+ <GlibDllPrefix></GlibDllPrefix>
+ <GlibDllSuffix>-2.0-0</GlibDllSuffix>
<PythonDir Condition="'$(VisualStudioVersion)' == '10.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '11.0'">c:\python34</PythonDir>
<PythonDir Condition="'$(VisualStudioVersion)' == '12.0'">c:\python34</PythonDir>
@@ -37,18 +33,6 @@
<BuildMacro Include="CopyDir">
<Value>$(CopyDir)</Value>
</BuildMacro>
- <BuildMacro Include="GlibLibtoolCompatibleDllPrefix">
- <Value>$(GlibLibtoolCompatibleDllPrefix)</Value>
- </BuildMacro>
- <BuildMacro Include="GlibLibtoolCompatibleDllSuffix">
- <Value>$(GlibLibtoolCompatibleDllSuffix)</Value>
- </BuildMacro>
- <BuildMacro Include="GlibSeparateVSDllPrefix">
- <Value>$(GlibSeparateVSDllPrefix)</Value>
- </BuildMacro>
- <BuildMacro Include="GlibSeparateVSDllSuffix">
- <Value>$(GlibSeparateVSDllSuffix)</Value>
- </BuildMacro>
<BuildMacro Include="GlibDllPrefix">
<Value>$(GlibDllPrefix)</Value>
</BuildMacro>
diff --git a/win32/vs9/glib-version-paths.vsprops.in b/win32/vs9/glib-version-paths.vsprops.in
index af7739fe3..c5c6c1b85 100644
--- a/win32/vs9/glib-version-paths.vsprops.in
+++ b/win32/vs9/glib-version-paths.vsprops.in
@@ -25,30 +25,12 @@
Value="$(GlibEtcInstallRoot)"
/>
<UserMacro
- Name="GlibLibtoolCompatibleDllPrefix"
- Value="lib"
- />
- <UserMacro
- Name="GlibLibtoolCompatibleDllSuffix"
- Value="-$(ApiVersion)-0"
- />
- <UserMacro
- Name="GlibSeparateVSDllPrefix"
- Value=""
- />
- <UserMacro
- Name="GlibSeparateVSDllSuffix"
- Value="-2-vs$(VSVer)"
- />
- <!-- Change these two to GlibLibtoolCompatibleDllPrefix and
- GlibLibtoolCompatibleDllSuffix if that is what you want -->
- <UserMacro
Name="GlibDllPrefix"
- Value="$(GlibSeparateVSDllPrefix)"
+ Value=""
/>
<UserMacro
Name="GlibDllSuffix"
- Value="$(GlibSeparateVSDllSuffix)"
+ Value="-2.0-0"
/>
<UserMacro
Name="PythonDir"