summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyunjee Kim <hj0426.kim@samsung.com>2019-12-03 10:55:17 +0900
committerHyunjee Kim <hj0426.kim@samsung.com>2019-12-03 10:55:17 +0900
commitd5a1e991c0c65ccab2b0cb9b8b9320ee3b2ea8e5 (patch)
tree8cc185ac77ddbf961f3f7356438007a72e7e1ba4
parent25d63acb6a98478b3fd901735198f87c644ffa64 (diff)
downloadglib-d5a1e991c0c65ccab2b0cb9b8b9320ee3b2ea8e5.tar.gz
glib-d5a1e991c0c65ccab2b0cb9b8b9320ee3b2ea8e5.tar.bz2
glib-d5a1e991c0c65ccab2b0cb9b8b9320ee3b2ea8e5.zip
Imported Upstream version 2.61.0
-rw-r--r--.gitlab-ci.yml51
-rwxr-xr-x.gitlab-ci/meson-junit-report.py101
-rwxr-xr-x.gitlab-ci/run-tests.sh18
-rw-r--r--.gitlab-ci/test-msvc.bat5
-rwxr-xr-x.gitlab-ci/test-msys2.sh35
-rw-r--r--NEWS173
-rw-r--r--docs/reference/gio/meson.build71
-rw-r--r--docs/reference/glib/glib-docs.xml4
-rw-r--r--docs/reference/glib/glib-sections.txt4
-rw-r--r--docs/reference/glib/meson.build65
-rw-r--r--docs/reference/glib/running.xml63
-rw-r--r--docs/reference/gobject/meson.build65
-rw-r--r--docs/reference/meson.build35
-rw-r--r--fuzzing/meson.build2
-rw-r--r--gio/gappinfo.c2
-rw-r--r--gio/gapplication.c3
-rw-r--r--gio/gapplicationimpl-dbus.c2
-rw-r--r--gio/gcancellable.c23
-rw-r--r--gio/gcocoanotificationbackend.m3
-rw-r--r--gio/gdatainputstream.c2
-rw-r--r--gio/gdbus-tool.c145
-rw-r--r--gio/gdbusaddress.c442
-rw-r--r--gio/gdbusauthobserver.c34
-rw-r--r--gio/gdbusdaemon.c31
-rw-r--r--gio/gdbusmessage.c5
-rw-r--r--gio/gdbusprivate.c397
-rw-r--r--gio/gdbusprivate.h11
-rw-r--r--gio/gdbusserver.c9
-rw-r--r--gio/gdesktopappinfo.c2
-rw-r--r--gio/gfile.c14
-rw-r--r--gio/gfile.h12
-rw-r--r--gio/gfileinfo.c3
-rw-r--r--gio/gfileinfo.h1
-rw-r--r--gio/ginputstream.c18
-rw-r--r--gio/gio-autocleanups.h2
-rw-r--r--gio/gioenums.h9
-rw-r--r--gio/gioerror.c6
-rw-r--r--gio/giomodule.c3
-rw-r--r--gio/giotypes.h2
-rw-r--r--gio/gkeyfilesettingsbackend.c7
-rw-r--r--gio/glib-compile-schemas.c4
-rw-r--r--gio/glocalfileinfo.c29
-rw-r--r--gio/glocalfilemonitor.c6
-rw-r--r--gio/gmountoperation.c2
-rw-r--r--gio/gnetworkaddress.c243
-rw-r--r--gio/gnetworkmonitornm.c39
-rw-r--r--gio/gopenuriportal.c2
-rw-r--r--gio/gpollableoutputstream.h8
-rw-r--r--gio/gportalsupport.c18
-rw-r--r--gio/gportalsupport.h1
-rw-r--r--gio/gproxyaddressenumerator.h2
-rw-r--r--gio/gresolver.c11
-rw-r--r--gio/gschema.dtd3
-rw-r--r--gio/gsettingsbackend.c41
-rw-r--r--gio/gsettingsschema.c4
-rw-r--r--gio/gsocket.c7
-rw-r--r--gio/gsocketaddressenumerator.c2
-rw-r--r--gio/gsocketclient.c25
-rw-r--r--gio/gsocketconnectable.c2
-rw-r--r--gio/gsocketconnectable.h2
-rw-r--r--gio/gsocketconnection.c2
-rw-r--r--gio/gsubprocess.c2
-rw-r--r--gio/gthreadedresolver.c22
-rw-r--r--gio/gthreadedsocketservice.c70
-rw-r--r--gio/gtlsdatabase.c2
-rw-r--r--gio/gunixconnection.c16
-rw-r--r--gio/gunixfdlist.c2
-rw-r--r--gio/gunixfdmessage.c2
-rw-r--r--gio/gunixmounts.c15
-rw-r--r--gio/gvfs.c10
-rw-r--r--gio/inotify/ginotifyfilemonitor.c4
-rw-r--r--gio/tests/.gitignore2
-rw-r--r--gio/tests/actions.c176
-rw-r--r--gio/tests/cancellable.c7
-rw-r--r--gio/tests/dbus-launch.c2
-rw-r--r--gio/tests/file.c23
-rw-r--r--gio/tests/g-file-info.c4
-rw-r--r--gio/tests/gdbus-address-get-session.c (renamed from gio/tests/gdbus-unix-addresses.c)56
-rw-r--r--gio/tests/gdbus-addresses.c72
-rwxr-xr-xgio/tests/gdbus-example-peer.c77
-rw-r--r--gio/tests/gdbus-proxy.c153
-rw-r--r--gio/tests/gdbus-test-codegen.c6
-rw-r--r--gio/tests/gdbus-testserver.c1
-rw-r--r--gio/tests/gmenumodel.c22
-rw-r--r--gio/tests/gsubprocess.c32
-rw-r--r--gio/tests/meson.build48
-rw-r--r--gio/tests/network-address.c90
-rw-r--r--gio/tests/task.c20
-rw-r--r--gio/win32/gwinhttpfile.c2
-rw-r--r--gio/win32/gwinhttpvfs.c18
-rw-r--r--glib.supp7
-rw-r--r--glib/docs.c386
-rw-r--r--glib/garcbox.c2
-rw-r--r--glib/gbacktrace.c10
-rw-r--r--glib/gconstructor.h2
-rw-r--r--glib/gconvert.c8
-rw-r--r--glib/gdatetime.c19
-rw-r--r--glib/gfileutils.c27
-rw-r--r--glib/ghash.c155
-rw-r--r--glib/giochannel.c29
-rw-r--r--glib/giounix.c3
-rw-r--r--glib/glib-init.c2
-rw-r--r--glib/glib-init.h2
-rw-r--r--glib/glib-private.h20
-rw-r--r--glib/glib-unix.c2
-rw-r--r--glib/glib_gdb.py20
-rw-r--r--glib/gmacros.h453
-rw-r--r--glib/gmain.c38
-rw-r--r--glib/gmappedfile.c2
-rw-r--r--glib/gmarkup.c14
-rw-r--r--glib/gmessages.h4
-rw-r--r--glib/gnulib/README43
-rw-r--r--glib/gnulib/arg-nonnull.h26
-rw-r--r--glib/gnulib/asnprintf.c4
-rw-r--r--glib/gnulib/c++defs.h316
-rw-r--r--glib/gnulib/float+.h147
-rw-r--r--glib/gnulib/fpucw.h108
-rw-r--r--glib/gnulib/frexp.c22
-rw-r--r--glib/gnulib/frexpl.c21
-rw-r--r--glib/gnulib/gl_cv_cc_double_expbit0/meson.build101
-rw-r--r--glib/gnulib/gl_cv_func_frexp_works/meson.build110
-rw-r--r--glib/gnulib/gl_cv_func_frexpl_works/meson.build142
-rw-r--r--glib/gnulib/gl_cv_func_ldexpl_works/meson.build57
-rw-r--r--glib/gnulib/gl_cv_func_printf_directive_a/meson.build94
-rw-r--r--glib/gnulib/gl_cv_func_printf_directive_f/meson.build81
-rw-r--r--glib/gnulib/gl_cv_func_printf_directive_ls/meson.build82
-rw-r--r--glib/gnulib/gl_cv_func_printf_enomem/meson.build73
-rw-r--r--glib/gnulib/gl_cv_func_printf_flag_grouping/meson.build37
-rw-r--r--glib/gnulib/gl_cv_func_printf_flag_leftadjust/meson.build39
-rw-r--r--glib/gnulib/gl_cv_func_printf_flag_zero/meson.build40
-rw-r--r--glib/gnulib/gl_cv_func_printf_infinite/meson.build135
-rw-r--r--glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build210
-rw-r--r--glib/gnulib/gl_cv_func_printf_long_double/meson.build50
-rw-r--r--glib/gnulib/gl_cv_func_printf_precision/meson.build54
-rw-r--r--glib/gnulib/gl_cv_long_double_equals_double/meson.build24
-rw-r--r--glib/gnulib/gl_extern_inline/meson.build103
-rw-r--r--glib/gnulib/glib-gnulib.patch460
-rw-r--r--glib/gnulib/gnulib_math.h.in2451
-rw-r--r--glib/gnulib/isinf.c30
-rw-r--r--glib/gnulib/isnan.c189
-rw-r--r--glib/gnulib/isnand-nolibm.h33
-rw-r--r--glib/gnulib/isnand.c22
-rw-r--r--glib/gnulib/isnanf-nolibm.h40
-rw-r--r--glib/gnulib/isnanf.c20
-rw-r--r--glib/gnulib/isnanl-nolibm.h33
-rw-r--r--glib/gnulib/isnanl.c23
-rw-r--r--glib/gnulib/meson.build340
-rw-r--r--glib/gnulib/printf-args.c4
-rw-r--r--glib/gnulib/printf-args.h4
-rw-r--r--glib/gnulib/printf-frexp.c190
-rw-r--r--glib/gnulib/printf-frexp.h23
-rw-r--r--glib/gnulib/printf-frexpl.c37
-rw-r--r--glib/gnulib/printf-frexpl.h23
-rw-r--r--glib/gnulib/printf-parse.c21
-rw-r--r--glib/gnulib/printf-parse.h4
-rw-r--r--glib/gnulib/signbitd.c64
-rw-r--r--glib/gnulib/signbitf.c64
-rw-r--r--glib/gnulib/signbitl.c64
-rw-r--r--glib/gnulib/vasnprintf.c114
-rw-r--r--glib/gnulib/vasnprintf.h4
-rw-r--r--glib/gnulib/verify.h32
-rw-r--r--glib/gnulib/xsize.h18
-rw-r--r--glib/goption.c16
-rw-r--r--glib/gprimes.c2
-rw-r--r--glib/gquark.c21
-rw-r--r--glib/grcbox.c2
-rw-r--r--glib/gscanner.c1
-rw-r--r--glib/gslice.c3
-rw-r--r--glib/gstdio-private.c89
-rw-r--r--glib/gstdio.c805
-rw-r--r--glib/gstdioprivate.h8
-rw-r--r--glib/gstrfuncs.c3
-rw-r--r--glib/gstring.c82
-rw-r--r--glib/gtester.c2
-rw-r--r--glib/gtestutils.c26
-rw-r--r--glib/gtestutils.h28
-rw-r--r--glib/gthread-posix.c6
-rw-r--r--glib/gthreadpool.c16
-rw-r--r--glib/gtimezone.c62
-rw-r--r--glib/gunicode.h2
-rw-r--r--glib/guniprop.c2
-rw-r--r--glib/gutils.c5
-rw-r--r--glib/gvariant-core.c2
-rw-r--r--glib/gvariant-parser.c49
-rw-r--r--glib/gvariant.c27
-rw-r--r--glib/gvarianttype.c4
-rw-r--r--glib/gvarianttypeinfo.c14
-rw-r--r--glib/gversionmacros.h24
-rw-r--r--glib/gwin32-private.c77
-rw-r--r--glib/gwin32.c213
-rw-r--r--glib/meson.build90
-rw-r--r--glib/tests/asyncqueue.c18
-rw-r--r--glib/tests/date.c2
-rw-r--r--glib/tests/fileutils.c237
-rw-r--r--glib/tests/gdatetime.c3
-rw-r--r--glib/tests/gvariant.c12
-rw-r--r--glib/tests/hash.c8
-rw-r--r--glib/tests/mainloop.c132
-rw-r--r--glib/tests/mappedfile.c28
-rw-r--r--glib/tests/meson.build5
-rw-r--r--glib/tests/option-argv0.c58
-rw-r--r--glib/tests/rand.c34
-rw-r--r--glib/tests/strfuncs.c8
-rw-r--r--glib/tests/unicode.c2
-rw-r--r--glib/tests/win32.c173
-rw-r--r--gobject/gboxed.c2
-rw-r--r--gobject/genums.c2
-rwxr-xr-xgobject/glib-genmarshal.in3
-rw-r--r--gobject/gobject.c29
-rw-r--r--gobject/gparam.c3
-rw-r--r--gobject/gparamspecs.c7
-rw-r--r--gobject/gtype.c2
-rw-r--r--gobject/gvaluearray.c3
-rw-r--r--gobject/gvaluetypes.c2
-rw-r--r--gobject/tests/meson.build2
-rw-r--r--meson.build185
-rw-r--r--meson_options.txt11
-rw-r--r--po/ca.po267
-rw-r--r--po/de.po2
-rw-r--r--po/eu.po3826
-rw-r--r--po/nl.po222
-rw-r--r--tests/meson.build2
-rw-r--r--tests/refcount/properties.c8
223 files changed, 12725 insertions, 5174 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 765fb5dd9..c9cd70f32 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -34,7 +34,7 @@ fedora-x86_64:
- ninja -C _build
- mkdir -p _coverage
- lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
- - meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} --no-suite flaky
+ - .gitlab-ci/run-tests.sh
- lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
# FIXME: We should run all installed tests, but do only this one for now
# because it cannot run uninstalled. Reconfigure with dtrace disabled
@@ -43,14 +43,44 @@ fedora-x86_64:
- ninja -C _build install
- GLIB_TEST_COMPILATION=1 $HOME/glib-installed/libexec/installed-tests/glib/static-link.py $HOME/glib-installed/lib/pkgconfig
artifacts:
+ reports:
+ junit: "_build/${CI_JOB_NAME}-report.xml"
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/glib/glibconfig.h"
- "_build/meson-logs"
+ - "_build/${CI_JOB_NAME}-report.xml"
- "_coverage"
+G_DISABLE_ASSERT:
+ stage: build
+ except:
+ - tags
+ variables:
+ CPPFLAGS: "-DG_DISABLE_ASSERT"
+ script:
+ - meson ${MESON_COMMON_OPTIONS}
+ --werror
+ -Dsystemtap=true
+ -Ddtrace=true
+ -Dfam=true
+ -Dinstalled_tests=true
+ _build
+ - ninja -C _build
+ - bash -x ./.gitlab-ci/run-tests.sh
+ artifacts:
+ reports:
+ junit: "_build/${CI_JOB_NAME}-report.xml"
+ name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
+ when: always
+ paths:
+ - "_build/config.h"
+ - "_build/glib/glibconfig.h"
+ - "_build/meson-logs"
+ - "_build/${CI_JOB_NAME}-report.xml"
+
.cross-template: &cross-template
stage: build
except:
@@ -65,7 +95,9 @@ cross-android_api21_arm64:
<<: *cross-template
script:
# FIXME: add --werror
- - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=gnu -Dinternal_pcre=true _build
+ # We use -Diconv=auto to test that we successfully detect that iconv is not
+ # provided by android api 21, and detect the external iconv instead.
+ - meson ${MESON_COMMON_OPTIONS} --cross-file=/opt/cross_file_android_arm64_21.txt -Diconv=auto -Dinternal_pcre=true _build
- ninja -C _build
cross-android_api28_arm64:
@@ -95,10 +127,13 @@ msys2-mingw32:
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
artifacts:
+ reports:
+ junit: "_build/%CI_JOB_NAME%-report.xml"
name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
when: always
paths:
- _build/meson-logs
+ - "_build/%CI_JOB_NAME%-report.xml"
- _coverage/
vs2017-x64:
@@ -110,10 +145,13 @@ vs2017-x64:
script:
- .gitlab-ci/test-msvc.bat
artifacts:
+ reports:
+ junit: "_build/%CI_JOB_NAME%-report.xml"
name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
when: always
paths:
- _build/meson-logs
+ - "_build/%CI_JOB_NAME%-report.xml"
freebsd-11-x86_64:
stage: build
@@ -137,21 +175,24 @@ freebsd-11-x86_64:
LANG: en_US.UTF-8
script:
# We cannot use -Wl,--no-undefined because GLib uses 'environ' variable.
- # FreeBSD iconv doesn't handle transliteration, so we use GNU libiconv here.
+ # FreeBSD iconv doesn't handle transliteration, so we use (external) GNU libiconv here.
# FreeBSD supports xattr, but its API is different from Linux xattr.
# FIXME: extattr(2) support: https://gitlab.gnome.org/GNOME/glib/issues/1404
- - meson ${MESON_COMMON_OPTIONS} -Db_lundef=false -Diconv=gnu -Dxattr=false _build
+ - meson ${MESON_COMMON_OPTIONS} -Db_lundef=false -Diconv=external -Dxattr=false _build
- ninja -C _build
- - meson test -C _build --timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" --no-suite flaky
+ - bash -x ./.gitlab-ci/run-tests.sh
except:
- tags
artifacts:
+ reports:
+ junit: "_build/${CI_JOB_NAME}-report.xml"
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- "_build/config.h"
- "_build/glib/glibconfig.h"
- "_build/meson-logs"
+ - "_build/${CI_JOB_NAME}-report.xml"
coverage:
stage: coverage
diff --git a/.gitlab-ci/meson-junit-report.py b/.gitlab-ci/meson-junit-report.py
new file mode 100755
index 000000000..ea4928248
--- /dev/null
+++ b/.gitlab-ci/meson-junit-report.py
@@ -0,0 +1,101 @@
+#!/usr/bin/env python3
+
+import argparse
+import datetime
+import json
+import os
+import sys
+import xml.etree.ElementTree as ET
+
+aparser = argparse.ArgumentParser(description='Turns a Meson test log into a JUnit report')
+aparser.add_argument('--project-name', metavar='NAME',
+ help='The project name',
+ default='unknown')
+aparser.add_argument('--job-id', metavar='ID',
+ help='The job ID for the report',
+ default='Unknown')
+aparser.add_argument('--branch', metavar='NAME',
+ help='Branch of the project being tested',
+ default='master')
+aparser.add_argument('--output', metavar='FILE',
+ help='The output file, stdout by default',
+ type=argparse.FileType('w', encoding='UTF-8'),
+ default=sys.stdout)
+aparser.add_argument('infile', metavar='FILE',
+ help='The input testlog.json, stdin by default',
+ type=argparse.FileType('r', encoding='UTF-8'),
+ default=sys.stdin)
+
+args = aparser.parse_args()
+
+outfile = args.output
+
+testsuites = ET.Element('testsuites')
+testsuites.set('id', '{}/{}'.format(args.job_id, args.branch))
+testsuites.set('package', args.project_name)
+testsuites.set('timestamp', datetime.datetime.utcnow().isoformat(timespec='minutes'))
+
+suites = {}
+for line in args.infile:
+ data = json.loads(line)
+ (full_suite, unit_name) = data['name'].split(' / ')
+ (project_name, suite_name) = full_suite.split(':')
+
+ duration = data['duration']
+ return_code = data['returncode']
+ log = data['stdout']
+
+ unit = {
+ 'suite': suite_name,
+ 'name': unit_name,
+ 'duration': duration,
+ 'returncode': return_code,
+ 'stdout': log,
+ }
+
+ units = suites.setdefault(suite_name, [])
+ units.append(unit)
+
+for name, units in suites.items():
+ print('Processing suite {} (units: {})'.format(name, len(units)))
+
+ def if_failed(unit):
+ if unit['returncode'] != 0:
+ return True
+ return False
+
+ def if_succeded(unit):
+ if unit['returncode'] == 0:
+ return True
+ return False
+
+ successes = list(filter(if_succeded, units))
+ failures = list(filter(if_failed, units))
+ print(' - {}: {} pass, {} fail'.format(name, len(successes), len(failures)))
+
+ testsuite = ET.SubElement(testsuites, 'testsuite')
+ testsuite.set('name', '{}/{}'.format(args.project_name, name))
+ testsuite.set('tests', str(len(units)))
+ testsuite.set('errors', str(len(failures)))
+ testsuite.set('failures', str(len(failures)))
+
+ for unit in successes:
+ testcase = ET.SubElement(testsuite, 'testcase')
+ testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
+ testcase.set('name', unit['name'])
+ testcase.set('time', str(unit['duration']))
+
+ for unit in failures:
+ testcase = ET.SubElement(testsuite, 'testcase')
+ testcase.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
+ testcase.set('name', unit['name'])
+ testcase.set('time', str(unit['duration']))
+
+ failure = ET.SubElement(testcase, 'failure')
+ failure.set('classname', '{}/{}'.format(args.project_name, unit['suite']))
+ failure.set('name', unit['name'])
+ failure.set('type', 'error')
+ failure.text = unit['stdout']
+
+output = ET.tostring(testsuites, encoding='unicode')
+outfile.write(output)
diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh
new file mode 100755
index 000000000..ca02816f9
--- /dev/null
+++ b/.gitlab-ci/run-tests.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+set +e
+
+meson test \
+ -C _build \
+ --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} \
+ --no-suite flaky
+
+exit_code=$?
+
+python3 .gitlab-ci/meson-junit-report.py \
+ --project-name=glib \
+ --job-id "${CI_JOB_NAME}" \
+ --output "_build/${CI_JOB_NAME}-report.xml" \
+ _build/meson-logs/testlog.json
+
+exit $exit_code
diff --git a/.gitlab-ci/test-msvc.bat b/.gitlab-ci/test-msvc.bat
index e5f807387..b2de2baf4 100644
--- a/.gitlab-ci/test-msvc.bat
+++ b/.gitlab-ci/test-msvc.bat
@@ -14,6 +14,11 @@ meson test -C _build --timeout-multiplier %MESON_TEST_TIMEOUT_MULTIPLIER% --no-s
:: FIXME: can we get code coverage support?
+
+python "%CD%\.gitlab-ci\meson-junit-report.py" --project-name glib ^
+--job-id "%CI_JOB_NAME%" --output "%CD%/_build/%CI_JOB_NAME%-report.xml" ^
+"%CD%/_build/meson-logs/testlog.json"
+
goto :EOF
:error
exit /b 1
diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh
index c3f3bcd1b..e426f5d5f 100755
--- a/.gitlab-ci/test-msys2.sh
+++ b/.gitlab-ci/test-msys2.sh
@@ -42,23 +42,26 @@ meson --werror --buildtype debug _build
cd _build
ninja
-# FIXME: lcov doesn't support gcc9 yet:
-# https://github.com/linux-test-project/lcov/issues/58
-#"${LCOV}" \
-# --quiet \
-# --config-file "${DIR}"/.gitlab-ci/lcovrc \
-# --directory "${DIR}/_build" \
-# --capture \
-# --initial \
-# --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
+"${LCOV}" \
+ --quiet \
+ --config-file "${DIR}"/.gitlab-ci/lcovrc \
+ --directory "${DIR}/_build" \
+ --capture \
+ --initial \
+ --output-file "${DIR}/_coverage/${CI_JOB_NAME}-baseline.lcov"
# FIXME: fix the test suite
meson test --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER} --no-suite flaky || true
-# FIXME: see above
-#"${LCOV}" \
-# --quiet \
-# --config-file "${DIR}"/.gitlab-ci/lcovrc \
-# --directory "${DIR}/_build" \
-# --capture \
-# --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
+python3 "${DIR}"/.gitlab-ci/meson-junit-report.py \
+ --project-name glib \
+ --job-id "${CI_JOB_NAME}" \
+ --output "${DIR}/_build/${CI_JOB_NAME}-report.xml" \
+ "${DIR}/_build/meson-logs/testlog.json"
+
+"${LCOV}" \
+ --quiet \
+ --config-file "${DIR}"/.gitlab-ci/lcovrc \
+ --directory "${DIR}/_build" \
+ --capture \
+ --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
diff --git a/NEWS b/NEWS
index 41b59a594..923177660 100644
--- a/NEWS
+++ b/NEWS
@@ -1,126 +1,87 @@
-Overview of changes in GLib 2.60.7
+Overview of changes in GLib 2.61.0
==================================
-* Bugs fixed:
- - #1819 Invalid characters in Open Location dialog crashes GIMP
- - #1847 Setting GLIB_VERSION_{MIN_REQUIRED, MAX_ALLOWED} to before 2.56 triggers warnings
- - !1012 Backport !1009 “gapplication: remove inactivity_timeout source on finalize” to glib-2-60
- - !1013 Backport !1008 “gmessages: Only use structured logs if GLIB_VERSION_MAX_ALLOWED is ≥2.56” to glib-2-60
- - !1061 Backport !966 “Resolve "Invalid characters in Open Location dialog crashes GIMP"” to glib-2-60
- - !1065 Backport !1040 “GSettingsBackend - Fix thread-safety during destruction of GSettings instances...” to glib-2-60
- - !1081 Backport !1017 “gdatetime: Avoid an assertion failure when parsing some ISO 8601 dates” to glib-2-60
-
-
-Overview of changes in GLib 2.60.6
-==================================
-
-* Fix various bugs with use of the `GKeyfileSettingsBackend` within flatpaks (!984, !985, #1825)
-
-* Bugs fixed:
- - !993 Backport !984, !985 keyfile/portal fixes to glib-2-60
-
-
-Overview of changes in GLib 2.60.5
-==================================
-
-* Fix implicit use of the `GKeyfileSettingsBackend` (#1822)
-
-* Fix opening a URI using the ‘Open URI’ portal (!968)
-
-* Bugs fixed:
- - !910 Backport !909 “D-Bus auth mechanism improvements” to glib-2-60
- - !949 Backport !945 “Avoid overrunning stack at the end of the varargs.” to glib-2-60
- - !956 Backport !954 “Fix the ISO 15924 code for Manichaean” to glib-2-60
- - !958 gthread: fix minor errno problem in GCond
- - !969 Backport !968 ”Fix typo in request handle” to glib-2-60
- - !977 Backport !974 “Ensure that the keyfile settings backend exists” to glib-2-60
-
-
-Overview of changes in GLib 2.60.4
-==================================
-
-* Fixes to improved network status detection with NetworkManager (#1788)
+* Changes to `iconv` configure options, including the default iconv
+ implementation on macOS — distributors may need to check their configure
+ scripts (#1557)
-* Leak fixes to some `glib-genmarshal` generated code (#1793)
+* Build fixes when building GLib with `G_DISABLE_ASSERT` defined (#1708)
-* Further fixes to the Happy Eyeballs (RFC 8305) implementation (!865)
+* Fix documentation for `gdbus-tool wait` to use correct units (#1737)
-* File system permissions fix to clamp down permissions in a small time window
- when copying files (CVE-2019-12450, !876)
-
-* Bugs fixed:
- - #1755 Please revert #535 gmacros: Try to use the standard __func__ first in G_STRFUNC
- - #1788 GNetworkMonitor claims I am offline
- - #1792 glib-genmarshal generated valist marshal does not respect static scope for some types
- - #1793 glib-genmarshal generates wrong code for va marshaler for VARIANT type
- - #1795 Fix mingw32 CI on older branches
- - !865 gnetworkaddress: fix "happy eyeballs" logic
- - !878 Backport !876 “gfile: Limit access to files when copying” to glib-2-60
-
-
-Overview of changes in GLib 2.60.3
-==================================
-
-* Various fixes to small key/value support in `GHashTable` (#1749, #1780)
-
-* Bugs fixed:
- - #1747 Critical in g_socket_client_async_connect_complete
- - #1749 New GHashTable implementation confuses valgrind
- - #1759 test_month_names: assertion failed
- - #1771 GNetworkAddressAddressEnumerator unsafely modifies cache in GNetworkAddress
- - #1774 Leaks in gsocketclient.c connection code
- - #1776 glib/date test fails
- - #1780 GDB pretty-printer for GHashTable no longer works
- - !815 Merge branch 'wip/tingping/socketclient-cancel-2' into 'master'
- - !816 Backport !814 “gschema.dtd: Add target attribute to alias” to glib-2-60
- - !826 Backport !824 “gsocketclient: Fix a leak in the connection code” to glib-2-60
- - !829 Backport !828 “build: Fix a typo in the test whether _NL_ABALTMON_n is supported” to glib-2-60
- - !834 Backport !823 "gnetworkaddress: Fix parallel enumerations interfering with eachother" to glib-2-60
- - !838 Backport !835 “Fix typo in German translation” to glib-2-60
- - !841 Backport !839 “tests: Update month name check for Greek locale” to glib-2-60
- - !844 Backport !840 “ghash: Disable small-arrays under valgrind” to glib-2-60
- - !846 Backport !845 “Fixing g_format_size_full() on Windows-x64” to glib-2-60
- - !855 Backport !848 (more GHashTable fixes) to glib-2-60
- - !858 Backport !852 “Update gdb pretty-printer for GHashTable” to glib-2-60
-
-* Translation updates:
- - German
+* Improvements to symlink handling on Windows (!269)
+* Add exception handling for crashes on Windows (!582)
-Overview of changes in GLib 2.60.2
-==================================
-
-* Fix crash when displaying notifications on macOS (!786)
+* Set `G_WITH_CYGWIN` again when GLib is built on Cygwin (this was a regression
+ from the autotools build) (!736)
-* Improve network status detection with NetworkManager (!781)
+* Use `GCocoaNotificationBackend` by default on macOS, rather than
+ `GGtkNotificationBackend` (!745)
-* Bugs fixed:
- - !790 glib/gconstructor.h: Include stdlib.h for MSVC builds
- - !793 Backport !786: “cocoanotificationbackend: do not release readonly property” to glib-2-60
- - !803 Backport !781 “gnetworkmonitornm: Fix network available detection” to glib-2-60
-
-* Translation updates:
- - Catalan
-
-
-Overview of changes in GLib 2.60.1
-==================================
+* Use Windows symbol visibility when GLib is built on Cygwin, as PE binaries
+ are subject to W32 visibility mechanics — this affects the definition of
+ `_GLIB_EXTERN` (!752)
-* Fix documentation for `gdbus-tool wait` to use correct units
+* Add coloured output support to `gdbus introspect` (!761)
* Bugs fixed:
+ - #682 docs: advise not to use non-literal strings as qdata keys
+ - #1177 gparted crashes due to g_quark_from_static_string used in global initialization
+ - #1258 the buffer written to by g_input_stream_read is not marked as an out parameter
+ - #1557 By default glib tries to use libc instead of native iconv on OSX
+ - #1566 Meld Windows shows error on startup "There was a problem starting c:\Program"
+ - #1614 GIO tests fail on FreeBSD CI with: Unexpected error from C library during 'pthread_mutex_lock': Invalid argument
+ - #1708 Building GLib with G_DISABLE_ASSERT fails
- #1709 GResource generation test incompatible with stable LLVM on Linux
+ - #1710 Crash in g_cancellable_cancel
+ - #1712 gdbus-proxy test is flaky
+ - #1724 unconditional check in fuzzing/meson.build
- #1725 gosxappinfo.h is not installed on macOS
+ - #1727 Cannot use trash folder with an NFS mount using automount / autofs
+ - #1728 GSocket does not support ENOTSOCK
+ - #1732 Win32: lookup_by_name_async segfaults for not available domains
- #1737 gdbus-tool wait command timeout argument incorrect unit reference
- - !711 socket: Fix annotation for flags in g_socket_receive_message
- - !722 Backport codegen: Fix use of uninitialised variable from !721 to glib-2-60
- - !727 Backport !719 “Handle an UNKNOWN NetworkManager connectivity as NONE” to glib-2-60
- - !729 Backport !728 “gsocket: Remove (type) annotation from flags arguments” to glib-2-60
- - !758 gdbusaddress, win32: backport using cwd for running rundll32
- - !775 meson: Hotfix for iconv detection on macOS
+ - !67 glib: update internal gnulib from upstream
+ - !269 Win32 symlink code refactoring
+ - !493 tests: Check that cancelling g_file_replace don't overwrite existing file
+ - !582 Basic W32 exception handling for glib
+ - !680 Fix warnings glib
+ - !690 Fix thread safety issues
+ - !694 gvariant-parser: Fix pattern coalesce of M and *
+ - !706 Fix data races in task test and gmenumodel test
+ - !709 Bump release version for 2.62 series
+ - !710 socket: Fix annotation for flags in g_socket_receive_message
+ - !712 gwin32: Fix comment for g_win32_veh_handler
+ - !716 Various minor documentation fixes
+ - !717 Improve formatting of GCC attribute documentation
+ - !718 GSocketClient - Free last error if a connection attempt fails and on retry the...
+ - !719 Handle an UNKNOWN NetworkManager connectivity as NONE
+ - !721 codegen: Fix use of uninitialised variable
+ - !723 Provide examples for GNUC attribute macros
+ - !724 meson: do a build-time check for strlcpy before attempting runtime check
+ - !728 gsocket: Remove (type) annotation from flags arguments
+ - !730 Improve gdbus-address parsing tests
+ - !735 docs: Use the right g_autoptr function when using an auxiliary function
+ - !736 Set G_WITH_CYGWIN again
+ - !737 gresolver: Don’t use gai_strerror() on Windows, as it isn’t threadsafe
+ - !741 Fix use-after-free triggered by gnome-session-binary
+ - !745 gcocoanotificationbackend: give more priority than the gtk one
+ - !749 gio: Add missing autocleanup definition for GSettingsSchema{Key,Source}
+ - !750 Check for RTLD_NEXT
+ - !752 Use W32 visibility for Cygwin
+ - !754 Check for /proc/self/cmdline
+ - !757 Fix gnulib build on older Visual Studio builds
+ - !760 Properly ensure the cocoa notification backend type
+ - !761 RFC: gdbus-tool: Add --color option for introspect
+ - !762 gutils: Add (nullable) annotation to g_get_prgname()
+ - !765 gslice: Use a convenience macro
+ - !769 ci: Generate a cover report for the test suite
+ - !772 tests: Check that option-argv0 test succeeds on Linux
+ - !776 tests: Only run --external-data test on GNU ld/objcopy
+ - !779 Fix 2.62 documentation symbols
* Translation updates:
- - Basque
- Dutch
diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build
index 045431868..930a3b75c 100644
--- a/docs/reference/gio/meson.build
+++ b/docs/reference/gio/meson.build
@@ -118,65 +118,11 @@ if get_option('gtk_doc')
]
endif
- 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_AVAILABLE_IN_2_58',
- 'GLIB_AVAILABLE_IN_2_60',
- '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',
- 'GLIB_DEPRECATED_IN_2_58',
- 'GLIB_DEPRECATED_IN_2_58_FOR',
- 'GLIB_DEPRECATED_IN_2_60',
- 'GLIB_DEPRECATED_IN_2_60_FOR',
+ ignore_sources = [
+ 'kqueue',
+ 'tests',
+ 'gdbus-daemon-generated.c',
+ 'xdp-dbus.c',
]
# FIXME: More win32 headers were added to fix building gio-scan
@@ -198,12 +144,13 @@ if get_option('gtk_doc')
mode : 'none',
dependencies : [libgio_dep, libgobject_dep, libglib_dep],
src_dir : 'gio',
- scan_args : [
+ scan_args : gtkdoc_common_scan_args + [
'--rebuild-types',
- '--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers),
],
+ mkdb_args : [
+ '--ignore-files=' + ' '.join(ignore_sources),
+ ],
content_files : [
'overview.xml',
'migrating-posix.xml',
diff --git a/docs/reference/glib/glib-docs.xml b/docs/reference/glib/glib-docs.xml
index 8fe9569bf..6d5c2ad4f 100644
--- a/docs/reference/glib/glib-docs.xml
+++ b/docs/reference/glib/glib-docs.xml
@@ -268,6 +268,10 @@
<title>Index of new symbols in 2.60</title>
<xi:include href="xml/api-index-2.60.xml"><xi:fallback /></xi:include>
</index>
+ <index id="api-index-2-62" role="2.62">
+ <title>Index of new symbols in 2.62</title>
+ <xi:include href="xml/api-index-2.62.xml"><xi:fallback /></xi:include>
+ </index>
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index ee1defd9e..d847d21e1 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -134,6 +134,7 @@ GLIB_VERSION_2_54
GLIB_VERSION_2_56
GLIB_VERSION_2_58
GLIB_VERSION_2_60
+GLIB_VERSION_2_62
GLIB_VERSION_MIN_REQUIRED
GLIB_VERSION_MAX_ALLOWED
GLIB_DISABLE_DEPRECATION_WARNINGS
@@ -159,6 +160,7 @@ GLIB_AVAILABLE_IN_2_54
GLIB_AVAILABLE_IN_2_56
GLIB_AVAILABLE_IN_2_58
GLIB_AVAILABLE_IN_2_60
+GLIB_AVAILABLE_IN_2_62
GLIB_DEPRECATED_IN_2_26
GLIB_DEPRECATED_IN_2_26_FOR
GLIB_DEPRECATED_IN_2_28
@@ -195,6 +197,8 @@ GLIB_DEPRECATED_IN_2_58
GLIB_DEPRECATED_IN_2_58_FOR
GLIB_DEPRECATED_IN_2_60
GLIB_DEPRECATED_IN_2_60_FOR
+GLIB_DEPRECATED_IN_2_62
+GLIB_DEPRECATED_IN_2_62_FOR
GLIB_VERSION_CUR_STABLE
GLIB_VERSION_PREV_STABLE
</SECTION>
diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build
index 9699fec48..1d4009f8d 100644
--- a/docs/reference/glib/meson.build
+++ b/docs/reference/glib/meson.build
@@ -40,67 +40,6 @@ if get_option('gtk_doc')
'gvalgrind.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_AVAILABLE_IN_2_58',
- 'GLIB_AVAILABLE_IN_2_60',
- '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',
- 'GLIB_DEPRECATED_IN_2_58',
- 'GLIB_DEPRECATED_IN_2_58_FOR',
- 'GLIB_DEPRECATED_IN_2_60',
- 'GLIB_DEPRECATED_IN_2_60_FOR',
- ]
-
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version())
@@ -116,9 +55,7 @@ if get_option('gtk_doc')
mode : 'none',
src_dir : [ 'glib', 'gmodule' ],
dependencies : libglib_dep,
- scan_args : [
- '--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=' + '|'.join(ignore_decorators),
+ scan_args : gtkdoc_common_scan_args + [
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/glib/running.xml b/docs/reference/glib/running.xml
index 8e4ffeca3..86765c868 100644
--- a/docs/reference/glib/running.xml
+++ b/docs/reference/glib/running.xml
@@ -256,6 +256,69 @@ How to run and debug your GLib application
</para>
</formalpara>
+<formalpara id="G_DEBUGGER">
+ <title><envar>G_DEBUGGER</envar></title>
+
+ <para>
+ When running on Windows, if set to a non-empty string, GLib will
+ try to interpret the contents of this environment variable as
+ a command line to a debugger, and run it if the process crashes.
+ The debugger command line should contain <literal>%p</literal> and <literal>%e</literal> substitution
+ tokens, which GLib will replace with the process ID of the crashing
+ process and a handle to an event that the debugger should signal
+ to let GLib know that the debugger successfully attached to the
+ process. If <literal>%e</literal> is absent, or if the debugger is not able to
+ signal events, GLib will resume execution after 60 seconds.
+ If <literal>%p</literal> is absent, the debugger won't know which process to attach to,
+ and GLib will also resume execution after 60 seconds.
+ </para>
+ <para>
+ Additionally, even if <envar>G_DEBUGGER</envar> is not set, GLib would still
+ try to print basic exception information (code and address) into
+ stderr.
+ </para>
+ <para>
+ By default the debugger gets a new console allocated for it.
+ Set the <envar>G_DEBUGGER_OLD_CONSOLE</envar> environment variable to any
+ non-empty string to make the debugger inherit the console of
+ the crashing process. Normally this is only used by the GLib
+ testsuite.
+ </para>
+ <para>
+ The exception handler is written with the aim of making it as
+ simple as possible, to minimize the risk of it invoking
+ buggy functions or running buggy code, which would result
+ in exceptions being raised recursively. Because of that
+ it lacks most of the amenities that one would expect of GLib.
+ Namely, it does not support Unicode, so it is highly advisable
+ to only use ASCII characters in <envar>G_DEBUGGER</envar>.
+ </para>
+ <para>
+ See also <link linkend="G_VEH_CATCH"><envar>G_VEH_CATCH</envar></link>.
+ </para>
+</formalpara>
+
+<formalpara id="G_VEH_CATCH">
+ <title><envar>G_VEH_CATCH</envar></title>
+
+ <para>
+ Catching some exceptions can break the program, since Windows
+ will sometimes use exceptions for execution flow control and
+ other purposes other than signalling a crash.
+ </para>
+ <para>
+ The <envar>G_VEH_CATCH</envar> environment variable augments
+ <ulink url="https://docs.microsoft.com/en-us/windows/desktop/debug/vectored-exception-handling">Vectored Exception Handling</ulink>
+ on Windows (see <link linkend="G_DEBUGGER"><envar>G_DEBUGGER</envar></link>), allowing GLib to catch more
+ exceptions. Set this variable to a comma-separated list of
+ hexademical exception codes that should additionally be caught.
+ </para>
+ <para>
+ By default GLib will only catch Access Violation, Stack Overflow and
+ Illegal Instruction <ulink url="https://docs.microsoft.com/en-us/windows/desktop/api/winnt/ns-winnt-_exception_record">exceptions</ulink>.
+ </para>
+</formalpara>
+
</refsect2>
<refsect2 id="setlocale">
diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build
index 175520b64..096c9036f 100644
--- a/docs/reference/gobject/meson.build
+++ b/docs/reference/gobject/meson.build
@@ -10,67 +10,6 @@ if get_option('gtk_doc')
'glib-enumtypes.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_AVAILABLE_IN_2_58',
- 'GLIB_AVAILABLE_IN_2_60',
- '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',
- 'GLIB_DEPRECATED_IN_2_58',
- 'GLIB_DEPRECATED_IN_2_58_FOR',
- 'GLIB_DEPRECATED_IN_2_60',
- 'GLIB_DEPRECATED_IN_2_60_FOR',
- ]
-
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version())
@@ -89,10 +28,8 @@ if get_option('gtk_doc')
dependencies : [libgobject_dep, libglib_dep],
include_directories : [gtkdocincl],
src_dir : 'gobject',
- scan_args : [
+ scan_args : gtkdoc_common_scan_args + [
'--rebuild-types',
- '--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
new file mode 100644
index 000000000..e4dbf3f12
--- /dev/null
+++ b/docs/reference/meson.build
@@ -0,0 +1,35 @@
+# The list of minor versions in the 2.x.x series which have had
+# GLIB_AVAILABLE_IN_* macros. This should include the current unreleased stable
+# version.
+#
+# FIXME: It would be good to be able to generate this list:
+# https://github.com/mesonbuild/meson/issues/5026
+stable_2_series_versions = [
+ '26', '28', '30', '32', '34', '36', '38',
+ '40', '42', '44', '46', '48', '50', '52', '54', '56', '58',
+ '60', '62',
+]
+
+ignore_decorators = [
+ 'GLIB_VAR',
+ 'G_GNUC_INTERNAL',
+ 'G_GNUC_WARN_UNUSED_RESULT',
+ 'GLIB_AVAILABLE_IN_ALL',
+]
+
+foreach version : stable_2_series_versions
+ ignore_decorators += [
+ 'GLIB_AVAILABLE_IN_2_' + version,
+ 'GLIB_DEPRECATED_IN_2_' + version,
+ 'GLIB_DEPRECATED_IN_2_' + version + '_FOR',
+ ]
+endforeach
+
+gtkdoc_common_scan_args = [
+ '--deprecated-guards=G_DISABLE_DEPRECATED',
+ '--ignore-decorators=' + '|'.join(ignore_decorators),
+]
+
+subdir('gio')
+subdir('glib')
+subdir('gobject') \ No newline at end of file
diff --git a/fuzzing/meson.build b/fuzzing/meson.build
index 16878fedf..7fdd8c909 100644
--- a/fuzzing/meson.build
+++ b/fuzzing/meson.build
@@ -13,7 +13,7 @@ extra_c_args = cc.get_supported_arguments('-Werror=unused-function')
# Links in a static library provided by oss-fuzz, else a standalone driver.
# https://github.com/google/oss-fuzz/blob/master/docs/new_project_guide.md#buildsh-script-environment
-fuzzing_engine = cxx.find_library('FuzzingEngine', required : false)
+fuzzing_engine = cxx.find_library('FuzzingEngine', required : get_option('oss_fuzz'))
if fuzzing_engine.found()
deps += fuzzing_engine
else
diff --git a/gio/gappinfo.c b/gio/gappinfo.c
index 84e667575..1fd0a7ad7 100644
--- a/gio/gappinfo.c
+++ b/gio/gappinfo.c
@@ -778,7 +778,7 @@ g_app_info_should_show (GAppInfo *appinfo)
*
* The D-Bus–activated applications don't have to be started if your application
* terminates too soon after this function. To prevent this, use
- * g_app_info_launch_default_for_uri() instead.
+ * g_app_info_launch_default_for_uri_async() instead.
*
* Returns: %TRUE on success, %FALSE on error.
**/
diff --git a/gio/gapplication.c b/gio/gapplication.c
index 321b34f54..2d2ab48e3 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -1372,9 +1372,6 @@ g_application_finalize (GObject *object)
{
GApplication *application = G_APPLICATION (object);
- if (application->priv->inactivity_timeout_id)
- g_source_remove (application->priv->inactivity_timeout_id);
-
g_slist_free_full (application->priv->option_groups, (GDestroyNotify) g_option_group_unref);
if (application->priv->main_options)
g_option_group_unref (application->priv->main_options);
diff --git a/gio/gapplicationimpl-dbus.c b/gio/gapplicationimpl-dbus.c
index 76d67eec8..fd9d0468d 100644
--- a/gio/gapplicationimpl-dbus.c
+++ b/gio/gapplicationimpl-dbus.c
@@ -774,7 +774,7 @@ g_application_impl_command_line (GApplicationImpl *impl,
const gchar *object_path = "/org/gtk/Application/CommandLine";
GMainContext *context;
CommandLineData data;
- guint object_id;
+ guint object_id G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
context = g_main_context_new ();
data.loop = g_main_loop_new (context, FALSE);
diff --git a/gio/gcancellable.c b/gio/gcancellable.c
index de6d43495..31e990f3c 100644
--- a/gio/gcancellable.c
+++ b/gio/gcancellable.c
@@ -43,7 +43,9 @@ enum {
struct _GCancellablePrivate
{
- guint cancelled : 1;
+ /* Atomic so that g_cancellable_is_cancelled does not require holding the mutex. */
+ gboolean cancelled;
+ /* Access to fields below is protected by cancellable_mutex. */
guint cancelled_running : 1;
guint cancelled_running_waiting : 1;
@@ -269,12 +271,12 @@ g_cancellable_reset (GCancellable *cancellable)
g_cond_wait (&cancellable_cond, &cancellable_mutex);
}
- if (priv->cancelled)
+ if (g_atomic_int_get (&priv->cancelled))
{
if (priv->wakeup)
GLIB_PRIVATE_CALL (g_wakeup_acknowledge) (priv->wakeup);
- priv->cancelled = FALSE;
+ g_atomic_int_set (&priv->cancelled, FALSE);
}
g_mutex_unlock (&cancellable_mutex);
@@ -292,7 +294,7 @@ g_cancellable_reset (GCancellable *cancellable)
gboolean
g_cancellable_is_cancelled (GCancellable *cancellable)
{
- return cancellable != NULL && cancellable->priv->cancelled;
+ return cancellable != NULL && g_atomic_int_get (&cancellable->priv->cancelled);
}
/**
@@ -404,7 +406,7 @@ g_cancellable_make_pollfd (GCancellable *cancellable, GPollFD *pollfd)
{
cancellable->priv->wakeup = GLIB_PRIVATE_CALL (g_wakeup_new) ();
- if (cancellable->priv->cancelled)
+ if (g_atomic_int_get (&cancellable->priv->cancelled))
GLIB_PRIVATE_CALL (g_wakeup_signal) (cancellable->priv->wakeup);
}
@@ -440,11 +442,11 @@ g_cancellable_release_fd (GCancellable *cancellable)
return;
g_return_if_fail (G_IS_CANCELLABLE (cancellable));
- g_return_if_fail (cancellable->priv->fd_refcount > 0);
priv = cancellable->priv;
g_mutex_lock (&cancellable_mutex);
+ g_assert (priv->fd_refcount > 0);
priv->fd_refcount--;
if (priv->fd_refcount == 0)
@@ -482,21 +484,20 @@ g_cancellable_cancel (GCancellable *cancellable)
{
GCancellablePrivate *priv;
- if (cancellable == NULL ||
- cancellable->priv->cancelled)
+ if (cancellable == NULL || g_cancellable_is_cancelled (cancellable))
return;
priv = cancellable->priv;
g_mutex_lock (&cancellable_mutex);
- if (priv->cancelled)
+ if (g_atomic_int_get (&priv->cancelled))
{
g_mutex_unlock (&cancellable_mutex);
return;
}
- priv->cancelled = TRUE;
+ g_atomic_int_set (&priv->cancelled, TRUE);
priv->cancelled_running = TRUE;
if (priv->wakeup)
@@ -562,7 +563,7 @@ g_cancellable_connect (GCancellable *cancellable,
g_mutex_lock (&cancellable_mutex);
- if (cancellable->priv->cancelled)
+ if (g_atomic_int_get (&cancellable->priv->cancelled))
{
void (*_callback) (GCancellable *cancellable,
gpointer user_data);
diff --git a/gio/gcocoanotificationbackend.m b/gio/gcocoanotificationbackend.m
index fe9a7a552..9d632b4a5 100644
--- a/gio/gcocoanotificationbackend.m
+++ b/gio/gcocoanotificationbackend.m
@@ -44,7 +44,7 @@ GType g_cocoa_notification_backend_get_type (void);
G_DEFINE_TYPE_WITH_CODE (GCocoaNotificationBackend, g_cocoa_notification_backend, G_TYPE_NOTIFICATION_BACKEND,
_g_io_modules_ensure_extension_points_registered ();
- g_io_extension_point_implement (G_NOTIFICATION_BACKEND_EXTENSION_POINT_NAME, g_define_type_id, "cocoa", 0));
+ g_io_extension_point_implement (G_NOTIFICATION_BACKEND_EXTENSION_POINT_NAME, g_define_type_id, "cocoa", 200));
static NSString *
nsstring_from_cstr (const char *cstr)
@@ -258,6 +258,7 @@ g_cocoa_notification_backend_withdraw_notification (GNotificationBackend *backen
}
}
+ [notifications release];
[str_id release];
}
diff --git a/gio/gdatainputstream.c b/gio/gdatainputstream.c
index c2b19fdc9..2e7750cb5 100644
--- a/gio/gdatainputstream.c
+++ b/gio/gdatainputstream.c
@@ -936,7 +936,7 @@ g_data_input_stream_read_until (GDataInputStream *stream,
/* If we're not at end of stream then we have a stop_char to consume. */
if (result != NULL && g_buffered_input_stream_get_available (bstream) > 0)
{
- gsize res;
+ gsize res G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
gchar b;
res = g_input_stream_read (G_INPUT_STREAM (stream), &b, 1, NULL, NULL);
diff --git a/gio/gdbus-tool.c b/gio/gdbus-tool.c
index 5fc4027b1..57978f1c2 100644
--- a/gio/gdbus-tool.c
+++ b/gio/gdbus-tool.c
@@ -31,10 +31,22 @@
#ifdef G_OS_WIN32
#include "glib/glib-private.h"
+#include "gdbusprivate.h"
#endif
/* ---------------------------------------------------------------------------------------------------- */
+/* Escape values for console colors */
+#define UNDERLINE "\033[4m"
+#define BLUE "\033[34m"
+#define CYAN "\033[36m"
+#define GREEN "\033[32m"
+#define MAGENTA "\033[35m"
+#define RED "\033[31m"
+#define YELLOW "\033[33m"
+
+/* ---------------------------------------------------------------------------------------------------- */
+
G_GNUC_UNUSED static void completion_debug (const gchar *format, ...);
/* Uncomment to get debug traces in /tmp/gdbus-completion-debug.txt (nice
@@ -1225,18 +1237,30 @@ static gboolean opt_introspect_xml = FALSE;
static gboolean opt_introspect_recurse = FALSE;
static gboolean opt_introspect_only_properties = FALSE;
+/* Introspect colors */
+#define RESET_COLOR (use_colors? "\033[0m": "")
+#define INTROSPECT_TITLE_COLOR (use_colors? UNDERLINE: "")
+#define INTROSPECT_NODE_COLOR (use_colors? RESET_COLOR: "")
+#define INTROSPECT_INTERFACE_COLOR (use_colors? YELLOW: "")
+#define INTROSPECT_METHOD_COLOR (use_colors? BLUE: "")
+#define INTROSPECT_SIGNAL_COLOR (use_colors? BLUE: "")
+#define INTROSPECT_PROPERTY_COLOR (use_colors? MAGENTA: "")
+#define INTROSPECT_INOUT_COLOR (use_colors? RESET_COLOR: "")
+#define INTROSPECT_TYPE_COLOR (use_colors? GREEN: "")
+#define INTROSPECT_ANNOTATION_COLOR (use_colors? RESET_COLOR: "")
+
static void
dump_annotation (const GDBusAnnotationInfo *o,
guint indent,
- gboolean ignore_indent)
+ gboolean ignore_indent,
+ gboolean use_colors)
{
guint n;
- g_print ("%*s@%s(\"%s\")\n",
+ g_print ("%*s%s@%s(\"%s\")%s\n",
ignore_indent ? 0 : indent, "",
- o->key,
- o->value);
+ INTROSPECT_ANNOTATION_COLOR, o->key, o->value, RESET_COLOR);
for (n = 0; o->annotations != NULL && o->annotations[n] != NULL; n++)
- dump_annotation (o->annotations[n], indent + 2, FALSE);
+ dump_annotation (o->annotations[n], indent + 2, FALSE, use_colors);
}
static void
@@ -1244,20 +1268,21 @@ dump_arg (const GDBusArgInfo *o,
guint indent,
const gchar *direction,
gboolean ignore_indent,
- gboolean include_newline)
+ gboolean include_newline,
+ gboolean use_colors)
{
guint n;
for (n = 0; o->annotations != NULL && o->annotations[n] != NULL; n++)
{
- dump_annotation (o->annotations[n], indent, ignore_indent);
+ dump_annotation (o->annotations[n], indent, ignore_indent, use_colors);
ignore_indent = FALSE;
}
- g_print ("%*s%s%s %s%s",
+ g_print ("%*s%s%s%s%s%s%s %s%s",
ignore_indent ? 0 : indent, "",
- direction,
- o->signature,
+ INTROSPECT_INOUT_COLOR, direction, RESET_COLOR,
+ INTROSPECT_TYPE_COLOR, o->signature, RESET_COLOR,
o->name,
include_newline ? ",\n" : "");
}
@@ -1277,7 +1302,8 @@ count_args (GDBusArgInfo **args)
static void
dump_method (const GDBusMethodInfo *o,
- guint indent)
+ guint indent,
+ gboolean use_colors)
{
guint n;
guint m;
@@ -1285,9 +1311,11 @@ dump_method (const GDBusMethodInfo *o,
guint total_num_args;
for (n = 0; o->annotations != NULL && o->annotations[n] != NULL; n++)
- dump_annotation (o->annotations[n], indent, FALSE);
+ dump_annotation (o->annotations[n], indent, FALSE, use_colors);
- g_print ("%*s%s(", indent, "", o->name);
+ g_print ("%*s%s%s%s(",
+ indent, "",
+ INTROSPECT_METHOD_COLOR, o->name, RESET_COLOR);
name_len = strlen (o->name);
total_num_args = count_args (o->in_args) + count_args (o->out_args);
for (n = 0, m = 0; o->in_args != NULL && o->in_args[n] != NULL; n++, m++)
@@ -1299,7 +1327,8 @@ dump_method (const GDBusMethodInfo *o,
indent + name_len + 1,
"in ",
ignore_indent,
- include_newline);
+ include_newline,
+ use_colors);
}
for (n = 0; o->out_args != NULL && o->out_args[n] != NULL; n++, m++)
{
@@ -1309,23 +1338,27 @@ dump_method (const GDBusMethodInfo *o,
indent + name_len + 1,
"out ",
ignore_indent,
- include_newline);
+ include_newline,
+ use_colors);
}
g_print (");\n");
}
static void
dump_signal (const GDBusSignalInfo *o,
- guint indent)
+ guint indent,
+ gboolean use_colors)
{
guint n;
guint name_len;
guint total_num_args;
for (n = 0; o->annotations != NULL && o->annotations[n] != NULL; n++)
- dump_annotation (o->annotations[n], indent, FALSE);
+ dump_annotation (o->annotations[n], indent, FALSE, use_colors);
- g_print ("%*s%s(", indent, "", o->name);
+ g_print ("%*s%s%s%s(",
+ indent, "",
+ INTROSPECT_SIGNAL_COLOR, o->name, RESET_COLOR);
name_len = strlen (o->name);
total_num_args = count_args (o->args);
for (n = 0; o->args != NULL && o->args[n] != NULL; n++)
@@ -1336,7 +1369,8 @@ dump_signal (const GDBusSignalInfo *o,
indent + name_len + 1,
"",
ignore_indent,
- include_newline);
+ include_newline,
+ use_colors);
}
g_print (");\n");
}
@@ -1344,6 +1378,7 @@ dump_signal (const GDBusSignalInfo *o,
static void
dump_property (const GDBusPropertyInfo *o,
guint indent,
+ gboolean use_colors,
GVariant *value)
{
const gchar *access;
@@ -1359,12 +1394,15 @@ dump_property (const GDBusPropertyInfo *o,
g_assert_not_reached ();
for (n = 0; o->annotations != NULL && o->annotations[n] != NULL; n++)
- dump_annotation (o->annotations[n], indent, FALSE);
+ dump_annotation (o->annotations[n], indent, FALSE, use_colors);
if (value != NULL)
{
gchar *s = g_variant_print (value, FALSE);
- g_print ("%*s%s %s %s = %s;\n", indent, "", access, o->signature, o->name, s);
+ g_print ("%*s%s %s%s%s %s%s%s = %s;\n", indent, "", access,
+ INTROSPECT_TYPE_COLOR, o->signature, RESET_COLOR,
+ INTROSPECT_PROPERTY_COLOR, o->name, RESET_COLOR,
+ s);
g_free (s);
}
else
@@ -1378,6 +1416,7 @@ dump_interface (GDBusConnection *c,
const gchar *name,
const GDBusInterfaceInfo *o,
guint indent,
+ gboolean use_colors,
const gchar *object_path)
{
guint n;
@@ -1458,28 +1497,37 @@ dump_interface (GDBusConnection *c,
}
for (n = 0; o->annotations != NULL && o->annotations[n] != NULL; n++)
- dump_annotation (o->annotations[n], indent, FALSE);
+ dump_annotation (o->annotations[n], indent, FALSE, use_colors);
- g_print ("%*sinterface %s {\n", indent, "", o->name);
+ g_print ("%*s%sinterface %s%s {\n",
+ indent, "",
+ INTROSPECT_INTERFACE_COLOR, o->name, RESET_COLOR);
if (o->methods != NULL && !opt_introspect_only_properties)
{
- g_print ("%*s methods:\n", indent, "");
+ g_print ("%*s %smethods%s:\n",
+ indent, "",
+ INTROSPECT_TITLE_COLOR, RESET_COLOR);
for (n = 0; o->methods[n] != NULL; n++)
- dump_method (o->methods[n], indent + 4);
+ dump_method (o->methods[n], indent + 4, use_colors);
}
if (o->signals != NULL && !opt_introspect_only_properties)
{
- g_print ("%*s signals:\n", indent, "");
+ g_print ("%*s %ssignals%s:\n",
+ indent, "",
+ INTROSPECT_TITLE_COLOR, RESET_COLOR);
for (n = 0; o->signals[n] != NULL; n++)
- dump_signal (o->signals[n], indent + 4);
+ dump_signal (o->signals[n], indent + 4, use_colors);
}
if (o->properties != NULL)
{
- g_print ("%*s properties:\n", indent, "");
+ g_print ("%*s %sproperties%s:\n",
+ indent, "",
+ INTROSPECT_TITLE_COLOR, RESET_COLOR);
for (n = 0; o->properties[n] != NULL; n++)
{
dump_property (o->properties[n],
indent + 4,
+ use_colors,
g_hash_table_lookup (properties, (o->properties[n])->name));
}
}
@@ -1492,13 +1540,15 @@ dump_interface (GDBusConnection *c,
static gboolean
introspect_do (GDBusConnection *c,
const gchar *object_path,
- guint indent);
+ guint indent,
+ gboolean use_colors);
static void
dump_node (GDBusConnection *c,
const gchar *name,
const GDBusNodeInfo *o,
guint indent,
+ gboolean use_colors,
const gchar *object_path,
gboolean recurse)
{
@@ -1510,9 +1560,13 @@ dump_node (GDBusConnection *c,
object_path_to_print = o->path;
for (n = 0; o->annotations != NULL && o->annotations[n] != NULL; n++)
- dump_annotation (o->annotations[n], indent, FALSE);
+ dump_annotation (o->annotations[n], indent, FALSE, use_colors);
- g_print ("%*snode %s", indent, "", object_path_to_print != NULL ? object_path_to_print : "(not set)");
+ g_print ("%*s%snode %s%s",
+ indent, "",
+ INTROSPECT_NODE_COLOR,
+ object_path_to_print != NULL ? object_path_to_print : "(not set)",
+ RESET_COLOR);
if (o->interfaces != NULL || o->nodes != NULL)
{
g_print (" {\n");
@@ -1521,11 +1575,11 @@ dump_node (GDBusConnection *c,
if (opt_introspect_only_properties)
{
if (o->interfaces[n]->properties != NULL && o->interfaces[n]->properties[0] != NULL)
- dump_interface (c, name, o->interfaces[n], indent + 2, object_path);
+ dump_interface (c, name, o->interfaces[n], indent + 2, use_colors, object_path);
}
else
{
- dump_interface (c, name, o->interfaces[n], indent + 2, object_path);
+ dump_interface (c, name, o->interfaces[n], indent + 2, use_colors, object_path);
}
}
for (n = 0; o->nodes != NULL && o->nodes[n] != NULL; n++)
@@ -1539,7 +1593,7 @@ dump_node (GDBusConnection *c,
/* avoid infinite loops */
if (g_str_has_prefix (child_path, object_path))
{
- introspect_do (c, child_path, indent + 2);
+ introspect_do (c, child_path, indent + 2, use_colors);
}
else
{
@@ -1553,13 +1607,13 @@ dump_node (GDBusConnection *c,
child_path = g_strdup_printf ("/%s", o->nodes[n]->path);
else
child_path = g_strdup_printf ("%s/%s", object_path, o->nodes[n]->path);
- introspect_do (c, child_path, indent + 2);
+ introspect_do (c, child_path, indent + 2, use_colors);
}
g_free (child_path);
}
else
{
- dump_node (NULL, NULL, o->nodes[n], indent + 2, NULL, recurse);
+ dump_node (NULL, NULL, o->nodes[n], indent + 2, use_colors, NULL, recurse);
}
}
g_print ("%*s};\n",
@@ -1584,7 +1638,8 @@ static const GOptionEntry introspect_entries[] =
static gboolean
introspect_do (GDBusConnection *c,
const gchar *object_path,
- guint indent)
+ guint indent,
+ gboolean use_colors)
{
GError *error;
GVariant *result;
@@ -1631,7 +1686,7 @@ introspect_do (GDBusConnection *c,
goto out;
}
- dump_node (c, opt_introspect_dest, node, indent, object_path, opt_introspect_recurse);
+ dump_node (c, opt_introspect_dest, node, indent, use_colors, object_path, opt_introspect_recurse);
}
ret = TRUE;
@@ -1658,6 +1713,7 @@ handle_introspect (gint *argc,
GDBusConnection *c;
gboolean complete_names;
gboolean complete_paths;
+ gboolean color_support;
ret = FALSE;
c = NULL;
@@ -1793,7 +1849,10 @@ handle_introspect (gint *argc,
if (request_completion)
goto out;
- if (!introspect_do (c, opt_introspect_object_path, 0))
+ /* Before we start printing the actual info, check if we can do colors*/
+ color_support = g_log_writer_supports_color (fileno (stdout));
+
+ if (!introspect_do (c, opt_introspect_object_path, 0, color_support))
goto out;
ret = TRUE;
@@ -2421,6 +2480,14 @@ main (gint argc, gchar *argv[])
ret = 0;
goto out;
}
+#ifdef G_OS_WIN32
+ else if (g_strcmp0 (command, _GDBUS_ARG_WIN32_RUN_SESSION_BUS) == 0)
+ {
+ g_win32_run_session_bus (NULL, NULL, NULL, 0);
+ ret = 0;
+ goto out;
+ }
+#endif
else if (g_strcmp0 (command, "complete") == 0 && argc == 4 && !request_completion)
{
const gchar *completion_line;
diff --git a/gio/gdbusaddress.c b/gio/gdbusaddress.c
index 8b3c858ba..1f7d19396 100644
--- a/gio/gdbusaddress.c
+++ b/gio/gdbusaddress.c
@@ -37,8 +37,6 @@
#include "gtask.h"
#include "glib-private.h"
#include "gdbusprivate.h"
-#include "giomodule-priv.h"
-#include "gdbusdaemon.h"
#include "gstdio.h"
#ifdef G_OS_UNIX
@@ -50,8 +48,6 @@
#ifdef G_OS_WIN32
#include <windows.h>
-#include <io.h>
-#include <conio.h>
#endif
#include "glibintl.h"
@@ -162,22 +158,18 @@ is_valid_unix (const gchar *address_entry,
}
}
- if (path != NULL)
+ if ((path != NULL && tmpdir != NULL) ||
+ (tmpdir != NULL && abstract != NULL) ||
+ (abstract != NULL && path != NULL))
{
- if (tmpdir != NULL || abstract != NULL)
- goto meaningless;
- }
- else if (tmpdir != NULL)
- {
- if (path != NULL || abstract != NULL)
- goto meaningless;
- }
- else if (abstract != NULL)
- {
- if (path != NULL || tmpdir != NULL)
- goto meaningless;
+ g_set_error (error,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ _("Meaningless key/value pair combination in address entry “%s”"),
+ address_entry);
+ goto out;
}
- else
+ else if (path == NULL && tmpdir == NULL && abstract == NULL)
{
g_set_error (error,
G_IO_ERROR,
@@ -187,16 +179,7 @@ is_valid_unix (const gchar *address_entry,
goto out;
}
-
- ret= TRUE;
- goto out;
-
- meaningless:
- g_set_error (error,
- G_IO_ERROR,
- G_IO_ERROR_INVALID_ARGUMENT,
- _("Meaningless key/value pair combination in address entry “%s”"),
- address_entry);
+ ret = TRUE;
out:
g_list_free (keys);
@@ -468,12 +451,21 @@ _g_dbus_address_parse_entry (const gchar *address_entry,
address_entry);
goto out;
}
+ else if (s == address_entry)
+ {
+ g_set_error (error,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ _("Transport name in address element “%s” must not be empty"),
+ address_entry);
+ goto out;
+ }
transport_name = g_strndup (address_entry, s - address_entry);
key_value_pairs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
kv_pairs = g_strsplit (s + 1, ",", 0);
- for (n = 0; kv_pairs != NULL && kv_pairs[n] != NULL; n++)
+ for (n = 0; kv_pairs[n] != NULL; n++)
{
const gchar *kv_pair = kv_pairs[n];
gchar *key;
@@ -491,6 +483,17 @@ _g_dbus_address_parse_entry (const gchar *address_entry,
address_entry);
goto out;
}
+ else if (s == kv_pair)
+ {
+ g_set_error (error,
+ G_IO_ERROR,
+ G_IO_ERROR_INVALID_ARGUMENT,
+ _("Key/Value pair %d, “%s”, in address element “%s” must not have an empty key"),
+ n,
+ kv_pair,
+ address_entry);
+ goto out;
+ }
key = g_uri_unescape_segment (kv_pair, s, NULL);
value = g_uri_unescape_segment (s + 1, kv_pair + strlen (kv_pair), NULL);
@@ -513,24 +516,18 @@ _g_dbus_address_parse_entry (const gchar *address_entry,
ret = TRUE;
out:
- g_strfreev (kv_pairs);
if (ret)
{
if (out_transport_name != NULL)
- *out_transport_name = transport_name;
- else
- g_free (transport_name);
+ *out_transport_name = g_steal_pointer (&transport_name);
if (out_key_value_pairs != NULL)
- *out_key_value_pairs = key_value_pairs;
- else if (key_value_pairs != NULL)
- g_hash_table_unref (key_value_pairs);
- }
- else
- {
- g_free (transport_name);
- if (key_value_pairs != NULL)
- g_hash_table_unref (key_value_pairs);
+ *out_key_value_pairs = g_steal_pointer (&key_value_pairs);
}
+
+ g_clear_pointer (&key_value_pairs, g_hash_table_unref);
+ g_free (transport_name);
+ g_strfreev (kv_pairs);
+
return ret;
}
@@ -966,7 +963,7 @@ g_dbus_address_get_stream_sync (const gchar *address,
last_error = NULL;
addr_array = g_strsplit (address, ";", 0);
- if (addr_array != NULL && addr_array[0] == NULL)
+ if (addr_array[0] == NULL)
{
last_error = g_error_new_literal (G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
@@ -1195,367 +1192,12 @@ get_session_address_dbus_launch (GError **error)
/* end of G_OS_UNIX case */
#elif defined(G_OS_WIN32)
-#define DBUS_DAEMON_ADDRESS_INFO "DBusDaemonAddressInfo"
-#define DBUS_DAEMON_MUTEX "DBusDaemonMutex"
-#define UNIQUE_DBUS_INIT_MUTEX "UniqueDBusInitMutex"
-#define DBUS_AUTOLAUNCH_MUTEX "DBusAutolaunchMutex"
-
-static void
-release_mutex (HANDLE mutex)
-{
- ReleaseMutex (mutex);
- CloseHandle (mutex);
-}
-
-static HANDLE
-acquire_mutex (const char *mutexname)
-{
- HANDLE mutex;
- DWORD res;
-
- mutex = CreateMutexA (NULL, FALSE, mutexname);
- if (!mutex)
- return 0;
-
- res = WaitForSingleObject (mutex, INFINITE);
- switch (res)
- {
- case WAIT_ABANDONED:
- release_mutex (mutex);
- return 0;
- case WAIT_FAILED:
- case WAIT_TIMEOUT:
- return 0;
- }
-
- return mutex;
-}
-
-static gboolean
-is_mutex_owned (const char *mutexname)
-{
- HANDLE mutex;
- gboolean res = FALSE;
-
- mutex = CreateMutexA (NULL, FALSE, mutexname);
- if (WaitForSingleObject (mutex, 10) == WAIT_TIMEOUT)
- res = TRUE;
- else
- ReleaseMutex (mutex);
- CloseHandle (mutex);
-
- return res;
-}
-
-static char *
-read_shm (const char *shm_name)
-{
- HANDLE shared_mem;
- char *shared_data;
- char *res;
- int i;
-
- res = NULL;
-
- for (i = 0; i < 20; i++)
- {
- shared_mem = OpenFileMappingA (FILE_MAP_READ, FALSE, shm_name);
- if (shared_mem != 0)
- break;
- Sleep (100);
- }
-
- if (shared_mem != 0)
- {
- shared_data = MapViewOfFile (shared_mem, FILE_MAP_READ, 0, 0, 0);
- /* It looks that a race is possible here:
- * if the dbus process already created mapping but didn't fill it
- * the code below may read incorrect address.
- * Also this is a bit complicated by the fact that
- * any change in the "synchronization contract" between processes
- * should be accompanied with renaming all of used win32 named objects:
- * otherwise libgio-2.0-0.dll of different versions shipped with
- * different apps may break each other due to protocol difference.
- */
- if (shared_data != NULL)
- {
- res = g_strdup (shared_data);
- UnmapViewOfFile (shared_data);
- }
- CloseHandle (shared_mem);
- }
-
- return res;
-}
-
-static HANDLE
-set_shm (const char *shm_name, const char *value)
-{
- HANDLE shared_mem;
- char *shared_data;
-
- shared_mem = CreateFileMappingA (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
- 0, strlen (value) + 1, shm_name);
- if (shared_mem == 0)
- return 0;
-
- shared_data = MapViewOfFile (shared_mem, FILE_MAP_WRITE, 0, 0, 0 );
- if (shared_data == NULL)
- return 0;
-
- strcpy (shared_data, value);
-
- UnmapViewOfFile (shared_data);
-
- return shared_mem;
-}
-
-/* These keep state between publish_session_bus and unpublish_session_bus */
-static HANDLE published_daemon_mutex;
-static HANDLE published_shared_mem;
-
-static gboolean
-publish_session_bus (const char *address)
-{
- HANDLE init_mutex;
-
- init_mutex = acquire_mutex (UNIQUE_DBUS_INIT_MUTEX);
-
- published_daemon_mutex = CreateMutexA (NULL, FALSE, DBUS_DAEMON_MUTEX);
- if (WaitForSingleObject (published_daemon_mutex, 10 ) != WAIT_OBJECT_0)
- {
- release_mutex (init_mutex);
- CloseHandle (published_daemon_mutex);
- published_daemon_mutex = NULL;
- return FALSE;
- }
-
- published_shared_mem = set_shm (DBUS_DAEMON_ADDRESS_INFO, address);
- if (!published_shared_mem)
- {
- release_mutex (init_mutex);
- CloseHandle (published_daemon_mutex);
- published_daemon_mutex = NULL;
- return FALSE;
- }
-
- release_mutex (init_mutex);
- return TRUE;
-}
-
-static void
-unpublish_session_bus (void)
-{
- HANDLE init_mutex;
-
- init_mutex = acquire_mutex (UNIQUE_DBUS_INIT_MUTEX);
-
- CloseHandle (published_shared_mem);
- published_shared_mem = NULL;
-
- release_mutex (published_daemon_mutex);
- published_daemon_mutex = NULL;
-
- release_mutex (init_mutex);
-}
-
-static void
-wait_console_window (void)
-{
- FILE *console = fopen ("CONOUT$", "w");
-
- SetConsoleTitleW (L"gdbus-daemon output. Type any character to close this window.");
- fprintf (console, _("(Type any character to close this window)\n"));
- fflush (console);
- _getch ();
-}
-
-static void
-open_console_window (void)
-{
- if (((HANDLE) _get_osfhandle (fileno (stdout)) == INVALID_HANDLE_VALUE ||
- (HANDLE) _get_osfhandle (fileno (stderr)) == INVALID_HANDLE_VALUE) && AllocConsole ())
- {
- if ((HANDLE) _get_osfhandle (fileno (stdout)) == INVALID_HANDLE_VALUE)
- freopen ("CONOUT$", "w", stdout);
-
- if ((HANDLE) _get_osfhandle (fileno (stderr)) == INVALID_HANDLE_VALUE)
- freopen ("CONOUT$", "w", stderr);
-
- SetConsoleTitleW (L"gdbus-daemon debug output.");
-
- atexit (wait_console_window);
- }
-}
-
-static void
-idle_timeout_cb (GDBusDaemon *daemon, gpointer user_data)
-{
- GMainLoop *loop = user_data;
- g_main_loop_quit (loop);
-}
-
-/* Satisfies STARTF_FORCEONFEEDBACK */
-static void
-turn_off_the_starting_cursor (void)
-{
- MSG msg;
- BOOL bRet;
-
- PostQuitMessage (0);
-
- while ((bRet = GetMessage (&msg, 0, 0, 0)) != 0)
- {
- if (bRet == -1)
- continue;
-
- TranslateMessage (&msg);
- DispatchMessage (&msg);
- }
-}
-
-__declspec(dllexport) void CALLBACK g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow);
-
-__declspec(dllexport) void CALLBACK
-g_win32_run_session_bus (HWND hwnd, HINSTANCE hinst, char *cmdline, int nCmdShow)
-{
- GDBusDaemon *daemon;
- GMainLoop *loop;
- const char *address;
- GError *error = NULL;
-
- turn_off_the_starting_cursor ();
-
- if (g_getenv ("GDBUS_DAEMON_DEBUG") != NULL)
- open_console_window ();
-
- loop = g_main_loop_new (NULL, FALSE);
-
- address = "nonce-tcp:";
- daemon = _g_dbus_daemon_new (address, NULL, &error);
- if (daemon == NULL)
- {
- g_printerr ("Can't init bus: %s\n", error->message);
- g_error_free (error);
- return;
- }
-
- /* There is a subtle detail with "idle-timeout" signal of dbus daemon:
- * It is fired on idle after last client disconnection,
- * but (at least with glib 2.59.1) it is NEVER fired
- * if no clients connect to daemon at all.
- * This may lead to infinite run of this daemon process.
- */
- g_signal_connect (daemon, "idle-timeout", G_CALLBACK (idle_timeout_cb), loop);
-
- if (publish_session_bus (_g_dbus_daemon_get_address (daemon)))
- {
- g_main_loop_run (loop);
-
- unpublish_session_bus ();
- }
-
- g_main_loop_unref (loop);
- g_object_unref (daemon);
-}
-
static gchar *
get_session_address_dbus_launch (GError **error)
{
- HANDLE autolaunch_mutex, init_mutex;
- char *address = NULL;
-
- autolaunch_mutex = acquire_mutex (DBUS_AUTOLAUNCH_MUTEX);
-
- init_mutex = acquire_mutex (UNIQUE_DBUS_INIT_MUTEX);
-
- if (is_mutex_owned (DBUS_DAEMON_MUTEX))
- address = read_shm (DBUS_DAEMON_ADDRESS_INFO);
-
- release_mutex (init_mutex);
-
- if (address == NULL)
- {
- /* rundll32 doesn't support neither spaces, nor quotes in cmdline:
- * https://support.microsoft.com/en-us/help/164787/info-windows-rundll-and-rundll32-interface
- * Since the dll path may have spaces, it is used as working directory,
- * and the plain dll name is passed as argument to rundll32 like
- * "C:\Windows\System32\rundll32.exe" .\libgio-2.0-0.dll,g_win32_run_session_bus
- *
- * Using relative path to dll rises a question if correct dll is loaded.
- * According to docs if relative path like .\libgio-2.0-0.dll is passed
- * the System32 directory may be searched before current directory:
- * https://docs.microsoft.com/en-us/windows/desktop/dlls/dynamic-link-library-search-order#standard-search-order-for-desktop-applications
- * Internally rundll32 uses "undefined behavior" parameter combination
- * LoadLibraryExW(".\libgio-2.0-0.dll", NULL, LOAD_WITH_ALTERED_SEARCH_PATH)
- * Actual testing shows that if relative name starts from ".\"
- * the current directory is searched before System32 (win7, win10 1607).
- * So wrong dll would be loaded only if the BOTH of the following holds:
- * - rundll32 will change so it would prefer system32 even for .\ paths
- * - some app would place libgio-2.0-0.dll in system32 directory
- *
- * In point of that using .\libgio-2.0-0.dll looks fine.
- */
- wchar_t gio_path[MAX_PATH + 2] = { 0 };
- int gio_path_len = GetModuleFileNameW (_g_io_win32_get_module (), gio_path, MAX_PATH + 1);
-
- /* The <= MAX_PATH check prevents truncated path usage */
- if (gio_path_len > 0 && gio_path_len <= MAX_PATH)
- {
- PROCESS_INFORMATION pi = { 0 };
- STARTUPINFOW si = { 0 };
- BOOL res = FALSE;
- wchar_t rundll_path[MAX_PATH + 100] = { 0 };
- wchar_t args[MAX_PATH*2 + 100] = { 0 };
- /* calculate index of first char of dll file name inside full path */
- int gio_name_index = gio_path_len;
- for (; gio_name_index > 0; --gio_name_index)
- {
- wchar_t prev_char = gio_path[gio_name_index - 1];
- if (prev_char == L'\\' || prev_char == L'/')
- break;
- }
- GetWindowsDirectoryW (rundll_path, MAX_PATH);
- wcscat (rundll_path, L"\\rundll32.exe");
- if (GetFileAttributesW (rundll_path) == INVALID_FILE_ATTRIBUTES)
- {
- GetSystemDirectoryW (rundll_path, MAX_PATH);
- wcscat (rundll_path, L"\\rundll32.exe");
- }
-
- wcscpy (args, L"\"");
- wcscat (args, rundll_path);
- wcscat (args, L"\" .\\");
- wcscat (args, gio_path + gio_name_index);
-#if defined(_WIN64) || defined(_M_X64) || defined(_M_AMD64)
- wcscat (args, L",g_win32_run_session_bus");
-#elif defined (_MSC_VER)
- wcscat (args, L",_g_win32_run_session_bus@16");
-#else
- wcscat (args, L",g_win32_run_session_bus@16");
-#endif
-
- gio_path[gio_name_index] = L'\0';
- res = CreateProcessW (rundll_path, args,
- 0, 0, FALSE,
- NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW | DETACHED_PROCESS,
- 0, gio_path,
- &si, &pi);
- if (res)
- address = read_shm (DBUS_DAEMON_ADDRESS_INFO);
- }
- }
-
- release_mutex (autolaunch_mutex);
-
- if (address == NULL)
- g_set_error (error,
- G_IO_ERROR,
- G_IO_ERROR_FAILED,
- _("Session dbus not running, and autolaunch failed"));
-
- return address;
+ return _g_dbus_win32_get_session_address_dbus_launch (error);
}
+
#else /* neither G_OS_UNIX nor G_OS_WIN32 */
static gchar *
get_session_address_dbus_launch (GError **error)
diff --git a/gio/gdbusauthobserver.c b/gio/gdbusauthobserver.c
index 4590ffcae..34758aa20 100644
--- a/gio/gdbusauthobserver.c
+++ b/gio/gdbusauthobserver.c
@@ -39,37 +39,11 @@
* signals you are interested in. Note that new signals may be added
* in the future
*
- * ## Controlling Authentication Mechanisms
+ * ## Controlling Authentication # {#auth-observer}
*
- * By default, a #GDBusServer or server-side #GDBusConnection will allow
- * any authentication mechanism to be used. If you only
- * want to allow D-Bus connections with the `EXTERNAL` mechanism,
- * which makes use of credentials passing and is the recommended
- * mechanism for modern Unix platforms such as Linux and the BSD family,
- * you would use a signal handler like this:
- *
- * |[<!-- language="C" -->
- * static gboolean
- * on_allow_mechanism (GDBusAuthObserver *observer,
- * const gchar *mechanism,
- * gpointer user_data)
- * {
- * if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
- * {
- * return TRUE;
- * }
- *
- * return FALSE;
- * }
- * ]|
- *
- * ## Controlling Authorization # {#auth-observer}
- *
- * By default, a #GDBusServer or server-side #GDBusConnection will accept
- * connections from any successfully authenticated user (but not from
- * anonymous connections using the `ANONYMOUS` mechanism). If you only
- * want to allow D-Bus connections from processes owned by the same uid
- * as the server, you would use a signal handler like the following:
+ * For example, if you only want to allow D-Bus connections from
+ * processes owned by the same uid as the server, you would use a
+ * signal handler like the following:
*
* |[<!-- language="C" -->
* static gboolean
diff --git a/gio/gdbusdaemon.c b/gio/gdbusdaemon.c
index d893b930a..a9b626215 100644
--- a/gio/gdbusdaemon.c
+++ b/gio/gdbusdaemon.c
@@ -1493,16 +1493,21 @@ filter_function (GDBusConnection *connection,
}
else
{
+ if (g_dbus_message_get_sender (message) == NULL ||
+ g_dbus_message_get_destination (message) == NULL)
+ {
+ message = copy_if_locked (message);
+ if (message == NULL)
+ {
+ g_warning ("Failed to copy outgoing message");
+ return NULL;
+ }
+ }
+
if (g_dbus_message_get_sender (message) == NULL)
- {
- message = copy_if_locked (message);
- g_dbus_message_set_sender (message, DBUS_SERVICE_NAME);
- }
+ g_dbus_message_set_sender (message, DBUS_SERVICE_NAME);
if (g_dbus_message_get_destination (message) == NULL)
- {
- message = copy_if_locked (message);
- g_dbus_message_set_destination (message, client->id);
- }
+ g_dbus_message_set_destination (message, client->id);
}
return message;
@@ -1534,7 +1539,7 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer,
GCredentials *credentials,
gpointer user_data)
{
- gboolean authorized = FALSE;
+ gboolean authorized = TRUE;
if (credentials != NULL)
{
@@ -1544,14 +1549,6 @@ on_authorize_authenticated_peer (GDBusAuthObserver *observer,
authorized = g_credentials_is_same_user (credentials, own_credentials, NULL);
g_object_unref (own_credentials);
}
-#ifdef G_OS_WIN32
- else
- {
- /* We allow ANONYMOUS authentication on Windows for now, in
- * combination with the nonce-tcp transport. */
- authorized = TRUE;
- }
-#endif
return authorized;
}
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 3a1a1f9e9..9b89dc5b6 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -1714,7 +1714,7 @@ parse_value_from_blob (GMemoryBuffer *buf,
if (array_len == 0)
{
- GVariant *item;
+ GVariant *item G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
item = parse_value_from_blob (buf,
element_type,
TRUE,
@@ -2345,7 +2345,10 @@ append_value_to_blob (GVariant *value,
{
gsize len;
const gchar *v;
+#ifndef G_DISABLE_ASSERT
const gchar *end;
+#endif
+
v = g_variant_get_string (value, &len);
g_assert (g_utf8_validate (v, -1, &end) && (end == v + len));
g_memory_buffer_put_uint32 (mbuf, len);
diff --git a/gio/gdbusprivate.c b/gio/gdbusprivate.c
index 1e8e1d64b..488fe50c4 100644
--- a/gio/gdbusprivate.c
+++ b/gio/gdbusprivate.c
@@ -33,6 +33,8 @@
#include "gdbusproxy.h"
#include "gdbuserror.h"
#include "gdbusintrospection.h"
+#include "gdbusdaemon.h"
+#include "giomodule-priv.h"
#include "gtask.h"
#include "ginputstream.h"
#include "gmemoryinputstream.h"
@@ -51,6 +53,8 @@
#ifdef G_OS_WIN32
#include <windows.h>
+#include <io.h>
+#include <conio.h>
#endif
#include "glibintl.h"
@@ -488,9 +492,9 @@ _g_dbus_worker_emit_message_about_to_be_sent (GDBusWorker *worker,
{
GDBusMessage *ret;
if (!g_atomic_int_get (&worker->stopped))
- ret = worker->message_about_to_be_sent_callback (worker, message, worker->user_data);
+ ret = worker->message_about_to_be_sent_callback (worker, g_steal_pointer (&message), worker->user_data);
else
- ret = message;
+ ret = g_steal_pointer (&message);
return ret;
}
@@ -502,13 +506,13 @@ _g_dbus_worker_queue_or_deliver_received_message (GDBusWorker *worker,
if (worker->frozen || g_queue_get_length (worker->received_messages_while_frozen) > 0)
{
/* queue up */
- g_queue_push_tail (worker->received_messages_while_frozen, message);
+ g_queue_push_tail (worker->received_messages_while_frozen, g_steal_pointer (&message));
}
else
{
/* not frozen, nor anything in queue */
_g_dbus_worker_emit_message_received (worker, message);
- g_object_unref (message);
+ g_clear_object (&message);
}
}
@@ -525,7 +529,7 @@ unfreeze_in_idle_cb (gpointer user_data)
while ((message = g_queue_pop_head (worker->received_messages_while_frozen)) != NULL)
{
_g_dbus_worker_emit_message_received (worker, message);
- g_object_unref (message);
+ g_clear_object (&message);
}
worker->frozen = FALSE;
}
@@ -792,7 +796,7 @@ _g_dbus_worker_do_read_cb (GInputStream *input_stream,
}
/* yay, got a message, go deliver it */
- _g_dbus_worker_queue_or_deliver_received_message (worker, message);
+ _g_dbus_worker_queue_or_deliver_received_message (worker, g_steal_pointer (&message));
/* start reading another message! */
worker->read_buffer_bytes_wanted = 0;
@@ -1190,13 +1194,6 @@ ostream_flush_cb (GObject *source_object,
}
}
- g_assert (data->flushers != NULL);
- flush_data_list_complete (data->flushers, error);
- g_list_free (data->flushers);
-
- if (error != NULL)
- g_error_free (error);
-
/* Make sure we tell folks that we don't have additional
flushes pending */
g_mutex_lock (&data->worker->write_lock);
@@ -1205,6 +1202,12 @@ ostream_flush_cb (GObject *source_object,
data->worker->output_pending = PENDING_NONE;
g_mutex_unlock (&data->worker->write_lock);
+ g_assert (data->flushers != NULL);
+ flush_data_list_complete (data->flushers, error);
+ g_list_free (data->flushers);
+ if (error != NULL)
+ g_error_free (error);
+
/* OK, cool, finally kick off the next write */
continue_writing (data->worker);
@@ -1373,6 +1376,10 @@ iostream_close_cb (GObject *source_object,
g_assert (worker->output_pending == PENDING_CLOSE);
worker->output_pending = PENDING_NONE;
+ /* Ensure threads waiting for pending flushes to finish will be unblocked. */
+ worker->write_num_messages_flushed =
+ worker->write_num_messages_written + g_list_length(pending_flush_attempts);
+
g_mutex_unlock (&worker->write_lock);
while (pending_close_attempts != NULL)
@@ -1788,10 +1795,17 @@ _g_dbus_worker_flush_sync (GDBusWorker *worker,
if (data != NULL)
{
- g_cond_wait (&data->cond, &data->mutex);
- g_mutex_unlock (&data->mutex);
+ /* Wait for flush operations to finish. */
+ g_mutex_lock (&worker->write_lock);
+ while (worker->write_num_messages_flushed < data->number_to_wait_for)
+ {
+ g_mutex_unlock (&worker->write_lock);
+ g_cond_wait (&data->cond, &data->mutex);
+ g_mutex_lock (&worker->write_lock);
+ }
+ g_mutex_unlock (&worker->write_lock);
- /* note:the element is removed from worker->write_pending_flushes in flush_cb() above */
+ g_mutex_unlock (&data->mutex);
g_cond_clear (&data->cond);
g_mutex_clear (&data->mutex);
if (data->error != NULL)
@@ -2054,6 +2068,357 @@ out:
CloseHandle (h);
return ret;
}
+
+
+#define DBUS_DAEMON_ADDRESS_INFO "DBusDaemonAddressInfo"
+#define DBUS_DAEMON_MUTEX "DBusDaemonMutex"
+#define UNIQUE_DBUS_INIT_MUTEX "UniqueDBusInitMutex"
+#define DBUS_AUTOLAUNCH_MUTEX "DBusAutolaunchMutex"
+
+static void
+release_mutex (HANDLE mutex)
+{
+ ReleaseMutex (mutex);
+ CloseHandle (mutex);
+}
+
+static HANDLE
+acquire_mutex (const char *mutexname)
+{
+ HANDLE mutex;
+ DWORD res;
+
+ mutex = CreateMutexA (NULL, FALSE, mutexname);
+ if (!mutex)
+ return 0;
+
+ res = WaitForSingleObject (mutex, INFINITE);
+ switch (res)
+ {
+ case WAIT_ABANDONED:
+ release_mutex (mutex);
+ return 0;
+ case WAIT_FAILED:
+ case WAIT_TIMEOUT:
+ return 0;
+ }
+
+ return mutex;
+}
+
+static gboolean
+is_mutex_owned (const char *mutexname)
+{
+ HANDLE mutex;
+ gboolean res = FALSE;
+
+ mutex = CreateMutexA (NULL, FALSE, mutexname);
+ if (WaitForSingleObject (mutex, 10) == WAIT_TIMEOUT)
+ res = TRUE;
+ else
+ ReleaseMutex (mutex);
+ CloseHandle (mutex);
+
+ return res;
+}
+
+static char *
+read_shm (const char *shm_name)
+{
+ HANDLE shared_mem;
+ char *shared_data;
+ char *res;
+ int i;
+
+ res = NULL;
+
+ for (i = 0; i < 20; i++)
+ {
+ shared_mem = OpenFileMappingA (FILE_MAP_READ, FALSE, shm_name);
+ if (shared_mem != 0)
+ break;
+ Sleep (100);
+ }
+
+ if (shared_mem != 0)
+ {
+ shared_data = MapViewOfFile (shared_mem, FILE_MAP_READ, 0, 0, 0);
+ /* It looks that a race is possible here:
+ * if the dbus process already created mapping but didn't fill it
+ * the code below may read incorrect address.
+ * Also this is a bit complicated by the fact that
+ * any change in the "synchronization contract" between processes
+ * should be accompanied with renaming all of used win32 named objects:
+ * otherwise libgio-2.0-0.dll of different versions shipped with
+ * different apps may break each other due to protocol difference.
+ */
+ if (shared_data != NULL)
+ {
+ res = g_strdup (shared_data);
+ UnmapViewOfFile (shared_data);
+ }
+ CloseHandle (shared_mem);
+ }
+
+ return res;
+}
+
+static HANDLE
+set_shm (const char *shm_name, const char *value)
+{
+ HANDLE shared_mem;
+ char *shared_data;
+
+ shared_mem = CreateFileMappingA (INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE,
+ 0, strlen (value) + 1, shm_name);
+ if (shared_mem == 0)
+ return 0;
+
+ shared_data = MapViewOfFile (shared_mem, FILE_MAP_WRITE, 0, 0, 0 );
+ if (shared_data == NULL)
+ return 0;
+
+ strcpy (shared_data, value);
+
+ UnmapViewOfFile (shared_data);
+
+ return shared_mem;
+}
+
+/* These keep state between publish_session_bus and unpublish_session_bus */
+static HANDLE published_daemon_mutex;
+static HANDLE published_shared_mem;
+
+static gboolean
+publish_session_bus (const char *address)
+{
+ HANDLE init_mutex;
+
+ init_mutex = acquire_mutex (UNIQUE_DBUS_INIT_MUTEX);
+
+ published_daemon_mutex = CreateMutexA (NULL, FALSE, DBUS_DAEMON_MUTEX);
+ if (WaitForSingleObject (published_daemon_mutex, 10 ) != WAIT_OBJECT_0)
+ {
+ release_mutex (init_mutex);
+ CloseHandle (published_daemon_mutex);
+ published_daemon_mutex = NULL;
+ return FALSE;
+ }
+
+ published_shared_mem = set_shm (DBUS_DAEMON_ADDRESS_INFO, address);
+ if (!published_shared_mem)
+ {
+ release_mutex (init_mutex);
+ CloseHandle (published_daemon_mutex);
+ published_daemon_mutex = NULL;
+ return FALSE;
+ }
+
+ release_mutex (init_mutex);
+ return TRUE;
+}
+
+static void
+unpublish_session_bus (void)
+{
+ HANDLE init_mutex;
+
+ init_mutex = acquire_mutex (UNIQUE_DBUS_INIT_MUTEX);
+
+ CloseHandle (published_shared_mem);
+ published_shared_mem = NULL;
+
+ release_mutex (published_daemon_mutex);
+ published_daemon_mutex = NULL;
+
+ release_mutex (init_mutex);
+}
+
+static void
+wait_console_window (void)
+{
+ FILE *console = fopen ("CONOUT$", "w");
+
+ SetConsoleTitleW (L"gdbus-daemon output. Type any character to close this window.");
+ fprintf (console, _("(Type any character to close this window)\n"));
+ fflush (console);
+ _getch ();
+}
+
+static void
+open_console_window (void)
+{
+ if (((HANDLE) _get_osfhandle (fileno (stdout)) == INVALID_HANDLE_VALUE ||
+ (HANDLE) _get_osfhandle (fileno (stderr)) == INVALID_HANDLE_VALUE) && AllocConsole ())
+ {
+ if ((HANDLE) _get_osfhandle (fileno (stdout)) == INVALID_HANDLE_VALUE)
+ freopen ("CONOUT$", "w", stdout);
+
+ if ((HANDLE) _get_osfhandle (fileno (stderr)) == INVALID_HANDLE_VALUE)
+ freopen ("CONOUT$", "w", stderr);
+
+ SetConsoleTitleW (L"gdbus-daemon debug output.");
+
+ atexit (wait_console_window);
+ }
+}
+
+static void
+idle_timeout_cb (GDBusDaemon *daemon, gpointer user_data)
+{
+ GMainLoop *loop = user_data;
+ g_main_loop_quit (loop);
+}
+
+/* Satisfies STARTF_FORCEONFEEDBACK */
+static void
+turn_off_the_starting_cursor (void)
+{
+ MSG msg;
+ BOOL bRet;
+
+ PostQuitMessage (0);
+
+ while ((bRet = GetMessage (&msg, 0, 0, 0)) != 0)
+ {
+ if (bRet == -1)
+ continue;
+
+ TranslateMessage (&msg);
+ DispatchMessage (&msg);
+ }
+}
+
+__declspec(dllexport) void __stdcall
+g_win32_run_session_bus (void* hwnd, void* hinst, const char* cmdline, int cmdshow)
+{
+ GDBusDaemon *daemon;
+ GMainLoop *loop;
+ const char *address;
+ GError *error = NULL;
+
+ turn_off_the_starting_cursor ();
+
+ if (g_getenv ("GDBUS_DAEMON_DEBUG") != NULL)
+ open_console_window ();
+
+ address = "nonce-tcp:";
+ daemon = _g_dbus_daemon_new (address, NULL, &error);
+ if (daemon == NULL)
+ {
+ g_printerr ("Can't init bus: %s\n", error->message);
+ g_error_free (error);
+ return;
+ }
+
+ loop = g_main_loop_new (NULL, FALSE);
+
+ /* There is a subtle detail with "idle-timeout" signal of dbus daemon:
+ * It is fired on idle after last client disconnection,
+ * but (at least with glib 2.59.1) it is NEVER fired
+ * if no clients connect to daemon at all.
+ * This may lead to infinite run of this daemon process.
+ */
+ g_signal_connect (daemon, "idle-timeout", G_CALLBACK (idle_timeout_cb), loop);
+
+ if (publish_session_bus (_g_dbus_daemon_get_address (daemon)))
+ {
+ g_main_loop_run (loop);
+
+ unpublish_session_bus ();
+ }
+
+ g_main_loop_unref (loop);
+ g_object_unref (daemon);
+}
+
+static gboolean autolaunch_binary_absent = FALSE;
+
+gchar *
+_g_dbus_win32_get_session_address_dbus_launch (GError **error)
+{
+ HANDLE autolaunch_mutex, init_mutex;
+ char *address = NULL;
+
+ autolaunch_mutex = acquire_mutex (DBUS_AUTOLAUNCH_MUTEX);
+
+ init_mutex = acquire_mutex (UNIQUE_DBUS_INIT_MUTEX);
+
+ if (is_mutex_owned (DBUS_DAEMON_MUTEX))
+ address = read_shm (DBUS_DAEMON_ADDRESS_INFO);
+
+ release_mutex (init_mutex);
+
+ if (address == NULL && !autolaunch_binary_absent)
+ {
+ wchar_t gio_path[MAX_PATH + 2] = { 0 };
+ int gio_path_len = GetModuleFileNameW (_g_io_win32_get_module (), gio_path, MAX_PATH + 1);
+
+ /* The <= MAX_PATH check prevents truncated path usage */
+ if (gio_path_len > 0 && gio_path_len <= MAX_PATH)
+ {
+ PROCESS_INFORMATION pi = { 0 };
+ STARTUPINFOW si = { 0 };
+ BOOL res = FALSE;
+ wchar_t exe_path[MAX_PATH + 100] = { 0 };
+ /* calculate index of first char of dll file name inside full path */
+ int gio_name_index = gio_path_len;
+ for (; gio_name_index > 0; --gio_name_index)
+ {
+ wchar_t prev_char = gio_path[gio_name_index - 1];
+ if (prev_char == L'\\' || prev_char == L'/')
+ break;
+ }
+ gio_path[gio_name_index] = L'\0';
+ wcscpy (exe_path, gio_path);
+ wcscat (exe_path, L"\\gdbus.exe");
+
+ if (GetFileAttributesW (exe_path) == INVALID_FILE_ATTRIBUTES)
+ {
+ /* warning won't be raised another time
+ * since autolaunch_binary_absent would be already set.
+ */
+ autolaunch_binary_absent = TRUE;
+ g_warning ("win32 session dbus binary not found: %S", exe_path );
+ }
+ else
+ {
+ wchar_t args[MAX_PATH*2 + 100] = { 0 };
+ wcscpy (args, L"\"");
+ wcscat (args, exe_path);
+ wcscat (args, L"\" ");
+#define _L_PREFIX_FOR_EXPANDED(arg) L##arg
+#define _L_PREFIX(arg) _L_PREFIX_FOR_EXPANDED (arg)
+ wcscat (args, _L_PREFIX (_GDBUS_ARG_WIN32_RUN_SESSION_BUS));
+#undef _L_PREFIX
+#undef _L_PREFIX_FOR_EXPANDED
+
+ res = CreateProcessW (exe_path, args,
+ 0, 0, FALSE,
+ NORMAL_PRIORITY_CLASS | CREATE_NO_WINDOW | DETACHED_PROCESS,
+ 0, gio_path,
+ &si, &pi);
+ }
+ if (res)
+ {
+ address = read_shm (DBUS_DAEMON_ADDRESS_INFO);
+ if (address == NULL)
+ g_warning ("%S dbus binary failed to launch bus, maybe incompatible version", exe_path );
+ }
+ }
+ }
+
+ release_mutex (autolaunch_mutex);
+
+ if (address == NULL)
+ g_set_error (error,
+ G_IO_ERROR,
+ G_IO_ERROR_FAILED,
+ _("Session dbus not running, and autolaunch failed"));
+
+ return address;
+}
+
#endif
/* ---------------------------------------------------------------------------------------------------- */
diff --git a/gio/gdbusprivate.h b/gio/gdbusprivate.h
index a319166ee..8f8a93ba7 100644
--- a/gio/gdbusprivate.h
+++ b/gio/gdbusprivate.h
@@ -109,6 +109,17 @@ gchar *_g_dbus_hexdump (const gchar *data, gsize len, guint indent);
#ifdef G_OS_WIN32
gchar *_g_dbus_win32_get_user_sid (void);
+
+#define _GDBUS_ARG_WIN32_RUN_SESSION_BUS "_win32_run_session_bus"
+/* The g_win32_run_session_bus is exported from libgio dll on win32,
+ * but still is NOT part of API/ABI since it is declared in private header
+ * and used only by tool built from same sources.
+ * Initially this function was introduces for usage with rundll,
+ * so the signature is kept rundll-compatible, though parameters aren't used.
+ */
+__declspec(dllexport) void __stdcall
+g_win32_run_session_bus (void* hwnd, void* hinst, const char* cmdline, int cmdshow);
+gchar *_g_dbus_win32_get_session_address_dbus_launch (GError **error);
#endif
gchar *_g_dbus_get_machine_id (GError **error);
diff --git a/gio/gdbusserver.c b/gio/gdbusserver.c
index eb641a9bc..07757f40f 100644
--- a/gio/gdbusserver.c
+++ b/gio/gdbusserver.c
@@ -72,11 +72,6 @@
*
* An example of peer-to-peer communication with G-DBus can be found
* in [gdbus-example-peer.c](https://git.gnome.org/browse/glib/tree/gio/tests/gdbus-example-peer.c).
- *
- * Note that a minimal #GDBusServer will accept connections from any
- * peer. In many use-cases it will be necessary to add a #GDBusAuthObserver
- * that only accepts connections that have successfully authenticated
- * as the same user that is running the #GDBusServer.
*/
/**
@@ -462,10 +457,6 @@ on_run (GSocketService *service,
* Once constructed, you can use g_dbus_server_get_client_address() to
* get a D-Bus address string that clients can use to connect.
*
- * To have control over the available authentication mechanisms and
- * the users that are authorized to connect, it is strongly recommended
- * to provide a non-%NULL #GDBusAuthObserver.
- *
* Connect to the #GDBusServer::new-connection signal to handle
* incoming connections.
*
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 7d7425ea9..238141158 100644
--- a/gio/gdesktopappinfo.c
+++ b/gio/gdesktopappinfo.c
@@ -4710,7 +4710,7 @@ g_desktop_app_info_get_boolean (GDesktopAppInfo *info,
* a %NULL-terminated string array or %NULL if the specified
* key cannot be found. The array should be freed with g_strfreev().
*
- * Since: 2.60.0
+ * Since: 2.60
*/
gchar **
g_desktop_app_info_get_string_list (GDesktopAppInfo *info,
diff --git a/gio/gfile.c b/gio/gfile.c
index 13b435480..24b136d80 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -3284,12 +3284,12 @@ file_copy_fallback (GFile *source,
out = (GOutputStream*)_g_local_file_output_stream_replace (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
FALSE, NULL,
flags & G_FILE_COPY_BACKUP,
- G_FILE_CREATE_REPLACE_DESTINATION |
- G_FILE_CREATE_PRIVATE, info,
+ G_FILE_CREATE_REPLACE_DESTINATION,
+ info,
cancellable, error);
else
out = (GOutputStream*)_g_local_file_output_stream_create (_g_local_file_get_filename (G_LOCAL_FILE (destination)),
- FALSE, G_FILE_CREATE_PRIVATE, info,
+ FALSE, 0, info,
cancellable, error);
}
else if (flags & G_FILE_COPY_OVERWRITE)
@@ -3297,13 +3297,12 @@ file_copy_fallback (GFile *source,
out = (GOutputStream *)g_file_replace (destination,
NULL,
flags & G_FILE_COPY_BACKUP,
- G_FILE_CREATE_REPLACE_DESTINATION |
- G_FILE_CREATE_PRIVATE,
+ G_FILE_CREATE_REPLACE_DESTINATION,
cancellable, error);
}
else
{
- out = (GOutputStream *)g_file_create (destination, G_FILE_CREATE_PRIVATE, cancellable, error);
+ out = (GOutputStream *)g_file_create (destination, 0, cancellable, error);
}
if (!out)
@@ -6935,6 +6934,7 @@ query_default_handler_query_info_cb (GObject *object,
/**
* g_file_query_default_handler_async:
* @file: a #GFile to open
+ * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: optional #GCancellable object, %NULL to ignore
* @callback: (nullable): a #GAsyncReadyCallback to call when the request is done
* @user_data: (nullable): data to pass to @callback
@@ -7964,7 +7964,7 @@ g_file_real_measure_disk_usage_finish (GFile *file,
*
* By default, errors are only reported against the toplevel file
* itself. Errors found while recursing are silently ignored, unless
- * %G_FILE_DISK_USAGE_REPORT_ALL_ERRORS is given in @flags.
+ * %G_FILE_MEASURE_REPORT_ANY_ERROR is given in @flags.
*
* The returned size, @disk_usage, is in bytes and should be formatted
* with g_format_size() in order to get something reasonable for showing
diff --git a/gio/gfile.h b/gio/gfile.h
index 6e25b0de0..9c9ea9572 100644
--- a/gio/gfile.h
+++ b/gio/gfile.h
@@ -80,14 +80,14 @@ typedef struct _GFileIface GFileIface;
* @set_display_name: Sets the display name for a #GFile.
* @set_display_name_async: Asynchronously sets a #GFile's display name.
* @set_display_name_finish: Finishes asynchronously setting a #GFile's display name.
- * @query_settable_attributes: Returns a list of #GFileAttributes that can be set.
- * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributes that can be set.
+ * @query_settable_attributes: Returns a list of #GFileAttributeInfos that can be set.
+ * @_query_settable_attributes_async: Asynchronously gets a list of #GFileAttributeInfos that can be set.
* @_query_settable_attributes_finish: Finishes asynchronously querying settable attributes.
- * @query_writable_namespaces: Returns a list of #GFileAttribute namespaces that are writable.
- * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttribute namespaces that are writable.
+ * @query_writable_namespaces: Returns a list of #GFileAttributeInfo namespaces that are writable.
+ * @_query_writable_namespaces_async: Asynchronously gets a list of #GFileAttributeInfo namespaces that are writable.
* @_query_writable_namespaces_finish: Finishes asynchronously querying the writable namespaces.
- * @set_attribute: Sets a #GFileAttribute.
- * @set_attributes_from_info: Sets a #GFileAttribute with information from a #GFileInfo.
+ * @set_attribute: Sets a #GFileAttributeInfo.
+ * @set_attributes_from_info: Sets a #GFileAttributeInfo with information from a #GFileInfo.
* @set_attributes_async: Asynchronously sets a file's attributes.
* @set_attributes_finish: Finishes setting a file's attributes asynchronously.
* @read_fn: Reads a file asynchronously.
diff --git a/gio/gfileinfo.c b/gio/gfileinfo.c
index 420e46d56..d1c9140df 100644
--- a/gio/gfileinfo.c
+++ b/gio/gfileinfo.c
@@ -179,7 +179,8 @@ ensure_attribute_hash (void)
attribute_hash = g_hash_table_new (g_str_hash, g_str_equal);
#define REGISTER_ATTRIBUTE(name) G_STMT_START{\
- guint _u = _lookup_attribute (G_FILE_ATTRIBUTE_ ## name); \
+ guint _u G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */; \
+ _u = _lookup_attribute (G_FILE_ATTRIBUTE_ ## name); \
/* use for generating the ID: g_print ("#define G_FILE_ATTRIBUTE_ID_%s (%u + %u)\n", #name + 17, _u & ~ID_MASK, _u & ID_MASK); */ \
g_assert (_u == G_FILE_ATTRIBUTE_ID_ ## name); \
}G_STMT_END
diff --git a/gio/gfileinfo.h b/gio/gfileinfo.h
index 2ca623c3a..622c2b611 100644
--- a/gio/gfileinfo.h
+++ b/gio/gfileinfo.h
@@ -76,6 +76,7 @@ typedef struct _GFileInfoClass GFileInfoClass;
* A key in the "standard" namespace for checking if the file is a symlink.
* Typically the actual type is something else, if we followed the symlink
* to get the type.
+ * On Windows NTFS mountpoints are considered to be symlinks as well.
* Corresponding #GFileAttributeType is %G_FILE_ATTRIBUTE_TYPE_BOOLEAN.
**/
#define G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "standard::is-symlink" /* boolean */
diff --git a/gio/ginputstream.c b/gio/ginputstream.c
index e0b34eddc..20cece53d 100644
--- a/gio/ginputstream.c
+++ b/gio/ginputstream.c
@@ -127,8 +127,8 @@ g_input_stream_init (GInputStream *stream)
/**
* g_input_stream_read:
* @stream: a #GInputStream.
- * @buffer: (array length=count) (element-type guint8): a buffer to
- * read data into (which should be at least count bytes long).
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ * a buffer to read data into (which should be at least count bytes long).
* @count: the number of bytes that will be read from the stream
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
* @error: location to store the error occurring, or %NULL to ignore
@@ -208,8 +208,8 @@ g_input_stream_read (GInputStream *stream,
/**
* g_input_stream_read_all:
* @stream: a #GInputStream.
- * @buffer: (array length=count) (element-type guint8): a buffer to
- * read data into (which should be at least count bytes long).
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ * a buffer to read data into (which should be at least count bytes long).
* @count: the number of bytes that will be read from the stream
* @bytes_read: (out): location to store the number of bytes that was read from the stream
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore.
@@ -550,8 +550,8 @@ async_ready_close_callback_wrapper (GObject *source_object,
/**
* g_input_stream_read_async:
* @stream: A #GInputStream.
- * @buffer: (array length=count) (element-type guint8): a buffer to
- * read data into (which should be at least count bytes long).
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ * a buffer to read data into (which should be at least count bytes long).
* @count: the number of bytes that will be read from the stream
* @io_priority: the [I/O priority][io-priority]
* of the request.
@@ -742,8 +742,8 @@ read_all_async_thread (GTask *task,
/**
* g_input_stream_read_all_async:
* @stream: A #GInputStream
- * @buffer: (array length=count) (element-type guint8): a buffer to
- * read data into (which should be at least count bytes long)
+ * @buffer: (array length=count) (element-type guint8) (out caller-allocates):
+ * a buffer to read data into (which should be at least count bytes long)
* @count: the number of bytes that will be read from the stream
* @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (nullable): optional #GCancellable object, %NULL to ignore
@@ -1045,7 +1045,7 @@ g_input_stream_skip_async (GInputStream *stream,
*
* Finishes a stream skip operation.
*
- * Returns: the size of the bytes skipped, or %-1 on error.
+ * Returns: the size of the bytes skipped, or `-1` on error.
**/
gssize
g_input_stream_skip_finish (GInputStream *stream,
diff --git a/gio/gio-autocleanups.h b/gio/gio-autocleanups.h
index dcba4d976..ff407293f 100644
--- a/gio/gio-autocleanups.h
+++ b/gio/gio-autocleanups.h
@@ -112,6 +112,8 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC(GResource, g_resource_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSeekable, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsBackend, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchema, g_settings_schema_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchemaKey, g_settings_schema_key_unref)
+G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettingsSchemaSource, g_settings_schema_source_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSettings, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleActionGroup, g_object_unref)
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GSimpleAction, g_object_unref)
diff --git a/gio/gioenums.h b/gio/gioenums.h
index 9c7d9b6ac..2fc69b6be 100644
--- a/gio/gioenums.h
+++ b/gio/gioenums.h
@@ -361,6 +361,15 @@ typedef enum {
* @G_FILE_TYPE_MOUNTABLE: File is a mountable location.
*
* Indicates the file's on-disk type.
+ *
+ * On Windows systems a file will never have %G_FILE_TYPE_SYMBOLIC_LINK type;
+ * use #GFileInfo and %G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK to determine
+ * whether a file is a symlink or not. This is due to the fact that NTFS does
+ * not have a single filesystem object type for symbolic links - it has
+ * files that symlink to files, and directories that symlink to directories.
+ * #GFileType enumeration cannot precisely represent this important distinction,
+ * which is why all Windows symlinks will continue to be reported as
+ * %G_FILE_TYPE_REGULAR or %G_FILE_TYPE_DIRECTORY.
**/
typedef enum {
G_FILE_TYPE_UNKNOWN = 0,
diff --git a/gio/gioerror.c b/gio/gioerror.c
index 900553e98..1ec120d98 100644
--- a/gio/gioerror.c
+++ b/gio/gioerror.c
@@ -272,6 +272,12 @@ g_io_error_from_errno (gint err_no)
break;
#endif
+#ifdef ENOTSOCK
+ case ENOTSOCK:
+ return G_IO_ERROR_INVALID_ARGUMENT;
+ break;
+#endif
+
default:
return G_IO_ERROR_FAILED;
break;
diff --git a/gio/giomodule.c b/gio/giomodule.c
index b97e3a26b..ee1b0b6f4 100644
--- a/gio/giomodule.c
+++ b/gio/giomodule.c
@@ -1209,7 +1209,6 @@ _g_io_modules_ensure_loaded (void)
/* Initialize types from built-in "modules" */
g_type_ensure (g_null_settings_backend_get_type ());
g_type_ensure (g_memory_settings_backend_get_type ());
- g_type_ensure (g_keyfile_settings_backend_get_type ());
#if defined(HAVE_INOTIFY_INIT1)
g_type_ensure (g_inotify_file_monitor_get_type ());
#endif
@@ -1236,7 +1235,7 @@ _g_io_modules_ensure_loaded (void)
g_type_ensure (g_network_monitor_portal_get_type ());
g_type_ensure (g_proxy_resolver_portal_get_type ());
#endif
-#if HAVE_MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
g_type_ensure (g_cocoa_notification_backend_get_type ());
#endif
#ifdef G_OS_WIN32
diff --git a/gio/giotypes.h b/gio/giotypes.h
index 738e517bb..c9ad8dd90 100644
--- a/gio/giotypes.h
+++ b/gio/giotypes.h
@@ -335,7 +335,7 @@ typedef gboolean (* GFileReadMoreCallback) (const char *file_contents,
* final async result would be reported).
*
* @current_size is in the same units as requested by the operation (see
- * %G_FILE_DISK_USAGE_APPARENT_SIZE).
+ * %G_FILE_MEASURE_APPARENT_SIZE).
*
* The frequency of the updates is implementation defined, but is
* ideally about once every 200ms.
diff --git a/gio/gkeyfilesettingsbackend.c b/gio/gkeyfilesettingsbackend.c
index 3d793f5a8..3bc392351 100644
--- a/gio/gkeyfilesettingsbackend.c
+++ b/gio/gkeyfilesettingsbackend.c
@@ -80,7 +80,7 @@ typedef struct
#ifdef G_OS_WIN32
#define EXTENSION_PRIORITY 10
#else
-#define EXTENSION_PRIORITY (glib_should_use_portal () && !glib_has_dconf_access_in_sandbox () ? 110 : 10)
+#define EXTENSION_PRIORITY (glib_should_use_portal () ? 110 : 10)
#endif
G_DEFINE_TYPE_WITH_CODE (GKeyfileSettingsBackend,
@@ -334,7 +334,7 @@ g_keyfile_settings_backend_write_one (gpointer key,
gpointer user_data)
{
WriteManyData *data = user_data;
- gboolean success;
+ gboolean success G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
success = set_to_keyfile (data->kfsb, key, value);
g_assert (success);
@@ -740,8 +740,7 @@ g_keyfile_settings_backend_set_property (GObject *object,
case PROP_FILENAME:
/* Construct only. */
g_assert (kfsb->file == NULL);
- if (g_value_get_string (value))
- kfsb->file = g_file_new_for_path (g_value_get_string (value));
+ kfsb->file = g_file_new_for_path (g_value_get_string (value));
break;
case PROP_ROOT_PATH:
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index 5e1bebbba..8ad3c6be1 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -648,8 +648,10 @@ key_state_serialise (KeyState *state)
else
{
GVariantBuilder builder;
+ gboolean checked G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
- g_assert (key_state_check (state, NULL));
+ checked = key_state_check (state, NULL);
+ g_assert (checked);
g_variant_builder_init (&builder, G_VARIANT_TYPE_TUPLE);
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 59cfb9ba9..487f8cc1a 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -161,7 +161,7 @@ _g_local_file_info_create_fs_id (GLocalFileStat *statbuf)
static gchar *
read_link (const gchar *full_name)
{
-#if defined (HAVE_READLINK) || defined (G_OS_WIN32)
+#if defined (HAVE_READLINK)
gchar *buffer;
guint size;
@@ -171,12 +171,8 @@ read_link (const gchar *full_name)
while (1)
{
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);
@@ -190,6 +186,17 @@ read_link (const gchar *full_name)
size *= 2;
buffer = g_realloc (buffer, size);
}
+#elif defined (G_OS_WIN32)
+ gchar *buffer;
+ int read_size;
+
+ read_size = GLIB_PRIVATE_CALL (g_win32_readlink_utf8) (full_name, NULL, 0, &buffer, TRUE);
+ if (read_size < 0)
+ return NULL;
+ else if (read_size == 0)
+ return strdup ("");
+ else
+ return buffer;
#else
return NULL;
#endif
@@ -957,8 +964,8 @@ set_info_from_stat (GFileInfo *info,
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 ||
- statbuf->reparse_tag == IO_REPARSE_TAG_MOUNT_POINT)
+ else if (statbuf->reparse_tag == IO_REPARSE_TAG_SYMLINK ||
+ statbuf->reparse_tag == IO_REPARSE_TAG_MOUNT_POINT)
file_type = G_FILE_TYPE_SYMBOLIC_LINK;
#endif
@@ -966,15 +973,17 @@ set_info_from_stat (GFileInfo *info,
g_file_info_set_size (info, statbuf->st_size);
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_DEVICE, statbuf->st_dev);
+ _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_NLINK, statbuf->st_nlink);
#ifndef G_OS_WIN32
/* Pointless setting these on Windows even if they exist in the struct */
_g_file_info_set_attribute_uint64_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_INODE, statbuf->st_ino);
- _g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_NLINK, statbuf->st_nlink);
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_UID, statbuf->st_uid);
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_GID, statbuf->st_gid);
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_RDEV, statbuf->st_rdev);
#endif
- /* FIXME: st_mode is mostly pointless on Windows, too. Set the attribute or not? */
+ /* Mostly pointless on Windows.
+ * Still, it allows for S_ISREG/S_ISDIR and IWRITE (read-only) checks.
+ */
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_MODE, statbuf->st_mode);
#if defined (HAVE_STRUCT_STAT_ST_BLKSIZE)
_g_file_info_set_attribute_uint32_by_id (info, G_FILE_ATTRIBUTE_ID_UNIX_BLOCK_SIZE, statbuf->st_blksize);
diff --git a/gio/glocalfilemonitor.c b/gio/glocalfilemonitor.c
index 8a4c4ec43..897d5f244 100644
--- a/gio/glocalfilemonitor.c
+++ b/gio/glocalfilemonitor.c
@@ -328,6 +328,7 @@ g_file_monitor_source_send_synthetic_created (GFileMonitorSource *fms,
g_file_monitor_source_queue_event (fms, G_FILE_MONITOR_EVENT_CHANGES_DONE_HINT, child, NULL);
}
+#ifndef G_DISABLE_ASSERT
static gboolean
is_basename (const gchar *name)
{
@@ -336,6 +337,7 @@ is_basename (const gchar *name)
return !strchr (name, '/');
}
+#endif /* !G_DISABLE_ASSERT */
gboolean
g_file_monitor_source_handle_event (GFileMonitorSource *fms,
@@ -788,11 +790,11 @@ g_local_file_monitor_start (GLocalFileMonitor *local_monitor,
#endif
}
+ g_source_attach ((GSource *) source, context);
+
G_LOCAL_FILE_MONITOR_GET_CLASS (local_monitor)->start (local_monitor,
source->dirname, source->basename, source->filename,
source);
-
- g_source_attach ((GSource *) source, context);
}
static void
diff --git a/gio/gmountoperation.c b/gio/gmountoperation.c
index c3f5d25d8..76a5024ff 100644
--- a/gio/gmountoperation.c
+++ b/gio/gmountoperation.c
@@ -799,7 +799,7 @@ g_mount_operation_set_password_save (GMountOperation *op,
* Gets a choice from the mount operation.
*
* Returns: an integer containing an index of the user's choice from
- * the choice's list, or %0.
+ * the choice's list, or `0`.
**/
int
g_mount_operation_get_choice (GMountOperation *op)
diff --git a/gio/gnetworkaddress.c b/gio/gnetworkaddress.c
index e46b5ac65..df1bc3158 100644
--- a/gio/gnetworkaddress.c
+++ b/gio/gnetworkaddress.c
@@ -52,10 +52,6 @@
* then attempt to connect to that host, handling the possibility of
* multiple IP addresses and multiple address families.
*
- * The enumeration results of resolved addresses *may* be cached as long
- * as this object is kept alive which may have unexpected results if
- * alive for too long.
- *
* See #GSocketConnectable for an example of using the connectable
* interface.
*/
@@ -70,7 +66,7 @@
struct _GNetworkAddressPrivate {
gchar *hostname;
guint16 port;
- GList *cached_sockaddrs;
+ GList *sockaddrs;
gchar *scheme;
gint64 resolver_serial;
@@ -109,7 +105,7 @@ g_network_address_finalize (GObject *object)
g_free (addr->priv->hostname);
g_free (addr->priv->scheme);
- g_list_free_full (addr->priv->cached_sockaddrs, g_object_unref);
+ g_list_free_full (addr->priv->sockaddrs, g_object_unref);
G_OBJECT_CLASS (g_network_address_parent_class)->finalize (object);
}
@@ -224,51 +220,30 @@ g_network_address_get_property (GObject *object,
}
-/**
- * inet_addresses_to_inet_socket_addresses:
- * @addresses: (transfer full): #GList of #GInetAddress
+/*
+ * g_network_address_add_addresses:
+ * @addr: A #GNetworkAddress
+ * @addresses: (transfer full): List of #GSocketAddress
+ * @resolver_serial: Serial of #GResolver used
*
- * Returns: (transfer full): #GList of #GInetSocketAddress
+ * Consumes address list and adds them to internal list.
*/
-static GList *
-inet_addresses_to_inet_socket_addresses (GNetworkAddress *addr,
- GList *addresses)
+static void
+g_network_address_add_addresses (GNetworkAddress *addr,
+ GList *addresses,
+ guint64 resolver_serial)
{
- GList *a, *socket_addresses = NULL;
+ GList *a;
+ GSocketAddress *sockaddr;
for (a = addresses; a; a = a->next)
{
- GSocketAddress *sockaddr = g_inet_socket_address_new (a->data, addr->priv->port);
- socket_addresses = g_list_append (socket_addresses, g_steal_pointer (&sockaddr));
+ sockaddr = g_inet_socket_address_new (a->data, addr->priv->port);
+ addr->priv->sockaddrs = g_list_append (addr->priv->sockaddrs, sockaddr);
g_object_unref (a->data);
}
-
g_list_free (addresses);
- return socket_addresses;
-}
-
-/*
- * g_network_address_set_cached_addresses:
- * @addr: A #GNetworkAddress
- * @addresses: (transfer full): List of #GInetAddress or #GInetSocketAddress
- * @resolver_serial: Serial of #GResolver used
- *
- * Consumes @addresses and uses them to replace the current internal list.
- */
-static void
-g_network_address_set_cached_addresses (GNetworkAddress *addr,
- GList *addresses,
- guint64 resolver_serial)
-{
- g_assert (addresses != NULL);
- if (addr->priv->cached_sockaddrs)
- g_list_free_full (addr->priv->cached_sockaddrs, g_object_unref);
-
- if (G_IS_INET_SOCKET_ADDRESS (addresses->data))
- addr->priv->cached_sockaddrs = g_steal_pointer (&addresses);
- else
- addr->priv->cached_sockaddrs = inet_addresses_to_inet_socket_addresses (addr, g_steal_pointer (&addresses));
addr->priv->resolver_serial = resolver_serial;
}
@@ -277,13 +252,11 @@ g_network_address_parse_sockaddr (GNetworkAddress *addr)
{
GSocketAddress *sockaddr;
- g_assert (addr->priv->cached_sockaddrs == NULL);
-
sockaddr = g_inet_socket_address_new_from_string (addr->priv->hostname,
addr->priv->port);
if (sockaddr)
{
- addr->priv->cached_sockaddrs = g_list_append (addr->priv->cached_sockaddrs, sockaddr);
+ addr->priv->sockaddrs = g_list_append (addr->priv->sockaddrs, sockaddr);
return TRUE;
}
else
@@ -333,7 +306,7 @@ g_network_address_new (const gchar *hostname,
* resolving `localhost`, and an IPv6 address for `localhost6`.
*
* g_network_address_get_hostname() will always return `localhost` for
- * #GNetworkAddresses created with this constructor.
+ * a #GNetworkAddress created with this constructor.
*
* Returns: (transfer full) (type GNetworkAddress): the new #GNetworkAddress
*
@@ -352,7 +325,7 @@ g_network_address_new_loopback (guint16 port)
addrs = g_list_append (addrs, g_inet_address_new_loopback (AF_INET6));
addrs = g_list_append (addrs, g_inet_address_new_loopback (AF_INET));
- g_network_address_set_cached_addresses (addr, g_steal_pointer (&addrs), 0);
+ g_network_address_add_addresses (addr, g_steal_pointer (&addrs), 0);
return G_SOCKET_CONNECTABLE (addr);
}
@@ -921,6 +894,7 @@ typedef struct {
GNetworkAddress *addr; /* (owned) */
GList *addresses; /* (owned) (nullable) */
+ GList *last_tail; /* (unowned) (nullable) */
GList *current_item; /* (unowned) (nullable) */
GTask *queued_task; /* (owned) (nullable) */
GTask *waiting_task; /* (owned) (nullable) */
@@ -953,8 +927,8 @@ g_network_address_address_enumerator_finalize (GObject *object)
g_clear_object (&addr_enum->waiting_task);
g_clear_error (&addr_enum->last_error);
g_object_unref (addr_enum->addr);
+ g_clear_pointer (&addr_enum->addresses, g_list_free);
g_clear_pointer (&addr_enum->context, g_main_context_unref);
- g_list_free_full (addr_enum->addresses, g_object_unref);
G_OBJECT_CLASS (_g_network_address_address_enumerator_parent_class)->finalize (object);
}
@@ -1040,19 +1014,16 @@ list_copy_interleaved (GList *list)
}
/* list_concat_interleaved:
- * @parent_list: (transfer container): Already existing list
- * @current_item: (transfer container): Item after which to resort
- * @new_list: (transfer container): New list to be interleaved and concatenated
+ * @current_item: (transfer container): Already existing list
+ * @new_list: (transfer none): New list to be interleaved and concatenated
*
* This differs from g_list_concat() + list_copy_interleaved() in that it sorts
- * items in the previous list starting from @current_item and concats the results
- * to @parent_list.
+ * items in the previous list starting from @current_item.
*
* Returns: (transfer container): New start of list
*/
static GList *
-list_concat_interleaved (GList *parent_list,
- GList *current_item,
+list_concat_interleaved (GList *current_item,
GList *new_list)
{
GList *ipv4 = NULL, *ipv6 = NULL, *interleaved, *trailing = NULL;
@@ -1069,7 +1040,6 @@ list_concat_interleaved (GList *parent_list,
list_split_families (trailing, &ipv4, &ipv6);
list_split_families (new_list, &ipv4, &ipv6);
- g_list_free (new_list);
if (trailing)
g_list_free (trailing);
@@ -1079,73 +1049,7 @@ list_concat_interleaved (GList *parent_list,
else
interleaved = list_interleave_families (ipv4, ipv6);
- return g_list_concat (parent_list, interleaved);
-}
-
-static void
-maybe_update_address_cache (GNetworkAddressAddressEnumerator *addr_enum,
- GResolver *resolver)
-{
- GList *addresses, *p;
-
- /* Only cache complete results */
- if (addr_enum->state & RESOLVE_STATE_WAITING_ON_IPV4 || addr_enum->state & RESOLVE_STATE_WAITING_ON_IPV6)
- return;
-
- /* The enumerators list will not necessarily be fully sorted */
- addresses = list_copy_interleaved (addr_enum->addresses);
- for (p = addresses; p; p = p->next)
- g_object_ref (p->data);
-
- g_network_address_set_cached_addresses (addr_enum->addr, g_steal_pointer (&addresses), g_resolver_get_serial (resolver));
-}
-
-static void
-g_network_address_address_enumerator_add_addresses (GNetworkAddressAddressEnumerator *addr_enum,
- GList *addresses,
- GResolver *resolver)
-{
- GList *new_addresses = inet_addresses_to_inet_socket_addresses (addr_enum->addr, addresses);
-
- if (addr_enum->addresses == NULL)
- addr_enum->addresses = g_steal_pointer (&new_addresses);
- else
- addr_enum->addresses = list_concat_interleaved (addr_enum->addresses, addr_enum->current_item, g_steal_pointer (&new_addresses));
-
- maybe_update_address_cache (addr_enum, resolver);
-}
-
-static gpointer
-copy_object (gconstpointer src,
- gpointer user_data)
-{
- return g_object_ref (G_OBJECT (src));
-}
-
-static GSocketAddress *
-init_and_query_next_address (GNetworkAddressAddressEnumerator *addr_enum)
-{
- GList *next_item;
-
- if (addr_enum->addresses == NULL)
- addr_enum->addresses = g_list_copy_deep (addr_enum->addr->priv->cached_sockaddrs,
- copy_object, NULL);
-
- /* We always want to look at the next item at call time to get the latest results.
- That means that sometimes ->next is NULL this call but is valid next call.
- */
- if (addr_enum->current_item == NULL)
- next_item = addr_enum->current_item = addr_enum->addresses;
- else
- next_item = g_list_next (addr_enum->current_item);
-
- if (next_item)
- {
- addr_enum->current_item = next_item;
- return g_object_ref (addr_enum->current_item->data);
- }
- else
- return NULL;
+ return g_list_concat (current_item, interleaved);
}
static GSocketAddress *
@@ -1155,6 +1059,7 @@ g_network_address_address_enumerator_next (GSocketAddressEnumerator *enumerator
{
GNetworkAddressAddressEnumerator *addr_enum =
G_NETWORK_ADDRESS_ADDRESS_ENUMERATOR (enumerator);
+ GSocketAddress *sockaddr;
if (addr_enum->addresses == NULL)
{
@@ -1166,13 +1071,13 @@ g_network_address_address_enumerator_next (GSocketAddressEnumerator *enumerator
addr->priv->resolver_serial != serial)
{
/* Resolver has reloaded, discard cached addresses */
- g_list_free_full (addr->priv->cached_sockaddrs, g_object_unref);
- addr->priv->cached_sockaddrs = NULL;
+ g_list_free_full (addr->priv->sockaddrs, g_object_unref);
+ addr->priv->sockaddrs = NULL;
}
- if (!addr->priv->cached_sockaddrs)
+ if (!addr->priv->sockaddrs)
g_network_address_parse_sockaddr (addr);
- if (!addr->priv->cached_sockaddrs)
+ if (!addr->priv->sockaddrs)
{
GList *addresses;
@@ -1185,13 +1090,62 @@ g_network_address_address_enumerator_next (GSocketAddressEnumerator *enumerator
return NULL;
}
- g_network_address_set_cached_addresses (addr, g_steal_pointer (&addresses), serial);
+ g_network_address_add_addresses (addr, g_steal_pointer (&addresses), serial);
}
+ addr_enum->current_item = addr_enum->addresses = list_copy_interleaved (addr->priv->sockaddrs);
+ addr_enum->last_tail = g_list_last (addr->priv->sockaddrs);
g_object_unref (resolver);
}
- return init_and_query_next_address (addr_enum);
+ if (addr_enum->current_item == NULL)
+ return NULL;
+
+ sockaddr = addr_enum->current_item->data;
+ addr_enum->current_item = g_list_next (addr_enum->current_item);
+ return g_object_ref (sockaddr);
+}
+
+/*
+ * Each enumeration lazily initializes the internal address list from the
+ * master list. It does this since addresses come in asynchronously and
+ * they need to be resorted into the list already in use.
+ */
+static GSocketAddress *
+init_and_query_next_address (GNetworkAddressAddressEnumerator *addr_enum)
+{
+ GNetworkAddress *addr = addr_enum->addr;
+ GSocketAddress *sockaddr;
+
+ if (addr_enum->addresses == NULL)
+ {
+ addr_enum->current_item = addr_enum->addresses = list_copy_interleaved (addr->priv->sockaddrs);
+ addr_enum->last_tail = g_list_last (addr_enum->addr->priv->sockaddrs);
+ if (addr_enum->current_item)
+ sockaddr = g_object_ref (addr_enum->current_item->data);
+ else
+ sockaddr = NULL;
+ }
+ else
+ {
+ GList *parent_tail = g_list_last (addr_enum->addr->priv->sockaddrs);
+
+ if (addr_enum->last_tail != parent_tail)
+ {
+ addr_enum->current_item = list_concat_interleaved (addr_enum->current_item, g_list_next (addr_enum->last_tail));
+ addr_enum->last_tail = parent_tail;
+ }
+
+ if (addr_enum->current_item->next)
+ {
+ addr_enum->current_item = g_list_next (addr_enum->current_item);
+ sockaddr = g_object_ref (addr_enum->current_item->data);
+ }
+ else
+ sockaddr = NULL;
+ }
+
+ return sockaddr;
}
static void
@@ -1199,13 +1153,12 @@ complete_queued_task (GNetworkAddressAddressEnumerator *addr_enum,
GTask *task,
GError *error)
{
+ GSocketAddress *sockaddr = init_and_query_next_address (addr_enum);
+
if (error)
g_task_return_error (task, error);
else
- {
- GSocketAddress *sockaddr = init_and_query_next_address (addr_enum);
- g_task_return_pointer (task, g_steal_pointer (&sockaddr), g_object_unref);
- }
+ g_task_return_pointer (task, sockaddr, g_object_unref);
g_object_unref (task);
}
@@ -1244,7 +1197,13 @@ got_ipv6_addresses (GObject *source_object,
addresses = g_resolver_lookup_by_name_with_flags_finish (resolver, result, &error);
if (!error)
- g_network_address_address_enumerator_add_addresses (addr_enum, g_steal_pointer (&addresses), resolver);
+ {
+ /* Regardless of which responds first we add them to the enumerator
+ * which does mean the timing of next_async() will potentially change
+ * the results */
+ g_network_address_add_addresses (addr_enum->addr, g_steal_pointer (&addresses),
+ g_resolver_get_serial (resolver));
+ }
else
g_debug ("IPv6 DNS error: %s", error->message);
@@ -1261,8 +1220,13 @@ got_ipv6_addresses (GObject *source_object,
*/
if (error != NULL && !addr_enum->last_error && (addr_enum->state & RESOLVE_STATE_WAITING_ON_IPV4))
{
- /* ipv6 lookup failed, but ipv4 is still outstanding. wait. */
addr_enum->last_error = g_steal_pointer (&error);
+
+ addr_enum->wait_source = g_timeout_source_new (HAPPY_EYEBALLS_RESOLUTION_DELAY_MS);
+ g_source_set_callback (addr_enum->wait_source,
+ on_address_timeout,
+ addr_enum, NULL);
+ g_source_attach (addr_enum->wait_source, addr_enum->context);
}
else if (addr_enum->waiting_task != NULL)
{
@@ -1300,7 +1264,10 @@ got_ipv4_addresses (GObject *source_object,
addresses = g_resolver_lookup_by_name_with_flags_finish (resolver, result, &error);
if (!error)
- g_network_address_address_enumerator_add_addresses (addr_enum, g_steal_pointer (&addresses), resolver);
+ {
+ g_network_address_add_addresses (addr_enum->addr, g_steal_pointer (&addresses),
+ g_resolver_get_serial (resolver));
+ }
else
g_debug ("IPv4 DNS error: %s", error->message);
@@ -1364,11 +1331,11 @@ g_network_address_address_enumerator_next_async (GSocketAddressEnumerator *enum
addr->priv->resolver_serial != serial)
{
/* Resolver has reloaded, discard cached addresses */
- g_list_free_full (addr->priv->cached_sockaddrs, g_object_unref);
- addr->priv->cached_sockaddrs = NULL;
+ g_list_free_full (addr->priv->sockaddrs, g_object_unref);
+ addr->priv->sockaddrs = NULL;
}
- if (addr->priv->cached_sockaddrs == NULL)
+ if (addr->priv->sockaddrs == NULL)
{
if (g_network_address_parse_sockaddr (addr))
complete_queued_task (addr_enum, task, NULL);
diff --git a/gio/gnetworkmonitornm.c b/gio/gnetworkmonitornm.c
index 9013fd49c..4e2a35e8a 100644
--- a/gio/gnetworkmonitornm.c
+++ b/gio/gnetworkmonitornm.c
@@ -52,19 +52,6 @@ typedef enum {
NM_CONNECTIVITY_FULL
} NMConnectivityState;
-/* Copied from https://developer.gnome.org/libnm-util/stable/libnm-util-NetworkManager.html#NMState;
- * used inline to avoid a NetworkManager dependency from GLib. */
-typedef enum {
- NM_STATE_UNKNOWN = 0,
- NM_STATE_ASLEEP = 10,
- NM_STATE_DISCONNECTED = 20,
- NM_STATE_DISCONNECTING = 30,
- NM_STATE_CONNECTING = 40,
- NM_STATE_CONNECTED_LOCAL = 50,
- NM_STATE_CONNECTED_SITE = 60,
- NM_STATE_CONNECTED_GLOBAL = 70,
-} NMState;
-
struct _GNetworkMonitorNMPrivate
{
GDBusProxy *proxy;
@@ -168,19 +155,11 @@ sync_properties (GNetworkMonitorNM *nm,
gboolean emit_signals)
{
GVariant *v;
- NMState nm_state;
NMConnectivityState nm_connectivity;
gboolean new_network_available;
gboolean new_network_metered;
GNetworkConnectivity new_connectivity;
- v = g_dbus_proxy_get_cached_property (nm->priv->proxy, "State");
- if (!v)
- return;
-
- nm_state = g_variant_get_uint32 (v);
- g_variant_unref (v);
-
v = g_dbus_proxy_get_cached_property (nm->priv->proxy, "Connectivity");
if (!v)
return;
@@ -188,26 +167,14 @@ sync_properties (GNetworkMonitorNM *nm,
nm_connectivity = g_variant_get_uint32 (v);
g_variant_unref (v);
- if (nm_state <= NM_STATE_CONNECTED_LOCAL)
+ if (nm_connectivity == NM_CONNECTIVITY_UNKNOWN ||
+ nm_connectivity == NM_CONNECTIVITY_NONE)
{
new_network_available = FALSE;
new_network_metered = FALSE;
new_connectivity = G_NETWORK_CONNECTIVITY_LOCAL;
}
- else if (nm_state <= NM_STATE_CONNECTED_SITE)
- {
- new_network_available = TRUE;
- new_network_metered = FALSE;
- if (nm_connectivity == NM_CONNECTIVITY_PORTAL)
- {
- new_connectivity = G_NETWORK_CONNECTIVITY_PORTAL;
- }
- else
- {
- new_connectivity = G_NETWORK_CONNECTIVITY_LIMITED;
- }
- }
- else /* nm_state == NM_STATE_CONNECTED_FULL */
+ else
{
/* this is only available post NM 1.0 */
diff --git a/gio/gopenuriportal.c b/gio/gopenuriportal.c
index be68569ed..b798d7cd1 100644
--- a/gio/gopenuriportal.c
+++ b/gio/gopenuriportal.c
@@ -279,7 +279,7 @@ g_openuri_portal_open_uri_async (const char *uri,
if (sender[i] == '.')
sender[i] = '_';
- handle = g_strdup_printf ("/org/freedesktop/portal/desktop/request/%s/%s", sender, token);
+ handle = g_strdup_printf ("/org/fredesktop/portal/desktop/request/%s/%s", sender, token);
g_object_set_data_full (G_OBJECT (task), "handle", handle, g_free);
g_free (sender);
diff --git a/gio/gpollableoutputstream.h b/gio/gpollableoutputstream.h
index c1e7ad889..c282afdec 100644
--- a/gio/gpollableoutputstream.h
+++ b/gio/gpollableoutputstream.h
@@ -49,6 +49,8 @@ typedef struct _GPollableOutputStreamInterface GPollableOutputStreamInterface;
* @create_source: Creates a #GSource to poll the stream
* @write_nonblocking: Does a non-blocking write or returns
* %G_IO_ERROR_WOULD_BLOCK
+ * @writev_nonblocking: Does a vectored non-blocking write, or returns
+ * %G_POLLABLE_RETURN_WOULD_BLOCK
*
* The interface for pollable output streams.
*
@@ -61,6 +63,12 @@ typedef struct _GPollableOutputStreamInterface GPollableOutputStreamInterface;
* implementation may return %TRUE when the stream is not actually
* writable.
*
+ * The default implementation of @writev_nonblocking calls
+ * g_pollable_output_stream_write_nonblocking() for each vector, and converts
+ * its return value and error (if set) to a #GPollableReturn. You should
+ * override this where possible to avoid having to allocate a #GError to return
+ * %G_IO_ERROR_WOULD_BLOCK.
+ *
* Since: 2.28
*/
struct _GPollableOutputStreamInterface
diff --git a/gio/gportalsupport.c b/gio/gportalsupport.c
index b0a94b360..2f1e82517 100644
--- a/gio/gportalsupport.c
+++ b/gio/gportalsupport.c
@@ -23,7 +23,6 @@
static gboolean flatpak_info_read;
static gboolean use_portal;
static gboolean network_available;
-static gboolean dconf_access;
static void
read_flatpak_info (void)
@@ -41,13 +40,11 @@ read_flatpak_info (void)
use_portal = TRUE;
network_available = FALSE;
- dconf_access = FALSE;
keyfile = g_key_file_new ();
if (g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, NULL))
{
char **shared = NULL;
- char *dconf_policy = NULL;
shared = g_key_file_get_string_list (keyfile, "Context", "shared", NULL, NULL);
if (shared)
@@ -55,14 +52,6 @@ read_flatpak_info (void)
network_available = g_strv_contains ((const char * const *)shared, "network");
g_strfreev (shared);
}
-
- dconf_policy = g_key_file_get_string (keyfile, "Session Bus Policy", "ca.desrt.dconf", NULL);
- if (dconf_policy)
- {
- if (strcmp (dconf_policy, "talk") == 0)
- dconf_access = TRUE;
- g_free (dconf_policy);
- }
}
g_key_file_unref (keyfile);
@@ -75,7 +64,6 @@ read_flatpak_info (void)
if (var && var[0] == '1')
use_portal = TRUE;
network_available = TRUE;
- dconf_access = TRUE;
}
}
@@ -93,9 +81,3 @@ glib_network_available_in_sandbox (void)
return network_available;
}
-gboolean
-glib_has_dconf_access_in_sandbox (void)
-{
- read_flatpak_info ();
- return dconf_access;
-}
diff --git a/gio/gportalsupport.h b/gio/gportalsupport.h
index 746f1fd6b..a331f45d3 100644
--- a/gio/gportalsupport.h
+++ b/gio/gportalsupport.h
@@ -24,7 +24,6 @@ G_BEGIN_DECLS
gboolean glib_should_use_portal (void);
gboolean glib_network_available_in_sandbox (void);
-gboolean glib_has_dconf_access_in_sandbox (void);
G_END_DECLS
diff --git a/gio/gproxyaddressenumerator.h b/gio/gproxyaddressenumerator.h
index de9fa833e..470f1dc66 100644
--- a/gio/gproxyaddressenumerator.h
+++ b/gio/gproxyaddressenumerator.h
@@ -40,7 +40,7 @@ G_BEGIN_DECLS
* GProxyAddressEnumerator:
*
* A subclass of #GSocketAddressEnumerator that takes another address
- * enumerator and wraps its results in #GProxyAddresses as
+ * enumerator and wraps each of its results in a #GProxyAddress as
* directed by the default #GProxyResolver.
*/
diff --git a/gio/gresolver.c b/gio/gresolver.c
index 6a33634c5..7f064322b 100644
--- a/gio/gresolver.c
+++ b/gio/gresolver.c
@@ -340,9 +340,18 @@ handle_ip_address (const char *hostname,
if (inet_aton (hostname, &ip4addr))
#endif
{
+#ifdef G_OS_WIN32
+ gchar *error_message = g_win32_error_message (WSAHOST_NOT_FOUND);
+#else
+ gchar *error_message = g_locale_to_utf8 (gai_strerror (EAI_NONAME), -1, NULL, NULL, NULL);
+ if (error_message == NULL)
+ error_message = g_strdup ("[Invalid UTF-8]");
+#endif
g_set_error (error, G_RESOLVER_ERROR, G_RESOLVER_ERROR_NOT_FOUND,
_("Error resolving “%s”: %s"),
- hostname, gai_strerror (EAI_NONAME));
+ hostname, error_message);
+ g_free (error_message);
+
return TRUE;
}
diff --git a/gio/gschema.dtd b/gio/gschema.dtd
index 3a903e7ab..1599f8de7 100644
--- a/gio/gschema.dtd
+++ b/gio/gschema.dtd
@@ -62,8 +62,7 @@
<!ELEMENT aliases (alias+) >
<!-- each alias element specifies an alias for one of the possible values -->
<!ELEMENT alias EMPTY >
-<!ATTLIST alias value CDATA #REQUIRED
- target CDATA #REQUIRED >
+<!ATTLIST alias value CDATA #REQUIRED >
<!ELEMENT child EMPTY >
<!ATTLIST child name CDATA #REQUIRED
diff --git a/gio/gsettingsbackend.c b/gio/gsettingsbackend.c
index f53a02392..18026ae56 100644
--- a/gio/gsettingsbackend.c
+++ b/gio/gsettingsbackend.c
@@ -122,13 +122,7 @@ is_path (const gchar *path)
struct _GSettingsBackendWatch
{
- /* Always access the target via the weak reference */
- GWeakRef target;
- /* The pointer is only for comparison from the weak notify,
- * at which point the target might already be close to
- * destroyed. It's not safe to use it for anything anymore
- * at that point */
- GObject *target_ptr;
+ GObject *target;
const GSettingsListenerVTable *vtable;
GMainContext *context;
GSettingsBackendWatch *next;
@@ -143,7 +137,7 @@ struct _GSettingsBackendClosure
gchar **names);
GMainContext *context;
- GObject *target;
+ GWeakRef *target_ref;
GSettingsBackend *backend;
gchar *name;
gpointer origin_tag;
@@ -160,12 +154,11 @@ g_settings_backend_watch_weak_notify (gpointer data,
/* search and remove */
g_mutex_lock (&backend->priv->lock);
for (ptr = &backend->priv->watches; *ptr; ptr = &(*ptr)->next)
- if ((*ptr)->target_ptr == where_the_object_was)
+ if ((*ptr)->target == where_the_object_was)
{
GSettingsBackendWatch *tmp = *ptr;
*ptr = tmp->next;
- g_weak_ref_clear (&tmp->target);
g_slice_free (GSettingsBackendWatch, tmp);
g_mutex_unlock (&backend->priv->lock);
@@ -215,10 +208,9 @@ g_settings_backend_watch (GSettingsBackend *backend,
* GSettings object in a thread other than the one that is doing the
* dispatching is as follows:
*
- * 1) hold a strong reference on the GSettings during an outstanding
+ * 1) hold a thread-safe GWeakRef on the GSettings during an outstanding
* dispatch. This ensures that the delivery is always possible while
- * the GSettings object is alive, and if this was the last reference
- * then it will be dropped from the dispatch thread.
+ * the GSettings object is alive.
*
* 2) hold a weak reference on the GSettings at other times. This
* allows us to receive early notification of pending destruction
@@ -243,8 +235,7 @@ g_settings_backend_watch (GSettingsBackend *backend,
watch = g_slice_new (GSettingsBackendWatch);
watch->context = context;
watch->vtable = vtable;
- g_weak_ref_init (&watch->target, target);
- watch->target_ptr = target;
+ watch->target = target;
g_object_weak_ref (target, g_settings_backend_watch_weak_notify, backend);
/* linked list prepend */
@@ -269,14 +260,20 @@ static gboolean
g_settings_backend_invoke_closure (gpointer user_data)
{
GSettingsBackendClosure *closure = user_data;
+ GObject *target = g_weak_ref_get (closure->target_ref);
- closure->function (closure->target, closure->backend, closure->name,
- closure->origin_tag, closure->names);
+ if (target)
+ {
+ closure->function (target, closure->backend, closure->name,
+ closure->origin_tag, closure->names);
+ g_object_unref (target);
+ }
if (closure->context)
g_main_context_unref (closure->context);
g_object_unref (closure->backend);
- g_object_unref (closure->target);
+ g_weak_ref_clear (closure->target_ref);
+ g_free (closure->target_ref);
g_strfreev (closure->names);
g_free (closure->name);
@@ -307,18 +304,14 @@ g_settings_backend_dispatch_signal (GSettingsBackend *backend,
for (watch = backend->priv->watches; watch; watch = watch->next)
{
GSettingsBackendClosure *closure;
- GObject *target = g_weak_ref_get (&watch->target);
-
- /* If the target was destroyed in the meantime, just skip it here */
- if (!target)
- continue;
closure = g_slice_new (GSettingsBackendClosure);
closure->context = watch->context;
if (closure->context)
g_main_context_ref (closure->context);
closure->backend = g_object_ref (backend);
- closure->target = g_steal_pointer (&target);
+ closure->target_ref = g_new (GWeakRef, 1);
+ g_weak_ref_init (closure->target_ref, watch->target);
closure->function = G_STRUCT_MEMBER (void *, watch->vtable,
function_offset);
closure->name = g_strdup (name);
diff --git a/gio/gsettingsschema.c b/gio/gsettingsschema.c
index 60b3fe0b3..f7c50c210 100644
--- a/gio/gsettingsschema.c
+++ b/gio/gsettingsschema.c
@@ -1455,7 +1455,7 @@ gint
g_settings_schema_key_to_enum (GSettingsSchemaKey *key,
GVariant *value)
{
- gboolean it_worked;
+ gboolean it_worked G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
guint result;
it_worked = strinfo_enum_from_string (key->strinfo, key->strinfo_length,
@@ -1499,7 +1499,7 @@ g_settings_schema_key_to_flags (GSettingsSchemaKey *key,
g_variant_iter_init (&iter, value);
while (g_variant_iter_next (&iter, "&s", &flag))
{
- gboolean it_worked;
+ gboolean it_worked G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
guint flag_value;
it_worked = strinfo_enum_from_string (key->strinfo, key->strinfo_length, flag, &flag_value);
diff --git a/gio/gsocket.c b/gio/gsocket.c
index fe869f5fb..d4372c544 100644
--- a/gio/gsocket.c
+++ b/gio/gsocket.c
@@ -5748,13 +5748,6 @@ g_socket_receive_message (GSocket *socket,
* the %G_IO_ERROR_NOT_SUPPORTED error. On Linux this is implemented
* by reading the %SO_PEERCRED option on the underlying socket.
*
- * This method can be expected to be available on the following platforms:
- *
- * - Linux since GLib 2.26
- * - OpenBSD since GLib 2.30
- * - Solaris, Illumos and OpenSolaris since GLib 2.40
- * - NetBSD since GLib 2.42
- *
* Other ways to obtain credentials from a foreign peer includes the
* #GUnixCredentialsMessage type and
* g_unix_connection_send_credentials() /
diff --git a/gio/gsocketaddressenumerator.c b/gio/gsocketaddressenumerator.c
index 3defc7f89..ebbb5decf 100644
--- a/gio/gsocketaddressenumerator.c
+++ b/gio/gsocketaddressenumerator.c
@@ -30,7 +30,7 @@
* #GSocketAddressEnumerator is an enumerator type for #GSocketAddress
* instances. It is returned by enumeration functions such as
* g_socket_connectable_enumerate(), which returns a #GSocketAddressEnumerator
- * to list all the #GSocketAddresses which could be used to connect to that
+ * to list each #GSocketAddress which could be used to connect to that
* #GSocketConnectable.
*
* Enumeration is typically a blocking operation, so the asynchronous methods
diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c
index 81767c0d6..83cb945c7 100644
--- a/gio/gsocketclient.c
+++ b/gio/gsocketclient.c
@@ -457,7 +457,7 @@ g_socket_client_get_protocol (GSocketClient *client)
* The sockets created by this object will use of the specified
* protocol.
*
- * If @protocol is %0 that means to use the default
+ * If @protocol is %G_SOCKET_PROTOCOL_DEFAULT that means to use the default
* protocol for the socket family and type.
*
* Since: 2.22
@@ -1006,6 +1006,7 @@ g_socket_client_connect (GSocketClient *client,
if (g_cancellable_is_cancelled (cancellable))
{
g_clear_error (error);
+ g_clear_error (&last_error);
g_cancellable_set_error_if_cancelled (cancellable, error);
break;
}
@@ -1426,24 +1427,15 @@ g_socket_client_async_connect_complete (GSocketClientAsyncConnectData *data)
data->connection = (GIOStream *)wrapper_connection;
}
- if (!data->completed)
+ if (!g_task_return_error_if_cancelled (data->task))
{
- GError *error = NULL;
-
- if (g_cancellable_set_error_if_cancelled (g_task_get_cancellable (data->task), &error))
- {
- g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
- g_task_return_error (data->task, g_steal_pointer (&error));
- }
- else
- {
- g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, data->connection);
- g_task_return_pointer (data->task, g_steal_pointer (&data->connection), g_object_unref);
- }
-
- data->completed = TRUE;
+ g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, data->connection);
+ g_task_return_pointer (data->task, g_steal_pointer (&data->connection), g_object_unref);
}
+ else
+ g_socket_client_emit_event (data->client, G_SOCKET_CLIENT_COMPLETE, data->connectable, NULL);
+ data->completed = TRUE;
g_object_unref (data->task);
}
@@ -1615,7 +1607,6 @@ g_socket_client_connected_callback (GObject *source,
set_last_error (data, error);
connection_attempt_remove (attempt);
enumerator_next_async (data, FALSE);
- connection_attempt_unref (attempt);
}
else
{
diff --git a/gio/gsocketconnectable.c b/gio/gsocketconnectable.c
index 76f349faf..e999e659c 100644
--- a/gio/gsocketconnectable.c
+++ b/gio/gsocketconnectable.c
@@ -121,7 +121,7 @@ g_socket_connectable_enumerate (GSocketConnectable *connectable)
* @connectable: a #GSocketConnectable
*
* Creates a #GSocketAddressEnumerator for @connectable that will
- * return #GProxyAddresses for addresses that you must connect
+ * return a #GProxyAddress for each of its addresses that you must connect
* to via a proxy.
*
* If @connectable does not implement
diff --git a/gio/gsocketconnectable.h b/gio/gsocketconnectable.h
index 6528d4936..da882143a 100644
--- a/gio/gsocketconnectable.h
+++ b/gio/gsocketconnectable.h
@@ -35,7 +35,7 @@ G_BEGIN_DECLS
/**
* GSocketConnectable:
*
- * Interface for objects that contain or generate #GSocketAddresses.
+ * Interface for objects that contain or generate a #GSocketAddress.
*/
typedef struct _GSocketConnectableIface GSocketConnectableIface;
diff --git a/gio/gsocketconnection.c b/gio/gsocketconnection.c
index 5fab8f4f7..37d5d330c 100644
--- a/gio/gsocketconnection.c
+++ b/gio/gsocketconnection.c
@@ -389,7 +389,9 @@ g_socket_connection_set_property (GObject *object,
static void
g_socket_connection_constructed (GObject *object)
{
+#ifndef G_DISABLE_ASSERT
GSocketConnection *connection = G_SOCKET_CONNECTION (object);
+#endif
g_assert (connection->priv->socket != NULL);
}
diff --git a/gio/gsubprocess.c b/gio/gsubprocess.c
index dcdb84d58..7630c7b45 100644
--- a/gio/gsubprocess.c
+++ b/gio/gsubprocess.c
@@ -575,7 +575,7 @@ initable_init (GInitable *initable,
{
guint64 identifier;
- gint s;
+ gint s G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
#ifdef G_OS_WIN32
identifier = (guint64) GetProcessId (self->pid);
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index 9b7c396a1..7691b9124 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -154,11 +154,20 @@ do_lookup_by_name (GTask *task,
}
else
{
+#ifdef G_OS_WIN32
+ gchar *error_message = g_win32_error_message (WSAGetLastError ());
+#else
+ gchar *error_message = g_locale_to_utf8 (gai_strerror (retval), -1, NULL, NULL, NULL);
+ if (error_message == NULL)
+ error_message = g_strdup ("[Invalid UTF-8]");
+#endif
+
g_task_return_new_error (task,
G_RESOLVER_ERROR,
g_resolver_error_from_addrinfo_error (retval),
_("Error resolving “%s”: %s"),
- hostname, gai_strerror (retval));
+ hostname, error_message);
+ g_free (error_message);
}
if (res)
@@ -310,14 +319,23 @@ do_lookup_by_address (GTask *task,
{
gchar *phys;
+#ifdef G_OS_WIN32
+ gchar *error_message = g_win32_error_message (WSAGetLastError ());
+#else
+ gchar *error_message = g_locale_to_utf8 (gai_strerror (retval), -1, NULL, NULL, NULL);
+ if (error_message == NULL)
+ error_message = g_strdup ("[Invalid UTF-8]");
+#endif
+
phys = g_inet_address_to_string (address);
g_task_return_new_error (task,
G_RESOLVER_ERROR,
g_resolver_error_from_addrinfo_error (retval),
_("Error reverse-resolving “%s”: %s"),
phys ? phys : "(unknown)",
- gai_strerror (retval));
+ error_message);
g_free (phys);
+ g_free (error_message);
}
}
diff --git a/gio/gthreadedsocketservice.c b/gio/gthreadedsocketservice.c
index e0c111c10..b330196e3 100644
--- a/gio/gthreadedsocketservice.c
+++ b/gio/gthreadedsocketservice.c
@@ -62,42 +62,45 @@ G_DEFINE_TYPE_WITH_PRIVATE (GThreadedSocketService,
g_threaded_socket_service,
G_TYPE_SOCKET_SERVICE)
-enum
+typedef enum
{
- PROP_0,
- PROP_MAX_THREADS
-};
+ PROP_MAX_THREADS = 1,
+} GThreadedSocketServiceProperty;
G_LOCK_DEFINE_STATIC(job_count);
typedef struct
{
- GSocketConnection *connection;
- GObject *source_object;
+ GThreadedSocketService *service; /* (owned) */
+ GSocketConnection *connection; /* (owned) */
+ GObject *source_object; /* (owned) (nullable) */
} GThreadedSocketServiceData;
static void
-g_threaded_socket_service_func (gpointer _data,
- gpointer user_data)
+g_threaded_socket_service_data_free (GThreadedSocketServiceData *data)
{
- GThreadedSocketService *threaded = user_data;
- GThreadedSocketServiceData *data = _data;
+ g_clear_object (&data->service);
+ g_clear_object (&data->connection);
+ g_clear_object (&data->source_object);
+ g_slice_free (GThreadedSocketServiceData, data);
+}
+
+static void
+g_threaded_socket_service_func (gpointer job_data,
+ gpointer user_data)
+{
+ GThreadedSocketServiceData *data = job_data;
gboolean result;
- g_signal_emit (threaded, g_threaded_socket_service_run_signal,
+ g_signal_emit (data->service, g_threaded_socket_service_run_signal,
0, data->connection, data->source_object, &result);
- g_object_unref (data->connection);
- if (data->source_object)
- g_object_unref (data->source_object);
- g_slice_free (GThreadedSocketServiceData, data);
-
G_LOCK (job_count);
- if (threaded->priv->job_count-- == threaded->priv->max_threads)
- g_socket_service_start (G_SOCKET_SERVICE (threaded));
+ if (data->service->priv->job_count-- == data->service->priv->max_threads)
+ g_socket_service_start (G_SOCKET_SERVICE (data->service));
G_UNLOCK (job_count);
- g_object_unref (threaded);
+ g_threaded_socket_service_data_free (data);
}
static gboolean
@@ -107,28 +110,27 @@ g_threaded_socket_service_incoming (GSocketService *service,
{
GThreadedSocketService *threaded;
GThreadedSocketServiceData *data;
+ GError *local_error = NULL;
threaded = G_THREADED_SOCKET_SERVICE (service);
- data = g_slice_new (GThreadedSocketServiceData);
-
- /* Ref the socket service for the thread */
- g_object_ref (service);
-
+ data = g_slice_new0 (GThreadedSocketServiceData);
+ data->service = g_object_ref (threaded);
data->connection = g_object_ref (connection);
- if (source_object)
- data->source_object = g_object_ref (source_object);
- else
- data->source_object = NULL;
+ data->source_object = (source_object != NULL) ? g_object_ref (source_object) : NULL;
G_LOCK (job_count);
if (++threaded->priv->job_count == threaded->priv->max_threads)
g_socket_service_stop (service);
G_UNLOCK (job_count);
- g_thread_pool_push (threaded->priv->thread_pool, data, NULL);
-
+ if (!g_thread_pool_push (threaded->priv->thread_pool, data, &local_error))
+ {
+ g_warning ("Error handling incoming socket: %s", local_error->message);
+ g_threaded_socket_service_data_free (data);
+ }
+ g_clear_error (&local_error);
return FALSE;
}
@@ -147,7 +149,7 @@ g_threaded_socket_service_constructed (GObject *object)
service->priv->thread_pool =
g_thread_pool_new (g_threaded_socket_service_func,
- service,
+ NULL,
service->priv->max_threads,
FALSE,
NULL);
@@ -159,6 +161,8 @@ g_threaded_socket_service_finalize (GObject *object)
{
GThreadedSocketService *service = G_THREADED_SOCKET_SERVICE (object);
+ /* All jobs in the pool hold a reference to this #GThreadedSocketService, so
+ * this should only be called once the pool is empty: */
g_thread_pool_free (service->priv->thread_pool, FALSE, FALSE);
G_OBJECT_CLASS (g_threaded_socket_service_parent_class)
@@ -173,7 +177,7 @@ g_threaded_socket_service_get_property (GObject *object,
{
GThreadedSocketService *service = G_THREADED_SOCKET_SERVICE (object);
- switch (prop_id)
+ switch ((GThreadedSocketServiceProperty) prop_id)
{
case PROP_MAX_THREADS:
g_value_set_int (value, service->priv->max_threads);
@@ -192,7 +196,7 @@ g_threaded_socket_service_set_property (GObject *object,
{
GThreadedSocketService *service = G_THREADED_SOCKET_SERVICE (object);
- switch (prop_id)
+ switch ((GThreadedSocketServiceProperty) prop_id)
{
case PROP_MAX_THREADS:
service->priv->max_threads = g_value_get_int (value);
diff --git a/gio/gtlsdatabase.c b/gio/gtlsdatabase.c
index 821af97e0..58da11df3 100644
--- a/gio/gtlsdatabase.c
+++ b/gio/gtlsdatabase.c
@@ -744,7 +744,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_by_handle() for more information.
+ * g_tls_database_lookup_certificate_for_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/gunixconnection.c b/gio/gunixconnection.c
index e9e2f75f0..c85ac3650 100644
--- a/gio/gunixconnection.c
+++ b/gio/gunixconnection.c
@@ -300,14 +300,6 @@ gboolean g_unix_connection_create_pair (GUnixCo
* byte to the stream, as this is required for credentials passing to
* work on some implementations.
*
- * This method can be expected to be available on the following platforms:
- *
- * - Linux since GLib 2.26
- * - FreeBSD since GLib 2.26
- * - GNU/kFreeBSD since GLib 2.36
- * - Solaris, Illumos and OpenSolaris since GLib 2.40
- * - GNU/Hurd since GLib 2.40
- *
* Other ways to exchange credentials with a foreign peer includes the
* #GUnixCredentialsMessage type and g_socket_get_credentials() function.
*
@@ -458,14 +450,6 @@ g_unix_connection_send_credentials_finish (GUnixConnection *connection,
* single byte from the stream, as this is required for credentials
* passing to work on some implementations.
*
- * This method can be expected to be available on the following platforms:
- *
- * - Linux since GLib 2.26
- * - FreeBSD since GLib 2.26
- * - GNU/kFreeBSD since GLib 2.36
- * - Solaris, Illumos and OpenSolaris since GLib 2.40
- * - GNU/Hurd since GLib 2.40
- *
* Other ways to exchange credentials with a foreign peer includes the
* #GUnixCredentialsMessage type and g_socket_get_credentials() function.
*
diff --git a/gio/gunixfdlist.c b/gio/gunixfdlist.c
index 6cb7df684..e8c4ac55e 100644
--- a/gio/gunixfdlist.c
+++ b/gio/gunixfdlist.c
@@ -23,7 +23,7 @@
* descriptors that it contains, closing them when finalized.
*
* It may be wrapped in a #GUnixFDMessage and sent over a #GSocket in
- * the %G_SOCKET_ADDRESS_UNIX family by using g_socket_send_message()
+ * the %G_SOCKET_FAMILY_UNIX family by using g_socket_send_message()
* and received using g_socket_receive_message().
*
* Note that `<gio/gunixfdlist.h>` belongs to the UNIX-specific GIO
diff --git a/gio/gunixfdmessage.c b/gio/gunixfdmessage.c
index b80283b0b..3324651f7 100644
--- a/gio/gunixfdmessage.c
+++ b/gio/gunixfdmessage.c
@@ -22,7 +22,7 @@
* This #GSocketControlMessage contains a #GUnixFDList.
* It may be sent using g_socket_send_message() and received using
* g_socket_receive_message() over UNIX sockets (ie: sockets in the
- * %G_SOCKET_ADDRESS_UNIX family). The file descriptors are copied
+ * %G_SOCKET_FAMILY_UNIX family). The file descriptors are copied
* between processes by the kernel.
*
* For an easier way to send and receive file descriptors over
diff --git a/gio/gunixmounts.c b/gio/gunixmounts.c
index cc905f2fc..44a4b113d 100644
--- a/gio/gunixmounts.c
+++ b/gio/gunixmounts.c
@@ -1552,6 +1552,9 @@ g_unix_mounts_get (guint64 *time_read)
* is set, it will be filled with a unix timestamp for checking
* if the mounts have changed since with g_unix_mounts_changed_since().
*
+ * If more mounts have the same mount path, the last matching mount
+ * is returned.
+ *
* Returns: (transfer full): a #GUnixMountEntry.
**/
GUnixMountEntry *
@@ -1568,8 +1571,13 @@ g_unix_mount_at (const char *mount_path,
{
mount_entry = l->data;
- if (!found && strcmp (mount_path, mount_entry->mount_path) == 0)
- found = mount_entry;
+ if (strcmp (mount_path, mount_entry->mount_path) == 0)
+ {
+ if (found != NULL)
+ g_unix_mount_free (found);
+
+ found = mount_entry;
+ }
else
g_unix_mount_free (mount_entry);
}
@@ -1587,6 +1595,9 @@ g_unix_mount_at (const char *mount_path,
* is set, it will be filled with a unix timestamp for checking
* if the mounts have changed since with g_unix_mounts_changed_since().
*
+ * If more mounts have the same mount path, the last matching mount
+ * is returned.
+ *
* Returns: (transfer full): a #GUnixMountEntry.
*
* Since: 2.52
diff --git a/gio/gvfs.c b/gio/gvfs.c
index 3475624cf..5805a7904 100644
--- a/gio/gvfs.c
+++ b/gio/gvfs.c
@@ -236,7 +236,7 @@ g_vfs_get_file_for_uri (GVfs *vfs,
const char *uri)
{
GVfsClass *class;
- GFile *ret = NULL;
+ GFile *ret;
g_return_val_if_fail (G_IS_VFS (vfs), NULL);
g_return_val_if_fail (uri != NULL, NULL);
@@ -244,12 +244,10 @@ g_vfs_get_file_for_uri (GVfs *vfs,
class = G_VFS_GET_CLASS (vfs);
ret = get_file_for_uri_internal (vfs, uri);
- if (!ret)
- ret = (* class->get_file_for_uri) (vfs, uri);
-
- g_assert (ret != NULL);
+ if (ret)
+ return ret;
- return g_steal_pointer (&ret);
+ return (* class->get_file_for_uri) (vfs, uri);
}
/**
diff --git a/gio/inotify/ginotifyfilemonitor.c b/gio/inotify/ginotifyfilemonitor.c
index 4c95e87fb..b2364cc2c 100644
--- a/gio/inotify/ginotifyfilemonitor.c
+++ b/gio/inotify/ginotifyfilemonitor.c
@@ -55,7 +55,7 @@ g_inotify_file_monitor_start (GLocalFileMonitor *local_monitor,
GFileMonitorSource *source)
{
GInotifyFileMonitor *inotify_monitor = G_INOTIFY_FILE_MONITOR (local_monitor);
- gboolean success;
+ gboolean success G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
/* should already have been called, from is_supported() */
success = _ih_startup ();
@@ -83,7 +83,9 @@ g_inotify_file_monitor_cancel (GFileMonitor *monitor)
static void
g_inotify_file_monitor_finalize (GObject *object)
{
+#ifndef G_DISABLE_ASSERT
GInotifyFileMonitor *inotify_monitor = G_INOTIFY_FILE_MONITOR (object);
+#endif
/* must surely have been cancelled already */
g_assert (!inotify_monitor->sub);
diff --git a/gio/tests/.gitignore b/gio/tests/.gitignore
index 69e02d573..e6c9124a4 100644
--- a/gio/tests/.gitignore
+++ b/gio/tests/.gitignore
@@ -76,7 +76,7 @@ gdbus-test-codegen-old
gdbus-test-fixture
gdbus-testserver
gdbus-threading
-gdbus-unix-addresses
+gdbus-address-get-session
glistmodel
gio-du
giomodule
diff --git a/gio/tests/actions.c b/gio/tests/actions.c
index 1e175c625..3d438fc5d 100644
--- a/gio/tests/actions.c
+++ b/gio/tests/actions.c
@@ -36,11 +36,11 @@ test_basic (void)
GVariant *state;
action = g_simple_action_new ("foo", NULL);
- g_assert (g_action_get_enabled (G_ACTION (action)));
- g_assert (g_action_get_parameter_type (G_ACTION (action)) == NULL);
- g_assert (g_action_get_state_type (G_ACTION (action)) == NULL);
- g_assert (g_action_get_state_hint (G_ACTION (action)) == NULL);
- g_assert (g_action_get_state (G_ACTION (action)) == NULL);
+ g_assert_true (g_action_get_enabled (G_ACTION (action)));
+ g_assert_null (g_action_get_parameter_type (G_ACTION (action)));
+ g_assert_null (g_action_get_state_type (G_ACTION (action)));
+ g_assert_null (g_action_get_state_hint (G_ACTION (action)));
+ g_assert_null (g_action_get_state (G_ACTION (action)));
g_object_get (action,
"name", &name,
"parameter-type", &parameter_type,
@@ -49,21 +49,21 @@ test_basic (void)
"state", &state,
NULL);
g_assert_cmpstr (name, ==, "foo");
- g_assert (parameter_type == NULL);
- g_assert (enabled);
- g_assert (state_type == NULL);
- g_assert (state == NULL);
+ g_assert_null (parameter_type);
+ g_assert_true (enabled);
+ g_assert_null (state_type);
+ g_assert_null (state);
g_free (name);
g_signal_connect (action, "activate", G_CALLBACK (activate), &a);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
g_action_activate (G_ACTION (action), NULL);
- g_assert (a.did_run);
+ g_assert_true (a.did_run);
a.did_run = FALSE;
g_simple_action_set_enabled (action, FALSE);
g_action_activate (G_ACTION (action), NULL);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
if (g_test_undefined ())
{
@@ -74,19 +74,19 @@ test_basic (void)
}
g_object_unref (action);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
action = g_simple_action_new ("foo", G_VARIANT_TYPE_STRING);
- g_assert (g_action_get_enabled (G_ACTION (action)));
- g_assert (g_variant_type_equal (g_action_get_parameter_type (G_ACTION (action)), G_VARIANT_TYPE_STRING));
- g_assert (g_action_get_state_type (G_ACTION (action)) == NULL);
- g_assert (g_action_get_state_hint (G_ACTION (action)) == NULL);
- g_assert (g_action_get_state (G_ACTION (action)) == NULL);
+ g_assert_true (g_action_get_enabled (G_ACTION (action)));
+ g_assert_true (g_variant_type_equal (g_action_get_parameter_type (G_ACTION (action)), G_VARIANT_TYPE_STRING));
+ g_assert_null (g_action_get_state_type (G_ACTION (action)));
+ g_assert_null (g_action_get_state_hint (G_ACTION (action)));
+ g_assert_null (g_action_get_state (G_ACTION (action)));
g_signal_connect (action, "activate", G_CALLBACK (activate), &a);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
g_action_activate (G_ACTION (action), g_variant_new_string ("Hello world"));
- g_assert (a.did_run);
+ g_assert_true (a.did_run);
g_assert_cmpstr (g_variant_get_string (a.params, NULL), ==, "Hello world");
g_variant_unref (a.params);
a.did_run = FALSE;
@@ -100,18 +100,18 @@ test_basic (void)
}
g_object_unref (action);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
}
static void
test_name (void)
{
- g_assert (!g_action_name_is_valid (""));
- g_assert (!g_action_name_is_valid ("("));
- g_assert (!g_action_name_is_valid ("%abc"));
- g_assert (!g_action_name_is_valid ("$x1"));
- g_assert (g_action_name_is_valid ("abc.def"));
- g_assert (g_action_name_is_valid ("ABC-DEF"));
+ g_assert_false (g_action_name_is_valid (""));
+ g_assert_false (g_action_name_is_valid ("("));
+ g_assert_false (g_action_name_is_valid ("%abc"));
+ g_assert_false (g_action_name_is_valid ("$x1"));
+ g_assert_true (g_action_name_is_valid ("abc.def"));
+ g_assert_true (g_action_name_is_valid ("ABC-DEF"));
}
static gboolean
@@ -193,41 +193,41 @@ test_simple_group (void)
simple = g_simple_action_new ("foo", NULL);
g_signal_connect (simple, "activate", G_CALLBACK (activate), &a);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
g_action_activate (G_ACTION (simple), NULL);
- g_assert (a.did_run);
+ g_assert_true (a.did_run);
a.did_run = FALSE;
group = g_simple_action_group_new ();
g_simple_action_group_insert (group, G_ACTION (simple));
g_object_unref (simple);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
g_action_group_activate_action (G_ACTION_GROUP (group), "foo", NULL);
- g_assert (a.did_run);
+ g_assert_true (a.did_run);
simple = g_simple_action_new_stateful ("bar", G_VARIANT_TYPE_STRING, g_variant_new_string ("hihi"));
g_simple_action_group_insert (group, G_ACTION (simple));
g_object_unref (simple);
- g_assert (g_action_group_has_action (G_ACTION_GROUP (group), "foo"));
- g_assert (g_action_group_has_action (G_ACTION_GROUP (group), "bar"));
- g_assert (!g_action_group_has_action (G_ACTION_GROUP (group), "baz"));
+ g_assert_true (g_action_group_has_action (G_ACTION_GROUP (group), "foo"));
+ g_assert_true (g_action_group_has_action (G_ACTION_GROUP (group), "bar"));
+ g_assert_false (g_action_group_has_action (G_ACTION_GROUP (group), "baz"));
actions = g_action_group_list_actions (G_ACTION_GROUP (group));
g_assert_cmpint (g_strv_length (actions), ==, 2);
- g_assert (strv_set_equal (actions, "foo", "bar", NULL));
+ g_assert_true (strv_set_equal (actions, "foo", "bar", NULL));
g_strfreev (actions);
- g_assert (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "foo"));
- g_assert (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
- g_assert (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "foo") == NULL);
- g_assert (g_variant_type_equal (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
- g_assert (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "foo") == NULL);
- g_assert (g_variant_type_equal (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
- g_assert (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "foo") == NULL);
- g_assert (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "bar") == NULL);
- g_assert (g_action_group_get_action_state (G_ACTION_GROUP (group), "foo") == NULL);
+ g_assert_true (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "foo"));
+ g_assert_true (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
+ g_assert_null (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "foo"));
+ g_assert_true (g_variant_type_equal (g_action_group_get_action_parameter_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
+ g_assert_null (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "foo"));
+ g_assert_true (g_variant_type_equal (g_action_group_get_action_state_type (G_ACTION_GROUP (group), "bar"), G_VARIANT_TYPE_STRING));
+ g_assert_null (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "foo"));
+ g_assert_null (g_action_group_get_action_state_hint (G_ACTION_GROUP (group), "bar"));
+ g_assert_null (g_action_group_get_action_state (G_ACTION_GROUP (group), "foo"));
state = g_action_group_get_action_state (G_ACTION_GROUP (group), "bar");
- g_assert (g_variant_type_equal (g_variant_get_type (state), G_VARIANT_TYPE_STRING));
+ g_assert_true (g_variant_type_equal (g_variant_get_type (state), G_VARIANT_TYPE_STRING));
g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "hihi");
g_variant_unref (state);
@@ -238,13 +238,13 @@ test_simple_group (void)
action = g_simple_action_group_lookup (group, "bar");
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), FALSE);
- g_assert (!g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
+ g_assert_false (g_action_group_get_action_enabled (G_ACTION_GROUP (group), "bar"));
g_simple_action_group_remove (group, "bar");
action = g_simple_action_group_lookup (group, "foo");
g_assert_cmpstr (g_action_get_name (action), ==, "foo");
action = g_simple_action_group_lookup (group, "bar");
- g_assert (action == NULL);
+ g_assert_null (action);
simple = g_simple_action_new ("foo", NULL);
g_simple_action_group_insert (group, G_ACTION (simple));
@@ -252,7 +252,7 @@ test_simple_group (void)
a.did_run = FALSE;
g_object_unref (group);
- g_assert (!a.did_run);
+ g_assert_false (a.did_run);
}
G_GNUC_END_IGNORE_DEPRECATIONS
@@ -264,11 +264,11 @@ test_stateful (void)
GVariant *state;
action = g_simple_action_new_stateful ("foo", NULL, g_variant_new_string ("hihi"));
- g_assert (g_action_get_enabled (G_ACTION (action)));
- g_assert (g_action_get_parameter_type (G_ACTION (action)) == NULL);
- g_assert (g_action_get_state_hint (G_ACTION (action)) == NULL);
- g_assert (g_variant_type_equal (g_action_get_state_type (G_ACTION (action)),
- G_VARIANT_TYPE_STRING));
+ g_assert_true (g_action_get_enabled (G_ACTION (action)));
+ g_assert_null (g_action_get_parameter_type (G_ACTION (action)));
+ g_assert_null (g_action_get_state_hint (G_ACTION (action)));
+ g_assert_true (g_variant_type_equal (g_action_get_state_type (G_ACTION (action)),
+ G_VARIANT_TYPE_STRING));
state = g_action_get_state (G_ACTION (action));
g_assert_cmpstr (g_variant_get_string (state, NULL), ==, "hihi");
g_variant_unref (state);
@@ -319,12 +319,12 @@ test_default_activate (void)
action = g_simple_action_new_stateful ("foo", NULL, g_variant_new_boolean (FALSE));
g_action_activate (G_ACTION (action), NULL);
state = g_action_get_state (G_ACTION (action));
- g_assert (g_variant_get_boolean (state));
+ g_assert_true (g_variant_get_boolean (state));
g_variant_unref (state);
/* and back again */
g_action_activate (G_ACTION (action), NULL);
state = g_action_get_state (G_ACTION (action));
- g_assert (!g_variant_get_boolean (state));
+ g_assert_false (g_variant_get_boolean (state));
g_variant_unref (state);
g_object_unref (action);
}
@@ -337,8 +337,8 @@ activate_foo (GSimpleAction *simple,
GVariant *parameter,
gpointer user_data)
{
- g_assert (user_data == GINT_TO_POINTER (123));
- g_assert (parameter == NULL);
+ g_assert_true (user_data == GINT_TO_POINTER (123));
+ g_assert_null (parameter);
foo_activated = TRUE;
}
@@ -347,7 +347,7 @@ activate_bar (GSimpleAction *simple,
GVariant *parameter,
gpointer user_data)
{
- g_assert (user_data == GINT_TO_POINTER (123));
+ g_assert_true (user_data == GINT_TO_POINTER (123));
g_assert_cmpstr (g_variant_get_string (parameter, NULL), ==, "param");
bar_activated = TRUE;
}
@@ -385,16 +385,16 @@ test_entries (void)
G_N_ELEMENTS (entries),
GINT_TO_POINTER (123));
- g_assert (!foo_activated);
+ g_assert_false (foo_activated);
g_action_group_activate_action (G_ACTION_GROUP (actions), "foo", NULL);
- g_assert (foo_activated);
+ g_assert_true (foo_activated);
foo_activated = FALSE;
- g_assert (!bar_activated);
+ g_assert_false (bar_activated);
g_action_group_activate_action (G_ACTION_GROUP (actions), "bar",
g_variant_new_string ("param"));
- g_assert (bar_activated);
- g_assert (!foo_activated);
+ g_assert_true (bar_activated);
+ g_assert_false (foo_activated);
if (g_test_undefined ())
{
@@ -478,7 +478,7 @@ test_parse_detailed (void)
gchar *name;
success = g_action_parse_detailed_name (testcases[i].detailed, &name, &target, &error);
- g_assert (success == (error == NULL));
+ g_assert_true (success == (error == NULL));
if (success && testcases[i].expected_error)
g_error ("Unexpected success on '%s'. Expected error containing '%s'",
testcases[i].detailed, testcases[i].expected_error);
@@ -497,7 +497,7 @@ test_parse_detailed (void)
}
g_assert_cmpstr (name, ==, testcases[i].expected_name);
- g_assert ((target == NULL) == (testcases[i].expected_target == NULL));
+ g_assert_true ((target == NULL) == (testcases[i].expected_target == NULL));
if (success)
{
@@ -513,7 +513,7 @@ test_parse_detailed (void)
GVariant *expected;
expected = g_variant_parse (NULL, testcases[i].expected_target, NULL, NULL, NULL);
- g_assert (expected);
+ g_assert_true (expected);
g_assert_cmpvariant (expected, target);
g_variant_unref (expected);
@@ -659,7 +659,7 @@ list_cb (GObject *source,
gchar **actions;
v = g_dbus_connection_call_finish (bus, res, &error);
- g_assert (v);
+ g_assert_nonnull (v);
g_variant_get (v, "(^a&s)", &actions);
g_assert_cmpint (g_strv_length (actions), ==, G_N_ELEMENTS (exported_entries));
g_free (actions);
@@ -704,10 +704,10 @@ describe_cb (GObject *source,
GVariantIter *iter;
v = g_dbus_connection_call_finish (bus, res, &error);
- g_assert (v);
+ g_assert_nonnull (v);
/* FIXME: there's an extra level of tuplelization in here */
g_variant_get (v, "((bgav))", &enabled, &param, &iter);
- g_assert (enabled == TRUE);
+ g_assert_true (enabled);
g_assert_cmpstr (param, ==, "");
g_assert_cmpint (g_variant_iter_n_children (iter), ==, 0);
g_free (param);
@@ -791,8 +791,8 @@ test_dbus_export (void)
g_main_loop_run (loop);
/* test that the initial transfer works */
- g_assert (G_IS_DBUS_ACTION_GROUP (proxy));
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (G_IS_DBUS_ACTION_GROUP (proxy));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
/* test that various changes get propagated from group to proxy */
action = g_simple_action_new_stateful ("italic", NULL, g_variant_new_boolean (FALSE));
@@ -802,7 +802,7 @@ test_dbus_export (void)
g_timeout_add (100, stop_loop, loop);
g_main_loop_run (loop);
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
action = G_SIMPLE_ACTION (g_simple_action_group_lookup (group, "cut"));
g_simple_action_set_enabled (action, FALSE);
@@ -810,7 +810,7 @@ test_dbus_export (void)
g_timeout_add (100, stop_loop, loop);
g_main_loop_run (loop);
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
action = G_SIMPLE_ACTION (g_simple_action_group_lookup (group, "bold"));
g_simple_action_set_state (action, g_variant_new_boolean (FALSE));
@@ -818,14 +818,14 @@ test_dbus_export (void)
g_timeout_add (100, stop_loop, loop);
g_main_loop_run (loop);
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
g_simple_action_group_remove (group, "italic");
g_timeout_add (100, stop_loop, loop);
g_main_loop_run (loop);
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
/* test that activations and state changes propagate the other way */
@@ -836,7 +836,7 @@ test_dbus_export (void)
g_main_loop_run (loop);
g_assert_cmpint (activation_count ("copy"), ==, 1);
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
g_assert_cmpint (activation_count ("bold"), ==, 0);
g_action_group_activate_action (G_ACTION_GROUP (proxy), "bold", NULL);
@@ -845,9 +845,9 @@ test_dbus_export (void)
g_main_loop_run (loop);
g_assert_cmpint (activation_count ("bold"), ==, 1);
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
v = g_action_group_get_action_state (G_ACTION_GROUP (group), "bold");
- g_assert (g_variant_get_boolean (v));
+ g_assert_true (g_variant_get_boolean (v));
g_variant_unref (v);
g_action_group_change_action_state (G_ACTION_GROUP (proxy), "bold", g_variant_new_boolean (FALSE));
@@ -856,9 +856,9 @@ test_dbus_export (void)
g_main_loop_run (loop);
g_assert_cmpint (activation_count ("bold"), ==, 1);
- g_assert (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
+ g_assert_true (compare_action_groups (G_ACTION_GROUP (group), G_ACTION_GROUP (proxy)));
v = g_action_group_get_action_state (G_ACTION_GROUP (group), "bold");
- g_assert (!g_variant_get_boolean (v));
+ g_assert_false (g_variant_get_boolean (v));
g_variant_unref (v);
g_dbus_connection_unexport_action_group (bus, id);
@@ -980,7 +980,7 @@ state_changed (GActionGroup *group,
{
GString *string;
- g_assert (!state_change_log);
+ g_assert_false (state_change_log);
string = g_string_new (action_name);
g_string_append_c (string, ':');
@@ -1038,7 +1038,7 @@ test_property_actions (void)
action = g_property_action_new ("keepalive", app, "inactivity-timeout");
g_object_get (action, "name", &name, "parameter-type", &ptype, "enabled", &enabled, "state-type", &stype, "state", &state, NULL);
g_assert_cmpstr (name, ==, "keepalive");
- g_assert (enabled);
+ g_assert_true (enabled);
g_free (name);
g_variant_type_free (ptype);
g_variant_type_free (stype);
@@ -1112,24 +1112,24 @@ test_property_actions (void)
/* bool tests */
g_action_group_change_action_state (G_ACTION_GROUP (group), "tls", g_variant_new ("b", TRUE));
verify_changed ("tls:true");
- g_assert (g_socket_client_get_tls (client));
+ g_assert_true (g_socket_client_get_tls (client));
ensure_state (group, "tls", "true");
g_action_group_change_action_state (G_ACTION_GROUP (group), "disable-proxy", g_variant_new ("b", TRUE));
verify_changed ("disable-proxy:true");
ensure_state (group, "disable-proxy", "true");
- g_assert (!g_socket_client_get_enable_proxy (client));
+ g_assert_false (g_socket_client_get_enable_proxy (client));
/* test toggle true->false */
g_action_group_activate_action (G_ACTION_GROUP (group), "tls", NULL);
verify_changed ("tls:false");
- g_assert (!g_socket_client_get_tls (client));
+ g_assert_false (g_socket_client_get_tls (client));
ensure_state (group, "tls", "false");
/* and now back false->true */
g_action_group_activate_action (G_ACTION_GROUP (group), "tls", NULL);
verify_changed ("tls:true");
- g_assert (g_socket_client_get_tls (client));
+ g_assert_true (g_socket_client_get_tls (client));
ensure_state (group, "tls", "true");
g_socket_client_set_tls (client, FALSE);
@@ -1139,12 +1139,12 @@ test_property_actions (void)
/* now do the same for the inverted action */
g_action_group_activate_action (G_ACTION_GROUP (group), "disable-proxy", NULL);
verify_changed ("disable-proxy:false");
- g_assert (g_socket_client_get_enable_proxy (client));
+ g_assert_true (g_socket_client_get_enable_proxy (client));
ensure_state (group, "disable-proxy", "false");
g_action_group_activate_action (G_ACTION_GROUP (group), "disable-proxy", NULL);
verify_changed ("disable-proxy:true");
- g_assert (!g_socket_client_get_enable_proxy (client));
+ g_assert_false (g_socket_client_get_enable_proxy (client));
ensure_state (group, "disable-proxy", "true");
g_socket_client_set_enable_proxy (client, TRUE);
diff --git a/gio/tests/cancellable.c b/gio/tests/cancellable.c
index e06650ed8..044628228 100644
--- a/gio/tests/cancellable.c
+++ b/gio/tests/cancellable.c
@@ -216,12 +216,19 @@ test_cancel_multiple_concurrent (void)
g_main_loop_unref (loop);
}
+static void
+test_cancel_null (void)
+{
+ g_cancellable_cancel (NULL);
+}
+
int
main (int argc, char *argv[])
{
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/cancellable/multiple-concurrent", test_cancel_multiple_concurrent);
+ g_test_add_func ("/cancellable/null", test_cancel_null);
return g_test_run ();
}
diff --git a/gio/tests/dbus-launch.c b/gio/tests/dbus-launch.c
index 90d8d069e..ef5721941 100644
--- a/gio/tests/dbus-launch.c
+++ b/gio/tests/dbus-launch.c
@@ -1,5 +1,5 @@
/*
- * Mock version of dbus-launch, for gdbus-unix-addresses test
+ * Mock version of dbus-launch, for gdbus-address-get-session test
*
* Copyright © 2015 Collabora Ltd.
*
diff --git a/gio/tests/file.c b/gio/tests/file.c
index 658d17549..efb2eaadd 100644
--- a/gio/tests/file.c
+++ b/gio/tests/file.c
@@ -523,6 +523,11 @@ test_create_delete (gconstpointer d)
g_free (data);
}
+static const gchar *original_data =
+ "/**\n"
+ " * g_file_replace_contents_async:\n"
+ "**/\n";
+
static const gchar *replace_data =
"/**\n"
" * g_file_replace_contents_async:\n"
@@ -675,7 +680,8 @@ test_replace_cancel (void)
GFileInfo *info;
GCancellable *cancellable;
gchar *path;
- gsize nwrote;
+ gchar *contents;
+ gsize nwrote, length;
guint count;
GError *error = NULL;
@@ -688,8 +694,8 @@ test_replace_cancel (void)
file = g_file_get_child (tmpdir, "file");
g_file_replace_contents (file,
- replace_data,
- strlen (replace_data),
+ original_data,
+ strlen (original_data),
NULL, FALSE, 0, NULL,
NULL, &error);
g_assert_no_error (error);
@@ -777,6 +783,17 @@ test_replace_cancel (void)
g_object_unref (cancellable);
g_object_unref (ostream);
+ /* Make sure that file contents wasn't actually replaced. */
+ g_file_load_contents (file,
+ NULL,
+ &contents,
+ &length,
+ NULL,
+ &error);
+ g_assert_no_error (error);
+ g_assert_cmpstr (contents, ==, original_data);
+ g_free (contents);
+
g_file_delete (file, NULL, &error);
g_assert_no_error (error);
g_object_unref (file);
diff --git a/gio/tests/g-file-info.c b/gio/tests/g-file-info.c
index 28a2426a8..f21d1b7e2 100644
--- a/gio/tests/g-file-info.c
+++ b/gio/tests/g-file-info.c
@@ -291,10 +291,10 @@ test_internal_enhanced_stdio (void)
ft_programdata = g_file_info_get_file_type (fi_programdata);
ft_commondata = g_file_info_get_file_type (fi_commondata);
- g_assert_cmpint (ft_allusers, ==, G_FILE_TYPE_SYMBOLIC_LINK);
+ g_assert_cmpint (ft_allusers, ==, G_FILE_TYPE_DIRECTORY);
g_assert_cmpint (ft_allusers_target, ==, G_FILE_TYPE_DIRECTORY);
g_assert_cmpint (ft_programdata, ==, G_FILE_TYPE_DIRECTORY);
- g_assert_cmpint (ft_commondata, ==, G_FILE_TYPE_SYMBOLIC_LINK);
+ g_assert_cmpint (ft_commondata, ==, G_FILE_TYPE_DIRECTORY);
allusers_is_symlink = g_file_info_get_attribute_boolean (fi_allusers, G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK);
allusers_reparse_tag = g_file_info_get_attribute_uint32 (fi_allusers, G_FILE_ATTRIBUTE_DOS_REPARSE_POINT_TAG);
diff --git a/gio/tests/gdbus-unix-addresses.c b/gio/tests/gdbus-address-get-session.c
index 531ce7a85..72de2c79f 100644
--- a/gio/tests/gdbus-unix-addresses.c
+++ b/gio/tests/gdbus-address-get-session.c
@@ -18,9 +18,12 @@
#include <glib.h>
-#ifndef G_OS_UNIX
-#error This is a Unix-specific test
-#endif
+/* This test does NOT depend on any dbus binaries preinstalled on test host.
+ * On Unix it uses mock environment (test_xdg_runtime)
+ * or mock dbus-launch binary (test_x11_autolaunch).
+ * On Windows it relies on the fact that libgio provides
+ * internal session dbus-server on win32.
+ */
#include <errno.h>
@@ -43,6 +46,8 @@ print_address (void)
g_free (addr);
}
+#ifdef G_OS_UNIX
+
static GSocket *mock_bus = NULL;
static gchar *mock_bus_path = NULL;
/* this is deliberately something that needs escaping */
@@ -166,14 +171,57 @@ test_xdg_runtime (void)
g_test_trap_assert_passed ();
}
+#endif
+
+#ifdef G_OS_WIN32
+static void
+check_and_cleanup_autolaunched_win32_bus (void)
+{
+ /* win32 autostarted bus runs infinitely if no client ever connected.
+ * However it exits in several seconds if the last client disconnects.
+ * _This_ test only checks successful launching and connectivity,
+ * and don't bother on bus termination behavior (being it a bug or not).
+ * So connect+disconnect here is not only connectivity test,
+ * but also the workaround the bus process infinite run.
+ */
+ GError *err = NULL;
+ GDBusConnection *bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &err);
+ g_assert_no_error (err);
+ g_object_unref (bus);
+}
+
+static void
+test_win32_autolaunch (void)
+{
+ if (g_test_subprocess ())
+ {
+ print_address ();
+
+ check_and_cleanup_autolaunched_win32_bus ();
+ return;
+ }
+
+ g_test_trap_subprocess (NULL, 0, 0);
+ /* stderr is not checked: coverage prints warnings there */
+ g_test_trap_assert_stdout ("nonce-tcp:host=localhost,port=*,noncefile=*\\gdbus-nonce-file-*\n");
+ g_test_trap_assert_passed ();
+}
+#endif
+
int
main (int argc,
char *argv[])
{
g_test_init (&argc, &argv, NULL);
+#ifdef G_OS_UNIX
g_test_add_func ("/gdbus/x11-autolaunch", test_x11_autolaunch);
g_test_add_func ("/gdbus/xdg-runtime", test_xdg_runtime);
+#endif
+
+#ifdef G_OS_WIN32
+ g_test_add_func ("/gdbus/win32-autolaunch", test_win32_autolaunch);
+#endif
- return g_test_run();
+ return g_test_run ();
}
diff --git a/gio/tests/gdbus-addresses.c b/gio/tests/gdbus-addresses.c
index 0ab05661a..d6a5c2360 100644
--- a/gio/tests/gdbus-addresses.c
+++ b/gio/tests/gdbus-addresses.c
@@ -39,11 +39,25 @@ test_empty_address (void)
g_error_free (error);
}
+/* Test that g_dbus_is_supported_address() returns FALSE for an unparseable
+ * address. */
+static void
+test_unsupported_address (void)
+{
+ GError *error = NULL;
+
+ g_assert_false (g_dbus_is_supported_address (";", &error));
+ g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
+ g_clear_error (&error);
+}
+
static void
assert_is_supported_address (const gchar *address)
{
GError *error = NULL;
+ g_assert_true (g_dbus_is_address (address));
+
g_assert_true (g_dbus_is_supported_address (address, NULL));
g_assert_true (g_dbus_is_supported_address (address, &error));
g_assert_no_error (error);
@@ -54,30 +68,57 @@ assert_not_supported_address (const gchar *address)
{
GError *error = NULL;
+ g_assert_true (g_dbus_is_address (address));
+
g_assert_false (g_dbus_is_supported_address (address, NULL));
g_assert_false (g_dbus_is_supported_address (address, &error));
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
g_clear_error (&error);
}
-#ifdef G_OS_UNIX
+/* Test that g_dbus_is_address() returns FALSE for various differently invalid
+ * input strings. */
static void
-test_unix_address (void)
+test_address_parsing (void)
{
assert_not_supported_address ("some-imaginary-transport:foo=bar");
+ g_assert_true (g_dbus_is_address ("some-imaginary-transport:foo=bar"));
+
+ assert_not_supported_address ("some-imaginary-transport:foo=bar;unix:path=/this/is/valid");
+
+ g_assert_false (g_dbus_is_address (""));
+ g_assert_false (g_dbus_is_address (";"));
+ g_assert_false (g_dbus_is_address (":"));
+ g_assert_false (g_dbus_is_address ("=:;"));
+ g_assert_false (g_dbus_is_address (":=;:="));
+ g_assert_false (g_dbus_is_address ("transport-name:="));
+ g_assert_false (g_dbus_is_address ("transport-name:=bar"));
+
+ g_assert_false (g_dbus_is_address ("transport-name:foo"));
+ g_assert_false (g_dbus_is_address ("transport-name:foo=%00"));
+ g_assert_false (g_dbus_is_address ("transport-name:%00=bar"));
+
+ assert_not_supported_address ("magic-tractor:");
+}
+
+static void
+test_unix_address (void)
+{
+#ifndef G_OS_UNIX
+ g_test_skip ("unix transport is not supported on non-Unix platforms");
+#else
assert_is_supported_address ("unix:path=/tmp/dbus-test");
assert_is_supported_address ("unix:abstract=/tmp/dbus-another-test");
- g_assert (g_dbus_is_address ("unix:foo=bar"));
assert_not_supported_address ("unix:foo=bar");
- g_assert (!g_dbus_is_address ("unix:path=/foo;abstract=/bar"));
- assert_not_supported_address ("unix:path=/foo;abstract=/bar");
+ g_assert_false (g_dbus_is_address ("unix:path=/foo;abstract=/bar"));
assert_is_supported_address ("unix:path=/tmp/concrete;unix:abstract=/tmp/abstract");
- g_assert (g_dbus_is_address ("some-imaginary-transport:foo=bar"));
-
- g_assert (g_dbus_is_address ("some-imaginary-transport:foo=bar;unix:path=/this/is/valid"));
- assert_not_supported_address ("some-imaginary-transport:foo=bar;unix:path=/this/is/valid");
-}
+ assert_is_supported_address ("unix:tmpdir=/tmp");
+ assert_not_supported_address ("unix:tmpdir=/tmp,path=/tmp");
+ assert_not_supported_address ("unix:tmpdir=/tmp,abstract=/tmp/foo");
+ assert_not_supported_address ("unix:path=/tmp,abstract=/tmp/foo");
+ assert_not_supported_address ("unix:");
#endif
+}
static void
test_nonce_tcp_address (void)
@@ -85,12 +126,18 @@ test_nonce_tcp_address (void)
assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar");
assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=ipv6");
assert_is_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=ipv4");
+ assert_is_supported_address ("nonce-tcp:host=localhost");
assert_not_supported_address ("nonce-tcp:host=localhost,port=42,noncefile=/foo/bar,family=blah");
assert_not_supported_address ("nonce-tcp:host=localhost,port=420000,noncefile=/foo/bar,family=ipv4");
assert_not_supported_address ("nonce-tcp:host=,port=x42,noncefile=/foo/bar,family=ipv4");
assert_not_supported_address ("nonce-tcp:host=,port=42x,noncefile=/foo/bar,family=ipv4");
assert_not_supported_address ("nonce-tcp:host=,port=420000,noncefile=/foo/bar,family=ipv4");
+ assert_not_supported_address ("nonce-tcp:meaningless-key=blah");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=-1");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=420000");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=42x");
+ assert_not_supported_address ("nonce-tcp:host=localhost,port=");
}
static void
@@ -102,6 +149,7 @@ test_tcp_address (void)
assert_not_supported_address ("tcp:host=localhost,port=-1");
assert_not_supported_address ("tcp:host=localhost,port=420000");
assert_not_supported_address ("tcp:host=localhost,port=42x");
+ assert_not_supported_address ("tcp:host=localhost,port=");
assert_is_supported_address ("tcp:host=localhost,port=42,family=ipv4");
assert_is_supported_address ("tcp:host=localhost,port=42,family=ipv6");
assert_not_supported_address ("tcp:host=localhost,port=42,family=sopranos");
@@ -151,9 +199,9 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
g_test_add_func ("/gdbus/empty-address", test_empty_address);
-#ifdef G_OS_UNIX
+ g_test_add_func ("/gdbus/unsupported-address", test_unsupported_address);
+ g_test_add_func ("/gdbus/address-parsing", test_address_parsing);
g_test_add_func ("/gdbus/unix-address", test_unix_address);
-#endif
g_test_add_func ("/gdbus/nonce-tcp-address", test_nonce_tcp_address);
g_test_add_func ("/gdbus/tcp-address", test_tcp_address);
g_test_add_func ("/gdbus/autolaunch-address", test_autolaunch_address);
diff --git a/gio/tests/gdbus-example-peer.c b/gio/tests/gdbus-example-peer.c
index 9d5de32a6..bf151cfcf 100755
--- a/gio/tests/gdbus-example-peer.c
+++ b/gio/tests/gdbus-example-peer.c
@@ -169,74 +169,6 @@ on_new_connection (GDBusServer *server,
/* ---------------------------------------------------------------------------------------------------- */
-static gboolean
-allow_mechanism_cb (GDBusAuthObserver *observer,
- const gchar *mechanism,
- G_GNUC_UNUSED gpointer user_data)
-{
- /*
- * In a production GDBusServer that only needs to work on modern Unix
- * platforms, consider requiring EXTERNAL (credentials-passing),
- * which is the recommended authentication mechanism for AF_UNIX
- * sockets:
- *
- * if (g_strcmp0 (mechanism, "EXTERNAL") == 0)
- * return TRUE;
- *
- * return FALSE;
- *
- * For this example we accept everything.
- */
-
- g_print ("Considering whether to accept %s authentication...\n", mechanism);
- return TRUE;
-}
-
-static gboolean
-authorize_authenticated_peer_cb (GDBusAuthObserver *observer,
- G_GNUC_UNUSED GIOStream *stream,
- GCredentials *credentials,
- G_GNUC_UNUSED gpointer user_data)
-{
- gboolean authorized = FALSE;
-
- g_print ("Considering whether to authorize authenticated peer...\n");
-
- if (credentials != NULL)
- {
- GCredentials *own_credentials;
- gchar *credentials_string = NULL;
-
- credentials_string = g_credentials_to_string (credentials);
- g_print ("Peer's credentials: %s\n", credentials_string);
- g_free (credentials_string);
-
- own_credentials = g_credentials_new ();
-
- credentials_string = g_credentials_to_string (own_credentials);
- g_print ("Server's credentials: %s\n", credentials_string);
- g_free (credentials_string);
-
- if (g_credentials_is_same_user (credentials, own_credentials, NULL))
- authorized = TRUE;
-
- g_object_unref (own_credentials);
- }
-
- if (!authorized)
- {
- /* In most servers you'd want to reject this, but for this example
- * we allow it. */
- g_print ("A server would often not want to authorize this identity\n");
- g_print ("Authorizing it anyway for demonstration purposes\n");
- authorized = TRUE;
- }
-
- return authorized;
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
int
main (int argc, char *argv[])
{
@@ -289,7 +221,6 @@ main (int argc, char *argv[])
if (opt_server)
{
- GDBusAuthObserver *observer;
GDBusServer *server;
gchar *guid;
GMainLoop *loop;
@@ -301,20 +232,14 @@ main (int argc, char *argv[])
if (opt_allow_anonymous)
server_flags |= G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS;
- observer = g_dbus_auth_observer_new ();
- g_signal_connect (observer, "allow-mechanism", G_CALLBACK (allow_mechanism_cb), NULL);
- g_signal_connect (observer, "authorize-authenticated-peer", G_CALLBACK (authorize_authenticated_peer_cb), NULL);
-
error = NULL;
server = g_dbus_server_new_sync (opt_address,
server_flags,
guid,
- observer,
+ NULL, /* GDBusAuthObserver */
NULL, /* GCancellable */
&error);
g_dbus_server_start (server);
-
- g_object_unref (observer);
g_free (guid);
if (server == NULL)
diff --git a/gio/tests/gdbus-proxy.c b/gio/tests/gdbus-proxy.c
index 6e092f42b..05b22ea1c 100644
--- a/gio/tests/gdbus-proxy.c
+++ b/gio/tests/gdbus-proxy.c
@@ -49,7 +49,7 @@ test_methods (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "(s)");
g_variant_get (result, "(&s)", &str);
g_assert_cmpstr (str, ==, "You greeted me with 'Hey'. Thanks!");
@@ -64,13 +64,13 @@ test_methods (GDBusProxy *proxy)
NULL,
&error);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_DBUS_ERROR);
- g_assert (g_dbus_error_is_remote_error (error));
- g_assert (g_dbus_error_is_remote_error (error));
- g_assert (result == NULL);
+ g_assert_true (g_dbus_error_is_remote_error (error));
+ g_assert_true (g_dbus_error_is_remote_error (error));
+ g_assert_null (result);
dbus_error_name = g_dbus_error_get_remote_error (error);
g_assert_cmpstr (dbus_error_name, ==, "com.example.TestException");
g_free (dbus_error_name);
- g_assert (g_dbus_error_strip_remote_error (error));
+ g_assert_true (g_dbus_error_strip_remote_error (error));
g_assert_cmpstr (error->message, ==, "Yo is not a proper greeting");
g_clear_error (&error);
@@ -88,8 +88,8 @@ test_methods (GDBusProxy *proxy)
NULL,
&error);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT);
- g_assert (!g_dbus_error_is_remote_error (error));
- g_assert (result == NULL);
+ g_assert_false (g_dbus_error_is_remote_error (error));
+ g_assert_null (result);
g_clear_error (&error);
/* Check that proxy-default timeouts work. */
@@ -104,7 +104,7 @@ test_methods (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
@@ -121,8 +121,8 @@ test_methods (GDBusProxy *proxy)
NULL,
&error);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT);
- g_assert (!g_dbus_error_is_remote_error (error));
- g_assert (result == NULL);
+ g_assert_false (g_dbus_error_is_remote_error (error));
+ g_assert_null (result);
g_clear_error (&error);
/* clean up after ourselves */
@@ -179,7 +179,7 @@ test_properties (GDBusProxy *proxy)
if (g_dbus_proxy_get_flags (proxy) & G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES)
{
- g_assert (g_dbus_proxy_get_cached_property_names (proxy) == NULL);
+ g_assert_null (g_dbus_proxy_get_cached_property_names (proxy));
return;
}
@@ -188,32 +188,32 @@ test_properties (GDBusProxy *proxy)
*/
names = g_dbus_proxy_get_cached_property_names (proxy);
- g_assert (strv_equal (names,
- "PropertyThatWillBeInvalidated",
- "ab",
- "ad",
- "ai",
- "an",
- "ao",
- "aq",
- "as",
- "at",
- "au",
- "ax",
- "ay",
- "b",
- "d",
- "foo",
- "i",
- "n",
- "o",
- "q",
- "s",
- "t",
- "u",
- "x",
- "y",
- NULL));
+ g_assert_true (strv_equal (names,
+ "PropertyThatWillBeInvalidated",
+ "ab",
+ "ad",
+ "ai",
+ "an",
+ "ao",
+ "aq",
+ "as",
+ "at",
+ "au",
+ "ax",
+ "ay",
+ "b",
+ "d",
+ "foo",
+ "i",
+ "n",
+ "o",
+ "q",
+ "s",
+ "t",
+ "u",
+ "x",
+ "y",
+ NULL));
g_strfreev (names);
@@ -223,11 +223,11 @@ test_properties (GDBusProxy *proxy)
* No need to test all properties - GVariant has already been tested
*/
variant = g_dbus_proxy_get_cached_property (proxy, "y");
- g_assert (variant != NULL);
+ g_assert_nonnull (variant);
g_assert_cmpint (g_variant_get_byte (variant), ==, 1);
g_variant_unref (variant);
variant = g_dbus_proxy_get_cached_property (proxy, "o");
- g_assert (variant != NULL);
+ g_assert_nonnull (variant);
g_assert_cmpstr (g_variant_get_string (variant, NULL), ==, "/some/path");
g_variant_unref (variant);
@@ -246,31 +246,31 @@ test_properties (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
_g_assert_signal_received (proxy, "g-properties-changed");
variant = g_dbus_proxy_get_cached_property (proxy, "y");
- g_assert (variant != NULL);
+ g_assert_nonnull (variant);
g_assert_cmpint (g_variant_get_byte (variant), ==, 42);
g_variant_unref (variant);
g_dbus_proxy_set_cached_property (proxy, "y", g_variant_new_byte (142));
variant = g_dbus_proxy_get_cached_property (proxy, "y");
- g_assert (variant != NULL);
+ g_assert_nonnull (variant);
g_assert_cmpint (g_variant_get_byte (variant), ==, 142);
g_variant_unref (variant);
g_dbus_proxy_set_cached_property (proxy, "y", NULL);
variant = g_dbus_proxy_get_cached_property (proxy, "y");
- g_assert (variant == NULL);
+ g_assert_null (variant);
/* Check that the invalidation feature of the PropertiesChanged()
* signal works... First, check that we have a cached value of the
* property (from the initial GetAll() call)
*/
variant = g_dbus_proxy_get_cached_property (proxy, "PropertyThatWillBeInvalidated");
- g_assert (variant != NULL);
+ g_assert_nonnull (variant);
g_assert_cmpstr (g_variant_get_string (variant, NULL), ==, "InitialValue");
g_variant_unref (variant);
/* now ask to invalidate the property - this causes a
@@ -292,14 +292,14 @@ test_properties (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
/* ... hence we wait for the g-properties-changed signal to be delivered */
_g_assert_signal_received (proxy, "g-properties-changed");
/* ... and now we finally, check that the cached value has been invalidated */
variant = g_dbus_proxy_get_cached_property (proxy, "PropertyThatWillBeInvalidated");
- g_assert (variant == NULL);
+ g_assert_null (variant);
/* Now test that G_DBUS_PROXY_FLAGS_GET_INVALIDATED_PROPERTIES works - we need a new proxy for that */
error = NULL;
@@ -314,11 +314,11 @@ test_properties (GDBusProxy *proxy)
g_assert_no_error (error);
name_owner = g_dbus_proxy_get_name_owner (proxy2);
- g_assert (name_owner != NULL);
+ g_assert_nonnull (name_owner);
g_free (name_owner);
variant = g_dbus_proxy_get_cached_property (proxy2, "PropertyThatWillBeInvalidated");
- g_assert (variant != NULL);
+ g_assert_nonnull (variant);
g_assert_cmpstr (g_variant_get_string (variant, NULL), ==, "OMGInvalidated"); /* from previous test */
g_variant_unref (variant);
@@ -330,7 +330,7 @@ test_properties (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
@@ -338,7 +338,7 @@ test_properties (GDBusProxy *proxy)
_g_assert_signal_received (proxy2, "g-properties-changed");
variant = g_dbus_proxy_get_cached_property (proxy2, "PropertyThatWillBeInvalidated");
- g_assert (variant != NULL);
+ g_assert_nonnull (variant);
g_assert_cmpstr (g_variant_get_string (variant, NULL), ==, "OMGInvalidated2");
g_variant_unref (variant);
@@ -384,12 +384,12 @@ test_proxy_signals_on_emit_signal_cb (GDBusProxy *proxy,
res,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
/* check that the signal was recieved before we got the method result */
- g_assert (strlen (data->s->str) > 0);
+ g_assert_cmpuint (strlen (data->s->str), >, 0);
/* break out of the loop */
g_main_loop_quit (data->internal_loop);
@@ -428,11 +428,11 @@ test_signals (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
/* check that we haven't received the signal just yet */
- g_assert (strlen (s->str) == 0);
+ g_assert_cmpuint (strlen (s->str), ==, 0);
/* and now wait for the signal */
_g_assert_signal_received (proxy, "g-signal");
g_assert_cmpstr (s->str,
@@ -487,7 +487,7 @@ test_bogus_method_return (GDBusProxy *proxy)
&error);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT);
g_error_free (error);
- g_assert (result == NULL);
+ g_assert_null (result);
}
#if 0 /* Disabled: see https://bugzilla.gnome.org/show_bug.cgi?id=658999 */
@@ -506,7 +506,7 @@ test_bogus_signal (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
@@ -546,7 +546,7 @@ test_bogus_property (GDBusProxy *proxy)
NULL,
&error);
g_assert_no_error (error);
- g_assert (result != NULL);
+ g_assert_nonnull (result);
g_assert_cmpstr (g_variant_get_type_string (result), ==, "()");
g_variant_unref (result);
@@ -626,7 +626,9 @@ test_expected_interface (GDBusProxy *proxy)
/* Also check that we complain if setting a cached property of the wrong type */
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
"*Trying to set property y of type s but according to the expected interface the type is y*");
- g_dbus_proxy_set_cached_property (proxy, "y", g_variant_new_string ("error_me_out!"));
+ value = g_variant_ref_sink (g_variant_new_string ("error_me_out!"));
+ g_dbus_proxy_set_cached_property (proxy, "y", value);
+ g_variant_unref (value);
g_test_assert_expected_messages ();
}
@@ -652,16 +654,16 @@ test_expected_interface (GDBusProxy *proxy)
* See https://bugzilla.gnome.org/show_bug.cgi?id=660886
*/
value = g_dbus_proxy_get_cached_property (proxy, "d");
- g_assert (value != NULL);
- g_assert (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE));
+ g_assert_nonnull (value);
+ g_assert_true (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE));
g_assert_cmpfloat (g_variant_get_double (value), ==, 7.5);
g_variant_unref (value);
/* update it via the cached property... */
g_dbus_proxy_set_cached_property (proxy, "d", g_variant_new_double (75.0));
/* ... and finally check that it has changed */
value = g_dbus_proxy_get_cached_property (proxy, "d");
- g_assert (value != NULL);
- g_assert (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE));
+ g_assert_nonnull (value);
+ g_assert_true (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE));
g_assert_cmpfloat (g_variant_get_double (value), ==, 75.0);
g_variant_unref (value);
/* now update it via the D-Bus interface... */
@@ -671,15 +673,15 @@ test_expected_interface (GDBusProxy *proxy)
G_DBUS_CALL_FLAGS_NONE,
-1, NULL, &error);
g_assert_no_error (error);
- g_assert (value != NULL);
+ g_assert_nonnull (value);
g_assert_cmpstr (g_variant_get_type_string (value), ==, "()");
g_variant_unref (value);
/* ...ensure we receive the ::PropertiesChanged signal... */
_g_assert_signal_received (proxy, "g-properties-changed");
/* ... and finally check that it has changed */
value = g_dbus_proxy_get_cached_property (proxy, "d");
- g_assert (value != NULL);
- g_assert (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE));
+ g_assert_nonnull (value);
+ g_assert_true (g_variant_is_of_type (value, G_VARIANT_TYPE_DOUBLE));
g_assert_cmpfloat (g_variant_get_double (value), ==, 85.0);
g_variant_unref (value);
}
@@ -698,9 +700,9 @@ test_basic (GDBusProxy *proxy)
connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
- g_assert (g_dbus_proxy_get_connection (proxy) == connection);
- g_assert (g_dbus_proxy_get_flags (proxy) == G_DBUS_PROXY_FLAGS_NONE);
- g_assert (g_dbus_proxy_get_interface_info (proxy) == NULL);
+ g_assert_true (g_dbus_proxy_get_connection (proxy) == connection);
+ g_assert_cmpint (g_dbus_proxy_get_flags (proxy), ==, G_DBUS_PROXY_FLAGS_NONE);
+ g_assert_null (g_dbus_proxy_get_interface_info (proxy));
g_assert_cmpstr (g_dbus_proxy_get_name (proxy), ==, "com.example.TestService");
g_assert_cmpstr (g_dbus_proxy_get_object_path (proxy), ==, "/com/example/TestObject");
g_assert_cmpstr (g_dbus_proxy_get_interface_name (proxy), ==, "com.example.Frob");
@@ -716,8 +718,8 @@ test_basic (GDBusProxy *proxy)
"g-default-timeout", &timeout,
NULL);
- g_assert (conn == connection);
- g_assert (info == NULL);
+ g_assert_true (conn == connection);
+ g_assert_null (info);
g_assert_cmpint (flags, ==, G_DBUS_PROXY_FLAGS_NONE);
g_assert_cmpstr (name, ==, "com.example.TestService");
g_assert_cmpstr (path, ==, "/com/example/TestObject");
@@ -785,7 +787,7 @@ test_proxy (void)
g_assert_no_error (error);
/* this is safe; we explicitly kill the service later on */
- g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
+ g_assert_true (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
_g_assert_property_notify (proxy, "g-name-owner");
@@ -827,7 +829,7 @@ proxy_ready (GObject *source,
g_free (owner);
/* this is safe; we explicitly kill the service later on */
- g_assert (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
+ g_assert_true (g_spawn_command_line_async (g_test_get_filename (G_TEST_BUILT, "gdbus-testserver", NULL), NULL));
_g_assert_property_notify (proxy, "g-name-owner");
@@ -901,7 +903,7 @@ check_error (GObject *source,
reply = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), result, &error);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_FAILED);
- g_assert (reply == NULL);
+ g_assert_null (reply);
g_error_free (error);
g_main_loop_quit (loop);
@@ -919,7 +921,7 @@ test_wellknown_noauto (void)
NULL, "some.name.that.does.not.exist",
"/", "some.interface", NULL, &error);
g_assert_no_error (error);
- g_assert (proxy != NULL);
+ g_assert_nonnull (proxy);
g_dbus_proxy_call (proxy, "method", NULL, G_DBUS_CALL_FLAGS_NONE, -1, NULL, check_error, NULL);
id = g_timeout_add (10000, fail_test, NULL);
@@ -938,7 +940,7 @@ main (int argc,
g_test_init (&argc, &argv, NULL);
introspection_data = g_dbus_node_info_new_for_xml (frob_dbus_interface_xml, NULL);
- g_assert (introspection_data != NULL);
+ g_assert_nonnull (introspection_data);
frob_dbus_interface_info = introspection_data->interfaces[0];
/* all the tests rely on a shared main loop */
@@ -952,6 +954,7 @@ main (int argc,
ret = session_bus_run();
g_dbus_node_info_unref (introspection_data);
+ g_main_loop_unref (loop);
return ret;
}
diff --git a/gio/tests/gdbus-test-codegen.c b/gio/tests/gdbus-test-codegen.c
index 8db555781..985cb1095 100644
--- a/gio/tests/gdbus-test-codegen.c
+++ b/gio/tests/gdbus-test-codegen.c
@@ -583,10 +583,8 @@ on_name_acquired (GDBusConnection *connection,
gpointer user_data)
{
GMainLoop *loop = user_data;
-
- g_thread_new ("check-proxies",
- check_proxies_in_thread,
- loop);
+ GThread *thread = g_thread_new ("check-proxies", check_proxies_in_thread, loop);
+ g_thread_unref (thread);
}
static void
diff --git a/gio/tests/gdbus-testserver.c b/gio/tests/gdbus-testserver.c
index 7f99a1946..dd0d5ba5a 100644
--- a/gio/tests/gdbus-testserver.c
+++ b/gio/tests/gdbus-testserver.c
@@ -884,6 +884,7 @@ main (int argc, char *argv[])
g_bus_unown_name (owner_id);
g_dbus_node_info_unref (introspection_data);
+ g_hash_table_unref (properties);
return 0;
}
diff --git a/gio/tests/gmenumodel.c b/gio/tests/gmenumodel.c
index 53e701360..fc0fcea48 100644
--- a/gio/tests/gmenumodel.c
+++ b/gio/tests/gmenumodel.c
@@ -752,11 +752,11 @@ typedef struct
GDBusServer *server;
GThread *service_thread;
+ /* Protects server_connection and service_loop. */
GMutex service_loop_lock;
GCond service_loop_cond;
GMainLoop *service_loop;
- GMainLoop *loop;
} PeerConnection;
static gboolean
@@ -766,9 +766,10 @@ on_new_connection (GDBusServer *server,
{
PeerConnection *data = user_data;
+ g_mutex_lock (&data->service_loop_lock);
data->server_connection = g_object_ref (connection);
-
- g_main_loop_quit (data->loop);
+ g_cond_broadcast (&data->service_loop_cond);
+ g_mutex_unlock (&data->service_loop_lock);
return TRUE;
}
@@ -801,6 +802,15 @@ await_service_loop (PeerConnection *data)
g_mutex_unlock (&data->service_loop_lock);
}
+static void
+await_server_connection (PeerConnection *data)
+{
+ g_mutex_lock (&data->service_loop_lock);
+ while (data->server_connection == NULL)
+ g_cond_wait (&data->service_loop_cond, &data->service_loop_lock);
+ g_mutex_unlock (&data->service_loop_lock);
+}
+
static gpointer
service_thread_func (gpointer user_data)
{
@@ -874,7 +884,6 @@ peer_connection_up (PeerConnection *data)
GError *error;
memset (data, '\0', sizeof (PeerConnection));
- data->loop = g_main_loop_new (NULL, FALSE);
g_mutex_init (&data->service_loop_lock);
g_cond_init (&data->service_loop_cond);
@@ -897,8 +906,7 @@ peer_connection_up (PeerConnection *data)
&error);
g_assert_no_error (error);
g_assert (data->client_connection != NULL);
- while (data->server_connection == NULL)
- g_main_loop_run (data->loop);
+ await_server_connection (data);
}
static void
@@ -915,8 +923,6 @@ peer_connection_down (PeerConnection *data)
g_mutex_clear (&data->service_loop_lock);
g_cond_clear (&data->service_loop_cond);
-
- g_main_loop_unref (data->loop);
}
struct roundtrip_state
diff --git a/gio/tests/gsubprocess.c b/gio/tests/gsubprocess.c
index f0b36b764..52b06a2e6 100644
--- a/gio/tests/gsubprocess.c
+++ b/gio/tests/gsubprocess.c
@@ -73,11 +73,11 @@ test_noop (void)
g_ptr_array_free (args, TRUE);
g_assert_no_error (local_error);
id = g_subprocess_get_identifier (proc);
- g_assert (id != NULL);
+ g_assert_nonnull (id);
g_subprocess_wait_check (proc, NULL, error);
g_assert_no_error (local_error);
- g_assert (g_subprocess_get_successful (proc));
+ g_assert_true (g_subprocess_get_successful (proc));
g_object_unref (proc);
}
@@ -93,7 +93,7 @@ check_ready (GObject *source,
ret = g_subprocess_wait_check_finish (G_SUBPROCESS (source),
res,
&error);
- g_assert (ret);
+ g_assert_true (ret);
g_assert_no_error (error);
g_object_unref (source);
@@ -218,7 +218,7 @@ test_exit1_cancel_wait_check_cb (GObject *source,
data->cb_called = TRUE;
ret = g_subprocess_wait_check_finish (subprocess, result, &error);
- g_assert (!ret);
+ g_assert_false (ret);
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_CANCELLED);
g_clear_error (&error);
@@ -271,7 +271,7 @@ test_exit1_cancel_in_cb_wait_check_cb (GObject *source,
data->cb_called = TRUE;
ret = g_subprocess_wait_check_finish (subprocess, result, &error);
- g_assert (!ret);
+ g_assert_false (ret);
g_assert_error (error, G_SPAWN_EXIT_ERROR, 1);
g_clear_error (&error);
@@ -501,7 +501,7 @@ test_cat_eof (void)
/* Spawn 'cat' */
cat = g_subprocess_new (G_SUBPROCESS_FLAGS_STDIN_PIPE | G_SUBPROCESS_FLAGS_STDOUT_PIPE, &error, "cat", NULL);
g_assert_no_error (error);
- g_assert (cat);
+ g_assert_nonnull (cat);
/* Make sure that reading stdout blocks (until we cancel) */
cancellable = g_cancellable_new ();
@@ -515,19 +515,19 @@ test_cat_eof (void)
/* Close the stream (EOF on cat's stdin) */
result = g_output_stream_close (g_subprocess_get_stdin_pipe (cat), NULL, &error);
g_assert_no_error (error);
- g_assert (result);
+ g_assert_true (result);
/* Now check that reading cat's stdout gets us an EOF (since it quit) */
s = g_input_stream_read (g_subprocess_get_stdout_pipe (cat), &buffer, sizeof buffer, NULL, &error);
g_assert_no_error (error);
- g_assert (!s);
+ g_assert_false (s);
/* Check that the process has exited as a result of the EOF */
result = g_subprocess_wait (cat, NULL, &error);
g_assert_no_error (error);
- g_assert (g_subprocess_get_if_exited (cat));
+ g_assert_true (g_subprocess_get_if_exited (cat));
g_assert_cmpint (g_subprocess_get_exit_status (cat), ==, 0);
- g_assert (result);
+ g_assert_true (result);
g_object_unref (cat);
}
@@ -686,7 +686,7 @@ test_multi_1 (void)
g_main_loop_run (data.loop);
- g_assert (!data.caught_error);
+ g_assert_false (data.caught_error);
g_assert_no_error (data.error);
g_assert_cmpint (g_memory_output_stream_get_data_size ((GMemoryOutputStream*)membuf), ==, SPLICELEN);
@@ -1279,11 +1279,11 @@ on_request_quit_exited (GObject *object,
g_subprocess_wait_finish (subprocess, result, &error);
g_assert_no_error (error);
#ifdef G_OS_UNIX
- g_assert (g_subprocess_get_if_signaled (subprocess));
- g_assert (g_subprocess_get_term_sig (subprocess) == 9);
+ g_assert_true (g_subprocess_get_if_signaled (subprocess));
+ g_assert_cmpint (g_subprocess_get_term_sig (subprocess), ==, 9);
#endif
g_spawn_check_exit_status (g_subprocess_get_status (subprocess), &error);
- g_assert (error != NULL);
+ g_assert_nonnull (error);
g_clear_error (&error);
g_main_loop_quit ((GMainLoop*)user_data);
@@ -1473,7 +1473,7 @@ test_cwd (void)
result = splice_to_string (stdout_stream, error);
basename = g_strrstr (result, G_DIR_SEPARATOR_S);
- g_assert (basename != NULL);
+ g_assert_nonnull (basename);
g_assert_cmpstr (basename, ==, tmp_lineend_basename);
g_free (tmp_lineend);
@@ -1726,7 +1726,7 @@ test_launcher_environment (void)
args = get_test_subprocess_args ("printenv", "A", "C", "E", NULL);
proc = g_subprocess_launcher_spawnv (launcher, (const gchar **) args->pdata, &error);
g_assert_no_error (error);
- g_assert (proc);
+ g_assert_nonnull (proc);
g_subprocess_communicate_utf8 (proc, NULL, NULL, &out, NULL, &error);
g_assert_no_error (error);
diff --git a/gio/tests/meson.build b/gio/tests/meson.build
index 65f43e267..f13458181 100644
--- a/gio/tests/meson.build
+++ b/gio/tests/meson.build
@@ -10,6 +10,7 @@ test_c_args = [
'-DTEST_SERVICES="@0@/gio/tests/services"'.format(meson.build_root()),
'-DGLIB_MKENUMS="@0@"'.format(glib_mkenums),
'-DGLIB_COMPILE_SCHEMAS="@0@"'.format(glib_compile_schemas.full_path()),
+ '-UG_DISABLE_ASSERT',
]
if host_machine.system() == 'windows'
@@ -78,6 +79,7 @@ gio_tests = {
'tls-certificate' : {'extra_sources' : ['gtesttlsbackend.c']},
'tls-interaction' : {'extra_sources' : ['gtesttlsbackend.c']},
'tls-database' : {'extra_sources' : ['gtesttlsbackend.c']},
+ 'gdbus-address-get-session' : {},
}
test_extra_programs = {
@@ -134,27 +136,32 @@ if host_machine.system() != 'windows'
'unix-mounts' : {},
'unix-streams' : {},
'g-file-info-filesystem-readonly' : {},
- 'gsocketclient-slow' : {
- 'depends' : [
- shared_library('slow-connect-preload',
- 'slow-connect-preload.c',
- name_prefix : '',
- dependencies: cc.find_library('dl'),
- install_dir : installed_tests_execdir,
- install: installed_tests_enabled,
- )
- ],
- 'env' : {
- 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(meson.current_build_dir())
- },
- 'installed_tests_env' : {
- 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(installed_tests_execdir),
- },
- },
'gschema-compile' : {'install' : false},
'trash' : {},
}
+ if have_rtld_next
+ gio_tests += {
+ 'gsocketclient-slow' : {
+ 'depends' : [
+ shared_library('slow-connect-preload',
+ 'slow-connect-preload.c',
+ name_prefix : '',
+ dependencies: cc.find_library('dl'),
+ install_dir : installed_tests_execdir,
+ install: installed_tests_enabled,
+ )
+ ],
+ 'env' : {
+ 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(meson.current_build_dir())
+ },
+ 'installed_tests_env' : {
+ 'LD_PRELOAD': '@0@/slow-connect-preload.so'.format(installed_tests_execdir),
+ },
+ },
+ }
+ endif
+
# Uninstalled because of the check-for-executable logic in DesktopAppInfo
# unable to find the installed executable
if not glib_have_cocoa
@@ -241,10 +248,10 @@ if host_machine.system() != 'windows'
'extra_sources' : extra_sources,
'suite' : ['slow'],
},
- 'gdbus-auth' : {'extra_sources' : extra_sources, 'suite': ['flaky']},
- 'gdbus-bz627724' : {'extra_sources' : extra_sources, 'suite': ['flaky']},
+ 'gdbus-auth' : {'extra_sources' : extra_sources},
+ 'gdbus-bz627724' : {'extra_sources' : extra_sources},
'gdbus-close-pending' : {'extra_sources' : extra_sources},
- 'gdbus-connection' : {'extra_sources' : extra_sources, 'suite': ['flaky']},
+ 'gdbus-connection' : {'extra_sources' : extra_sources},
'gdbus-connection-loss' : {'extra_sources' : extra_sources},
'gdbus-connection-slow' : {'extra_sources' : extra_sources},
'gdbus-error' : {'extra_sources' : extra_sources},
@@ -283,7 +290,6 @@ if host_machine.system() != 'windows'
'-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_36'],
},
'gapplication' : {'extra_sources' : extra_sources},
- 'gdbus-unix-addresses' : {},
}
if not glib_have_cocoa
diff --git a/gio/tests/network-address.c b/gio/tests/network-address.c
index 395734b1b..c62afccd2 100644
--- a/gio/tests/network-address.c
+++ b/gio/tests/network-address.c
@@ -426,9 +426,7 @@ typedef struct {
} AsyncData;
static void
-got_addr (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
+got_addr (GObject *source_object, GAsyncResult *result, gpointer user_data)
{
GSocketAddressEnumerator *enumerator;
AsyncData *data;
@@ -468,30 +466,6 @@ got_addr (GObject *source_object,
}
static void
-got_addr_ignored (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
-{
- GSocketAddressEnumerator *enumerator;
- GSocketAddress *a; /* owned */
- GError *error = NULL;
-
- /* This function simply ignores the returned addresses but keeps enumerating */
-
- enumerator = G_SOCKET_ADDRESS_ENUMERATOR (source_object);
-
- a = g_socket_address_enumerator_next_finish (enumerator, result, &error);
- g_assert_no_error (error);
- if (a != NULL)
- {
- g_object_unref (a);
- g_socket_address_enumerator_next_async (enumerator, NULL,
- got_addr_ignored, user_data);
- }
-}
-
-
-static void
test_loopback_async (void)
{
GSocketConnectable *addr; /* owned */
@@ -673,39 +647,6 @@ test_happy_eyeballs_basic (HappyEyeballsFixture *fixture,
}
static void
-test_happy_eyeballs_parallel (HappyEyeballsFixture *fixture,
- gconstpointer user_data)
-{
- AsyncData data = { 0 };
- GSocketAddressEnumerator *enumerator2;
-
- enumerator2 = g_socket_connectable_enumerate (fixture->addr);
-
- data.delay_ms = FAST_DELAY_LESS_THAN_TIMEOUT;
- data.loop = fixture->loop;
-
- /* We run multiple enumerations at once, the results shouldn't be affected. */
-
- g_socket_address_enumerator_next_async (enumerator2, NULL, got_addr_ignored, &data);
- g_socket_address_enumerator_next_async (fixture->enumerator, NULL, got_addr, &data);
- g_main_loop_run (fixture->loop);
-
- assert_list_matches_expected (data.addrs, fixture->input_all_results);
-
- /* Run again to ensure the cache from the previous one is correct */
-
- data.addrs = NULL;
- g_object_unref (enumerator2);
-
- enumerator2 = g_socket_connectable_enumerate (fixture->addr);
- g_socket_address_enumerator_next_async (enumerator2, NULL, got_addr, &data);
- g_main_loop_run (fixture->loop);
-
- assert_list_matches_expected (data.addrs, fixture->input_all_results);
- g_object_unref (enumerator2);
-}
-
-static void
test_happy_eyeballs_slow_ipv4 (HappyEyeballsFixture *fixture,
gconstpointer user_data)
{
@@ -820,30 +761,6 @@ test_happy_eyeballs_ipv6_error_ipv6_first (HappyEyeballsFixture *fixture,
}
static void
-test_happy_eyeballs_ipv6_error_ipv4_very_slow (HappyEyeballsFixture *fixture,
- gconstpointer user_data)
-{
- AsyncData data = { 0 };
- GError *ipv6_error;
-
- g_test_bug ("merge_requests/865");
-
- /* If ipv6 fails, ensuring that ipv6 errors before ipv4 finishes, we still get ipv4. */
-
- data.loop = fixture->loop;
- ipv6_error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_TIMED_OUT, "IPv6 Broken");
- mock_resolver_set_ipv6_error (fixture->mock_resolver, ipv6_error);
- mock_resolver_set_ipv4_delay_ms (fixture->mock_resolver, SLOW_DELAY_MORE_THAN_TIMEOUT);
-
- g_socket_address_enumerator_next_async (fixture->enumerator, NULL, got_addr, &data);
- g_main_loop_run (fixture->loop);
-
- assert_list_matches_expected (data.addrs, fixture->input_ipv4_results);
-
- g_error_free (ipv6_error);
-}
-
-static void
test_happy_eyeballs_ipv4_error_ipv4_first (HappyEyeballsFixture *fixture,
gconstpointer user_data)
{
@@ -1001,7 +918,6 @@ main (int argc, char *argv[])
gchar *path;
g_test_init (&argc, &argv, NULL);
- g_test_bug_base ("https://gitlab.gnome.org/GNOME/glib/");
g_test_add_func ("/network-address/basic", test_basic);
@@ -1042,8 +958,6 @@ main (int argc, char *argv[])
g_test_add ("/network-address/happy-eyeballs/basic", HappyEyeballsFixture, NULL,
happy_eyeballs_setup, test_happy_eyeballs_basic, happy_eyeballs_teardown);
- g_test_add ("/network-address/happy-eyeballs/parallel", HappyEyeballsFixture, NULL,
- happy_eyeballs_setup, test_happy_eyeballs_parallel, happy_eyeballs_teardown);
g_test_add ("/network-address/happy-eyeballs/slow-ipv4", HappyEyeballsFixture, NULL,
happy_eyeballs_setup, test_happy_eyeballs_slow_ipv4, happy_eyeballs_teardown);
g_test_add ("/network-address/happy-eyeballs/slow-ipv6", HappyEyeballsFixture, NULL,
@@ -1056,8 +970,6 @@ main (int argc, char *argv[])
happy_eyeballs_setup, test_happy_eyeballs_ipv6_error_ipv4_first, happy_eyeballs_teardown);
g_test_add ("/network-address/happy-eyeballs/ipv6-error-ipv6-first", HappyEyeballsFixture, NULL,
happy_eyeballs_setup, test_happy_eyeballs_ipv6_error_ipv6_first, happy_eyeballs_teardown);
- g_test_add ("/network-address/happy-eyeballs/ipv6-error-ipv4-very-slow", HappyEyeballsFixture, NULL,
- happy_eyeballs_setup, test_happy_eyeballs_ipv6_error_ipv4_very_slow, happy_eyeballs_teardown);
g_test_add ("/network-address/happy-eyeballs/ipv4-error-ipv6-first", HappyEyeballsFixture, NULL,
happy_eyeballs_setup, test_happy_eyeballs_ipv4_error_ipv6_first, happy_eyeballs_teardown);
g_test_add ("/network-address/happy-eyeballs/ipv4-error-ipv4-first", HappyEyeballsFixture, NULL,
diff --git a/gio/tests/task.c b/gio/tests/task.c
index 9f7ae2563..9b2c6912c 100644
--- a/gio/tests/task.c
+++ b/gio/tests/task.c
@@ -1317,6 +1317,7 @@ test_run_in_thread_nested (void)
* tasks, they won't all run at once.
*/
static GMutex overflow_mutex;
+static guint overflow_completed;
static void
run_overflow_task_thread (GTask *task,
@@ -1329,16 +1330,19 @@ run_overflow_task_thread (GTask *task,
if (g_task_return_error_if_cancelled (task))
{
*result = 'X';
- return;
}
+ else
+ {
+ /* Block until the main thread is ready. */
+ g_mutex_lock (&overflow_mutex);
+ g_mutex_unlock (&overflow_mutex);
- /* Block until the main thread is ready. */
- g_mutex_lock (&overflow_mutex);
- g_mutex_unlock (&overflow_mutex);
+ *result = '.';
- *result = '.';
+ g_task_return_boolean (task, TRUE);
+ }
- g_task_return_boolean (task, TRUE);
+ g_atomic_int_inc (&overflow_completed);
}
#define NUM_OVERFLOW_TASKS 1024
@@ -1382,9 +1386,11 @@ test_run_in_thread_overflow (void)
g_mutex_unlock (&overflow_mutex);
/* Wait for all tasks to complete. */
- while (strlen (buf) != NUM_OVERFLOW_TASKS)
+ while (g_atomic_int_get (&overflow_completed) != NUM_OVERFLOW_TASKS)
g_usleep (1000);
+ g_assert_cmpint (strlen (buf), ==, NUM_OVERFLOW_TASKS);
+
i = strspn (buf, ".");
/* Given the sleep times above, i should be 14 for normal, 40 for
* slow. But if the machine is too slow/busy then the scheduling
diff --git a/gio/win32/gwinhttpfile.c b/gio/win32/gwinhttpfile.c
index d6acab7b8..d5df16d91 100644
--- a/gio/win32/gwinhttpfile.c
+++ b/gio/win32/gwinhttpfile.c
@@ -80,7 +80,7 @@ g_winhttp_file_init (GWinHttpFile *winhttp)
* @vfs: GWinHttpVfs to use
* @uri: URI of the GWinHttpFile to create.
*
- * Returns: (nullable): new winhttp #GFile, or %NULL if there was an error constructing it.
+ * Returns: new winhttp #GFile.
*/
GFile *
_g_winhttp_file_new (GWinHttpVfs *vfs,
diff --git a/gio/win32/gwinhttpvfs.c b/gio/win32/gwinhttpvfs.c
index 91d7fed9d..038368f81 100644
--- a/gio/win32/gwinhttpvfs.c
+++ b/gio/win32/gwinhttpvfs.c
@@ -165,25 +165,15 @@ g_winhttp_vfs_get_file_for_uri (GVfs *vfs,
{
GWinHttpVfs *winhttp_vfs = G_WINHTTP_VFS (vfs);
int i;
- GFile *ret = NULL;
/* If it matches one of "our" schemes, handle it */
for (i = 0; i < G_N_ELEMENTS (winhttp_uri_schemes); i++)
- {
- if (g_ascii_strncasecmp (uri, winhttp_uri_schemes[i], strlen (winhttp_uri_schemes[i])) == 0 &&
- uri[strlen (winhttp_uri_schemes[i])] == ':')
- {
- ret = _g_winhttp_file_new (winhttp_vfs, uri);
- }
- }
+ if (g_ascii_strncasecmp (uri, winhttp_uri_schemes[i], strlen (winhttp_uri_schemes[i])) == 0 &&
+ uri[strlen (winhttp_uri_schemes[i])] == ':')
+ return _g_winhttp_file_new (winhttp_vfs, uri);
/* For other URIs fallback to the wrapped GVfs */
- if (ret == NULL)
- ret = g_vfs_get_file_for_uri (winhttp_vfs->wrapped_vfs, uri);
-
- g_assert (ret != NULL);
-
- return g_steal_pointer (&ret);
+ return g_vfs_get_file_for_uri (winhttp_vfs->wrapped_vfs, uri);
}
static const gchar * const *
diff --git a/glib.supp b/glib.supp
index 4056502ac..288d846e1 100644
--- a/glib.supp
+++ b/glib.supp
@@ -706,6 +706,13 @@
...
fun:g_private_set_alloc0
}
+{
+ g_private_set_alloc0-calloc
+ Memcheck:Leak
+ fun:calloc
+ ...
+ fun:g_private_set_alloc0
+}
# Thread-private GMainContext stack
{
diff --git a/glib/docs.c b/glib/docs.c
index 9a722b8cd..729497afd 100644
--- a/glib/docs.c
+++ b/glib/docs.c
@@ -1845,23 +1845,6 @@
* arrays or arrays on the stack.
*/
-/**
- * G_ALIGNOF
- * @a: a type-name
- *
- * Return the minimal alignment required by the platform ABI for values of the given
- * type. The address of a variable or struct member of the given type must always be
- * a multiple of this alignment. For example, most platforms require int variables
- * to be aligned at a 4-byte boundary, so `G_ALIGNOF (int)` is 4 on most platforms.
- *
- * Note this is not necessarily the same as the value returned by GCC’s
- * `__alignof__` operator, which returns the preferred alignment for a type.
- * The preferred alignment may be a stricter alignment than the minimal
- * alignment.
- *
- * Since: 2.60
- */
-
/* Miscellaneous Macros {{{1 */
/**
@@ -1874,20 +1857,6 @@
*/
/**
- * G_INLINE_FUNC:
- *
- * This macro used to be used to conditionally define inline functions
- * in a compatible way before this feature was supported in all
- * compilers. These days, GLib requires inlining support from the
- * compiler, so your GLib-using programs can safely assume that the
- * "inline" keywork works properly.
- *
- * Never use this macro anymore. Just say "static inline".
- *
- * Deprecated: 2.48: Use "static inline" instead
- */
-
-/**
* G_STMT_START:
*
* Used within multi-statement macros so that they can be used in places
@@ -2039,157 +2008,6 @@
*/
/**
- * G_GNUC_CONST:
- *
- * Expands to the GNU C const function attribute if the compiler is gcc.
- * Declaring a function as const enables better optimization of calls to
- * the function. A const function doesn't examine any values except its
- * parameters, and has no effects except its return value.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * A function that has pointer arguments and examines the data pointed to
- * must not be declared const. Likewise, a function that calls a non-const
- * function usually must not be const. It doesn't make sense for a const
- * function to return void.
- */
-
-/**
- * G_GNUC_PURE:
- *
- * Expands to the GNU C pure function attribute if the compiler is gcc.
- * Declaring a function as pure enables better optimization of calls to
- * the function. A pure function has no effects except its return value
- * and the return value depends only on the parameters and/or global
- * variables.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- */
-
-/**
- * G_GNUC_NO_INLINE:
- *
- * Expands to the GNU C `noinline` function attribute if the compiler is gcc.
- * If the compiler is not gcc, this macro expands to nothing.
- *
- * Declaring a function as `noinline` prevents the function from being
- * considered for inlining.
- *
- * The attribute may be placed before the declaration, right before the
- * `static` keyword.
- *
- * See the
- * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noinline-function-attribute)
- * for more details.
- *
- * Since: 2.58
- */
-
-/**
- * G_GNUC_MALLOC:
- *
- * Expands to the
- * [GNU C `malloc` function attribute](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-functions-that-behave-like-malloc)
- * if the compiler is gcc.
- * Declaring a function as `malloc` enables better optimization of the function,
- * but must only be done if the allocation behaviour of the function is fully
- * understood, otherwise miscompilation can result.
- *
- * A function can have the `malloc` attribute if it returns a pointer which is
- * guaranteed to not alias with any other pointer valid when the function
- * returns, and moreover no pointers to valid objects occur in any storage
- * addressed by the returned pointer.
- *
- * In practice, this means that `G_GNUC_MALLOC` can be used with any function
- * which returns unallocated or zeroed-out memory, but not with functions which
- * return initialised structures containing other pointers, or with functions
- * that reallocate memory. This definition changed in GLib 2.58 to match the
- * stricter definition introduced around GCC 5.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the
- * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-functions-that-behave-like-malloc)
- * for more details.
- *
- * Since: 2.6
- */
-
-/**
- * G_GNUC_ALLOC_SIZE:
- * @x: the index of the argument specifying the allocation size
- *
- * Expands to the GNU C alloc_size function attribute if the compiler
- * is a new enough gcc. This attribute tells the compiler that the
- * function returns a pointer to memory of a size that is specified
- * by the @xth function parameter.
- *
- * Place the attribute after the function declaration, just before the
- * semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * Since: 2.18
- */
-
-/**
- * G_GNUC_ALLOC_SIZE2:
- * @x: the index of the argument specifying one factor of the allocation size
- * @y: the index of the argument specifying the second factor of the allocation size
- *
- * Expands to the GNU C alloc_size function attribute if the compiler is a
- * new enough gcc. This attribute tells the compiler that the function returns
- * a pointer to memory of a size that is specified by the product of two
- * function parameters.
- *
- * Place the attribute after the function declaration, just before the
- * semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * Since: 2.18
- */
-
-/**
- * G_GNUC_DEPRECATED:
- *
- * Expands to the GNU C deprecated attribute if the compiler is gcc.
- * It can be used to mark typedefs, variables and functions as deprecated.
- * When called with the `-Wdeprecated-declarations` option,
- * gcc will generate warnings when deprecated interfaces are used.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * Since: 2.2
- */
-
-/**
- * G_GNUC_DEPRECATED_FOR:
- * @f: the intended replacement for the deprecated symbol,
- * such as the name of a function
- *
- * Like %G_GNUC_DEPRECATED, but names the intended replacement for the
- * deprecated symbol if the version of gcc in use is new enough to support
- * custom deprecation messages.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * Note that if @f is a macro, it will be expanded in the warning message.
- * You can enclose it in quotes to prevent this. (The quotes will show up
- * in the warning, but it's better than showing the macro expansion.)
- *
- * Since: 2.26
- */
-
-/**
* G_GNUC_BEGIN_IGNORE_DEPRECATIONS:
*
* Tells gcc (if it is a new enough version) to temporarily stop emitting
@@ -2205,6 +2023,16 @@
* This macro can be used either inside or outside of a function body,
* but must appear on a line by itself.
*
+ * |[<!-- language="C" --
+ * static void
+ * test_deprecated_function (void)
+ * {
+ * G_GNUC_BEGIN_IGNORE_DEPRECATIONS
+ * g_assert_cmpint (my_mistake (), ==, 42);
+ * G_GNUC_END_IGNORE_DEPRECATIONS
+ * }
+ * ]|
+ *
* Since: 2.32
*/
@@ -2229,6 +2057,11 @@
* meant to be portable across different compilers and must be placed
* before the function declaration.
*
+ * |[<!-- language="C" --
+ * G_DEPRECATED
+ * int my_mistake (void);
+ * ]|
+ *
* Since: 2.32
*/
@@ -2241,6 +2074,11 @@
* is meant to be portable across different compilers and must be placed
* before the function declaration.
*
+ * |[<!-- language="C" --
+ * G_DEPRECATED_FOR(my_replacement)
+ * int my_mistake (void);
+ * ]|
+ *
* Since: 2.32
*/
@@ -2265,165 +2103,6 @@
*/
/**
- * G_GNUC_NORETURN:
- *
- * Expands to the GNU C noreturn function attribute if the compiler is gcc.
- * It is used for declaring functions which never return. It enables
- * optimization of the function, and avoids possible compiler warnings.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- */
-
-/**
- * G_GNUC_FALLTHROUGH:
- *
- * Expands to the GNU C fallthrough statement attribute if the compiler is gcc.
- * This allows declaring case statement to explicitly fall through in switch
- * statements. To enable this feature, use -Wimplicit-fallthrough during
- * compilation.
- *
- * Put the attribute right before the case statement you want to fall through
- * to.
- *
- * See the GNU C documentation for more details.
- *
- * Since: 2.60
- */
-
-/**
- * G_GNUC_UNUSED:
- *
- * Expands to the GNU C unused function attribute if the compiler is gcc.
- * It is used for declaring functions and arguments which may never be used.
- * It avoids possible compiler warnings.
- *
- * For functions, place the attribute after the declaration, just before the
- * semicolon. For arguments, place the attribute at the beginning of the
- * argument declaration.
- *
- * |[<!-- language="C" -->
- * void my_unused_function (G_GNUC_UNUSED gint unused_argument,
- * gint other_argument) G_GNUC_UNUSED;
- * ]|
- *
- * See the GNU C documentation for more details.
- */
-
-/**
- * G_GNUC_PRINTF:
- * @format_idx: the index of the argument corresponding to the
- * format string (the arguments are numbered from 1)
- * @arg_idx: the index of the first of the format arguments, or 0 if
- * there are no format arguments
- *
- * Expands to the GNU C format function attribute if the compiler is gcc.
- * This is used for declaring functions which take a variable number of
- * arguments, with the same syntax as printf(). It allows the compiler
- * to type-check the arguments passed to the function.
- *
- * Place the attribute after the function declaration, just before the
- * semicolon.
- *
- * See the
- * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
- * for more details.
- *
- * |[<!-- language="C" -->
- * gint g_snprintf (gchar *string,
- * gulong n,
- * gchar const *format,
- * ...) G_GNUC_PRINTF (3, 4);
- * ]|
- */
-
-/**
- * G_GNUC_SCANF:
- * @format_idx: the index of the argument corresponding to
- * the format string (the arguments are numbered from 1)
- * @arg_idx: the index of the first of the format arguments, or 0 if
- * there are no format arguments
- *
- * Expands to the GNU C format function attribute if the compiler is gcc.
- * This is used for declaring functions which take a variable number of
- * arguments, with the same syntax as scanf(). It allows the compiler
- * to type-check the arguments passed to the function.
- *
- * See the
- * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
- * for details.
- */
-
-/**
- * G_GNUC_STRFTIME:
- * @format_idx: the index of the argument corresponding to
- * the format string (the arguments are numbered from 1)
- *
- * Expands to the GNU C strftime format function attribute if the compiler
- * is gcc. This is used for declaring functions which take a format argument
- * which is passed to strftime() or an API implementing its formats. It allows
- * the compiler check the format passed to the function.
- *
- * See the
- * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
- * for details.
- *
- * Since: 2.60
- */
-
-/**
- * G_GNUC_FORMAT:
- * @arg_idx: the index of the argument
- *
- * Expands to the GNU C format_arg function attribute if the compiler
- * is gcc. This function attribute specifies that a function takes a
- * format string for a printf(), scanf(), strftime() or strfmon() style
- * function and modifies it, so that the result can be passed to a printf(),
- * scanf(), strftime() or strfmon() style function (with the remaining
- * arguments to the format function the same as they would have been
- * for the unmodified string).
- *
- * Place the attribute after the function declaration, just before the
- * semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * |[<!-- language="C" -->
- * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2);
- * ]|
- */
-
-/**
- * G_GNUC_NULL_TERMINATED:
- *
- * Expands to the GNU C sentinel function attribute if the compiler is gcc.
- * This function attribute only applies to variadic functions and instructs
- * the compiler to check that the argument list is terminated with an
- * explicit %NULL.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * Since: 2.8
- */
-
-/**
- * G_GNUC_WARN_UNUSED_RESULT:
- *
- * Expands to the GNU C warn_unused_result function attribute if the compiler
- * is gcc. This function attribute makes the compiler emit a warning if the
- * result of a function call is ignored.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- *
- * Since: 2.10
- */
-
-/**
* G_GNUC_FUNCTION:
*
* Expands to "" on all modern compilers, and to __FUNCTION__ on gcc
@@ -2442,19 +2121,6 @@
*/
/**
- * G_GNUC_NO_INSTRUMENT:
- *
- * Expands to the GNU C no_instrument_function function attribute if the
- * compiler is gcc. Functions with this attribute will not be instrumented
- * for profiling, when the compiler is called with the
- * `-finstrument-functions` option.
- *
- * Place the attribute after the declaration, just before the semicolon.
- *
- * See the GNU C documentation for more details.
- */
-
-/**
* G_GNUC_INTERNAL:
*
* This attribute can be used for marking library functions as being used
@@ -2483,18 +2149,6 @@
*/
/**
- * G_GNUC_MAY_ALIAS:
- *
- * Expands to the GNU C may_alias type attribute if the compiler is gcc.
- * Types with this attribute will not be subjected to type-based alias
- * analysis, but are assumed to alias with any other type, just like char.
- *
- * See the GNU C documentation for details.
- *
- * Since: 2.14
- */
-
-/**
* G_LIKELY:
* @expr: the expression
*
diff --git a/glib/garcbox.c b/glib/garcbox.c
index 128d62d5c..49b62ccb8 100644
--- a/glib/garcbox.c
+++ b/glib/garcbox.c
@@ -152,7 +152,7 @@
* g_atomic_rc_box_release_full (data, (GDestroyNotify) my_data_struct_clear);
* }
*
- * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_clear)
+ * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_release)
* ]|
*
* Since: 2.58.
diff --git a/glib/gbacktrace.c b/glib/gbacktrace.c
index e83079985..34cb1ce46 100644
--- a/glib/gbacktrace.c
+++ b/glib/gbacktrace.c
@@ -125,6 +125,10 @@ volatile gboolean glib_on_error_halt = TRUE;
* If "[P]roceed" is selected, the function returns.
*
* This function may cause different actions on non-UNIX platforms.
+ *
+ * On Windows consider using the `G_DEBUGGER` environment
+ * variable (see [Running GLib Applications](glib-running.html)) and
+ * calling g_on_error_stack_trace() instead.
*/
void
g_on_error_query (const gchar *prg_name)
@@ -207,6 +211,12 @@ g_on_error_query (const gchar *prg_name)
* gdk_init().
*
* This function may cause different actions on non-UNIX platforms.
+ *
+ * When running on Windows, this function is *not* called by
+ * g_on_error_query(). If called directly, it will raise an
+ * exception, which will crash the program. If the `G_DEBUGGER` environment
+ * variable is set, a debugger will be invoked to attach and
+ * handle that exception (see [Running GLib Applications](glib-running.html)).
*/
void
g_on_error_stack_trace (const gchar *prg_name)
diff --git a/glib/gconstructor.h b/glib/gconstructor.h
index 603c2dde6..dccb0314c 100644
--- a/glib/gconstructor.h
+++ b/glib/gconstructor.h
@@ -28,8 +28,6 @@
#elif defined (_MSC_VER) && (_MSC_VER >= 1500)
/* Visual studio 2008 and later has _Pragma */
-#include <stdlib.h>
-
#define G_HAS_CONSTRUCTORS 1
/* We do some weird things to avoid the constructors being optimized
diff --git a/glib/gconvert.c b/glib/gconvert.c
index 707867951..c5857df1c 100644
--- a/glib/gconvert.c
+++ b/glib/gconvert.c
@@ -52,14 +52,6 @@
#include "glibintl.h"
-#if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H)
-#error GNU libiconv in use but included iconv.h not from libiconv
-#endif
-#if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H) \
- && !defined (__APPLE_CC__) && !defined (__LP_64__)
-#error GNU libiconv not in use but included iconv.h is from libiconv
-#endif
-
/**
* SECTION:conversions
diff --git a/glib/gdatetime.c b/glib/gdatetime.c
index 7c94adf56..c286954c4 100644
--- a/glib/gdatetime.c
+++ b/glib/gdatetime.c
@@ -1304,7 +1304,10 @@ parse_iso8601_date (const gchar *text, gsize length,
static GTimeZone *
parse_iso8601_timezone (const gchar *text, gsize length, gssize *tz_offset)
{
- gint i, tz_length, offset_sign = 1, offset_hours, offset_minutes;
+ gint i, tz_length, offset_hours, offset_minutes;
+#ifndef G_DISABLE_ASSERT
+ gint offset_sign = 1;
+#endif
GTimeZone *tz;
/* UTC uses Z suffix */
@@ -1318,7 +1321,9 @@ parse_iso8601_timezone (const gchar *text, gsize length, gssize *tz_offset)
for (i = length - 1; i >= 0; i--)
if (text[i] == '+' || text[i] == '-')
{
+#ifndef G_DISABLE_ASSERT
offset_sign = text[i] == '-' ? -1 : 1;
+#endif
break;
}
if (i < 0)
@@ -1353,14 +1358,8 @@ parse_iso8601_timezone (const gchar *text, gsize length, gssize *tz_offset)
tz = g_time_zone_new (text + i);
/* Double-check that the GTimeZone matches our interpretation of the timezone.
- * This can fail because our interpretation is less strict than (for example)
- * parse_time() in gtimezone.c, which restricts the range of the parsed
- * integers. */
- if (g_time_zone_get_offset (tz, 0) != offset_sign * (offset_hours * 3600 + offset_minutes * 60))
- {
- g_time_zone_unref (tz);
- return NULL;
- }
+ * 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;
}
@@ -2780,7 +2779,7 @@ format_z (GString *outstr,
}
#ifdef HAVE_LANGINFO_OUTDIGIT
-/** Initializes the array with UTF-8 encoded alternate digits suitable for use
+/* Initializes the array with UTF-8 encoded alternate digits suitable for use
* in current locale. Returns NULL when current locale does not use alternate
* digits or there was an error converting them to UTF-8.
*/
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index d6beaa5c0..676c08c21 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -2090,7 +2090,7 @@ gchar *
g_file_read_link (const gchar *filename,
GError **error)
{
-#if defined (HAVE_READLINK) || defined (G_OS_WIN32)
+#if defined (HAVE_READLINK)
gchar *buffer;
size_t size;
gssize read_size;
@@ -2103,11 +2103,7 @@ g_file_read_link (const gchar *filename,
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;
@@ -2128,6 +2124,27 @@ g_file_read_link (const gchar *filename,
size *= 2;
buffer = g_realloc (buffer, size);
}
+#elif defined (G_OS_WIN32)
+ gchar *buffer;
+ gssize read_size;
+
+ g_return_val_if_fail (filename != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
+
+ read_size = g_win32_readlink_utf8 (filename, NULL, 0, &buffer, TRUE);
+ if (read_size < 0)
+ {
+ int saved_errno = errno;
+ set_file_error (error,
+ filename,
+ _("Failed to read the symbolic link “%s”: %s"),
+ saved_errno);
+ return NULL;
+ }
+ else if (read_size == 0)
+ return strdup ("");
+ else
+ return buffer;
#else
g_return_val_if_fail (filename != NULL, NULL);
g_return_val_if_fail (error == NULL || *error == NULL, NULL);
diff --git a/glib/ghash.c b/glib/ghash.c
index c8c488266..1f3a5ed36 100644
--- a/glib/ghash.c
+++ b/glib/ghash.c
@@ -38,7 +38,6 @@
#include "gtestutils.h"
#include "gslice.h"
#include "grefcount.h"
-#include "gvalgrind.h"
/* The following #pragma is here so we can do this...
*
@@ -247,7 +246,7 @@
struct _GHashTable
{
- gint size;
+ gsize size;
gint mod;
guint mask;
gint nnodes;
@@ -280,9 +279,9 @@ typedef struct
GHashTable *hash_table;
gpointer dummy1;
gpointer dummy2;
- int position;
+ gint position;
gboolean dummy3;
- int version;
+ gint version;
} RealIter;
G_STATIC_ASSERT (sizeof (GHashTableIter) == sizeof (RealIter));
@@ -556,58 +555,15 @@ g_hash_table_remove_node (GHashTable *hash_table,
}
/*
- * g_hash_table_setup_storage:
- * @hash_table: our #GHashTable
- *
- * Initialise the hash table size, mask, mod, and arrays.
- */
-static void
-g_hash_table_setup_storage (GHashTable *hash_table)
-{
- gboolean small;
-
- /* We want to use small arrays only if:
- * - we are running on a system where that makes sense (64 bit); and
- * - we are not running under valgrind.
- */
- small = FALSE;
-
-#ifdef USE_SMALL_ARRAYS
- small = TRUE;
-
-# ifdef ENABLE_VALGRIND
- if (RUNNING_ON_VALGRIND)
- small = FALSE;
-# endif
-#endif
-
- g_hash_table_set_shift (hash_table, HASH_TABLE_MIN_SHIFT);
-
- hash_table->have_big_keys = !small;
- hash_table->have_big_values = !small;
-
- hash_table->keys = g_hash_table_realloc_key_or_value_array (NULL, hash_table->size, hash_table->have_big_keys);
- hash_table->values = hash_table->keys;
- hash_table->hashes = g_new0 (guint, hash_table->size);
-}
-
-/*
* g_hash_table_remove_all_nodes:
* @hash_table: our #GHashTable
* @notify: %TRUE if the destroy notify handlers are to be called
*
- * Removes all nodes from the table.
+ * Removes all nodes from the table. Since this may be a precursor to
+ * freeing the table entirely, no resize is performed.
*
* If @notify is %TRUE then the destroy notify functions are called
* for the key and value of the hash node.
- *
- * Since this may be a precursor to freeing the table entirely, we'd
- * ideally perform no resize, and we can indeed avoid that in some
- * cases. However: in the case that we'll be making callbacks to user
- * code (via destroy notifies) we need to consider that the user code
- * might call back into the table again. In this case, we setup a new
- * set of arrays so that any callers will see an empty (but valid)
- * table.
*/
static void
g_hash_table_remove_all_nodes (GHashTable *hash_table,
@@ -621,8 +577,6 @@ g_hash_table_remove_all_nodes (GHashTable *hash_table,
gpointer *old_keys;
gpointer *old_values;
guint *old_hashes;
- gboolean old_have_big_keys;
- gboolean old_have_big_values;
/* If the hash table is already empty, there is nothing to be done. */
if (hash_table->nnodes == 0)
@@ -631,7 +585,6 @@ g_hash_table_remove_all_nodes (GHashTable *hash_table,
hash_table->nnodes = 0;
hash_table->noccupied = 0;
- /* Easy case: no callbacks, so we just zero out the arrays */
if (!notify ||
(hash_table->key_destroy_func == NULL &&
hash_table->value_destroy_func == NULL))
@@ -652,52 +605,43 @@ g_hash_table_remove_all_nodes (GHashTable *hash_table,
return;
}
- /* Hard case: we need to do user callbacks. There are two
- * possibilities here:
- *
- * 1) there are no outstanding references on the table and therefore
- * nobody should be calling into it again (destroying == true)
- *
- * 2) there are outstanding references, and there may be future
- * calls into the table, either after we return, or from the destroy
- * notifies that we're about to do (destroying == false)
- *
- * We handle both cases by taking the current state of the table into
- * local variables and replacing it with something else: in the "no
- * outstanding references" cases we replace it with a bunch of
- * null/zero values so that any access to the table will fail. In the
- * "may receive future calls" case, we reinitialise the struct to
- * appear like a newly-created empty table.
- *
- * In both cases, we take over the references for the current state,
- * freeing them below.
- */
+ /* Keep the old storage space around to iterate over it. */
old_size = hash_table->size;
- old_have_big_keys = hash_table->have_big_keys;
- old_have_big_values = hash_table->have_big_values;
- old_keys = g_steal_pointer (&hash_table->keys);
- old_values = g_steal_pointer (&hash_table->values);
- old_hashes = g_steal_pointer (&hash_table->hashes);
-
+ old_keys = hash_table->keys;
+ old_values = hash_table->values;
+ old_hashes = hash_table->hashes;
+
+ /* Now create a new storage space; If the table is destroyed we can use the
+ * shortcut of not creating a new storage. This saves the allocation at the
+ * cost of not allowing any recursive access.
+ * However, the application doesn't own any reference anymore, so access
+ * is not allowed. If accesses are done, then either an assert or crash
+ * *will* happen. */
+ g_hash_table_set_shift (hash_table, HASH_TABLE_MIN_SHIFT);
if (!destruction)
- /* Any accesses will see an empty table */
- g_hash_table_setup_storage (hash_table);
+ {
+ hash_table->keys = g_hash_table_realloc_key_or_value_array (NULL, hash_table->size, FALSE);
+ hash_table->values = hash_table->keys;
+ hash_table->hashes = g_new0 (guint, hash_table->size);
+ }
else
- /* Will cause a quick crash on any attempted access */
- hash_table->size = hash_table->mod = hash_table->mask = 0;
+ {
+ hash_table->keys = NULL;
+ hash_table->values = NULL;
+ hash_table->hashes = NULL;
+ }
- /* Now do the actual destroy notifies */
for (i = 0; i < old_size; i++)
{
if (HASH_IS_REAL (old_hashes[i]))
{
- key = g_hash_table_fetch_key_or_value (old_keys, i, old_have_big_keys);
- value = g_hash_table_fetch_key_or_value (old_values, i, old_have_big_values);
+ key = g_hash_table_fetch_key_or_value (old_keys, i, hash_table->have_big_keys);
+ value = g_hash_table_fetch_key_or_value (old_values, i, hash_table->have_big_values);
old_hashes[i] = UNUSED_HASH_VALUE;
- g_hash_table_assign_key_or_value (old_keys, i, old_have_big_keys, NULL);
- g_hash_table_assign_key_or_value (old_values, i, old_have_big_values, NULL);
+ g_hash_table_assign_key_or_value (old_keys, i, hash_table->have_big_keys, NULL);
+ g_hash_table_assign_key_or_value (old_values, i, hash_table->have_big_values, NULL);
if (hash_table->key_destroy_func != NULL)
hash_table->key_destroy_func (key);
@@ -707,6 +651,9 @@ g_hash_table_remove_all_nodes (GHashTable *hash_table,
}
}
+ hash_table->have_big_keys = FALSE;
+ hash_table->have_big_values = FALSE;
+
/* Destroy old storage space. */
if (old_keys != old_values)
g_free (old_values);
@@ -851,7 +798,7 @@ static void
g_hash_table_resize (GHashTable *hash_table)
{
guint32 *reallocated_buckets_bitmap;
- guint old_size;
+ gsize old_size;
gboolean is_a_set;
old_size = hash_table->size;
@@ -1069,6 +1016,7 @@ g_hash_table_new_full (GHashFunc hash_func,
GHashTable *hash_table;
hash_table = g_slice_new (GHashTable);
+ g_hash_table_set_shift (hash_table, HASH_TABLE_MIN_SHIFT);
g_atomic_ref_count_init (&hash_table->ref_count);
hash_table->nnodes = 0;
hash_table->noccupied = 0;
@@ -1079,8 +1027,17 @@ g_hash_table_new_full (GHashFunc hash_func,
#endif
hash_table->key_destroy_func = key_destroy_func;
hash_table->value_destroy_func = value_destroy_func;
+ hash_table->keys = g_hash_table_realloc_key_or_value_array (NULL, hash_table->size, FALSE);
+ hash_table->values = hash_table->keys;
+ hash_table->hashes = g_new0 (guint, hash_table->size);
- g_hash_table_setup_storage (hash_table);
+#ifdef USE_SMALL_ARRAYS
+ hash_table->have_big_keys = FALSE;
+ hash_table->have_big_values = FALSE;
+#else
+ hash_table->have_big_keys = TRUE;
+ hash_table->have_big_values = TRUE;
+#endif
return hash_table;
}
@@ -1148,14 +1105,14 @@ g_hash_table_iter_next (GHashTableIter *iter,
#ifndef G_DISABLE_ASSERT
g_return_val_if_fail (ri->version == ri->hash_table->version, FALSE);
#endif
- g_return_val_if_fail (ri->position < ri->hash_table->size, FALSE);
+ g_return_val_if_fail (ri->position < (gssize) ri->hash_table->size, FALSE);
position = ri->position;
do
{
position++;
- if (position >= ri->hash_table->size)
+ if (position >= (gssize) ri->hash_table->size)
{
ri->position = position;
return FALSE;
@@ -1198,7 +1155,7 @@ iter_remove_or_steal (RealIter *ri, gboolean notify)
g_return_if_fail (ri->version == ri->hash_table->version);
#endif
g_return_if_fail (ri->position >= 0);
- g_return_if_fail (ri->position < ri->hash_table->size);
+ g_return_if_fail ((gsize) ri->position < ri->hash_table->size);
g_hash_table_remove_node (ri->hash_table, ri->position, notify);
@@ -1382,7 +1339,7 @@ g_hash_table_iter_replace (GHashTableIter *iter,
g_return_if_fail (ri->version == ri->hash_table->version);
#endif
g_return_if_fail (ri->position >= 0);
- g_return_if_fail (ri->position < ri->hash_table->size);
+ g_return_if_fail ((gsize) ri->position < ri->hash_table->size);
node_hash = ri->hash_table->hashes[ri->position];
@@ -1923,7 +1880,7 @@ g_hash_table_foreach_remove_or_steal (GHashTable *hash_table,
gboolean notify)
{
guint deleted = 0;
- gint i;
+ gsize i;
#ifndef G_DISABLE_ASSERT
gint version = hash_table->version;
#endif
@@ -2032,7 +1989,7 @@ g_hash_table_foreach (GHashTable *hash_table,
GHFunc func,
gpointer user_data)
{
- gint i;
+ gsize i;
#ifndef G_DISABLE_ASSERT
gint version;
#endif
@@ -2090,7 +2047,7 @@ g_hash_table_find (GHashTable *hash_table,
GHRFunc predicate,
gpointer user_data)
{
- gint i;
+ gsize i;
#ifndef G_DISABLE_ASSERT
gint version;
#endif
@@ -2162,7 +2119,7 @@ g_hash_table_size (GHashTable *hash_table)
GList *
g_hash_table_get_keys (GHashTable *hash_table)
{
- gint i;
+ gsize i;
GList *retval;
g_return_val_if_fail (hash_table != NULL, NULL);
@@ -2210,7 +2167,7 @@ g_hash_table_get_keys_as_array (GHashTable *hash_table,
guint *length)
{
gpointer *result;
- guint i, j = 0;
+ gsize i, j = 0;
result = g_new (gpointer, hash_table->nnodes + 1);
for (i = 0; i < hash_table->size; i++)
@@ -2248,7 +2205,7 @@ g_hash_table_get_keys_as_array (GHashTable *hash_table,
GList *
g_hash_table_get_values (GHashTable *hash_table)
{
- gint i;
+ gsize i;
GList *retval;
g_return_val_if_fail (hash_table != NULL, NULL);
diff --git a/glib/giochannel.c b/glib/giochannel.c
index 88fd8c81d..1956e9dc6 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -1311,7 +1311,9 @@ g_io_channel_set_encoding (GIOChannel *channel,
GError **error)
{
GIConv read_cd, write_cd;
+#ifndef G_DISABLE_ASSERT
gboolean did_encode;
+#endif
g_return_val_if_fail (channel != NULL, G_IO_STATUS_ERROR);
g_return_val_if_fail ((error == NULL) || (*error == NULL), G_IO_STATUS_ERROR);
@@ -1335,7 +1337,9 @@ g_io_channel_set_encoding (GIOChannel *channel,
channel->partial_write_buf[0] = '\0';
}
+#ifndef G_DISABLE_ASSERT
did_encode = channel->do_encode;
+#endif
if (!encoding || strcmp (encoding, "UTF8") == 0 || strcmp (encoding, "UTF-8") == 0)
{
@@ -2176,6 +2180,7 @@ g_io_channel_write_chars (GIOChannel *channel,
gsize *bytes_written,
GError **error)
{
+ gsize count_unsigned;
GIOStatus status;
gssize wrote_bytes = 0;
@@ -2186,8 +2191,9 @@ g_io_channel_write_chars (GIOChannel *channel,
if ((count < 0) && buf)
count = strlen (buf);
-
- if (count == 0)
+ count_unsigned = count;
+
+ if (count_unsigned == 0)
{
if (bytes_written)
*bytes_written = 0;
@@ -2195,7 +2201,7 @@ g_io_channel_write_chars (GIOChannel *channel,
}
g_return_val_if_fail (buf != NULL, G_IO_STATUS_ERROR);
- g_return_val_if_fail (count > 0, G_IO_STATUS_ERROR);
+ g_return_val_if_fail (count_unsigned > 0, G_IO_STATUS_ERROR);
/* Raw write case */
@@ -2206,7 +2212,8 @@ g_io_channel_write_chars (GIOChannel *channel,
g_assert (!channel->write_buf || channel->write_buf->len == 0);
g_assert (channel->partial_write_buf[0] == '\0');
- status = channel->funcs->io_write (channel, buf, count, &tmp_bytes, error);
+ status = channel->funcs->io_write (channel, buf, count_unsigned,
+ &tmp_bytes, error);
if (bytes_written)
*bytes_written = tmp_bytes;
@@ -2282,7 +2289,7 @@ g_io_channel_write_chars (GIOChannel *channel,
if (!channel->encoding)
{
- gssize write_this = MIN (space_in_buf, count - wrote_bytes);
+ gssize write_this = MIN (space_in_buf, count_unsigned - wrote_bytes);
g_string_append_len (channel->write_buf, buf, write_this);
buf += write_this;
@@ -2302,7 +2309,7 @@ g_io_channel_write_chars (GIOChannel *channel,
from_buf = channel->partial_write_buf;
from_buf_old_len = strlen (channel->partial_write_buf);
g_assert (from_buf_old_len > 0);
- from_buf_len = MIN (6, from_buf_old_len + count);
+ from_buf_len = MIN (6, from_buf_old_len + count_unsigned);
memcpy (channel->partial_write_buf + from_buf_old_len, buf,
from_buf_len - from_buf_old_len);
@@ -2310,7 +2317,7 @@ g_io_channel_write_chars (GIOChannel *channel,
else
{
from_buf = buf;
- from_buf_len = count - wrote_bytes;
+ from_buf_len = count_unsigned - wrote_bytes;
from_buf_old_len = 0;
}
@@ -2400,7 +2407,7 @@ reconvert:
memcpy (channel->partial_write_buf, from_buf, left_len);
channel->partial_write_buf[left_len] = '\0';
if (bytes_written)
- *bytes_written = count;
+ *bytes_written = count_unsigned;
return G_IO_STATUS_NORMAL;
}
@@ -2412,12 +2419,12 @@ reconvert:
* less than a full character
*/
- g_assert (count == from_buf_len - from_buf_old_len);
+ g_assert (count_unsigned == from_buf_len - from_buf_old_len);
channel->partial_write_buf[from_buf_len] = '\0';
if (bytes_written)
- *bytes_written = count;
+ *bytes_written = count_unsigned;
return G_IO_STATUS_NORMAL;
}
@@ -2479,7 +2486,7 @@ reconvert:
}
if (bytes_written)
- *bytes_written = count;
+ *bytes_written = count_unsigned;
return G_IO_STATUS_NORMAL;
}
diff --git a/glib/giounix.c b/glib/giounix.c
index fe1c76170..6ba442f15 100644
--- a/glib/giounix.c
+++ b/glib/giounix.c
@@ -107,7 +107,8 @@ GSourceFuncs g_io_watch_funcs = {
g_io_unix_prepare,
g_io_unix_check,
g_io_unix_dispatch,
- g_io_unix_finalize
+ g_io_unix_finalize,
+ NULL, NULL
};
static GIOFuncs unix_channel_funcs = {
diff --git a/glib/glib-init.c b/glib/glib-init.c
index 6ffe7933b..ed800dca1 100644
--- a/glib/glib-init.c
+++ b/glib/glib-init.c
@@ -286,6 +286,7 @@ DllMain (HINSTANCE hinstDLL,
{
case DLL_PROCESS_ATTACH:
glib_dll = hinstDLL;
+ g_crash_handler_win32_init ();
g_clock_win32_init ();
#ifdef THREADS_WIN32
g_thread_win32_init ();
@@ -306,6 +307,7 @@ DllMain (HINSTANCE hinstDLL,
if (lpvReserved == NULL)
g_thread_win32_process_detach ();
#endif
+ g_crash_handler_win32_deinit ();
break;
default:
diff --git a/glib/glib-init.h b/glib/glib-init.h
index 695dc044b..f44b9a4d2 100644
--- a/glib/glib-init.h
+++ b/glib/glib-init.h
@@ -36,6 +36,8 @@ void g_thread_win32_thread_detach (void);
void g_thread_win32_init (void);
void g_console_win32_init (void);
void g_clock_win32_init (void);
+void g_crash_handler_win32_init (void);
+void g_crash_handler_win32_deinit (void);
extern HMODULE glib_dll;
#endif
diff --git a/glib/glib-private.h b/glib/glib-private.h
index c002b4a6d..d0099236f 100644
--- a/glib/glib-private.h
+++ b/glib/glib-private.h
@@ -61,18 +61,20 @@ typedef struct {
/* See gstdio.c */
#ifdef G_OS_WIN32
- int (* g_win32_stat_utf8) (const gchar *filename,
- GWin32PrivateStat *buf);
+ int (* g_win32_stat_utf8) (const gchar *filename,
+ GWin32PrivateStat *buf);
- int (* g_win32_lstat_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_readlink_utf8) (const gchar *filename,
+ gchar *buf,
+ gsize buf_size,
+ gchar **alloc_buf,
+ gboolean terminate);
- int (* g_win32_fstat) (int fd,
- GWin32PrivateStat *buf);
+ int (* g_win32_fstat) (int fd,
+ GWin32PrivateStat *buf);
#endif
diff --git a/glib/glib-unix.c b/glib/glib-unix.c
index b616b8cbf..9328e7008 100644
--- a/glib/glib-unix.c
+++ b/glib/glib-unix.c
@@ -310,7 +310,7 @@ g_unix_fd_source_dispatch (GSource *source,
}
GSourceFuncs g_unix_fd_source_funcs = {
- NULL, NULL, g_unix_fd_source_dispatch, NULL
+ NULL, NULL, g_unix_fd_source_dispatch, NULL, NULL, NULL
};
/**
diff --git a/glib/glib_gdb.py b/glib/glib_gdb.py
index 37d01cb76..1cf2ed936 100644
--- a/glib/glib_gdb.py
+++ b/glib/glib_gdb.py
@@ -86,27 +86,11 @@ class GHashPrinter:
"Prints a GHashTable"
class _iterator:
- class _pointer_array:
- def __init__(self, ptr, big_items):
- self._big_items = big_items
- self._gpointer_type = gdb.lookup_type("gpointer")
- item_type = self._gpointer_type if self._big_items else gdb.lookup_type("guint")
-
- self._items = ptr.cast(item_type.pointer())
-
- def __getitem__(self, item):
- item = self._items[item]
-
- if not self._big_items:
- item = item.cast(self._gpointer_type)
-
- return item
-
def __init__(self, ht, keys_are_strings):
self.ht = ht
if ht != 0:
- self.keys = self._pointer_array(ht["keys"], ht["have_big_keys"])
- self.values = self._pointer_array(ht["values"], ht["have_big_values"])
+ self.keys = ht["keys"]
+ self.values = ht["values"]
self.hashes = ht["hashes"]
self.size = ht["size"]
self.pos = 0
diff --git a/glib/gmacros.h b/glib/gmacros.h
index 1fe6e760c..cde9f6b43 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -82,6 +82,21 @@
#undef G_INLINE_DEFINE_NEEDED
+/**
+ * G_INLINE_FUNC:
+ *
+ * This macro used to be used to conditionally define inline functions
+ * in a compatible way before this feature was supported in all
+ * compilers. These days, GLib requires inlining support from the
+ * compiler, so your GLib-using programs can safely assume that the
+ * "inline" keywork works properly.
+ *
+ * Never use this macro anymore. Just say "static inline".
+ *
+ * Deprecated: 2.48: Use "static inline" instead
+ */
+
+#ifndef G_DISABLE_DEPRECATED
/* For historical reasons we need to continue to support those who
* define G_IMPLEMENT_INLINES to mean "don't implement this here".
*/
@@ -91,9 +106,91 @@
#else
# define G_INLINE_FUNC static inline
#endif /* G_IMPLEMENT_INLINES */
+#endif /* !G_DISABLE_DEPRECATED */
/* Provide macros to feature the GCC function attribute.
*/
+
+/**
+ * G_GNUC_PURE:
+ *
+ * Expands to the GNU C `pure` function attribute if the compiler is gcc.
+ * Declaring a function as `pure` enables better optimization of calls to
+ * the function. A `pure` function has no effects except its return value
+ * and the return value depends only on the parameters and/or global
+ * variables.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * gboolean g_type_check_value (const GValue *value) G_GNUC_PURE;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute) for more details.
+ */
+
+/**
+ * G_GNUC_MALLOC:
+ *
+ * Expands to the
+ * [GNU C `malloc` function attribute](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-functions-that-behave-like-malloc)
+ * if the compiler is gcc.
+ * Declaring a function as `malloc` enables better optimization of the function,
+ * but must only be done if the allocation behaviour of the function is fully
+ * understood, otherwise miscompilation can result.
+ *
+ * A function can have the `malloc` attribute if it returns a pointer which is
+ * guaranteed to not alias with any other pointer valid when the function
+ * returns, and moreover no pointers to valid objects occur in any storage
+ * addressed by the returned pointer.
+ *
+ * In practice, this means that `G_GNUC_MALLOC` can be used with any function
+ * which returns unallocated or zeroed-out memory, but not with functions which
+ * return initialised structures containing other pointers, or with functions
+ * that reallocate memory. This definition changed in GLib 2.58 to match the
+ * stricter definition introduced around GCC 5.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
+ * ]|
+ *
+ * See the
+ * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-functions-that-behave-like-malloc)
+ * for more details.
+ *
+ * Since: 2.6
+ */
+
+/**
+ * G_GNUC_NO_INLINE:
+ *
+ * Expands to the GNU C `noinline` function attribute if the compiler is gcc.
+ * If the compiler is not gcc, this macro expands to nothing.
+ *
+ * Declaring a function as `noinline` prevents the function from being
+ * considered for inlining.
+ *
+ * The attribute may be placed before the declaration or definition,
+ * right before the `static` keyword.
+ *
+ * |[<!-- language="C" -->
+ * G_GNUC_NO_INLINE
+ * static int
+ * do_not_inline_this (void)
+ * {
+ * ...
+ * }
+ * ]|
+ *
+ * See the
+ * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noinline-function-attribute)
+ * for more details.
+ *
+ * Since: 2.58
+ */
+
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
#define G_GNUC_PURE __attribute__((__pure__))
#define G_GNUC_MALLOC __attribute__((__malloc__))
@@ -104,6 +201,25 @@
#define G_GNUC_NO_INLINE
#endif
+/**
+ * G_GNUC_NULL_TERMINATED:
+ *
+ * Expands to the GNU C `sentinel` function attribute if the compiler is gcc.
+ * This function attribute only applies to variadic functions and instructs
+ * the compiler to check that the argument list is terminated with an
+ * explicit %NULL.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * gchar *g_strconcat (const gchar *string1,
+ * ...) G_GNUC_NULL_TERMINATED;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-sentinel-function-attribute) for more details.
+ *
+ * Since: 2.8
+ */
#if __GNUC__ >= 4
#define G_GNUC_NULL_TERMINATED __attribute__((__sentinel__))
#else
@@ -150,6 +266,49 @@
#define g_macro__has_builtin(x) 0
#endif
+/**
+ * G_GNUC_ALLOC_SIZE:
+ * @x: the index of the argument specifying the allocation size
+ *
+ * Expands to the GNU C `alloc_size` function attribute if the compiler
+ * is a new enough gcc. This attribute tells the compiler that the
+ * function returns a pointer to memory of a size that is specified
+ * by the @xth function parameter.
+ *
+ * Place the attribute after the function declaration, just before the
+ * semicolon.
+ *
+ * |[<!-- language="C" -->
+ * gpointer g_malloc (gsize n_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE(1);
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute) for more details.
+ *
+ * Since: 2.18
+ */
+
+/**
+ * G_GNUC_ALLOC_SIZE2:
+ * @x: the index of the argument specifying one factor of the allocation size
+ * @y: the index of the argument specifying the second factor of the allocation size
+ *
+ * Expands to the GNU C `alloc_size` function attribute if the compiler is a
+ * new enough gcc. This attribute tells the compiler that the function returns
+ * a pointer to memory of a size that is specified by the product of two
+ * function parameters.
+ *
+ * Place the attribute after the function declaration, just before the
+ * semicolon.
+ *
+ * |[<!-- language="C" -->
+ * gpointer g_malloc_n (gsize n_blocks,
+ * gsize n_block_bytes) G_GNUC_MALLOC G_GNUC_ALLOC_SIZE2(1, 2);
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-alloc_005fsize-function-attribute) for more details.
+ *
+ * Since: 2.18
+ */
#if (!defined(__clang__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) || \
(defined(__clang__) && g_macro__has_attribute(__alloc_size__))
#define G_GNUC_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
@@ -159,6 +318,178 @@
#define G_GNUC_ALLOC_SIZE2(x,y)
#endif
+/**
+ * G_GNUC_PRINTF:
+ * @format_idx: the index of the argument corresponding to the
+ * format string (the arguments are numbered from 1)
+ * @arg_idx: the index of the first of the format arguments, or 0 if
+ * there are no format arguments
+ *
+ * Expands to the GNU C `format` function attribute if the compiler is gcc.
+ * This is used for declaring functions which take a variable number of
+ * arguments, with the same syntax as `printf()`. It allows the compiler
+ * to type-check the arguments passed to the function.
+ *
+ * Place the attribute after the function declaration, just before the
+ * semicolon.
+ *
+ * See the
+ * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
+ * for more details.
+ *
+ * |[<!-- language="C" -->
+ * gint g_snprintf (gchar *string,
+ * gulong n,
+ * gchar const *format,
+ * ...) G_GNUC_PRINTF (3, 4);
+ * ]|
+ */
+
+/**
+ * G_GNUC_SCANF:
+ * @format_idx: the index of the argument corresponding to
+ * the format string (the arguments are numbered from 1)
+ * @arg_idx: the index of the first of the format arguments, or 0 if
+ * there are no format arguments
+ *
+ * Expands to the GNU C `format` function attribute if the compiler is gcc.
+ * This is used for declaring functions which take a variable number of
+ * arguments, with the same syntax as `scanf()`. It allows the compiler
+ * to type-check the arguments passed to the function.
+ *
+ * |[<!-- language="C" -->
+ * int my_scanf (MyStream *stream,
+ * const char *format,
+ * ...) G_GNUC_SCANF (2, 3);
+ * int my_vscanf (MyStream *stream,
+ * const char *format,
+ * va_list ap) G_GNUC_SCANF (2, 0);
+ * ]|
+ *
+ * See the
+ * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
+ * for details.
+ */
+
+/**
+ * G_GNUC_STRFTIME:
+ * @format_idx: the index of the argument corresponding to
+ * the format string (the arguments are numbered from 1)
+ *
+ * Expands to the GNU C `strftime` format function attribute if the compiler
+ * is gcc. This is used for declaring functions which take a format argument
+ * which is passed to `strftime()` or an API implementing its formats. It allows
+ * the compiler check the format passed to the function.
+ *
+ * |[<!-- language="C" -->
+ * gsize my_strftime (MyBuffer *buffer,
+ * const char *format,
+ * const struct tm *tm) G_GNUC_STRFTIME (2);
+ * ]|
+ *
+ * See the
+ * [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-3288)
+ * for details.
+ *
+ * Since: 2.60
+ */
+
+/**
+ * G_GNUC_FORMAT:
+ * @arg_idx: the index of the argument
+ *
+ * Expands to the GNU C `format_arg` function attribute if the compiler
+ * is gcc. This function attribute specifies that a function takes a
+ * format string for a `printf()`, `scanf()`, `strftime()` or `strfmon()` style
+ * function and modifies it, so that the result can be passed to a `printf()`,
+ * `scanf()`, `strftime()` or `strfmon()` style function (with the remaining
+ * arguments to the format function the same as they would have been
+ * for the unmodified string).
+ *
+ * Place the attribute after the function declaration, just before the
+ * semicolon.
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-Wformat-nonliteral-1) for more details.
+ *
+ * |[<!-- language="C" -->
+ * gchar *g_dgettext (gchar *domain_name, gchar *msgid) G_GNUC_FORMAT (2);
+ * ]|
+ */
+
+/**
+ * G_GNUC_NORETURN:
+ *
+ * Expands to the GNU C `noreturn` function attribute if the compiler is gcc.
+ * It is used for declaring functions which never return. It enables
+ * optimization of the function, and avoids possible compiler warnings.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * void g_abort (void) G_GNUC_NORETURN;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-noreturn-function-attribute) for more details.
+ */
+
+/**
+ * G_GNUC_CONST:
+ *
+ * Expands to the GNU C `const` function attribute if the compiler is gcc.
+ * Declaring a function as `const` enables better optimization of calls to
+ * the function. A `const` function doesn't examine any values except its
+ * parameters, and has no effects except its return value.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * gchar g_ascii_tolower (gchar c) G_GNUC_CONST;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-const-function-attribute) for more details.
+ *
+ * A function that has pointer arguments and examines the data pointed to
+ * must not be declared `const`. Likewise, a function that calls a non-`const`
+ * function usually must not be `const`. It doesn't make sense for a `const`
+ * function to return `void`.
+ */
+
+/**
+ * G_GNUC_UNUSED:
+ *
+ * Expands to the GNU C `unused` function attribute if the compiler is gcc.
+ * It is used for declaring functions and arguments which may never be used.
+ * It avoids possible compiler warnings.
+ *
+ * For functions, place the attribute after the declaration, just before the
+ * semicolon. For arguments, place the attribute at the beginning of the
+ * argument declaration.
+ *
+ * |[<!-- language="C" -->
+ * void my_unused_function (G_GNUC_UNUSED gint unused_argument,
+ * gint other_argument) G_GNUC_UNUSED;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-unused-function-attribute) for more details.
+ */
+
+/**
+ * G_GNUC_NO_INSTRUMENT:
+ *
+ * Expands to the GNU C `no_instrument_function` function attribute if the
+ * compiler is gcc. Functions with this attribute will not be instrumented
+ * for profiling, when the compiler is called with the
+ * `-finstrument-functions` option.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * int do_uninteresting_things (void) G_GNUC_NO_INSTRUMENT;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-no_005finstrument_005ffunction-function-attribute) for more details.
+ */
+
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
#if !defined (__clang__) && G_GNUC_CHECK_VERSION (4, 4)
#define G_GNUC_PRINTF( format_idx, arg_idx ) \
@@ -200,18 +531,87 @@
#define G_GNUC_NO_INSTRUMENT
#endif /* !__GNUC__ */
+/**
+ * G_GNUC_FALLTHROUGH:
+ *
+ * Expands to the GNU C `fallthrough` statement attribute if the compiler is gcc.
+ * This allows declaring case statement to explicitly fall through in switch
+ * statements. To enable this feature, use `-Wimplicit-fallthrough` during
+ * compilation.
+ *
+ * Put the attribute right before the case statement you want to fall through
+ * to.
+ *
+ * |[<!-- language="C" -->
+ * switch (foo)
+ * {
+ * case 1:
+ * g_message ("it's 1");
+ * G_GNUC_FALLTHROUGH;
+ * case 2:
+ * g_message ("it's either 1 or 2");
+ * break;
+ * }
+ * ]|
+ *
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html#index-fallthrough-statement-attribute) for more details.
+ *
+ * Since: 2.60
+ */
#if __GNUC__ > 6
#define G_GNUC_FALLTHROUGH __attribute__((fallthrough))
#else
#define G_GNUC_FALLTHROUGH
#endif /* __GNUC__ */
+/**
+ * G_GNUC_DEPRECATED:
+ *
+ * Expands to the GNU C `deprecated` attribute if the compiler is gcc.
+ * It can be used to mark `typedef`s, variables and functions as deprecated.
+ * When called with the `-Wdeprecated-declarations` option,
+ * gcc will generate warnings when deprecated interfaces are used.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * int my_mistake (void) G_GNUC_DEPRECATED;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-deprecated-function-attribute) for more details.
+ *
+ * Since: 2.2
+ */
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
#define G_GNUC_DEPRECATED __attribute__((__deprecated__))
#else
#define G_GNUC_DEPRECATED
#endif /* __GNUC__ */
+/**
+ * G_GNUC_DEPRECATED_FOR:
+ * @f: the intended replacement for the deprecated symbol,
+ * such as the name of a function
+ *
+ * Like %G_GNUC_DEPRECATED, but names the intended replacement for the
+ * deprecated symbol if the version of gcc in use is new enough to support
+ * custom deprecation messages.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * int my_mistake (void) G_GNUC_DEPRECATED_FOR(my_replacement);
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-deprecated-function-attribute) for more details.
+ *
+ * Note that if @f is a macro, it will be expanded in the warning message.
+ * You can enclose it in quotes to prevent this. (The quotes will show up
+ * in the warning, but it's better than showing the macro expansion.)
+ *
+ * Since: 2.26
+ */
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
#define G_GNUC_DEPRECATED_FOR(f) \
__attribute__((deprecated("Use " #f " instead")))
@@ -248,12 +648,41 @@
#define G_GNUC_END_IGNORE_DEPRECATIONS
#endif
+/**
+ * G_GNUC_MAY_ALIAS:
+ *
+ * Expands to the GNU C `may_alias` type attribute if the compiler is gcc.
+ * Types with this attribute will not be subjected to type-based alias
+ * analysis, but are assumed to alias with any other type, just like `char`.
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-may_005falias-type-attribute) for details.
+ *
+ * Since: 2.14
+ */
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
#define G_GNUC_MAY_ALIAS __attribute__((may_alias))
#else
#define G_GNUC_MAY_ALIAS
#endif
+/**
+ * G_GNUC_WARN_UNUSED_RESULT:
+ *
+ * Expands to the GNU C `warn_unused_result` function attribute if the compiler
+ * is gcc. This function attribute makes the compiler emit a warning if the
+ * result of a function call is ignored.
+ *
+ * Place the attribute after the declaration, just before the semicolon.
+ *
+ * |[<!-- language="C" -->
+ * GList *g_list_append (GList *list,
+ * gpointer data) G_GNUC_WARN_UNUSED_RESULT;
+ * ]|
+ *
+ * See the [GNU C documentation](https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-warn_005funused_005fresult-function-attribute) for more details.
+ *
+ * Since: 2.10
+ */
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#define G_GNUC_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else
@@ -304,10 +733,10 @@
#endif
/* Provide a string identifying the current function, non-concatenatable */
-#if defined (__GNUC__) && defined (__cplusplus)
-#define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__))
-#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#if defined (__func__)
#define G_STRFUNC ((const char*) (__func__))
+#elif defined (__GNUC__) && defined (__cplusplus)
+#define G_STRFUNC ((const char*) (__PRETTY_FUNCTION__))
#elif defined (__GNUC__) || (defined(_MSC_VER) && (_MSC_VER > 1300))
#define G_STRFUNC ((const char*) (__FUNCTION__))
#else
@@ -416,6 +845,22 @@
* https://gitlab.gnome.org/GNOME/glib/merge_requests/538/diffs#note_390790.
*/
+/**
+ * G_ALIGNOF
+ * @type: a type-name
+ *
+ * Return the minimal alignment required by the platform ABI for values of the given
+ * type. The address of a variable or struct member of the given type must always be
+ * a multiple of this alignment. For example, most platforms require int variables
+ * to be aligned at a 4-byte boundary, so `G_ALIGNOF (int)` is 4 on most platforms.
+ *
+ * Note this is not necessarily the same as the value returned by GCC’s
+ * `__alignof__` operator, which returns the preferred alignment for a type.
+ * The preferred alignment may be a stricter alignment than the minimal
+ * alignment.
+ *
+ * Since: 2.60
+ */
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
#define G_ALIGNOF(type) _Alignof (type)
#else
@@ -429,7 +874,7 @@
#else
#define G_CONST_RETURN const
#endif
-#endif
+#endif /* !G_DISABLE_DEPRECATED */
/*
* The G_LIKELY and G_UNLIKELY macros let the programmer give hints to
diff --git a/glib/gmain.c b/glib/gmain.c
index 83e398cfa..6b98f8c0c 100644
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -309,7 +309,7 @@ struct _GSourceCallback
struct _GMainLoop
{
GMainContext *context;
- gboolean is_running;
+ gboolean is_running; /* (atomic) */
volatile gint ref_count;
};
@@ -476,7 +476,8 @@ GSourceFuncs g_unix_signal_funcs =
g_unix_signal_watch_prepare,
g_unix_signal_watch_check,
g_unix_signal_watch_dispatch,
- g_unix_signal_watch_finalize
+ g_unix_signal_watch_finalize,
+ NULL, NULL
};
#endif /* !G_OS_WIN32 */
G_LOCK_DEFINE_STATIC (main_context_list);
@@ -487,7 +488,7 @@ GSourceFuncs g_timeout_funcs =
NULL, /* prepare */
NULL, /* check */
g_timeout_dispatch,
- NULL
+ NULL, NULL, NULL
};
GSourceFuncs g_child_watch_funcs =
@@ -495,7 +496,8 @@ GSourceFuncs g_child_watch_funcs =
g_child_watch_prepare,
g_child_watch_check,
g_child_watch_dispatch,
- g_child_watch_finalize
+ g_child_watch_finalize,
+ NULL, NULL
};
GSourceFuncs g_idle_funcs =
@@ -503,7 +505,7 @@ GSourceFuncs g_idle_funcs =
g_idle_prepare,
g_idle_check,
g_idle_dispatch,
- NULL
+ NULL, NULL, NULL
};
/**
@@ -1609,10 +1611,12 @@ g_source_set_callback_indirect (GSource *source,
LOCK_CONTEXT (context);
if (callback_funcs != &g_source_callback_funcs)
- TRACE (GLIB_SOURCE_SET_CALLBACK_INDIRECT (source, callback_data,
- callback_funcs->ref,
- callback_funcs->unref,
- callback_funcs->get));
+ {
+ TRACE (GLIB_SOURCE_SET_CALLBACK_INDIRECT (source, callback_data,
+ callback_funcs->ref,
+ callback_funcs->unref,
+ callback_funcs->get));
+ }
old_cb_data = source->callback_data;
old_cb_funcs = source->callback_funcs;
@@ -4087,16 +4091,14 @@ g_main_loop_run (GMainLoop *loop)
LOCK_CONTEXT (loop->context);
g_atomic_int_inc (&loop->ref_count);
+ g_atomic_int_set (&loop->is_running, TRUE);
- if (!loop->is_running)
- loop->is_running = TRUE;
-
- while (loop->is_running && !got_ownership)
+ while (g_atomic_int_get (&loop->is_running) && !got_ownership)
got_ownership = g_main_context_wait_internal (loop->context,
&loop->context->cond,
&loop->context->mutex);
- if (!loop->is_running)
+ if (!g_atomic_int_get (&loop->is_running))
{
UNLOCK_CONTEXT (loop->context);
if (got_ownership)
@@ -4118,8 +4120,8 @@ g_main_loop_run (GMainLoop *loop)
}
g_atomic_int_inc (&loop->ref_count);
- loop->is_running = TRUE;
- while (loop->is_running)
+ g_atomic_int_set (&loop->is_running, TRUE);
+ while (g_atomic_int_get (&loop->is_running))
g_main_context_iterate (loop->context, TRUE, TRUE, self);
UNLOCK_CONTEXT (loop->context);
@@ -4146,7 +4148,7 @@ g_main_loop_quit (GMainLoop *loop)
g_return_if_fail (g_atomic_int_get (&loop->ref_count) > 0);
LOCK_CONTEXT (loop->context);
- loop->is_running = FALSE;
+ g_atomic_int_set (&loop->is_running, FALSE);
g_wakeup_signal (loop->context->wakeup);
g_cond_broadcast (&loop->context->cond);
@@ -4170,7 +4172,7 @@ g_main_loop_is_running (GMainLoop *loop)
g_return_val_if_fail (loop != NULL, FALSE);
g_return_val_if_fail (g_atomic_int_get (&loop->ref_count) > 0, FALSE);
- return loop->is_running;
+ return g_atomic_int_get (&loop->is_running);
}
/**
diff --git a/glib/gmappedfile.c b/glib/gmappedfile.c
index d180a9a4d..36e7ca5a8 100644
--- a/glib/gmappedfile.c
+++ b/glib/gmappedfile.c
@@ -150,7 +150,7 @@ mapped_file_new_from_fd (int fd,
file->contents = MAP_FAILED;
#ifdef HAVE_MMAP
- if (st.st_size > G_MAXSIZE)
+ if (sizeof (st.st_size) > sizeof (gsize) && st.st_size > (off_t) G_MAXSIZE)
{
errno = EINVAL;
}
diff --git a/glib/gmarkup.c b/glib/gmarkup.c
index 6ad5f6c38..8a4e943eb 100644
--- a/glib/gmarkup.c
+++ b/glib/gmarkup.c
@@ -786,8 +786,8 @@ unescape_gstring_inplace (GMarkupParseContext *context,
}
}
- g_assert (to - string->str <= string->len);
- if (to - string->str != string->len)
+ g_assert (to - string->str <= (gssize) string->len);
+ if (to - string->str != (gssize) string->len)
g_string_truncate (string, to - string->str);
*is_ascii = !(mask & 0x80);
@@ -2629,7 +2629,7 @@ g_markup_parse_boolean (const char *string,
{
char const * const falses[] = { "false", "f", "no", "n", "0" };
char const * const trues[] = { "true", "t", "yes", "y", "1" };
- int i;
+ gsize i;
for (i = 0; i < G_N_ELEMENTS (falses); i++)
{
@@ -2872,10 +2872,9 @@ g_markup_collect_attributes (const gchar *element_name,
g_assert_not_reached ();
}
- written++;
type = va_arg (ap, GMarkupCollectType);
- if (type != G_MARKUP_COLLECT_INVALID)
- attr = va_arg (ap, const char *);
+ attr = va_arg (ap, const char *);
+ written++;
}
va_end (ap);
@@ -2951,8 +2950,7 @@ failure:
}
type = va_arg (ap, GMarkupCollectType);
- if (type != G_MARKUP_COLLECT_INVALID)
- attr = va_arg (ap, const char *);
+ attr = va_arg (ap, const char *);
}
va_end (ap);
diff --git a/glib/gmessages.h b/glib/gmessages.h
index 95d60c5be..c609d087f 100644
--- a/glib/gmessages.h
+++ b/glib/gmessages.h
@@ -296,7 +296,7 @@ void g_log_structured_standard (const gchar *log_domain,
#endif /* G_LOG_DOMAIN */
#if defined(G_HAVE_ISO_VARARGS) && !G_ANALYZER_ANALYZING
-#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56
+#ifdef G_LOG_USE_STRUCTURED
#define g_error(...) G_STMT_START { \
g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \
__FILE__, G_STRINGIFY (__LINE__), \
@@ -345,7 +345,7 @@ void g_log_structured_standard (const gchar *log_domain,
__VA_ARGS__)
#endif
#elif defined(G_HAVE_GNUC_VARARGS) && !G_ANALYZER_ANALYZING
-#if defined(G_LOG_USE_STRUCTURED) && GLIB_VERSION_MAX_ALLOWED >= GLIB_VERSION_2_56
+#ifdef G_LOG_USE_STRUCTURED
#define g_error(format...) G_STMT_START { \
g_log_structured_standard (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR, \
__FILE__, G_STRINGIFY (__LINE__), \
diff --git a/glib/gnulib/README b/glib/gnulib/README
index 78e09b945..2fd920e9b 100644
--- a/glib/gnulib/README
+++ b/glib/gnulib/README
@@ -39,6 +39,49 @@ C99 return value semantics.
Matthias Clasen
November 1, 2003
+To update:
+* Create an empty directory, put a configure.ac file into it.
+* Run gnulib-tool --lgpl=2 --import --lib=libgnu --source-base=lib \
+ --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=. \
+ --no-conditional-dependencies --no-libtool --macro-prefix=gl \
+ isnand-nolibm isnanf-nolibm isnanl-nolibm printf-frexpl \
+ signbit vasnprintf
+* Then pick out the files that are already in glib/gnulib subdirectory
+ (the rest of the files are not needed):
+asnprintf.c
+c++defs.h
+float+.h
+fpucw.h
+gnulib_math.h.in (rename from math.in.h)
+isnan.c
+isnand.c
+isnand-nolibm.h
+isnanf.c
+isnanf-nolibm.h
+isnanl.c
+isnanl-nolibm.h
+printf-args.c
+printf-args.h
+printf-frexp.c
+printf-frexp.h
+printf-frexpl.c
+printf-frexpl.h
+printf-parse.c
+printf-parse.h
+signbitd.c
+signbitf.c
+signbitl.c
+vasnprintf.c
+vasnprintf.h
+verify.h
+xsize.h
+* Then look at the glib-gnulib.patch and re-introduce custom glib changes
+ contained in that patch.
+* If gnulib_math.h.in got some new @variables@, these will have to be
+ somehow set in meson.build, otherwise meson would warn about them
+ at configure stage
+LRN
+June 06, 2018
diff --git a/glib/gnulib/arg-nonnull.h b/glib/gnulib/arg-nonnull.h
new file mode 100644
index 000000000..447c43228
--- /dev/null
+++ b/glib/gnulib/arg-nonnull.h
@@ -0,0 +1,26 @@
+/* A C macro for declaring that specific arguments must not be NULL.
+ Copyright (C) 2009-2018 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+ that the values passed as arguments n, ..., m must be non-NULL pointers.
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */
+#ifndef _GL_ARG_NONNULL
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+# else
+# define _GL_ARG_NONNULL(params)
+# endif
+#endif
diff --git a/glib/gnulib/asnprintf.c b/glib/gnulib/asnprintf.c
index 0fdab2fba..37ecbf6a0 100644
--- a/glib/gnulib/asnprintf.c
+++ b/glib/gnulib/asnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -12,7 +12,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
diff --git a/glib/gnulib/c++defs.h b/glib/gnulib/c++defs.h
new file mode 100644
index 000000000..51d64a1ed
--- /dev/null
+++ b/glib/gnulib/c++defs.h
@@ -0,0 +1,316 @@
+/* C++ compatible function declaration macros.
+ Copyright (C) 2010-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _GL_CXXDEFS_H
+#define _GL_CXXDEFS_H
+
+/* Begin/end the GNULIB_NAMESPACE namespace. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_BEGIN_NAMESPACE namespace GNULIB_NAMESPACE {
+# define _GL_END_NAMESPACE }
+#else
+# define _GL_BEGIN_NAMESPACE
+# define _GL_END_NAMESPACE
+#endif
+
+/* The three most frequent use cases of these macros are:
+
+ * For providing a substitute for a function that is missing on some
+ platforms, but is declared and works fine on the platforms on which
+ it exists:
+
+ #if @GNULIB_FOO@
+ # if !@HAVE_FOO@
+ _GL_FUNCDECL_SYS (foo, ...);
+ # endif
+ _GL_CXXALIAS_SYS (foo, ...);
+ _GL_CXXALIASWARN (foo);
+ #elif defined GNULIB_POSIXCHECK
+ ...
+ #endif
+
+ * For providing a replacement for a function that exists on all platforms,
+ but is broken/insufficient and needs to be replaced on some platforms:
+
+ #if @GNULIB_FOO@
+ # if @REPLACE_FOO@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+ # undef foo
+ # define foo rpl_foo
+ # endif
+ _GL_FUNCDECL_RPL (foo, ...);
+ _GL_CXXALIAS_RPL (foo, ...);
+ # else
+ _GL_CXXALIAS_SYS (foo, ...);
+ # endif
+ _GL_CXXALIASWARN (foo);
+ #elif defined GNULIB_POSIXCHECK
+ ...
+ #endif
+
+ * For providing a replacement for a function that exists on some platforms
+ but is broken/insufficient and needs to be replaced on some of them and
+ is additionally either missing or undeclared on some other platforms:
+
+ #if @GNULIB_FOO@
+ # if @REPLACE_FOO@
+ # if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+ # undef foo
+ # define foo rpl_foo
+ # endif
+ _GL_FUNCDECL_RPL (foo, ...);
+ _GL_CXXALIAS_RPL (foo, ...);
+ # else
+ # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@
+ _GL_FUNCDECL_SYS (foo, ...);
+ # endif
+ _GL_CXXALIAS_SYS (foo, ...);
+ # endif
+ _GL_CXXALIASWARN (foo);
+ #elif defined GNULIB_POSIXCHECK
+ ...
+ #endif
+*/
+
+/* _GL_EXTERN_C declaration;
+ performs the declaration with C linkage. */
+#if defined __cplusplus
+# define _GL_EXTERN_C extern "C"
+#else
+# define _GL_EXTERN_C extern
+#endif
+
+/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes);
+ declares a replacement function, named rpl_func, with the given prototype,
+ consisting of return type, parameters, and attributes.
+ Example:
+ _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...)
+ _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \
+ _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes)
+#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \
+ _GL_EXTERN_C rettype rpl_func parameters_and_attributes
+
+/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes);
+ declares the system function, named func, with the given prototype,
+ consisting of return type, parameters, and attributes.
+ Example:
+ _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...)
+ _GL_ARG_NONNULL ((1)));
+ */
+#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \
+ _GL_EXTERN_C rettype func parameters_and_attributes
+
+/* _GL_CXXALIAS_RPL (func, rettype, parameters);
+ declares a C++ alias called GNULIB_NAMESPACE::func
+ that redirects to rpl_func, if GNULIB_NAMESPACE is defined.
+ Example:
+ _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...));
+
+ Wrapping rpl_func in an object with an inline conversion operator
+ avoids a reference to rpl_func unless GNULIB_NAMESPACE::func is
+ actually used in the program. */
+#define _GL_CXXALIAS_RPL(func,rettype,parameters) \
+ _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters)
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return ::rpl_func; \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters);
+ is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters);
+ except that the C function rpl_func may have a slightly different
+ declaration. A cast is used to silence the "invalid conversion" error
+ that would otherwise occur. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::rpl_func); \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS (func, rettype, parameters);
+ declares a C++ alias called GNULIB_NAMESPACE::func
+ that redirects to the system provided function func, if GNULIB_NAMESPACE
+ is defined.
+ Example:
+ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
+
+ Wrapping func in an object with an inline conversion operator
+ avoids a reference to func unless GNULIB_NAMESPACE::func is
+ actually used in the program. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return ::func; \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS(func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters);
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
+ except that the C function func may have a slightly different declaration.
+ A cast is used to silence the "invalid conversion" error that would
+ otherwise occur. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>(::func); \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2);
+ is like _GL_CXXALIAS_SYS (func, rettype, parameters);
+ except that the C function is picked among a set of overloaded functions,
+ namely the one with rettype2 and parameters2. Two consecutive casts
+ are used to silence the "cannot find a match" and "invalid conversion"
+ errors that would otherwise occur. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+ /* The outer cast must be a reinterpret_cast.
+ The inner cast: When the function is defined as a set of overloaded
+ functions, it works as a static_cast<>, choosing the designated variant.
+ When the function is defined as a single variant, it works as a
+ reinterpret_cast<>. The parenthesized cast syntax works both ways. */
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+ namespace GNULIB_NAMESPACE \
+ { \
+ static const struct _gl_ ## func ## _wrapper \
+ { \
+ typedef rettype (*type) parameters; \
+ \
+ inline operator type () const \
+ { \
+ return reinterpret_cast<type>((rettype2 (*) parameters2)(::func)); \
+ } \
+ } func = {}; \
+ } \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#else
+# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN (func);
+ causes a warning to be emitted when ::func is used but not when
+ GNULIB_NAMESPACE::func is used. func must be defined without overloaded
+ variants. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN(func) \
+ _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN_1(func,namespace) \
+ _GL_CXXALIASWARN_2 (func, namespace)
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+ we enable the warning only when not optimizing. */
+# if !__OPTIMIZE__
+# define _GL_CXXALIASWARN_2(func,namespace) \
+ _GL_WARN_ON_USE (func, \
+ "The symbol ::" #func " refers to the system function. " \
+ "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# define _GL_CXXALIASWARN_2(func,namespace) \
+ extern __typeof__ (func) func
+# else
+# define _GL_CXXALIASWARN_2(func,namespace) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN(func) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes);
+ causes a warning to be emitted when the given overloaded variant of ::func
+ is used but not when GNULIB_NAMESPACE::func is used. */
+#if defined __cplusplus && defined GNULIB_NAMESPACE
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+ _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \
+ GNULIB_NAMESPACE)
+# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
+ _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
+/* To work around GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43881>,
+ we enable the warning only when not optimizing. */
+# if !__OPTIMIZE__
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+ _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \
+ "The symbol ::" #func " refers to the system function. " \
+ "Use " #namespace "::" #func " instead.")
+# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+ extern __typeof__ (func) func
+# else
+# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+# endif
+#else
+# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \
+ _GL_EXTERN_C int _gl_cxxalias_dummy
+#endif
+
+#endif /* _GL_CXXDEFS_H */
diff --git a/glib/gnulib/float+.h b/glib/gnulib/float+.h
new file mode 100644
index 000000000..a592bde71
--- /dev/null
+++ b/glib/gnulib/float+.h
@@ -0,0 +1,147 @@
+/* Supplemental information about the floating-point formats.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program 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, or (at your option)
+ any later version.
+
+ This program 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 program; if not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _FLOATPLUS_H
+#define _FLOATPLUS_H
+
+#include <float.h>
+#include <limits.h>
+
+/* Number of bits in the mantissa of a floating-point number, including the
+ "hidden bit". */
+#if FLT_RADIX == 2
+# define FLT_MANT_BIT FLT_MANT_DIG
+# define DBL_MANT_BIT DBL_MANT_DIG
+# define LDBL_MANT_BIT LDBL_MANT_DIG
+#elif FLT_RADIX == 4
+# define FLT_MANT_BIT (FLT_MANT_DIG * 2)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 2)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2)
+#elif FLT_RADIX == 16
+# define FLT_MANT_BIT (FLT_MANT_DIG * 4)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 4)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4)
+#endif
+
+/* Bit mask that can be used to mask the exponent, as an unsigned number. */
+#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7)
+#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7)
+#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7)
+
+/* Number of bits used for the exponent of a floating-point number, including
+ the exponent's sign. */
+#define FLT_EXP_BIT \
+ (FLT_EXP_MASK < 0x100 ? 8 : \
+ FLT_EXP_MASK < 0x200 ? 9 : \
+ FLT_EXP_MASK < 0x400 ? 10 : \
+ FLT_EXP_MASK < 0x800 ? 11 : \
+ FLT_EXP_MASK < 0x1000 ? 12 : \
+ FLT_EXP_MASK < 0x2000 ? 13 : \
+ FLT_EXP_MASK < 0x4000 ? 14 : \
+ FLT_EXP_MASK < 0x8000 ? 15 : \
+ FLT_EXP_MASK < 0x10000 ? 16 : \
+ FLT_EXP_MASK < 0x20000 ? 17 : \
+ FLT_EXP_MASK < 0x40000 ? 18 : \
+ FLT_EXP_MASK < 0x80000 ? 19 : \
+ FLT_EXP_MASK < 0x100000 ? 20 : \
+ FLT_EXP_MASK < 0x200000 ? 21 : \
+ FLT_EXP_MASK < 0x400000 ? 22 : \
+ FLT_EXP_MASK < 0x800000 ? 23 : \
+ FLT_EXP_MASK < 0x1000000 ? 24 : \
+ FLT_EXP_MASK < 0x2000000 ? 25 : \
+ FLT_EXP_MASK < 0x4000000 ? 26 : \
+ FLT_EXP_MASK < 0x8000000 ? 27 : \
+ FLT_EXP_MASK < 0x10000000 ? 28 : \
+ FLT_EXP_MASK < 0x20000000 ? 29 : \
+ FLT_EXP_MASK < 0x40000000 ? 30 : \
+ FLT_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+#define DBL_EXP_BIT \
+ (DBL_EXP_MASK < 0x100 ? 8 : \
+ DBL_EXP_MASK < 0x200 ? 9 : \
+ DBL_EXP_MASK < 0x400 ? 10 : \
+ DBL_EXP_MASK < 0x800 ? 11 : \
+ DBL_EXP_MASK < 0x1000 ? 12 : \
+ DBL_EXP_MASK < 0x2000 ? 13 : \
+ DBL_EXP_MASK < 0x4000 ? 14 : \
+ DBL_EXP_MASK < 0x8000 ? 15 : \
+ DBL_EXP_MASK < 0x10000 ? 16 : \
+ DBL_EXP_MASK < 0x20000 ? 17 : \
+ DBL_EXP_MASK < 0x40000 ? 18 : \
+ DBL_EXP_MASK < 0x80000 ? 19 : \
+ DBL_EXP_MASK < 0x100000 ? 20 : \
+ DBL_EXP_MASK < 0x200000 ? 21 : \
+ DBL_EXP_MASK < 0x400000 ? 22 : \
+ DBL_EXP_MASK < 0x800000 ? 23 : \
+ DBL_EXP_MASK < 0x1000000 ? 24 : \
+ DBL_EXP_MASK < 0x2000000 ? 25 : \
+ DBL_EXP_MASK < 0x4000000 ? 26 : \
+ DBL_EXP_MASK < 0x8000000 ? 27 : \
+ DBL_EXP_MASK < 0x10000000 ? 28 : \
+ DBL_EXP_MASK < 0x20000000 ? 29 : \
+ DBL_EXP_MASK < 0x40000000 ? 30 : \
+ DBL_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+#define LDBL_EXP_BIT \
+ (LDBL_EXP_MASK < 0x100 ? 8 : \
+ LDBL_EXP_MASK < 0x200 ? 9 : \
+ LDBL_EXP_MASK < 0x400 ? 10 : \
+ LDBL_EXP_MASK < 0x800 ? 11 : \
+ LDBL_EXP_MASK < 0x1000 ? 12 : \
+ LDBL_EXP_MASK < 0x2000 ? 13 : \
+ LDBL_EXP_MASK < 0x4000 ? 14 : \
+ LDBL_EXP_MASK < 0x8000 ? 15 : \
+ LDBL_EXP_MASK < 0x10000 ? 16 : \
+ LDBL_EXP_MASK < 0x20000 ? 17 : \
+ LDBL_EXP_MASK < 0x40000 ? 18 : \
+ LDBL_EXP_MASK < 0x80000 ? 19 : \
+ LDBL_EXP_MASK < 0x100000 ? 20 : \
+ LDBL_EXP_MASK < 0x200000 ? 21 : \
+ LDBL_EXP_MASK < 0x400000 ? 22 : \
+ LDBL_EXP_MASK < 0x800000 ? 23 : \
+ LDBL_EXP_MASK < 0x1000000 ? 24 : \
+ LDBL_EXP_MASK < 0x2000000 ? 25 : \
+ LDBL_EXP_MASK < 0x4000000 ? 26 : \
+ LDBL_EXP_MASK < 0x8000000 ? 27 : \
+ LDBL_EXP_MASK < 0x10000000 ? 28 : \
+ LDBL_EXP_MASK < 0x20000000 ? 29 : \
+ LDBL_EXP_MASK < 0x40000000 ? 30 : \
+ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+
+/* Number of bits used for a floating-point number: the mantissa (not
+ counting the "hidden bit", since it may or may not be explicit), the
+ exponent, and the sign. */
+#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1)
+#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1)
+#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1)
+
+/* Number of bytes used for a floating-point number.
+ This can be smaller than the 'sizeof'. For example, on i386 systems,
+ 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence
+ LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but
+ sizeof (long double) = 12 or = 16. */
+#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+
+/* Verify that SIZEOF_FLT <= sizeof (float) etc. */
+typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1];
+typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1];
+typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1];
+
+#endif /* _FLOATPLUS_H */
diff --git a/glib/gnulib/fpucw.h b/glib/gnulib/fpucw.h
new file mode 100644
index 000000000..a112f2b3e
--- /dev/null
+++ b/glib/gnulib/fpucw.h
@@ -0,0 +1,108 @@
+/* Manipulating the FPU control word. -*- coding: utf-8 -*-
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _FPUCW_H
+#define _FPUCW_H
+
+/* The i386 floating point hardware (the 387 compatible FPU, not the modern
+ SSE/SSE2 hardware) has a controllable rounding precision. It is specified
+ through the 'PC' bits in the FPU control word ('fctrl' register). (See
+ the GNU libc i386 <fpu_control.h> header for details.)
+
+ On some platforms, such as Linux or Solaris, the default precision setting
+ is set to "extended precision". This means that 'long double' instructions
+ operate correctly, but 'double' computations often produce slightly
+ different results as on strictly IEEE 754 conforming systems.
+
+ On some platforms, such as NetBSD, the default precision is set to
+ "double precision". This means that 'long double' instructions will operate
+ only as 'double', i.e. lead to wrong results. Similarly on FreeBSD 6.4, at
+ least for the division of 'long double' numbers.
+
+ The FPU control word is under control of the application, i.e. it is
+ not required to be set either way by the ABI. (In fact, the i386 ABI
+ https://www.linux-mips.org/pub/linux/mips/doc/ABI/abi386-4.pdf page 3-12 = page 38
+ is not clear about it. But in any case, gcc treats the control word
+ like a "preserved" register: it emits code that assumes that the control
+ word is preserved across calls, and it restores the control word at the
+ end of functions that modify it.)
+
+ See Vincent Lefèvre's page https://www.vinc17.net/research/extended.en.html
+ for a good explanation.
+ See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for
+ some argumentation which setting should be the default. */
+
+/* This header file provides the following facilities:
+ fpucw_t integral type holding the value of 'fctrl'
+ FPU_PC_MASK bit mask denoting the precision control
+ FPU_PC_DOUBLE precision control for 53 bits mantissa
+ FPU_PC_EXTENDED precision control for 64 bits mantissa
+ GET_FPUCW () yields the current FPU control word
+ SET_FPUCW (word) sets the FPU control word
+ DECL_LONG_DOUBLE_ROUNDING variable declaration for
+ BEGIN/END_LONG_DOUBLE_ROUNDING
+ BEGIN_LONG_DOUBLE_ROUNDING () starts a sequence of instructions with
+ 'long double' safe operation precision
+ END_LONG_DOUBLE_ROUNDING () ends a sequence of instructions with
+ 'long double' safe operation precision
+ */
+
+/* Inline assembler like this works only with GNU C. */
+#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
+
+typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
+
+# define FPU_PC_MASK 0x0300
+# define FPU_PC_DOUBLE 0x200 /* glibc calls this _FPU_DOUBLE */
+# define FPU_PC_EXTENDED 0x300 /* glibc calls this _FPU_EXTENDED */
+
+# define GET_FPUCW() \
+ ({ fpucw_t _cw; \
+ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw)); \
+ _cw; \
+ })
+# define SET_FPUCW(word) \
+ (void)({ fpucw_t _ncw = (word); \
+ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw)); \
+ })
+
+# define DECL_LONG_DOUBLE_ROUNDING \
+ fpucw_t oldcw;
+# define BEGIN_LONG_DOUBLE_ROUNDING() \
+ (void)(oldcw = GET_FPUCW (), \
+ SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED))
+# define END_LONG_DOUBLE_ROUNDING() \
+ SET_FPUCW (oldcw)
+
+#else
+
+typedef unsigned int fpucw_t;
+
+# define FPU_PC_MASK 0
+# define FPU_PC_DOUBLE 0
+# define FPU_PC_EXTENDED 0
+
+# define GET_FPUCW() 0
+# define SET_FPUCW(word) (void)(word)
+
+# define DECL_LONG_DOUBLE_ROUNDING
+# define BEGIN_LONG_DOUBLE_ROUNDING()
+# define END_LONG_DOUBLE_ROUNDING()
+
+#endif
+
+#endif /* _FPUCW_H */
diff --git a/glib/gnulib/frexp.c b/glib/gnulib/frexp.c
new file mode 100644
index 000000000..c26d82c88
--- /dev/null
+++ b/glib/gnulib/frexp.c
@@ -0,0 +1,22 @@
+#include <config.h>
+
+/* Specification. */
+#include <gnulib_math.h>
+
+#include <float.h>
+#include "isnand-nolibm.h"
+
+double rpl_frexp (double x, int *expptr)
+{
+ if (x == 0.0 || x == -0.0)
+ {
+ *expptr = x;
+ return x;
+ }
+ else if (isnan (x))
+ return x;
+ else if (isinf (x))
+ return x;
+#undef frexp
+ return frexp (x, expptr);
+}
diff --git a/glib/gnulib/frexpl.c b/glib/gnulib/frexpl.c
new file mode 100644
index 000000000..cd6a81c77
--- /dev/null
+++ b/glib/gnulib/frexpl.c
@@ -0,0 +1,21 @@
+#include <config.h>
+#include <gnulib_math.h>
+#include <float.h>
+#include <math.h>
+
+long double rpl_frexpl (long double x, int *expptr)
+{
+ if (x == 0.0L || x == -0.0L)
+ {
+ *expptr = x;
+ return x;
+ }
+ else if (isnanl (x))
+ return x;
+ else if (isinf (x))
+ return x;
+#ifndef _MSC_VER
+#undef frexpl
+#endif
+ return frexpl (x, expptr);
+}
diff --git a/glib/gnulib/gl_cv_cc_double_expbit0/meson.build b/glib/gnulib/gl_cv_cc_double_expbit0/meson.build
new file mode 100644
index 000000000..a6573d805
--- /dev/null
+++ b/glib/gnulib/gl_cv_cc_double_expbit0/meson.build
@@ -0,0 +1,101 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+double_exponent_test = '''
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = stdout;
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "-1/-1");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "%d/%d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "-1/-1");
+ return (fclose (fp) != 0);
+}
+'''
+
+gl_cv_cc_double_expbit0_word = -1
+gl_cv_cc_double_expbit0_bit = -1
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(double_exponent_test,
+ name : 'where to find the exponent in a \'double\'')
+ if run_result.compiled() and run_result.returncode() == 0
+ out = run_result.stdout ().split ('/')
+ if out.length () == 2
+ gl_cv_cc_double_expbit0_word = out[0].to_int ()
+ gl_cv_cc_double_expbit0_bit = out[1].to_int ()
+ endif
+ endif
+else
+ # On ARM, there are two 'double' floating-point formats, used by
+ # different sets of instructions: The older FPA instructions assume
+ # that they are stored in big-endian word order, while the words
+ # (like integer types) are stored in little-endian byte order.
+ # The newer VFP instructions assume little-endian order
+ # consistently.
+ if (cc.get_define ('arm') == '' and
+ cc.get_define ('__arm') == '' and
+ cc.get_define ('__arm__') == '')
+ gl_cv_cc_double_expbit0_bit = 20
+ if host_machine.endian () == 'big'
+ gl_cv_cc_double_expbit0_word = 0
+ else
+ gl_cv_cc_double_expbit0_word = 1
+ endif
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_frexp_works/meson.build b/glib/gnulib/gl_cv_func_frexp_works/meson.build
new file mode 100644
index 000000000..5d0c7cfce
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_frexp_works/meson.build
@@ -0,0 +1,110 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+frexp_test = '''
+#define HAVE_DECL_ALARM 0
+#include <float.h>
+#include <math.h>
+#include <string.h>
+#if HAVE_DECL_ALARM
+# include <signal.h>
+# include <unistd.h>
+#endif
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ ICC 10.0 has a bug when optimizing the expression -zero.
+ The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
+ to PowerPC on Mac OS X 10.5. */
+#if defined __hpux || defined __sgi || defined __ICC
+static double
+compute_minus_zero (void)
+{
+ return -DBL_MIN * DBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
+#else
+double minus_zero = -0.0;
+#endif
+int main()
+{
+ int result = 0;
+ int i;
+ volatile double x;
+ double zero = 0.0;
+#if HAVE_DECL_ALARM
+ /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
+ number. Let the test fail in this case. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+#endif
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ result |= 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ result |= 2;
+ }
+ /* Test on negative zero. */
+ x = minus_zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ result |= 4;
+ }
+ x = 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ result |= 8;
+ }
+ return result;
+}'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(frexp_test,
+ name : 'frexp works',
+ dependencies : [libm])
+ rc = run_result.returncode()
+ gl_cv_func_frexp_works = run_result.compiled() and rc == 0
+ gl_cv_func_frexp_broken_beyond_repair = not gl_cv_func_frexp_works
+# bit 1 is not set
+ if (rc == 1 or rc == 3 or rc == 5 or rc == 9 or
+ rc == 7 or rc == 11 or rc == 13)
+ gl_cv_func_frexp_broken_beyond_repair = true
+ else
+ gl_cv_func_frexp_broken_beyond_repair = false
+ endif
+else
+ if (host_system.startswith ('netbsd') or
+ host_system.startswith ('irix'))
+ gl_cv_func_frexp_works = false
+ gl_cv_func_frexp_broken_beyond_repair = true
+ elif host_system == 'windows'
+ if cc.get_id () == 'msvc'
+ gl_cv_func_frexp_works = true
+ gl_cv_func_frexp_broken_beyond_repair = false
+ else
+ gl_cv_func_frexp_works = false
+ gl_cv_func_frexp_broken_beyond_repair = false
+ endif
+ else
+ gl_cv_func_frexp_works = true
+ gl_cv_func_frexp_broken_beyond_repair = false
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_frexpl_works/meson.build b/glib/gnulib/gl_cv_func_frexpl_works/meson.build
new file mode 100644
index 000000000..303ec63d7
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_frexpl_works/meson.build
@@ -0,0 +1,142 @@
+# Copyright (C) 2007-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+frexpl_test = '''
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+#endif
+#if defined __sgi && (LDBL_MANT_DIG >= 106)
+# if defined __GNUC__
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP DBL_MIN_EXP
+# endif
+#endif
+extern
+#ifdef __cplusplus
+"C"
+#endif
+
+#if !defined (_MSC_VER) || defined (TEST_FREXPL_DECL)
+long double frexpl (long double, int *);
+#endif
+
+int main()
+{
+ int result = 0;
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ result |= 1;
+ }
+ /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ result |= 2;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ {
+ result |= 4;
+ break;
+ }
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ result |= 8;
+ }
+ }
+ /* Test on infinite numbers. */
+ /* The dance around 0.0L is an attempt to prevent MSVC from erroring out */
+ x = 0.0L;
+ x = 1.0L / x;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ result |= 16;
+ }
+ return result;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(frexpl_test,
+ name : 'frexpl works',
+ dependencies : [libm])
+ rc = run_result.returncode()
+ gl_cv_func_frexpl_works = run_result.compiled() and rc == 0
+ gl_cv_func_frexpl_broken_beyond_repair = not gl_cv_func_frexpl_works
+# bit 1 is not set
+ if (rc == 16)
+ gl_cv_func_frexpl_broken_beyond_repair = false
+ else
+ gl_cv_func_frexpl_broken_beyond_repair = true
+ endif
+else
+ if (host_system.startswith ('aix') or
+ host_system.startswith ('beos') or
+ host_system.startswith ('darwin') or
+ host_system.startswith ('irix'))
+ gl_cv_func_frexpl_works = false
+ gl_cv_func_frexpl_broken_beyond_repair = true
+ elif (host_system == 'windows')
+ gl_cv_func_frexpl_works = false
+ gl_cv_func_frexpl_broken_beyond_repair = false
+ else
+ gl_cv_func_frexpl_works = true
+ gl_cv_func_frexpl_broken_beyond_repair = false
+ endif
+endif
+
+frexpl_test_decl = '''
+#define TEST_FREXPL_DECL 1
+''' + frexpl_test
+
+build_result = cc.compiles(frexpl_test_decl,
+ name : 'frexpl prototype can be re-listed')
+gl_cv_func_frexpl_decl = build_result
diff --git a/glib/gnulib/gl_cv_func_ldexpl_works/meson.build b/glib/gnulib/gl_cv_func_ldexpl_works/meson.build
new file mode 100644
index 000000000..ae176cb8e
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_ldexpl_works/meson.build
@@ -0,0 +1,57 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+ldexpl_test = '''
+#include <math.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+
+#if !defined (_MSC_VER) || defined (TEST_LDEXPL_DECL)
+long double ldexpl (long double, int);
+#endif
+
+int main()
+{
+ int result = 0;
+ {
+ volatile long double x = 1.0;
+ volatile long double y = ldexpl (x, -1);
+ if (y != 0.5L)
+ result |= 1;
+ }
+ {
+ volatile long double x = 1.73205L;
+ volatile long double y = ldexpl (x, 0);
+ if (y != x)
+ result |= 2;
+ }
+ return result;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(ldexpl_test,
+ name : 'ldexpl works',
+ dependencies : [libm])
+ gl_cv_func_ldexpl_works = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system.startswith ('aix')
+ gl_cv_func_ldexpl_works = false
+ elif host_system == 'windows'
+ gl_cv_func_ldexpl_works = true
+ else
+ gl_cv_func_ldexpl_works = true
+ endif
+endif
+
+ldexpl_test_decl = '''
+#define TEST_LDEXPL_DECL 1
+''' + ldexpl_test
+
+build_result = cc.compiles(ldexpl_test_decl,
+ name : 'ldexpl prototype can be re-listed')
+gl_cv_func_ldexpl_decl = build_result
diff --git a/glib/gnulib/gl_cv_func_printf_directive_a/meson.build b/glib/gnulib/gl_cv_func_printf_directive_a/meson.build
new file mode 100644
index 000000000..10e0f8726
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_directive_a/meson.build
@@ -0,0 +1,94 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports the 'a' and 'A'
+# conversion specifier for hexadecimal output of floating-point numbers.
+# (ISO C99, POSIX:2001)
+# Result is gl_cv_func_printf_directive_a.
+
+printf_directive_a_test = '''
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+static double zero = 0.0;
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.922p+1 33") != 0
+ && strcmp (buf, "0x3.244p+0 33") != 0
+ && strcmp (buf, "0x6.488p-1 33") != 0
+ && strcmp (buf, "0xc.91p-2 33") != 0))
+ result |= 1;
+ if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "-0X1.922P+1 33") != 0
+ && strcmp (buf, "-0X3.244P+0 33") != 0
+ && strcmp (buf, "-0X6.488P-1 33") != 0
+ && strcmp (buf, "-0XC.91P-2 33") != 0))
+ result |= 2;
+ /* This catches a FreeBSD 6.1 bug: it doesn't round. */
+ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.83p+0 33") != 0
+ && strcmp (buf, "0x3.05p-1 33") != 0
+ && strcmp (buf, "0x6.0ap-2 33") != 0
+ && strcmp (buf, "0xc.14p-3 33") != 0))
+ result |= 4;
+ /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
+ if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x2p+0 33") != 0
+ && strcmp (buf, "0x3p-1 33") != 0
+ && strcmp (buf, "0x6p-2 33") != 0
+ && strcmp (buf, "0xcp-3 33") != 0))
+ result |= 4;
+ /* This catches a FreeBSD 6.1 bug. See
+ <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
+ if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
+ || buf[0] == '0')
+ result |= 8;
+ /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
+ if (sprintf (buf, "%.1a", 1.999) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ result |= 16;
+ /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
+ glibc 2.4 bug <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ if (sprintf (buf, "%.1La", 1.999L) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ result |= 32;
+ return result;
+}
+'''
+
+glibc_printf_directive_a_test = '''
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__
+ #else
+ #error Too old glibc
+ #endif
+#else
+ #error Not glibc
+#endif
+int main () { return 0; }
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_directive_a_test,
+ name : 'printf supports the \'a\' and \'A\' directives')
+ gl_cv_func_printf_directive_a = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system == 'linux'
+ gl_cv_func_printf_directive_a = cc.compiles(glibc_printf_directive_a_test)
+ elif host_system == 'windows'
+ gl_cv_func_printf_directive_a = false
+ else
+ gl_cv_func_printf_directive_a = false
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_directive_f/meson.build b/glib/gnulib/gl_cv_func_printf_directive_f/meson.build
new file mode 100644
index 000000000..6e423dbc1
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_directive_f/meson.build
@@ -0,0 +1,81 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports the %F format
+# directive. (ISO C99, POSIX:2001)
+# Result is gl_cv_func_printf_directive_f.
+
+printf_directive_f_test = '''
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+static double zero = 0.0;
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+ || strcmp (buf, "1234567.000000 33") != 0)
+ result |= 1;
+ if (sprintf (buf, "%F", 1.0 / zero) < 0
+ || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+ result |= 2;
+ /* This catches a Cygwin 1.5.x bug. */
+ if (sprintf (buf, "%.F", 1234.0) < 0
+ || strcmp (buf, "1234") != 0)
+ result |= 4;
+ return result;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_directive_f_test,
+ name : 'printf supports the \'F\' directive')
+ gl_cv_func_printf_directive_f = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system == 'linux'
+ gl_cv_func_printf_directive_f = true
+ elif (host_system.startswith ('freebsd1') or
+ host_system.startswith ('freebsd2') or
+ host_system.startswith ('freebsd3') or
+ host_system.startswith ('freebsd4') or
+ host_system.startswith ('freebsd5'))
+ gl_cv_func_printf_directive_f = false
+ elif (host_system.startswith ('freebsd') or
+ host_system.startswith ('kfreebsd'))
+ gl_cv_func_printf_directive_f = true
+ elif (host_system.startswith ('darwin1') or
+ host_system.startswith ('darwin2') or
+ host_system.startswith ('darwin3') or
+ host_system.startswith ('darwin4') or
+ host_system.startswith ('darwin5') or
+ host_system.startswith ('darwin6'))
+ gl_cv_func_printf_directive_f = false
+ elif host_system.startswith ('darwin')
+ gl_cv_func_printf_directive_f = true
+# Split the check from the main if statement, ensure that
+# some meson versions (old ones, presumable) won't try
+# to evaluate host_system[9] when it's shorter than that
+ elif host_system.startswith ('solaris2.')
+ if (host_system[9] == '1' and
+ '0123456789'.contains (host_system[10])) or
+ ('23456789'.contains (host_system[9]) == '1' and
+ '0123456789'.contains (host_system[10]))
+ gl_cv_func_printf_directive_f = true
+ elif host_system.startswith ('solaris')
+ gl_cv_func_printf_directive_f = false
+ endif
+ elif host_system.startswith ('solaris')
+ gl_cv_func_printf_directive_f = false
+ elif host_system == 'windows'
+ # Guess yes on MSVC, no on mingw.
+ if cc.get_id() == 'msvc'
+ gl_cv_func_printf_directive_f = true
+ else
+ gl_cv_func_printf_directive_f = false
+ endif
+ else
+ gl_cv_func_printf_directive_f = false
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_directive_ls/meson.build b/glib/gnulib/gl_cv_func_printf_directive_ls/meson.build
new file mode 100644
index 000000000..35656b659
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_directive_ls/meson.build
@@ -0,0 +1,82 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports the %ls format
+# directive and in particular, when a precision is specified, whether
+# the functions stop converting the wide string argument when the number
+# of bytes that have been produced by this conversion equals or exceeds
+# the precision.
+# Result is gl_cv_func_printf_directive_ls.
+
+printf_directive_ls_test = '''
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ int result = 0;
+ char buf[100];
+ /* Test whether %ls works at all.
+ This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+ Cygwin 1.5. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "abc") != 0)
+ result |= 1;
+ }
+ /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+ assertion failure inside libc), but not on OpenBSD 4.0. */
+ {
+ static const wchar_t wstring[] = { 'a', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "a") != 0)
+ result |= 2;
+ }
+ /* Test whether precisions in %ls are supported as specified in ISO C 99
+ section 7.19.6.1:
+ "If a precision is specified, no more than that many bytes are written
+ (including shift sequences, if any), and the array shall contain a
+ null wide character if, to equal the multibyte character sequence
+ length given by the precision, the function would need to access a
+ wide character one past the end of the array."
+ This test fails on Solaris 10. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%.2ls", wstring) < 0
+ || strcmp (buf, "ab") != 0)
+ result |= 8;
+ }
+ return result;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_directive_ls_test,
+ name : 'printf supports the \'ls\' directive')
+ gl_cv_func_printf_directive_ls = run_result.compiled() and run_result.returncode() == 0
+else
+ if (host_system.startswith ('openbsd') or
+ host_system.startswith ('irix') or
+ host_system.startswith ('solaris') or
+ host_system.startswith ('cygwin') or
+ host_system.startswith ('beos') or
+ host_system.startswith ('haiku'))
+ gl_cv_func_printf_directive_ls = false
+ elif host_system == 'windows'
+ gl_cv_func_printf_directive_ls = true
+ else
+ gl_cv_func_printf_directive_ls = true
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_enomem/meson.build b/glib/gnulib/gl_cv_func_printf_enomem/meson.build
new file mode 100644
index 000000000..d0320e0a7
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_enomem/meson.build
@@ -0,0 +1,73 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions recovers gracefully in case
+# of an out-of-memory condition, or whether it crashes the entire program.
+# Result is gl_cv_func_printf_enomem.
+
+printf_enomem_test = '''
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+ struct rlimit limit;
+ int ret;
+ nocrash_init ();
+ /* Some printf implementations allocate temporary space with malloc. */
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+ /* Some printf implementations allocate temporary space on the stack. */
+#ifdef RLIMIT_STACK
+ if (getrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+#endif
+ ret = printf ("%.5000000f", 1.0);
+ return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_enomem_test,
+ name : 'printf survives out-of-memory conditions')
+ gl_cv_func_printf_enomem = run_result.compiled() and run_result.returncode() == 0
+else
+ # If we don't know, assume the worst.
+ gl_cv_func_printf_enomem = false
+ if (host_system == 'linux' or
+ host_system == 'solaris' or
+ host_system == 'sunos' or
+ host_system == 'aix' or
+ host_system == 'irix' or
+ host_system == 'beos' or
+ host_system == 'haiku')
+ gl_cv_func_printf_enomem = true
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_flag_grouping/meson.build b/glib/gnulib/gl_cv_func_printf_flag_grouping/meson.build
new file mode 100644
index 000000000..00229c9aa
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_flag_grouping/meson.build
@@ -0,0 +1,37 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports the - flag correctly.
+# (ISO C99.) See
+# <https://lists.gnu.org/r/bug-coreutils/2008-02/msg00035.html>
+# Result is gl_cv_func_printf_flag_leftadjust.
+
+printf_flag_grouping_test = '''
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+ || buf[strlen (buf) - 1] != '9')
+ return 1;
+ return 0;
+}'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_flag_grouping_test,
+ name : 'printf supports the grouping flag')
+ gl_cv_func_printf_flag_grouping = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system.startswith ('cygwin')
+ gl_cv_func_printf_flag_grouping = false
+ elif host_system.startswith ('netbsd')
+ gl_cv_func_printf_flag_grouping = false
+ elif host_system == 'windows'
+ gl_cv_func_printf_flag_grouping = false
+ else
+ gl_cv_func_printf_flag_grouping = true
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_flag_leftadjust/meson.build b/glib/gnulib/gl_cv_func_printf_flag_leftadjust/meson.build
new file mode 100644
index 000000000..26923ff6f
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_flag_leftadjust/meson.build
@@ -0,0 +1,39 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports the - flag correctly.
+# (ISO C99.) See
+# <https://lists.gnu.org/r/bug-coreutils/2008-02/msg00035.html>
+# Result is gl_cv_func_printf_flag_leftadjust.
+
+printf_flag_leftadjust_test = '''
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ /* Check that a '-' flag is not annihilated by a negative width. */
+ if (sprintf (buf, "a%-*sc", -3, "b") < 0
+ || strcmp (buf, "ab c") != 0)
+ return 1;
+ return 0;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_flag_leftadjust_test,
+ name : 'printf supports the left-adjust flag correctly')
+ gl_cv_func_printf_flag_leftadjust = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system.startswith ('hpux11')
+ gl_cv_func_printf_flag_leftadjust = true
+ elif host_system.startswith ('hpux')
+ gl_cv_func_printf_flag_leftadjust = false
+ elif host_system == 'windows'
+ gl_cv_func_printf_flag_leftadjust = true
+ else
+ gl_cv_func_printf_flag_leftadjust = true
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_flag_zero/meson.build b/glib/gnulib/gl_cv_func_printf_flag_zero/meson.build
new file mode 100644
index 000000000..2990ed2df
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_flag_zero/meson.build
@@ -0,0 +1,40 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports padding of non-finite
+# values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See
+# <https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html>
+# Result is gl_cv_func_printf_flag_zero.
+
+printf_flag_zero_test = '''
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+static double zero = 0.0;
+int main ()
+{
+ if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0
+ || (strcmp (buf, " inf") != 0
+ && strcmp (buf, " infinity") != 0))
+ return 1;
+ return 0;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_flag_zero_test,
+ name : 'printf supports the zero flag correctly')
+ gl_cv_func_printf_flag_zero = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system == 'linux'
+ gl_cv_func_printf_flag_zero = true
+ elif host_system.startswith ('beos')
+ gl_cv_func_printf_flag_zero = true
+ elif host_system == 'windows'
+ gl_cv_func_printf_flag_zero = false
+ else
+ gl_cv_func_printf_flag_zero = false
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_infinite/meson.build b/glib/gnulib/gl_cv_func_printf_infinite/meson.build
new file mode 100644
index 000000000..f33ade42c
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_infinite/meson.build
@@ -0,0 +1,135 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports infinite and NaN
+# 'double' arguments and negative zero arguments in the %f, %e, %g
+# directives. (ISO C99, POSIX:2001)
+# Result is gl_cv_func_printf_infinite.
+
+printf_infinite_double_test = '''
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%f", 1.0 / zero) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%f", -1.0 / zero) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%f", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 2;
+ if (sprintf (buf, "%e", 1.0 / zero) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ result |= 4;
+ if (sprintf (buf, "%e", -1.0 / zero) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ result |= 4;
+ if (sprintf (buf, "%e", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 8;
+ if (sprintf (buf, "%g", 1.0 / zero) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ result |= 16;
+ if (sprintf (buf, "%g", -1.0 / zero) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ result |= 16;
+ if (sprintf (buf, "%g", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 32;
+ /* This test fails on HP-UX 10.20. */
+ if (have_minus_zero ())
+ if (sprintf (buf, "%g", - zero) < 0
+ || strcmp (buf, "-0") != 0)
+ result |= 64;
+ return result;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_infinite_double_test,
+ name : 'printf supports infinite \'double\' arguments')
+ gl_cv_func_printf_infinite = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system == 'linux'
+ gl_cv_func_printf_infinite = true
+ elif (host_system.startswith ('freebsd1') or
+ host_system.startswith ('freebsd2') or
+ host_system.startswith ('freebsd3') or
+ host_system.startswith ('freebsd4') or
+ host_system.startswith ('freebsd5'))
+ gl_cv_func_printf_infinite = false
+ elif (host_system.startswith ('freebsd') or
+ host_system.startswith ('kfreebsd'))
+ gl_cv_func_printf_infinite = true
+ elif (host_system.startswith ('darwin1') or
+ host_system.startswith ('darwin2') or
+ host_system.startswith ('darwin3') or
+ host_system.startswith ('darwin4') or
+ host_system.startswith ('darwin5'))
+ gl_cv_func_printf_infinite = false
+ elif host_system.startswith ('darwin')
+ gl_cv_func_printf_infinite = true
+ elif (host_system.startswith ('hpux7') or
+ host_system.startswith ('hpux8') or
+ host_system.startswith ('hpux9') or
+ host_system.startswith ('hpux10'))
+ gl_cv_func_printf_infinite = false
+ elif host_system.startswith ('hpux')
+ gl_cv_func_printf_infinite = true
+ elif (host_system.startswith ('netbsd1') or
+ host_system.startswith ('netbsd2') or
+ host_system.startswith ('netbsdelf1') or
+ host_system.startswith ('netbsdelf2') or
+ host_system.startswith ('netbsdaout1') or
+ host_system.startswith ('netbsdaout2') or
+ host_system.startswith ('netbsdcoff1') or
+ host_system.startswith ('netbsdcoff2'))
+ gl_cv_func_printf_infinite = false
+ elif host_system.startswith ('netbsd')
+ gl_cv_func_printf_infinite = true
+ elif host_system.startswith ('beos')
+ gl_cv_func_printf_infinite = true
+ elif host_system.startswith ('windows')
+ # Guess yes on MSVC, no on mingw.
+ if cc.get_id() == 'msvc'
+ gl_cv_func_printf_infinite = true
+ else
+ gl_cv_func_printf_infinite = false
+ endif
+ else
+ # If we don't know, assume the worst.
+ gl_cv_func_printf_infinite = false
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
new file mode 100644
index 000000000..fbdee8d16
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_infinite_long_double/meson.build
@@ -0,0 +1,210 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports infinite and NaN
+# 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001)
+# Result is gl_cv_func_printf_infinite_long_double.
+
+# The user can set or unset the variable gl_printf_safe to indicate
+# that he wishes a safe handling of non-IEEE-754 'long double' values.
+check_print_safe = ''
+if get_variable ('gl_printf_safe', false)
+ check_print_safe = '''
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 2;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 2;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 2;
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 2;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 2;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 2;
+ }
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) <= 0)
+ result |= 4;
+ if (sprintf (buf, "%Le", x.value) <= 0)
+ result |= 4;
+ if (sprintf (buf, "%Lg", x.value) <= 0)
+ result |= 4;
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) <= 0)
+ result |= 8;
+ if (sprintf (buf, "%Le", x.value) <= 0)
+ result |= 8;
+ if (sprintf (buf, "%Lg", x.value) <= 0)
+ result |= 8;
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) <= 0)
+ result |= 16;
+ if (sprintf (buf, "%Le", x.value) <= 0)
+ result |= 16;
+ if (sprintf (buf, "%Lg", x.value) <= 0)
+ result |= 16;
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) <= 0)
+ result |= 32;
+ if (sprintf (buf, "%Le", x.value) <= 0)
+ result |= 32;
+ if (sprintf (buf, "%Lg", x.value) <= 0)
+ result |= 32;
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) <= 0)
+ result |= 64;
+ if (sprintf (buf, "%Le", x.value) <= 0)
+ result |= 64;
+ if (sprintf (buf, "%Lg", x.value) <= 0)
+ result |= 64;
+ }
+#endif
+ '''
+endif
+
+printf_infinite_long_double_test = '''
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+ int result = 0;
+ nocrash_init();
+ if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 1;
+ if (sprintf (buf, "%Le", 1.0L / zeroL) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%Le", -1.0L / zeroL) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 1;
+ if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ result |= 1;
+ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ result |= 1;
+''' + check_print_safe + '''
+ return result;
+}
+'''
+
+if gl_cv_func_printf_long_double
+ if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_infinite_long_double_test,
+ name : 'printf supports infinite \'long double\' arguments')
+ gl_cv_func_printf_infinite_long_double = (run_result.compiled() and run_result.returncode() == 0) ? 'true' : 'false'
+ else
+ if host_machine.cpu_family() == 'x86_64'
+ gl_cv_func_printf_infinite_long_double = 'false'
+ else
+ if host_system == 'linux'
+ gl_cv_func_printf_infinite_long_double = 'true'
+ elif (host_system.startswith ('freebsd1') or
+ host_system.startswith ('freebsd2') or
+ host_system.startswith ('freebsd3') or
+ host_system.startswith ('freebsd4') or
+ host_system.startswith ('freebsd5'))
+ gl_cv_func_printf_infinite_long_double = 'false'
+ elif (host_system.startswith ('freebsd') or
+ host_system.startswith ('kfreebsd'))
+ gl_cv_func_printf_infinite_long_double = 'true'
+ elif (host_system.startswith ('hpux7') or
+ host_system.startswith ('hpux8') or
+ host_system.startswith ('hpux9') or
+ host_system.startswith ('hpux10'))
+ gl_cv_func_printf_infinite = false
+ elif host_system.startswith ('hpux')
+ gl_cv_func_printf_infinite_long_double = 'true'
+ elif host_system == 'windows'
+ # Guess yes on MSVC, no on mingw.
+ if cc.get_id() == 'msvc'
+ gl_cv_func_printf_infinite = 'true'
+ else
+ gl_cv_func_printf_infinite = 'false'
+ endif
+ else
+ gl_cv_func_printf_infinite_long_double = 'false'
+ endif
+ endif
+ endif
+else
+ gl_cv_func_printf_infinite_long_double = 'irrelevant'
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_long_double/meson.build b/glib/gnulib/gl_cv_func_printf_long_double/meson.build
new file mode 100644
index 000000000..1c0d6b58b
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_long_double/meson.build
@@ -0,0 +1,50 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports 'long double'
+# arguments together with the 'L' size specifier. (ISO C99, POSIX:2001)
+# Result is gl_cv_func_printf_long_double.
+
+printf_long_double_test = '''
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+ int result = 0;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000 33") != 0)
+ result |= 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000e+00 33") != 0)
+ result |= 2;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.75 33") != 0)
+ result |= 4;
+ return result;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_long_double_test,
+ name : 'printf supports \'long double\' arguments')
+ gl_cv_func_printf_long_double = run_result.compiled() and run_result.returncode() == 0
+else
+ if host_system.startswith ('beos')
+ gl_cv_func_printf_long_double = false
+ elif host_system == 'windows'
+ # Guess yes on MSVC, no on mingw.
+ if cc.get_id() == 'msvc'
+ gl_cv_func_printf_long_double = true
+ else
+ gl_cv_func_printf_long_double = false
+ endif
+ else
+ gl_cv_func_printf_long_double = true
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_func_printf_precision/meson.build b/glib/gnulib/gl_cv_func_printf_precision/meson.build
new file mode 100644
index 000000000..6f7ef4e3d
--- /dev/null
+++ b/glib/gnulib/gl_cv_func_printf_precision/meson.build
@@ -0,0 +1,54 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Test whether the *printf family of functions supports large precisions.
+# On mingw, precisions larger than 512 are treated like 512, in integer,
+# floating-point or pointer output. On Solaris 10/x86, precisions larger
+# than 510 in floating-point output crash the program. On Solaris 10/SPARC,
+# precisions larger than 510 in floating-point output yield wrong results.
+# On AIX 7.1, precisions larger than 998 in floating-point output yield
+# wrong results. On BeOS, precisions larger than 1044 crash the program.
+# Result is gl_cv_func_printf_precision.
+
+printf_precision_test = '''
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+ int result = 0;
+#ifdef __BEOS__
+ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
+ return 1;
+#endif
+ if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+ result |= 1;
+ if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5)
+ result |= 2;
+ if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
+ || buf[0] != '1')
+ result |= 4;
+ if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
+ || buf[0] != '1')
+ result |= 4;
+ return result;
+}
+'''
+
+if not meson.is_cross_build() or meson.has_exe_wrapper()
+ run_result = cc.run(printf_precision_test,
+ name : 'printf supports large precisions')
+ gl_cv_func_printf_precision = run_result.compiled() and run_result.returncode() == 0
+else
+ gl_cv_func_printf_precision = true
+ # Guess no only on Solaris, native Windows, and BeOS systems.
+ if (host_system == 'windows' or
+ host_system == 'beos' or
+ host_system == 'haiku' or
+ host_system == 'sunos' or
+ host_system == 'solaris')
+ gl_cv_func_printf_precision = false
+ endif
+endif
diff --git a/glib/gnulib/gl_cv_long_double_equals_double/meson.build b/glib/gnulib/gl_cv_long_double_equals_double/meson.build
new file mode 100644
index 000000000..0d2adb14f
--- /dev/null
+++ b/glib/gnulib/gl_cv_long_double_equals_double/meson.build
@@ -0,0 +1,24 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# gl_LONG_DOUBLE_VS_DOUBLE
+# determines whether 'long double' and 'double' have the same representation.
+# The currently known platforms where this is the case are:
+# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9.
+
+long_double_eq_double_test = '''
+#include <float.h>
+int main ()
+{
+ typedef int check[sizeof (long double) == sizeof (double)
+ && LDBL_MANT_DIG == DBL_MANT_DIG
+ && LDBL_MAX_EXP == DBL_MAX_EXP
+ && LDBL_MIN_EXP == DBL_MIN_EXP
+ ? 1 : -1];
+ return check;
+}
+'''
+
+gl_cv_long_double_equals_double = cc.compiles(long_double_eq_double_test)
diff --git a/glib/gnulib/gl_extern_inline/meson.build b/glib/gnulib/gl_extern_inline/meson.build
new file mode 100644
index 000000000..4bfedacb7
--- /dev/null
+++ b/glib/gnulib/gl_extern_inline/meson.build
@@ -0,0 +1,103 @@
+# Copyright (C) 2002-2004, 2006-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Copyright 2012-2018 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+gl_extern_inline = '''
+/* Please see the Gnulib manual for how to use these macros.
+
+ Suppress extern inline with HP-UX cc, as it appears to be broken; see
+ <https://lists.gnu.org/r/bug-texinfo/2013-02/msg00030.html>.
+
+ Suppress extern inline with Sun C in standards-conformance mode, as it
+ mishandles inline functions that call each other. E.g., for 'inline void f
+ (void) { } inline void g (void) { f (); }', c99 incorrectly complains
+ 'reference to static identifier "f" in extern inline function'.
+ This bug was observed with Sun C 5.12 SunOS_i386 2011/11/16.
+
+ Suppress extern inline (with or without __attribute__ ((__gnu_inline__)))
+ on configurations that mistakenly use 'static inline' to implement
+ functions or macros in standard C headers like <ctype.h>. For example,
+ if isdigit is mistakenly implemented via a static inline function,
+ a program containing an extern inline function that calls isdigit
+ may not work since the C standard prohibits extern inline functions
+ from calling static functions. This bug is known to occur on:
+
+ OS X 10.8 and earlier; see:
+ https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
+
+ DragonFly; see
+ http://muscles.dragonflybsd.org/bulk/bleeding-edge-potential/latest-per-pkg/ah-tty-0.3.12.log
+
+ FreeBSD; see:
+ https://lists.gnu.org/r/bug-gnulib/2014-07/msg00104.html
+
+ OS X 10.9 has a macro __header_inline indicating the bug is fixed for C and
+ for clang but remains for g++; see <https://trac.macports.org/ticket/41033>.
+ Assume DragonFly and FreeBSD will be similar. */
+#if (((defined __APPLE__ && defined __MACH__) \
+ || defined __DragonFly__ || defined __FreeBSD__) \
+ && (defined __header_inline \
+ ? (defined __cplusplus && defined __GNUC_STDC_INLINE__ \
+ && ! defined __clang__) \
+ : ((! defined _DONT_USE_CTYPE_INLINE_ \
+ && (defined __GNUC__ || defined __cplusplus)) \
+ || (defined _FORTIFY_SOURCE && 0 < _FORTIFY_SOURCE \
+ && defined __GNUC__ && ! defined __cplusplus))))
+# define _GL_EXTERN_INLINE_STDHEADER_BUG
+#endif
+#if ((__GNUC__ \
+ ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ : (199901L <= __STDC_VERSION__ \
+ && !defined __HP_cc \
+ && !defined __PGI \
+ && !(defined __SUNPRO_C && __STDC__))) \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# define _GL_INLINE inline
+# define _GL_EXTERN_INLINE extern inline
+# define _GL_EXTERN_INLINE_IN_USE
+#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
+# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
+ /* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
+# define _GL_INLINE extern inline __attribute__ ((__gnu_inline__)) __attribute__ ((always_inline))
+# else
+# define _GL_INLINE extern inline
+# endif
+# define _GL_EXTERN_INLINE extern
+# define _GL_EXTERN_INLINE_IN_USE
+#else
+# define _GL_INLINE static _GL_UNUSED
+# define _GL_EXTERN_INLINE static _GL_UNUSED
+#endif
+
+/* In GCC 4.6 (inclusive) to 5.1 (exclusive),
+ suppress bogus "no previous prototype for 'FOO'"
+ and "no previous declaration for 'FOO'" diagnostics,
+ when FOO is an inline function in the header; see
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
+# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
+# define _GL_INLINE_HEADER_CONST_PRAGMA
+# else
+# define _GL_INLINE_HEADER_CONST_PRAGMA \
+ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"")
+# endif
+# define _GL_INLINE_HEADER_BEGIN \
+ _Pragma ("GCC diagnostic push") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \
+ _Pragma ("GCC diagnostic ignored \"-Wmissing-declarations\"") \
+ _GL_INLINE_HEADER_CONST_PRAGMA
+# define _GL_INLINE_HEADER_END \
+ _Pragma ("GCC diagnostic pop")
+#else
+# define _GL_INLINE_HEADER_BEGIN
+# define _GL_INLINE_HEADER_END
+#endif
+'''
diff --git a/glib/gnulib/glib-gnulib.patch b/glib/gnulib/glib-gnulib.patch
new file mode 100644
index 000000000..9cdce0a27
--- /dev/null
+++ b/glib/gnulib/glib-gnulib.patch
@@ -0,0 +1,460 @@
+These changes are mostly inherited from previous iterations
+of gnulib-printf-in-glib.
+
+Here are explanations for some of them:
+* g-gnulib.h is a minimal replacement for gnulib config.h
+* gnulib_math.h is a processed copy of gnulib math.in.h
+ We can't keep it named math.h, since we need to include
+ both the system math.h and this header in some places.
+* gnulib_math.h needs _GL_ATTRIBUTE_CONST, put it directly
+ there instead of getting it from config.h
+ Also, instead of copying _GL_FUNCDECL_RPL and _GL_WARN_ON_USE
+ we simply include headers where these macros are defined.
+* isnan source files get extra includes, in gnulib these
+ were probably handled by makefiles and/or configure scripts
+* glib has a test result named HAVE_LONG_LONG instead of HAVE_LONG_LONG_INT,
+ so make the code use that
+* One of the goals of using this gnulib implementation in glib is
+ to have C99-compliant 3-digit exponent, therefore gnulib
+ ifdefs that *disable* that behaviour are altered to keep it enabled.
+ Another possible location for such a change is where %n use is
+ being enabled or disabled. That, however, is not activated anyway,
+ because this code is made not to use snprintf
+* glib has G_MAXSIZE instead of SIZE_MAX, so use that
+* The code is made to use glib alloca header
+--- glib-82c3e92/glib/gnulib/asnprintf.c 2019-02-09 09:44:55.013866300 +0000
++++ glib-82c3e92/glib/gnulib/asnprintf.c 2019-02-09 10:08:46.444859600 +0000
+@@ -16,6 +16,8 @@
+
+ #include <config.h>
+
++#include "g-gnulib.h"
++
+ /* Specification. */
+ #include "vasnprintf.h"
+
+--- glib-82c3e92/glib/gnulib/isnand.c 2019-02-09 09:44:56.075691800 +0000
++++ glib-82c3e92/glib/gnulib/isnand.c 2019-02-09 10:09:35.443191100 +0000
+@@ -16,4 +16,7 @@
+
+ /* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
++#include <config.h>
++#include "gnulib_math.h"
++#include "isnand-nolibm.h"
+ #include "isnan.c"
+--- glib-82c3e92/glib/gnulib/isnand-nolibm.h 2019-02-09 09:44:55.973651800 +0000
++++ glib-82c3e92/glib/gnulib/isnand-nolibm.h 2019-02-09 10:09:17.089604000 +0000
+@@ -16,7 +16,7 @@
+
+ #if HAVE_ISNAND_IN_LIBC
+ /* Get declaration of isnan macro. */
+-# include <math.h>
++# include <gnulib_math.h>
+ # if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+ # undef isnand
+--- glib-82c3e92/glib/gnulib/isnanl.c 2019-02-09 09:44:56.285650400 +0000
++++ glib-82c3e92/glib/gnulib/isnanl.c 2019-02-09 10:10:00.060305200 +0000
+@@ -17,4 +17,7 @@
+ /* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+ #define USE_LONG_DOUBLE
++#include <config.h>
++#include "gnulib_math.h"
++#include "isnanl-nolibm.h"
+ #include "isnan.c"
+--- glib-82c3e92/glib/gnulib/isnanl-nolibm.h 2019-02-09 09:44:56.181628200 +0000
++++ glib-82c3e92/glib/gnulib/isnanl-nolibm.h 2019-02-09 10:09:45.731187400 +0000
+@@ -16,7 +16,7 @@
+
+ #if HAVE_ISNANL_IN_LIBC
+ /* Get declaration of isnan macro or (older) isnanl function. */
+-# include <math.h>
++# include <gnulib_math.h>
+ # if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+ # undef isnanl
+--- glib-82c3e92/glib/gnulib/printf-args.c 2019-02-09 09:44:57.147081400 +0000
++++ glib-82c3e92/glib/gnulib/printf-args.c 2019-02-09 10:10:45.869597700 +0000
+@@ -24,6 +24,8 @@
+ # include <config.h>
+ #endif
+
++#include "g-gnulib.h"
++
+ /* Specification. */
+ #ifndef PRINTF_FETCHARGS
+ # include "printf-args.h"
+@@ -65,7 +67,7 @@
+ case TYPE_ULONGINT:
+ ap->a.a_ulongint = va_arg (args, unsigned long int);
+ break;
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ case TYPE_LONGLONGINT:
+ ap->a.a_longlongint = va_arg (args, long long int);
+ break;
+@@ -135,7 +137,7 @@
+ case TYPE_COUNT_LONGINT_POINTER:
+ ap->a.a_count_longint_pointer = va_arg (args, long int *);
+ break;
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ case TYPE_COUNT_LONGLONGINT_POINTER:
+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
+ break;
+--- glib-82c3e92/glib/gnulib/printf-args.h 2019-02-09 09:44:57.245167700 +0000
++++ glib-82c3e92/glib/gnulib/printf-args.h 2019-02-09 10:10:55.543592500 +0000
+@@ -57,7 +57,7 @@
+ TYPE_UINT,
+ TYPE_LONGINT,
+ TYPE_ULONGINT,
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ TYPE_LONGLONGINT,
+ TYPE_ULONGLONGINT,
+ #endif
+@@ -76,7 +76,7 @@
+ TYPE_COUNT_SHORT_POINTER,
+ TYPE_COUNT_INT_POINTER,
+ TYPE_COUNT_LONGINT_POINTER
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ , TYPE_COUNT_LONGLONGINT_POINTER
+ #endif
+ #if ENABLE_UNISTDIO
+@@ -101,7 +101,7 @@
+ unsigned int a_uint;
+ long int a_longint;
+ unsigned long int a_ulongint;
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ long long int a_longlongint;
+ unsigned long long int a_ulonglongint;
+ #endif
+@@ -121,7 +121,7 @@
+ short * a_count_short_pointer;
+ int * a_count_int_pointer;
+ long int * a_count_longint_pointer;
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ long long int * a_count_longlongint_pointer;
+ #endif
+ #if ENABLE_UNISTDIO
+--- glib-82c3e92/glib/gnulib/printf-frexp.c 2019-02-09 09:44:57.355099800 +0000
++++ glib-82c3e92/glib/gnulib/printf-frexp.c 2019-02-09 10:11:15.476905600 +0000
+@@ -26,7 +26,7 @@
+ #endif
+
+ #include <float.h>
+-#include <math.h>
++#include <gnulib_math.h>
+ #ifdef USE_LONG_DOUBLE
+ # include "fpucw.h"
+ #endif
+--- glib-82c3e92/glib/gnulib/printf-parse.c 2019-02-09 09:44:57.790835100 +0000
++++ glib-82c3e92/glib/gnulib/printf-parse.c 2019-02-09 10:11:32.783744500 +0000
+@@ -31,6 +31,8 @@
+ # include <config.h>
+ #endif
+
++#include "g-gnulib.h"
++
+ /* Specification. */
+ #ifndef PRINTF_PARSE
+ # include "printf-parse.h"
+@@ -447,7 +449,7 @@
+ switch (c)
+ {
+ case 'd': case 'i':
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_LONGLONGINT;
+@@ -465,7 +467,7 @@
+ type = TYPE_INT;
+ break;
+ case 'o': case 'u': case 'x': case 'X':
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_ULONGLONGINT;
+@@ -525,7 +527,7 @@
+ type = TYPE_POINTER;
+ break;
+ case 'n':
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_COUNT_LONGLONGINT_POINTER;
+--- glib-82c3e92/glib/gnulib/vasnprintf.c 2019-02-09 09:44:58.585342000 +0000
++++ glib-82c3e92/glib/gnulib/vasnprintf.c 2019-02-09 10:22:13.196848200 +0000
+@@ -43,19 +43,21 @@
+ DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t.
+ DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */
+
++#ifndef _WIN32
+ /* Tell glibc's <stdio.h> to provide a prototype for snprintf().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+ #ifndef _GNU_SOURCE
+ # define _GNU_SOURCE 1
+ #endif
++#endif
+
+ #ifndef VASNPRINTF
+ # include <config.h>
+ #endif
+-#ifndef IN_LIBINTL
+-# include <alloca.h>
+-#endif
++#include "glib/galloca.h"
++
++#include "g-gnulib.h"
+
+ /* Specification. */
+ #ifndef VASNPRINTF
+@@ -90,29 +92,29 @@
+ #include "verify.h"
+
+ #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+-# include <math.h>
++# include <gnulib_math.h>
+ # include "float+.h"
+ #endif
+
+ #if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+-# include <math.h>
++# include <gnulib_math.h>
+ # include "isnand-nolibm.h"
+ #endif
+
+ #if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
+-# include <math.h>
++# include <gnulib_math.h>
+ # include "isnanl-nolibm.h"
+ # include "fpucw.h"
+ #endif
+
+ #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+-# include <math.h>
++# include <gnulib_math.h>
+ # include "isnand-nolibm.h"
+ # include "printf-frexp.h"
+ #endif
+
+ #if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+-# include <math.h>
++# include <gnulib_math.h>
+ # include "isnanl-nolibm.h"
+ # include "printf-frexpl.h"
+ # include "fpucw.h"
+@@ -1553,7 +1555,7 @@
+ switch (conversion)
+ {
+ case 'd': case 'i': case 'u':
+-# if HAVE_LONG_LONG_INT
++# if HAVE_LONG_LONG
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+@@ -1583,7 +1585,7 @@
+ break;
+
+ case 'o':
+-# if HAVE_LONG_LONG_INT
++# if HAVE_LONG_LONG
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+@@ -1611,7 +1613,7 @@
+ break;
+
+ case 'x': case 'X':
+-# if HAVE_LONG_LONG_INT
++# if HAVE_LONG_LONG
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+@@ -1939,7 +1941,7 @@
+ case TYPE_COUNT_LONGINT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
+ break;
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ case TYPE_COUNT_LONGLONGINT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
+ break;
+@@ -4245,7 +4247,7 @@
+ static const wchar_t decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+-# if defined _WIN32 && ! defined __CYGWIN__
++# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
+ { '%', '+', '.', '3', 'd', '\0' };
+ # else
+ { '%', '+', '.', '2', 'd', '\0' };
+@@ -4259,7 +4261,7 @@
+ static const char decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+-# if defined _WIN32 && ! defined __CYGWIN__
++# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
+ "%+.3d";
+ # else
+ "%+.2d";
+@@ -4438,7 +4440,7 @@
+ static const wchar_t decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+-# if defined _WIN32 && ! defined __CYGWIN__
++# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
+ { '%', '+', '.', '3', 'd', '\0' };
+ # else
+ { '%', '+', '.', '2', 'd', '\0' };
+@@ -4452,7 +4454,7 @@
+ static const char decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+-# if defined _WIN32 && ! defined __CYGWIN__
++# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
+ "%+.3d";
+ # else
+ "%+.2d";
+@@ -4510,7 +4512,7 @@
+ *p++ = '+';
+ /* Produce the same number of exponent digits as
+ the native printf implementation. */
+-# if defined _WIN32 && ! defined __CYGWIN__
++# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
+ *p++ = '0';
+ # endif
+ *p++ = '0';
+@@ -4835,10 +4837,10 @@
+
+ switch (type)
+ {
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ case TYPE_LONGLONGINT:
+ case TYPE_ULONGLONGINT:
+-# if defined _WIN32 && ! defined __CYGWIN__
++# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
+ *fbp++ = 'I';
+ *fbp++ = '6';
+ *fbp++ = '4';
+@@ -5063,7 +5065,7 @@
+ SNPRINTF_BUF (arg);
+ }
+ break;
+-#if HAVE_LONG_LONG_INT
++#if HAVE_LONG_LONG
+ case TYPE_LONGLONGINT:
+ {
+ long long int arg = a.arg[dp->arg_index].a.a_longlongint;
+--- glib-82c3e92/glib/gnulib/xsize.h 2019-02-09 09:44:59.231076600 +0000
++++ glib-82c3e92/glib/gnulib/xsize.h 2019-02-09 10:21:28.789553900 +0000
+@@ -18,10 +18,12 @@
+ #ifndef _XSIZE_H
+ #define _XSIZE_H
+
++#include <glib.h>
++
+ /* Get size_t. */
+ #include <stddef.h>
+
+-/* Get SIZE_MAX. */
++/* Get G_MAXSIZE. */
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ # include <stdint.h>
+@@ -42,8 +44,8 @@
+ returns a piece of memory that is way too small, and the program then
+ crashes while attempting to fill the memory.
+ To avoid this, the functions and macros in this file check for overflow.
+- The convention is that SIZE_MAX represents overflow.
+- malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
++ The convention is that G_MAXSIZE represents overflow.
++ malloc (G_MAXSIZE) is not guaranteed to fail -- think of a malloc
+ implementation that uses mmap --, it's recommended to use size_overflow_p()
+ or size_in_bounds_p() before invoking malloc().
+ The example thus becomes:
+@@ -53,7 +55,7 @@
+
+ /* Convert an arbitrary value >= 0 to type size_t. */
+ #define xcast_size_t(N) \
+- ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
++ ((N) <= G_MAXSIZE ? (size_t) (N) : G_MAXSIZE)
+
+ /* Sum of two sizes, with overflow check. */
+ XSIZE_INLINE size_t
+@@ -63,7 +65,7 @@
+ xsum (size_t size1, size_t size2)
+ {
+ size_t sum = size1 + size2;
+- return (sum >= size1 ? sum : SIZE_MAX);
++ return (sum >= size1 ? sum : G_MAXSIZE);
+ }
+
+ /* Sum of three sizes, with overflow check. */
+@@ -94,23 +96,23 @@
+ xmax (size_t size1, size_t size2)
+ {
+ /* No explicit check is needed here, because for any n:
+- max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
++ max (G_MAXSIZE, n) == G_MAXSIZE and max (n, G_MAXSIZE) == G_MAXSIZE. */
+ return (size1 >= size2 ? size1 : size2);
+ }
+
+ /* Multiplication of a count with an element size, with overflow check.
+ The count must be >= 0 and the element size must be > 0.
+ This is a macro, not a function, so that it works correctly even
+- when N is of a wider type and N > SIZE_MAX. */
++ when N is of a wider type and N > G_MAXSIZE. */
+ #define xtimes(N, ELSIZE) \
+- ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
++ ((N) <= G_MAXSIZE / (ELSIZE) ? (size_t) (N) * (ELSIZE) : G_MAXSIZE)
+
+ /* Check for overflow. */
+ #define size_overflow_p(SIZE) \
+- ((SIZE) == SIZE_MAX)
++ ((SIZE) == G_MAXSIZE)
+ /* Check against overflow. */
+ #define size_in_bounds_p(SIZE) \
+- ((SIZE) != SIZE_MAX)
++ ((SIZE) != G_MAXSIZE)
+
+ _GL_INLINE_HEADER_END
+
+--- a/glib/gnulib/gnulib_math.h.in
++++ b/glib/gnulib/gnulib_math.h.in
+@@ -25,6 +25,13 @@
+ /* The include_next requires a split double-inclusion guard. */
+ #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+
++/* The __const__ attribute was added in gcc 2.95. */
++#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
++# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
++#else
++# define _GL_ATTRIBUTE_CONST /* empty */
++#endif
++
+ #ifndef _@GUARD_PREFIX@_MATH_H
+ #define _@GUARD_PREFIX@_MATH_H
+
+@@ -41,9 +48,9 @@ _GL_INLINE_HEADER_BEGIN
+ # define _GL_MATH_INLINE _GL_INLINE
+ #endif
+
+-/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
++#include "c++defs.h"
+
+-/* The definition of _GL_ARG_NONNULL is copied here. */
++#include "arg-nonnull.h"
+
+ /* The definition of _GL_WARN_ON_USE is copied here. */
+
diff --git a/glib/gnulib/gnulib_math.h.in b/glib/gnulib/gnulib_math.h.in
new file mode 100644
index 000000000..81edb0702
--- /dev/null
+++ b/glib/gnulib/gnulib_math.h.in
@@ -0,0 +1,2451 @@
+/* A GNU-like <math.h>.
+
+ Copyright (C) 2002-2003, 2007-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_MATH_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+
+/* The __const__ attribute was added in gcc 2.95. */
+#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+#else
+# define _GL_ATTRIBUTE_CONST /* empty */
+#endif
+
+#ifndef _@GUARD_PREFIX@_MATH_H
+#define _@GUARD_PREFIX@_MATH_H
+
+/* On OpenVMS, NAN, INFINITY, and HUGEVAL macros are defined in <fp.h>. */
+#if defined __VMS && ! defined NAN
+# include <fp.h>
+#endif
+
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
+#ifndef _GL_MATH_INLINE
+# define _GL_MATH_INLINE _GL_INLINE
+#endif
+
+#include "c++defs.h"
+
+#include "arg-nonnull.h"
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+#ifdef __cplusplus
+/* Helper macros to define type-generic function FUNC as overloaded functions,
+ rather than as macros like in C. POSIX declares these with an argument of
+ real-floating (that is, one of float, double, or long double). */
+# define _GL_MATH_CXX_REAL_FLOATING_DECL_1(func) \
+static inline int \
+_gl_cxx_ ## func ## f (float f) \
+{ \
+ return func (f); \
+} \
+static inline int \
+_gl_cxx_ ## func ## d (double d) \
+{ \
+ return func (d); \
+} \
+static inline int \
+_gl_cxx_ ## func ## l (long double l) \
+{ \
+ return func (l); \
+}
+# define _GL_MATH_CXX_REAL_FLOATING_DECL_2(func) \
+_GL_BEGIN_NAMESPACE \
+inline int \
+func (float f) \
+{ \
+ return _gl_cxx_ ## func ## f (f); \
+} \
+inline int \
+func (double d) \
+{ \
+ return _gl_cxx_ ## func ## d (d); \
+} \
+inline int \
+func (long double l) \
+{ \
+ return _gl_cxx_ ## func ## l (l); \
+} \
+_GL_END_NAMESPACE
+#endif
+
+/* Helper macros to define a portability warning for the
+ classification macro FUNC called with VALUE. POSIX declares the
+ classification macros with an argument of real-floating (that is,
+ one of float, double, or long double). */
+#define _GL_WARN_REAL_FLOATING_DECL(func) \
+_GL_MATH_INLINE int \
+_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
+ "use gnulib module " #func " for portability") \
+rpl_ ## func ## f (float f) \
+{ \
+ return func (f); \
+} \
+_GL_MATH_INLINE int \
+_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
+ "use gnulib module " #func " for portability") \
+rpl_ ## func ## d (double d) \
+{ \
+ return func (d); \
+} \
+_GL_MATH_INLINE int \
+_GL_WARN_ON_USE_ATTRIBUTE (#func " is unportable - " \
+ "use gnulib module " #func " for portability") \
+rpl_ ## func ## l (long double l) \
+{ \
+ return func (l); \
+}
+#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
+ (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
+ : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
+ : rpl_ ## func ## l (value))
+
+
+#if @REPLACE_ITOLD@
+/* Pull in a function that fixes the 'int' to 'long double' conversion
+ of glibc 2.7. */
+_GL_EXTERN_C void _Qp_itoq (long double *, int);
+static void (*_gl_math_fix_itold) (long double *, int) = _Qp_itoq;
+#endif
+
+
+/* POSIX allows platforms that don't support NAN. But all major
+ machines in the past 15 years have supported something close to
+ IEEE NaN, so we define this unconditionally. We also must define
+ it on platforms like Solaris 10, where NAN is present but defined
+ as a function pointer rather than a floating point constant. */
+#if !defined NAN || @REPLACE_NAN@
+# if !GNULIB_defined_NAN
+# undef NAN
+ /* The Compaq (ex-DEC) C 6.4 compiler and the Microsoft MSVC 9 compiler
+ choke on the expression 0.0 / 0.0. */
+# if defined __DECC || defined _MSC_VER
+_GL_MATH_INLINE float
+_NaN ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+# define NAN (_NaN())
+# else
+# define NAN (0.0f / 0.0f)
+# endif
+# define GNULIB_defined_NAN 1
+# endif
+#endif
+
+/* Solaris 10 defines HUGE_VAL, but as a function pointer rather
+ than a floating point constant. */
+#if @REPLACE_HUGE_VAL@
+# undef HUGE_VALF
+# define HUGE_VALF (1.0f / 0.0f)
+# undef HUGE_VAL
+# define HUGE_VAL (1.0 / 0.0)
+# undef HUGE_VALL
+# define HUGE_VALL (1.0L / 0.0L)
+#endif
+
+/* HUGE_VALF is a 'float' Infinity. */
+#ifndef HUGE_VALF
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
+# define HUGE_VALF (1e25f * 1e25f)
+# else
+# define HUGE_VALF (1.0f / 0.0f)
+# endif
+#endif
+
+/* HUGE_VAL is a 'double' Infinity. */
+#ifndef HUGE_VAL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
+# define HUGE_VAL (1e250 * 1e250)
+# else
+# define HUGE_VAL (1.0 / 0.0)
+# endif
+#endif
+
+/* HUGE_VALL is a 'long double' Infinity. */
+#ifndef HUGE_VALL
+# if defined _MSC_VER
+/* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
+# define HUGE_VALL (1e250L * 1e250L)
+# else
+# define HUGE_VALL (1.0L / 0.0L)
+# endif
+#endif
+
+
+#if defined FP_ILOGB0 && defined FP_ILOGBNAN
+ /* Ensure FP_ILOGB0 and FP_ILOGBNAN are correct. */
+# if defined __HAIKU__
+ /* Haiku: match what ilogb() does */
+# undef FP_ILOGB0
+# undef FP_ILOGBNAN
+# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
+# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
+# endif
+#else
+ /* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
+# if defined __NetBSD__ || defined __sgi
+ /* NetBSD, IRIX 6.5: match what ilogb() does */
+# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
+# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
+# elif defined _AIX
+ /* AIX 5.1: match what ilogb() does in AIX >= 5.2 */
+# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
+# define FP_ILOGBNAN 2147483647 /* INT_MAX */
+# elif defined __sun
+ /* Solaris 9: match what ilogb() does */
+# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
+# define FP_ILOGBNAN 2147483647 /* INT_MAX */
+# else
+ /* Gnulib defined values. */
+# define FP_ILOGB0 (- 2147483647) /* - INT_MAX */
+# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
+# endif
+#endif
+
+
+#if @GNULIB_ACOSF@
+# if @REPLACE_ACOSF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef acosf
+# define acosf rpl_acosf
+# endif
+_GL_FUNCDECL_RPL (acosf, float, (float x));
+_GL_CXXALIAS_RPL (acosf, float, (float x));
+# else
+# if !@HAVE_ACOSF@
+# undef acosf
+_GL_FUNCDECL_SYS (acosf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (acosf, float, (float x));
+# endif
+_GL_CXXALIASWARN (acosf);
+#elif defined GNULIB_POSIXCHECK
+# undef acosf
+# if HAVE_RAW_DECL_ACOSF
+_GL_WARN_ON_USE (acosf, "acosf is unportable - "
+ "use gnulib module acosf for portability");
+# endif
+#endif
+
+#if @GNULIB_ACOSL@
+# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
+# undef acosl
+_GL_FUNCDECL_SYS (acosl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (acosl, long double, (long double x));
+_GL_CXXALIASWARN (acosl);
+#elif defined GNULIB_POSIXCHECK
+# undef acosl
+# if HAVE_RAW_DECL_ACOSL
+_GL_WARN_ON_USE (acosl, "acosl is unportable - "
+ "use gnulib module acosl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ASINF@
+# if @REPLACE_ASINF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef asinf
+# define asinf rpl_asinf
+# endif
+_GL_FUNCDECL_RPL (asinf, float, (float x));
+_GL_CXXALIAS_RPL (asinf, float, (float x));
+# else
+# if !@HAVE_ASINF@
+# undef asinf
+_GL_FUNCDECL_SYS (asinf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (asinf, float, (float x));
+# endif
+_GL_CXXALIASWARN (asinf);
+#elif defined GNULIB_POSIXCHECK
+# undef asinf
+# if HAVE_RAW_DECL_ASINF
+_GL_WARN_ON_USE (asinf, "asinf is unportable - "
+ "use gnulib module asinf for portability");
+# endif
+#endif
+
+#if @GNULIB_ASINL@
+# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
+# undef asinl
+_GL_FUNCDECL_SYS (asinl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (asinl, long double, (long double x));
+_GL_CXXALIASWARN (asinl);
+#elif defined GNULIB_POSIXCHECK
+# undef asinl
+# if HAVE_RAW_DECL_ASINL
+_GL_WARN_ON_USE (asinl, "asinl is unportable - "
+ "use gnulib module asinl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ATANF@
+# if @REPLACE_ATANF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef atanf
+# define atanf rpl_atanf
+# endif
+_GL_FUNCDECL_RPL (atanf, float, (float x));
+_GL_CXXALIAS_RPL (atanf, float, (float x));
+# else
+# if !@HAVE_ATANF@
+# undef atanf
+_GL_FUNCDECL_SYS (atanf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (atanf, float, (float x));
+# endif
+_GL_CXXALIASWARN (atanf);
+#elif defined GNULIB_POSIXCHECK
+# undef atanf
+# if HAVE_RAW_DECL_ATANF
+_GL_WARN_ON_USE (atanf, "atanf is unportable - "
+ "use gnulib module atanf for portability");
+# endif
+#endif
+
+#if @GNULIB_ATANL@
+# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
+# undef atanl
+_GL_FUNCDECL_SYS (atanl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (atanl, long double, (long double x));
+_GL_CXXALIASWARN (atanl);
+#elif defined GNULIB_POSIXCHECK
+# undef atanl
+# if HAVE_RAW_DECL_ATANL
+_GL_WARN_ON_USE (atanl, "atanl is unportable - "
+ "use gnulib module atanl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ATAN2F@
+# if @REPLACE_ATAN2F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef atan2f
+# define atan2f rpl_atan2f
+# endif
+_GL_FUNCDECL_RPL (atan2f, float, (float y, float x));
+_GL_CXXALIAS_RPL (atan2f, float, (float y, float x));
+# else
+# if !@HAVE_ATAN2F@
+# undef atan2f
+_GL_FUNCDECL_SYS (atan2f, float, (float y, float x));
+# endif
+_GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
+# endif
+_GL_CXXALIASWARN (atan2f);
+#elif defined GNULIB_POSIXCHECK
+# undef atan2f
+# if HAVE_RAW_DECL_ATAN2F
+_GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
+ "use gnulib module atan2f for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CBRTF@
+# if @REPLACE_CBRTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cbrtf
+# define cbrtf rpl_cbrtf
+# endif
+_GL_FUNCDECL_RPL (cbrtf, float, (float x));
+_GL_CXXALIAS_RPL (cbrtf, float, (float x));
+# else
+# if !@HAVE_DECL_CBRTF@
+_GL_FUNCDECL_SYS (cbrtf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (cbrtf, float, (float x));
+# endif
+_GL_CXXALIASWARN (cbrtf);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtf
+# if HAVE_RAW_DECL_CBRTF
+_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
+ "use gnulib module cbrtf for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRT@
+# if !@HAVE_CBRT@
+_GL_FUNCDECL_SYS (cbrt, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (cbrt, double, (double x));
+_GL_CXXALIASWARN (cbrt);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrt
+# if HAVE_RAW_DECL_CBRT
+_GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
+ "use gnulib module cbrt for portability");
+# endif
+#endif
+
+#if @GNULIB_CBRTL@
+# if @REPLACE_CBRTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cbrtl
+# define cbrtl rpl_cbrtl
+# endif
+_GL_FUNCDECL_RPL (cbrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
+# else
+# if !@HAVE_DECL_CBRTL@
+_GL_FUNCDECL_SYS (cbrtl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (cbrtl);
+#elif defined GNULIB_POSIXCHECK
+# undef cbrtl
+# if HAVE_RAW_DECL_CBRTL
+_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
+ "use gnulib module cbrtl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CEILF@
+# if @REPLACE_CEILF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ceilf
+# define ceilf rpl_ceilf
+# endif
+_GL_FUNCDECL_RPL (ceilf, float, (float x));
+_GL_CXXALIAS_RPL (ceilf, float, (float x));
+# else
+# if !@HAVE_DECL_CEILF@
+# undef ceilf
+_GL_FUNCDECL_SYS (ceilf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (ceilf, float, (float x));
+# endif
+_GL_CXXALIASWARN (ceilf);
+#elif defined GNULIB_POSIXCHECK
+# undef ceilf
+# if HAVE_RAW_DECL_CEILF
+_GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
+ "use gnulib module ceilf for portability");
+# endif
+#endif
+
+#if @GNULIB_CEIL@
+# if @REPLACE_CEIL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ceil
+# define ceil rpl_ceil
+# endif
+_GL_FUNCDECL_RPL (ceil, double, (double x));
+_GL_CXXALIAS_RPL (ceil, double, (double x));
+# else
+_GL_CXXALIAS_SYS (ceil, double, (double x));
+# endif
+_GL_CXXALIASWARN (ceil);
+#endif
+
+#if @GNULIB_CEILL@
+# if @REPLACE_CEILL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ceill
+# define ceill rpl_ceill
+# endif
+_GL_FUNCDECL_RPL (ceill, long double, (long double x));
+_GL_CXXALIAS_RPL (ceill, long double, (long double x));
+# else
+# if !@HAVE_DECL_CEILL@
+# undef ceill
+_GL_FUNCDECL_SYS (ceill, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (ceill, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (ceill);
+#elif defined GNULIB_POSIXCHECK
+# undef ceill
+# if HAVE_RAW_DECL_CEILL
+_GL_WARN_ON_USE (ceill, "ceill is unportable - "
+ "use gnulib module ceill for portability");
+# endif
+#endif
+
+
+#if @GNULIB_COPYSIGNF@
+# if !@HAVE_DECL_COPYSIGNF@
+_GL_FUNCDECL_SYS (copysignf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
+_GL_CXXALIASWARN (copysignf);
+#elif defined GNULIB_POSIXCHECK
+# undef copysignf
+# if HAVE_RAW_DECL_COPYSIGNF
+_GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
+ "use gnulib module copysignf for portability");
+# endif
+#endif
+
+#if @GNULIB_COPYSIGN@
+# if !@HAVE_COPYSIGN@
+_GL_FUNCDECL_SYS (copysign, double, (double x, double y));
+# endif
+_GL_CXXALIAS_SYS (copysign, double, (double x, double y));
+_GL_CXXALIASWARN (copysign);
+#elif defined GNULIB_POSIXCHECK
+# undef copysign
+# if HAVE_RAW_DECL_COPYSIGN
+_GL_WARN_ON_USE (copysign, "copysign is unportable - "
+ "use gnulib module copysign for portability");
+# endif
+#endif
+
+#if @GNULIB_COPYSIGNL@
+# if !@HAVE_COPYSIGNL@
+_GL_FUNCDECL_SYS (copysignl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y));
+_GL_CXXALIASWARN (copysignl);
+#elif defined GNULIB_POSIXCHECK
+# undef copysignl
+# if HAVE_RAW_DECL_COPYSIGNL
+_GL_WARN_ON_USE (copysign, "copysignl is unportable - "
+ "use gnulib module copysignl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_COSF@
+# if @REPLACE_COSF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef cosf
+# define cosf rpl_cosf
+# endif
+_GL_FUNCDECL_RPL (cosf, float, (float x));
+_GL_CXXALIAS_RPL (cosf, float, (float x));
+# else
+# if !@HAVE_COSF@
+# undef cosf
+_GL_FUNCDECL_SYS (cosf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (cosf, float, (float x));
+# endif
+_GL_CXXALIASWARN (cosf);
+#elif defined GNULIB_POSIXCHECK
+# undef cosf
+# if HAVE_RAW_DECL_COSF
+_GL_WARN_ON_USE (cosf, "cosf is unportable - "
+ "use gnulib module cosf for portability");
+# endif
+#endif
+
+#if @GNULIB_COSL@
+# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
+# undef cosl
+_GL_FUNCDECL_SYS (cosl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (cosl, long double, (long double x));
+_GL_CXXALIASWARN (cosl);
+#elif defined GNULIB_POSIXCHECK
+# undef cosl
+# if HAVE_RAW_DECL_COSL
+_GL_WARN_ON_USE (cosl, "cosl is unportable - "
+ "use gnulib module cosl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_COSHF@
+# if @REPLACE_COSHF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef coshf
+# define coshf rpl_coshf
+# endif
+_GL_FUNCDECL_RPL (coshf, float, (float x));
+_GL_CXXALIAS_RPL (coshf, float, (float x));
+# else
+# if !@HAVE_COSHF@
+# undef coshf
+_GL_FUNCDECL_SYS (coshf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (coshf, float, (float x));
+# endif
+_GL_CXXALIASWARN (coshf);
+#elif defined GNULIB_POSIXCHECK
+# undef coshf
+# if HAVE_RAW_DECL_COSHF
+_GL_WARN_ON_USE (coshf, "coshf is unportable - "
+ "use gnulib module coshf for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPF@
+# if @REPLACE_EXPF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expf
+# define expf rpl_expf
+# endif
+_GL_FUNCDECL_RPL (expf, float, (float x));
+_GL_CXXALIAS_RPL (expf, float, (float x));
+# else
+# if !@HAVE_EXPF@
+# undef expf
+_GL_FUNCDECL_SYS (expf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (expf, float, (float x));
+# endif
+_GL_CXXALIASWARN (expf);
+#elif defined GNULIB_POSIXCHECK
+# undef expf
+# if HAVE_RAW_DECL_EXPF
+_GL_WARN_ON_USE (expf, "expf is unportable - "
+ "use gnulib module expf for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPL@
+# if @REPLACE_EXPL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expl
+# define expl rpl_expl
+# endif
+_GL_FUNCDECL_RPL (expl, long double, (long double x));
+_GL_CXXALIAS_RPL (expl, long double, (long double x));
+# else
+# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
+# undef expl
+_GL_FUNCDECL_SYS (expl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (expl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (expl);
+#elif defined GNULIB_POSIXCHECK
+# undef expl
+# if HAVE_RAW_DECL_EXPL
+_GL_WARN_ON_USE (expl, "expl is unportable - "
+ "use gnulib module expl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXP2F@
+# if !@HAVE_DECL_EXP2F@
+_GL_FUNCDECL_SYS (exp2f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (exp2f, float, (float x));
+_GL_CXXALIASWARN (exp2f);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2f
+# if HAVE_RAW_DECL_EXP2F
+_GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
+ "use gnulib module exp2f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2@
+# if @REPLACE_EXP2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef exp2
+# define exp2 rpl_exp2
+# endif
+_GL_FUNCDECL_RPL (exp2, double, (double x));
+_GL_CXXALIAS_RPL (exp2, double, (double x));
+# else
+# if !@HAVE_DECL_EXP2@
+_GL_FUNCDECL_SYS (exp2, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (exp2, double, (double x));
+# endif
+_GL_CXXALIASWARN (exp2);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2
+# if HAVE_RAW_DECL_EXP2
+_GL_WARN_ON_USE (exp2, "exp2 is unportable - "
+ "use gnulib module exp2 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXP2L@
+# if @REPLACE_EXP2L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef exp2l
+# define exp2l rpl_exp2l
+# endif
+_GL_FUNCDECL_RPL (exp2l, long double, (long double x));
+_GL_CXXALIAS_RPL (exp2l, long double, (long double x));
+# else
+# if !@HAVE_DECL_EXP2L@
+# undef exp2l
+_GL_FUNCDECL_SYS (exp2l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (exp2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (exp2l);
+#elif defined GNULIB_POSIXCHECK
+# undef exp2l
+# if HAVE_RAW_DECL_EXP2L
+_GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
+ "use gnulib module exp2l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPM1F@
+# if @REPLACE_EXPM1F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1f
+# define expm1f rpl_expm1f
+# endif
+_GL_FUNCDECL_RPL (expm1f, float, (float x));
+_GL_CXXALIAS_RPL (expm1f, float, (float x));
+# else
+# if !@HAVE_EXPM1F@
+_GL_FUNCDECL_SYS (expm1f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (expm1f, float, (float x));
+# endif
+_GL_CXXALIASWARN (expm1f);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1f
+# if HAVE_RAW_DECL_EXPM1F
+_GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
+ "use gnulib module expm1f for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1@
+# if @REPLACE_EXPM1@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1
+# define expm1 rpl_expm1
+# endif
+_GL_FUNCDECL_RPL (expm1, double, (double x));
+_GL_CXXALIAS_RPL (expm1, double, (double x));
+# else
+# if !@HAVE_EXPM1@
+_GL_FUNCDECL_SYS (expm1, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (expm1, double, (double x));
+# endif
+_GL_CXXALIASWARN (expm1);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1
+# if HAVE_RAW_DECL_EXPM1
+_GL_WARN_ON_USE (expm1, "expm1 is unportable - "
+ "use gnulib module expm1 for portability");
+# endif
+#endif
+
+#if @GNULIB_EXPM1L@
+# if @REPLACE_EXPM1L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef expm1l
+# define expm1l rpl_expm1l
+# endif
+_GL_FUNCDECL_RPL (expm1l, long double, (long double x));
+_GL_CXXALIAS_RPL (expm1l, long double, (long double x));
+# else
+# if !@HAVE_DECL_EXPM1L@
+# undef expm1l
+_GL_FUNCDECL_SYS (expm1l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (expm1l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (expm1l);
+#elif defined GNULIB_POSIXCHECK
+# undef expm1l
+# if HAVE_RAW_DECL_EXPM1L
+_GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
+ "use gnulib module expm1l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FABSF@
+# if !@HAVE_FABSF@
+# undef fabsf
+_GL_FUNCDECL_SYS (fabsf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (fabsf, float, (float x));
+_GL_CXXALIASWARN (fabsf);
+#elif defined GNULIB_POSIXCHECK
+# undef fabsf
+# if HAVE_RAW_DECL_FABSF
+_GL_WARN_ON_USE (fabsf, "fabsf is unportable - "
+ "use gnulib module fabsf for portability");
+# endif
+#endif
+
+#if @GNULIB_FABSL@
+# if @REPLACE_FABSL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fabsl
+# define fabsl rpl_fabsl
+# endif
+_GL_FUNCDECL_RPL (fabsl, long double, (long double x));
+_GL_CXXALIAS_RPL (fabsl, long double, (long double x));
+# else
+# if !@HAVE_FABSL@
+# undef fabsl
+_GL_FUNCDECL_SYS (fabsl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (fabsl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (fabsl);
+#elif defined GNULIB_POSIXCHECK
+# undef fabsl
+# if HAVE_RAW_DECL_FABSL
+_GL_WARN_ON_USE (fabsl, "fabsl is unportable - "
+ "use gnulib module fabsl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FLOORF@
+# if @REPLACE_FLOORF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef floorf
+# define floorf rpl_floorf
+# endif
+_GL_FUNCDECL_RPL (floorf, float, (float x));
+_GL_CXXALIAS_RPL (floorf, float, (float x));
+# else
+# if !@HAVE_DECL_FLOORF@
+# undef floorf
+_GL_FUNCDECL_SYS (floorf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (floorf, float, (float x));
+# endif
+_GL_CXXALIASWARN (floorf);
+#elif defined GNULIB_POSIXCHECK
+# undef floorf
+# if HAVE_RAW_DECL_FLOORF
+_GL_WARN_ON_USE (floorf, "floorf is unportable - "
+ "use gnulib module floorf for portability");
+# endif
+#endif
+
+#if @GNULIB_FLOOR@
+# if @REPLACE_FLOOR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef floor
+# define floor rpl_floor
+# endif
+_GL_FUNCDECL_RPL (floor, double, (double x));
+_GL_CXXALIAS_RPL (floor, double, (double x));
+# else
+_GL_CXXALIAS_SYS (floor, double, (double x));
+# endif
+_GL_CXXALIASWARN (floor);
+#endif
+
+#if @GNULIB_FLOORL@
+# if @REPLACE_FLOORL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef floorl
+# define floorl rpl_floorl
+# endif
+_GL_FUNCDECL_RPL (floorl, long double, (long double x));
+_GL_CXXALIAS_RPL (floorl, long double, (long double x));
+# else
+# if !@HAVE_DECL_FLOORL@
+# undef floorl
+_GL_FUNCDECL_SYS (floorl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (floorl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (floorl);
+#elif defined GNULIB_POSIXCHECK
+# undef floorl
+# if HAVE_RAW_DECL_FLOORL
+_GL_WARN_ON_USE (floorl, "floorl is unportable - "
+ "use gnulib module floorl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FMAF@
+# if @REPLACE_FMAF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmaf
+# define fmaf rpl_fmaf
+# endif
+_GL_FUNCDECL_RPL (fmaf, float, (float x, float y, float z));
+_GL_CXXALIAS_RPL (fmaf, float, (float x, float y, float z));
+# else
+# if !@HAVE_FMAF@
+_GL_FUNCDECL_SYS (fmaf, float, (float x, float y, float z));
+# endif
+_GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z));
+# endif
+_GL_CXXALIASWARN (fmaf);
+#elif defined GNULIB_POSIXCHECK
+# undef fmaf
+# if HAVE_RAW_DECL_FMAF
+_GL_WARN_ON_USE (fmaf, "fmaf is unportable - "
+ "use gnulib module fmaf for portability");
+# endif
+#endif
+
+#if @GNULIB_FMA@
+# if @REPLACE_FMA@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fma
+# define fma rpl_fma
+# endif
+_GL_FUNCDECL_RPL (fma, double, (double x, double y, double z));
+_GL_CXXALIAS_RPL (fma, double, (double x, double y, double z));
+# else
+# if !@HAVE_FMA@
+_GL_FUNCDECL_SYS (fma, double, (double x, double y, double z));
+# endif
+_GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
+# endif
+_GL_CXXALIASWARN (fma);
+#elif defined GNULIB_POSIXCHECK
+# undef fma
+# if HAVE_RAW_DECL_FMA
+_GL_WARN_ON_USE (fma, "fma is unportable - "
+ "use gnulib module fma for portability");
+# endif
+#endif
+
+#if @GNULIB_FMAL@
+# if @REPLACE_FMAL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmal
+# define fmal rpl_fmal
+# endif
+_GL_FUNCDECL_RPL (fmal, long double,
+ (long double x, long double y, long double z));
+_GL_CXXALIAS_RPL (fmal, long double,
+ (long double x, long double y, long double z));
+# else
+# if !@HAVE_FMAL@
+# undef fmal
+_GL_FUNCDECL_SYS (fmal, long double,
+ (long double x, long double y, long double z));
+# endif
+_GL_CXXALIAS_SYS (fmal, long double,
+ (long double x, long double y, long double z));
+# endif
+_GL_CXXALIASWARN (fmal);
+#elif defined GNULIB_POSIXCHECK
+# undef fmal
+# if HAVE_RAW_DECL_FMAL
+_GL_WARN_ON_USE (fmal, "fmal is unportable - "
+ "use gnulib module fmal for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FMODF@
+# if @REPLACE_FMODF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmodf
+# define fmodf rpl_fmodf
+# endif
+_GL_FUNCDECL_RPL (fmodf, float, (float x, float y));
+_GL_CXXALIAS_RPL (fmodf, float, (float x, float y));
+# else
+# if !@HAVE_FMODF@
+# undef fmodf
+_GL_FUNCDECL_SYS (fmodf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (fmodf);
+#elif defined GNULIB_POSIXCHECK
+# undef fmodf
+# if HAVE_RAW_DECL_FMODF
+_GL_WARN_ON_USE (fmodf, "fmodf is unportable - "
+ "use gnulib module fmodf for portability");
+# endif
+#endif
+
+#if @GNULIB_FMOD@
+# if @REPLACE_FMOD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmod
+# define fmod rpl_fmod
+# endif
+_GL_FUNCDECL_RPL (fmod, double, (double x, double y));
+_GL_CXXALIAS_RPL (fmod, double, (double x, double y));
+# else
+_GL_CXXALIAS_SYS (fmod, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (fmod);
+#elif defined GNULIB_POSIXCHECK
+# undef fmod
+# if HAVE_RAW_DECL_FMOD
+_GL_WARN_ON_USE (fmod, "fmod has portability problems - "
+ "use gnulib module fmod for portability");
+# endif
+#endif
+
+#if @GNULIB_FMODL@
+# if @REPLACE_FMODL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fmodl
+# define fmodl rpl_fmodl
+# endif
+_GL_FUNCDECL_RPL (fmodl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (fmodl, long double, (long double x, long double y));
+# else
+# if !@HAVE_FMODL@
+# undef fmodl
+_GL_FUNCDECL_SYS (fmodl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (fmodl);
+#elif defined GNULIB_POSIXCHECK
+# undef fmodl
+# if HAVE_RAW_DECL_FMODL
+_GL_WARN_ON_USE (fmodl, "fmodl is unportable - "
+ "use gnulib module fmodl for portability");
+# endif
+#endif
+
+
+/* Write x as
+ x = mantissa * 2^exp
+ where
+ If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+ If x is zero: mantissa = x, exp = 0.
+ If x is infinite or NaN: mantissa = x, exp unspecified.
+ Store exp in *EXPPTR and return mantissa. */
+#if @GNULIB_FREXPF@
+# if @REPLACE_FREXPF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef frexpf
+# define frexpf rpl_frexpf
+# endif
+_GL_FUNCDECL_RPL (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (frexpf, float, (float x, int *expptr));
+# else
+# if !@HAVE_FREXPF@
+# undef frexpf
+_GL_FUNCDECL_SYS (frexpf, float, (float x, int *expptr) _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
+# endif
+_GL_CXXALIASWARN (frexpf);
+#elif defined GNULIB_POSIXCHECK
+# undef frexpf
+# if HAVE_RAW_DECL_FREXPF
+_GL_WARN_ON_USE (frexpf, "frexpf is unportable - "
+ "use gnulib module frexpf for portability");
+# endif
+#endif
+
+/* Write x as
+ x = mantissa * 2^exp
+ where
+ If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+ If x is zero: mantissa = x, exp = 0.
+ If x is infinite or NaN: mantissa = x, exp unspecified.
+ Store exp in *EXPPTR and return mantissa. */
+#if @GNULIB_FREXP@
+# if @REPLACE_FREXP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef frexp
+# define frexp rpl_frexp
+# endif
+_GL_FUNCDECL_RPL (frexp, double, (double x, int *expptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (frexp, double, (double x, int *expptr));
+# else
+_GL_CXXALIAS_SYS (frexp, double, (double x, int *expptr));
+# endif
+_GL_CXXALIASWARN1 (frexp, double, (double x, int *expptr));
+#elif defined GNULIB_POSIXCHECK
+# undef frexp
+/* Assume frexp is always declared. */
+_GL_WARN_ON_USE (frexp, "frexp is unportable - "
+ "use gnulib module frexp for portability");
+#endif
+
+/* Write x as
+ x = mantissa * 2^exp
+ where
+ If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+ If x is zero: mantissa = x, exp = 0.
+ If x is infinite or NaN: mantissa = x, exp unspecified.
+ Store exp in *EXPPTR and return mantissa. */
+#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef frexpl
+# define frexpl rpl_frexpl
+# endif
+_GL_FUNCDECL_RPL (frexpl, long double,
+ (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (frexpl, long double, (long double x, int *expptr));
+#else
+# if !@HAVE_DECL_FREXPL@
+_GL_FUNCDECL_SYS (frexpl, long double,
+ (long double x, int *expptr) _GL_ARG_NONNULL ((2)));
+# endif
+# if @GNULIB_FREXPL@
+_GL_CXXALIAS_SYS (frexpl, long double, (long double x, int *expptr));
+# endif
+#endif
+#if @GNULIB_FREXPL@ && !(@REPLACE_FREXPL@ && !@HAVE_DECL_FREXPL@)
+_GL_CXXALIASWARN (frexpl);
+#endif
+#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
+# undef frexpl
+# if HAVE_RAW_DECL_FREXPL
+_GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
+ "use gnulib module frexpl for portability");
+# endif
+#endif
+
+
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOTF@
+# if @REPLACE_HYPOTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypotf
+# define hypotf rpl_hypotf
+# endif
+_GL_FUNCDECL_RPL (hypotf, float, (float x, float y));
+_GL_CXXALIAS_RPL (hypotf, float, (float x, float y));
+# else
+# if !@HAVE_HYPOTF@
+_GL_FUNCDECL_SYS (hypotf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (hypotf);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotf
+# if HAVE_RAW_DECL_HYPOTF
+_GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
+ "use gnulib module hypotf for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOT@
+# if @REPLACE_HYPOT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypot
+# define hypot rpl_hypot
+# endif
+_GL_FUNCDECL_RPL (hypot, double, (double x, double y));
+_GL_CXXALIAS_RPL (hypot, double, (double x, double y));
+# else
+_GL_CXXALIAS_SYS (hypot, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (hypot);
+#elif defined GNULIB_POSIXCHECK
+# undef hypot
+# if HAVE_RAW_DECL_HYPOT
+_GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
+ "use gnulib module hypot for portability");
+# endif
+#endif
+
+/* Return sqrt(x^2+y^2). */
+#if @GNULIB_HYPOTL@
+# if @REPLACE_HYPOTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef hypotl
+# define hypotl rpl_hypotl
+# endif
+_GL_FUNCDECL_RPL (hypotl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (hypotl, long double, (long double x, long double y));
+# else
+# if !@HAVE_HYPOTL@
+_GL_FUNCDECL_SYS (hypotl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (hypotl);
+#elif defined GNULIB_POSIXCHECK
+# undef hypotl
+# if HAVE_RAW_DECL_HYPOTL
+_GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
+ "use gnulib module hypotl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ILOGBF@
+# if @REPLACE_ILOGBF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ilogbf
+# define ilogbf rpl_ilogbf
+# endif
+_GL_FUNCDECL_RPL (ilogbf, int, (float x));
+_GL_CXXALIAS_RPL (ilogbf, int, (float x));
+# else
+# if !@HAVE_ILOGBF@
+_GL_FUNCDECL_SYS (ilogbf, int, (float x));
+# endif
+_GL_CXXALIAS_SYS (ilogbf, int, (float x));
+# endif
+_GL_CXXALIASWARN (ilogbf);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogbf
+# if HAVE_RAW_DECL_ILOGBF
+_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - "
+ "use gnulib module ilogbf for portability");
+# endif
+#endif
+
+#if @GNULIB_ILOGB@
+# if @REPLACE_ILOGB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ilogb
+# define ilogb rpl_ilogb
+# endif
+_GL_FUNCDECL_RPL (ilogb, int, (double x));
+_GL_CXXALIAS_RPL (ilogb, int, (double x));
+# else
+# if !@HAVE_ILOGB@
+_GL_FUNCDECL_SYS (ilogb, int, (double x));
+# endif
+_GL_CXXALIAS_SYS (ilogb, int, (double x));
+# endif
+_GL_CXXALIASWARN (ilogb);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogb
+# if HAVE_RAW_DECL_ILOGB
+_GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
+ "use gnulib module ilogb for portability");
+# endif
+#endif
+
+#if @GNULIB_ILOGBL@
+# if @REPLACE_ILOGBL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ilogbl
+# define ilogbl rpl_ilogbl
+# endif
+_GL_FUNCDECL_RPL (ilogbl, int, (long double x));
+_GL_CXXALIAS_RPL (ilogbl, int, (long double x));
+# else
+# if !@HAVE_ILOGBL@
+_GL_FUNCDECL_SYS (ilogbl, int, (long double x));
+# endif
+_GL_CXXALIAS_SYS (ilogbl, int, (long double x));
+# endif
+_GL_CXXALIASWARN (ilogbl);
+#elif defined GNULIB_POSIXCHECK
+# undef ilogbl
+# if HAVE_RAW_DECL_ILOGBL
+_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
+ "use gnulib module ilogbl for portability");
+# endif
+#endif
+
+
+/* Return x * 2^exp. */
+#if @GNULIB_LDEXPF@
+# if !@HAVE_LDEXPF@
+# undef ldexpf
+_GL_FUNCDECL_SYS (ldexpf, float, (float x, int exp));
+# endif
+_GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
+_GL_CXXALIASWARN (ldexpf);
+#elif defined GNULIB_POSIXCHECK
+# undef ldexpf
+# if HAVE_RAW_DECL_LDEXPF
+_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - "
+ "use gnulib module ldexpf for portability");
+# endif
+#endif
+
+/* Return x * 2^exp. */
+#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef ldexpl
+# define ldexpl rpl_ldexpl
+# endif
+_GL_FUNCDECL_RPL (ldexpl, long double, (long double x, int exp));
+_GL_CXXALIAS_RPL (ldexpl, long double, (long double x, int exp));
+#else
+# if !@HAVE_DECL_LDEXPL@
+_GL_FUNCDECL_SYS (ldexpl, long double, (long double x, int exp));
+# endif
+# if @GNULIB_LDEXPL@
+_GL_CXXALIAS_SYS (ldexpl, long double, (long double x, int exp));
+# endif
+#endif
+#if @GNULIB_LDEXPL@
+_GL_CXXALIASWARN (ldexpl);
+#endif
+#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
+# undef ldexpl
+# if HAVE_RAW_DECL_LDEXPL
+_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
+ "use gnulib module ldexpl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOGF@
+# if @REPLACE_LOGF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logf
+# define logf rpl_logf
+# endif
+_GL_FUNCDECL_RPL (logf, float, (float x));
+_GL_CXXALIAS_RPL (logf, float, (float x));
+# else
+# if !@HAVE_LOGF@
+# undef logf
+_GL_FUNCDECL_SYS (logf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (logf, float, (float x));
+# endif
+_GL_CXXALIASWARN (logf);
+#elif defined GNULIB_POSIXCHECK
+# undef logf
+# if HAVE_RAW_DECL_LOGF
+_GL_WARN_ON_USE (logf, "logf is unportable - "
+ "use gnulib module logf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG@
+# if @REPLACE_LOG@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log
+# define log rpl_log
+# endif
+_GL_FUNCDECL_RPL (log, double, (double x));
+_GL_CXXALIAS_RPL (log, double, (double x));
+# else
+_GL_CXXALIAS_SYS (log, double, (double x));
+# endif
+_GL_CXXALIASWARN (log);
+#elif defined GNULIB_POSIXCHECK
+# undef log
+# if HAVE_RAW_DECL_LOG
+_GL_WARN_ON_USE (log, "log has portability problems - "
+ "use gnulib module log for portability");
+# endif
+#endif
+
+#if @GNULIB_LOGL@
+# if @REPLACE_LOGL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logl
+# define logl rpl_logl
+# endif
+_GL_FUNCDECL_RPL (logl, long double, (long double x));
+_GL_CXXALIAS_RPL (logl, long double, (long double x));
+# else
+# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+# undef logl
+_GL_FUNCDECL_SYS (logl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (logl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (logl);
+#elif defined GNULIB_POSIXCHECK
+# undef logl
+# if HAVE_RAW_DECL_LOGL
+_GL_WARN_ON_USE (logl, "logl is unportable - "
+ "use gnulib module logl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG10F@
+# if @REPLACE_LOG10F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log10f
+# define log10f rpl_log10f
+# endif
+_GL_FUNCDECL_RPL (log10f, float, (float x));
+_GL_CXXALIAS_RPL (log10f, float, (float x));
+# else
+# if !@HAVE_LOG10F@
+# undef log10f
+_GL_FUNCDECL_SYS (log10f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log10f, float, (float x));
+# endif
+_GL_CXXALIASWARN (log10f);
+#elif defined GNULIB_POSIXCHECK
+# undef log10f
+# if HAVE_RAW_DECL_LOG10F
+_GL_WARN_ON_USE (log10f, "log10f is unportable - "
+ "use gnulib module log10f for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG10@
+# if @REPLACE_LOG10@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log10
+# define log10 rpl_log10
+# endif
+_GL_FUNCDECL_RPL (log10, double, (double x));
+_GL_CXXALIAS_RPL (log10, double, (double x));
+# else
+_GL_CXXALIAS_SYS (log10, double, (double x));
+# endif
+_GL_CXXALIASWARN (log10);
+#elif defined GNULIB_POSIXCHECK
+# undef log10
+# if HAVE_RAW_DECL_LOG10
+_GL_WARN_ON_USE (log10, "log10 has portability problems - "
+ "use gnulib module log10 for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG10L@
+# if @REPLACE_LOG10L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log10l
+# define log10l rpl_log10l
+# endif
+_GL_FUNCDECL_RPL (log10l, long double, (long double x));
+_GL_CXXALIAS_RPL (log10l, long double, (long double x));
+# else
+# if !@HAVE_LOG10L@ || !@HAVE_DECL_LOG10L@
+# undef log10l
+_GL_FUNCDECL_SYS (log10l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log10l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log10l);
+#elif defined GNULIB_POSIXCHECK
+# undef log10l
+# if HAVE_RAW_DECL_LOG10L
+_GL_WARN_ON_USE (log10l, "log10l is unportable - "
+ "use gnulib module log10l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG1PF@
+# if @REPLACE_LOG1PF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1pf
+# define log1pf rpl_log1pf
+# endif
+_GL_FUNCDECL_RPL (log1pf, float, (float x));
+_GL_CXXALIAS_RPL (log1pf, float, (float x));
+# else
+# if !@HAVE_LOG1PF@
+_GL_FUNCDECL_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log1pf, float, (float x));
+# endif
+_GL_CXXALIASWARN (log1pf);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pf
+# if HAVE_RAW_DECL_LOG1PF
+_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
+ "use gnulib module log1pf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1P@
+# if @REPLACE_LOG1P@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1p
+# define log1p rpl_log1p
+# endif
+_GL_FUNCDECL_RPL (log1p, double, (double x));
+_GL_CXXALIAS_RPL (log1p, double, (double x));
+# else
+# if !@HAVE_LOG1P@
+_GL_FUNCDECL_SYS (log1p, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (log1p, double, (double x));
+# endif
+_GL_CXXALIASWARN (log1p);
+#elif defined GNULIB_POSIXCHECK
+# undef log1p
+# if HAVE_RAW_DECL_LOG1P
+_GL_WARN_ON_USE (log1p, "log1p has portability problems - "
+ "use gnulib module log1p for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG1PL@
+# if @REPLACE_LOG1PL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log1pl
+# define log1pl rpl_log1pl
+# endif
+_GL_FUNCDECL_RPL (log1pl, long double, (long double x));
+_GL_CXXALIAS_RPL (log1pl, long double, (long double x));
+# else
+# if !@HAVE_LOG1PL@
+_GL_FUNCDECL_SYS (log1pl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log1pl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log1pl);
+#elif defined GNULIB_POSIXCHECK
+# undef log1pl
+# if HAVE_RAW_DECL_LOG1PL
+_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
+ "use gnulib module log1pl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOG2F@
+# if @REPLACE_LOG2F@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2f
+# define log2f rpl_log2f
+# endif
+_GL_FUNCDECL_RPL (log2f, float, (float x));
+_GL_CXXALIAS_RPL (log2f, float, (float x));
+# else
+# if !@HAVE_DECL_LOG2F@
+# undef log2f
+_GL_FUNCDECL_SYS (log2f, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (log2f, float, (float x));
+# endif
+_GL_CXXALIASWARN (log2f);
+#elif defined GNULIB_POSIXCHECK
+# undef log2f
+# if HAVE_RAW_DECL_LOG2F
+_GL_WARN_ON_USE (log2f, "log2f is unportable - "
+ "use gnulib module log2f for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2@
+# if @REPLACE_LOG2@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2
+# define log2 rpl_log2
+# endif
+_GL_FUNCDECL_RPL (log2, double, (double x));
+_GL_CXXALIAS_RPL (log2, double, (double x));
+# else
+# if !@HAVE_DECL_LOG2@
+# undef log2
+_GL_FUNCDECL_SYS (log2, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (log2, double, (double x));
+# endif
+_GL_CXXALIASWARN (log2);
+#elif defined GNULIB_POSIXCHECK
+# undef log2
+# if HAVE_RAW_DECL_LOG2
+_GL_WARN_ON_USE (log2, "log2 is unportable - "
+ "use gnulib module log2 for portability");
+# endif
+#endif
+
+#if @GNULIB_LOG2L@
+# if @REPLACE_LOG2L@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef log2l
+# define log2l rpl_log2l
+# endif
+_GL_FUNCDECL_RPL (log2l, long double, (long double x));
+_GL_CXXALIAS_RPL (log2l, long double, (long double x));
+# else
+# if !@HAVE_DECL_LOG2L@
+_GL_FUNCDECL_SYS (log2l, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (log2l, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (log2l);
+#elif defined GNULIB_POSIXCHECK
+# undef log2l
+# if HAVE_RAW_DECL_LOG2L
+_GL_WARN_ON_USE (log2l, "log2l is unportable - "
+ "use gnulib module log2l for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOGBF@
+# if @REPLACE_LOGBF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logbf
+# define logbf rpl_logbf
+# endif
+_GL_FUNCDECL_RPL (logbf, float, (float x));
+_GL_CXXALIAS_RPL (logbf, float, (float x));
+# else
+# if !@HAVE_LOGBF@
+_GL_FUNCDECL_SYS (logbf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (logbf, float, (float x));
+# endif
+_GL_CXXALIASWARN (logbf);
+#elif defined GNULIB_POSIXCHECK
+# undef logbf
+# if HAVE_RAW_DECL_LOGBF
+_GL_WARN_ON_USE (logbf, "logbf is unportable - "
+ "use gnulib module logbf for portability");
+# endif
+#endif
+
+#if @GNULIB_LOGB@
+# if @REPLACE_LOGB@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logb
+# define logb rpl_logb
+# endif
+_GL_FUNCDECL_RPL (logb, double, (double x));
+_GL_CXXALIAS_RPL (logb, double, (double x));
+# else
+# if !@HAVE_DECL_LOGB@
+_GL_FUNCDECL_SYS (logb, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (logb, double, (double x));
+# endif
+_GL_CXXALIASWARN (logb);
+#elif defined GNULIB_POSIXCHECK
+# undef logb
+# if HAVE_RAW_DECL_LOGB
+_GL_WARN_ON_USE (logb, "logb is unportable - "
+ "use gnulib module logb for portability");
+# endif
+#endif
+
+#if @GNULIB_LOGBL@
+# if @REPLACE_LOGBL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef logbl
+# define logbl rpl_logbl
+# endif
+_GL_FUNCDECL_RPL (logbl, long double, (long double x));
+_GL_CXXALIAS_RPL (logbl, long double, (long double x));
+# else
+# if !@HAVE_LOGBL@
+_GL_FUNCDECL_SYS (logbl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (logbl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (logbl);
+#elif defined GNULIB_POSIXCHECK
+# undef logbl
+# if HAVE_RAW_DECL_LOGBL
+_GL_WARN_ON_USE (logbl, "logbl is unportable - "
+ "use gnulib module logbl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MODFF@
+# if @REPLACE_MODFF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef modff
+# define modff rpl_modff
+# endif
+_GL_FUNCDECL_RPL (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modff, float, (float x, float *iptr));
+# else
+# if !@HAVE_MODFF@
+# undef modff
+_GL_FUNCDECL_SYS (modff, float, (float x, float *iptr) _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
+# endif
+_GL_CXXALIASWARN (modff);
+#elif defined GNULIB_POSIXCHECK
+# undef modff
+# if HAVE_RAW_DECL_MODFF
+_GL_WARN_ON_USE (modff, "modff is unportable - "
+ "use gnulib module modff for portability");
+# endif
+#endif
+
+#if @GNULIB_MODF@
+# if @REPLACE_MODF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef modf
+# define modf rpl_modf
+# endif
+_GL_FUNCDECL_RPL (modf, double, (double x, double *iptr) _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modf, double, (double x, double *iptr));
+# else
+_GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
+# endif
+_GL_CXXALIASWARN (modf);
+#elif defined GNULIB_POSIXCHECK
+# undef modf
+# if HAVE_RAW_DECL_MODF
+_GL_WARN_ON_USE (modf, "modf has portability problems - "
+ "use gnulib module modf for portability");
+# endif
+#endif
+
+#if @GNULIB_MODFL@
+# if @REPLACE_MODFL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef modfl
+# define modfl rpl_modfl
+# endif
+_GL_FUNCDECL_RPL (modfl, long double, (long double x, long double *iptr)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_RPL (modfl, long double, (long double x, long double *iptr));
+# else
+# if !@HAVE_MODFL@
+# undef modfl
+_GL_FUNCDECL_SYS (modfl, long double, (long double x, long double *iptr)
+ _GL_ARG_NONNULL ((2)));
+# endif
+_GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
+# endif
+_GL_CXXALIASWARN (modfl);
+#elif defined GNULIB_POSIXCHECK
+# undef modfl
+# if HAVE_RAW_DECL_MODFL
+_GL_WARN_ON_USE (modfl, "modfl is unportable - "
+ "use gnulib module modfl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_POWF@
+# if !@HAVE_POWF@
+# undef powf
+_GL_FUNCDECL_SYS (powf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (powf, float, (float x, float y));
+_GL_CXXALIASWARN (powf);
+#elif defined GNULIB_POSIXCHECK
+# undef powf
+# if HAVE_RAW_DECL_POWF
+_GL_WARN_ON_USE (powf, "powf is unportable - "
+ "use gnulib module powf for portability");
+# endif
+#endif
+
+
+#if @GNULIB_REMAINDERF@
+# if @REPLACE_REMAINDERF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef remainderf
+# define remainderf rpl_remainderf
+# endif
+_GL_FUNCDECL_RPL (remainderf, float, (float x, float y));
+_GL_CXXALIAS_RPL (remainderf, float, (float x, float y));
+# else
+# if !@HAVE_REMAINDERF@
+_GL_FUNCDECL_SYS (remainderf, float, (float x, float y));
+# endif
+_GL_CXXALIAS_SYS (remainderf, float, (float x, float y));
+# endif
+_GL_CXXALIASWARN (remainderf);
+#elif defined GNULIB_POSIXCHECK
+# undef remainderf
+# if HAVE_RAW_DECL_REMAINDERF
+_GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
+ "use gnulib module remainderf for portability");
+# endif
+#endif
+
+#if @GNULIB_REMAINDER@
+# if @REPLACE_REMAINDER@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef remainder
+# define remainder rpl_remainder
+# endif
+_GL_FUNCDECL_RPL (remainder, double, (double x, double y));
+_GL_CXXALIAS_RPL (remainder, double, (double x, double y));
+# else
+# if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
+_GL_FUNCDECL_SYS (remainder, double, (double x, double y));
+# endif
+_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
+# endif
+_GL_CXXALIASWARN (remainder);
+#elif defined GNULIB_POSIXCHECK
+# undef remainder
+# if HAVE_RAW_DECL_REMAINDER
+_GL_WARN_ON_USE (remainder, "remainder is unportable - "
+ "use gnulib module remainder for portability");
+# endif
+#endif
+
+#if @GNULIB_REMAINDERL@
+# if @REPLACE_REMAINDERL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef remainderl
+# define remainderl rpl_remainderl
+# endif
+_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y));
+_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
+# else
+# if !@HAVE_DECL_REMAINDERL@
+# undef remainderl
+_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
+# endif
+_GL_CXXALIASWARN (remainderl);
+#elif defined GNULIB_POSIXCHECK
+# undef remainderl
+# if HAVE_RAW_DECL_REMAINDERL
+_GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
+ "use gnulib module remainderl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RINTF@
+# if !@HAVE_DECL_RINTF@
+_GL_FUNCDECL_SYS (rintf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (rintf, float, (float x));
+_GL_CXXALIASWARN (rintf);
+#elif defined GNULIB_POSIXCHECK
+# undef rintf
+# if HAVE_RAW_DECL_RINTF
+_GL_WARN_ON_USE (rintf, "rintf is unportable - "
+ "use gnulib module rintf for portability");
+# endif
+#endif
+
+#if @GNULIB_RINT@
+# if !@HAVE_RINT@
+_GL_FUNCDECL_SYS (rint, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (rint, double, (double x));
+_GL_CXXALIASWARN (rint);
+#elif defined GNULIB_POSIXCHECK
+# undef rint
+# if HAVE_RAW_DECL_RINT
+_GL_WARN_ON_USE (rint, "rint is unportable - "
+ "use gnulib module rint for portability");
+# endif
+#endif
+
+#if @GNULIB_RINTL@
+# if @REPLACE_RINTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef rintl
+# define rintl rpl_rintl
+# endif
+_GL_FUNCDECL_RPL (rintl, long double, (long double x));
+_GL_CXXALIAS_RPL (rintl, long double, (long double x));
+# else
+# if !@HAVE_RINTL@
+_GL_FUNCDECL_SYS (rintl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (rintl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (rintl);
+#elif defined GNULIB_POSIXCHECK
+# undef rintl
+# if HAVE_RAW_DECL_RINTL
+_GL_WARN_ON_USE (rintl, "rintl is unportable - "
+ "use gnulib module rintl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ROUNDF@
+# if @REPLACE_ROUNDF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef roundf
+# define roundf rpl_roundf
+# endif
+_GL_FUNCDECL_RPL (roundf, float, (float x));
+_GL_CXXALIAS_RPL (roundf, float, (float x));
+# else
+# if !@HAVE_DECL_ROUNDF@
+_GL_FUNCDECL_SYS (roundf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (roundf, float, (float x));
+# endif
+_GL_CXXALIASWARN (roundf);
+#elif defined GNULIB_POSIXCHECK
+# undef roundf
+# if HAVE_RAW_DECL_ROUNDF
+_GL_WARN_ON_USE (roundf, "roundf is unportable - "
+ "use gnulib module roundf for portability");
+# endif
+#endif
+
+#if @GNULIB_ROUND@
+# if @REPLACE_ROUND@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef round
+# define round rpl_round
+# endif
+_GL_FUNCDECL_RPL (round, double, (double x));
+_GL_CXXALIAS_RPL (round, double, (double x));
+# else
+# if !@HAVE_DECL_ROUND@
+_GL_FUNCDECL_SYS (round, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (round, double, (double x));
+# endif
+_GL_CXXALIASWARN (round);
+#elif defined GNULIB_POSIXCHECK
+# undef round
+# if HAVE_RAW_DECL_ROUND
+_GL_WARN_ON_USE (round, "round is unportable - "
+ "use gnulib module round for portability");
+# endif
+#endif
+
+#if @GNULIB_ROUNDL@
+# if @REPLACE_ROUNDL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef roundl
+# define roundl rpl_roundl
+# endif
+_GL_FUNCDECL_RPL (roundl, long double, (long double x));
+_GL_CXXALIAS_RPL (roundl, long double, (long double x));
+# else
+# if !@HAVE_DECL_ROUNDL@
+# undef roundl
+_GL_FUNCDECL_SYS (roundl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (roundl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (roundl);
+#elif defined GNULIB_POSIXCHECK
+# undef roundl
+# if HAVE_RAW_DECL_ROUNDL
+_GL_WARN_ON_USE (roundl, "roundl is unportable - "
+ "use gnulib module roundl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SINF@
+# if @REPLACE_SINF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sinf
+# define sinf rpl_sinf
+# endif
+_GL_FUNCDECL_RPL (sinf, float, (float x));
+_GL_CXXALIAS_RPL (sinf, float, (float x));
+# else
+# if !@HAVE_SINF@
+ # undef sinf
+_GL_FUNCDECL_SYS (sinf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (sinf, float, (float x));
+# endif
+_GL_CXXALIASWARN (sinf);
+#elif defined GNULIB_POSIXCHECK
+# undef sinf
+# if HAVE_RAW_DECL_SINF
+_GL_WARN_ON_USE (sinf, "sinf is unportable - "
+ "use gnulib module sinf for portability");
+# endif
+#endif
+
+#if @GNULIB_SINL@
+# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
+# undef sinl
+_GL_FUNCDECL_SYS (sinl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (sinl, long double, (long double x));
+_GL_CXXALIASWARN (sinl);
+#elif defined GNULIB_POSIXCHECK
+# undef sinl
+# if HAVE_RAW_DECL_SINL
+_GL_WARN_ON_USE (sinl, "sinl is unportable - "
+ "use gnulib module sinl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SINHF@
+# if @REPLACE_SINHF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sinhf
+# define sinhf rpl_sinhf
+# endif
+_GL_FUNCDECL_RPL (sinhf, float, (float x));
+_GL_CXXALIAS_RPL (sinhf, float, (float x));
+# else
+# if !@HAVE_SINHF@
+# undef sinhf
+_GL_FUNCDECL_SYS (sinhf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (sinhf, float, (float x));
+# endif
+_GL_CXXALIASWARN (sinhf);
+#elif defined GNULIB_POSIXCHECK
+# undef sinhf
+# if HAVE_RAW_DECL_SINHF
+_GL_WARN_ON_USE (sinhf, "sinhf is unportable - "
+ "use gnulib module sinhf for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SQRTF@
+# if @REPLACE_SQRTF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sqrtf
+# define sqrtf rpl_sqrtf
+# endif
+_GL_FUNCDECL_RPL (sqrtf, float, (float x));
+_GL_CXXALIAS_RPL (sqrtf, float, (float x));
+# else
+# if !@HAVE_SQRTF@
+# undef sqrtf
+_GL_FUNCDECL_SYS (sqrtf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (sqrtf, float, (float x));
+# endif
+_GL_CXXALIASWARN (sqrtf);
+#elif defined GNULIB_POSIXCHECK
+# undef sqrtf
+# if HAVE_RAW_DECL_SQRTF
+_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - "
+ "use gnulib module sqrtf for portability");
+# endif
+#endif
+
+#if @GNULIB_SQRTL@
+# if @REPLACE_SQRTL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sqrtl
+# define sqrtl rpl_sqrtl
+# endif
+_GL_FUNCDECL_RPL (sqrtl, long double, (long double x));
+_GL_CXXALIAS_RPL (sqrtl, long double, (long double x));
+# else
+# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+# undef sqrtl
+_GL_FUNCDECL_SYS (sqrtl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (sqrtl);
+#elif defined GNULIB_POSIXCHECK
+# undef sqrtl
+# if HAVE_RAW_DECL_SQRTL
+_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
+ "use gnulib module sqrtl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TANF@
+# if @REPLACE_TANF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef tanf
+# define tanf rpl_tanf
+# endif
+_GL_FUNCDECL_RPL (tanf, float, (float x));
+_GL_CXXALIAS_RPL (tanf, float, (float x));
+# else
+# if !@HAVE_TANF@
+# undef tanf
+_GL_FUNCDECL_SYS (tanf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (tanf, float, (float x));
+# endif
+_GL_CXXALIASWARN (tanf);
+#elif defined GNULIB_POSIXCHECK
+# undef tanf
+# if HAVE_RAW_DECL_TANF
+_GL_WARN_ON_USE (tanf, "tanf is unportable - "
+ "use gnulib module tanf for portability");
+# endif
+#endif
+
+#if @GNULIB_TANL@
+# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
+# undef tanl
+_GL_FUNCDECL_SYS (tanl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (tanl, long double, (long double x));
+_GL_CXXALIASWARN (tanl);
+#elif defined GNULIB_POSIXCHECK
+# undef tanl
+# if HAVE_RAW_DECL_TANL
+_GL_WARN_ON_USE (tanl, "tanl is unportable - "
+ "use gnulib module tanl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TANHF@
+# if @REPLACE_TANHF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef tanhf
+# define tanhf rpl_tanhf
+# endif
+_GL_FUNCDECL_RPL (tanhf, float, (float x));
+_GL_CXXALIAS_RPL (tanhf, float, (float x));
+# else
+# if !@HAVE_TANHF@
+# undef tanhf
+_GL_FUNCDECL_SYS (tanhf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (tanhf, float, (float x));
+# endif
+_GL_CXXALIASWARN (tanhf);
+#elif defined GNULIB_POSIXCHECK
+# undef tanhf
+# if HAVE_RAW_DECL_TANHF
+_GL_WARN_ON_USE (tanhf, "tanhf is unportable - "
+ "use gnulib module tanhf for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TRUNCF@
+# if @REPLACE_TRUNCF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef truncf
+# define truncf rpl_truncf
+# endif
+_GL_FUNCDECL_RPL (truncf, float, (float x));
+_GL_CXXALIAS_RPL (truncf, float, (float x));
+# else
+# if !@HAVE_DECL_TRUNCF@
+_GL_FUNCDECL_SYS (truncf, float, (float x));
+# endif
+_GL_CXXALIAS_SYS (truncf, float, (float x));
+# endif
+_GL_CXXALIASWARN (truncf);
+#elif defined GNULIB_POSIXCHECK
+# undef truncf
+# if HAVE_RAW_DECL_TRUNCF
+_GL_WARN_ON_USE (truncf, "truncf is unportable - "
+ "use gnulib module truncf for portability");
+# endif
+#endif
+
+#if @GNULIB_TRUNC@
+# if @REPLACE_TRUNC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef trunc
+# define trunc rpl_trunc
+# endif
+_GL_FUNCDECL_RPL (trunc, double, (double x));
+_GL_CXXALIAS_RPL (trunc, double, (double x));
+# else
+# if !@HAVE_DECL_TRUNC@
+_GL_FUNCDECL_SYS (trunc, double, (double x));
+# endif
+_GL_CXXALIAS_SYS (trunc, double, (double x));
+# endif
+_GL_CXXALIASWARN (trunc);
+#elif defined GNULIB_POSIXCHECK
+# undef trunc
+# if HAVE_RAW_DECL_TRUNC
+_GL_WARN_ON_USE (trunc, "trunc is unportable - "
+ "use gnulib module trunc for portability");
+# endif
+#endif
+
+#if @GNULIB_TRUNCL@
+# if @REPLACE_TRUNCL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef truncl
+# define truncl rpl_truncl
+# endif
+_GL_FUNCDECL_RPL (truncl, long double, (long double x));
+_GL_CXXALIAS_RPL (truncl, long double, (long double x));
+# else
+# if !@HAVE_DECL_TRUNCL@
+_GL_FUNCDECL_SYS (truncl, long double, (long double x));
+# endif
+_GL_CXXALIAS_SYS (truncl, long double, (long double x));
+# endif
+_GL_CXXALIASWARN (truncl);
+#elif defined GNULIB_POSIXCHECK
+# undef truncl
+# if HAVE_RAW_DECL_TRUNCL
+_GL_WARN_ON_USE (truncl, "truncl is unportable - "
+ "use gnulib module truncl for portability");
+# endif
+#endif
+
+
+/* Definitions of function-like macros come here, after the function
+ declarations. */
+
+
+#if @GNULIB_ISFINITE@
+# if @REPLACE_ISFINITE@
+_GL_EXTERN_C int gl_isfinitef (float x);
+_GL_EXTERN_C int gl_isfinited (double x);
+_GL_EXTERN_C int gl_isfinitel (long double x);
+# undef isfinite
+# define isfinite(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
+ sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
+ gl_isfinitef (x))
+# endif
+# ifdef __cplusplus
+# if defined isfinite || defined GNULIB_NAMESPACE
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
+# undef isfinite
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isfinite)
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isfinite
+_GL_WARN_REAL_FLOATING_DECL (isfinite);
+# undef isfinite
+# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
+# endif
+#endif
+
+
+#if @GNULIB_ISINF@
+# if @REPLACE_ISINF@
+_GL_EXTERN_C int gl_isinff (float x);
+_GL_EXTERN_C int gl_isinfd (double x);
+_GL_EXTERN_C int gl_isinfl (long double x);
+# undef isinf
+# define isinf(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
+ sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
+ gl_isinff (x))
+# endif
+# ifdef __cplusplus
+# if defined isinf || defined GNULIB_NAMESPACE
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
+# undef isinf
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isinf)
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isinf
+_GL_WARN_REAL_FLOATING_DECL (isinf);
+# undef isinf
+# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
+# endif
+#endif
+
+
+#if @GNULIB_ISNANF@
+/* Test for NaN for 'float' numbers. */
+# if @HAVE_ISNANF@
+/* The original <math.h> included above provides a declaration of isnan macro
+ or (older) isnanf function. */
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+# elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+# endif
+# else
+/* Test whether X is a NaN. */
+# undef isnanf
+# define isnanf rpl_isnanf
+_GL_EXTERN_C int isnanf (float x);
+# endif
+#endif
+
+#if @GNULIB_ISNAND@
+/* Test for NaN for 'double' numbers.
+ This function is a gnulib extension, unlike isnan() which applied only
+ to 'double' numbers earlier but now is a type-generic macro. */
+# if @HAVE_ISNAND@
+/* The original <math.h> included above provides a declaration of isnan
+ macro. */
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnand
+# define isnand(x) __builtin_isnan ((double)(x))
+# else
+# undef isnand
+# define isnand(x) isnan ((double)(x))
+# endif
+# else
+/* Test whether X is a NaN. */
+# undef isnand
+# define isnand rpl_isnand
+_GL_EXTERN_C int isnand (double x);
+# endif
+#endif
+
+#if @GNULIB_ISNANL@
+/* Test for NaN for 'long double' numbers. */
+# if @HAVE_ISNANL@
+/* The original <math.h> included above provides a declaration of isnan
+ macro or (older) isnanl function. */
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+# elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+# endif
+# else
+/* Test whether X is a NaN. */
+# undef isnanl
+# define isnanl rpl_isnanl
+_GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
+# endif
+#endif
+
+/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
+#if @GNULIB_ISNAN@
+# if @REPLACE_ISNAN@
+/* We can't just use the isnanf macro (e.g.) as exposed by
+ isnanf.h (e.g.) here, because those may end up being macros
+ that recursively expand back to isnan. So use the gnulib
+ replacements for them directly. */
+# if @HAVE_ISNANF@ && __GNUC__ >= 4
+# define gl_isnan_f(x) __builtin_isnanf ((float)(x))
+# else
+_GL_EXTERN_C int rpl_isnanf (float x);
+# define gl_isnan_f(x) rpl_isnanf (x)
+# endif
+# if @HAVE_ISNAND@ && __GNUC__ >= 4
+# define gl_isnan_d(x) __builtin_isnan ((double)(x))
+# else
+_GL_EXTERN_C int rpl_isnand (double x);
+# define gl_isnan_d(x) rpl_isnand (x)
+# endif
+# if @HAVE_ISNANL@ && __GNUC__ >= 4
+# define gl_isnan_l(x) __builtin_isnanl ((long double)(x))
+# else
+_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
+# define gl_isnan_l(x) rpl_isnanl (x)
+# endif
+# undef isnan
+# define isnan(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
+ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
+ gl_isnan_f (x))
+# elif __GNUC__ >= 4
+# undef isnan
+# define isnan(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_isnanl ((long double)(x)) : \
+ sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
+ __builtin_isnanf ((float)(x)))
+# endif
+# ifdef __cplusplus
+# if defined isnan || defined GNULIB_NAMESPACE
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
+# undef isnan
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (isnan)
+# endif
+# else
+/* Ensure isnan is a macro. */
+# ifndef isnan
+# define isnan isnan
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isnan
+_GL_WARN_REAL_FLOATING_DECL (isnan);
+# undef isnan
+# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
+# endif
+#endif
+
+
+#if @GNULIB_SIGNBIT@
+# if (@REPLACE_SIGNBIT_USING_GCC@ \
+ && (!defined __cplusplus || __cplusplus < 201103))
+# undef signbit
+ /* GCC 4.0 and newer provides three built-ins for signbit. */
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+# endif
+# if @REPLACE_SIGNBIT@
+# undef signbit
+_GL_EXTERN_C int gl_signbitf (float arg);
+_GL_EXTERN_C int gl_signbitd (double arg);
+_GL_EXTERN_C int gl_signbitl (long double arg);
+# if __GNUC__ >= 2 && !defined __STRICT_ANSI__
+# define _GL_NUM_UINT_WORDS(type) \
+ ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
+# define gl_signbitf_OPTIMIZED_MACRO
+# define gl_signbitf(arg) \
+ ({ union { float _value; \
+ unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \
+ } _m; \
+ _m._value = (arg); \
+ (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
+ })
+# endif
+# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
+# define gl_signbitd_OPTIMIZED_MACRO
+# define gl_signbitd(arg) \
+ ({ union { double _value; \
+ unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \
+ } _m; \
+ _m._value = (arg); \
+ (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
+ })
+# endif
+# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
+# define gl_signbitl_OPTIMIZED_MACRO
+# define gl_signbitl(arg) \
+ ({ union { long double _value; \
+ unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \
+ } _m; \
+ _m._value = (arg); \
+ (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
+ })
+# endif
+# endif
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
+ gl_signbitf (x))
+# endif
+# ifdef __cplusplus
+# if defined signbit || defined GNULIB_NAMESPACE
+_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
+# undef signbit
+_GL_MATH_CXX_REAL_FLOATING_DECL_2 (signbit)
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined signbit
+_GL_WARN_REAL_FLOATING_DECL (signbit);
+# undef signbit
+# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
+# endif
+#endif
+
+_GL_INLINE_HEADER_END
+
+#endif /* _@GUARD_PREFIX@_MATH_H */
+#endif /* _@GUARD_PREFIX@_MATH_H */
diff --git a/glib/gnulib/isinf.c b/glib/gnulib/isinf.c
new file mode 100644
index 000000000..e7b44b98d
--- /dev/null
+++ b/glib/gnulib/isinf.c
@@ -0,0 +1,30 @@
+#ifndef _MSC_VER
+#error "This implementation is currently supported for Visual Studio only!"
+#endif
+
+#include "config.h"
+#include <gnulib_math.h>
+#include <float.h>
+#include <math.h>
+
+int
+gl_isinff (float x)
+{
+#if defined (_WIN64) && (defined (_M_X64) || defined (_M_AMD64))
+ return !_finitef (x);
+#else
+ return !_finite (x);
+#endif
+}
+
+int
+gl_isinfd (double x)
+{
+ return !_finite (x);
+}
+
+int
+gl_isinfl (long double x)
+{
+ return gl_isinfd (x);
+} \ No newline at end of file
diff --git a/glib/gnulib/isnan.c b/glib/gnulib/isnan.c
new file mode 100644
index 000000000..c3e81ac78
--- /dev/null
+++ b/glib/gnulib/isnan.c
@@ -0,0 +1,189 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* Specification. */
+#ifdef USE_LONG_DOUBLE
+/* Specification found in math.h or isnanl-nolibm.h. */
+extern int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
+#elif ! defined USE_FLOAT
+/* Specification found in math.h or isnand-nolibm.h. */
+extern int rpl_isnand (double x);
+#else /* defined USE_FLOAT */
+/* Specification found in math.h or isnanf-nolibm.h. */
+extern int rpl_isnanf (float x);
+#endif
+
+#include <float.h>
+#include <string.h>
+
+#include "float+.h"
+
+#ifdef USE_LONG_DOUBLE
+# define FUNC rpl_isnanl
+# define DOUBLE long double
+# define MAX_EXP LDBL_MAX_EXP
+# define MIN_EXP LDBL_MIN_EXP
+# if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
+# define KNOWN_EXPBIT0_LOCATION
+# define EXPBIT0_WORD LDBL_EXPBIT0_WORD
+# define EXPBIT0_BIT LDBL_EXPBIT0_BIT
+# endif
+# define SIZE SIZEOF_LDBL
+# define L_(literal) literal##L
+#elif ! defined USE_FLOAT
+# define FUNC rpl_isnand
+# define DOUBLE double
+# define MAX_EXP DBL_MAX_EXP
+# define MIN_EXP DBL_MIN_EXP
+# if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+# define KNOWN_EXPBIT0_LOCATION
+# define EXPBIT0_WORD DBL_EXPBIT0_WORD
+# define EXPBIT0_BIT DBL_EXPBIT0_BIT
+# endif
+# define SIZE SIZEOF_DBL
+# define L_(literal) literal
+#else /* defined USE_FLOAT */
+# define FUNC rpl_isnanf
+# define DOUBLE float
+# define MAX_EXP FLT_MAX_EXP
+# define MIN_EXP FLT_MIN_EXP
+# if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+# define KNOWN_EXPBIT0_LOCATION
+# define EXPBIT0_WORD FLT_EXPBIT0_WORD
+# define EXPBIT0_BIT FLT_EXPBIT0_BIT
+# endif
+# define SIZE SIZEOF_FLT
+# define L_(literal) literal##f
+#endif
+
+#define EXP_MASK ((MAX_EXP - MIN_EXP) | 7)
+
+#define NWORDS \
+ ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double;
+
+/* Most hosts nowadays use IEEE floating point, so they use IEC 60559
+ representations, have infinities and NaNs, and do not trap on
+ exceptions. Define IEEE_FLOATING_POINT if this host is one of the
+ typical ones. The C11 macro __STDC_IEC_559__ is close to what is
+ wanted here, but is not quite right because this file does not require
+ all the features of C11 Annex F (and does not require C11 at all,
+ for that matter). */
+
+#define IEEE_FLOATING_POINT (FLT_RADIX == 2 && FLT_MANT_DIG == 24 \
+ && FLT_MIN_EXP == -125 && FLT_MAX_EXP == 128)
+
+int
+FUNC (DOUBLE x)
+{
+#if defined KNOWN_EXPBIT0_LOCATION && IEEE_FLOATING_POINT
+# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+ /* Special CPU dependent code is needed to treat bit patterns outside the
+ IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals) as NaNs.
+ These bit patterns are:
+ - exponent = 0x0001..0x7FFF, mantissa bit 63 = 0,
+ - exponent = 0x0000, mantissa bit 63 = 1.
+ The NaN bit pattern is:
+ - exponent = 0x7FFF, mantissa >= 0x8000000000000001. */
+ memory_double m;
+ unsigned int exponent;
+
+ m.value = x;
+ exponent = (m.word[EXPBIT0_WORD] >> EXPBIT0_BIT) & EXP_MASK;
+# ifdef WORDS_BIGENDIAN
+ /* Big endian: EXPBIT0_WORD = 0, EXPBIT0_BIT = 16. */
+ if (exponent == 0)
+ return 1 & (m.word[0] >> 15);
+ else if (exponent == EXP_MASK)
+ return (((m.word[0] ^ 0x8000U) << 16) | m.word[1] | (m.word[2] >> 16)) != 0;
+ else
+ return 1 & ~(m.word[0] >> 15);
+# else
+ /* Little endian: EXPBIT0_WORD = 2, EXPBIT0_BIT = 0. */
+ if (exponent == 0)
+ return (m.word[1] >> 31);
+ else if (exponent == EXP_MASK)
+ return ((m.word[1] ^ 0x80000000U) | m.word[0]) != 0;
+ else
+ return (m.word[1] >> 31) ^ 1;
+# endif
+# else
+ /* Be careful to not do any floating-point operation on x, such as x == x,
+ because x may be a signaling NaN. */
+# if defined __SUNPRO_C || defined __ICC || defined _MSC_VER \
+ || defined __DECC || defined __TINYC__ \
+ || (defined __sgi && !defined __GNUC__)
+ /* The Sun C 5.0, Intel ICC 10.0, Microsoft Visual C/C++ 9.0, Compaq (ex-DEC)
+ 6.4, and TinyCC compilers don't recognize the initializers as constant
+ expressions. The Compaq compiler also fails when constant-folding
+ 0.0 / 0.0 even when constant-folding is not required. The Microsoft
+ Visual C/C++ compiler also fails when constant-folding 1.0 / 0.0 even
+ when constant-folding is not required. The SGI MIPSpro C compiler
+ complains about "floating-point operation result is out of range". */
+ static DOUBLE zero = L_(0.0);
+ memory_double nan;
+ DOUBLE plus_inf = L_(1.0) / zero;
+ DOUBLE minus_inf = -L_(1.0) / zero;
+ nan.value = zero / zero;
+# else
+ static memory_double nan = { L_(0.0) / L_(0.0) };
+ static DOUBLE plus_inf = L_(1.0) / L_(0.0);
+ static DOUBLE minus_inf = -L_(1.0) / L_(0.0);
+# endif
+ {
+ memory_double m;
+
+ /* A NaN can be recognized through its exponent. But exclude +Infinity and
+ -Infinity, which have the same exponent. */
+ m.value = x;
+ if (((m.word[EXPBIT0_WORD] ^ nan.word[EXPBIT0_WORD])
+ & (EXP_MASK << EXPBIT0_BIT))
+ == 0)
+ return (memcmp (&m.value, &plus_inf, SIZE) != 0
+ && memcmp (&m.value, &minus_inf, SIZE) != 0);
+ else
+ return 0;
+ }
+# endif
+#else
+ /* The configuration did not find sufficient information, or does
+ not use IEEE floating point. Give up about the signaling NaNs;
+ handle only the quiet NaNs. */
+ if (x == x)
+ {
+# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+ /* Detect any special bit patterns that pass ==; see comment above. */
+ memory_double m1;
+ memory_double m2;
+
+ memset (&m1.value, 0, SIZE);
+ memset (&m2.value, 0, SIZE);
+ m1.value = x;
+ m2.value = x + (x ? 0.0L : -0.0L);
+ if (memcmp (&m1.value, &m2.value, SIZE) != 0)
+ return 1;
+# endif
+ return 0;
+ }
+ else
+ return 1;
+#endif
+}
diff --git a/glib/gnulib/isnand-nolibm.h b/glib/gnulib/isnand-nolibm.h
new file mode 100644
index 000000000..279afdecd
--- /dev/null
+++ b/glib/gnulib/isnand-nolibm.h
@@ -0,0 +1,33 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNAND_IN_LIBC
+/* Get declaration of isnan macro. */
+# include <gnulib_math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnand
+# define isnand(x) __builtin_isnan ((double)(x))
+# else
+# undef isnand
+# define isnand(x) isnan ((double)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnand
+# define isnand rpl_isnand
+extern int isnand (double x);
+#endif
diff --git a/glib/gnulib/isnand.c b/glib/gnulib/isnand.c
new file mode 100644
index 000000000..552b9af68
--- /dev/null
+++ b/glib/gnulib/isnand.c
@@ -0,0 +1,22 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2008-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+#include "gnulib_math.h"
+#include "isnand-nolibm.h"
+#include "isnan.c"
diff --git a/glib/gnulib/isnanf-nolibm.h b/glib/gnulib/isnanf-nolibm.h
new file mode 100644
index 000000000..47c52f7f3
--- /dev/null
+++ b/glib/gnulib/isnanf-nolibm.h
@@ -0,0 +1,40 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General PublicLicense as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program 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 PublicLicense for more details.
+
+ You should have received a copy of the GNU Lesser General PublicLicense
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNANF_IN_LIBC
+/* Get declaration of isnan macro or (older) isnanf function. */
+# include <math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+# elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+# else
+ /* Get declaration of isnanf(), if not declared in <math.h>. */
+# if defined __sgi
+ /* We can't include <ieeefp.h>, because it conflicts with our definition of
+ isnand. Therefore declare isnanf separately. */
+extern int isnanf (float x);
+# endif
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnanf
+# define isnanf rpl_isnanf
+extern int isnanf (float x);
+#endif
diff --git a/glib/gnulib/isnanf.c b/glib/gnulib/isnanf.c
new file mode 100644
index 000000000..8651733a1
--- /dev/null
+++ b/glib/gnulib/isnanf.c
@@ -0,0 +1,20 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General PublicLicense as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program 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 PublicLicense for more details.
+
+ You should have received a copy of the GNU Lesser General PublicLicense
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#define USE_FLOAT
+#include "isnan.c"
diff --git a/glib/gnulib/isnanl-nolibm.h b/glib/gnulib/isnanl-nolibm.h
new file mode 100644
index 000000000..58527a98d
--- /dev/null
+++ b/glib/gnulib/isnanl-nolibm.h
@@ -0,0 +1,33 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNANL_IN_LIBC
+/* Get declaration of isnan macro or (older) isnanl function. */
+# include <gnulib_math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+# elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnanl
+# define isnanl rpl_isnanl
+extern int isnanl (long double x);
+#endif
diff --git a/glib/gnulib/isnanl.c b/glib/gnulib/isnanl.c
new file mode 100644
index 000000000..76c1ee5fd
--- /dev/null
+++ b/glib/gnulib/isnanl.c
@@ -0,0 +1,23 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#define USE_LONG_DOUBLE
+#include <config.h>
+#include "gnulib_math.h"
+#include "isnanl-nolibm.h"
+#include "isnan.c"
diff --git a/glib/gnulib/meson.build b/glib/gnulib/meson.build
index 345e11026..af697f29c 100644
--- a/glib/gnulib/meson.build
+++ b/glib/gnulib/meson.build
@@ -3,7 +3,341 @@
extra_gnulib_args = cc.get_supported_arguments([
'-Wno-format-nonliteral', '-Wno-duplicated-branches'])
-gnulib_lib = static_library('gnulib', 'asnprintf.c', 'printf.c', 'printf-args.c', 'printf-parse.c', 'vasnprintf.c',
- include_directories : [configinc, glibinc],
+math_h_config = configuration_data ()
+
+unneeded_funcs = [
+ 'ACOSF',
+ 'ACOSL',
+ 'ASINF',
+ 'ASINL',
+ 'ATAN2F',
+ 'ATANF',
+ 'ATANL',
+ 'CBRT',
+ 'CBRTF',
+ 'CBRTL',
+ 'CEIL',
+ 'CEILF',
+ 'CEILL',
+ 'COPYSIGN',
+ 'COPYSIGNF',
+ 'COPYSIGNL',
+ 'COSF',
+ 'COSHF',
+ 'COSL',
+ 'EXP2',
+ 'EXP2F',
+ 'EXP2L',
+ 'EXPF',
+ 'EXPL',
+ 'EXPM1',
+ 'EXPM1F',
+ 'EXPM1L',
+ 'FABSF',
+ 'FABSL',
+ 'FLOOR',
+ 'FLOORF',
+ 'FLOORL',
+ 'FMA',
+ 'FMAF',
+ 'FMAL',
+ 'FMOD',
+ 'FMODF',
+ 'FMODL',
+ 'FREXPF',
+ 'HYPOT',
+ 'HYPOTF',
+ 'HYPOTL',
+ 'ILOGB',
+ 'ILOGBF',
+ 'ILOGBL',
+ 'LDEXPF',
+ 'LOG',
+ 'LOG10',
+ 'LOG10F',
+ 'LOG10L',
+ 'LOG1P',
+ 'LOG1PF',
+ 'LOG1PL',
+ 'LOG2',
+ 'LOG2F',
+ 'LOG2L',
+ 'LOGB',
+ 'LOGBF',
+ 'LOGBL',
+ 'LOGF',
+ 'LOGL',
+ 'MODF',
+ 'MODFF',
+ 'MODFL',
+ 'POWF',
+ 'REMAINDER',
+ 'REMAINDERF',
+ 'REMAINDERL',
+ 'RINT',
+ 'RINTF',
+ 'RINTL',
+ 'ROUND',
+ 'ROUNDF',
+ 'ROUNDL',
+ 'SINF',
+ 'SINHF',
+ 'SINL',
+ 'SQRTF',
+ 'SQRTL',
+ 'TANF',
+ 'TANHF',
+ 'TANL',
+ 'TRUNC',
+ 'TRUNCF',
+ 'TRUNCL',
+]
+
+foreach f : unneeded_funcs
+ math_h_config.set ('GNULIB_' + f, 0)
+ # These are not used in practice, guarded by
+ # the appropriate GNULIB_*, but meson config
+ # processor doesn't know that
+ math_h_config.set ('HAVE_' + f, 'variable not used')
+ math_h_config.set ('REPLACE_' + f, 'variable not used')
+endforeach
+
+needed_funcs = [
+ 'FREXP',
+ 'FREXPL',
+ 'ISFINITE',
+ 'ISINF',
+ 'ISNAN',
+ 'ISNAND',
+ 'ISNANF',
+ 'ISNANL',
+ 'LDEXPL',
+ 'SIGNBIT',
+]
+
+foreach f : needed_funcs
+ math_h_config.set ('GNULIB_' + f, 1)
+endforeach
+
+math_h_config.set ('GUARD_PREFIX', 'GL')
+
+decls_for_unused_funcs = [
+ 'ACOSL',
+ 'ASINL',
+ 'ATANL',
+ 'CBRTF',
+ 'CBRTL',
+ 'CEILF',
+ 'CEILL',
+ 'COPYSIGNF',
+ 'COSL',
+ 'EXP2',
+ 'EXP2F',
+ 'EXP2L',
+ 'EXPL',
+ 'EXPM1L',
+ 'FLOORF',
+ 'FLOORL',
+ 'LOG10L',
+ 'LOG2',
+ 'LOG2F',
+ 'LOG2L',
+ 'LOGB',
+ 'LOGL',
+ 'REMAINDER',
+ 'REMAINDERL',
+ 'RINTF',
+ 'ROUND',
+ 'ROUNDF',
+ 'ROUNDL',
+ 'SINL',
+ 'SQRTL',
+ 'TANL',
+ 'TRUNC',
+ 'TRUNCF',
+ 'TRUNCL',
+]
+
+foreach f : decls_for_unused_funcs
+ math_h_config.set ('HAVE_DECL_' + f, 0)
+endforeach
+
+decls_for_used_funcs = [
+ 'frexpl',
+ 'ldexpl',
+]
+
+foreach f : decls_for_used_funcs
+ compiles = cc.compiles('''#include <math.h>
+ int main ()
+ {
+ (void) @0@;
+ return 0;
+ }
+ '''.format (f))
+ math_h_config.set ('HAVE_DECL_' + f.to_upper (), compiles ? 1 : 0)
+ set_variable ('have_decl_' + f, compiles ? true : false)
+endforeach
+
+nan_tmpl = '''#include <math.h>
+ #if __GNUC__ >= 4
+ # undef @0@
+ # define @0@(x) __builtin_isnan ((@1@)(x))
+ #else
+ # undef @0@
+ # define @0@(x) isnan ((@1@)(x))
+ #endif
+ double x;
+ int main () {return @0@ (x);}
+ '''
+
+links = cc.links (nan_tmpl.format ('isnand', 'double'),
+ dependencies : [libm])
+math_h_config.set ('HAVE_ISNAND', links ? 1 : 0)
+math_h_config.set ('HAVE_ISNAND_IN_LIBC', links ? 1 : 0)
+set_variable ('have_isnand', links)
+
+links = cc.links (nan_tmpl.format ('isnanl', 'long double'),
+ dependencies : [libm])
+math_h_config.set ('HAVE_ISNANL', links ? 1 : 0)
+math_h_config.set ('HAVE_ISNANL_IN_LIBC', links ? 1 : 0)
+set_variable ('have_isnanl', links)
+
+links = cc.links ('''#include <math.h>
+ double x;
+ int y;
+ int main () {return ldexp (x, y) < 1;}
+ ''',
+ dependencies : [libm])
+math_h_config.set ('HAVE_LDEXP', links ? 1 : 0)
+math_h_config.set ('HAVE_LDEXP_IN_LIBC', links ? 1 : 0)
+set_variable ('have_ldexp', links)
+
+links = cc.links ('''#include <math.h>
+ long double x;
+ int main () {return ldexpl (x, -1) > 0;}
+ ''',
+ dependencies : [libm])
+math_h_config.set ('HAVE_LDEXPL', links ? 1 : 0)
+math_h_config.set ('HAVE_LDEXPL_IN_LIBC', links ? 1 : 0)
+set_variable ('have_ldexpl', links)
+
+links = cc.links ('''#include <math.h>
+ double x;
+ int main () {int e; return frexp (x, &e) > 0;}
+ ''',
+ dependencies : [libm])
+math_h_config.set ('HAVE_FREXP', links ? 1 : 0)
+math_h_config.set ('HAVE_FREXP_IN_LIBC', links ? 1 : 0)
+set_variable ('have_frexp', links)
+
+links = cc.links ('''#include <math.h>
+ long double x;
+ int main () {int e; return frexpl (x, &e) > 0;}
+ ''',
+ dependencies : [libm])
+math_h_config.set ('HAVE_FREXPL', links ? 1 : 0)
+math_h_config.set ('HAVE_FREXPL_IN_LIBC', links ? 1 : 0)
+set_variable ('have_frexpl', links)
+
+math_h_config.set ('INCLUDE_NEXT_AS_FIRST_DIRECTIVE', 'include')
+math_h_config.set ('NEXT_AS_FIRST_DIRECTIVE_MATH_H', '<math.h>')
+math_h_config.set ('PRAGMA_COLUMNS', '')
+math_h_config.set ('PRAGMA_SYSTEM_HEADER', '')
+
+compiles = cc.compiles ('''
+#include <math.h>
+/* Solaris 10 has a broken definition of NAN. Other platforms
+ fail to provide NAN, or provide it only in C99 mode; this
+ test only needs to fail when NAN is provided but wrong. */
+int main () {
+ float f = 1.0f;
+#ifdef NAN
+ f = NAN;
+#endif
+ return f == 0;
+}
+''')
+math_h_config.set ('REPLACE_NAN', compiles ? 0 : 1)
+
+if have_frexp
+ subdir ('gl_cv_func_frexp_works')
+else
+ gl_cv_func_frexp_works = false
+ gl_cv_func_frexp_broken_beyond_repair = true
+endif
+if have_frexpl
+ subdir ('gl_cv_func_frexpl_works')
+else
+ gl_cv_func_frexpl_works = false
+ gl_cv_func_frexpl_broken_beyond_repair = true
+endif
+
+if not gl_cv_func_frexp_works and gl_cv_func_frexp_broken_beyond_repair
+ error ('frexp() is missing or broken beyond repair, and we have nothing to replace it with')
+endif
+if not gl_cv_func_frexpl_works and gl_cv_func_frexpl_broken_beyond_repair
+ error ('frexpl() is missing or broken beyond repair, and we have nothing to replace it with')
+endif
+
+math_h_config.set ('REPLACE_FREXP', gl_cv_func_frexp_works ? 0 : 1)
+math_h_config.set ('REPLACE_FREXPL', gl_cv_func_frexpl_works ? 0 : 1)
+math_h_config.set ('HAVE_DECL_FREXPL', gl_cv_func_frexpl_decl ? 0 : 1)
+
+math_h_config.set ('REPLACE_ITOLD', 0)
+math_h_config.set ('REPLACE_HUGE_VAL', 0)
+math_h_config.set ('REPLACE_SIGNBIT_USING_GCC', 0)
+
+if have_ldexpl
+ subdir ('gl_cv_func_ldexpl_works')
+else
+ gl_cv_func_ldexpl_works = false
+endif
+math_h_config.set ('REPLACE_LDEXPL', gl_cv_func_ldexpl_works ? 0 : 1)
+math_h_config.set ('HAVE_DECL_LDEXPL', gl_cv_func_ldexpl_decl ? 0 : 1)
+
+inf_tmpl = '''#include <math.h>
+ double x;
+ int main () {return @0@ (x);}
+ '''
+
+other_needed_math_sources = []
+# Some compilers may not have isfinite, isinf available
+foreach f: ['isfinite', 'isinf', 'isnan', 'isnanf', 'signbit']
+ links = cc.links (inf_tmpl.format('@0@'.format(f)),
+ dependencies : [libm])
+ math_h_config.set ('HAVE_@0@'.format(f.to_upper()), links ? 1 : 0)
+ math_h_config.set ('HAVE_@0@_IN_LIBC'.format(f.to_upper()), links ? 1 : 0)
+ math_h_config.set ('REPLACE_@0@'.format(f.to_upper()), links ? 0 : 1)
+ set_variable ('have_@0@'.format(f), links)
+ if not links
+ if f == 'signbit'
+ other_needed_math_sources += [ 'signbitd.c', 'signbitf.c', 'signbitl.c' ]
+ elif f != 'isfinite' and f != 'isnan'
+ other_needed_math_sources += [ '@0@.c'.format(f) ]
+ endif
+ endif
+endforeach
+
+math_h = configure_file (input: 'gnulib_math.h.in',
+ output: 'gnulib_math.h',
+ configuration: math_h_config)
+
+gnulib_sources = ['asnprintf.c', 'printf.c', 'printf-args.c', 'printf-parse.c', 'printf-frexp.c', 'printf-frexpl.c', 'isnand.c', 'isnanl.c', 'vasnprintf.c']
+
+if not gl_cv_func_frexp_works
+ gnulib_sources += ['frexp.c']
+endif
+if not gl_cv_func_frexpl_works
+ gnulib_sources += ['frexpl.c']
+endif
+
+gnulib_sources += other_needed_math_sources
+
+gnulib_lib = static_library('gnulib', gnulib_sources,
+ dependencies : [libm],
+ include_directories : [configinc, glibinc, include_directories ('.')],
pic : true,
- c_args : [ '-DLIBDIR="@0@"'.format(get_option('libdir')), '-DGLIB_COMPILATION', '-DG_LOG_DOMAIN="GLib"' ] + glib_hidden_visibility_args + extra_gnulib_args)
+ c_args : ['-DGCC_LINT=1', '-DLIBDIR="@0@"'.format(get_option('libdir')), '-DGLIB_COMPILATION', '-DG_LOG_DOMAIN="GLib"' ] + glib_hidden_visibility_args + extra_gnulib_args)
+
+gnulib_libm_dependency = [libm]
diff --git a/glib/gnulib/printf-args.c b/glib/gnulib/printf-args.c
index 3f43258ec..90a85be21 100644
--- a/glib/gnulib/printf-args.c
+++ b/glib/gnulib/printf-args.c
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2016 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
/* This file can be parametrized with the following macros:
ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
diff --git a/glib/gnulib/printf-args.h b/glib/gnulib/printf-args.h
index d3770367c..6ac650788 100644
--- a/glib/gnulib/printf-args.h
+++ b/glib/gnulib/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2016 Free Software
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _PRINTF_ARGS_H
#define _PRINTF_ARGS_H
diff --git a/glib/gnulib/printf-frexp.c b/glib/gnulib/printf-frexp.c
new file mode 100644
index 000000000..0d3eb6ec7
--- /dev/null
+++ b/glib/gnulib/printf-frexp.c
@@ -0,0 +1,190 @@
+/* Split a double into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+#if ! defined USE_LONG_DOUBLE
+# include <config.h>
+#endif
+
+/* Specification. */
+#ifdef USE_LONG_DOUBLE
+# include "printf-frexpl.h"
+#else
+# include "printf-frexp.h"
+#endif
+
+#include <float.h>
+#include <gnulib_math.h>
+#ifdef USE_LONG_DOUBLE
+# include "fpucw.h"
+#endif
+
+/* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater
+ than 2, or not even a power of 2, some rounding errors can occur, so that
+ then the returned mantissa is only guaranteed to be <= 2.0, not < 2.0. */
+
+#ifdef USE_LONG_DOUBLE
+# define FUNC printf_frexpl
+# define DOUBLE long double
+# define MIN_EXP LDBL_MIN_EXP
+# if HAVE_FREXPL_IN_LIBC && HAVE_LDEXPL_IN_LIBC
+# define USE_FREXP_LDEXP
+# define FREXP frexpl
+# define LDEXP ldexpl
+# endif
+# define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING
+# define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING ()
+# define END_ROUNDING() END_LONG_DOUBLE_ROUNDING ()
+# define L_(literal) literal##L
+#else
+# define FUNC printf_frexp
+# define DOUBLE double
+# define MIN_EXP DBL_MIN_EXP
+# if HAVE_FREXP_IN_LIBC && HAVE_LDEXP_IN_LIBC
+# define USE_FREXP_LDEXP
+# define FREXP frexp
+# define LDEXP ldexp
+# endif
+# define DECL_ROUNDING
+# define BEGIN_ROUNDING()
+# define END_ROUNDING()
+# define L_(literal) literal
+#endif
+
+DOUBLE
+FUNC (DOUBLE x, int *expptr)
+{
+ int exponent;
+ DECL_ROUNDING
+
+ BEGIN_ROUNDING ();
+
+#ifdef USE_FREXP_LDEXP
+ /* frexp and ldexp are usually faster than the loop below. */
+ x = FREXP (x, &exponent);
+
+ x = x + x;
+ exponent -= 1;
+
+ if (exponent < MIN_EXP - 1)
+ {
+ x = LDEXP (x, exponent - (MIN_EXP - 1));
+ exponent = MIN_EXP - 1;
+ }
+#else
+ {
+ /* Since the exponent is an 'int', it fits in 64 bits. Therefore the
+ loops are executed no more than 64 times. */
+ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */
+ DOUBLE powh[64]; /* powh[i] = 2^-2^i */
+ int i;
+
+ exponent = 0;
+ if (x >= L_(1.0))
+ {
+ /* A nonnegative exponent. */
+ {
+ DOUBLE pow2_i; /* = pow2[i] */
+ DOUBLE powh_i; /* = powh[i] */
+
+ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i,
+ x * 2^exponent = argument, x >= 1.0. */
+ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5);
+ ;
+ i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i)
+ {
+ if (x >= pow2_i)
+ {
+ exponent += (1 << i);
+ x *= powh_i;
+ }
+ else
+ break;
+
+ pow2[i] = pow2_i;
+ powh[i] = powh_i;
+ }
+ }
+ /* Here 1.0 <= x < 2^2^i. */
+ }
+ else
+ {
+ /* A negative exponent. */
+ {
+ DOUBLE pow2_i; /* = pow2[i] */
+ DOUBLE powh_i; /* = powh[i] */
+
+ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i,
+ x * 2^exponent = argument, x < 1.0, exponent >= MIN_EXP - 1. */
+ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5);
+ ;
+ i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i)
+ {
+ if (exponent - (1 << i) < MIN_EXP - 1)
+ break;
+
+ exponent -= (1 << i);
+ x *= pow2_i;
+ if (x >= L_(1.0))
+ break;
+
+ pow2[i] = pow2_i;
+ powh[i] = powh_i;
+ }
+ }
+ /* Here either x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent,
+ or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */
+
+ if (x < L_(1.0))
+ /* Invariants: x * 2^exponent = argument, x < 1.0 and
+ exponent - 2^i < MIN_EXP - 1 <= exponent. */
+ while (i > 0)
+ {
+ i--;
+ if (exponent - (1 << i) >= MIN_EXP - 1)
+ {
+ exponent -= (1 << i);
+ x *= pow2[i];
+ if (x >= L_(1.0))
+ break;
+ }
+ }
+
+ /* Here either x < 1.0 and exponent = MIN_EXP - 1,
+ or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */
+ }
+
+ /* Invariants: x * 2^exponent = argument, and
+ either x < 1.0 and exponent = MIN_EXP - 1,
+ or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */
+ while (i > 0)
+ {
+ i--;
+ if (x >= pow2[i])
+ {
+ exponent += (1 << i);
+ x *= powh[i];
+ }
+ }
+ /* Here either x < 1.0 and exponent = MIN_EXP - 1,
+ or 1.0 <= x < 2.0 and exponent >= MIN_EXP - 1. */
+ }
+#endif
+
+ END_ROUNDING ();
+
+ *expptr = exponent;
+ return x;
+}
diff --git a/glib/gnulib/printf-frexp.h b/glib/gnulib/printf-frexp.h
new file mode 100644
index 000000000..8e20a4791
--- /dev/null
+++ b/glib/gnulib/printf-frexp.h
@@ -0,0 +1,23 @@
+/* Split a double into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Write a finite, positive number x as
+ x = mantissa * 2^exp
+ where exp >= DBL_MIN_EXP - 1,
+ mantissa < 2.0,
+ if x is not a denormalized number then mantissa >= 1.0.
+ Store exp in *EXPPTR and return mantissa. */
+extern double printf_frexp (double x, int *expptr);
diff --git a/glib/gnulib/printf-frexpl.c b/glib/gnulib/printf-frexpl.c
new file mode 100644
index 000000000..81cbc2c44
--- /dev/null
+++ b/glib/gnulib/printf-frexpl.c
@@ -0,0 +1,37 @@
+/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#if HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
+
+/* Specification. */
+# include "printf-frexpl.h"
+
+# include "printf-frexp.h"
+
+long double
+printf_frexpl (long double x, int *expptr)
+{
+ return printf_frexp (x, expptr);
+}
+
+#else
+
+# define USE_LONG_DOUBLE
+# include "printf-frexp.c"
+
+#endif
diff --git a/glib/gnulib/printf-frexpl.h b/glib/gnulib/printf-frexpl.h
new file mode 100644
index 000000000..b2e034884
--- /dev/null
+++ b/glib/gnulib/printf-frexpl.h
@@ -0,0 +1,23 @@
+/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Write a finite, positive number x as
+ x = mantissa * 2^exp
+ where exp >= LDBL_MIN_EXP - 1,
+ mantissa < 2.0,
+ if x is not a denormalized number then mantissa >= 1.0.
+ Store exp in *EXPPTR and return mantissa. */
+extern long double printf_frexpl (long double x, int *expptr);
diff --git a/glib/gnulib/printf-parse.c b/glib/gnulib/printf-parse.c
index 64bb8be2d..1682b83f6 100644
--- a/glib/gnulib/printf-parse.c
+++ b/glib/gnulib/printf-parse.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -12,7 +12,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
/* This file can be parametrized with the following macros:
CHAR_T The element type of the format string.
@@ -27,7 +27,9 @@
STATIC Set to 'static' to declare the function static.
ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */
-#include <config.h>
+#ifndef PRINTF_PARSE
+# include <config.h>
+#endif
#include "g-gnulib.h"
@@ -36,8 +38,6 @@
# include "printf-parse.h"
#endif
-#include "xsize.h"
-
/* Default parameters. */
#ifndef PRINTF_PARSE
# define PRINTF_PARSE printf_parse
@@ -58,11 +58,7 @@
# include <inttypes.h>
# endif
#else
-# if !defined (_MSC_VER) || (_MSC_VER >= 1600)
-# include <stdint.h>
-# else
-typedef signed __int64 intmax_t;
-# endif
+# include <stdint.h>
#endif
/* malloc(), realloc(), free(). */
@@ -74,6 +70,9 @@ typedef signed __int64 intmax_t;
/* errno. */
#include <errno.h>
+/* Checked size_t computations. */
+#include "xsize.h"
+
#if CHAR_T_ONLY_ASCII
/* c_isascii(). */
# include "c-ctype.h"
@@ -422,7 +421,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
cp++;
}
#endif
-#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+#if defined _WIN32 && ! defined __CYGWIN__
/* On native Windows, PRIdMAX is defined as "I64d".
We cannot change it to "lld" because PRIdMAX must also
be understood by the system's printf routines. */
diff --git a/glib/gnulib/printf-parse.h b/glib/gnulib/printf-parse.h
index 887cde4eb..a53579710 100644
--- a/glib/gnulib/printf-parse.h
+++ b/glib/gnulib/printf-parse.h
@@ -1,5 +1,5 @@
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2016 Free Software
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2019 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _PRINTF_PARSE_H
#define _PRINTF_PARSE_H
diff --git a/glib/gnulib/signbitd.c b/glib/gnulib/signbitd.c
new file mode 100644
index 000000000..dfc1c9092
--- /dev/null
+++ b/glib/gnulib/signbitd.c
@@ -0,0 +1,64 @@
+/* signbit() macro: Determine the sign bit of a floating-point number.
+ Copyright (C) 2007-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General PublicLicense as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program 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 PublicLicense for more details.
+
+ You should have received a copy of the GNU Lesser General PublicLicense
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <gnulib_math.h>
+
+#include <string.h>
+#include "isnand-nolibm.h"
+#include "float+.h"
+
+#ifdef gl_signbitd_OPTIMIZED_MACRO
+# undef gl_signbitd
+#endif
+
+int
+gl_signbitd (double arg)
+{
+#if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT
+ /* The use of a union to extract the bits of the representation of a
+ 'long double' is safe in practice, despite of the "aliasing rules" of
+ C99, because the GCC docs say
+ "Even with '-fstrict-aliasing', type-punning is allowed, provided the
+ memory is accessed through the union type."
+ and similarly for other compilers. */
+# define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { double value; unsigned int word[NWORDS]; } m;
+ m.value = arg;
+ return (m.word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1;
+#elif HAVE_COPYSIGN_IN_LIBC
+ return copysign (1.0, arg) < 0;
+#else
+ /* This does not do the right thing for NaN, but this is irrelevant for
+ most use cases. */
+ if (isnand (arg))
+ return 0;
+ if (arg < 0.0)
+ return 1;
+ else if (arg == 0.0)
+ {
+ /* Distinguish 0.0 and -0.0. */
+ static double plus_zero = 0.0;
+ double arg_mem = arg;
+ return (memcmp (&plus_zero, &arg_mem, SIZEOF_DBL) != 0);
+ }
+ else
+ return 0;
+#endif
+}
diff --git a/glib/gnulib/signbitf.c b/glib/gnulib/signbitf.c
new file mode 100644
index 000000000..573d6d975
--- /dev/null
+++ b/glib/gnulib/signbitf.c
@@ -0,0 +1,64 @@
+/* signbit() macro: Determine the sign bit of a floating-point number.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General PublicLicense as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program 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 PublicLicense for more details.
+
+ You should have received a copy of the GNU Lesser General PublicLicense
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <gnulib_math.h>
+
+#include <string.h>
+#include "isnanf-nolibm.h"
+#include "float+.h"
+
+#ifdef gl_signbitf_OPTIMIZED_MACRO
+# undef gl_signbitf
+#endif
+
+int
+gl_signbitf (float arg)
+{
+#if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT
+ /* The use of a union to extract the bits of the representation of a
+ 'long double' is safe in practice, despite of the "aliasing rules" of
+ C99, because the GCC docs say
+ "Even with '-fstrict-aliasing', type-punning is allowed, provided the
+ memory is accessed through the union type."
+ and similarly for other compilers. */
+# define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { float value; unsigned int word[NWORDS]; } m;
+ m.value = arg;
+ return (m.word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1;
+#elif HAVE_COPYSIGNF_IN_LIBC
+ return copysignf (1.0f, arg) < 0;
+#else
+ /* This does not do the right thing for NaN, but this is irrelevant for
+ most use cases. */
+ if (isnanf (arg))
+ return 0;
+ if (arg < 0.0f)
+ return 1;
+ else if (arg == 0.0f)
+ {
+ /* Distinguish 0.0f and -0.0f. */
+ static float plus_zero = 0.0f;
+ float arg_mem = arg;
+ return (memcmp (&plus_zero, &arg_mem, SIZEOF_FLT) != 0);
+ }
+ else
+ return 0;
+#endif
+}
diff --git a/glib/gnulib/signbitl.c b/glib/gnulib/signbitl.c
new file mode 100644
index 000000000..11b3e66c9
--- /dev/null
+++ b/glib/gnulib/signbitl.c
@@ -0,0 +1,64 @@
+/* signbit() macro: Determine the sign bit of a floating-point number.
+ Copyright (C) 2007, 2009-2019 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General PublicLicense as published by
+ the Free Software Foundation; either version 2.1 of the License, or
+ (at your option) any later version.
+
+ This program 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 PublicLicense for more details.
+
+ You should have received a copy of the GNU Lesser General PublicLicense
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <gnulib_math.h>
+
+#include <string.h>
+#include "isnanl-nolibm.h"
+#include "float+.h"
+
+#ifdef gl_signbitl_OPTIMIZED_MACRO
+# undef gl_signbitl
+#endif
+
+int
+gl_signbitl (long double arg)
+{
+#if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT
+ /* The use of a union to extract the bits of the representation of a
+ 'long double' is safe in practice, despite of the "aliasing rules" of
+ C99, because the GCC docs say
+ "Even with '-fstrict-aliasing', type-punning is allowed, provided the
+ memory is accessed through the union type."
+ and similarly for other compilers. */
+# define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { long double value; unsigned int word[NWORDS]; } m;
+ m.value = arg;
+ return (m.word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1;
+#elif HAVE_COPYSIGNL_IN_LIBC
+ return copysignl (1.0L, arg) < 0;
+#else
+ /* This does not do the right thing for NaN, but this is irrelevant for
+ most use cases. */
+ if (isnanl (arg))
+ return 0;
+ if (arg < 0.0L)
+ return 1;
+ else if (arg == 0.0L)
+ {
+ /* Distinguish 0.0L and -0.0L. */
+ static long double plus_zero = 0.0L;
+ long double arg_mem = arg;
+ return (memcmp (&plus_zero, &arg_mem, SIZEOF_LDBL) != 0);
+ }
+ else
+ return 0;
+#endif
+}
diff --git a/glib/gnulib/vasnprintf.c b/glib/gnulib/vasnprintf.c
index 05d6c2b91..a5b68db8c 100644
--- a/glib/gnulib/vasnprintf.c
+++ b/glib/gnulib/vasnprintf.c
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2016 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -12,7 +12,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
/* This file can be parametrized with the following macros:
VASNPRINTF The name of the function being defined.
@@ -55,14 +55,18 @@
#ifndef VASNPRINTF
# include <config.h>
#endif
-/* galloca.h also defines alloca and HAVE_ALLOCA makes the code below use it */
#include "glib/galloca.h"
-#define HAVE_ALLOCA 1
#include "g-gnulib.h"
/* Specification. */
-#include "vasnprintf.h"
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# include "vasnwprintf.h"
+# else
+# include "vasnprintf.h"
+# endif
+#endif
#include <locale.h> /* localeconv() */
#include <stdio.h> /* snprintf(), sprintf() */
@@ -71,41 +75,59 @@
#include <errno.h> /* errno */
#include <limits.h> /* CHAR_BIT */
#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
+#if HAVE_NL_LANGINFO
+# include <langinfo.h>
+#endif
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# include "wprintf-parse.h"
+# else
# include "printf-parse.h"
+# endif
+#endif
+/* Checked size_t computations. */
#include "xsize.h"
#include "verify.h"
#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
-# include <math.h>
+# include <gnulib_math.h>
# include "float+.h"
#endif
#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
-# include <math.h>
+# include <gnulib_math.h>
# include "isnand-nolibm.h"
#endif
#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
-# include <math.h>
+# include <gnulib_math.h>
# include "isnanl-nolibm.h"
# include "fpucw.h"
#endif
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
-# include <math.h>
+# include <gnulib_math.h>
# include "isnand-nolibm.h"
# include "printf-frexp.h"
#endif
#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
-# include <math.h>
+# include <gnulib_math.h>
# include "isnanl-nolibm.h"
# include "printf-frexpl.h"
# include "fpucw.h"
#endif
+#ifndef FALLTHROUGH
+# if __GNUC__ < 7
+# define FALLTHROUGH ((void) 0)
+# else
+# define FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+#endif
+
/* Default parameters. */
#ifndef VASNPRINTF
# if WIDE_CHAR_VERSION
@@ -144,6 +166,7 @@
# define SNPRINTF snwprintf
# else
# define SNPRINTF _snwprintf
+# define USE_MSVC__SNPRINTF 1
# endif
# else
/* Unix. */
@@ -169,7 +192,9 @@
/* Here we need to call the native snprintf, not rpl_snprintf. */
# undef snprintf
# else
+ /* MSVC versions < 14 did not have snprintf, only _snprintf. */
# define SNPRINTF _snprintf
+# define USE_MSVC__SNPRINTF 1
# endif
# else
/* Unix. */
@@ -183,7 +208,7 @@
/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
warnings in this file. Use -Dlint to suppress them. */
-#ifdef lint
+#if defined GCC_LINT || defined lint
# define IF_LINT(Code) Code
#else
# define IF_LINT(Code) /* empty */
@@ -196,7 +221,7 @@
#undef remainder
#define remainder rem
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && !WIDE_CHAR_VERSION
# if (HAVE_STRNLEN && !defined _AIX)
# define local_strnlen strnlen
# else
@@ -212,7 +237,7 @@ local_strnlen (const char *string, size_t maxlen)
# endif
#endif
-#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
+#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T
# if HAVE_WCSLEN
# define local_wcslen wcslen
# else
@@ -235,7 +260,7 @@ local_wcslen (const wchar_t *s)
# endif
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF) && HAVE_WCHAR_T && WIDE_CHAR_VERSION
# if HAVE_WCSNLEN
# define local_wcsnlen wcsnlen
# else
@@ -837,7 +862,9 @@ convert_to_decimal (mpn_t a, size_t extra_zeroes)
size_t a_len = a.nlimbs;
/* 0.03345 is slightly larger than log(2)/(9*log(10)). */
size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
- char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
+ /* We need extra_zeroes bytes for zeroes, followed by c_len bytes for the
+ digits of a, followed by 1 byte for the terminating NUL. */
+ char *c_ptr = (char *) malloc (xsum (xsum (extra_zeroes, c_len), 1));
if (c_ptr != NULL)
{
char *d_ptr = c_ptr;
@@ -1505,7 +1532,7 @@ is_borderline (const char *digits, size_t precision)
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* Use a different function name, to make it possible that the 'wchar_t'
parametrization and the 'char' parametrization get compiled in the same
@@ -2380,7 +2407,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
}
#endif
-#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
+#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
else if (dp->conversion == 's'
# if WIDE_CHAR_VERSION
&& a.arg[dp->arg_index].type != TYPE_WIDE_STRING
@@ -2671,7 +2698,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
errno = EILSEQ;
return NULL;
}
- if (precision < count)
+ if (precision < (unsigned int) count)
break;
arg_end++;
characters += count;
@@ -4220,7 +4247,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
static const wchar_t decimal_format[] =
/* Produce the same number of exponent digits
as the native printf implementation. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
{ '%', '+', '.', '3', 'd', '\0' };
# else
{ '%', '+', '.', '2', 'd', '\0' };
@@ -4234,7 +4261,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
static const char decimal_format[] =
/* Produce the same number of exponent digits
as the native printf implementation. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
"%+.3d";
# else
"%+.2d";
@@ -4413,7 +4440,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
static const wchar_t decimal_format[] =
/* Produce the same number of exponent digits
as the native printf implementation. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
{ '%', '+', '.', '3', 'd', '\0' };
# else
{ '%', '+', '.', '2', 'd', '\0' };
@@ -4427,7 +4454,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
static const char decimal_format[] =
/* Produce the same number of exponent digits
as the native printf implementation. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
"%+.3d";
# else
"%+.2d";
@@ -4485,7 +4512,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
*p++ = '+';
/* Produce the same number of exponent digits as
the native printf implementation. */
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
*p++ = '0';
# endif
*p++ = '0';
@@ -4579,10 +4606,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
size_t width;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
int has_precision;
size_t precision;
#endif
@@ -4611,7 +4638,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 0;
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
width = 0;
if (dp->width_start != dp->width_end)
{
@@ -4645,7 +4672,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
#endif
-#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
has_precision = 0;
precision = 6;
if (dp->precision_start != dp->precision_end)
@@ -4813,16 +4840,16 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#if HAVE_LONG_LONG
case TYPE_LONGLONGINT:
case TYPE_ULONGLONGINT:
-# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# if (defined _WIN32 && FALSE) && ! defined __CYGWIN__
*fbp++ = 'I';
*fbp++ = '6';
*fbp++ = '4';
break;
# else
*fbp++ = 'l';
- /*FALLTHROUGH*/
# endif
#endif
+ FALLTHROUGH;
case TYPE_LONGINT:
case TYPE_ULONGINT:
#if HAVE_WINT_T
@@ -4846,7 +4873,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
+ && !defined __UCLIBC__) \
+ || (defined __APPLE__ && defined __MACH__) \
+ || defined __ANDROID__ \
+ || (defined _WIN32 && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';
@@ -4860,6 +4891,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
in format strings in writable memory may crash the program
(if compiled with _FORTIFY_SOURCE=2), so we should avoid it
in this situation. */
+ /* On Mac OS X 10.3 or newer, we know that snprintf's return
+ value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99
+ and gl_SNPRINTF_TRUNCATION_C99 pass.
+ Therefore we can avoid using %n in this situation.
+ On Mac OS X 10.13 or newer, the use of %n in format strings
+ in writable memory by default crashes the program, so we
+ should avoid it in this situation. */
+ /* On Android, we know that snprintf's return value conforms to
+ ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and
+ gl_SNPRINTF_TRUNCATION_C99 pass.
+ Therefore we can avoid using %n in this situation.
+ Starting on 2018-03-07, the use of %n in format strings
+ produces a fatal error (see
+ <https://android.googlesource.com/platform/bionic/+/41398d03b7e8e0dfb951660ae713e682e9fc0336>),
+ so we should avoid it. */
/* On native Windows systems (such as mingw), we can avoid using
%n because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
@@ -4872,8 +4918,8 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
On native Windows systems (such as mingw) where the OS is
Windows Vista, the use of %n in format strings by default
crashes the program. See
- <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
- <http://msdn2.microsoft.com/en-us/library/ms175782(VS.80).aspx>
+ <https://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
+ <https://msdn.microsoft.com/en-us/library/ms175782.aspx>
So we should avoid %n in this situation. */
fbp[1] = '\0';
# endif
@@ -5092,7 +5138,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
/* Verify that snprintf() has NUL-terminated its
result. */
- if (count < maxlen
+ if ((unsigned int) count < maxlen
&& ((TCHAR_T *) (result + length)) [count] != '\0')
abort ();
/* Portability hack. */
@@ -5115,7 +5161,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* Look at the snprintf() return value. */
if (retcount < 0)
{
-# if !HAVE_SNPRINTF_RETVAL_C99
+# if !HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF
/* HP-UX 10.20 snprintf() is doubly deficient:
It doesn't understand the '%n' directive,
*and* it returns -1 (rather than the length
diff --git a/glib/gnulib/vasnprintf.h b/glib/gnulib/vasnprintf.h
index d2bcfb59f..ac6262839 100644
--- a/glib/gnulib/vasnprintf.h
+++ b/glib/gnulib/vasnprintf.h
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2016 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -12,7 +12,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along
- with this program; if not, see <http://www.gnu.org/licenses/>. */
+ with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _VASNPRINTF_H
#define _VASNPRINTF_H
diff --git a/glib/gnulib/verify.h b/glib/gnulib/verify.h
index f5933b859..ecd8cdb09 100644
--- a/glib/gnulib/verify.h
+++ b/glib/gnulib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>. */
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
@@ -26,7 +26,7 @@
here generates easier-to-read diagnostics when verify (R) fails.
Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11.
- This will likely be supported by future GCC versions, in C++ mode.
+ This is supported by GCC 6.1.0 and later, in C++ mode.
Use this only with GCC. If we were willing to slow 'configure'
down we could also use it with other compilers, but since this
@@ -36,9 +36,7 @@
&& !defined __cplusplus)
# define _GL_HAVE__STATIC_ASSERT 1
#endif
-/* The condition (99 < __GNUC__) is temporary, until we know about the
- first G++ release that supports static_assert. */
-#if (99 < __GNUC__) && defined __cplusplus
+#if (6 <= __GNUC__) && defined __cplusplus
# define _GL_HAVE_STATIC_ASSERT 1
#endif
@@ -248,32 +246,36 @@ template <int w>
/* Verify requirement R at compile-time, as a declaration without a
trailing ';'. */
-#define verify(R) _GL_VERIFY (R, "verify (" #R ")")
-
-#ifdef __has_builtin
-# define _GL_MACRO__has_builtin __has_builtin
+#ifdef __GNUC__
+# define verify(R) _GL_VERIFY (R, "verify (" #R ")")
#else
-# define _GL_MACRO__has_builtin(x) 0
+/* PGI barfs if R is long. Play it safe. */
+# define verify(R) _GL_VERIFY (R, "verify (...)")
+#endif
+
+#ifndef __has_builtin
+# define __has_builtin(x) 0
#endif
/* Assume that R always holds. This lets the compiler optimize
accordingly. R should not have side-effects; it may or may not be
evaluated. Behavior is undefined if R is false. */
-#if (_GL_MACRO__has_builtin (__builtin_unreachable) \
+#if (__has_builtin (__builtin_unreachable) \
|| 4 < __GNUC__ + (5 <= __GNUC_MINOR__))
# define assume(R) ((R) ? (void) 0 : __builtin_unreachable ())
#elif 1200 <= _MSC_VER
# define assume(R) __assume (R)
-#elif (defined lint \
- && (_GL_MACRO__has_builtin (__builtin_trap) \
+#elif ((defined GCC_LINT || defined lint) \
+ && (__has_builtin (__builtin_trap) \
|| 3 < __GNUC__ + (3 < __GNUC_MINOR__ + (4 <= __GNUC_PATCHLEVEL__))))
/* Doing it this way helps various packages when configured with
--enable-gcc-warnings, which compiles with -Dlint. It's nicer
when 'assume' silences warnings even with older GCCs. */
# define assume(R) ((R) ? (void) 0 : __builtin_trap ())
#else
-# define assume(R) ((void) (0 && (R)))
+ /* Some tools grok NOTREACHED, e.g., Oracle Studio 12.6. */
+# define assume(R) ((R) ? (void) 0 : /*NOTREACHED*/ (void) 0)
#endif
/* @assert.h omit end@ */
diff --git a/glib/gnulib/xsize.h b/glib/gnulib/xsize.h
index a6f65bc0d..3f6de36ca 100644
--- a/glib/gnulib/xsize.h
+++ b/glib/gnulib/xsize.h
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2016 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2019 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -13,7 +13,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#ifndef _XSIZE_H
#define _XSIZE_H
@@ -29,6 +29,10 @@
# include <stdint.h>
#endif
+#ifndef _GL_INLINE_HEADER_BEGIN
+ #error "Please include config.h first."
+#endif
+_GL_INLINE_HEADER_BEGIN
#ifndef XSIZE_INLINE
# define XSIZE_INLINE _GL_INLINE
#endif
@@ -54,7 +58,7 @@
((N) <= G_MAXSIZE ? (size_t) (N) : G_MAXSIZE)
/* Sum of two sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -65,7 +69,7 @@ xsum (size_t size1, size_t size2)
}
/* Sum of three sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -75,7 +79,7 @@ xsum3 (size_t size1, size_t size2, size_t size3)
}
/* Sum of four sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -85,7 +89,7 @@ xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
}
/* Maximum of two sizes, with overflow check. */
-static inline size_t
+XSIZE_INLINE size_t
#if __GNUC__ >= 3
__attribute__ ((__pure__))
#endif
@@ -110,4 +114,6 @@ xmax (size_t size1, size_t size2)
#define size_in_bounds_p(SIZE) \
((SIZE) != G_MAXSIZE)
+_GL_INLINE_HEADER_END
+
#endif /* _XSIZE_H */
diff --git a/glib/goption.c b/glib/goption.c
index 83c5eb29e..8494ca739 100644
--- a/glib/goption.c
+++ b/glib/goption.c
@@ -277,7 +277,7 @@ struct _GOptionGroup
gpointer translate_data;
GOptionEntry *entries;
- gint n_entries;
+ gsize n_entries;
GOptionParseFunc pre_parse_func;
GOptionParseFunc post_parse_func;
@@ -665,7 +665,7 @@ calculate_max_length (GOptionGroup *group,
GHashTable *aliases)
{
GOptionEntry *entry;
- gint i, len, max_length;
+ gsize i, len, max_length;
const gchar *long_name;
max_length = 0;
@@ -828,7 +828,7 @@ g_option_context_get_help (GOptionContext *context,
{
GList *list;
gint max_length = 0, len;
- gint i;
+ gsize i;
GOptionEntry *entry;
GHashTable *shadow_map;
GHashTable *aliases;
@@ -1505,7 +1505,7 @@ parse_short_option (GOptionContext *context,
GError **error,
gboolean *parsed)
{
- gint j;
+ gsize j;
for (j = 0; j < group->n_entries; j++)
{
@@ -1587,7 +1587,7 @@ parse_long_option (GOptionContext *context,
GError **error,
gboolean *parsed)
{
- gint j;
+ gsize j;
for (j = 0; j < group->n_entries; j++)
{
@@ -1698,7 +1698,7 @@ parse_remaining_arg (GOptionContext *context,
GError **error,
gboolean *parsed)
{
- gint j;
+ gsize j;
for (j = 0; j < group->n_entries; j++)
{
@@ -1815,7 +1815,7 @@ free_pending_nulls (GOptionContext *context,
static char *
platform_get_argv0 (void)
{
-#if defined __linux
+#ifdef HAVE_PROC_SELF_CMDLINE
char *cmdline;
char *base_arg0;
gsize len;
@@ -2353,7 +2353,7 @@ void
g_option_group_add_entries (GOptionGroup *group,
const GOptionEntry *entries)
{
- gint i, n_entries;
+ gsize i, n_entries;
g_return_if_fail (entries != NULL);
diff --git a/glib/gprimes.c b/glib/gprimes.c
index 943a23d8d..1f6a31529 100644
--- a/glib/gprimes.c
+++ b/glib/gprimes.c
@@ -86,7 +86,7 @@ static const guint g_primes[] =
guint
g_spaced_primes_closest (guint num)
{
- gint i;
+ gsize i;
for (i = 0; i < G_N_ELEMENTS (g_primes); i++)
if (g_primes[i] > num)
diff --git a/glib/gquark.c b/glib/gquark.c
index c4d12b870..2a0861094 100644
--- a/glib/gquark.c
+++ b/glib/gquark.c
@@ -126,6 +126,9 @@ g_quark_init (void)
* If you want the GQuark to be created if it doesn't already exist,
* use g_quark_from_string() or g_quark_from_static_string().
*
+ * This function must not be used before library constructors have finished
+ * running.
+ *
* Returns: the #GQuark associated with the string, or 0 if @string is
* %NULL or there is no #GQuark associated with it
*/
@@ -214,6 +217,10 @@ quark_from_string_locked (const gchar *string,
* not currently have an associated #GQuark, a new #GQuark is created,
* using a copy of the string.
*
+ * This function must not be used before library constructors have finished
+ * running. In particular, this means it cannot be used to initialize global
+ * variables in C++.
+ *
* Returns: the #GQuark identifying the string, or 0 if @string is %NULL
*/
GQuark
@@ -239,6 +246,10 @@ g_quark_from_string (const gchar *string)
* expect to ever unload the module again (e.g. do not use this
* function in GTK+ theme engines).
*
+ * This function must not be used before library constructors have finished
+ * running. In particular, this means it cannot be used to initialize global
+ * variables in C++.
+ *
* Returns: the #GQuark identifying the string, or 0 if @string is %NULL
*/
GQuark
@@ -260,7 +271,7 @@ g_quark_to_string (GQuark quark)
{
gchar* result = NULL;
gchar **strings;
- gint seq_id;
+ guint seq_id;
seq_id = g_atomic_int_get (&quark_seq_id);
strings = g_atomic_pointer_get (&quarks);
@@ -325,6 +336,10 @@ quark_intern_string_locked (const gchar *string,
* can be compared for equality by comparing the pointers, instead of
* using strcmp().
*
+ * This function must not be used before library constructors have finished
+ * running. In particular, this means it cannot be used to initialize global
+ * variables in C++.
+ *
* Returns: a canonical representation for the string
*
* Since: 2.10
@@ -344,6 +359,10 @@ g_intern_string (const gchar *string)
* using strcmp(). g_intern_static_string() does not copy the string,
* therefore @string must not be freed or modified.
*
+ * This function must not be used before library constructors have finished
+ * running. In particular, this means it cannot be used to initialize global
+ * variables in C++.
+ *
* Returns: a canonical representation for the string
*
* Since: 2.10
diff --git a/glib/grcbox.c b/glib/grcbox.c
index 7a9a6f6d2..22a373b15 100644
--- a/glib/grcbox.c
+++ b/glib/grcbox.c
@@ -156,7 +156,7 @@
* g_rc_box_release_full (data, (GDestroyNotify) my_data_struct_clear);
* }
*
- * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_clear)
+ * G_DEFINE_AUTOPTR_CLEANUP_FUNC (MyDataStruct, my_data_struct_release)
* ]|
*
* Since: 2.58.
diff --git a/glib/gscanner.c b/glib/gscanner.c
index 9acf3dfa2..50d464b64 100644
--- a/glib/gscanner.c
+++ b/glib/gscanner.c
@@ -341,6 +341,7 @@ static const GScannerConfig g_scanner_config_template =
FALSE /* symbol_2_token */,
FALSE /* scope_0_fallback */,
FALSE /* store_int64 */,
+ 0 /* padding_dummy */
};
diff --git a/glib/gslice.c b/glib/gslice.c
index 86e76cec0..0e1726138 100644
--- a/glib/gslice.c
+++ b/glib/gslice.c
@@ -640,7 +640,8 @@ magazine_cache_trim (Allocator *allocator,
/* trim magazine cache from tail */
ChunkLink *current = magazine_chain_prev (allocator->magazines[ix]);
ChunkLink *trash = NULL;
- while (ABS (stamp - magazine_chain_uint_stamp (current)) >= allocator->config.working_set_msecs)
+ while (!G_APPROX_VALUE(stamp, magazine_chain_uint_stamp (current),
+ allocator->config.working_set_msecs))
{
/* unlink */
ChunkLink *prev = magazine_chain_prev (current);
diff --git a/glib/gstdio-private.c b/glib/gstdio-private.c
index 5eaaf09c5..6d86ce48c 100644
--- a/glib/gstdio-private.c
+++ b/glib/gstdio-private.c
@@ -75,3 +75,92 @@ _g_win32_strip_extended_ntobjm_prefix (gunichar2 *str,
return do_move;
}
+
+static int
+_g_win32_copy_and_maybe_terminate (const guchar *data,
+ gsize in_to_copy,
+ gunichar2 *buf,
+ gsize buf_size,
+ gunichar2 **alloc_buf,
+ gboolean terminate)
+{
+ gsize to_copy = in_to_copy;
+ /* Number of bytes we can use to add extra zeroes for NUL-termination.
+ * 0 means that we can destroy up to 2 bytes of data,
+ * 1 means that we can destroy up to 1 byte of data,
+ * 2 means that we do not perform destructive NUL-termination
+ */
+ gsize extra_bytes = terminate ? 2 : 0;
+ char *buf_in_chars;
+
+ if (to_copy == 0)
+ return 0;
+
+ /* 2 bytes is sizeof (wchar_t), for an extra NUL-terminator. */
+ if (buf)
+ {
+ if (to_copy >= buf_size)
+ {
+ extra_bytes = 0;
+ to_copy = buf_size;
+ }
+ else if (to_copy > buf_size - 2)
+ {
+ extra_bytes = 1;
+ }
+
+ memcpy (buf, data, to_copy);
+ }
+ else
+ {
+ /* Note that SubstituteNameLength is USHORT, so to_copy + 2, being
+ * gsize, never overflows.
+ */
+ *alloc_buf = g_malloc (to_copy + extra_bytes);
+ memcpy (*alloc_buf, data, to_copy);
+ }
+
+ if (!terminate)
+ return to_copy;
+
+ if (buf)
+ buf_in_chars = (char *) buf;
+ else
+ buf_in_chars = (char *) *alloc_buf;
+
+ if (to_copy >= 2 && buf_in_chars[to_copy - 2] == 0 &&
+ buf_in_chars[to_copy - 1] == 0)
+ {
+ /* Fully NUL-terminated, do nothing */
+ }
+ else if ((to_copy == 1 || buf_in_chars[to_copy - 2] != 0) &&
+ buf_in_chars[to_copy - 1] == 0)
+ {
+ /* Have one zero, try to add another one */
+ if (extra_bytes > 0)
+ {
+ /* Append trailing zero */
+ buf_in_chars[to_copy] = 0;
+ /* Be precise about the number of bytes we return */
+ to_copy += 1;
+ }
+ else if (to_copy >= 2)
+ {
+ /* No space for appending, destroy one byte */
+ buf_in_chars[to_copy - 2] = 0;
+ }
+ /* else there's no space at all (to_copy == 1), do nothing */
+ }
+ else if (extra_bytes > 0 || to_copy >= 2)
+ {
+ buf_in_chars[to_copy - 2 + extra_bytes] = 0;
+ buf_in_chars[to_copy - 1 + extra_bytes] = 0;
+ to_copy += extra_bytes;
+ }
+ else /* extra_bytes == 0 && to_copy == 1 */
+ {
+ buf_in_chars[0] = 0;
+ }
+
+ return to_copy;
+}
diff --git a/glib/gstdio.c b/glib/gstdio.c
index 4243fd5a7..51a1ddbe9 100644
--- a/glib/gstdio.c
+++ b/glib/gstdio.c
@@ -129,6 +129,8 @@ w32_error_to_errno (DWORD error_code)
* FT = UT * 10000000 + 116444736000000000.
* Therefore:
* UT = (FT - 116444736000000000) / 10000000.
+ * Converts FILETIME to unix epoch time in form
+ * of a signed 64-bit integer (can be negative).
*/
static gint64
_g_win32_filetime_to_unix_time (FILETIME *ft)
@@ -165,6 +167,9 @@ _g_win32_filetime_to_unix_time (FILETIME *ft)
# endif
# endif
+/* Uses filename and BHFI to fill a stat64 structure.
+ * Tries to reproduce the behaviour and quirks of MS C runtime stat().
+ */
static int
_g_win32_fill_statbuf_from_handle_info (const wchar_t *filename,
const wchar_t *filename_target,
@@ -258,67 +263,322 @@ _g_win32_fill_statbuf_from_handle_info (const wchar_t *filename,
return 0;
}
+/* Fills our private stat-like structure using data from
+ * a normal stat64 struct, BHFI, FSI and a reparse tag.
+ */
+static void
+_g_win32_fill_privatestat (const struct __stat64 *statbuf,
+ const BY_HANDLE_FILE_INFORMATION *handle_info,
+ const FILE_STANDARD_INFO *std_info,
+ DWORD reparse_tag,
+ GWin32PrivateStat *buf)
+{
+ 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;
+ 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;
+
+ buf->reparse_tag = reparse_tag;
+
+ buf->st_ctime = statbuf->st_ctime;
+ buf->st_atime = statbuf->st_atime;
+ buf->st_mtime = statbuf->st_mtime;
+}
+
+/* Read the link data from a symlink/mountpoint represented
+ * by the handle. Also reads reparse tag.
+ * @reparse_tag receives the tag. Can be %NULL if @buf or @alloc_buf
+ * is non-NULL.
+ * @buf receives the link data. Can be %NULL if reparse_tag is non-%NULL.
+ * Mutually-exclusive with @alloc_buf.
+ * @buf_size is the size of the @buf, in bytes.
+ * @alloc_buf points to a location where internally-allocated buffer
+ * pointer will be written. That buffer receives the
+ * link data. Mutually-exclusive with @buf.
+ * @terminate ensures that the buffer is NUL-terminated if
+ * it isn't already. Note that this can erase useful
+ * data if @buf is provided and @buf_size is too small.
+ * Specifically, with @buf_size <= 2 the buffer will
+ * receive an empty string, even if there is some
+ * data in the reparse point.
+ * The contents of @buf or @alloc_buf are presented as-is - could
+ * be non-NUL-terminated (unless @terminate is %TRUE) or even malformed.
+ * Returns the number of bytes (!) placed into @buf or @alloc_buf,
+ * including NUL-terminator (if any).
+ *
+ * Returned value of 0 means that there's no recognizable data in the
+ * reparse point. @alloc_buf will not be allocated in that case,
+ * and @buf will be left unmodified.
+ *
+ * If @buf and @alloc_buf are %NULL, returns 0 to indicate success.
+ * Returns -1 to indicate an error, sets errno.
+ */
+static int
+_g_win32_readlink_handle_raw (HANDLE h,
+ DWORD *reparse_tag,
+ gunichar2 *buf,
+ gsize buf_size,
+ gunichar2 **alloc_buf,
+ gboolean terminate)
+{
+ DWORD error_code;
+ DWORD returned_bytes = 0;
+ BYTE *data;
+ gsize to_copy;
+ /* This is 16k. It's impossible to make DeviceIoControl() tell us
+ * the required size. NtFsControlFile() does have such a feature,
+ * but for some reason it doesn't work with CreateFile()-returned handles.
+ * The only alternative is to repeatedly call DeviceIoControl()
+ * with bigger and bigger buffers, until it succeeds.
+ * We choose to sacrifice stack space for speed.
+ */
+ BYTE max_buffer[sizeof (REPARSE_DATA_BUFFER) + MAXIMUM_REPARSE_DATA_BUFFER_SIZE] = {0,};
+ DWORD max_buffer_size = sizeof (REPARSE_DATA_BUFFER) + MAXIMUM_REPARSE_DATA_BUFFER_SIZE;
+ REPARSE_DATA_BUFFER *rep_buf;
+
+ g_return_val_if_fail ((buf != NULL || alloc_buf != NULL || reparse_tag != NULL) &&
+ (buf == NULL || alloc_buf == NULL),
+ -1);
+
+ if (!DeviceIoControl (h, FSCTL_GET_REPARSE_POINT, NULL, 0,
+ max_buffer,
+ max_buffer_size,
+ &returned_bytes, NULL))
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+ return -1;
+ }
+
+ rep_buf = (REPARSE_DATA_BUFFER *) max_buffer;
+
+ if (reparse_tag != NULL)
+ *reparse_tag = rep_buf->ReparseTag;
+
+ if (buf == NULL && alloc_buf == NULL)
+ return 0;
+
+ if (rep_buf->ReparseTag == IO_REPARSE_TAG_SYMLINK)
+ {
+ data = &((BYTE *) rep_buf->SymbolicLinkReparseBuffer.PathBuffer)[rep_buf->SymbolicLinkReparseBuffer.SubstituteNameOffset];
+
+ to_copy = rep_buf->SymbolicLinkReparseBuffer.SubstituteNameLength;
+ }
+ else if (rep_buf->ReparseTag == IO_REPARSE_TAG_MOUNT_POINT)
+ {
+ data = &((BYTE *) rep_buf->MountPointReparseBuffer.PathBuffer)[rep_buf->MountPointReparseBuffer.SubstituteNameOffset];
+
+ to_copy = rep_buf->MountPointReparseBuffer.SubstituteNameLength;
+ }
+ else
+ to_copy = 0;
+
+ return _g_win32_copy_and_maybe_terminate (data, to_copy, buf, buf_size, alloc_buf, terminate);
+}
+
+/* Read the link data from a symlink/mountpoint represented
+ * by the @filename.
+ * @filename is the name of the file.
+ * @reparse_tag receives the tag. Can be %NULL if @buf or @alloc_buf
+ * is non-%NULL.
+ * @buf receives the link data. Mutually-exclusive with @alloc_buf.
+ * @buf_size is the size of the @buf, in bytes.
+ * @alloc_buf points to a location where internally-allocated buffer
+ * pointer will be written. That buffer receives the
+ * link data. Mutually-exclusive with @buf.
+ * @terminate ensures that the buffer is NUL-terminated if
+ * it isn't already
+ * The contents of @buf or @alloc_buf are presented as-is - could
+ * be non-NUL-terminated (unless @terminate is TRUE) or even malformed.
+ * Returns the number of bytes (!) placed into @buf or @alloc_buf.
+ * Returned value of 0 means that there's no recognizable data in the
+ * reparse point. @alloc_buf will not be allocated in that case,
+ * and @buf will be left unmodified.
+ * If @buf and @alloc_buf are %NULL, returns 0 to indicate success.
+ * Returns -1 to indicate an error, sets errno.
+ */
+static int
+_g_win32_readlink_utf16_raw (const gunichar2 *filename,
+ DWORD *reparse_tag,
+ gunichar2 *buf,
+ gsize buf_size,
+ gunichar2 **alloc_buf,
+ gboolean terminate)
+{
+ HANDLE h;
+ DWORD attributes;
+ DWORD to_copy;
+ DWORD error_code;
+
+ 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_EA,
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
+ 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;
+ }
+
+ to_copy = _g_win32_readlink_handle_raw (h, reparse_tag, buf, buf_size, alloc_buf, terminate);
+
+ CloseHandle (h);
+
+ return to_copy;
+}
+
+/* Read the link data from a symlink/mountpoint represented
+ * by a UTF-16 filename or a file handle.
+ * @filename is the name of the file. Mutually-exclusive with @file_handle.
+ * @file_handle is the handle of the file. Mutually-exclusive with @filename.
+ * @reparse_tag receives the tag. Can be %NULL if @buf or @alloc_buf
+ * is non-%NULL.
+ * @buf receives the link data. Mutually-exclusive with @alloc_buf.
+ * @buf_size is the size of the @buf, in bytes.
+ * @alloc_buf points to a location where internally-allocated buffer
+ * pointer will be written. That buffer receives the
+ * link data. Mutually-exclusive with @buf.
+ * @terminate ensures that the buffer is NUL-terminated if
+ * it isn't already
+ * The contents of @buf or @alloc_buf are adjusted
+ * (extended or nt object manager prefix is stripped),
+ * but otherwise they are presented as-is - could be non-NUL-terminated
+ * (unless @terminate is TRUE) or even malformed.
+ * Returns the number of bytes (!) placed into @buf or @alloc_buf.
+ * Returned value of 0 means that there's no recognizable data in the
+ * reparse point. @alloc_buf will not be allocated in that case,
+ * and @buf will be left unmodified.
+ * Returns -1 to indicate an error, sets errno.
+ */
+static int
+_g_win32_readlink_utf16_handle (const gunichar2 *filename,
+ HANDLE file_handle,
+ DWORD *reparse_tag,
+ gunichar2 *buf,
+ gsize buf_size,
+ gunichar2 **alloc_buf,
+ gboolean terminate)
+{
+ int result;
+ gsize string_size;
+
+ g_return_val_if_fail ((buf != NULL || alloc_buf != NULL || reparse_tag != NULL) &&
+ (filename != NULL || file_handle != NULL) &&
+ (buf == NULL || alloc_buf == NULL) &&
+ (filename == NULL || file_handle == NULL),
+ -1);
+
+ if (filename)
+ result = _g_win32_readlink_utf16_raw (filename, reparse_tag, buf, buf_size, alloc_buf, terminate);
+ else
+ result = _g_win32_readlink_handle_raw (file_handle, reparse_tag, buf, buf_size, alloc_buf, terminate);
+
+ 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. Unless it has no 'x:' drive
+ * letter part after the prefix, in which case we leave everything
+ * as-is, because the path could be "\\??\\Volume{GUID}" - stripping
+ * the prefix will allow it to be confused with relative links
+ * targeting "Volume{GUID}".
+ */
+ string_size = result / sizeof (gunichar2);
+ _g_win32_strip_extended_ntobjm_prefix (buf ? buf : *alloc_buf, &string_size);
+
+ return string_size * sizeof (gunichar2);
+}
+
+/* Works like stat() or lstat(), depending on the value of @for_symlink,
+ * but accepts filename in UTF-16 and fills our custom stat structure.
+ * The @filename must not have trailing slashes.
+ */
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;
+ DWORD immediate_attributes;
+ DWORD open_flags;
+ gboolean is_directory;
+ DWORD reparse_tag = 0;
+ DWORD error_code;
+ BOOL succeeded_so_far;
+ HANDLE file_handle;
- if (fd < 0)
- {
- immediate_attributes = GetFileAttributesW (filename);
+ immediate_attributes = GetFileAttributesW (filename);
- if (immediate_attributes == INVALID_FILE_ATTRIBUTES)
- {
- error_code = GetLastError ();
- errno = w32_error_to_errno (error_code);
+ if (immediate_attributes == INVALID_FILE_ATTRIBUTES)
+ {
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
- return -1;
- }
+ return -1;
+ }
- is_symlink = (immediate_attributes & FILE_ATTRIBUTE_REPARSE_POINT) == FILE_ATTRIBUTE_REPARSE_POINT;
- is_directory = (immediate_attributes & FILE_ATTRIBUTE_DIRECTORY) == FILE_ATTRIBUTE_DIRECTORY;
+ 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;
+ open_flags = FILE_ATTRIBUTE_NORMAL;
- if (for_symlink && is_symlink)
- open_flags |= FILE_FLAG_OPEN_REPARSE_POINT;
+ if (for_symlink && is_symlink)
+ open_flags |= FILE_FLAG_OPEN_REPARSE_POINT;
- if (is_directory)
- open_flags |= FILE_FLAG_BACKUP_SEMANTICS;
+ 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);
+ file_handle = CreateFileW (filename, FILE_READ_ATTRIBUTES | FILE_READ_EA,
+ FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
+ 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
+ if (file_handle == INVALID_HANDLE_VALUE)
{
- file_handle = (HANDLE) _get_osfhandle (fd);
-
- if (file_handle == INVALID_HANDLE_VALUE)
- return -1;
+ error_code = GetLastError ();
+ errno = w32_error_to_errno (error_code);
+ return -1;
}
succeeded_so_far = GetFileInformationByHandle (file_handle,
@@ -336,182 +596,104 @@ _g_win32_stat_utf16_no_trailing_slashes (const gunichar2 *filename,
if (!succeeded_so_far)
{
- if (fd < 0)
- CloseHandle (file_handle);
+ 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.
+ * We already have a handle open for symlink, use that.
+ * For the target we have to specify a filename, and the function
+ * will open another handle internally.
*/
- if (fd < 0)
+ if (is_symlink &&
+ _g_win32_readlink_utf16_handle (for_symlink ? NULL : filename,
+ for_symlink ? file_handle : NULL,
+ &reparse_tag,
+ NULL, 0,
+ for_symlink ? NULL : &filename_target,
+ TRUE) < 0)
{
- memset (&finddata, 0, sizeof (finddata));
+ CloseHandle (file_handle);
+ return -1;
+ }
- if (handle_info.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
- {
- 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);
- }
+ CloseHandle (file_handle);
- if (is_symlink && !for_symlink)
- {
- /* If filename is a symlink, but we need the target.
- * To get information about the target we need to resolve
- * the symlink first.
- */
- 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)
- {
- /* Pretend that new_len doesn't count the terminating NUL char,
- * and ask for a bit more space than is needed, and allocate even more.
- */
- filename_target_len = new_len + 3;
- filename_target = g_malloc ((filename_target_len + 1) * 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);
- }
- else if (new_len == 0)
- {
- g_clear_pointer (&filename_target, g_free);
- }
- /* GetFinalPathNameByHandle() is documented to return extended paths,
- * strip the extended prefix, if it is followed by a drive letter
- * and a colon. Otherwise keep it (the path could be
- * \\\\?\\Volume{GUID}\\ - it's only usable in extended form).
- */
- else if (new_len > 0)
- {
- gsize len = new_len;
-
- /* Account for NUL-terminator maybe not being counted.
- * This is why we overallocated earlier.
- */
- if (filename_target[len] != L'\0')
- {
- len++;
- filename_target[len] = L'\0';
- }
-
- _g_win32_strip_extended_ntobjm_prefix (filename_target, &len);
- new_len = len;
- }
-
- }
-
- if (new_len == 0)
- succeeded_so_far = FALSE;
- }
+ _g_win32_fill_statbuf_from_handle_info (filename,
+ filename_target,
+ &handle_info,
+ &statbuf);
+ g_free (filename_target);
+ _g_win32_fill_privatestat (&statbuf,
+ &handle_info,
+ &std_info,
+ reparse_tag,
+ buf);
- 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.
- */
+ return 0;
+}
- if (!succeeded_so_far)
- {
- errno = w32_error_to_errno (error_code);
- return -1;
- }
+/* Works like fstat(), but fills our custom stat structure. */
+static int
+_g_win32_stat_fd (int fd,
+ GWin32PrivateStat *buf)
+{
+ HANDLE file_handle;
+ gboolean succeeded_so_far;
+ DWORD error_code;
+ struct __stat64 statbuf;
+ BY_HANDLE_FILE_INFORMATION handle_info;
+ FILE_STANDARD_INFO std_info;
+ DWORD reparse_tag = 0;
+ gboolean is_symlink = FALSE;
- /*
- * We can't use _wstat64() here, because with UCRT it now gives
- * information about the target, even if we want information about
- * the link itself (unlike MSVCRT, which gave information about
- * the link, and if we needed information about the target we were
- * able to resolve it by ourselves prior to calling _wstat64()).
- */
- if (fd < 0)
- result = _g_win32_fill_statbuf_from_handle_info (filename,
- filename_target,
- &handle_info,
- &statbuf);
- else
- result = _fstat64 (fd, &statbuf);
+ file_handle = (HANDLE) _get_osfhandle (fd);
- if (result != 0)
- {
- int errsv = errno;
+ if (file_handle == INVALID_HANDLE_VALUE)
+ return -1;
- g_free (filename_target);
- errno = errsv;
+ 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)
+ {
+ errno = w32_error_to_errno (error_code);
return -1;
}
- g_free (filename_target);
+ is_symlink = (handle_info.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) == FILE_ATTRIBUTE_REPARSE_POINT;
- 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 (is_symlink &&
+ _g_win32_readlink_handle_raw (file_handle, &reparse_tag, NULL, 0, NULL, FALSE) < 0)
+ return -1;
- if (fd < 0 && buf->attributes & FILE_ATTRIBUTE_REPARSE_POINT)
- buf->reparse_tag = finddata.dwReserved0;
- else
- buf->reparse_tag = 0;
+ if (_fstat64 (fd, &statbuf) != 0)
+ return -1;
- buf->st_ctime = statbuf.st_ctime;
- buf->st_atime = statbuf.st_atime;
- buf->st_mtime = statbuf.st_mtime;
+ _g_win32_fill_privatestat (&statbuf,
+ &handle_info,
+ &std_info,
+ reparse_tag,
+ buf);
return 0;
}
+/* Works like stat() or lstat(), depending on the value of @for_symlink,
+ * but accepts filename in UTF-8 and fills our custom stat structure.
+ */
static int
_g_win32_stat_utf8 (const gchar *filename,
GWin32PrivateStat *buf,
@@ -544,13 +726,16 @@ _g_win32_stat_utf8 (const gchar *filename,
return -1;
}
- result = _g_win32_stat_utf16_no_trailing_slashes (wfilename, -1, buf, for_symlink);
+ result = _g_win32_stat_utf16_no_trailing_slashes (wfilename, buf, for_symlink);
g_free (wfilename);
return result;
}
+/* Works like stat(), but accepts filename in UTF-8
+ * and fills our custom stat structure.
+ */
int
g_win32_stat_utf8 (const gchar *filename,
GWin32PrivateStat *buf)
@@ -558,6 +743,9 @@ g_win32_stat_utf8 (const gchar *filename,
return _g_win32_stat_utf8 (filename, buf, FALSE);
}
+/* Works like lstat(), but accepts filename in UTF-8
+ * and fills our custom stat structure.
+ */
int
g_win32_lstat_utf8 (const gchar *filename,
GWin32PrivateStat *buf)
@@ -565,138 +753,14 @@ g_win32_lstat_utf8 (const gchar *filename,
return _g_win32_stat_utf8 (filename, buf, TRUE);
}
+/* Works like fstat(), but accepts filename in UTF-8
+ * and fills our custom stat structure.
+ */
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_EA,
- FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
- 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)
-{
- int result = _g_win32_readlink_utf16_raw (filename, buf, buf_size);
- gsize string_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. Unless it has no 'x:' drive
- * letter part after the prefix, in which case we leave everything
- * as-is, because the path could be "\??\Volume{GUID}" - stripping
- * the prefix will allow it to be confused with relative links
- * targeting "Volume{GUID}".
- */
- string_size = result / sizeof (gunichar2);
- _g_win32_strip_extended_ntobjm_prefix (buf, &string_size);
-
- return string_size * sizeof (gunichar2);
+ return _g_win32_stat_fd (fd, buf);
}
static gchar *
@@ -719,13 +783,54 @@ _g_win32_get_mode_alias (const gchar *mode)
return alias;
}
+/**
+ * g_win32_readlink_utf8:
+ * @filename: (type filename): a pathname in UTF-8
+ * @buf: (array length=buf_size) : a buffer to receive the reparse point
+ * target path. Mutually-exclusive
+ * with @alloc_buf.
+ * @buf_size: size of the @buf, in bytes
+ * @alloc_buf: points to a location where internally-allocated buffer
+ * pointer will be written. That buffer receives the
+ * link data. Mutually-exclusive with @buf.
+ * @terminate: ensures that the buffer is NUL-terminated if
+ * it isn't already. If %FALSE, the returned string
+ * might not be NUL-terminated (depends entirely on
+ * what the contents of the filesystem are).
+ *
+ * Tries to read the reparse point indicated by @filename, filling
+ * @buf or @alloc_buf with the path that the reparse point redirects to.
+ * The path will be UTF-8-encoded, and an extended path prefix
+ * or a NT object manager prefix will be removed from it, if
+ * possible, but otherwise the path is returned as-is. Specifically,
+ * it could be a "\\\\Volume{GUID}\\" path. It also might use
+ * backslashes as path separators.
+ *
+ * Returns: -1 on error (sets errno), 0 if there's no (recognizable)
+ * path in the reparse point (@alloc_buf will not be allocated in that case,
+ * and @buf will be left unmodified),
+ * or the number of bytes placed into @buf otherwise,
+ * including NUL-terminator (if present or if @terminate is TRUE).
+ * The buffer returned via @alloc_buf should be freed with g_free().
+ *
+ * Since: 2.60
+ */
int
-g_win32_readlink_utf8 (const gchar *filename,
- gchar *buf,
- gsize buf_size)
+g_win32_readlink_utf8 (const gchar *filename,
+ gchar *buf,
+ gsize buf_size,
+ gchar **alloc_buf,
+ gboolean terminate)
{
wchar_t *wfilename;
int result;
+ wchar_t *buf_utf16;
+ glong tmp_len;
+ gchar *tmp;
+
+ g_return_val_if_fail ((buf != NULL || alloc_buf != NULL) &&
+ (buf == NULL || alloc_buf == NULL),
+ -1);
wfilename = g_utf8_to_utf16 (filename, -1, NULL, NULL, NULL);
@@ -735,39 +840,41 @@ g_win32_readlink_utf8 (const gchar *filename,
return -1;
}
- result = _g_win32_readlink_utf16 (wfilename, (gunichar2 *) buf, buf_size);
+ result = _g_win32_readlink_utf16_handle (wfilename, NULL, NULL,
+ NULL, 0, &buf_utf16, terminate);
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 (result <= 0)
+ return result;
- if (tmp_len > buf_size - 1)
- tmp_len = buf_size - 1;
+ tmp = g_utf16_to_utf8 (buf_utf16,
+ result / sizeof (gunichar2),
+ NULL,
+ &tmp_len,
+ NULL);
- 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);
+ g_free (buf_utf16);
+
+ if (tmp == NULL)
+ {
+ errno = EINVAL;
+ return -1;
}
- return result;
+ if (alloc_buf)
+ {
+ *alloc_buf = tmp;
+ return tmp_len;
+ }
+
+ if (tmp_len > buf_size)
+ tmp_len = buf_size;
+
+ memcpy (buf, tmp, tmp_len);
+ g_free (tmp);
+
+ return tmp_len;
}
#endif
diff --git a/glib/gstdioprivate.h b/glib/gstdioprivate.h
index a100abb5e..71565388a 100644
--- a/glib/gstdioprivate.h
+++ b/glib/gstdioprivate.h
@@ -51,9 +51,11 @@ int g_win32_stat_utf8 (const gchar *filename,
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_readlink_utf8 (const gchar *filename,
+ gchar *buf,
+ gsize buf_size,
+ gchar **alloc_buf,
+ gboolean terminate);
int g_win32_fstat (int fd,
GWin32PrivateStat *buf);
diff --git a/glib/gstrfuncs.c b/glib/gstrfuncs.c
index 756dbc5bc..78eb71d3e 100644
--- a/glib/gstrfuncs.c
+++ b/glib/gstrfuncs.c
@@ -2700,13 +2700,14 @@ g_strstr_len (const gchar *haystack,
{
const gchar *p = haystack;
gsize needle_len = strlen (needle);
+ gsize haystack_len_unsigned = haystack_len;
const gchar *end;
gsize i;
if (needle_len == 0)
return (gchar *)haystack;
- if (haystack_len < needle_len)
+ if (haystack_len_unsigned < needle_len)
return NULL;
end = haystack + haystack_len - needle_len;
diff --git a/glib/gstring.c b/glib/gstring.c
index c083c7e0e..24692f135 100644
--- a/glib/gstring.c
+++ b/glib/gstring.c
@@ -428,6 +428,8 @@ g_string_insert_len (GString *string,
const gchar *val,
gssize len)
{
+ gsize len_unsigned, pos_unsigned;
+
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (len == 0 || val != NULL, string);
@@ -436,11 +438,15 @@ g_string_insert_len (GString *string,
if (len < 0)
len = strlen (val);
+ len_unsigned = len;
if (pos < 0)
- pos = string->len;
+ pos_unsigned = string->len;
else
- g_return_val_if_fail (pos <= string->len, string);
+ {
+ pos_unsigned = pos;
+ g_return_val_if_fail (pos_unsigned <= string->len, string);
+ }
/* Check whether val represents a substring of string.
* This test probably violates chapter and verse of the C standards,
@@ -452,45 +458,48 @@ g_string_insert_len (GString *string,
gsize offset = val - string->str;
gsize precount = 0;
- g_string_maybe_expand (string, len);
+ g_string_maybe_expand (string, len_unsigned);
val = string->str + offset;
/* At this point, val is valid again. */
/* Open up space where we are going to insert. */
- if (pos < string->len)
- memmove (string->str + pos + len, string->str + pos, string->len - pos);
+ if (pos_unsigned < string->len)
+ memmove (string->str + pos_unsigned + len_unsigned,
+ string->str + pos_unsigned, string->len - pos_unsigned);
/* Move the source part before the gap, if any. */
- if (offset < pos)
+ if (offset < pos_unsigned)
{
- precount = MIN (len, pos - offset);
- memcpy (string->str + pos, val, precount);
+ precount = MIN (len_unsigned, pos_unsigned - offset);
+ memcpy (string->str + pos_unsigned, val, precount);
}
/* Move the source part after the gap, if any. */
- if (len > precount)
- memcpy (string->str + pos + precount,
- val + /* Already moved: */ precount + /* Space opened up: */ len,
- len - precount);
+ if (len_unsigned > precount)
+ memcpy (string->str + pos_unsigned + precount,
+ val + /* Already moved: */ precount +
+ /* Space opened up: */ len_unsigned,
+ len_unsigned - precount);
}
else
{
- g_string_maybe_expand (string, len);
+ g_string_maybe_expand (string, len_unsigned);
/* If we aren't appending at the end, move a hunk
* of the old string to the end, opening up space
*/
- if (pos < string->len)
- memmove (string->str + pos + len, string->str + pos, string->len - pos);
+ if (pos_unsigned < string->len)
+ memmove (string->str + pos_unsigned + len_unsigned,
+ string->str + pos_unsigned, string->len - pos_unsigned);
/* insert the new string */
- if (len == 1)
- string->str[pos] = *val;
+ if (len_unsigned == 1)
+ string->str[pos_unsigned] = *val;
else
- memcpy (string->str + pos, val, len);
+ memcpy (string->str + pos_unsigned, val, len_unsigned);
}
- string->len += len;
+ string->len += len_unsigned;
string->str[string->len] = 0;
@@ -778,6 +787,8 @@ g_string_insert_c (GString *string,
gssize pos,
gchar c)
{
+ gsize pos_unsigned;
+
g_return_val_if_fail (string != NULL, NULL);
g_string_maybe_expand (string, 1);
@@ -785,13 +796,15 @@ g_string_insert_c (GString *string,
if (pos < 0)
pos = string->len;
else
- g_return_val_if_fail (pos <= string->len, string);
+ g_return_val_if_fail ((gsize) pos <= string->len, string);
+ pos_unsigned = pos;
/* If not just an append, move the old stuff */
- if (pos < string->len)
- memmove (string->str + pos + 1, string->str + pos, string->len - pos);
+ if (pos_unsigned < string->len)
+ memmove (string->str + pos_unsigned + 1,
+ string->str + pos_unsigned, string->len - pos_unsigned);
- string->str[pos] = c;
+ string->str[pos_unsigned] = c;
string->len += 1;
@@ -860,10 +873,10 @@ g_string_insert_unichar (GString *string,
if (pos < 0)
pos = string->len;
else
- g_return_val_if_fail (pos <= string->len, string);
+ g_return_val_if_fail ((gsize) pos <= string->len, string);
/* If not just an append, move the old stuff */
- if (pos < string->len)
+ if ((gsize) pos < string->len)
memmove (string->str + pos + charlen, string->str + pos, string->len - pos);
dest = string->str + pos;
@@ -970,21 +983,28 @@ g_string_erase (GString *string,
gssize pos,
gssize len)
{
+ gsize len_unsigned, pos_unsigned;
+
g_return_val_if_fail (string != NULL, NULL);
g_return_val_if_fail (pos >= 0, string);
- g_return_val_if_fail (pos <= string->len, string);
+ pos_unsigned = pos;
+
+ g_return_val_if_fail (pos_unsigned <= string->len, string);
if (len < 0)
- len = string->len - pos;
+ len_unsigned = string->len - pos_unsigned;
else
{
- g_return_val_if_fail (pos + len <= string->len, string);
+ len_unsigned = len;
+ g_return_val_if_fail (pos_unsigned + len_unsigned <= string->len, string);
- if (pos + len < string->len)
- memmove (string->str + pos, string->str + pos + len, string->len - (pos + len));
+ if (pos_unsigned + len_unsigned < string->len)
+ memmove (string->str + pos_unsigned,
+ string->str + pos_unsigned + len_unsigned,
+ string->len - (pos_unsigned + len_unsigned));
}
- string->len -= len;
+ string->len -= len_unsigned;
string->str[string->len] = 0;
diff --git a/glib/gtester.c b/glib/gtester.c
index fb79fbb0d..368fa8f3d 100644
--- a/glib/gtester.c
+++ b/glib/gtester.c
@@ -677,7 +677,7 @@ int
main (int argc,
char **argv)
{
- guint ui;
+ gint ui;
g_set_prgname (argv[0]);
parse_args (&argc, &argv);
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index c9bc3dd49..edf5ba1b5 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -348,28 +348,6 @@
*/
/**
- * GTestTrapFlags:
- * @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to
- * `/dev/null` so it cannot be observed on the console during test
- * runs. The actual output is still captured though to allow later
- * tests with g_test_trap_assert_stdout().
- * @G_TEST_TRAP_SILENCE_STDERR: Redirect stderr of the test child to
- * `/dev/null` so it cannot be observed on the console during test
- * runs. The actual output is still captured though to allow later
- * tests with g_test_trap_assert_stderr().
- * @G_TEST_TRAP_INHERIT_STDIN: If this flag is given, stdin of the
- * child process is shared with stdin of its parent process.
- * It is redirected to `/dev/null` otherwise.
- *
- * Test traps are guards around forked tests.
- * These flags determine what traps to set.
- *
- * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(),
- * which is deprecated. g_test_trap_subprocess() uses
- * #GTestSubprocessFlags.
- */
-
-/**
* GTestSubprocessFlags:
* @G_TEST_SUBPROCESS_INHERIT_STDIN: If this flag is given, the child
* process will inherit the parent's stdin. Otherwise, the child's
@@ -3630,7 +3608,7 @@ g_test_trap_assertions (const char *domain,
logged_child_output = logged_child_output || log_child_output (process_id);
- msg = g_strdup_printf ("stdout of child process (%s) %s: %s\nstderr was:\n%s",
+ msg = g_strdup_printf ("stdout of child process (%s) %s: %s\nstdout was:\n%s",
process_id, match_error, stdout_pattern, test_trap_last_stdout);
g_assertion_message (domain, file, line, func, msg);
g_free (msg);
@@ -3851,7 +3829,7 @@ g_test_build_filename_va (GTestFileType file_type,
va_list ap)
{
const gchar *pathv[16];
- gint num_path_segments;
+ gsize num_path_segments;
if (file_type == G_TEST_DIST)
pathv[0] = test_disted_files_dir;
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index effc88237..237b0dd10 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -149,7 +149,14 @@ typedef void (*GTestFixtureFunc) (gpointer fixture,
#endif
#ifdef G_DISABLE_ASSERT
+/* https://gcc.gnu.org/onlinedocs/gcc-8.3.0/gcc/Other-Builtins.html#index-_005f_005fbuiltin_005funreachable
+ * GCC 5 is not a strict lower bound for versions of GCC which provide __builtin_unreachable(). */
+#if __GNUC__ >= 5 || g_macro__has_builtin(__builtin_unreachable)
+#define g_assert_not_reached() G_STMT_START { (void) 0; __builtin_unreachable (); } G_STMT_END
+#else /* if __builtin_unreachable() is not supported: */
#define g_assert_not_reached() G_STMT_START { (void) 0; } G_STMT_END
+#endif
+
#define g_assert(expr) G_STMT_START { (void) 0; } G_STMT_END
#else /* !G_DISABLE_ASSERT */
#define g_assert_not_reached() G_STMT_START { g_assertion_message_expr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, NULL); } G_STMT_END
@@ -330,6 +337,27 @@ void g_test_queue_destroy (GDestroyNotify destroy_func,
gpointer destroy_data);
#define g_test_queue_unref(gobject) g_test_queue_destroy (g_object_unref, gobject)
+/**
+ * GTestTrapFlags:
+ * @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to
+ * `/dev/null` so it cannot be observed on the console during test
+ * runs. The actual output is still captured though to allow later
+ * tests with g_test_trap_assert_stdout().
+ * @G_TEST_TRAP_SILENCE_STDERR: Redirect stderr of the test child to
+ * `/dev/null` so it cannot be observed on the console during test
+ * runs. The actual output is still captured though to allow later
+ * tests with g_test_trap_assert_stderr().
+ * @G_TEST_TRAP_INHERIT_STDIN: If this flag is given, stdin of the
+ * child process is shared with stdin of its parent process.
+ * It is redirected to `/dev/null` otherwise.
+ *
+ * Test traps are guards around forked tests.
+ * These flags determine what traps to set.
+ *
+ * Deprecated: #GTestTrapFlags is used only with g_test_trap_fork(),
+ * which is deprecated. g_test_trap_subprocess() uses
+ * #GTestSubprocessFlags.
+ */
typedef enum {
G_TEST_TRAP_SILENCE_STDOUT = 1 << 7,
G_TEST_TRAP_SILENCE_STDERR = 1 << 8,
diff --git a/glib/gthread-posix.c b/glib/gthread-posix.c
index 322a89c2e..1e2fdb59a 100644
--- a/glib/gthread-posix.c
+++ b/glib/gthread-posix.c
@@ -1177,7 +1177,7 @@ g_system_thread_new (GThreadFunc proxy,
#ifdef _SC_THREAD_STACK_MIN
long min_stack_size = sysconf (_SC_THREAD_STACK_MIN);
if (min_stack_size >= 0)
- stack_size = MAX (min_stack_size, stack_size);
+ stack_size = MAX ((gulong) min_stack_size, stack_size);
#endif /* _SC_THREAD_STACK_MIN */
/* No error check here, because some systems can't do it and
* we simply don't want threads to fail because of that. */
@@ -1439,7 +1439,6 @@ g_cond_wait_until (GCond *cond,
struct timespec span;
guint sampled;
int res;
- gboolean success;
if (end_time < 0)
return FALSE;
@@ -1459,10 +1458,9 @@ g_cond_wait_until (GCond *cond,
sampled = cond->i[0];
g_mutex_unlock (mutex);
res = syscall (__NR_futex, &cond->i[0], (gsize) FUTEX_WAIT_PRIVATE, (gsize) sampled, &span);
- success = (res < 0 && errno == ETIMEDOUT) ? FALSE : TRUE;
g_mutex_lock (mutex);
- return success;
+ return (res < 0 && errno == ETIMEDOUT) ? FALSE : TRUE;
}
#endif
diff --git a/glib/gthreadpool.c b/glib/gthreadpool.c
index a1fbda671..0a5f7518a 100644
--- a/glib/gthreadpool.c
+++ b/glib/gthreadpool.c
@@ -91,7 +91,7 @@ struct _GRealThreadPool
GAsyncQueue *queue;
GCond cond;
gint max_threads;
- gint num_threads;
+ guint num_threads;
gboolean running;
gboolean immediate;
gboolean waiting;
@@ -154,7 +154,7 @@ g_thread_pool_wait_for_new_pool (void)
do
{
- if (g_atomic_int_get (&unused_threads) >= local_max_unused_threads)
+ if ((guint) g_atomic_int_get (&unused_threads) >= local_max_unused_threads)
{
/* If this is a superfluous thread, stop it. */
pool = NULL;
@@ -234,7 +234,7 @@ g_thread_pool_wait_for_new_task (GRealThreadPool *pool)
g_async_queue_length_unlocked (pool->queue) > 0))
{
/* This thread pool is still active. */
- if (pool->num_threads > pool->max_threads && pool->max_threads != -1)
+ if (pool->max_threads != -1 && pool->num_threads > (guint) pool->max_threads)
{
/* This is a superfluous thread, so it goes to the global pool. */
DEBUG_MSG (("superfluous thread %p in pool %p.",
@@ -340,7 +340,7 @@ g_thread_pool_thread_proxy (gpointer data)
* queue, wakeup the remaining threads.
*/
if (g_async_queue_length_unlocked (pool->queue) ==
- - pool->num_threads)
+ (gint) -pool->num_threads)
g_thread_pool_wakeup_and_stop_all (pool);
}
}
@@ -386,7 +386,7 @@ g_thread_pool_start_thread (GRealThreadPool *pool,
{
gboolean success = FALSE;
- if (pool->num_threads >= pool->max_threads && pool->max_threads != -1)
+ if (pool->max_threads != -1 && pool->num_threads >= (guint) pool->max_threads)
/* Enough threads are already running */
return TRUE;
@@ -504,7 +504,7 @@ g_thread_pool_new (GFunc func,
{
g_async_queue_lock (retval->queue);
- while (retval->num_threads < retval->max_threads)
+ while (retval->num_threads < (guint) retval->max_threads)
{
GError *local_error = NULL;
@@ -777,12 +777,12 @@ g_thread_pool_free (GThreadPool *pool,
if (wait_)
{
- while (g_async_queue_length_unlocked (real->queue) != -real->num_threads &&
+ while (g_async_queue_length_unlocked (real->queue) != (gint) -real->num_threads &&
!(immediate && real->num_threads == 0))
g_cond_wait (&real->cond, _g_async_queue_get_mutex (real->queue));
}
- if (immediate || g_async_queue_length_unlocked (real->queue) == -real->num_threads)
+ if (immediate || g_async_queue_length_unlocked (real->queue) == (gint) -real->num_threads)
{
/* No thread is currently doing something (and nothing is left
* to process in the queue)
diff --git a/glib/gtimezone.c b/glib/gtimezone.c
index 3d38b17bf..f418401ee 100644
--- a/glib/gtimezone.c
+++ b/glib/gtimezone.c
@@ -237,7 +237,7 @@ again:
if (tz->t_info != NULL)
{
- gint idx;
+ guint idx;
for (idx = 0; idx < tz->t_info->len; idx++)
{
TransitionInfo *info = &g_array_index (tz->t_info, TransitionInfo, idx);
@@ -575,7 +575,7 @@ init_zone_from_iana_info (GTimeZone *gtz,
trans.time = gint32_from_be (((gint32_be*)tz_transitions)[index]);
trans.info_index = tz_type_index[index];
g_assert (trans.info_index >= 0);
- g_assert (trans.info_index < gtz->t_info->len);
+ g_assert ((guint) trans.info_index < gtz->t_info->len);
g_array_append_val (gtz->transitions, trans);
}
}
@@ -690,7 +690,7 @@ register_tzi_to_tzi (RegTZI *reg, TIME_ZONE_INFORMATION *tzi)
tzi->DaylightBias = reg->DaylightBias;
}
-static gint
+static guint
rules_from_windows_time_zone (const gchar *identifier,
gchar **out_identifier,
TimeZoneRule **rules)
@@ -702,7 +702,7 @@ rules_from_windows_time_zone (const gchar *identifier,
"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\";
TIME_ZONE_INFORMATION tzi;
DWORD size;
- gint rules_num = 0;
+ guint rules_num = 0;
RegTZI regtzi, regtzi_prev;
g_assert (out_identifier != NULL);
@@ -830,7 +830,7 @@ failed:
static void
find_relative_date (TimeZoneDate *buffer)
{
- gint wday;
+ guint wday;
GDate date;
g_date_clear (&date, 1);
wday = buffer->wday;
@@ -923,7 +923,7 @@ fill_transition_info_from_rule (TransitionInfo *info,
static void
init_zone_from_rules (GTimeZone *gtz,
TimeZoneRule *rules,
- gint rules_num,
+ guint rules_num,
gchar *identifier /* (transfer full) */)
{
guint type_count = 0, trans_count = 0, info_index = 0;
@@ -1214,7 +1214,7 @@ parse_tz_boundary (const gchar *identifier,
}
}
-static gint
+static guint
create_ruleset_from_rule (TimeZoneRule **rules, TimeZoneRule *rule)
{
*rules = g_new0 (TimeZoneRule, 2);
@@ -1306,7 +1306,7 @@ parse_identifier_boundaries (gchar **pos, TimeZoneRule *tzr)
* Creates an array of TimeZoneRule from a TZ environment variable
* type of identifier. Should free rules afterwards
*/
-static gint
+static guint
rules_from_identifier (const gchar *identifier,
gchar **out_identifier,
TimeZoneRule **rules)
@@ -1779,8 +1779,8 @@ g_time_zone_adjust_time (GTimeZone *tz,
GTimeType type,
gint64 *time_)
{
- gint i;
- guint intervals;
+ guint i, intervals;
+ gboolean interval_is_dst;
if (tz->transitions == NULL)
return 0;
@@ -1822,16 +1822,21 @@ g_time_zone_adjust_time (GTimeZone *tz,
*time_ = interval_local_start (tz, i);
}
- else if (interval_isdst (tz, i) != type)
- /* it's in this interval, but dst flag doesn't match.
- * check neighbours for a better fit. */
+ else
{
- if (i && *time_ <= interval_local_end (tz, i - 1))
- i--;
-
- else if (i < intervals &&
- *time_ >= interval_local_start (tz, i + 1))
- i++;
+ interval_is_dst = interval_isdst (tz, i);
+ if ((interval_is_dst && type != G_TIME_TYPE_DAYLIGHT) ||
+ (!interval_is_dst && type == G_TIME_TYPE_DAYLIGHT))
+ {
+ /* it's in this interval, but dst flag doesn't match.
+ * check neighbours for a better fit. */
+ if (i && *time_ <= interval_local_end (tz, i - 1))
+ i--;
+
+ else if (i < intervals &&
+ *time_ >= interval_local_start (tz, i + 1))
+ i++;
+ }
}
}
@@ -1872,8 +1877,8 @@ g_time_zone_find_interval (GTimeZone *tz,
GTimeType type,
gint64 time_)
{
- gint i;
- guint intervals;
+ guint i, intervals;
+ gboolean interval_is_dst;
if (tz->transitions == NULL)
return 0;
@@ -1897,13 +1902,18 @@ g_time_zone_find_interval (GTimeZone *tz,
return -1;
}
- else if (interval_isdst (tz, i) != type)
+ else
{
- if (i && time_ <= interval_local_end (tz, i - 1))
- i--;
+ interval_is_dst = interval_isdst (tz, i);
+ if ((interval_is_dst && type != G_TIME_TYPE_DAYLIGHT) ||
+ (!interval_is_dst && type == G_TIME_TYPE_DAYLIGHT))
+ {
+ if (i && time_ <= interval_local_end (tz, i - 1))
+ i--;
- else if (i < intervals && time_ >= interval_local_start (tz, i + 1))
- i++;
+ else if (i < intervals && time_ >= interval_local_start (tz, i + 1))
+ i++;
+ }
}
return i;
diff --git a/glib/gunicode.h b/glib/gunicode.h
index cbb446ea9..36f841b9d 100644
--- a/glib/gunicode.h
+++ b/glib/gunicode.h
@@ -563,7 +563,7 @@ typedef enum
G_UNICODE_SCRIPT_KHUDAWADI, /* Sind */
G_UNICODE_SCRIPT_LINEAR_A, /* Lina */
G_UNICODE_SCRIPT_MAHAJANI, /* Mahj */
- G_UNICODE_SCRIPT_MANICHAEAN, /* Mani */
+ G_UNICODE_SCRIPT_MANICHAEAN, /* Manu */
G_UNICODE_SCRIPT_MENDE_KIKAKUI, /* Mend */
G_UNICODE_SCRIPT_MODI, /* Modi */
G_UNICODE_SCRIPT_MRO, /* Mroo */
diff --git a/glib/guniprop.c b/glib/guniprop.c
index 10c8a9361..793103182 100644
--- a/glib/guniprop.c
+++ b/glib/guniprop.c
@@ -1404,7 +1404,7 @@ static const guint32 iso15924_tags[] =
PACK ('S','i','n','d'), /* G_UNICODE_SCRIPT_KHUDAWADI */
PACK ('L','i','n','a'), /* G_UNICODE_SCRIPT_LINEAR_A */
PACK ('M','a','h','j'), /* G_UNICODE_SCRIPT_MAHAJANI */
- PACK ('M','a','n','i'), /* G_UNICODE_SCRIPT_MANICHAEAN */
+ PACK ('M','a','n','u'), /* G_UNICODE_SCRIPT_MANICHAEAN */
PACK ('M','e','n','d'), /* G_UNICODE_SCRIPT_MENDE_KIKAKUI */
PACK ('M','o','d','i'), /* G_UNICODE_SCRIPT_MODI */
PACK ('M','r','o','o'), /* G_UNICODE_SCRIPT_MRO */
diff --git a/glib/gutils.c b/glib/gutils.c
index 321ec88da..b4ca1cc3f 100644
--- a/glib/gutils.c
+++ b/glib/gutils.c
@@ -1037,7 +1037,8 @@ static gchar *g_prgname = NULL;
* #GtkApplication::startup handler. The program name is found by
* taking the last component of @argv[0].
*
- * Returns: the name of the program. The returned string belongs
+ * Returns: (nullable): the name of the program, or %NULL if it has not been
+ * set yet. The returned string belongs
* to GLib and must not be modified or freed.
*/
const gchar*
@@ -2322,7 +2323,7 @@ g_format_size_full (guint64 size,
struct Format
{
guint64 factor;
- char string[10];
+ char string[9];
};
typedef enum
diff --git a/glib/gvariant-core.c b/glib/gvariant-core.c
index d6bc20952..123220c1d 100644
--- a/glib/gvariant-core.c
+++ b/glib/gvariant-core.c
@@ -336,7 +336,7 @@ g_variant_ensure_size (GVariant *value)
{
g_assert (value->state & STATE_LOCKED);
- if (value->size == (gssize) -1)
+ if (value->size == (gsize) -1)
{
gpointer *children;
gsize n_children;
diff --git a/glib/gvariant-parser.c b/glib/gvariant-parser.c
index 6061d614c..589fe3f4f 100644
--- a/glib/gvariant-parser.c
+++ b/glib/gvariant-parser.c
@@ -362,7 +362,7 @@ static void
token_stream_assert (TokenStream *stream,
const gchar *token)
{
- gboolean correct_token;
+ gboolean correct_token G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
correct_token = token_stream_consume (stream, token);
g_assert (correct_token);
@@ -418,6 +418,8 @@ pattern_copy (gchar **out,
while (brackets);
}
+/* Returns the most general pattern that is subpattern of left and subpattern
+ * of right, or NULL if there is no such pattern. */
static gchar *
pattern_coalesce (const gchar *left,
const gchar *right)
@@ -458,7 +460,7 @@ pattern_coalesce (const gchar *left,
*out++ = *(*the_other)++;
}
- else if (**one == 'M' && **the_other != 'm')
+ else if (**one == 'M' && **the_other != 'm' && **the_other != '*')
{
(*one)++;
}
@@ -672,18 +674,7 @@ ast_array_get_pattern (AST **array,
gint i;
/* Find the pattern which applies to all children in the array, by l-folding a
- * coalesce operation. This will not always work: for example, the GVariant:
- * [[0], [], [nothing]]
- * has patterns:
- * MaMN, Ma*, Mam*
- * which pairwise coalesce as:
- * MaMN + Ma* = MaN
- * MaN + Mam* = (doesn’t coalesce)
- *
- * However, the pattern MamN coalesces with all three child patterns. Finding
- * this pattern would require trying all O(n_items^2) pairs, though, which is
- * expensive. Just let it fail, and require the user to provide type
- * annotations.
+ * coalesce operation.
*/
pattern = ast_get_pattern (array[0], error);
@@ -719,10 +710,10 @@ ast_array_get_pattern (AST **array,
gchar *tmp2;
gchar *m;
- /* if 'j' reaches 'i' then we failed to find the pair, which can
- * happen due to only trying pairwise coalesces in order rather
- * than between all pairs (see above). so just report an error
- * for i. */
+ /* if 'j' reaches 'i' then we didn't find the pair that failed
+ * to coalesce. This shouldn't happen (see above), but just in
+ * case report an error:
+ */
if (j >= i)
{
ast_set_error (array[i], error, NULL,
@@ -1947,7 +1938,8 @@ number_get_value (AST *ast,
return number_overflow (ast, type, error);
if (negative && abs_val > G_MAXINT16)
return g_variant_new_int16 (G_MININT16);
- return g_variant_new_int16 (negative ? -((gint16) abs_val) : abs_val);
+ return g_variant_new_int16 (negative ?
+ -((gint16) abs_val) : ((gint16) abs_val));
case 'q':
if (negative || abs_val > G_MAXUINT16)
@@ -1959,7 +1951,8 @@ number_get_value (AST *ast,
return number_overflow (ast, type, error);
if (negative && abs_val > G_MAXINT32)
return g_variant_new_int32 (G_MININT32);
- return g_variant_new_int32 (negative ? -((gint32) abs_val) : abs_val);
+ return g_variant_new_int32 (negative ?
+ -((gint32) abs_val) : ((gint32) abs_val));
case 'u':
if (negative || abs_val > G_MAXUINT32)
@@ -1971,7 +1964,8 @@ number_get_value (AST *ast,
return number_overflow (ast, type, error);
if (negative && abs_val > G_MAXINT64)
return g_variant_new_int64 (G_MININT64);
- return g_variant_new_int64 (negative ? -((gint64) abs_val) : abs_val);
+ return g_variant_new_int64 (negative ?
+ -((gint64) abs_val) : ((gint64) abs_val));
case 't':
if (negative)
@@ -1983,7 +1977,8 @@ number_get_value (AST *ast,
return number_overflow (ast, type, error);
if (negative && abs_val > G_MAXINT32)
return g_variant_new_handle (G_MININT32);
- return g_variant_new_handle (negative ? -((gint32) abs_val) : abs_val);
+ return g_variant_new_handle (negative ?
+ -((gint32) abs_val) : ((gint32) abs_val));
default:
return ast_type_error (ast, type, error);
@@ -2639,7 +2634,7 @@ g_variant_builder_add_parsed (GVariantBuilder *builder,
static gboolean
parse_num (const gchar *num,
const gchar *limit,
- gint *result)
+ guint *result)
{
gchar *endptr;
gint64 bignum;
@@ -2652,7 +2647,7 @@ parse_num (const gchar *num,
if (bignum < 0 || bignum > G_MAXINT)
return FALSE;
- *result = bignum;
+ *result = (guint) bignum;
return TRUE;
}
@@ -2808,7 +2803,7 @@ g_variant_parse_error_print_context (GError *error,
if (dash == NULL || colon < dash)
{
- gint point;
+ guint point;
/* we have a single point */
if (!parse_num (error->message, colon, &point))
@@ -2826,7 +2821,7 @@ g_variant_parse_error_print_context (GError *error,
/* We have one or two ranges... */
if (comma && comma < colon)
{
- gint start1, end1, start2, end2;
+ guint start1, end1, start2, end2;
const gchar *dash2;
/* Two ranges */
@@ -2842,7 +2837,7 @@ g_variant_parse_error_print_context (GError *error,
}
else
{
- gint start, end;
+ guint start, end;
/* One range */
if (!parse_num (error->message, dash, &start) || !parse_num (dash + 1, colon, &end))
diff --git a/glib/gvariant.c b/glib/gvariant.c
index 0b6edc2ab..db56560a6 100644
--- a/glib/gvariant.c
+++ b/glib/gvariant.c
@@ -1552,19 +1552,20 @@ g_variant_new_strv (const gchar * const *strv,
gssize length)
{
GVariant **strings;
- gsize i;
+ gsize i, length_unsigned;
g_return_val_if_fail (length == 0 || strv != NULL, NULL);
if (length < 0)
length = g_strv_length ((gchar **) strv);
+ length_unsigned = length;
- strings = g_new (GVariant *, length);
- for (i = 0; i < length; i++)
+ strings = g_new (GVariant *, length_unsigned);
+ for (i = 0; i < length_unsigned; i++)
strings[i] = g_variant_ref_sink (g_variant_new_string (strv[i]));
return g_variant_new_from_children (G_VARIANT_TYPE_STRING_ARRAY,
- strings, length, TRUE);
+ strings, length_unsigned, TRUE);
}
/**
@@ -1688,19 +1689,20 @@ g_variant_new_objv (const gchar * const *strv,
gssize length)
{
GVariant **strings;
- gsize i;
+ gsize i, length_unsigned;
g_return_val_if_fail (length == 0 || strv != NULL, NULL);
if (length < 0)
length = g_strv_length ((gchar **) strv);
+ length_unsigned = length;
- strings = g_new (GVariant *, length);
- for (i = 0; i < length; i++)
+ strings = g_new (GVariant *, length_unsigned);
+ for (i = 0; i < length_unsigned; i++)
strings[i] = g_variant_ref_sink (g_variant_new_object_path (strv[i]));
return g_variant_new_from_children (G_VARIANT_TYPE_OBJECT_PATH_ARRAY,
- strings, length, TRUE);
+ strings, length_unsigned, TRUE);
}
/**
@@ -1928,19 +1930,20 @@ g_variant_new_bytestring_array (const gchar * const *strv,
gssize length)
{
GVariant **strings;
- gsize i;
+ gsize i, length_unsigned;
g_return_val_if_fail (length == 0 || strv != NULL, NULL);
if (length < 0)
length = g_strv_length ((gchar **) strv);
+ length_unsigned = length;
- strings = g_new (GVariant *, length);
- for (i = 0; i < length; i++)
+ strings = g_new (GVariant *, length_unsigned);
+ for (i = 0; i < length_unsigned; i++)
strings[i] = g_variant_ref_sink (g_variant_new_bytestring (strv[i]));
return g_variant_new_from_children (G_VARIANT_TYPE_BYTESTRING_ARRAY,
- strings, length, TRUE);
+ strings, length_unsigned, TRUE);
}
/**
diff --git a/glib/gvarianttype.c b/glib/gvarianttype.c
index b8c6cc195..1a228f73b 100644
--- a/glib/gvarianttype.c
+++ b/glib/gvarianttype.c
@@ -1084,12 +1084,16 @@ g_variant_type_key (const GVariantType *type)
const GVariantType *
g_variant_type_value (const GVariantType *type)
{
+#ifndef G_DISABLE_ASSERT
const gchar *type_string;
+#endif
g_return_val_if_fail (g_variant_type_check (type), NULL);
+#ifndef G_DISABLE_ASSERT
type_string = g_variant_type_peek_string (type);
g_assert (type_string[0] == '{');
+#endif
return g_variant_type_next (g_variant_type_key (type));
}
diff --git a/glib/gvarianttypeinfo.c b/glib/gvarianttypeinfo.c
index bee0571b5..bed0bb717 100644
--- a/glib/gvarianttypeinfo.c
+++ b/glib/gvarianttypeinfo.c
@@ -108,10 +108,10 @@ typedef struct
/* Hard-code the base types in a constant array */
static const GVariantTypeInfo g_variant_type_info_basic_table[24] = {
-#define fixed_aligned(x) x, x - 1
-#define not_a_type 0,
-#define unaligned 0, 0
-#define aligned(x) 0, x - 1
+#define fixed_aligned(x) x, x - 1, 0
+#define not_a_type 0, 0, 0
+#define unaligned 0, 0, 0
+#define aligned(x) 0, x - 1, 0
/* 'b' */ { fixed_aligned(1) }, /* boolean */
/* 'c' */ { not_a_type },
/* 'd' */ { fixed_aligned(8) }, /* double */
@@ -157,6 +157,7 @@ static void
g_variant_type_info_check (const GVariantTypeInfo *info,
char container_class)
{
+#ifndef G_DISABLE_ASSERT
g_assert (!container_class || info->container_class == container_class);
/* alignment can only be one of these */
@@ -185,6 +186,7 @@ g_variant_type_info_check (const GVariantTypeInfo *info,
g_assert (0 <= index && index < 24);
g_assert (g_variant_type_info_basic_chars[index][0] != ' ');
}
+#endif /* !G_DISABLE_ASSERT */
}
/* < private >
@@ -360,7 +362,7 @@ static void
tuple_info_free (GVariantTypeInfo *info)
{
TupleInfo *tuple_info;
- gint i;
+ gsize i;
g_assert (info->container_class == GV_TUPLE_INFO_CLASS);
tuple_info = (TupleInfo *) info;
@@ -638,7 +640,7 @@ tuple_set_base_info (TupleInfo *info)
* offsets are stored and the last item is fixed-sized too (since
* an offset is never stored for the last item).
*/
- if (m->i == -1 && m->type_info->fixed_size)
+ if (m->i == (gsize) -1 && m->type_info->fixed_size)
/* in that case, the fixed size can be found by finding the
* start of the last item (in the usual way) and adding its
* fixed size.
diff --git a/glib/gversionmacros.h b/glib/gversionmacros.h
index 0ba8f635b..e66afdd91 100644
--- a/glib/gversionmacros.h
+++ b/glib/gversionmacros.h
@@ -215,6 +215,16 @@
*/
#define GLIB_VERSION_2_60 (G_ENCODE_VERSION (2, 60))
+/**
+ * GLIB_VERSION_2_62:
+ *
+ * A macro that evaluates to the 2.62 version of GLib, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 2.62
+ */
+#define GLIB_VERSION_2_62 (G_ENCODE_VERSION (2, 62))
+
/* evaluates to the current stable version; for development cycles,
* this means the next stable target
*/
@@ -558,4 +568,18 @@
# define GLIB_AVAILABLE_IN_2_60 _GLIB_EXTERN
#endif
+#if GLIB_VERSION_MIN_REQUIRED >= GLIB_VERSION_2_62
+# define GLIB_DEPRECATED_IN_2_62 GLIB_DEPRECATED
+# define GLIB_DEPRECATED_IN_2_62_FOR(f) GLIB_DEPRECATED_FOR(f)
+#else
+# define GLIB_DEPRECATED_IN_2_62 _GLIB_EXTERN
+# define GLIB_DEPRECATED_IN_2_62_FOR(f) _GLIB_EXTERN
+#endif
+
+#if GLIB_VERSION_MAX_ALLOWED < GLIB_VERSION_2_62
+# define GLIB_AVAILABLE_IN_2_62 GLIB_UNAVAILABLE(2, 62)
+#else
+# define GLIB_AVAILABLE_IN_2_62 _GLIB_EXTERN
+#endif
+
#endif /* __G_VERSION_MACROS_H__ */
diff --git a/glib/gwin32-private.c b/glib/gwin32-private.c
new file mode 100644
index 000000000..917bcd1b5
--- /dev/null
+++ b/glib/gwin32-private.c
@@ -0,0 +1,77 @@
+/* gwin32-private.c - private glib functions for gwin32.c
+ *
+ * Copyright 2019 Руслан Ижбулатов
+ *
+ * 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/>.
+ */
+
+/* Copy @cmdline into @debugger, and substitute @pid for `%p`
+ * and @event for `%e`.
+ * If @debugger_size (in bytes) is overflowed, return %FALSE.
+ * Also returns %FALSE when `%` is followed by anything other
+ * than `e` or `p`.
+ */
+static gboolean
+_g_win32_subst_pid_and_event (char *debugger,
+ gsize debugger_size,
+ const char *cmdline,
+ DWORD pid,
+ guintptr event)
+{
+ gsize i = 0, dbg_i = 0;
+/* These are integers, and they can't be longer than 20 characters
+ * even when they are 64-bit and in decimal notation.
+ * Use 30 just to be sure.
+ */
+#define STR_BUFFER_SIZE 30
+ char pid_str[STR_BUFFER_SIZE] = {0};
+ gsize pid_str_len;
+ char event_str[STR_BUFFER_SIZE] = {0};
+ gsize event_str_len;
+#undef STR_BUFFER_SIZE
+ snprintf (pid_str, G_N_ELEMENTS (pid_str), "%lu", pid);
+ pid_str[G_N_ELEMENTS (pid_str) - 1] = 0;
+ pid_str_len = strlen (pid_str);
+ snprintf (event_str, G_N_ELEMENTS (pid_str), "%Iu", event);
+ event_str[G_N_ELEMENTS (pid_str) - 1] = 0;
+ event_str_len = strlen (event_str);
+
+ while (cmdline[i] != 0 && dbg_i < debugger_size)
+ {
+ if (cmdline[i] != '%')
+ debugger[dbg_i++] = cmdline[i++];
+ else if (cmdline[i + 1] == 'p')
+ {
+ gsize j = 0;
+ while (j < pid_str_len && dbg_i < debugger_size)
+ debugger[dbg_i++] = pid_str[j++];
+ i += 2;
+ }
+ else if (cmdline[i + 1] == 'e')
+ {
+ gsize j = 0;
+ while (j < event_str_len && dbg_i < debugger_size)
+ debugger[dbg_i++] = event_str[j++];
+ i += 2;
+ }
+ else
+ return FALSE;
+ }
+ if (dbg_i < debugger_size)
+ debugger[dbg_i] = 0;
+ else
+ return FALSE;
+
+ return TRUE;
+}
diff --git a/glib/gwin32.c b/glib/gwin32.c
index 8a7ab3aeb..7c724badb 100644
--- a/glib/gwin32.c
+++ b/glib/gwin32.c
@@ -1018,4 +1018,217 @@ g_console_win32_init (void)
}
}
+/* This is a handle to the Vectored Exception Handler that
+ * we install on library initialization. If installed correctly,
+ * it will be non-NULL. Only used to later de-install the handler
+ * on library de-initialization.
+ */
+static void *WinVEH_handle = NULL;
+
+#include "gwin32-private.c"
+
+/* Handles exceptions (useful for debugging).
+ * Issues a DebugBreak() call if the process is being debugged (not really
+ * useful - if the process is being debugged, this handler won't be invoked
+ * anyway). If it is not, runs a debugger from G_DEBUGGER env var,
+ * substituting first %p in it for PID, and the first %e for the event handle -
+ * that event should be set once the debugger attaches itself (otherwise the
+ * only way out of WaitForSingleObject() is to time out after 1 minute).
+ * For example, G_DEBUGGER can be set to the following command:
+ * ```
+ * gdb.exe -ex "attach %p" -ex "signal-event %e" -ex "bt" -ex "c"
+ * ```
+ * This will make GDB attach to the process, signal the event (GDB must be
+ * recent enough for the signal-event command to be available),
+ * show the backtrace and resume execution, which should make it catch
+ * the exception when Windows re-raises it again.
+ * The command line can't be longer than MAX_PATH (260 characters).
+ *
+ * This function will only stop (and run a debugger) on the following exceptions:
+ * * EXCEPTION_ACCESS_VIOLATION
+ * * EXCEPTION_STACK_OVERFLOW
+ * * EXCEPTION_ILLEGAL_INSTRUCTION
+ * To make it stop at other exceptions one should set the G_VEH_CATCH
+ * environment variable to a list of comma-separated hexademical numbers,
+ * where each number is the code of an exception that should be caught.
+ * This is done to prevent GLib from breaking when Windows uses
+ * exceptions to shuttle information (SetThreadName(), OutputDebugString())
+ * or for control flow.
+ *
+ * This function deliberately avoids calling any GLib code.
+ */
+static LONG __stdcall
+g_win32_veh_handler (PEXCEPTION_POINTERS ExceptionInfo)
+{
+ EXCEPTION_RECORD *er;
+ char debugger[MAX_PATH + 1];
+ const char *debugger_env = NULL;
+ const char *catch_list;
+ gboolean catch = FALSE;
+ STARTUPINFO si;
+ PROCESS_INFORMATION pi;
+ HANDLE event;
+ SECURITY_ATTRIBUTES sa;
+
+ if (ExceptionInfo == NULL ||
+ ExceptionInfo->ExceptionRecord == NULL)
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ er = ExceptionInfo->ExceptionRecord;
+
+ switch (er->ExceptionCode)
+ {
+ case EXCEPTION_ACCESS_VIOLATION:
+ case EXCEPTION_STACK_OVERFLOW:
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ case EXCEPTION_BREAKPOINT: /* DebugBreak() raises this */
+ break;
+ default:
+ catch_list = getenv ("G_VEH_CATCH");
+
+ while (!catch &&
+ catch_list != NULL &&
+ catch_list[0] != 0)
+ {
+ unsigned long catch_code;
+ char *end;
+ errno = 0;
+ catch_code = strtoul (catch_list, &end, 16);
+ if (errno != NO_ERROR)
+ break;
+ catch_list = end;
+ if (catch_list != NULL && catch_list[0] == ',')
+ catch_list++;
+ if (catch_code == er->ExceptionCode)
+ catch = TRUE;
+ }
+
+ if (catch)
+ break;
+
+ return EXCEPTION_CONTINUE_SEARCH;
+ }
+
+ if (IsDebuggerPresent ())
+ {
+ /* This shouldn't happen, but still try to
+ * avoid recursion with EXCEPTION_BREAKPOINT and
+ * DebugBreak().
+ */
+ if (er->ExceptionCode != EXCEPTION_BREAKPOINT)
+ DebugBreak ();
+ return EXCEPTION_CONTINUE_EXECUTION;
+ }
+
+ fprintf (stderr,
+ "Exception code=0x%lx flags=0x%lx at 0x%p",
+ er->ExceptionCode,
+ er->ExceptionFlags,
+ er->ExceptionAddress);
+
+ switch (er->ExceptionCode)
+ {
+ case EXCEPTION_ACCESS_VIOLATION:
+ fprintf (stderr,
+ ". Access violation - attempting to %s at address 0x%p\n",
+ er->ExceptionInformation[0] == 0 ? "read data" :
+ er->ExceptionInformation[0] == 1 ? "write data" :
+ er->ExceptionInformation[0] == 8 ? "execute data" :
+ "do something bad",
+ (void *) er->ExceptionInformation[1]);
+ break;
+ case EXCEPTION_IN_PAGE_ERROR:
+ fprintf (stderr,
+ ". Page access violation - attempting to %s at address 0x%p with status %Ix\n",
+ er->ExceptionInformation[0] == 0 ? "read from an inaccessible page" :
+ er->ExceptionInformation[0] == 1 ? "write to an inaccessible page" :
+ er->ExceptionInformation[0] == 8 ? "execute data in page" :
+ "do something bad with a page",
+ (void *) er->ExceptionInformation[1],
+ er->ExceptionInformation[2]);
+ break;
+ default:
+ fprintf (stderr, "\n");
+ break;
+ }
+
+ fflush (stderr);
+
+ debugger_env = getenv ("G_DEBUGGER");
+
+ if (debugger_env == NULL)
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ /* Create an inheritable event */
+ memset (&si, 0, sizeof (si));
+ memset (&pi, 0, sizeof (pi));
+ memset (&sa, 0, sizeof (sa));
+ si.cb = sizeof (si);
+ sa.nLength = sizeof (sa);
+ sa.bInheritHandle = TRUE;
+ event = CreateEvent (&sa, FALSE, FALSE, NULL);
+
+ /* Put process ID and event handle into debugger commandline */
+ if (!_g_win32_subst_pid_and_event (debugger, G_N_ELEMENTS (debugger),
+ debugger_env, GetCurrentProcessId (),
+ (guintptr) event))
+ {
+ CloseHandle (event);
+ return EXCEPTION_CONTINUE_SEARCH;
+ }
+
+ /* Run the debugger */
+ debugger[MAX_PATH] = '\0';
+ if (0 != CreateProcessA (NULL,
+ debugger,
+ NULL,
+ NULL,
+ TRUE,
+ getenv ("G_DEBUGGER_OLD_CONSOLE") != NULL ? 0 : CREATE_NEW_CONSOLE,
+ NULL,
+ NULL,
+ &si,
+ &pi))
+ {
+ CloseHandle (pi.hProcess);
+ CloseHandle (pi.hThread);
+ /* If successful, wait for 60 seconds on the event
+ * we passed. The debugger should signal that event.
+ * 60 second limit is here to prevent us from hanging
+ * up forever in case the debugger does not support
+ * event signalling.
+ */
+ WaitForSingleObject (event, 60000);
+ }
+
+ CloseHandle (event);
+
+ /* Now the debugger is present, and we can try
+ * resuming execution, re-triggering the exception,
+ * which will be caught by debugger this time around.
+ */
+ if (IsDebuggerPresent ())
+ return EXCEPTION_CONTINUE_EXECUTION;
+
+ return EXCEPTION_CONTINUE_SEARCH;
+}
+
+void
+g_crash_handler_win32_init (void)
+{
+ if (WinVEH_handle != NULL)
+ return;
+
+ WinVEH_handle = AddVectoredExceptionHandler (0, &g_win32_veh_handler);
+}
+
+void
+g_crash_handler_win32_deinit (void)
+{
+ if (WinVEH_handle != NULL)
+ RemoveVectoredExceptionHandler (WinVEH_handle);
+
+ WinVEH_handle = NULL;
+}
+
#endif
diff --git a/glib/meson.build b/glib/meson.build
index 8350ea283..df8be8e6d 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -16,7 +16,94 @@ endif
if have_good_vsnprintf and have_good_snprintf
gnulib_lib = []
gnulib_objects = []
+ gnulib_libm_dependency = []
+ glib_conf.set ('gl_unused', '')
+ glib_conf.set ('gl_extern_inline', '')
else
+ subdir ('gnulib/gl_extern_inline')
+ subdir ('gnulib/gl_cv_long_double_equals_double')
+ subdir ('gnulib/gl_cv_cc_double_expbit0')
+ subdir ('gnulib/gl_cv_func_printf_precision')
+ subdir ('gnulib/gl_cv_func_printf_enomem')
+ subdir ('gnulib/gl_cv_func_printf_flag_zero')
+ subdir ('gnulib/gl_cv_func_printf_flag_leftadjust')
+ subdir ('gnulib/gl_cv_func_printf_flag_grouping')
+ subdir ('gnulib/gl_cv_func_printf_directive_a')
+ subdir ('gnulib/gl_cv_func_printf_directive_f')
+ subdir ('gnulib/gl_cv_func_printf_directive_ls')
+ subdir ('gnulib/gl_cv_func_printf_long_double')
+ subdir ('gnulib/gl_cv_func_printf_infinite')
+ subdir ('gnulib/gl_cv_func_printf_infinite_long_double')
+
+ gl_unused = '''
+/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+'''
+ glib_conf.set ('gl_unused', gl_unused)
+ glib_conf.set ('gl_extern_inline', gl_extern_inline)
+
+ if (gl_cv_long_double_equals_double)
+ glib_conf.set ('HAVE_SAME_LONG_DOUBLE_AS_DOUBLE', 1)
+ endif
+
+ if (gl_cv_cc_double_expbit0_word >= 0 and
+ gl_cv_cc_double_expbit0_bit >= 0)
+ glib_conf.set('DBL_EXPBIT0_WORD', gl_cv_cc_double_expbit0_word)
+ glib_conf.set('DBL_EXPBIT0_BIT', gl_cv_cc_double_expbit0_bit)
+ endif
+
+ if not gl_cv_func_printf_precision
+ glib_conf.set('NEED_PRINTF_UNBOUNDED_PRECISION', 1)
+ endif
+
+ if not gl_cv_func_printf_enomem
+ glib_conf.set('NEED_PRINTF_ENOMEM', 1)
+ endif
+
+ if not gl_cv_func_printf_flag_leftadjust
+ glib_conf.set('NEED_PRINTF_FLAG_LEFTADJUST', 1)
+ endif
+
+ if not gl_cv_func_printf_flag_zero
+ glib_conf.set('NEED_PRINTF_FLAG_ZERO', 1)
+ endif
+
+ if not gl_cv_func_printf_flag_grouping
+ glib_conf.set('NEED_PRINTF_FLAG_GROUPING', 1)
+ endif
+
+ if not gl_cv_func_printf_directive_a
+ glib_conf.set('NEED_PRINTF_DIRECTIVE_A', 1)
+ endif
+
+ if not gl_cv_func_printf_directive_f
+ glib_conf.set('NEED_PRINTF_DIRECTIVE_F', 1)
+ endif
+
+ if not gl_cv_func_printf_directive_ls
+ glib_conf.set('NEED_PRINTF_DIRECTIVE_LS', 1)
+ endif
+
+ if (not gl_cv_func_printf_precision or
+ not gl_cv_func_printf_enomem)
+ glib_conf.set('NEED_PRINTF_DOUBLE', 1)
+ glib_conf.set('NEED_PRINTF_LONG_DOUBLE', 1)
+ endif
+
+ if not gl_cv_func_printf_infinite
+ glib_conf.set('NEED_PRINTF_INFINITE_DOUBLE', 1)
+ endif
+
+ if gl_cv_func_printf_long_double and gl_cv_func_printf_infinite_long_double != 'false'
+ glib_conf.set('NEED_PRINTF_INFINITE_LONG_DOUBLE', 1)
+ endif
+
subdir('gnulib')
gnulib_objects = [gnulib_lib.extract_all_objects()]
endif
@@ -270,7 +357,7 @@ libglib = library('glib-2.0',
# intl.lib is not compatible with SAFESEH
link_args : [noseh_link_args, glib_link_flags, win32_ldflags],
include_directories : configinc,
- dependencies : pcre_deps + [thread_dep, libintl, librt] + libiconv + platform_deps,
+ dependencies : pcre_deps + [thread_dep, libintl, librt] + libiconv + platform_deps + gnulib_libm_dependency,
c_args : glib_c_args,
objc_args : glib_c_args,
)
@@ -327,6 +414,7 @@ if host_system == 'windows'
else
gtester = executable('gtester', 'gtester.c',
install : true,
+ c_args : ['-UG_DISABLE_ASSERT'],
include_directories : configinc,
dependencies : [libglib_dep])
endif
diff --git a/glib/tests/asyncqueue.c b/glib/tests/asyncqueue.c
index 4a81d230c..fbd6dbc54 100644
--- a/glib/tests/asyncqueue.c
+++ b/glib/tests/asyncqueue.c
@@ -58,7 +58,7 @@ void test_async_queue_sort (void)
g_assert_cmpint (GPOINTER_TO_INT (g_async_queue_pop (q)), ==, 8);
g_assert_cmpint (GPOINTER_TO_INT (g_async_queue_pop (q)), ==, 10);
- g_assert (g_async_queue_try_pop (q) == NULL);
+ g_assert_null (g_async_queue_try_pop (q));
g_async_queue_unref (q);
}
@@ -78,18 +78,18 @@ test_async_queue_destroy (void)
q = g_async_queue_new_full (destroy_notify);
- g_assert (destroy_count == 0);
+ g_assert_cmpint (destroy_count, ==, 0);
g_async_queue_push (q, GINT_TO_POINTER (1));
g_async_queue_push (q, GINT_TO_POINTER (1));
g_async_queue_push (q, GINT_TO_POINTER (1));
g_async_queue_push (q, GINT_TO_POINTER (1));
- g_assert (g_async_queue_length (q) == 4);
+ g_assert_cmpint (g_async_queue_length (q), ==, 4);
g_async_queue_unref (q);
- g_assert (destroy_count == 4);
+ g_assert_cmpint (destroy_count, ==, 4);
}
static GAsyncQueue *q;
@@ -183,7 +183,7 @@ test_async_queue_timed (void)
start = g_get_monotonic_time ();
val = g_async_queue_timeout_pop (q, G_USEC_PER_SEC / 10);
- g_assert (val == NULL);
+ g_assert_null (val);
end = g_get_monotonic_time ();
diff = end - start;
@@ -197,7 +197,7 @@ test_async_queue_timed (void)
g_get_current_time (&tv);
g_time_val_add (&tv, G_USEC_PER_SEC / 10);
val = g_async_queue_timed_pop (q, &tv);
- g_assert (val == NULL);
+ g_assert_null (val);
end = g_get_monotonic_time ();
diff = end - start;
@@ -210,7 +210,7 @@ test_async_queue_timed (void)
g_async_queue_lock (q);
val = g_async_queue_timed_pop_unlocked (q, &tv);
g_async_queue_unlock (q);
- g_assert (val == NULL);
+ g_assert_null (val);
end = g_get_monotonic_time ();
diff = end - start;
@@ -238,7 +238,7 @@ test_async_queue_remove (void)
g_assert_cmpint (GPOINTER_TO_INT (g_async_queue_pop (q)), ==, 2);
g_assert_cmpint (GPOINTER_TO_INT (g_async_queue_pop (q)), ==, 1);
- g_assert (g_async_queue_try_pop (q) == NULL);
+ g_assert_null (g_async_queue_try_pop (q));
g_async_queue_unref (q);
}
@@ -261,7 +261,7 @@ test_async_queue_push_front (void)
g_assert_cmpint (GPOINTER_TO_INT (g_async_queue_pop (q)), ==, 2);
g_assert_cmpint (GPOINTER_TO_INT (g_async_queue_pop (q)), ==, 7);
- g_assert (g_async_queue_try_pop (q) == NULL);
+ g_assert_null (g_async_queue_try_pop (q));
g_async_queue_unref (q);
}
diff --git a/glib/tests/date.c b/glib/tests/date.c
index ff13ad101..8eb28712b 100644
--- a/glib/tests/date.c
+++ b/glib/tests/date.c
@@ -388,7 +388,7 @@ test_month_names (void)
TEST_DATE ( 1, 4, 2018, "%OB %Y", "Απρίλιος 2018");
TEST_DATE ( 1, 5, 2018, "%OB %Y", "Μάιος 2018");
TEST_DATE ( 1, 6, 2018, "%OB %Y", "Ιούνιος 2018");
- TEST_DATE (16, 7, 2018, "%e %b %Y", "16 Ιουλ 2018");
+ TEST_DATE (16, 7, 2018, "%e %b %Y", "16 Ιούλ 2018");
TEST_DATE ( 1, 8, 2018, "%Ob %Y", "Αύγ 2018");
}
else
diff --git a/glib/tests/fileutils.c b/glib/tests/fileutils.c
index b4ca2d3c7..34f650247 100644
--- a/glib/tests/fileutils.c
+++ b/glib/tests/fileutils.c
@@ -889,6 +889,7 @@ test_stdio_wrappers (void)
struct utimbuf ut;
GError *error = NULL;
GStatBuf path_statbuf, cwd_statbuf;
+ time_t now;
/* The permissions tests here don’t work when running as root. */
#ifdef G_OS_UNIX
@@ -958,14 +959,16 @@ test_stdio_wrappers (void)
g_assert_cmpint (ret, ==, 0);
#endif
- ut.actime = ut.modtime = (time_t)0;
+ now = time (NULL);
+
+ ut.actime = ut.modtime = now;
ret = g_utime ("test-create", &ut);
g_assert_cmpint (ret, ==, 0);
ret = g_lstat ("test-create", &buf);
g_assert_cmpint (ret, ==, 0);
- g_assert_cmpint (buf.st_atime, ==, (time_t)0);
- g_assert_cmpint (buf.st_mtime, ==, (time_t)0);
+ g_assert_cmpint (buf.st_atime, ==, now);
+ g_assert_cmpint (buf.st_mtime, ==, now);
g_chdir ("..");
g_remove ("mkdir-test/test-create");
@@ -1153,6 +1156,233 @@ test_win32_pathstrip (void)
}
}
+#define g_assert_memcmp(m1, cmp, m2, memlen, m1hex, m2hex, testcase_num) \
+G_STMT_START { \
+ if (memcmp (m1, m2, memlen) cmp 0); else \
+ g_assertion_message_cmpstr (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \
+ #m1hex " " #cmp " " #m2hex, m1hex, #cmp, m2hex); \
+} G_STMT_END
+
+static gchar *
+to_hex (const guchar *buf,
+ gsize len)
+{
+ gsize i;
+ GString *s = g_string_new (NULL);
+ if (len > 0)
+ g_string_append_printf (s, "%02x", buf[0]);
+ for (i = 1; i < len; i++)
+ g_string_append_printf (s, " %02x", buf[i]);
+ return g_string_free (s, FALSE);
+}
+
+static void
+test_win32_zero_terminate_symlink (void)
+{
+ gsize i;
+#define TESTCASE(data, len_mod, use_buf, buf_size, terminate, reported_len, returned_string) \
+ { (const guchar *) data, wcslen (data) * 2 + len_mod, use_buf, buf_size, terminate, reported_len, (guchar *) returned_string},
+
+ struct
+ {
+ const guchar *data;
+ gsize data_size;
+ gboolean use_buf;
+ gsize buf_size;
+ gboolean terminate;
+ int reported_len;
+ const guchar *returned_string;
+ } testcases[] = {
+ TESTCASE (L"foobar", +2, TRUE, 12 + 4, FALSE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 3, FALSE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 2, FALSE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 1, FALSE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 0, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 - 1, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", +2, TRUE, 12 - 2, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 - 3, FALSE, 12 - 3, "f\0o\0o\0b\0a")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 4, FALSE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 3, FALSE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 2, FALSE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 1, FALSE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 0, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 - 1, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", +1, TRUE, 12 - 2, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 - 3, FALSE, 12 - 3, "f\0o\0o\0b\0a")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 4, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 3, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 2, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 1, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 0, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 - 1, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", +0, TRUE, 12 - 2, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 - 3, FALSE, 12 - 3, "f\0o\0o\0b\0a")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 3, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 2, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 1, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 0, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 1, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 2, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 3, FALSE, 12 - 3, "f\0o\0o\0b\0a")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 4, FALSE, 12 - 4, "f\0o\0o\0b\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 + 2, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 + 1, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 + 0, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 1, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 2, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 3, FALSE, 12 - 3, "f\0o\0o\0b\0a")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 4, FALSE, 12 - 4, "f\0o\0o\0b\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 5, FALSE, 12 - 5, "f\0o\0o\0b")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 4, TRUE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 3, TRUE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 2, TRUE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 1, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 + 0, TRUE, 12 + 0, "f\0o\0o\0b\0a\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 - 1, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 - 2, TRUE, 12 - 2, "f\0o\0o\0b\0\0\0")
+ TESTCASE (L"foobar", +2, TRUE, 12 - 3, TRUE, 12 - 3, "f\0o\0o\0b\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 4, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 3, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 2, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 1, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 + 0, TRUE, 12 + 0, "f\0o\0o\0b\0a\0\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 - 1, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 - 2, TRUE, 12 - 2, "f\0o\0o\0b\0\0\0")
+ TESTCASE (L"foobar", +1, TRUE, 12 - 3, TRUE, 12 - 3, "f\0o\0o\0b\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 4, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 3, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 2, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 1, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 + 0, TRUE, 12 + 0, "f\0o\0o\0b\0a\0\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 - 1, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 - 2, TRUE, 12 - 2, "f\0o\0o\0b\0\0\0")
+ TESTCASE (L"foobar", +0, TRUE, 12 - 3, TRUE, 12 - 3, "f\0o\0o\0b\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 3, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 2, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 1, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 + 0, TRUE, 12 + 0, "f\0o\0o\0b\0a\0\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 1, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 2, TRUE, 12 - 2, "f\0o\0o\0b\0\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 3, TRUE, 12 - 3, "f\0o\0o\0b\0\0")
+ TESTCASE (L"foobar", -1, TRUE, 12 - 4, TRUE, 12 - 4, "f\0o\0o\0\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 + 2, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 + 1, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 + 0, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 1, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 2, TRUE, 12 - 2, "f\0o\0o\0b\0\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 3, TRUE, 12 - 3, "f\0o\0o\0b\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 4, TRUE, 12 - 4, "f\0o\0o\0\0\0")
+ TESTCASE (L"foobar", -2, TRUE, 12 - 5, TRUE, 12 - 5, "f\0o\0o\0\0")
+ TESTCASE (L"foobar", +2, FALSE, 0, FALSE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +1, FALSE, 0, FALSE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +0, FALSE, 0, FALSE, 12 + 0, "f\0o\0o\0b\0a\0r\0")
+ TESTCASE (L"foobar", -1, FALSE, 0, FALSE, 12 - 1, "f\0o\0o\0b\0a\0r")
+ TESTCASE (L"foobar", -2, FALSE, 0, FALSE, 12 - 2, "f\0o\0o\0b\0a\0")
+ TESTCASE (L"foobar", +2, FALSE, 0, TRUE, 12 + 2, "f\0o\0o\0b\0a\0r\0\0\0")
+ TESTCASE (L"foobar", +1, FALSE, 0, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", +0, FALSE, 0, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", -1, FALSE, 0, TRUE, 12 + 1, "f\0o\0o\0b\0a\0r\0\0")
+ TESTCASE (L"foobar", -2, FALSE, 0, TRUE, 12 - 1, "f\0o\0o\0b\0a\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 4, FALSE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 3, FALSE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 2, FALSE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 1, FALSE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 0, FALSE, 2 + 0, "x\0")
+ TESTCASE (L"x", +2, TRUE, 2 - 1, FALSE, 2 - 1, "x")
+ TESTCASE (L"x", +2, TRUE, 2 - 2, FALSE, 2 - 2, "")
+ TESTCASE (L"x", +1, TRUE, 2 + 3, FALSE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +1, TRUE, 2 + 2, FALSE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +1, TRUE, 2 + 1, FALSE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +1, TRUE, 2 + 0, FALSE, 2 + 0, "x\0")
+ TESTCASE (L"x", +1, TRUE, 2 - 1, FALSE, 2 - 1, "x")
+ TESTCASE (L"x", +1, TRUE, 2 - 2, FALSE, 2 - 2, "")
+ TESTCASE (L"x", +0, TRUE, 2 + 2, FALSE, 2 + 0, "x\0")
+ TESTCASE (L"x", +0, TRUE, 2 + 1, FALSE, 2 + 0, "x\0")
+ TESTCASE (L"x", +0, TRUE, 2 + 0, FALSE, 2 + 0, "x\0")
+ TESTCASE (L"x", +0, TRUE, 2 - 1, FALSE, 2 - 1, "x")
+ TESTCASE (L"x", +0, TRUE, 2 - 2, FALSE, 2 - 2, "")
+ TESTCASE (L"x", -1, TRUE, 2 + 1, FALSE, 2 - 1, "x")
+ TESTCASE (L"x", -1, TRUE, 2 + 0, FALSE, 2 - 1, "x")
+ TESTCASE (L"x", -1, TRUE, 2 - 1, FALSE, 2 - 1, "x")
+ TESTCASE (L"x", -1, TRUE, 2 - 2, FALSE, 2 - 2, "")
+ TESTCASE (L"x", -2, TRUE, 2 + 0, FALSE, 2 - 2, "")
+ TESTCASE (L"x", -2, TRUE, 2 - 1, FALSE, 2 - 2, "")
+ TESTCASE (L"x", -2, TRUE, 2 - 2, FALSE, 2 - 2, "")
+ TESTCASE (L"x", +2, TRUE, 2 + 4, TRUE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 3, TRUE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 2, TRUE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 1, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 + 0, TRUE, 2 + 0, "\0\0")
+ TESTCASE (L"x", +2, TRUE, 2 - 1, TRUE, 2 - 1, "\0")
+ TESTCASE (L"x", +2, TRUE, 2 - 2, TRUE, 2 - 2, "")
+ TESTCASE (L"x", +1, TRUE, 2 + 3, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +1, TRUE, 2 + 2, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +1, TRUE, 2 + 1, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +1, TRUE, 2 + 0, TRUE, 2 + 0, "\0\0")
+ TESTCASE (L"x", +1, TRUE, 2 - 1, TRUE, 2 - 1, "\0")
+ TESTCASE (L"x", +1, TRUE, 2 - 2, TRUE, 2 - 2, "")
+ TESTCASE (L"x", +0, TRUE, 2 + 2, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +0, TRUE, 2 + 1, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +0, TRUE, 2 + 0, TRUE, 2 + 0, "\0\0")
+ TESTCASE (L"x", +0, TRUE, 2 - 1, TRUE, 2 - 1, "\0")
+ TESTCASE (L"x", +0, TRUE, 2 - 2, TRUE, 2 - 2, "")
+ TESTCASE (L"x", -1, TRUE, 2 + 1, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", -1, TRUE, 2 + 0, TRUE, 2 + 0, "\0\0")
+ TESTCASE (L"x", -1, TRUE, 2 - 1, TRUE, 2 - 1, "\0")
+ TESTCASE (L"x", -1, TRUE, 2 - 2, TRUE, 2 - 2, "")
+ TESTCASE (L"x", -2, TRUE, 2 + 0, TRUE, 2 - 2, "")
+ TESTCASE (L"x", -2, TRUE, 2 - 1, TRUE, 2 - 2, "")
+ TESTCASE (L"x", -2, TRUE, 2 - 2, TRUE, 2 - 2, "")
+ TESTCASE (L"x", +2, FALSE, 0, FALSE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +1, FALSE, 0, FALSE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +0, FALSE, 0, FALSE, 2 + 0, "x\0")
+ TESTCASE (L"x", -1, FALSE, 0, FALSE, 2 - 1, "x")
+ TESTCASE (L"x", -2, FALSE, 0, FALSE, 2 - 2, "")
+ TESTCASE (L"x", +2, FALSE, 0, TRUE, 2 + 2, "x\0\0\0")
+ TESTCASE (L"x", +1, FALSE, 0, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", +0, FALSE, 0, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", -1, FALSE, 0, TRUE, 2 + 1, "x\0\0")
+ TESTCASE (L"x", -2, FALSE, 0, TRUE, 2 - 2, "")
+ { 0, },
+ };
+#undef TESTCASE
+
+ for (i = 0; testcases[i].data != NULL; i++)
+ {
+ gunichar2 *buf;
+ int result;
+ gchar *buf_hex, *expected_hex;
+ if (testcases[i].use_buf)
+ buf = g_malloc0 (testcases[i].buf_size + 1); /* +1 to ensure it succeeds with buf_size == 0 */
+ else
+ buf = NULL;
+ result = _g_win32_copy_and_maybe_terminate (testcases[i].data,
+ testcases[i].data_size,
+ testcases[i].use_buf ? buf : NULL,
+ testcases[i].buf_size,
+ testcases[i].use_buf ? NULL : &buf,
+ testcases[i].terminate);
+ if (testcases[i].reported_len != result)
+ g_error ("Test %" G_GSIZE_FORMAT " failed, result %d != %d", i, result, testcases[i].reported_len);
+ if (buf == NULL && testcases[i].buf_size != 0)
+ g_error ("Test %" G_GSIZE_FORMAT " failed, buf == NULL", i);
+ g_assert_cmpint (testcases[i].reported_len, ==, result);
+ if ((testcases[i].use_buf && testcases[i].buf_size != 0) ||
+ (!testcases[i].use_buf && testcases[i].reported_len != 0))
+ {
+ g_assert_nonnull (buf);
+ buf_hex = to_hex ((const guchar *) buf, result);
+ expected_hex = to_hex (testcases[i].returned_string, testcases[i].reported_len);
+ if (memcmp (buf, testcases[i].returned_string, result) != 0)
+ g_error ("Test %" G_GSIZE_FORMAT " failed:\n%s !=\n%s", i, buf_hex, expected_hex);
+ g_assert_memcmp (buf, ==, testcases[i].returned_string, testcases[i].reported_len, buf_hex, expected_hex, testcases[i].line);
+ g_free (buf_hex);
+ g_free (expected_hex);
+ }
+ g_free (buf);
+ }
+}
+
#endif
int
@@ -1166,6 +1396,7 @@ main (int argc,
#ifdef G_OS_WIN32
g_test_add_func ("/fileutils/stdio-win32-pathstrip", test_win32_pathstrip);
+ g_test_add_func ("/fileutils/stdio-win32-zero-terminate-symlink", test_win32_zero_terminate_symlink);
#endif
g_test_add_func ("/fileutils/build-path", test_build_path);
g_test_add_func ("/fileutils/build-pathv", test_build_pathv);
diff --git a/glib/tests/gdatetime.c b/glib/tests/gdatetime.c
index 8178e2205..00e22181e 100644
--- a/glib/tests/gdatetime.c
+++ b/glib/tests/gdatetime.c
@@ -490,9 +490,6 @@ test_GDateTime_new_from_iso8601 (void)
dt = g_date_time_new_from_iso8601 ("not a date", NULL);
g_assert_null (dt);
- dt = g_date_time_new_from_iso8601 (" +55", 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);
diff --git a/glib/tests/gvariant.c b/glib/tests/gvariant.c
index e5aec25bf..ce413bedf 100644
--- a/glib/tests/gvariant.c
+++ b/glib/tests/gvariant.c
@@ -3899,6 +3899,17 @@ test_parses (void)
g_free (printed);
}
+ /* pattern coalese of `MN` and `*` is `MN` */
+ {
+ GVariant *value = NULL;
+ GError *error = NULL;
+
+ value = g_variant_parse (NULL, "[[0], [], [nothing]]", NULL, NULL, &error);
+ g_assert_no_error (error);
+ g_assert_cmpstr (g_variant_get_type_string (value), ==, "aami");
+ g_variant_unref (value);
+ }
+
#ifndef _MSC_VER
/* inf/nan strings are C99 features which Visual C++ does not support */
/* inf/nan mini test */
@@ -3943,7 +3954,6 @@ test_parse_failures (void)
"[4, 5, '']", "1-2,7-9:", "common type",
"[[4], [], ['']]", "1-4,10-14:", "common type",
"[[], [4], ['']]", "5-8,10-14:", "common type",
- "[[0], [], [nothing]]", "10-19:", "common type",
"just", "4:", "expected value",
"nothing", "0-7:", "unable to infer",
"just [4, '']", "6-7,9-11:", "common type",
diff --git a/glib/tests/hash.c b/glib/tests/hash.c
index 16acbbf2a..6b0197101 100644
--- a/glib/tests/hash.c
+++ b/glib/tests/hash.c
@@ -183,7 +183,7 @@ static guint
honeyman_hash (gconstpointer key)
{
const gchar *name = (const gchar *) key;
- gint size;
+ gsize size;
guint sum = 0;
g_assert (name != NULL);
@@ -1347,7 +1347,7 @@ test_lookup_extended (void)
struct _GHashTable
{
- gint size;
+ gsize size;
gint mod;
guint mask;
gint nnodes;
@@ -1374,7 +1374,7 @@ struct _GHashTable
static void
count_keys (GHashTable *h, gint *unused, gint *occupied, gint *tombstones)
{
- gint i;
+ gsize i;
*unused = 0;
*occupied = 0;
@@ -1410,7 +1410,7 @@ fetch_key_or_value (gpointer a, guint index, gboolean is_big)
static void
check_data (GHashTable *h)
{
- gint i;
+ gsize i;
for (i = 0; i < h->size; i++)
{
diff --git a/glib/tests/mainloop.c b/glib/tests/mainloop.c
index cf114fd40..e46357ae3 100644
--- a/glib/tests/mainloop.c
+++ b/glib/tests/mainloop.c
@@ -60,35 +60,35 @@ test_maincontext_basic (void)
ctx = g_main_context_new ();
- g_assert (!g_main_context_pending (ctx));
- g_assert (!g_main_context_iteration (ctx, FALSE));
+ g_assert_false (g_main_context_pending (ctx));
+ g_assert_false (g_main_context_iteration (ctx, FALSE));
source = g_source_new (&funcs, sizeof (GSource));
g_assert_cmpint (g_source_get_priority (source), ==, G_PRIORITY_DEFAULT);
- g_assert (!g_source_is_destroyed (source));
+ g_assert_false (g_source_is_destroyed (source));
- g_assert (!g_source_get_can_recurse (source));
- g_assert (g_source_get_name (source) == NULL);
+ g_assert_false (g_source_get_can_recurse (source));
+ g_assert_null (g_source_get_name (source));
g_source_set_can_recurse (source, TRUE);
g_source_set_name (source, "d");
- g_assert (g_source_get_can_recurse (source));
+ g_assert_true (g_source_get_can_recurse (source));
g_assert_cmpstr (g_source_get_name (source), ==, "d");
- g_assert (g_main_context_find_source_by_user_data (ctx, NULL) == NULL);
- g_assert (g_main_context_find_source_by_funcs_user_data (ctx, &funcs, NULL) == NULL);
+ g_assert_null (g_main_context_find_source_by_user_data (ctx, NULL));
+ g_assert_null (g_main_context_find_source_by_funcs_user_data (ctx, &funcs, NULL));
id = g_source_attach (source, ctx);
g_assert_cmpint (g_source_get_id (source), ==, id);
- g_assert (g_main_context_find_source_by_id (ctx, id) == source);
+ g_assert_true (g_main_context_find_source_by_id (ctx, id) == source);
g_source_set_priority (source, G_PRIORITY_HIGH);
g_assert_cmpint (g_source_get_priority (source), ==, G_PRIORITY_HIGH);
g_source_destroy (source);
- g_assert (g_source_get_context (source) == ctx);
- g_assert (g_main_context_find_source_by_id (ctx, id) == NULL);
+ g_assert_true (g_source_get_context (source) == ctx);
+ g_assert_null (g_main_context_find_source_by_id (ctx, id));
g_main_context_unref (ctx);
@@ -96,7 +96,7 @@ test_maincontext_basic (void)
{
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL,
"*assertion*source->context != NULL*failed*");
- g_assert (g_source_get_context (source) == NULL);
+ g_assert_null (g_source_get_context (source));
g_test_assert_expected_messages ();
}
@@ -110,19 +110,19 @@ test_maincontext_basic (void)
g_source_unref (source);
g_source_set_name_by_id (id, "e");
g_assert_cmpstr (g_source_get_name (source), ==, "e");
- g_assert (g_source_get_context (source) == ctx);
- g_assert (g_source_remove_by_funcs_user_data (&funcs, data));
+ g_assert_true (g_source_get_context (source) == ctx);
+ g_assert_true (g_source_remove_by_funcs_user_data (&funcs, data));
source = g_source_new (&funcs, sizeof (GSource));
g_source_set_funcs (source, &funcs);
g_source_set_callback (source, cb, data, NULL);
id = g_source_attach (source, ctx);
g_source_unref (source);
- g_assert (g_source_remove_by_user_data (data));
- g_assert (!g_source_remove_by_user_data ((gpointer)0x1234));
+ g_assert_true (g_source_remove_by_user_data (data));
+ g_assert_false (g_source_remove_by_user_data ((gpointer)0x1234));
g_idle_add (cb, data);
- g_assert (g_idle_remove_by_data (data));
+ g_assert_true (g_idle_remove_by_data (data));
}
static void
@@ -133,12 +133,12 @@ test_mainloop_basic (void)
loop = g_main_loop_new (NULL, FALSE);
- g_assert (!g_main_loop_is_running (loop));
+ g_assert_false (g_main_loop_is_running (loop));
g_main_loop_ref (loop);
ctx = g_main_loop_get_context (loop);
- g_assert (ctx == g_main_context_default ());
+ g_assert_true (ctx == g_main_context_default ());
g_main_loop_unref (loop);
@@ -233,24 +233,24 @@ test_priorities (void)
g_source_attach (sourceb, ctx);
g_source_unref (sourceb);
- g_assert (g_main_context_pending (ctx));
- g_assert (g_main_context_iteration (ctx, FALSE));
+ g_assert_true (g_main_context_pending (ctx));
+ g_assert_true (g_main_context_iteration (ctx, FALSE));
g_assert_cmpint (a, ==, 0);
g_assert_cmpint (b, ==, 1);
- g_assert (g_main_context_iteration (ctx, FALSE));
+ g_assert_true (g_main_context_iteration (ctx, FALSE));
g_assert_cmpint (a, ==, 0);
g_assert_cmpint (b, ==, 2);
g_source_destroy (sourceb);
- g_assert (g_main_context_iteration (ctx, FALSE));
+ g_assert_true (g_main_context_iteration (ctx, FALSE));
g_assert_cmpint (a, ==, 1);
g_assert_cmpint (b, ==, 2);
- g_assert (g_main_context_pending (ctx));
+ g_assert_true (g_main_context_pending (ctx));
g_source_destroy (sourcea);
- g_assert (!g_main_context_pending (ctx));
+ g_assert_false (g_main_context_pending (ctx));
g_main_context_unref (ctx);
}
@@ -271,7 +271,7 @@ static gboolean
func (gpointer data)
{
if (data != NULL)
- g_assert (data == g_thread_self ());
+ g_assert_true (data == g_thread_self ());
count++;
@@ -706,12 +706,12 @@ timeout1_callback (gpointer user_data)
gint64 mtime1, mtime2, time2;
source = g_main_current_source ();
- g_assert (source == data->timeout1);
+ g_assert_true (source == data->timeout1);
if (data->time1 == -1)
{
/* First iteration */
- g_assert (!g_source_is_destroyed (data->timeout2));
+ g_assert_false (g_source_is_destroyed (data->timeout2));
mtime1 = g_get_monotonic_time ();
data->time1 = g_source_get_time (source);
@@ -733,7 +733,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
GTimeVal tv;
/* Second iteration */
- g_assert (g_source_is_destroyed (data->timeout2));
+ g_assert_true (g_source_is_destroyed (data->timeout2));
/* g_source_get_time() MAY change between iterations; in this
* case we know for sure that it did because of the g_usleep()
@@ -746,9 +746,9 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
g_source_get_current_time (source, &tv);
G_GNUC_END_IGNORE_DEPRECATIONS
- g_assert (tv.tv_sec > data->tv.tv_sec ||
- (tv.tv_sec == data->tv.tv_sec &&
- tv.tv_usec > data->tv.tv_usec));
+ g_assert_true (tv.tv_sec > data->tv.tv_sec ||
+ (tv.tv_sec == data->tv.tv_sec &&
+ tv.tv_usec > data->tv.tv_usec));
g_main_loop_quit (data->loop);
}
@@ -764,9 +764,9 @@ timeout2_callback (gpointer user_data)
gint64 time2, time3;
source = g_main_current_source ();
- g_assert (source == data->timeout2);
+ g_assert_true (source == data->timeout2);
- g_assert (!g_source_is_destroyed (data->timeout1));
+ g_assert_false (g_source_is_destroyed (data->timeout1));
/* g_source_get_time() does not change between different sources in
* a single iteration of the mainloop.
@@ -804,8 +804,8 @@ test_source_time (void)
g_main_loop_run (data.loop);
- g_assert (!g_source_is_destroyed (data.timeout1));
- g_assert (g_source_is_destroyed (data.timeout2));
+ g_assert_false (g_source_is_destroyed (data.timeout1));
+ g_assert_true (g_source_is_destroyed (data.timeout2));
g_source_destroy (data.timeout1);
g_source_unref (data.timeout1);
@@ -833,9 +833,9 @@ on_source_fired_cb (gpointer user_data)
current_source = g_main_current_source ();
current_context = g_source_get_context (current_source);
source_id = g_source_get_id (current_source);
- g_assert (g_main_context_find_source_by_id (current_context, source_id) != NULL);
+ g_assert_nonnull (g_main_context_find_source_by_id (current_context, source_id));
g_source_destroy (current_source);
- g_assert (g_main_context_find_source_by_id (current_context, source_id) == NULL);
+ g_assert_null (g_main_context_find_source_by_id (current_context, source_id));
if (data->outstanding_ops == 0)
g_main_loop_quit (data->loop);
@@ -945,7 +945,7 @@ test_ready_time (void)
/* A source with no ready time set should not fire */
g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
while (g_main_context_iteration (NULL, FALSE));
- g_assert (!ready_time_dispatched);
+ g_assert_false (ready_time_dispatched);
/* The ready time should not have been changed */
g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
@@ -959,21 +959,21 @@ test_ready_time (void)
*/
g_source_set_ready_time (source, g_get_monotonic_time () + G_TIME_SPAN_DAY);
while (g_main_context_iteration (NULL, FALSE));
- g_assert (!ready_time_dispatched);
+ g_assert_false (ready_time_dispatched);
/* Make sure it didn't get reset */
g_assert_cmpint (g_source_get_ready_time (source), !=, -1);
/* Ready time of -1 -> don't fire */
g_source_set_ready_time (source, -1);
while (g_main_context_iteration (NULL, FALSE));
- g_assert (!ready_time_dispatched);
+ g_assert_false (ready_time_dispatched);
/* Not reset, but should still be -1 from above */
g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
/* A ready time of the current time should fire immediately */
g_source_set_ready_time (source, g_get_monotonic_time ());
while (g_main_context_iteration (NULL, FALSE));
- g_assert (ready_time_dispatched);
+ g_assert_true (ready_time_dispatched);
ready_time_dispatched = FALSE;
/* Should have gotten reset by the handler function */
g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
@@ -981,14 +981,14 @@ test_ready_time (void)
/* As well as one in the recent past... */
g_source_set_ready_time (source, g_get_monotonic_time () - G_TIME_SPAN_SECOND);
while (g_main_context_iteration (NULL, FALSE));
- g_assert (ready_time_dispatched);
+ g_assert_true (ready_time_dispatched);
ready_time_dispatched = FALSE;
g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
/* Zero is the 'official' way to get a source to fire immediately */
g_source_set_ready_time (source, 0);
while (g_main_context_iteration (NULL, FALSE));
- g_assert (ready_time_dispatched);
+ g_assert_true (ready_time_dispatched);
ready_time_dispatched = FALSE;
g_assert_cmpint (g_source_get_ready_time (source), ==, -1);
@@ -1126,7 +1126,7 @@ write_bytes (gint fd,
return FALSE;
/* Detect if we run before we should */
- g_assert (*to_write >= 0);
+ g_assert_cmpint (*to_write, >=, 0);
limit = MIN (*to_write, sizeof zeros);
*to_write -= write (fd, zeros, limit);
@@ -1163,7 +1163,7 @@ test_unix_fd (void)
GSource *source_b;
s = pipe (fds);
- g_assert (s == 0);
+ g_assert_cmpint (s, ==, 0);
to_read = fill_a_pipe (fds[1]);
/* write at higher priority to keep the pipe full... */
@@ -1192,17 +1192,17 @@ test_unix_fd (void)
/* Since the sources are at different priority, only one of them
* should possibly have run.
*/
- g_assert (to_write == to_write_was || to_read == to_read_was);
+ g_assert_true (to_write == to_write_was || to_read == to_read_was);
}
- g_assert (to_write == 0);
- g_assert (to_read == 0);
+ g_assert_cmpint (to_write, ==, 0);
+ g_assert_cmpint (to_read, ==, 0);
/* 'a' is already removed by itself */
- g_assert (g_source_is_destroyed (source_a));
+ g_assert_true (g_source_is_destroyed (source_a));
g_source_unref (source_a);
g_source_remove (b);
- g_assert (g_source_is_destroyed (source_b));
+ g_assert_true (g_source_is_destroyed (source_b));
g_source_unref (source_b);
close (fds[1]);
close (fds[0]);
@@ -1227,10 +1227,10 @@ assert_main_context_state (gint n_to_poll,
context = g_main_context_default ();
acquired = g_main_context_acquire (context);
- g_assert (acquired);
+ g_assert_true (acquired);
immediate = g_main_context_prepare (context, &max_priority);
- g_assert (!immediate);
+ g_assert_false (immediate);
n = g_main_context_query (context, max_priority, &timeout, poll_fds, 10);
g_assert_cmpint (n, ==, n_to_poll + 1); /* one will be the gwakeup */
@@ -1290,7 +1290,7 @@ test_unix_fd_source (void)
assert_main_context_state (0);
s = pipe (fds);
- g_assert (s == 0);
+ g_assert_cmpint (s, ==, 0);
source = g_unix_fd_source_new (fds[1], G_IO_OUT);
g_source_attach (source, NULL);
@@ -1301,7 +1301,7 @@ test_unix_fd_source (void)
g_test_expect_message ("GLib", G_LOG_LEVEL_WARNING, "*GUnixFDSource dispatched without callback*");
while (g_main_context_iteration (NULL, FALSE));
g_test_assert_expected_messages ();
- g_assert (g_source_is_destroyed (source));
+ g_assert_true (g_source_is_destroyed (source));
g_source_unref (source);
out = in = FALSE;
@@ -1324,7 +1324,7 @@ test_unix_fd_source (void)
g_source_attach (out_source, NULL);
assert_main_context_state (1,
fds[1], G_IO_OUT, 0);
- g_assert (!in && !out);
+ g_assert_true (!in && !out);
in_source = g_unix_fd_source_new (fds[0], G_IO_IN);
g_source_set_callback (in_source, (GSourceFunc) flag_bool, &in, NULL);
@@ -1334,7 +1334,7 @@ test_unix_fd_source (void)
fds[0], G_IO_IN, G_IO_IN,
fds[1], G_IO_OUT, G_IO_OUT);
/* out is higher priority so only it should fire */
- g_assert (!in && out);
+ g_assert_true (!in && out);
/* raise the priority of the in source to higher than out*/
in = out = FALSE;
@@ -1342,7 +1342,7 @@ test_unix_fd_source (void)
assert_main_context_state (2,
fds[0], G_IO_IN, G_IO_IN,
fds[1], G_IO_OUT, G_IO_OUT);
- g_assert (in && !out);
+ g_assert_true (in && !out);
/* now, let them be equal */
in = out = FALSE;
@@ -1350,7 +1350,7 @@ test_unix_fd_source (void)
assert_main_context_state (2,
fds[0], G_IO_IN, G_IO_IN,
fds[1], G_IO_OUT, G_IO_OUT);
- g_assert (in && out);
+ g_assert_true (in && out);
g_source_destroy (out_source);
g_source_unref (out_source);
@@ -1376,8 +1376,8 @@ return_true (GSource *source, GSourceFunc callback, gpointer user_data)
return TRUE;
}
-#define assert_flagged(s) g_assert (((FlagSource *) (s))->flagged);
-#define assert_not_flagged(s) g_assert (!((FlagSource *) (s))->flagged);
+#define assert_flagged(s) g_assert_true (((FlagSource *) (s))->flagged);
+#define assert_not_flagged(s) g_assert_true (!((FlagSource *) (s))->flagged);
#define clear_flag(s) ((FlagSource *) (s))->flagged = 0
static void
@@ -1505,7 +1505,7 @@ test_unix_file_poll (void)
GMainLoop *loop;
fd = open ("/dev/null", O_RDONLY);
- g_assert (fd >= 0);
+ g_assert_cmpint (fd, >=, 0);
loop = g_main_loop_new (NULL, FALSE);
@@ -1537,8 +1537,8 @@ timeout_cb (gpointer data)
GMainContext *context;
context = g_main_loop_get_context (loop);
- g_assert (g_main_loop_is_running (loop));
- g_assert (g_main_context_is_owner (context));
+ g_assert_true (g_main_loop_is_running (loop));
+ g_assert_true (g_main_context_is_owner (context));
g_main_loop_quit (loop);
@@ -1723,9 +1723,9 @@ test_nfds (void)
*/
g_main_context_iteration (ctx, FALSE);
- g_assert (source1_ran);
+ g_assert_true (source1_ran);
#ifndef G_OS_WIN32
- g_assert (source3_ran);
+ g_assert_true (source3_ran);
#endif
g_source_destroy (source1);
diff --git a/glib/tests/mappedfile.c b/glib/tests/mappedfile.c
index 828a4f38a..b263143ec 100644
--- a/glib/tests/mappedfile.c
+++ b/glib/tests/mappedfile.c
@@ -40,7 +40,7 @@ test_empty (void)
file = g_mapped_file_new (g_test_get_filename (G_TEST_DIST, "empty", NULL), FALSE, &error);
g_assert_no_error (error);
- g_assert (g_mapped_file_get_contents (file) == NULL);
+ g_assert_null (g_mapped_file_get_contents (file));
g_mapped_file_free (file);
}
@@ -53,10 +53,10 @@ test_device (void)
GMappedFile *file;
file = g_mapped_file_new ("/dev/null", FALSE, &error);
- g_assert (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) ||
- g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NODEV) ||
- g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM));
- g_assert (file == NULL);
+ g_assert_true (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_INVAL) ||
+ g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NODEV) ||
+ g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOMEM));
+ g_assert_null (file);
g_error_free (error);
}
#endif
@@ -71,7 +71,7 @@ test_nonexisting (void)
file = g_mapped_file_new ("no-such-file", FALSE, &error);
g_assert_error (error, G_FILE_ERROR, G_FILE_ERROR_NOENT);
g_clear_error (&error);
- g_assert (file == NULL);
+ g_assert_null (file);
}
static void
@@ -98,10 +98,10 @@ test_writable (void)
g_assert_no_error (error);
contents = g_mapped_file_get_contents (file);
- g_assert (strncmp (contents, old, strlen (old)) == 0);
+ g_assert_cmpuint (strncmp (contents, old, strlen (old)), ==, 0);
memcpy (contents, new, strlen (new));
- g_assert (strncmp (contents, new, strlen (new)) == 0);
+ g_assert_cmpuint (strncmp (contents, new, strlen (new)), ==, 0);
g_mapped_file_free (file);
@@ -110,7 +110,7 @@ test_writable (void)
g_assert_no_error (error);
contents = g_mapped_file_get_contents (file);
- g_assert (strncmp (contents, old, strlen (old)) == 0);
+ g_assert_cmpuint (strncmp (contents, old, strlen (old)), ==, 0);
g_mapped_file_free (file);
@@ -139,27 +139,27 @@ test_writable_fd (void)
g_free (contents);
fd = g_open (tmp_copy_path, O_RDWR, 0);
- g_assert (fd != -1);
+ g_assert_cmpint (fd, !=, -1);
file = g_mapped_file_new_from_fd (fd, TRUE, &error);
g_assert_no_error (error);
contents = g_mapped_file_get_contents (file);
- g_assert (strncmp (contents, old, strlen (old)) == 0);
+ g_assert_cmpuint (strncmp (contents, old, strlen (old)), ==, 0);
memcpy (contents, new, strlen (new));
- g_assert (strncmp (contents, new, strlen (new)) == 0);
+ g_assert_cmpuint (strncmp (contents, new, strlen (new)), ==, 0);
g_mapped_file_free (file);
close (fd);
error = NULL;
fd = g_open (tmp_copy_path, O_RDWR, 0);
- g_assert (fd != -1);
+ g_assert_cmpint (fd, !=, -1);
file = g_mapped_file_new_from_fd (fd, TRUE, &error);
g_assert_no_error (error);
contents = g_mapped_file_get_contents (file);
- g_assert (strncmp (contents, old, strlen (old)) == 0);
+ g_assert_cmpuint (strncmp (contents, old, strlen (old)), ==, 0);
g_mapped_file_free (file);
diff --git a/glib/tests/meson.build b/glib/tests/meson.build
index d54fc41fa..e6c5cbd22 100644
--- a/glib/tests/meson.build
+++ b/glib/tests/meson.build
@@ -140,6 +140,9 @@ if host_machine.system() == 'windows'
},
}
endif
+ glib_tests += {
+ 'win32' : {},
+ }
else
glib_tests += {
'include' : {},
@@ -173,7 +176,7 @@ test_env.set('MALLOC_CHECK_', '2')
test_env.set('MALLOC_PERTURB_', '@0@'.format(random_number % 256))
test_deps = [libm, thread_dep, libglib_dep]
-test_cargs = ['-DG_LOG_DOMAIN="GLib"']
+test_cargs = ['-DG_LOG_DOMAIN="GLib"', '-UG_DISABLE_ASSERT']
foreach test_name, extra_args : glib_tests
source = extra_args.get('source', test_name + '.c')
diff --git a/glib/tests/option-argv0.c b/glib/tests/option-argv0.c
index 8ae00ca6f..f977625b5 100644
--- a/glib/tests/option-argv0.c
+++ b/glib/tests/option-argv0.c
@@ -21,13 +21,13 @@
* Authors: Colin Walters <walters@verbum.org>
*/
+#include "config.h"
#include <glib.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#if defined __linux || defined __OpenBSD__
static void
test_platform_argv0 (void)
{
@@ -36,19 +36,65 @@ test_platform_argv0 (void)
GOptionEntry entries [] =
{ { "test", 't', 0, G_OPTION_ARG_STRING, &arg, NULL, NULL },
{ NULL } };
+ const gchar * const expected_prgnames[] =
+ {
+ "option-argv0",
+ "lt-option-argv0",
+#ifdef G_OS_WIN32
+ "option-argv0.exe",
+#endif
+ NULL,
+ };
gboolean retval;
+ gboolean fatal_errors = TRUE;
+
+ /* This test must pass on platforms where platform_get_argv0()
+ * is implemented. At the moment that means Linux/Cygwin,
+ * (which uses /proc/self/cmdline) or OpenBSD (which uses
+ * sysctl and KERN_PROC_ARGS). On other platforms the test
+ * is not expected to pass, but we'd still want to know
+ * how it does (the test code itself doesn't use any platform-specific
+ * functionality, the difference is internal to glib, so it's quite
+ * possible to run this test everywhere - it just won't pass on some
+ * platforms). Make errors non-fatal on these other plaforms,
+ * to prevent them from crashing hard on failed assertions,
+ * and make them call g_test_skip() instead.
+ */
+#if !defined HAVE_PROC_SELF_CMDLINE && !defined __OpenBSD__ && !defined __linux
+ fatal_errors = FALSE;
+#endif
context = g_option_context_new (NULL);
g_option_context_add_main_entries (context, entries, NULL);
retval = g_option_context_parse (context, NULL, NULL, NULL);
- g_assert (retval == TRUE);
- g_assert (strcmp (g_get_prgname(), "option-argv0") == 0
- || strcmp (g_get_prgname (), "lt-option-argv0") == 0);
+ if (fatal_errors)
+ {
+ g_assert_true (retval);
+ g_assert_true (g_strv_contains (expected_prgnames, g_get_prgname ()));
+ }
+ else
+ {
+ gboolean failed = FALSE;
+
+ if (!retval)
+ {
+ g_print ("g_option_context_parse() failed\n");
+ failed = TRUE;
+ }
+ else if (!g_strv_contains (expected_prgnames, g_get_prgname ()))
+ {
+ g_print ("program name `%s' is neither `option-argv0', nor `lt-option-argv0'\n", g_get_prgname());
+ failed = TRUE;
+ }
+ else
+ g_print ("The test unexpectedly passed\n");
+ if (failed)
+ g_test_skip ("platform_get_argv0() is not implemented [correctly?] on this platform");
+ }
g_option_context_free (context);
}
-#endif
int
main (int argc,
@@ -56,9 +102,7 @@ main (int argc,
{
g_test_init (&argc, &argv, "no_g_set_prgname", NULL);
-#if defined __linux || defined __OpenBSD__
g_test_add_func ("/option/argv0", test_platform_argv0);
-#endif
return g_test_run ();
}
diff --git a/glib/tests/rand.c b/glib/tests/rand.c
index 1e3a2eb80..94fb4e822 100644
--- a/glib/tests/rand.c
+++ b/glib/tests/rand.c
@@ -87,17 +87,17 @@ test_rand (void)
rand = g_rand_new_with_seed (first_numbers[0]);
for (n = 1; n < G_N_ELEMENTS (first_numbers); n++)
- g_assert (first_numbers[n] == g_rand_int (rand));
+ g_assert_cmpuint (first_numbers[n], ==, g_rand_int (rand));
g_rand_set_seed (rand, 2);
g_rand_set_seed_array (rand, seed_array, G_N_ELEMENTS (seed_array));
for (n = 0; n < G_N_ELEMENTS (array_outputs); n++)
- g_assert (array_outputs[n] == g_rand_int (rand));
+ g_assert_cmpuint (array_outputs[n], ==, g_rand_int (rand));
copy = g_rand_copy (rand);
for (n = 0; n < 100; n++)
- g_assert (g_rand_int (copy) == g_rand_int (rand));
+ g_assert_cmpuint (g_rand_int (copy), ==, g_rand_int (rand));
for (n = 1; n < 100000; n++)
{
@@ -106,28 +106,34 @@ test_rand (void)
gboolean b;
i = g_rand_int_range (rand, 8,16);
- g_assert (i >= 8 && i < 16);
+ g_assert_cmpint (i, >=, 8);
+ g_assert_cmpint (i, <, 16);
i = g_random_int_range (8,16);
- g_assert (i >= 8 && i < 16);
+ g_assert_cmpint (i, >=, 8);
+ g_assert_cmpint (i, <, 16);
d = g_rand_double (rand);
- g_assert (d >= 0 && d < 1);
+ g_assert_cmpfloat (d, >=, 0.0);
+ g_assert_cmpfloat (d, <, 1.0);
d = g_random_double ();
- g_assert (d >= 0 && d < 1);
+ g_assert_cmpfloat (d, >=, 0.0);
+ g_assert_cmpfloat (d, <, 1.0);
d = g_rand_double_range (rand, -8, 32);
- g_assert (d >= -8 && d < 32);
+ g_assert_cmpfloat (d, >=, -8.0);
+ g_assert_cmpfloat (d, <, 32.0);
d = g_random_double_range (-8, 32);
- g_assert (d >= -8 && d < 32);
+ g_assert_cmpfloat (d, >=, -8.0);
+ g_assert_cmpfloat (d, <, 32.0);
b = g_random_boolean ();
- g_assert (b == TRUE || b == FALSE);
+ g_assert_true (b == TRUE || b == FALSE);
b = g_rand_boolean (rand);
- g_assert (b == TRUE || b == FALSE);
+ g_assert_true (b == TRUE || b == FALSE);
}
/* Statistical sanity check, count the number of ones
@@ -143,7 +149,7 @@ test_rand (void)
proportion = (double)ones / (double)100000;
/* 0.025 is overkill, but should suffice to test for some unreasonability */
- g_assert (ABS (proportion - 0.25) < 0.025);
+ g_assert_cmpfloat (ABS (proportion - 0.25), <, 0.025);
g_rand_free (rand);
g_rand_free (copy);
@@ -158,8 +164,8 @@ test_double_range (void)
d = g_random_double_range (-G_MAXDOUBLE, G_MAXDOUBLE);
- g_assert (-G_MAXDOUBLE <= d);
- g_assert (d < G_MAXDOUBLE);
+ g_assert_cmpfloat (-G_MAXDOUBLE, <=, d);
+ g_assert_cmpfloat (d, <, G_MAXDOUBLE);
}
int
diff --git a/glib/tests/strfuncs.c b/glib/tests/strfuncs.c
index 7c74cdc5e..71d4315c8 100644
--- a/glib/tests/strfuncs.c
+++ b/glib/tests/strfuncs.c
@@ -1037,15 +1037,7 @@ test_strtod (void)
check_strtod_number (0.75, "%5.2f", " 0.75");
check_strtod_number (-0.75, "%0.2f", "-0.75");
check_strtod_number (-0.75, "%5.2f", "-0.75");
-#if defined(_MSC_VER) || defined(__MINGW32__)
- /* FIXME: The included gnulib and the mingw-w64 implementation
- * currently don't follow C99 and print 3 digits for the exponent.
- * In case of mingw-w64 this was fixed but not released yet:
- * https://sourceforge.net/p/mingw-w64/bugs/732/ */
- check_strtod_number (1e99, "%0.e", "1e+099");
-#else
check_strtod_number (1e99, "%.0e", "1e+99");
-#endif
}
static void
diff --git a/glib/tests/unicode.c b/glib/tests/unicode.c
index ea4291043..34c697150 100644
--- a/glib/tests/unicode.c
+++ b/glib/tests/unicode.c
@@ -866,7 +866,7 @@ test_iso15924 (void)
{ G_UNICODE_SCRIPT_KHUDAWADI, "Sind" },
{ G_UNICODE_SCRIPT_LINEAR_A, "Lina" },
{ G_UNICODE_SCRIPT_MAHAJANI, "Mahj" },
- { G_UNICODE_SCRIPT_MANICHAEAN, "Mani" },
+ { G_UNICODE_SCRIPT_MANICHAEAN, "Manu" },
{ G_UNICODE_SCRIPT_MENDE_KIKAKUI, "Mend" },
{ G_UNICODE_SCRIPT_MODI, "Modi" },
{ G_UNICODE_SCRIPT_MRO, "Mroo" },
diff --git a/glib/tests/win32.c b/glib/tests/win32.c
new file mode 100644
index 000000000..d4b1fc523
--- /dev/null
+++ b/glib/tests/win32.c
@@ -0,0 +1,173 @@
+/* Unit test for VEH on Windows
+ * Copyright (C) 2019 Руслан Ижбулатов
+ *
+ * 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 "config.h"
+
+#include <glib.h>
+#include <gprintf.h>
+#include <stdio.h>
+#include <windows.h>
+
+static char *argv0 = NULL;
+
+#include "../gwin32-private.c"
+
+static void
+test_subst_pid_and_event (void)
+{
+ const gchar not_enough[] = "too long when %e and %p are substituted";
+ gchar debugger_3[3];
+ gchar debugger_not_enough[G_N_ELEMENTS (not_enough)];
+ gchar debugger_enough[G_N_ELEMENTS (not_enough) + 1];
+ gchar debugger_big[65535] = {0};
+ gchar *output;
+ DWORD be = 0xFFFFFFFF;
+ guintptr bp = (guintptr) G_MAXSIZE;
+
+ /* %f is not valid */
+ g_assert_false (_g_win32_subst_pid_and_event (debugger_3, G_N_ELEMENTS (debugger_3),
+ "%f", 0, 0));
+
+ g_assert_false (_g_win32_subst_pid_and_event (debugger_3, G_N_ELEMENTS (debugger_3),
+ "string longer than 10", 0, 0));
+ /* 200 is longer than %e, so the string doesn't fit by 1 byte */
+ g_assert_false (_g_win32_subst_pid_and_event (debugger_not_enough, G_N_ELEMENTS (debugger_not_enough),
+ "too long when %e and %p are substituted", 10, 200));
+
+ /* This should fit */
+ g_assert_true (_g_win32_subst_pid_and_event (debugger_enough, G_N_ELEMENTS (debugger_enough),
+ "too long when %e and %p are substituted", 10, 200));
+ g_assert_cmpstr (debugger_enough, ==, "too long when 200 and 10 are substituted");
+
+ g_assert_true (_g_win32_subst_pid_and_event (debugger_big, G_N_ELEMENTS (debugger_big),
+ "multipl%e big %e %entries and %pids are %provided here", bp, be));
+ output = g_strdup_printf ("multipl%lu big %lu %luntries and %lluids are %llurovided here", be, be, be, (guint64) bp, (guint64) bp);
+ g_assert_cmpstr (debugger_big, ==, output);
+ g_free (output);
+}
+
+/* Crash with access violation */
+static void
+test_access_violation (void)
+{
+ int *integer = NULL;
+ /* Use SEM_NOGPFAULTERRORBOX to prevent an error dialog
+ * from being shown.
+ */
+ DWORD dwMode = SetErrorMode (SEM_NOGPFAULTERRORBOX);
+ SetErrorMode (dwMode | SEM_NOGPFAULTERRORBOX);
+ *integer = 1;
+ SetErrorMode (dwMode);
+}
+
+/* Crash with illegal instruction */
+static void
+test_illegal_instruction (void)
+{
+ DWORD dwMode = SetErrorMode (SEM_NOGPFAULTERRORBOX);
+ SetErrorMode (dwMode | SEM_NOGPFAULTERRORBOX);
+ RaiseException (EXCEPTION_ILLEGAL_INSTRUCTION, 0, 0, NULL);
+ SetErrorMode (dwMode);
+}
+
+static void
+test_veh_crash_access_violation (void)
+{
+ g_unsetenv ("G_DEBUGGER");
+ /* Run a test that crashes */
+ g_test_trap_subprocess ("/win32/subprocess/access_violation", 0, 0);
+ g_test_trap_assert_failed ();
+ g_test_trap_assert_stderr ("Exception code=0xc0000005*");
+}
+
+static void
+test_veh_crash_illegal_instruction (void)
+{
+ g_unsetenv ("G_DEBUGGER");
+ /* Run a test that crashes */
+ g_test_trap_subprocess ("/win32/subprocess/illegal_instruction", 0, 0);
+ g_test_trap_assert_failed ();
+ g_test_trap_assert_stderr ("Exception code=0xc000001d*");
+}
+
+static void
+test_veh_debug (void)
+{
+ /* Run a test that crashes and runs a debugger */
+ g_test_trap_subprocess ("/win32/subprocess/debugee", 0, 0);
+ g_test_trap_assert_failed ();
+ g_test_trap_assert_stderr ("Exception code=0xc0000005*Debugger invoked, attaching to*");
+}
+
+static void
+test_veh_debugee (void)
+{
+ /* Set up a debugger to be run on crash */
+ gchar *command = g_strdup_printf ("%s %s", argv0, "%p %e");
+ g_setenv ("G_DEBUGGER", command, TRUE);
+ /* Because the "debugger" here is not really a debugger,
+ * it can't write into stderr of this process, unless
+ * we allow it to inherit our stderr.
+ */
+ g_setenv ("G_DEBUGGER_OLD_CONSOLE", "1", TRUE);
+ g_free (command);
+ /* Crash */
+ test_access_violation ();
+}
+
+static void
+veh_debugger (int argc, char *argv[])
+{
+ char *end;
+ DWORD pid = strtoul (argv[1], &end, 10);
+ guintptr event = (guintptr) _strtoui64 (argv[2], &end, 10);
+ /* Unfreeze the debugee and announce ourselves */
+ SetEvent ((HANDLE) event);
+ CloseHandle ((HANDLE) event);
+ g_fprintf (stderr, "Debugger invoked, attaching to %lu and signalling %" G_GUINTPTR_FORMAT, pid, event);
+}
+
+int
+main (int argc,
+ char *argv[])
+{
+ argv0 = argv[0];
+
+ g_test_init (&argc, &argv, NULL);
+
+ if (argc > 2)
+ {
+ veh_debugger (argc, argv);
+ return 0;
+ }
+
+ g_test_add_func ("/win32/substitute-pid-and-event", test_subst_pid_and_event);
+
+ g_test_add_func ("/win32/veh/access_violation", test_veh_crash_access_violation);
+ g_test_add_func ("/win32/veh/illegal_instruction", test_veh_crash_illegal_instruction);
+ g_test_add_func ("/win32/veh/debug", test_veh_debug);
+
+ g_test_add_func ("/win32/subprocess/debugee", test_veh_debugee);
+ g_test_add_func ("/win32/subprocess/access_violation", test_access_violation);
+ g_test_add_func ("/win32/subprocess/illegal_instruction", test_illegal_instruction);
+
+ return g_test_run();
+}
diff --git a/gobject/gboxed.c b/gobject/gboxed.c
index cc7166456..e4ebebeeb 100644
--- a/gobject/gboxed.c
+++ b/gobject/gboxed.c
@@ -100,7 +100,7 @@ _g_boxed_type_init (void)
NULL, /* value_table */
};
const GTypeFundamentalInfo finfo = { G_TYPE_FLAG_DERIVABLE, };
- GType type;
+ GType type G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
/* G_TYPE_BOXED
*/
diff --git a/gobject/genums.c b/gobject/genums.c
index aa27c6bb4..f78370053 100644
--- a/gobject/genums.c
+++ b/gobject/genums.c
@@ -113,7 +113,7 @@ _g_enum_types_init (void)
static const GTypeFundamentalInfo finfo = {
G_TYPE_FLAG_CLASSED | G_TYPE_FLAG_DERIVABLE,
};
- GType type;
+ GType type G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
g_return_if_fail (initialized == FALSE);
initialized = TRUE;
diff --git a/gobject/glib-genmarshal.in b/gobject/glib-genmarshal.in
index 1ea2ad9e8..dc4c7eacc 100755
--- a/gobject/glib-genmarshal.in
+++ b/gobject/glib-genmarshal.in
@@ -330,7 +330,6 @@ IN_ARGS = {
'ctype': 'gpointer',
'getter': 'g_marshal_value_peek_string',
'box': ['g_strdup', 'g_free'],
- 'static-check': True,
},
'PARAM': {
'signal': 'PARAM',
@@ -361,7 +360,7 @@ IN_ARGS = {
'signal': 'VARIANT',
'ctype': 'gpointer',
'getter': 'g_marshal_value_peek_variant',
- 'box': ['g_variant_ref_sink', 'g_variant_unref'],
+ 'box': ['g_variant_ref', 'g_variant_unref'],
'static-check': True,
'takes-type': False,
},
diff --git a/gobject/gobject.c b/gobject/gobject.c
index de61a0481..d709a1938 100644
--- a/gobject/gobject.c
+++ b/gobject/gobject.c
@@ -263,7 +263,6 @@ g_object_notify_queue_thaw (GObject *object,
GSList *slist;
guint n_pspecs = 0;
- g_return_if_fail (nqueue->freeze_count > 0);
g_return_if_fail (g_atomic_int_get(&object->ref_count) > 0);
G_LOCK(notify_lock);
@@ -382,7 +381,7 @@ _g_object_type_init (void)
"p", /* lcopy_format */
g_value_object_lcopy_value, /* lcopy_value */
};
- GType type;
+ GType type G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
g_return_if_fail (initialized == FALSE);
initialized = TRUE;
@@ -1101,7 +1100,7 @@ void
g_object_run_dispose (GObject *object)
{
g_return_if_fail (G_IS_OBJECT (object));
- g_return_if_fail (object->ref_count > 0);
+ g_return_if_fail (g_atomic_int_get (&object->ref_count) > 0);
g_object_ref (object);
TRACE (GOBJECT_OBJECT_DISPOSE(object,G_TYPE_FROM_INSTANCE(object), 0));
@@ -2819,7 +2818,7 @@ g_object_weak_ref (GObject *object,
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (notify != NULL);
- g_return_if_fail (object->ref_count >= 1);
+ g_return_if_fail (g_atomic_int_get (&object->ref_count) >= 1);
G_LOCK (weak_refs_mutex);
wstack = g_datalist_id_remove_no_notify (&object->qdata, quark_weak_refs);
@@ -3001,7 +3000,7 @@ gpointer
GObject *object = _object;
gboolean was_floating;
g_return_val_if_fail (G_IS_OBJECT (object), object);
- g_return_val_if_fail (object->ref_count >= 1, object);
+ g_return_val_if_fail (g_atomic_int_get (&object->ref_count) >= 1, object);
g_object_ref (object);
was_floating = floating_flag_handler (object, -1);
if (was_floating)
@@ -3024,7 +3023,7 @@ void
g_object_force_floating (GObject *object)
{
g_return_if_fail (G_IS_OBJECT (object));
- g_return_if_fail (object->ref_count >= 1);
+ g_return_if_fail (g_atomic_int_get (&object->ref_count) >= 1);
floating_flag_handler (object, +1);
}
@@ -3105,7 +3104,7 @@ g_object_add_toggle_ref (GObject *object,
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (notify != NULL);
- g_return_if_fail (object->ref_count >= 1);
+ g_return_if_fail (g_atomic_int_get (&object->ref_count) >= 1);
g_object_ref (object);
@@ -3630,6 +3629,11 @@ g_object_get_data (GObject *object,
*
* If the object already had an association with that name,
* the old association will be destroyed.
+ *
+ * Internally, the @key is converted to a #GQuark using g_quark_from_string().
+ * This means a copy of @key is kept permanently (even after @object has been
+ * finalized) — so it is recommended to only use a small, bounded set of values
+ * for @key in your program, to avoid the #GQuark storage growing unbounded.
*/
void
g_object_set_data (GObject *object,
@@ -3708,6 +3712,9 @@ g_object_dup_data (GObject *object,
* or may not include using @old_destroy as sometimes replacement
* should not destroy the object in the normal way.
*
+ * See g_object_set_data() for guidance on using a small, bounded set of values
+ * for @key.
+ *
* Returns: %TRUE if the existing value for @key was replaced
* by @newval, %FALSE otherwise.
*
@@ -4139,7 +4146,7 @@ g_object_watch_closure (GObject *object,
g_return_if_fail (closure != NULL);
g_return_if_fail (closure->is_invalid == FALSE);
g_return_if_fail (closure->in_marshal == FALSE);
- g_return_if_fail (object->ref_count > 0); /* this doesn't work on finalizing objects */
+ g_return_if_fail (g_atomic_int_get (&object->ref_count) > 0); /* this doesn't work on finalizing objects */
g_closure_add_invalidate_notifier (closure, object, object_remove_closure);
g_closure_add_marshal_guards (closure,
@@ -4185,7 +4192,7 @@ g_closure_new_object (guint sizeof_closure,
GClosure *closure;
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
- g_return_val_if_fail (object->ref_count > 0, NULL); /* this doesn't work on finalizing objects */
+ g_return_val_if_fail (g_atomic_int_get (&object->ref_count) > 0, NULL); /* this doesn't work on finalizing objects */
closure = g_closure_new_simple (sizeof_closure, object);
g_object_watch_closure (object, closure);
@@ -4213,7 +4220,7 @@ g_cclosure_new_object (GCallback callback_func,
GClosure *closure;
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
- g_return_val_if_fail (object->ref_count > 0, NULL); /* this doesn't work on finalizing objects */
+ g_return_val_if_fail (g_atomic_int_get (&object->ref_count) > 0, NULL); /* this doesn't work on finalizing objects */
g_return_val_if_fail (callback_func != NULL, NULL);
closure = g_cclosure_new (callback_func, object, NULL);
@@ -4242,7 +4249,7 @@ g_cclosure_new_object_swap (GCallback callback_func,
GClosure *closure;
g_return_val_if_fail (G_IS_OBJECT (object), NULL);
- g_return_val_if_fail (object->ref_count > 0, NULL); /* this doesn't work on finalizing objects */
+ g_return_val_if_fail (g_atomic_int_get (&object->ref_count) > 0, NULL); /* this doesn't work on finalizing objects */
g_return_val_if_fail (callback_func != NULL, NULL);
closure = g_cclosure_new_swap (callback_func, object, NULL);
diff --git a/gobject/gparam.c b/gobject/gparam.c
index 79ee834d5..6f33f027b 100644
--- a/gobject/gparam.c
+++ b/gobject/gparam.c
@@ -1561,8 +1561,7 @@ g_param_spec_get_default_value (GParamSpec *pspec)
g_param_value_set_default (pspec, &default_value);
/* store all but the type */
- default_value.g_type = 0;
- priv->default_value = default_value;
+ memcpy (priv->default_value.data, default_value.data, sizeof (default_value.data));
g_once_init_leave (&priv->default_value.g_type, pspec->value_type);
}
diff --git a/gobject/gparamspecs.c b/gobject/gparamspecs.c
index d76e12f55..5d15c26e1 100644
--- a/gobject/gparamspecs.c
+++ b/gobject/gparamspecs.c
@@ -1191,11 +1191,16 @@ void
_g_param_spec_types_init (void)
{
const guint n_types = 23;
- GType type, *spec_types, *spec_types_bound;
+ GType type, *spec_types;
+#ifndef G_DISABLE_ASSERT
+ GType *spec_types_bound;
+#endif
g_param_spec_types = g_new0 (GType, n_types);
spec_types = g_param_spec_types;
+#ifndef G_DISABLE_ASSERT
spec_types_bound = g_param_spec_types + n_types;
+#endif
/* G_TYPE_PARAM_CHAR
*/
diff --git a/gobject/gtype.c b/gobject/gtype.c
index 1acc0a075..8a60105e8 100644
--- a/gobject/gtype.c
+++ b/gobject/gtype.c
@@ -4362,7 +4362,7 @@ gobject_init (void)
const gchar *env_string;
GTypeInfo info;
TypeNode *node;
- GType type;
+ GType type G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
/* Ensure GLib is initialized first, see
* https://bugzilla.gnome.org/show_bug.cgi?id=756139
diff --git a/gobject/gvaluearray.c b/gobject/gvaluearray.c
index 553152d5a..83e03f7ec 100644
--- a/gobject/gvaluearray.c
+++ b/gobject/gvaluearray.c
@@ -55,6 +55,9 @@
* GArray *array = g_array_sized_new (FALSE, TRUE, sizeof (GValue), 10);
* g_array_set_clear_func (array, (GDestroyNotify) g_value_unset);
* ]|
+ *
+ * Deprecated: 2.32: Use #GArray instead, if possible for the given use case,
+ * as described above.
*/
#define GROUP_N_VALUES (8) /* power of 2 !! */
diff --git a/gobject/gvaluetypes.c b/gobject/gvaluetypes.c
index 17d1a70a9..35b85c684 100644
--- a/gobject/gvaluetypes.c
+++ b/gobject/gvaluetypes.c
@@ -435,7 +435,7 @@ _g_value_types_init (void)
NULL, /* value_table */
};
const GTypeFundamentalInfo finfo = { G_TYPE_FLAG_DERIVABLE, };
- GType type;
+ GType type G_GNUC_UNUSED /* when compiling with G_DISABLE_ASSERT */;
/* G_TYPE_CHAR / G_TYPE_UCHAR
*/
diff --git a/gobject/tests/meson.build b/gobject/tests/meson.build
index 2de2002d3..9d08d0a34 100644
--- a/gobject/tests/meson.build
+++ b/gobject/tests/meson.build
@@ -68,7 +68,7 @@ test_env.set('MALLOC_CHECK_', '2')
test_env.set('MALLOC_PERTURB_', '@0@'.format(random_number % 256))
test_deps = [libm, thread_dep, libglib_dep, libgobject_dep]
-test_cargs = ['-DG_LOG_DOMAIN="GLib-GObject"']
+test_cargs = ['-DG_LOG_DOMAIN="GLib-GObject"', '-UG_DISABLE_ASSERT']
foreach test_name, extra_args : gobject_tests
source = extra_args.get('source', test_name + '.c')
diff --git a/meson.build b/meson.build
index dd95c750b..85433fb3b 100644
--- a/meson.build
+++ b/meson.build
@@ -1,5 +1,5 @@
project('glib', 'c', 'cpp',
- version : '2.60.7',
+ version : '2.61.0',
meson_version : '>= 0.48.0',
default_options : [
'buildtype=debugoptimized',
@@ -169,7 +169,7 @@ endif
# Detect and set symbol visibility
glib_hidden_visibility_args = []
if get_option('default_library') != 'static'
- if host_system == 'windows'
+ if host_system == 'windows' or host_system == 'cygwin'
glib_conf.set('DLL_EXPORT', true)
if cc.get_id() == 'msvc'
glib_conf.set('_GLIB_EXTERN', '__declspec(dllexport) extern')
@@ -188,10 +188,18 @@ if host_system == 'windows' and get_option('default_library') == 'static'
glibconfig_conf.set('GOBJECT_STATIC_COMPILATION', '1')
endif
-# FIXME: what about Cygwin (G_WITH_CYGWIN)
+# Cygwin glib port maintainers made it clear
+# (via the patches they apply) that they want no
+# part of glib W32 code, therefore we do not define
+# G_PLATFORM_WIN32 for host_system == 'cygwin'.
+# This makes G_PLATFORM_WIN32 a synonym for
+# G_OS_WIN32.
if host_system == 'windows'
glib_os = '''#define G_OS_WIN32
#define G_PLATFORM_WIN32'''
+elif host_system == 'cygwin'
+ glib_os = '''#define G_OS_WIN32
+#define G_WITH_CYGWIN'''
else
glib_os = '#define G_OS_UNIX'
endif
@@ -352,6 +360,8 @@ if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
'-Wmisleading-indentation',
'-Wstrict-prototypes',
'-Wunused',
+ # Due to maintained deprecated code, we do not want to see unused parameters
+ '-Wno-unused-parameter',
# Due to pervasive use of things like GPOINTER_TO_UINT(), we do not support
# building with -Wbad-function-cast.
'-Wno-bad-function-cast',
@@ -582,6 +592,12 @@ if cc.has_header_symbol('dlfcn.h', 'RTLD_GLOBAL')
glib_conf.set('HAVE_RTLD_GLOBAL', 1)
endif
+have_rtld_next = false
+if cc.has_header_symbol('dlfcn.h', 'RTLD_NEXT')
+ have_rtld_next = true
+ glib_conf.set('HAVE_RTLD_NEXT', 1)
+endif
+
# Check whether to use statfs or statvfs
# Some systems have both statfs and statvfs, pick the most "native" for these
if have_func_statfs and have_func_statvfs
@@ -986,20 +1002,20 @@ if cc.links('''#ifndef _GNU_SOURCE
#include <langinfo.h>
int main (int argc, char ** argv) {
char *str;
- str = nl_langinfo (_NL_ABALTMON_1);
- str = nl_langinfo (_NL_ABALTMON_2);
- str = nl_langinfo (_NL_ABALTMON_3);
- str = nl_langinfo (_NL_ABALTMON_4);
- str = nl_langinfo (_NL_ABALTMON_5);
- str = nl_langinfo (_NL_ABALTMON_6);
- str = nl_langinfo (_NL_ABALTMON_7);
- str = nl_langinfo (_NL_ABALTMON_8);
- str = nl_langinfo (_NL_ABALTMON_9);
- str = nl_langinfo (_NL_ABALTMON_10);
- str = nl_langinfo (_NL_ABALTMON_11);
- str = nl_langinfo (_NL_ABALTMON_12);
+ str = nl_langinfo (_NL_ALTMON_1);
+ str = nl_langinfo (_NL_ALTMON_2);
+ str = nl_langinfo (_NL_ALTMON_3);
+ str = nl_langinfo (_NL_ALTMON_4);
+ str = nl_langinfo (_NL_ALTMON_5);
+ str = nl_langinfo (_NL_ALTMON_6);
+ str = nl_langinfo (_NL_ALTMON_7);
+ str = nl_langinfo (_NL_ALTMON_8);
+ str = nl_langinfo (_NL_ALTMON_9);
+ str = nl_langinfo (_NL_ALTMON_10);
+ str = nl_langinfo (_NL_ALTMON_11);
+ str = nl_langinfo (_NL_ALTMON_12);
return 0;
- }''', name : 'nl_langinfo (_NL_ABALTMON_n)')
+ }''', name : 'nl_langinfo (_NL_ALTMON_n)')
glib_conf.set('HAVE_LANGINFO_ABALTMON', 1)
endif
@@ -1674,49 +1690,31 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
# Tests for iconv
#
-# USE_LIBICONV_GNU: Using GNU libiconv
-# USE_LIBICONV_NATIVE: Using a native impl of iconv in a separate library
-#
-# We should never use the MinGW C library's iconv. On Windows we use the
-# GNU implementation that ships with MinGW.
-
+# We should never use the MinGW C library's iconv because it may not be
+# available in the actual runtime environment. On Windows, we always use
+# the built-in implementation
iconv_opt = get_option('iconv')
-
-# On Darwin, the libc doesn't provide iconv. Instead, the OS provides libiconv
-# as a separate (non-GNU) library. Set the option to 'native'.
-if host_system == 'darwin' and iconv_opt == 'libc'
- iconv_opt = 'native'
-endif
-
-# On Windows, just always use the built-in implementation
if host_system == 'windows'
libiconv = []
- glib_conf.set('USE_LIBICONV_NATIVE', true)
+ # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need
+ # any external library for it
+ if iconv_opt != 'auto'
+ warning('-Diconv was set to @0@, which was ignored')
+ endif
else
found_iconv = false
- if iconv_opt == 'libc'
- if cc.has_function('iconv_open')
- libiconv = []
- found_iconv = true
- endif
- elif iconv_opt == 'gnu'
- if cc.has_header_symbol('iconv.h', 'libiconv_open')
- glib_conf.set('USE_LIBICONV_GNU', true)
- libiconv = [cc.find_library('iconv')]
- found_iconv = true
- endif
- elif iconv_opt == 'native'
- if cc.has_header_symbol('iconv.h', 'iconv_open')
- glib_conf.set('USE_LIBICONV_NATIVE', true)
- libiconv = [cc.find_library('iconv')]
- found_iconv = true
- endif
+ if ['auto', 'libc'].contains(iconv_opt) and cc.has_function('iconv_open')
+ libiconv = []
+ found_iconv = true
+ endif
+ if not found_iconv and ['auto', 'external'].contains(iconv_opt) and cc.has_header_symbol('iconv.h', 'iconv_open')
+ libiconv = [cc.find_library('iconv')]
+ found_iconv = true
endif
if not found_iconv
error('iconv implementation "@0@" not found'.format(iconv_opt))
endif
-
endif
if get_option('internal_pcre')
@@ -1866,26 +1864,79 @@ if host_system != 'windows' and get_option('xattr')
endif
endif
-# Test if we have strlcpy/strlcat with a compatible implementation:
-# https://bugzilla.gnome.org/show_bug.cgi?id=53933
-if cc_can_run
- rres = cc.run('''#include <stdlib.h>
- #include <string.h>
- int main() {
- char p[10];
- (void) strlcpy (p, "hi", 10);
- if (strlcat (p, "bye", 0) != 3)
- return 1;
- return 0;
- }''',
- name : 'OpenBSD strlcpy/strlcat')
- if rres.compiled() and rres.returncode() == 0
+# If strlcpy is present (BSD and similar), check that it conforms to the BSD
+# specification. Specifically Solaris 8's strlcpy() does not, see
+# https://bugzilla.gnome.org/show_bug.cgi?id=53933 for further context.
+if cc.has_function('strlcpy')
+ if cc_can_run
+ rres = cc.run('''#include <stdlib.h>
+ #include <string.h>
+ int main() {
+ char p[10];
+ (void) strlcpy (p, "hi", 10);
+ if (strlcat (p, "bye", 0) != 3)
+ return 1;
+ return 0;
+ }''',
+ name : 'OpenBSD strlcpy/strlcat')
+ if rres.compiled() and rres.returncode() == 0
+ glib_conf.set('HAVE_STRLCPY', 1)
+ endif
+ elif meson.get_cross_property('have_strlcpy', false)
glib_conf.set('HAVE_STRLCPY', 1)
endif
-elif meson.get_cross_property('have_strlcpy', false)
- glib_conf.set('HAVE_STRLCPY', 1)
endif
+cmdline_test_code = '''
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#undef NDEBUG
+#include <assert.h>
+
+static int
+__getcmdline (void)
+{
+/* This code is a dumbed-down version of g_file_get_contents() */
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+#define BUFSIZE 1024
+ char result[BUFSIZE];
+ struct stat stat_buf;
+
+ int fd = open ("/proc/self/cmdline", O_RDONLY|O_BINARY);
+ assert (fd >= 0);
+ assert (fstat (fd, &stat_buf) == 0);
+
+ if (stat_buf.st_size > 0 && S_ISREG (stat_buf.st_mode))
+ assert (read (fd, result, BUFSIZE) > 0);
+ else
+ {
+ FILE *f = fdopen (fd, "r");
+ assert (f != NULL);
+ assert (fread (result, 1, BUFSIZE, f) > 0);
+ }
+
+ return 0;
+}
+
+int
+main (void)
+{
+ exit (__getcmdline ());
+}'''
+
+if cc_can_run
+ rres = cc.run(cmdline_test_code, name : '/proc/self/cmdline')
+ have_proc_self_cmdline = rres.compiled() and rres.returncode() == 0
+else
+ have_proc_self_cmdline = meson.get_cross_property('have_proc_self_cmdline', false)
+endif
+
+glib_conf.set('HAVE_PROC_SELF_CMDLINE', have_proc_self_cmdline)
+
python = import('python').find_installation('python3')
# used for '#!/usr/bin/env <name>'
python_name = 'python3'
@@ -2052,6 +2103,4 @@ if get_option('man')
endif
gnome = import('gnome')
-subdir('docs/reference/glib')
-subdir('docs/reference/gobject')
-subdir('docs/reference/gio')
+subdir('docs/reference') \ No newline at end of file
diff --git a/meson_options.txt b/meson_options.txt
index 5c5b4dfe1..2c831e37e 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -5,9 +5,9 @@ option('runtime_libdir',
option('iconv',
type : 'combo',
- choices : ['libc', 'gnu', 'native'],
- value : 'libc',
- description : 'iconv implementation to use (\'libc\' = \'Part of the C stdlib\'; \'gnu\' = \'GNU\'s iconv\'; \'native\' = \'A separate iconv\')')
+ choices : ['auto', 'libc', 'external'],
+ value : 'auto',
+ description : 'iconv implementation to use (\'libc\' = \'Part of the C library\'; \'external\' = \'External libiconv\'; \'auto\' = \'Auto-detect which iconv is available\')')
option('charsetalias_dir',
type : 'string',
@@ -89,3 +89,8 @@ option('nls',
value : 'auto',
yield: true,
description : 'Enable native language support (translations)')
+
+option('oss_fuzz',
+ type : 'feature',
+ value : 'disabled',
+ description : 'Indicate oss-fuzz build environment')
diff --git a/po/ca.po b/po/ca.po
index 4d7ed9166..078d64719 100644
--- a/po/ca.po
+++ b/po/ca.po
@@ -12,16 +12,16 @@ msgid ""
msgstr ""
"Project-Id-Version: glib 2.8\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib/issues\n"
-"POT-Creation-Date: 2019-03-05 18:03+0000\n"
-"PO-Revision-Date: 2019-04-17 18:01+0200\n"
-"Last-Translator: Robert Antoni Buj Gelonch <rbuj@fedoraproject.org>\n"
+"POT-Creation-Date: 2019-02-12 14:26+0000\n"
+"PO-Revision-Date: 2019-02-21 17:05+0100\n"
+"Last-Translator: Jordi Mas <jmas@softcatala.org>\n"
"Language-Team: Catalan <tradgnome@softcatala.org>\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Poedit 2.2.1\n"
+"X-Generator: Poedit 2.1.1\n"
"X-Project-Style: gnome\n"
#: gio/gapplication.c:499
@@ -162,8 +162,7 @@ msgstr ""
msgid "Usage:\n"
msgstr "Forma d'ús:\n"
-#: gio/gapplication-tool.c:114 gio/gresource-tool.c:558
-#: gio/gsettings-tool.c:696
+#: gio/gapplication-tool.c:114 gio/gresource-tool.c:558 gio/gsettings-tool.c:696
msgid "Arguments:\n"
msgstr "Arguments:\n"
@@ -392,8 +391,7 @@ msgstr "L'entrada d'adreça «%s» té una parella clau/valor que no té sentit"
#: gio/gdbusaddress.c:261 gio/gdbusaddress.c:342
#, c-format
msgid "Error in address “%s” — the port attribute is malformed"
-msgstr ""
-"Hi ha un error a l'adreça «%s»: l'atribut del port no està ben formatat"
+msgstr "Hi ha un error a l'adreça «%s»: l'atribut del port no està ben formatat"
#: gio/gdbusaddress.c:272 gio/gdbusaddress.c:353
#, c-format
@@ -562,8 +560,8 @@ msgstr "S'ha trobat una inesperada falta de contingut en llegir una línia"
#: gio/gdbusauth.c:337
msgid "Unexpected lack of content trying to (safely) read a line"
msgstr ""
-"S'ha trobat una inesperada falta de contingut en llegir (de forma segura) "
-"una línia"
+"S'ha trobat una inesperada falta de contingut en llegir (de forma segura) una "
+"línia"
#: gio/gdbusauth.c:481
#, c-format
@@ -585,8 +583,7 @@ msgstr "S'ha produït un error en obtenir la informació del directori «%s»: %
#: gio/gdbusauthmechanismsha1.c:274
#, c-format
-msgid ""
-"Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o"
+msgid "Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o"
msgstr ""
"Els permisos del directori «%s» no estan ben formatats. S'esperava el mode "
"0700 però s'ha obtingut el 0%o"
@@ -621,8 +618,8 @@ msgstr ""
msgid ""
"Second token of line %d of the keyring at “%s” with content “%s” is malformed"
msgstr ""
-"El segon testimoni de la línia %d de l'anell de claus a «%s» amb el "
-"contingut «%s» no està ben formatat"
+"El segon testimoni de la línia %d de l'anell de claus a «%s» amb el contingut "
+"«%s» no està ben formatat"
#: gio/gdbusauthmechanismsha1.c:421
#, c-format
@@ -654,8 +651,7 @@ msgstr "S'ha produït un error en desenllaçar el fitxer de blocatge «%s»: %s"
#: gio/gdbusauthmechanismsha1.c:654
#, c-format
msgid "Error opening keyring “%s” for writing: "
-msgstr ""
-"S'ha produït un error en obrir l'anell de claus «%s» per a escriptura: "
+msgstr "S'ha produït un error en obrir l'anell de claus «%s» per a escriptura: "
#: gio/gdbusauthmechanismsha1.c:850
#, c-format
@@ -672,22 +668,19 @@ msgid "Timeout was reached"
msgstr "S'ha esgotat el temps d'espera"
#: gio/gdbusconnection.c:2518
-msgid ""
-"Unsupported flags encountered when constructing a client-side connection"
+msgid "Unsupported flags encountered when constructing a client-side connection"
msgstr ""
"S'han trobat senyaladors no implementats en construir-se la part de la "
"connexió del client"
#: gio/gdbusconnection.c:4147 gio/gdbusconnection.c:4494
#, c-format
-msgid ""
-"No such interface “org.freedesktop.DBus.Properties” on object at path %s"
+msgid "No such interface “org.freedesktop.DBus.Properties” on object at path %s"
msgstr ""
"No existeix la interfície «org.freedesktop.DBus.Properties» en l'objecte al "
"camí %s"
#: gio/gdbusconnection.c:4289
-#, c-format
msgid "No such property “%s”"
msgstr "No existeix la propietat «%s»"
@@ -698,6 +691,7 @@ msgstr "La propietat «%s» no és de lectura"
#: gio/gdbusconnection.c:4312
#, c-format
+#| msgid "Property '%s' is not writable"
msgid "Property “%s” is not writable"
msgstr "La propietat «%s» no és d'escriptura"
@@ -705,8 +699,8 @@ msgstr "La propietat «%s» no és d'escriptura"
#, c-format
msgid "Error setting property “%s”: Expected type “%s” but got “%s”"
msgstr ""
-"S'ha produït un error en establir la propietat «%s»: s'esperava el tipus "
-"«%s» però s'ha obtingut el «%s»"
+"S'ha produït un error en establir la propietat «%s»: s'esperava el tipus «%s» "
+"però s'ha obtingut el «%s»"
#: gio/gdbusconnection.c:4437 gio/gdbusconnection.c:4645
#: gio/gdbusconnection.c:6614
@@ -808,14 +802,13 @@ msgstr[1] "Es volien llegir %lu bytes però només s'han rebut %lu"
#, c-format
msgid "Expected NUL byte after the string “%s” but found byte %d"
msgstr ""
-"S'esperava el byte «NUL» després de la cadena «%s» però s'ha trobat el byte "
-"%d"
+"S'esperava el byte «NUL» després de la cadena «%s» però s'ha trobat el byte %d"
#: gio/gdbusmessage.c:1395
#, c-format
msgid ""
-"Expected valid UTF-8 string but found invalid bytes at byte offset %d "
-"(length of string is %d). The valid UTF-8 string up until that point was “%s”"
+"Expected valid UTF-8 string but found invalid bytes at byte offset %d (length "
+"of string is %d). The valid UTF-8 string up until that point was “%s”"
msgstr ""
"S'esperava una cadena UTF-8 vàlida però s'han trobat bytes no vàlids a "
"l'òfset %d (la llargada de la cadena és %d). La cadena UTF-8 vàlida fins "
@@ -850,8 +843,8 @@ msgid ""
"Encountered array of type “a%c”, expected to have a length a multiple of %u "
"bytes, but found to be %u bytes in length"
msgstr ""
-"S'ha trobat una matriu de tipus «a%c» que s'esperava que tingués una "
-"llargada múltiple de %u bytes, però en realitat és de %u bytes"
+"S'ha trobat una matriu de tipus «a%c» que s'esperava que tingués una llargada "
+"múltiple de %u bytes, però en realitat és de %u bytes"
#: gio/gdbusmessage.c:1857
#, c-format
@@ -869,11 +862,11 @@ msgstr ""
#: gio/gdbusmessage.c:2066
#, c-format
msgid ""
-"Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value "
-"0x%02x"
+"Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value 0x"
+"%02x"
msgstr ""
-"Valor d'ordenació de bits (endianness) no vàlid. S'esperava 0x6c («l») o "
-"0x42 («B») però s'ha trobat el valor 0x%02x"
+"Valor d'ordenació de bits (endianness) no vàlid. S'esperava 0x6c («l») o 0x42 "
+"(«B») però s'ha trobat el valor 0x%02x"
#: gio/gdbusmessage.c:2079
#, c-format
@@ -924,8 +917,7 @@ msgstr ""
msgid ""
"Number of file descriptors in message (%d) differs from header field (%d)"
msgstr ""
-"El nombre de descriptors de fitxer al missatge (%d) difereix del camp de la "
-"capçalera (%d)"
+"El nombre de descriptors de fitxer al missatge (%d) difereix del camp de la capçalera (%d)"
#: gio/gdbusmessage.c:2686
msgid "Cannot serialize message: "
@@ -941,8 +933,7 @@ msgstr ""
#: gio/gdbusmessage.c:2749
#, c-format
msgid ""
-"Message body has type signature “%s” but signature in the header field is "
-"“%s”"
+"Message body has type signature “%s” but signature in the header field is “%s”"
msgstr ""
"El cos del missatge té el tipus de signatura «%s» però la signatura en el "
"camp de la capçalera és «%s»"
@@ -970,8 +961,7 @@ msgstr "No s'ha pogut obtenir el perfil de maquinari: %s"
#: gio/gdbusprivate.c:2120
msgid "Unable to load /var/lib/dbus/machine-id or /etc/machine-id: "
-msgstr ""
-"No s'ha pogut carregar «/var/lib/dbus/machine-id» o «/etc/machine-id»: "
+msgstr "No s'ha pogut carregar «/var/lib/dbus/machine-id» o «/etc/machine-id»: "
#: gio/gdbusproxy.c:1617
#, c-format
@@ -992,8 +982,8 @@ msgid ""
"and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"
msgstr ""
"No es pot invocar el mètode: el servidor intermediari és per a un nom ben "
-"conegut %s sense cap propietari i el servidor intermediari s'ha construït "
-"amb el senyalador «G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START»"
+"conegut %s sense cap propietari i el servidor intermediari s'ha construït amb "
+"el senyalador «G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START»"
#: gio/gdbusserver.c:708
msgid "Abstract name space not supported"
@@ -1212,8 +1202,7 @@ msgstr "Error: el nom del mètode «%s» no és vàlid\n"
#: gio/gdbus-tool.c:1132
#, c-format
msgid "Error parsing parameter %d of type “%s”: %s\n"
-msgstr ""
-"S'ha produït un error en analitzar el paràmetre %d del tipus «%s»: %s\n"
+msgstr "S'ha produït un error en analitzar el paràmetre %d del tipus «%s»: %s\n"
#: gio/gdbus-tool.c:1576
msgid "Destination name to introspect"
@@ -1253,9 +1242,7 @@ msgstr "Fes el seguiment a un objecte remot."
#: gio/gdbus-tool.c:1954
msgid "Error: can’t monitor a non-message-bus connection\n"
-msgstr ""
-"Error: no es pot fer un seguiment d'una connexió que no sigui de missatges "
-"del bus\n"
+msgstr "Error: no es pot fer un seguiment d'una connexió que no sigui de missatges del bus\n"
#: gio/gdbus-tool.c:2078
msgid "Service to activate before waiting for the other one (well-known name)"
@@ -1438,8 +1425,7 @@ msgstr "S'ha produït un error en empalmar el fitxer: %s"
#: gio/gfile.c:3149
msgid "Copy (reflink/clone) between mounts is not supported"
-msgstr ""
-"No està implementada la còpia (referències, clonacions) entre muntatges"
+msgstr "No està implementada la còpia (referències, clonacions) entre muntatges"
#: gio/gfile.c:3153
msgid "Copy (reflink/clone) is not supported or invalid"
@@ -1473,15 +1459,14 @@ msgstr "el volum no implementa el muntatge"
#: gio/gfile.c:6884 gio/gfile.c:6930
msgid "No application is registered as handling this file"
-msgstr ""
-"No hi ha cap aplicació que s'hagi registrat per gestionar aquest fitxer"
+msgstr "No hi ha cap aplicació que s'hagi registrat per gestionar aquest fitxer"
#: gio/gfileenumerator.c:212
msgid "Enumerator is closed"
msgstr "L'enumerador està tancat"
-#: gio/gfileenumerator.c:219 gio/gfileenumerator.c:278
-#: gio/gfileenumerator.c:377 gio/gfileenumerator.c:476
+#: gio/gfileenumerator.c:219 gio/gfileenumerator.c:278 gio/gfileenumerator.c:377
+#: gio/gfileenumerator.c:476
msgid "File enumerator has outstanding operation"
msgstr "L'enumerador de fitxer té una operació pendent"
@@ -1498,9 +1483,8 @@ msgstr "No es pot gestionar la versió %d de la codificació del GFileIcon"
msgid "Malformed input data for GFileIcon"
msgstr "Les dades d'entrada pel GFileIcon no són formades correctament"
-#: gio/gfileinputstream.c:149 gio/gfileinputstream.c:394
-#: gio/gfileiostream.c:167 gio/gfileoutputstream.c:164
-#: gio/gfileoutputstream.c:497
+#: gio/gfileinputstream.c:149 gio/gfileinputstream.c:394 gio/gfileiostream.c:167
+#: gio/gfileoutputstream.c:164 gio/gfileoutputstream.c:497
msgid "Stream doesn’t support query_info"
msgstr "El flux no implementa «query_info»"
@@ -2333,9 +2317,7 @@ msgstr "Es desconeix l'opció de processament «%s»"
#: gio/glib-compile-resources.c:427
#, c-format
msgid "%s preprocessing requested, but %s is not set, and %s is not in PATH"
-msgstr ""
-"s'ha demanat preprocessar %s, però %s no està configurat, i %s no està al "
-"PATH"
+msgstr "s'ha demanat preprocessar %s, però %s no està configurat, i %s no està al PATH"
#: gio/glib-compile-resources.c:460
#, c-format
@@ -2412,16 +2394,13 @@ msgstr "No exportis les funcions, declara-les com a «G_GNUC_INTERNAL»"
#: gio/glib-compile-resources.c:748
msgid ""
-"Don’t embed resource data in the C file; assume it's linked externally "
-"instead"
+"Don’t embed resource data in the C file; assume it's linked externally instead"
msgstr ""
-"No incrusteu recursos de dades a un fitxer C; en comptes assumiu que està "
-"enllaçat externament"
+"No incrusteu recursos de dades a un fitxer C; en comptes assumiu que està enllaçat externament"
#: gio/glib-compile-resources.c:749
msgid "C identifier name used for the generated source code"
-msgstr ""
-"El nom de l'identificador de C que s'utilitzarà en el codi font generat"
+msgstr "El nom de l'identificador de C que s'utilitzarà en el codi font generat"
#: gio/glib-compile-resources.c:775
msgid ""
@@ -2564,11 +2543,9 @@ msgstr ""
#: gio/glib-compile-schemas.c:583
#, c-format
msgid ""
-"<alias value='%s'/> given when “%s” is already a member of the enumerated "
-"type"
+"<alias value='%s'/> given when “%s” is already a member of the enumerated type"
msgstr ""
-"s'ha especificat <alias value='%s'/> quan «%s» ja és membre del tipus "
-"enumerat"
+"s'ha especificat <alias value='%s'/> quan «%s» ja és membre del tipus enumerat"
#: gio/glib-compile-schemas.c:589
#, c-format
@@ -2620,8 +2597,7 @@ msgstr ""
#: gio/glib-compile-schemas.c:829
#, c-format
msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted"
-msgstr ""
-"El nom «%s» no és vàlid: no es poden posar dos guionets seguits («--»)."
+msgstr "El nom «%s» no és vàlid: no es poden posar dos guionets seguits («--»)."
#: gio/glib-compile-schemas.c:838
#, c-format
@@ -2654,16 +2630,15 @@ msgid ""
"<key name='%s'> shadows <key name='%s'> in <schema id='%s'>; use <override> "
"to modify value"
msgstr ""
-"La <key name='%s'> emmascara la <key name='%s'> a <schema id='%s'>. "
-"Utilitzeu <override> per modificar-ne el valor."
+"La <key name='%s'> emmascara la <key name='%s'> a <schema id='%s'>. Utilitzeu "
+"<override> per modificar-ne el valor."
#: gio/glib-compile-schemas.c:984
#, c-format
msgid ""
-"Exactly one of “type”, “enum” or “flags” must be specified as an attribute "
-"to <key>"
-msgstr ""
-"L'atribut de la <key> ha de ser necessàriament «type», «enum» o «flags»"
+"Exactly one of “type”, “enum” or “flags” must be specified as an attribute to "
+"<key>"
+msgstr "L'atribut de la <key> ha de ser necessàriament «type», «enum» o «flags»"
#: gio/glib-compile-schemas.c:1003
#, c-format
@@ -2730,8 +2705,8 @@ msgid ""
"<schema id='%s' list-of='%s'> extends <schema id='%s' list-of='%s'> but “%s” "
"does not extend “%s”"
msgstr ""
-"El <schema id='%s' list-of='%s'> amplia el <schema id='%s' list-of='%s'> "
-"però «%s» no amplia «%s»"
+"El <schema id='%s' list-of='%s'> amplia el <schema id='%s' list-of='%s'> però "
+"«%s» no amplia «%s»"
#: gio/glib-compile-schemas.c:1225
#, c-format
@@ -2823,8 +2798,8 @@ msgid ""
"cannot provide per-desktop overrides for localised key “%s” in schema "
"“%s” (override file “%s”)"
msgstr ""
-"no es pot proveir la sobreescriptura per escriptori de claus traduïdes «%s» "
-"a l'esquema «%s» (fitxer de sobreescriptura «%s»)"
+"no es pot proveir la sobreescriptura per escriptori de claus traduïdes «%s» a l'esquema "
+"«%s» (fitxer de sobreescriptura «%s»)"
#: gio/glib-compile-schemas.c:2011
#, c-format
@@ -2851,8 +2826,8 @@ msgstr ""
#: gio/glib-compile-schemas.c:2069
#, c-format
msgid ""
-"override for key “%s” in schema “%s” in override file “%s” is not in the "
-"list of valid choices"
+"override for key “%s” in schema “%s” in override file “%s” is not in the list "
+"of valid choices"
msgstr ""
"la sobreescriptura de la clau «%s» de l'esquema «%s» en el fitxer de "
"sobreescriptura «%s» no és a la llista de valors vàlids"
@@ -2912,8 +2887,8 @@ msgstr "El nom del fitxer no és vàlid: %s"
#, c-format
msgid "Error getting filesystem info for %s: %s"
msgstr ""
-"S'ha produït un error en obtenir la informació del sistema de fitxers per "
-"%s: %s"
+"S'ha produït un error en obtenir la informació del sistema de fitxers per %s: "
+"%s"
#. Translators: This is an error message when trying to find
#. * the enclosing (user visible) mount of a file, but none
@@ -2970,9 +2945,7 @@ msgstr "No s'ha pogut trobar el directori superior per a la paperera %s"
#: gio/glocalfile.c:2034
#, c-format
msgid "Trashing on system internal mounts is not supported"
-msgstr ""
-"No està implementat l'enviament a la paperera en muntatges interns del "
-"sistema"
+msgstr "No està implementat l'enviament a la paperera en muntatges interns del sistema"
#: gio/glocalfile.c:2118 gio/glocalfile.c:2138
#, c-format
@@ -3111,8 +3084,7 @@ msgstr "S'ha produït un error en establir el propietari: %s"
msgid "symlink must be non-NULL"
msgstr "l'enllaç simbòlic no pot ser nul"
-#: gio/glocalfileinfo.c:2307 gio/glocalfileinfo.c:2326
-#: gio/glocalfileinfo.c:2337
+#: gio/glocalfileinfo.c:2307 gio/glocalfileinfo.c:2326 gio/glocalfileinfo.c:2337
#, c-format
msgid "Error setting symlink: %s"
msgstr "S'ha produït un error en establir l'enllaç simbòlic: %s"
@@ -3126,8 +3098,7 @@ msgstr ""
#: gio/glocalfileinfo.c:2442
#, c-format
msgid "Error setting modification or access time: %s"
-msgstr ""
-"S'ha produït un error en establir el temps de modificació o d'accés: %s"
+msgstr "S'ha produït un error en establir el temps de modificació o d'accés: %s"
#: gio/glocalfileinfo.c:2465
msgid "SELinux context must be non-NULL"
@@ -3245,8 +3216,8 @@ msgid ""
"Amount of memory required to process the write is larger than available "
"address space"
msgstr ""
-"La quantitat de memòria necessària per processar l'escriptura és més gran "
-"que l'espai d'adreces disponible"
+"La quantitat de memòria necessària per processar l'escriptura és més gran que "
+"l'espai d'adreces disponible"
#: gio/gmemoryoutputstream.c:782
msgid "Requested seek before the beginning of the stream"
@@ -3673,8 +3644,7 @@ msgstr ""
"Ordres:\n"
" help Mostra aquesta informació\n"
" list-schemas Llista els esquemes instal·lats\n"
-" list-relocatable-schemas Llista els esquemes que es poden canviar de "
-"lloc\n"
+" list-relocatable-schemas Llista els esquemes que es poden canviar de lloc\n"
" list-keys Llista les claus d'un esquema\n"
" list-children Llista els fills d'un esquema\n"
" list-recursively Llista les claus i els valors recursivament\n"
@@ -3706,8 +3676,7 @@ msgstr ""
#: gio/gsettings-tool.c:699
msgid " SCHEMADIR A directory to search for additional schemas\n"
-msgstr ""
-" DIRECTORI_D'ESQUEMES Un directori on cercar-hi esquemes addicionals\n"
+msgstr " DIRECTORI_D'ESQUEMES Un directori on cercar-hi esquemes addicionals\n"
#: gio/gsettings-tool.c:707
msgid ""
@@ -3793,8 +3762,8 @@ msgstr ""
#, c-format
msgid "Cannot use datagram operations on a socket with a timeout set."
msgstr ""
-"No es poden realitzar operacions de datagrames a un sòcol que tingui un "
-"temps d'espera màxim establert."
+"No es poden realitzar operacions de datagrames a un sòcol que tingui un temps "
+"d'espera màxim establert."
#: gio/gsocket.c:1943
#, c-format
@@ -3934,17 +3903,16 @@ msgstr "No s'ha pogut connectar a %s: "
msgid "Could not connect: "
msgstr "No s'ha pogut connectar: "
-#: gio/gsocketclient.c:1032 gio/gsocketclient.c:1749
+#: gio/gsocketclient.c:1032 gio/gsocketclient.c:1731
msgid "Unknown error on connect"
msgstr "S'ha produït un error desconegut en connectar-se"
-#: gio/gsocketclient.c:1086 gio/gsocketclient.c:1657
+#: gio/gsocketclient.c:1086 gio/gsocketclient.c:1640
msgid "Proxying over a non-TCP connection is not supported."
msgstr ""
-"Encara no es pot fer de servidor intermediari d'una connexió que no sigui "
-"TCP."
+"Encara no es pot fer de servidor intermediari d'una connexió que no sigui TCP."
-#: gio/gsocketclient.c:1115 gio/gsocketclient.c:1683
+#: gio/gsocketclient.c:1115 gio/gsocketclient.c:1666
#, c-format
msgid "Proxy protocol “%s” is not supported."
msgstr "El protocol del servidor intermediari «%s» no està implementat."
@@ -3998,8 +3966,7 @@ msgstr ""
#: gio/gsocks5proxy.c:206
msgid "Username or password is too long for SOCKSv5 protocol."
msgstr ""
-"El protocol SOCKSv5 no permet un nom d'usuari o de contrasenya d'aquesta "
-"mida."
+"El protocol SOCKSv5 no permet un nom d'usuari o de contrasenya d'aquesta mida."
#: gio/gsocks5proxy.c:236
msgid "SOCKSv5 authentication failed due to wrong username or password."
@@ -4079,7 +4046,7 @@ msgid "Temporarily unable to resolve “%s”"
msgstr "No s'ha pogut resoldre «%s» de forma temporal"
#: gio/gthreadedresolver.c:663 gio/gthreadedresolver.c:840
-#: gio/gthreadedresolver.c:950
+#: gio/gthreadedresolver.c:948
#, c-format
msgid "Error resolving “%s”"
msgstr "S'ha produït un error en resoldre «%s»"
@@ -4106,8 +4073,8 @@ msgstr "No s'ha pogut analitzar el certificat codificat amb PEM"
#: gio/gtlspassword.c:111
msgid ""
-"This is the last chance to enter the password correctly before your access "
-"is locked out."
+"This is the last chance to enter the password correctly before your access is "
+"locked out."
msgstr ""
"Últim intent per introduir la contrasenya correctament abans que se us "
"bloquegi l'accés."
@@ -4116,8 +4083,8 @@ msgstr ""
#. * displayed when more than one attempt is allowed.
#: gio/gtlspassword.c:115
msgid ""
-"Several passwords entered have been incorrect, and your access will be "
-"locked out after further failures."
+"Several passwords entered have been incorrect, and your access will be locked "
+"out after further failures."
msgstr ""
"S'han introduït diverses contrasenyes errònies i se us bloquejarà l'accés "
"després de més intents."
@@ -4286,14 +4253,14 @@ msgstr "No s'esperava l'atribut «%s» per a l'element «%s»"
msgid "Attribute “%s” of element “%s” not found"
msgstr "No s'ha trobat l'atribut «%s» de l'element «%s»"
-#: glib/gbookmarkfile.c:1164 glib/gbookmarkfile.c:1229
-#: glib/gbookmarkfile.c:1293 glib/gbookmarkfile.c:1303
+#: glib/gbookmarkfile.c:1164 glib/gbookmarkfile.c:1229 glib/gbookmarkfile.c:1293
+#: glib/gbookmarkfile.c:1303
#, c-format
msgid "Unexpected tag “%s”, tag “%s” expected"
msgstr "No s'esperava l'etiqueta «%s», s'esperava «%s»"
-#: glib/gbookmarkfile.c:1189 glib/gbookmarkfile.c:1203
-#: glib/gbookmarkfile.c:1271 glib/gbookmarkfile.c:1317
+#: glib/gbookmarkfile.c:1189 glib/gbookmarkfile.c:1203 glib/gbookmarkfile.c:1271
+#: glib/gbookmarkfile.c:1317
#, c-format
msgid "Unexpected tag “%s” inside “%s”"
msgstr "No s'esperava l'etiqueta «%s» dins «%s»"
@@ -4308,15 +4275,12 @@ msgstr ""
msgid "A bookmark for URI “%s” already exists"
msgstr "Ja existeix una adreça d'interès per a l'URI «%s»"
-#: glib/gbookmarkfile.c:2060 glib/gbookmarkfile.c:2218
-#: glib/gbookmarkfile.c:2303 glib/gbookmarkfile.c:2383
-#: glib/gbookmarkfile.c:2468 glib/gbookmarkfile.c:2551
-#: glib/gbookmarkfile.c:2629 glib/gbookmarkfile.c:2708
-#: glib/gbookmarkfile.c:2750 glib/gbookmarkfile.c:2847
-#: glib/gbookmarkfile.c:2968 glib/gbookmarkfile.c:3158
-#: glib/gbookmarkfile.c:3234 glib/gbookmarkfile.c:3402
-#: glib/gbookmarkfile.c:3491 glib/gbookmarkfile.c:3580
-#: glib/gbookmarkfile.c:3699
+#: glib/gbookmarkfile.c:2060 glib/gbookmarkfile.c:2218 glib/gbookmarkfile.c:2303
+#: glib/gbookmarkfile.c:2383 glib/gbookmarkfile.c:2468 glib/gbookmarkfile.c:2551
+#: glib/gbookmarkfile.c:2629 glib/gbookmarkfile.c:2708 glib/gbookmarkfile.c:2750
+#: glib/gbookmarkfile.c:2847 glib/gbookmarkfile.c:2968 glib/gbookmarkfile.c:3158
+#: glib/gbookmarkfile.c:3234 glib/gbookmarkfile.c:3402 glib/gbookmarkfile.c:3491
+#: glib/gbookmarkfile.c:3580 glib/gbookmarkfile.c:3699
#, c-format
msgid "No bookmark found for URI “%s”"
msgstr "No s'ha trobat cap adreça d'interès per a l'URI «%s»"
@@ -4938,8 +4902,8 @@ msgstr "No és un fitxer regular"
msgid ""
"Key file contains line “%s” which is not a key-value pair, group, or comment"
msgstr ""
-"El fitxer de claus conté la línia «%s» que no és una parella clau-valor, "
-"grup o comentari"
+"El fitxer de claus conté la línia «%s» que no és una parella clau-valor, grup "
+"o comentari"
#: glib/gkeyfile.c:1332
#, c-format
@@ -4980,8 +4944,7 @@ msgstr ""
#: glib/gkeyfile.c:1960 glib/gkeyfile.c:2076 glib/gkeyfile.c:2518
#, c-format
-msgid ""
-"Key file contains key “%s” which has a value that cannot be interpreted."
+msgid "Key file contains key “%s” which has a value that cannot be interpreted."
msgstr ""
"El fitxer de claus conté la clau «%s», que té un valor que no es pot "
"interpretar."
@@ -4992,8 +4955,8 @@ msgid ""
"Key file contains key “%s” in group “%s” which has a value that cannot be "
"interpreted."
msgstr ""
-"El fitxer de claus conté la clau «%s» en el grup «%s», que té un valor que "
-"no es pot interpretar."
+"El fitxer de claus conté la clau «%s» en el grup «%s», que té un valor que no "
+"es pot interpretar."
#: glib/gkeyfile.c:2814 glib/gkeyfile.c:2891
#, c-format
@@ -5075,6 +5038,7 @@ msgstr "S'ha produït un error a la línia %d: %s"
#: glib/gmarkup.c:690
#, c-format
+#| msgid ""
msgid ""
"Failed to parse “%-.*s”, which should have been a digit inside a character "
"reference (&#234; for example) — perhaps the digit is too large"
@@ -5089,8 +5053,8 @@ msgid ""
"as &amp;"
msgstr ""
"La referència del caràcter no acaba amb un punt i coma. Segurament heu "
-"utilitzat un caràcter «&» sense intenció d'iniciar una entitat. Substituïu "
-"el caràcter «&» per &amp;"
+"utilitzat un caràcter «&» sense intenció d'iniciar una entitat. Substituïu el "
+"caràcter «&» per &amp;"
#: glib/gmarkup.c:728
#, c-format
@@ -5134,8 +5098,7 @@ msgstr ""
#: glib/gmarkup.c:1270
#, c-format
msgid ""
-"Odd character “%s”, expected a “>” character to end the empty-element tag "
-"“%s”"
+"Odd character “%s”, expected a “>” character to end the empty-element tag “%s”"
msgstr ""
"S'ha trobat un caràcter estrany: «%s». S'esperava el caràcter «>» per tancar "
"l'etiqueta d'element buit «%s»"
@@ -5174,8 +5137,8 @@ msgid ""
"“%s” is not a valid character following the characters “</”; “%s” may not "
"begin an element name"
msgstr ""
-"«%s» no és un caràcter vàlid després dels caràcters «</»; «%s» no pot "
-"iniciar un nom d'element"
+"«%s» no és un caràcter vàlid després dels caràcters «</»; «%s» no pot iniciar "
+"un nom d'element"
#: glib/gmarkup.c:1611
#, c-format
@@ -5218,8 +5181,8 @@ msgstr ""
#: glib/gmarkup.c:1815
#, c-format
msgid ""
-"Document ended unexpectedly, expected to see a close angle bracket ending "
-"the tag <%s/>"
+"Document ended unexpectedly, expected to see a close angle bracket ending the "
+"tag <%s/>"
msgstr ""
"El document ha acabat de manera inesperada. S'esperava trobar un símbol «>» "
"que acabés l'etiqueta <%s/>."
@@ -5243,8 +5206,8 @@ msgid ""
"Document ended unexpectedly after the equals sign following an attribute "
"name; no attribute value"
msgstr ""
-"El document ha acabat de manera inesperada després d'un signe d'igual "
-"després d'un nom d'atribut. No hi ha cap valor d'atribut."
+"El document ha acabat de manera inesperada després d'un signe d'igual després "
+"d'un nom d'atribut. No hi ha cap valor d'atribut."
#: glib/gmarkup.c:1845
msgid "Document ended unexpectedly while inside an attribute value"
@@ -5258,8 +5221,7 @@ msgstr ""
"de l'element «%s»"
#: glib/gmarkup.c:1866
-msgid ""
-"Document ended unexpectedly inside the close tag for an unopened element"
+msgid "Document ended unexpectedly inside the close tag for an unopened element"
msgstr ""
"El document ha acabat de manera inesperada enmig de l'etiqueta de tancament "
"per un element no obert"
@@ -5349,8 +5311,7 @@ msgstr "s'ha arribat al límit de tornades enrere"
#: glib/gregex.c:278 glib/gregex.c:286
msgid "the pattern contains items not supported for partial matching"
msgstr ""
-"el patró conté elements que no estan implementats en les concordances "
-"parcials"
+"el patró conté elements que no estan implementats en les concordances parcials"
#: glib/gregex.c:280
msgid "internal error"
@@ -5359,8 +5320,7 @@ msgstr "error intern"
#: glib/gregex.c:288
msgid "back references as conditions are not supported for partial matching"
msgstr ""
-"no s'ha implementat l'ús de referències anteriors per a coincidències "
-"parcials"
+"no s'ha implementat l'ús de referències anteriors per a coincidències parcials"
#: glib/gregex.c:297
msgid "recursion limit reached"
@@ -5432,8 +5392,7 @@ msgstr "no es reconeix el caràcter després de «(?» o «(?-»"
#: glib/gregex.c:363
msgid "POSIX named classes are supported only within a class"
-msgstr ""
-"només es permeten les classes amb nom de POSIX dins de la pròpia classe"
+msgstr "només es permeten les classes amb nom de POSIX dins de la pròpia classe"
#: glib/gregex.c:366
msgid "missing terminating )"
@@ -5913,24 +5872,28 @@ msgstr "%.1f kB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2341
#, c-format
+#| msgid "%.1f MB"
msgid "%.1f MB"
msgstr "%.1f MB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2343
#, c-format
+#| msgid "%.1f GB"
msgid "%.1f GB"
msgstr "%.1f GB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2345
#, c-format
+#| msgid "%.1f TB"
msgid "%.1f TB"
msgstr "%.1f TB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2347
#, c-format
+#| msgid "%.1f PB"
msgid "%.1f PB"
msgstr "%.1f PB"
@@ -5980,13 +5943,13 @@ msgstr "%.1f EiB"
#: glib/gutils.c:2367
#, c-format
msgid "%.1f kb"
-msgstr "%.1f kb"
+msgstr "%.1f kB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2369
#, c-format
msgid "%.1f Mb"
-msgstr "%.1f Mb"
+msgstr "%.1f MB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2371
@@ -6039,12 +6002,14 @@ msgstr "%.1f Tib"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2389
#, c-format
+#| msgid "%.1f PiB"
msgid "%.1f Pib"
-msgstr "%.1f Pib"
+msgstr "%.1f PiB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
#: glib/gutils.c:2391
#, c-format
+#| msgid "%.1f EiB"
msgid "%.1f Eib"
msgstr "%.1f Eib"
diff --git a/po/de.po b/po/de.po
index 9cb8221ab..98c50d012 100644
--- a/po/de.po
+++ b/po/de.po
@@ -2719,7 +2719,7 @@ msgid ""
"desktop/” or “/system/” are deprecated."
msgstr ""
"Warnung: Schema »%s« hat den Pfad »%s«. Mit »/apps/«, »/desktop/« oder »/"
-"system/« beginnende Pfade gelten jedoch als veraltet."
+"system/« beginnende Pfade gelten jecoh als veraltet."
#: gio/glib-compile-schemas.c:1271
#, c-format
diff --git a/po/eu.po b/po/eu.po
index 6d02af83c..3812057c0 100644
--- a/po/eu.po
+++ b/po/eu.po
@@ -5,903 +5,1009 @@
# Hizkuntza Politikarako Sailburuordetza <hizpol@ej-gv.es>, 2004.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2004, 2005, 2006, 2007, 2008, 2009, 2010.
# Iñaki Larrañaga Murgoitio <dooteo@zundan.com>, 2011, 2012, 2013, 2014, 2015, 2016, 2017.
-# Asier Sarasua Garmendia <asier.sarasua@gmail.com>, 2019.
msgid ""
-msgstr "Project-Id-Version: glib master\n"
-"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib/issues\n"
-"POT-Creation-Date: 2019-03-05 18:03+0000\n"
-"PO-Revision-Date: 2019-03-09 10:00+0100\n"
-"Last-Translator: Asier Sarasua Garmendia <asier.sarasua@gmail.com>\n"
+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 06:44+0000\n"
+"PO-Revision-Date: 2017-08-27 13:30+0200\n"
+"Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@zundan.com>\n"
"Language-Team: Basque <librezale@librezale.eus>\n"
"Language: eu\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: OmegaT 4.1.5\n"
+"X-Generator: Lokalize 1.5\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-#: gio/gapplication.c:499
+#: ../gio/gapplication.c:490
msgid "GApplication options"
msgstr "GApplication-en aukerak"
-#: gio/gapplication.c:499
+#: ../gio/gapplication.c:490
msgid "Show GApplication options"
msgstr "Erakutsi GApplication-en aukerak"
-#: gio/gapplication.c:544
+#: ../gio/gapplication.c:535
msgid "Enter GApplication service mode (use from D-Bus service files)"
-msgstr "Sartu GApplication zerbitzu moduan (erabili D-Bus zerbitzuaren fitxategietatik)"
+msgstr ""
+"Sartu GApplication zerbitzu moduan (erabili D-Bus zerbitzuaren "
+"fitxategietatik)"
-#: gio/gapplication.c:556
+#: ../gio/gapplication.c:547
msgid "Override the application’s ID"
msgstr "Gainidatzi aplikazioaren IDa"
-#: gio/gapplication.c:568
-msgid "Replace the running instance"
-msgstr "Ordeztu exekuzioan dagoen instantzia"
-
-#: gio/gapplication-tool.c:45 gio/gapplication-tool.c:46 gio/gio-tool.c:227
-#: gio/gresource-tool.c:495 gio/gsettings-tool.c:569
+#: ../gio/gapplication-tool.c:45 ../gio/gapplication-tool.c:46
+#: ../gio/gio-tool.c:227 ../gio/gresource-tool.c:488
+#: ../gio/gsettings-tool.c:522
msgid "Print help"
msgstr "Erakutsi laguntza"
-#: gio/gapplication-tool.c:47 gio/gresource-tool.c:496 gio/gresource-tool.c:564
+#: ../gio/gapplication-tool.c:47 ../gio/gresource-tool.c:489
+#: ../gio/gresource-tool.c:557
msgid "[COMMAND]"
msgstr "[KOMANDOA]"
-#: gio/gapplication-tool.c:49 gio/gio-tool.c:228
+#: ../gio/gapplication-tool.c:49 ../gio/gio-tool.c:228
msgid "Print version"
-msgstr "Bistaratu bertsioa"
+msgstr "Erakutsi bertsioa"
-#: gio/gapplication-tool.c:50 gio/gsettings-tool.c:575
+#: ../gio/gapplication-tool.c:50 ../gio/gsettings-tool.c:528
msgid "Print version information and exit"
msgstr "Erakutsi bertsioaren informazioa eta irten"
-#: gio/gapplication-tool.c:52
+#: ../gio/gapplication-tool.c:52
msgid "List applications"
msgstr "Zerrendatu aplikazioak"
-#: gio/gapplication-tool.c:53
+#: ../gio/gapplication-tool.c:53
msgid "List the installed D-Bus activatable applications (by .desktop files)"
-msgstr "Zerrendatu instalatutako aplikazioak D-Bus-agatik aktibagarriak (.desktop fitxategien arabera)"
+msgstr ""
+"Zerrendatu instalatutako aplikazioak D-Bus-agatik aktibagarriak (.desktop "
+"fitxategien arabera)"
-#: gio/gapplication-tool.c:55
+#: ../gio/gapplication-tool.c:55
msgid "Launch an application"
msgstr "Abiarazi aplikazioa"
-#: gio/gapplication-tool.c:56
+#: ../gio/gapplication-tool.c:56
msgid "Launch the application (with optional files to open)"
msgstr "Abiarazi aplikazioa (aukerako fitxategiekin irekitzeko)"
-#: gio/gapplication-tool.c:57
+#: ../gio/gapplication-tool.c:57
msgid "APPID [FILE…]"
msgstr "APPID [FITXATEGIA…]"
-#: gio/gapplication-tool.c:59
+#: ../gio/gapplication-tool.c:59
msgid "Activate an action"
msgstr "Aktibatu ekintza bat"
-#: gio/gapplication-tool.c:60
+#: ../gio/gapplication-tool.c:60
msgid "Invoke an action on the application"
msgstr "Deitu aplikazioaren ekintza bati"
-#: gio/gapplication-tool.c:61
+#: ../gio/gapplication-tool.c:61
msgid "APPID ACTION [PARAMETER]"
msgstr "APP_ID EKINTZA [PARAMETROA]"
-#: gio/gapplication-tool.c:63
+#: ../gio/gapplication-tool.c:63
msgid "List available actions"
msgstr "Zerrendatu ekintza erabilgarriak"
-#: gio/gapplication-tool.c:64
+#: ../gio/gapplication-tool.c:64
msgid "List static actions for an application (from .desktop file)"
msgstr "Zerrendatu aplikazioaren ekintza estatikoak (.desktop fitxategitik)"
-#: gio/gapplication-tool.c:65 gio/gapplication-tool.c:71
+#: ../gio/gapplication-tool.c:65 ../gio/gapplication-tool.c:71
msgid "APPID"
msgstr "APP_ID"
-#: gio/gapplication-tool.c:70 gio/gapplication-tool.c:133 gio/gdbus-tool.c:90
-#: gio/gio-tool.c:224
+#: ../gio/gapplication-tool.c:70 ../gio/gapplication-tool.c:133
+#: ../gio/gdbus-tool.c:90 ../gio/gio-tool.c:224
msgid "COMMAND"
msgstr "KOMANDOA"
-#: gio/gapplication-tool.c:70
+#: ../gio/gapplication-tool.c:70
msgid "The command to print detailed help for"
msgstr "Erakutsi komandoaren laguntza xehea"
-#: gio/gapplication-tool.c:71
+#: ../gio/gapplication-tool.c:71
msgid "Application identifier in D-Bus format (eg: org.example.viewer)"
-msgstr "Aplikazioaren identifikatzailea D-bus formatuan (adib: org.example.viewer)"
+msgstr ""
+"Aplikazioaren identifikatzailea D-bus formatuan (adib: org.example.viewer)"
-#: gio/gapplication-tool.c:72 gio/glib-compile-resources.c:738
-#: gio/glib-compile-resources.c:744 gio/glib-compile-resources.c:772
-#: gio/gresource-tool.c:502 gio/gresource-tool.c:568
+#: ../gio/gapplication-tool.c:72 ../gio/glib-compile-resources.c:665
+#: ../gio/glib-compile-resources.c:671 ../gio/glib-compile-resources.c:698
+#: ../gio/gresource-tool.c:495 ../gio/gresource-tool.c:561
msgid "FILE"
msgstr "FITXATEGIA"
-#: gio/gapplication-tool.c:72
+#: ../gio/gapplication-tool.c:72
msgid "Optional relative or absolute filenames, or URIs to open"
msgstr "Aukerako fitxategi-izen erlatibo edo absolutuak, edo URIak irekitzeko"
-#: gio/gapplication-tool.c:73
+#: ../gio/gapplication-tool.c:73
msgid "ACTION"
msgstr "EKINTZA"
-#: gio/gapplication-tool.c:73
+#: ../gio/gapplication-tool.c:73
msgid "The action name to invoke"
msgstr "Ekintzaren izena deitzeko"
-#: gio/gapplication-tool.c:74
+#: ../gio/gapplication-tool.c:74
msgid "PARAMETER"
msgstr "PARAMETROA"
-#: gio/gapplication-tool.c:74
+#: ../gio/gapplication-tool.c:74
msgid "Optional parameter to the action invocation, in GVariant format"
msgstr "Ekintza deitzean emango zaion parametroa, GVariant formatuan"
-#: gio/gapplication-tool.c:96 gio/gresource-tool.c:533 gio/gsettings-tool.c:661
+#: ../gio/gapplication-tool.c:96 ../gio/gresource-tool.c:526
+#: ../gio/gsettings-tool.c:614
#, c-format
msgid ""
"Unknown command %s\n"
"\n"
-msgstr "'%s' komando ezezaguna\n"
+msgstr ""
+"'%s' komando ezezaguna\n"
"\n"
-#: gio/gapplication-tool.c:101
+#: ../gio/gapplication-tool.c:101
msgid "Usage:\n"
msgstr "Erabilera:\n"
-#: gio/gapplication-tool.c:114 gio/gresource-tool.c:558
-#: gio/gsettings-tool.c:696
+#: ../gio/gapplication-tool.c:114 ../gio/gresource-tool.c:551
+#: ../gio/gsettings-tool.c:649
msgid "Arguments:\n"
msgstr "Argumentuak:\n"
-#: gio/gapplication-tool.c:133 gio/gio-tool.c:224
+#: ../gio/gapplication-tool.c:133
msgid "[ARGS…]"
msgstr "[ARGUMENTUAK…]"
-#: gio/gapplication-tool.c:134
+#: ../gio/gapplication-tool.c:134
#, c-format
msgid "Commands:\n"
msgstr "Komandoak:\n"
#. Translators: do not translate 'help', but please translate 'COMMAND'.
-#: gio/gapplication-tool.c:146
+#: ../gio/gapplication-tool.c:146
#, c-format
msgid ""
"Use “%s help COMMAND” to get detailed help.\n"
"\n"
-msgstr "Erabili “%s help KOMANDOA“ laguntza xehea lortzeko.\n"
+msgstr ""
+"Erabili “%s help KOMANDOA“ laguntza xehea lortzeko.\n"
"\n"
-#: gio/gapplication-tool.c:165
+#: ../gio/gapplication-tool.c:165
#, c-format
msgid ""
"%s command requires an application id to directly follow\n"
"\n"
-msgstr "'%s' komandoak aplikazioaren IDa behar du zuzenean jarraitzeko\n"
+msgstr ""
+"'%s' komandoak aplikazioaren IDa behar du zuzenean jarraitzeko\n"
"\n"
-#: gio/gapplication-tool.c:171
+#: ../gio/gapplication-tool.c:171
#, c-format
msgid "invalid application id: “%s”\n"
msgstr "aplikazioaren IDa baliogabea: “%s“\n"
#. Translators: %s is replaced with a command name like 'list-actions'
-#: gio/gapplication-tool.c:182
+#: ../gio/gapplication-tool.c:182
#, c-format
msgid ""
"“%s” takes no arguments\n"
"\n"
-msgstr "“%s“ ez du argumenturik hartzen\n"
+msgstr ""
+"“%s“ ez du argumenturik hartzen\n"
"\n"
-#: gio/gapplication-tool.c:266
+#: ../gio/gapplication-tool.c:266
#, c-format
msgid "unable to connect to D-Bus: %s\n"
msgstr "ezin da D-Bus-arekin konektatu: %s\n"
-#: gio/gapplication-tool.c:286
+#: ../gio/gapplication-tool.c:286
#, c-format
msgid "error sending %s message to application: %s\n"
msgstr "errorea '%s' mezua aplikazioari bidaltzean: %s\n"
-#: gio/gapplication-tool.c:317
+#: ../gio/gapplication-tool.c:317
+#, c-format
msgid "action name must be given after application id\n"
msgstr "ekintzaren izena eman behar da aplikazioaren IDaren ondoren\n"
-#: gio/gapplication-tool.c:325
+#: ../gio/gapplication-tool.c:325
#, c-format
msgid ""
"invalid action name: “%s”\n"
"action names must consist of only alphanumerics, “-” and “.”\n"
-msgstr "baliogabeko ekintza-izena: “%s“\n"
+msgstr ""
+"baliogabeko ekintza-izena: “%s“\n"
"ekintzaren izenak soilik alfazenbakizko, “-“ eta “.“ karaktereak\n"
"eduki ditzake\n"
-#: gio/gapplication-tool.c:344
+#: ../gio/gapplication-tool.c:344
#, c-format
msgid "error parsing action parameter: %s\n"
msgstr "errorea ekintzaren parametroa analizatzean: %s\n"
-#: gio/gapplication-tool.c:356
+#: ../gio/gapplication-tool.c:356
+#, c-format
msgid "actions accept a maximum of one parameter\n"
msgstr "ekintzak gehienez parametro bat onartzen du\n"
-#: gio/gapplication-tool.c:411
+#: ../gio/gapplication-tool.c:411
+#, c-format
msgid "list-actions command takes only the application id"
msgstr "'list-actions' komandoak soilik aplikazioaren IDa hartzen du"
-#: gio/gapplication-tool.c:421
+#: ../gio/gapplication-tool.c:421
#, c-format
msgid "unable to find desktop file for application %s\n"
msgstr "ezin da '%s' aplikazioaren '.desktop' fitxtaegia aurkitu\n"
-#: gio/gapplication-tool.c:466
+#: ../gio/gapplication-tool.c:466
#, c-format
msgid ""
"unrecognised command: %s\n"
"\n"
-msgstr "komando ezezaguna: %s\n"
+msgstr ""
+"komando ezezaguna: %s\n"
"\n"
-#: gio/gbufferedinputstream.c:420 gio/gbufferedinputstream.c:498
-#: gio/ginputstream.c:179 gio/ginputstream.c:379 gio/ginputstream.c:617
-#: gio/ginputstream.c:1019 gio/goutputstream.c:223 gio/goutputstream.c:1049
-#: gio/gpollableinputstream.c:205 gio/gpollableoutputstream.c:277
+#: ../gio/gbufferedinputstream.c:420 ../gio/gbufferedinputstream.c:498
+#: ../gio/ginputstream.c:179 ../gio/ginputstream.c:379
+#: ../gio/ginputstream.c:617 ../gio/ginputstream.c:1019
+#: ../gio/goutputstream.c:203 ../gio/goutputstream.c:834
+#: ../gio/gpollableinputstream.c:205 ../gio/gpollableoutputstream.c:206
#, c-format
msgid "Too large count value passed to %s"
msgstr "Zenbaketaren balio handiegia honi pasatuta: %s"
-#: gio/gbufferedinputstream.c:891 gio/gbufferedoutputstream.c:575
-#: gio/gdataoutputstream.c:562
+#: ../gio/gbufferedinputstream.c:891 ../gio/gbufferedoutputstream.c:575
+#: ../gio/gdataoutputstream.c:562
msgid "Seek not supported on base stream"
msgstr "Ez da bilaketarik onartzen oinarrizko korrontean"
-#: gio/gbufferedinputstream.c:937
+#: ../gio/gbufferedinputstream.c:937
msgid "Cannot truncate GBufferedInputStream"
msgstr "Ezin da GBufferedInputStream trunkatu"
-#: gio/gbufferedinputstream.c:982 gio/ginputstream.c:1208 gio/giostream.c:300
-#: gio/goutputstream.c:2198
+#: ../gio/gbufferedinputstream.c:982 ../gio/ginputstream.c:1208
+#: ../gio/giostream.c:300 ../gio/goutputstream.c:1660
msgid "Stream is already closed"
msgstr "Korrontea jadanik itxita dago"
-#: gio/gbufferedoutputstream.c:612 gio/gdataoutputstream.c:592
+#: ../gio/gbufferedoutputstream.c:612 ../gio/gdataoutputstream.c:592
msgid "Truncate not supported on base stream"
msgstr "Trunkatzea ez da onartzen oinarrizko korrontean"
-#: gio/gcancellable.c:317 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1402
-#: gio/gsimpleasyncresult.c:871 gio/gsimpleasyncresult.c:897
+#: ../gio/gcancellable.c:317 ../gio/gdbusconnection.c:1849
+#: ../gio/gdbusprivate.c:1402 ../gio/gsimpleasyncresult.c:870
+#: ../gio/gsimpleasyncresult.c:896
#, c-format
msgid "Operation was cancelled"
msgstr "Eragiketa bertan behera utzi da"
-#: gio/gcharsetconverter.c:260
+#: ../gio/gcharsetconverter.c:260
msgid "Invalid object, not initialized"
msgstr "Baliogabeko objektua, hasieratu gabe dago"
-#: gio/gcharsetconverter.c:281 gio/gcharsetconverter.c:309
+#: ../gio/gcharsetconverter.c:281 ../gio/gcharsetconverter.c:309
msgid "Incomplete multibyte sequence in input"
msgstr "Byteen sekuentzia baliogabea sarreran"
-#: gio/gcharsetconverter.c:315 gio/gcharsetconverter.c:324
+#: ../gio/gcharsetconverter.c:315 ../gio/gcharsetconverter.c:324
msgid "Not enough space in destination"
msgstr "Ez dago nahikoa lekurik helburuan"
-#: gio/gcharsetconverter.c:342 gio/gdatainputstream.c:848
-#: gio/gdatainputstream.c:1261 glib/gconvert.c:455 glib/gconvert.c:885
-#: glib/giochannel.c:1557 glib/giochannel.c:1599 glib/giochannel.c:2443
-#: glib/gutf8.c:869 glib/gutf8.c:1322
+#: ../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
msgid "Invalid byte sequence in conversion input"
msgstr "Byteen sekuentzia baliogabea bihurketa-sarreran"
-#: gio/gcharsetconverter.c:347 glib/gconvert.c:463 glib/gconvert.c:799
-#: glib/giochannel.c:1564 glib/giochannel.c:2455
+#: ../gio/gcharsetconverter.c:347 ../glib/gconvert.c:446 ../glib/gconvert.c:770
+#: ../glib/giochannel.c:1563 ../glib/giochannel.c:2454
#, c-format
msgid "Error during conversion: %s"
msgstr "Errorea bihurtzean: %s"
-#: gio/gcharsetconverter.c:445 gio/gsocket.c:1093
+#: ../gio/gcharsetconverter.c:445 ../gio/gsocket.c:1096
msgid "Cancellable initialization not supported"
msgstr "Hasieratzea bertan behera uztea ez dago onartuta"
-#: gio/gcharsetconverter.c:456 glib/gconvert.c:328 glib/giochannel.c:1385
+#: ../gio/gcharsetconverter.c:456 ../glib/gconvert.c:321
+#: ../glib/giochannel.c:1384
#, c-format
msgid "Conversion from character set “%s” to “%s” is not supported"
msgstr "“%s“ karaktere-multzoa “%s“ bihurtzea ez da onartzen"
-#: gio/gcharsetconverter.c:460 glib/gconvert.c:332
+#: ../gio/gcharsetconverter.c:460 ../glib/gconvert.c:325
#, c-format
msgid "Could not open converter from “%s” to “%s”"
msgstr "Ezin izan da “%s“(e)tik %s(e)rako bihurtzailea ireki"
-#: gio/gcontenttype.c:452
+#: ../gio/gcontenttype.c:358
#, c-format
msgid "%s type"
msgstr "%s mota"
-#: gio/gcontenttype-win32.c:177
+#: ../gio/gcontenttype-win32.c:177
msgid "Unknown type"
msgstr "Mota ezezaguna"
-#: gio/gcontenttype-win32.c:179
+#: ../gio/gcontenttype-win32.c:179
#, c-format
msgid "%s filetype"
msgstr "%s fitxategi mota"
-#: gio/gcredentials.c:315 gio/gcredentials.c:574
+#: ../gio/gcredentials.c:312 ../gio/gcredentials.c:571
msgid "GCredentials is not implemented on this OS"
msgstr "GCredentials ez dago inplementatuta S.E. honetan"
-#: gio/gcredentials.c:470
+#: ../gio/gcredentials.c:467
msgid "There is no GCredentials support for your platform"
msgstr "Ez dago GCredentials euskarririk plataforma honetan"
-#: gio/gcredentials.c:516
+#: ../gio/gcredentials.c:513
msgid "GCredentials does not contain a process ID on this OS"
msgstr "GCredentials-ek ez dauka prozesuaren IDrik S.E. honetan"
-#: gio/gcredentials.c:568
+#: ../gio/gcredentials.c:565
msgid "Credentials spoofing is not possible on this OS"
msgstr "Kredentzialak usurpatzea ezinezkoa da S.E. honetan"
-#: gio/gdatainputstream.c:304
+#: ../gio/gdatainputstream.c:304
msgid "Unexpected early end-of-stream"
msgstr "Ustekabeko korronte-amaiera azkarregia"
-#: gio/gdbusaddress.c:158 gio/gdbusaddress.c:246 gio/gdbusaddress.c:327
+#: ../gio/gdbusaddress.c:155 ../gio/gdbusaddress.c:243
+#: ../gio/gdbusaddress.c:324
#, c-format
msgid "Unsupported key “%s” in address entry “%s”"
msgstr "Onartu gabeko “%s“ gakoa helbidearen “%s“ sarreran"
-#: gio/gdbusaddress.c:185
+#: ../gio/gdbusaddress.c:182
#, c-format
msgid ""
"Address “%s” is invalid (need exactly one of path, tmpdir or abstract keys)"
-msgstr "“%s“ helbidea baliogabea da (gako hauetariko bat behar du: “path“ (bide-izena), “tmpdir“ (aldi baterako direktorioa) edo “abstract“ (abstraktua))"
+msgstr ""
+"“%s“ helbidea baliogabea da (gako hauetariko bat behar du: “path“ (bide-"
+"izena), “tmpdir“ (aldi baterako direktorioa) edo “abstract“ (abstraktua))"
-#: gio/gdbusaddress.c:198
+#: ../gio/gdbusaddress.c:195
#, c-format
msgid "Meaningless key/value pair combination in address entry “%s”"
-msgstr "Zentzurik gabeko gakoa/balioa bikotearen konbinazioa “%s“ helbidearen sarreran"
+msgstr ""
+"Zentzurik gabeko gakoa/balioa bikotearen konbinazioa “%s“ helbidearen "
+"sarreran"
-#: gio/gdbusaddress.c:261 gio/gdbusaddress.c:342
+#: ../gio/gdbusaddress.c:258 ../gio/gdbusaddress.c:339
#, c-format
msgid "Error in address “%s” — the port attribute is malformed"
msgstr "Errorea “%s“ helbidean — atakaren atributua gaizki osatuta dago"
-#: gio/gdbusaddress.c:272 gio/gdbusaddress.c:353
+#: ../gio/gdbusaddress.c:269 ../gio/gdbusaddress.c:350
#, c-format
msgid "Error in address “%s” — the family attribute is malformed"
msgstr "Errorea “%s“ helbidean — familiaren atributua gaizki osatuta dago"
-#: gio/gdbusaddress.c:423 gio/gdbusaddress.c:673
-#, c-format
-msgid "Unknown or unsupported transport “%s” for address “%s”"
-msgstr "“%2$s“ helbidearen “%1$s“ garraioa ezezaguna edo onartu gabea"
-
-#: gio/gdbusaddress.c:467
+#: ../gio/gdbusaddress.c:460
#, c-format
msgid "Address element “%s” does not contain a colon (:)"
msgstr "“%s“ helbidearen elementuak ez dauka bi punturik (:)"
-#: gio/gdbusaddress.c:488
+#: ../gio/gdbusaddress.c:481
#, c-format
msgid ""
"Key/Value pair %d, “%s”, in address element “%s” does not contain an equal "
"sign"
-msgstr "%d. gakoa/balioa bikoteak, “%s“, “%s“ helbidearen elementuan, ez dauka berdina (=) ikurrik"
+msgstr ""
+"%d. gakoa/balioa bikoteak, “%s“, “%s“ helbidearen elementuan, ez dauka "
+"berdina (=) ikurrik"
-#: gio/gdbusaddress.c:502
+#: ../gio/gdbusaddress.c:495
#, c-format
msgid ""
"Error unescaping key or value in Key/Value pair %d, “%s”, in address element "
"“%s”"
-msgstr "Errorea gakoa edo balioa iheseko modutik kentzean %d. gakoa/balioa bikotean, “%s“, “%s“ helbidearen elementuan"
+msgstr ""
+"Errorea gakoa edo balioa iheseko modutik kentzean %d. gakoa/balioa bikotean, "
+"“%s“, “%s“ helbidearen elementuan"
-#: gio/gdbusaddress.c:580
+#: ../gio/gdbusaddress.c:573
#, c-format
msgid ""
"Error in address “%s” — the unix transport requires exactly one of the keys "
"“path” or “abstract” to be set"
-msgstr "Errorea “%s“ helbidean - unix-eko garraioak “path“ edo “abstract“ gakoetariko bat behar du hain zuzen."
+msgstr ""
+"Errorea “%s“ helbidean - unix-eko garraioak “path“ edo “abstract“ "
+"gakoetariko bat behar du hain zuzen."
-#: gio/gdbusaddress.c:616
+#: ../gio/gdbusaddress.c:609
#, c-format
msgid "Error in address “%s” — the host attribute is missing or malformed"
-msgstr "Errorea “%s“ helbidean — ostalariaren atributua falta da edo gaizki osatuta dago"
+msgstr ""
+"Errorea “%s“ helbidean — ostalariaren atributua falta da edo gaizki osatuta "
+"dago"
-#: gio/gdbusaddress.c:630
+#: ../gio/gdbusaddress.c:623
#, c-format
msgid "Error in address “%s” — the port attribute is missing or malformed"
-msgstr "Errorea “%s“ helbidean — atakaren atributua falta da edo gaizki osatuta dago"
+msgstr ""
+"Errorea “%s“ helbidean — atakaren atributua falta da edo gaizki osatuta dago"
-#: gio/gdbusaddress.c:644
+#: ../gio/gdbusaddress.c:637
#, c-format
msgid "Error in address “%s” — the noncefile attribute is missing or malformed"
-msgstr "Errorea “%s“ helbidean — izendapenaren fitxategiaren atributua falta da edo gaizki osatuta dago"
+msgstr ""
+"Errorea “%s“ helbidean — izendapenaren fitxategiaren atributua falta da edo "
+"gaizki osatuta dago"
-#: gio/gdbusaddress.c:665
+#: ../gio/gdbusaddress.c:658
msgid "Error auto-launching: "
msgstr "Errorea automatikoki abiaraztean: "
-#: gio/gdbusaddress.c:718
+#: ../gio/gdbusaddress.c:666
+#, c-format
+msgid "Unknown or unsupported transport “%s” for address “%s”"
+msgstr "“%2$s“ helbidearen “%1$s“ garraioa ezezaguna edo onartu gabea"
+
+#: ../gio/gdbusaddress.c:704
#, c-format
msgid "Error opening nonce file “%s”: %s"
msgstr "Errorea “%s“ izendapeneko fitxategia irekitzean: %s"
-#: gio/gdbusaddress.c:737
+#: ../gio/gdbusaddress.c:723
#, c-format
msgid "Error reading from nonce file “%s”: %s"
msgstr "Errorea '%s“ izendapeneko fitxategitik irakurtzean: %s"
-#: gio/gdbusaddress.c:746
+#: ../gio/gdbusaddress.c:732
#, c-format
msgid "Error reading from nonce file “%s”, expected 16 bytes, got %d"
-msgstr "Errorea “%s“ izendapeneko fitxategitik irakurtzean: 16 byte espero ziren, baina %d lortu dira"
+msgstr ""
+"Errorea “%s“ izendapeneko fitxategitik irakurtzean: 16 byte espero ziren, "
+"baina %d lortu dira"
-#: gio/gdbusaddress.c:764
+#: ../gio/gdbusaddress.c:750
#, c-format
msgid "Error writing contents of nonce file “%s” to stream:"
msgstr "Errorea “%s“ izendapeneko fitxategiko edukia korrontean idaztean:"
-#: gio/gdbusaddress.c:973
+#: ../gio/gdbusaddress.c:959
msgid "The given address is empty"
msgstr "Emandako helbidea hutsik dago"
-#: gio/gdbusaddress.c:1086
+#: ../gio/gdbusaddress.c:1072
#, c-format
msgid "Cannot spawn a message bus when setuid"
msgstr "Ezin da mezuaren deia abiarazi 'setuid' duenean"
-#: gio/gdbusaddress.c:1093
+#: ../gio/gdbusaddress.c:1079
msgid "Cannot spawn a message bus without a machine-id: "
msgstr "Ezin da mezuaren deia abiarazi makinaren IDrik gabe: "
-#: gio/gdbusaddress.c:1100
+#: ../gio/gdbusaddress.c:1086
#, c-format
msgid "Cannot autolaunch D-Bus without X11 $DISPLAY"
msgstr "Ezin da D-Bus automatikoki abiarazi X11 $DISPLAY gabe"
-#: gio/gdbusaddress.c:1142
+#: ../gio/gdbusaddress.c:1128
#, c-format
msgid "Error spawning command line “%s”: "
msgstr "Errorea “%s“ komando-lerroa abiaraztean: "
-#: gio/gdbusaddress.c:1359
+#: ../gio/gdbusaddress.c:1345
#, c-format
msgid "(Type any character to close this window)\n"
msgstr "(Sakatu edozer tekla leihoa ixteko)\n"
-#: gio/gdbusaddress.c:1513
+#: ../gio/gdbusaddress.c:1499
#, c-format
msgid "Session dbus not running, and autolaunch failed"
-msgstr "Saioaren dbus ez da exekutatzen ari, eta abiarazte automatikoak huts egin du"
+msgstr ""
+"Saioaren dbus ez da exekutatzen ari, eta abiarazte automatikoak huts egin du"
-#: gio/gdbusaddress.c:1524
+#: ../gio/gdbusaddress.c:1510
#, c-format
msgid "Cannot determine session bus address (not implemented for this OS)"
-msgstr "Ezin da saioaren bus-eko helbidea zehaztu (ez dago S.E. honetan garatuta)"
+msgstr ""
+"Ezin da saioaren bus-eko helbidea zehaztu (ez dago S.E. honetan garatuta)"
-#: gio/gdbusaddress.c:1662 gio/gdbusconnection.c:7174
+#: ../gio/gdbusaddress.c:1648
#, c-format
msgid ""
"Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable "
"— unknown value “%s”"
-msgstr "Ezin da bus-aren helbidea zehaztua inguruneko DBUS_STARTER_BUS_TYPE aldagaitik. “%s“ balio ezezaguna"
+msgstr ""
+"Ezin da bus-aren helbidea zehaztua inguruneko DBUS_STARTER_BUS_TYPE "
+"aldagaitik. “%s“ balio ezezaguna"
-#: gio/gdbusaddress.c:1671 gio/gdbusconnection.c:7183
+#: ../gio/gdbusaddress.c:1657 ../gio/gdbusconnection.c:7155
msgid ""
"Cannot determine bus address because the DBUS_STARTER_BUS_TYPE environment "
"variable is not set"
-msgstr "Ezin da bus-aren helbidea zehaztua, inguruneko DBUS_STARTER_BUS_TYPE aldagaia ezarri gabe dagoelako"
+msgstr ""
+"Ezin da bus-aren helbidea zehaztua, inguruneko DBUS_STARTER_BUS_TYPE "
+"aldagaia ezarri gabe dagoelako"
-#: gio/gdbusaddress.c:1681
+#: ../gio/gdbusaddress.c:1667
#, c-format
msgid "Unknown bus type %d"
msgstr "%d bus mota ezezaguna"
-#: gio/gdbusauth.c:293
+#: ../gio/gdbusauth.c:293
msgid "Unexpected lack of content trying to read a line"
msgstr "Edukiaren zati bat falta da lerro bat irakurtzean"
-#: gio/gdbusauth.c:337
+#: ../gio/gdbusauth.c:337
msgid "Unexpected lack of content trying to (safely) read a line"
msgstr "Edukiaren zati bat falta da lerro bat modu seguruan irakurtzean"
-#: gio/gdbusauth.c:481
+#: ../gio/gdbusauth.c:508
#, c-format
msgid ""
"Exhausted all available authentication mechanisms (tried: %s) (available: %s)"
-msgstr "Autentifikazioko metodo guztiak agortuta (saiatuta: %s) (erabilgarri: %s)"
+msgstr ""
+"Autentifikazioko metodo guztiak agortuta (saiatuta: %s) (erabilgarri: %s)"
-#: gio/gdbusauth.c:1144
+#: ../gio/gdbusauth.c:1174
msgid "Cancelled via GDBusAuthObserver::authorize-authenticated-peer"
-msgstr "Bertan behera utzita GDBusAuthObserver::authorize-authenticated-peer erabiliz"
+msgstr ""
+"Bertan behera utzita GDBusAuthObserver::authorize-authenticated-peer erabiliz"
-#: gio/gdbusauthmechanismsha1.c:262
+#: ../gio/gdbusauthmechanismsha1.c:262
#, c-format
msgid "Error when getting information for directory “%s”: %s"
msgstr "Errorea “%s“ direktorioaren informazioa eskuratzean: %s"
-#: gio/gdbusauthmechanismsha1.c:274
+#: ../gio/gdbusauthmechanismsha1.c:274
#, c-format
msgid ""
"Permissions on directory “%s” are malformed. Expected mode 0700, got 0%o"
-msgstr "“%s“ direktorioko baimenak gaizki osatuta. 0700 modua espero zen, baina 0%o lortuta"
+msgstr ""
+"“%s“ direktorioko baimenak gaizki osatuta. 0700 modua espero zen, baina 0%o "
+"lortuta"
-#: gio/gdbusauthmechanismsha1.c:299
+#: ../gio/gdbusauthmechanismsha1.c:296
#, c-format
msgid "Error creating directory “%s”: %s"
msgstr "Errorea “%s“ direktorioa sortzean: %s"
-#: gio/gdbusauthmechanismsha1.c:346
+#: ../gio/gdbusauthmechanismsha1.c:379
#, c-format
msgid "Error opening keyring “%s” for reading: "
msgstr "Errorea “%s“ gako sorta irakurtzeko irekitzean: "
-#: gio/gdbusauthmechanismsha1.c:369 gio/gdbusauthmechanismsha1.c:687
+#: ../gio/gdbusauthmechanismsha1.c:403 ../gio/gdbusauthmechanismsha1.c:721
#, c-format
msgid "Line %d of the keyring at “%s” with content “%s” is malformed"
-msgstr "“%2$s“(e)ngo gako sortako %1$d. lerroa (“%3$s“ edukiarekin) gaizki osatuta dago"
+msgstr ""
+"“%2$s“(e)ngo gako sortako %1$d. lerroa (“%3$s“ edukiarekin) gaizki osatuta "
+"dago"
-#: gio/gdbusauthmechanismsha1.c:383 gio/gdbusauthmechanismsha1.c:701
+#: ../gio/gdbusauthmechanismsha1.c:417 ../gio/gdbusauthmechanismsha1.c:735
#, c-format
msgid ""
"First token of line %d of the keyring at “%s” with content “%s” is malformed"
-msgstr "“%2$s“(e)ngo gako sortako %1$d. lerroko aurreneko tokena (“%3$s“ edukiarekin) gaizki osatuta dago"
+msgstr ""
+"“%2$s“(e)ngo gako sortako %1$d. lerroko aurreneko tokena (“%3$s“ "
+"edukiarekin) gaizki osatuta dago"
-#: gio/gdbusauthmechanismsha1.c:397 gio/gdbusauthmechanismsha1.c:715
+#: ../gio/gdbusauthmechanismsha1.c:432 ../gio/gdbusauthmechanismsha1.c:749
#, c-format
msgid ""
"Second token of line %d of the keyring at “%s” with content “%s” is malformed"
-msgstr "“%2$s“(e)ngo gako sortako %1$d. lerroko bigarren tokena (“%3$s“ edukiarekin) gaizki osatuta dago"
+msgstr ""
+"“%2$s“(e)ngo gako sortako %1$d. lerroko bigarren tokena (“%3$s“ edukiarekin) "
+"gaizki osatuta dago"
-#: gio/gdbusauthmechanismsha1.c:421
+#: ../gio/gdbusauthmechanismsha1.c:456
#, c-format
msgid "Didn’t find cookie with id %d in the keyring at “%s”"
msgstr "Ez da %d IDko cookie-rik aurkitu “%s“(e)ngo gako sortan"
-#: gio/gdbusauthmechanismsha1.c:503
+#: ../gio/gdbusauthmechanismsha1.c:536
#, c-format
msgid "Error deleting stale lock file “%s”: %s"
msgstr "Errorea blokeoaren “%s“ fitxategi zaharkitua ezabatzean: %s"
-#: gio/gdbusauthmechanismsha1.c:535
+#: ../gio/gdbusauthmechanismsha1.c:569
#, c-format
msgid "Error creating lock file “%s”: %s"
msgstr "Errorea blokeoko “%s“ fitxategia sortzean: %s"
-#: gio/gdbusauthmechanismsha1.c:566
+#: ../gio/gdbusauthmechanismsha1.c:600
#, c-format
msgid "Error closing (unlinked) lock file “%s”: %s"
msgstr "Errorea blokeoko (estekatu gabeko) “%s“ fitxategia ixtean: %s"
-#: gio/gdbusauthmechanismsha1.c:577
+#: ../gio/gdbusauthmechanismsha1.c:611
#, c-format
msgid "Error unlinking lock file “%s”: %s"
msgstr "Errorea blokeoko “%s“ fitxategia desestekatzean: %s"
-#: gio/gdbusauthmechanismsha1.c:654
+#: ../gio/gdbusauthmechanismsha1.c:688
#, c-format
msgid "Error opening keyring “%s” for writing: "
msgstr "Errorea “%s“ gako sorta idazteko irekitzean: "
-#: gio/gdbusauthmechanismsha1.c:850
+#: ../gio/gdbusauthmechanismsha1.c:885
#, c-format
msgid "(Additionally, releasing the lock for “%s” also failed: %s) "
msgstr "(Gainera, “%s“(r)en blokeoa askatzeak ere huts egin du: %s) "
-#: gio/gdbusconnection.c:603 gio/gdbusconnection.c:2396
+#: ../gio/gdbusconnection.c:612 ../gio/gdbusconnection.c:2378
msgid "The connection is closed"
msgstr "Konexioa itxi egin da"
-#: gio/gdbusconnection.c:1897
+#: ../gio/gdbusconnection.c:1879
msgid "Timeout was reached"
msgstr "Denbora-mugara iritsi da"
-#: gio/gdbusconnection.c:2518
+#: ../gio/gdbusconnection.c:2500
msgid ""
"Unsupported flags encountered when constructing a client-side connection"
-msgstr "Onartu gabeko banderak aurkitu dira bezeroaren aldeko konexioa eraikitzean"
+msgstr ""
+"Onartu gabeko banderak aurkitu dira bezeroaren aldeko konexioa eraikitzean"
-#: gio/gdbusconnection.c:4147 gio/gdbusconnection.c:4494
+#: ../gio/gdbusconnection.c:4124 ../gio/gdbusconnection.c:4471
#, c-format
msgid ""
-"No such interface “org.freedesktop.DBus.Properties” on object at path %s"
-msgstr "Ez dago “org.freedesktop.DBus.Properties” interfazerik %s bide-izeneko objektuan"
+"No such interface 'org.freedesktop.DBus.Properties' on object at path %s"
+msgstr ""
+"Ez dago 'org.freedesktop.DBus.Properties' bezalako interfazerik '%s' bide-"
+"izeneko objektuan"
-#: gio/gdbusconnection.c:4289
+#: ../gio/gdbusconnection.c:4266
#, c-format
-msgid "No such property “%s”"
-msgstr "Ez dago “%s“ propietaterik"
+msgid "No such property '%s'"
+msgstr "Ez dago '%s' bezalako propietaterik"
-#: gio/gdbusconnection.c:4301
+#: ../gio/gdbusconnection.c:4278
#, c-format
-msgid "Property “%s” is not readable"
-msgstr "“%s“ propietatea ez da irakurgarria"
+msgid "Property '%s' is not readable"
+msgstr "%s propietatea ez da irakurgarria"
-#: gio/gdbusconnection.c:4312
+#: ../gio/gdbusconnection.c:4289
#, c-format
-msgid "Property “%s” is not writable"
-msgstr "“%s“ propietatea ez da idazgarria"
+msgid "Property '%s' is not writable"
+msgstr "%s propietatea ez da idazgarria"
-#: gio/gdbusconnection.c:4332
+#: ../gio/gdbusconnection.c:4309
#, c-format
-msgid "Error setting property “%s”: Expected type “%s” but got “%s”"
-msgstr "Errorea “%s“ propietatea ezartzean: “%s“ mota espero zen, baina “%s“ lortu da"
+msgid "Error setting property '%s': Expected type '%s' but got '%s'"
+msgstr ""
+"Errorea '%s' propietatea ezartzean: '%s' mota espero zen, baina '%s' lortu da"
-#: gio/gdbusconnection.c:4437 gio/gdbusconnection.c:4645
-#: gio/gdbusconnection.c:6614
+#: ../gio/gdbusconnection.c:4414 ../gio/gdbusconnection.c:4622
+#: ../gio/gdbusconnection.c:6586
#, c-format
-msgid "No such interface “%s”"
-msgstr "Ez dago “%s“ interfazerik"
+msgid "No such interface '%s'"
+msgstr "Ez dago '%s' bezalako interfazerik"
-#: gio/gdbusconnection.c:4863 gio/gdbusconnection.c:7123
+#: ../gio/gdbusconnection.c:4840 ../gio/gdbusconnection.c:7095
#, c-format
-msgid "No such interface “%s” on object at path %s"
-msgstr "Ez dago “%s“ interfazerik %s bide-izeneko objektuan"
+msgid "No such interface '%s' on object at path %s"
+msgstr "Ez dago '%s' bezalako interfazerik '%s' bide-izeneko objektuan"
-#: gio/gdbusconnection.c:4961
+#: ../gio/gdbusconnection.c:4938
#, c-format
-msgid "No such method “%s”"
-msgstr "Ez dago “%s“ metodorik"
+msgid "No such method '%s'"
+msgstr "Ez dago '%s' bezalako metodorik"
-#: gio/gdbusconnection.c:4992
+#: ../gio/gdbusconnection.c:4969
#, c-format
-msgid "Type of message, “%s”, does not match expected type “%s”"
-msgstr "“%s“ mezu mota ez dator bat espero zen “%s“ motarekin"
+msgid "Type of message, '%s', does not match expected type '%s'"
+msgstr "'%s' mezu mota ez dator bat espero zen '%s' motarekin"
-#: gio/gdbusconnection.c:5190
+#: ../gio/gdbusconnection.c:5167
#, c-format
msgid "An object is already exported for the interface %s at %s"
msgstr "Jadanik objektu bat esportatuta dago %s interfazearentzako %s(e)n"
-#: gio/gdbusconnection.c:5416
+#: ../gio/gdbusconnection.c:5393
#, c-format
msgid "Unable to retrieve property %s.%s"
msgstr "Ezin da %s.%s propietatea eskuratu"
-#: gio/gdbusconnection.c:5472
+#: ../gio/gdbusconnection.c:5449
#, c-format
msgid "Unable to set property %s.%s"
msgstr "Ezin da %s.%s propietatea ezarri"
-#: gio/gdbusconnection.c:5650
+#: ../gio/gdbusconnection.c:5625
#, c-format
-msgid "Method “%s” returned type “%s”, but expected “%s”"
-msgstr "“%s“ metodoak “%s“ mota itzuli du, baina “%s“ espero zen"
+msgid "Method '%s' returned type '%s', but expected '%s'"
+msgstr "'%s' metodoak '%s' mota itzuli du, baina '%s' espero zen"
-#: gio/gdbusconnection.c:6725
+#: ../gio/gdbusconnection.c:6697
#, c-format
-msgid "Method “%s” on interface “%s” with signature “%s” does not exist"
-msgstr "“%s“ metodoa, “%s“ interfazekoa eta “%s“ sinadura duena, ez da existitzen"
+msgid "Method '%s' on interface '%s' with signature '%s' does not exist"
+msgstr ""
+"'%2$s' interfazeko '%1$s' metodoa '%3$s' sinadurarekin ez da existitzen"
-#: gio/gdbusconnection.c:6846
+#: ../gio/gdbusconnection.c:6818
#, c-format
msgid "A subtree is already exported for %s"
msgstr "Azpizuhaitza jadanik %s(e)ra esportatuta"
-#: gio/gdbusmessage.c:1251
+#: ../gio/gdbusconnection.c:7146
+#, c-format
+msgid ""
+"Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment variable "
+"- unknown value '%s'"
+msgstr ""
+"Ezin da bus-aren helbidea zehaztua inguruneko DBUS_STARTER_BUS_TYPE "
+"aldagaitik. '%s' balio ezezaguna"
+
+#: ../gio/gdbusmessage.c:1246
msgid "type is INVALID"
msgstr "mota baliogabea da"
-#: gio/gdbusmessage.c:1262
+#: ../gio/gdbusmessage.c:1257
msgid "METHOD_CALL message: PATH or MEMBER header field is missing"
msgstr "METHOD_CALL-en mezua: goiburuko PATH edo MEMBER eremua falta da"
-#: gio/gdbusmessage.c:1273
+#: ../gio/gdbusmessage.c:1268
msgid "METHOD_RETURN message: REPLY_SERIAL header field is missing"
msgstr "METHOD_RETURN-en mezua: goiburuko REPLY_SERIAL eremua falta da"
-#: gio/gdbusmessage.c:1285
+#: ../gio/gdbusmessage.c:1280
msgid "ERROR message: REPLY_SERIAL or ERROR_NAME header field is missing"
msgstr "ERROR-en mezua: goiburuko REPLY_SERIAL edo ERROR_NAME eremua falta da"
-#: gio/gdbusmessage.c:1298
+#: ../gio/gdbusmessage.c:1293
msgid "SIGNAL message: PATH, INTERFACE or MEMBER header field is missing"
msgstr "SIGNAL-en mezua: goiburuko PATH, INTERFACE edo MEMBER eremua falta da"
-#: gio/gdbusmessage.c:1306
+#: ../gio/gdbusmessage.c:1301
msgid ""
"SIGNAL message: The PATH header field is using the reserved value /org/"
"freedesktop/DBus/Local"
-msgstr "SIGNAL-en mezua: goiburuko PATH eremua '/org/freedesktop/DBus/Local' balio erreserbatua erabiltzen ari da"
+msgstr ""
+"SIGNAL-en mezua: goiburuko PATH eremua '/org/freedesktop/DBus/Local' balio "
+"erreserbatua erabiltzen ari da"
-#: gio/gdbusmessage.c:1314
+#: ../gio/gdbusmessage.c:1309
msgid ""
"SIGNAL message: The INTERFACE header field is using the reserved value org."
"freedesktop.DBus.Local"
-msgstr "SIGNAL-en mezua: goiburuko INTERFACE eremua '/org/freedesktop/DBus/Local' balio erreserbatua erabiltzen ari da"
+msgstr ""
+"SIGNAL-en mezua: goiburuko INTERFACE eremua '/org/freedesktop/DBus/Local' "
+"balio erreserbatua erabiltzen ari da"
-#: gio/gdbusmessage.c:1362 gio/gdbusmessage.c:1422
+#: ../gio/gdbusmessage.c:1357 ../gio/gdbusmessage.c:1417
#, c-format
msgid "Wanted to read %lu byte but only got %lu"
msgid_plural "Wanted to read %lu bytes but only got %lu"
msgstr[0] "byte %lu irakurtzea nahi zen, baina soilik %lu lortu da"
msgstr[1] "%lu byte irakurtzea nahi ziren, baina %lu lortu da"
-#: gio/gdbusmessage.c:1376
+#: ../gio/gdbusmessage.c:1371
#, c-format
msgid "Expected NUL byte after the string “%s” but found byte %d"
-msgstr "NUL bytea espero zen “%s“ katearen ondoren, baina “%d“ bytea aurkitu da"
+msgstr ""
+"NUL bytea espero zen “%s“ katearen ondoren, baina “%d“ bytea aurkitu da"
-#: gio/gdbusmessage.c:1395
+#: ../gio/gdbusmessage.c:1390
#, c-format
msgid ""
"Expected valid UTF-8 string but found invalid bytes at byte offset %d "
"(length of string is %d). The valid UTF-8 string up until that point was “%s”"
-msgstr "Baliozko UTF-8 katea espero zen, baina baliogabeko byte batzuk aurkitu dira byteen %d desplazamenduan (katearen luzera: %d). Ordurarteko baliozko UTF-8 katea honakoa zen: “%s“"
+msgstr ""
+"Baliozko UTF-8 katea espero zen, baina baliogabeko byte batzuk aurkitu dira "
+"byteen %d desplazamenduan (katearen luzera: %d). Ordurarteko baliozko UTF-8 "
+"katea honakoa zen: “%s“"
-#: gio/gdbusmessage.c:1598
+#: ../gio/gdbusmessage.c:1589
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus object path"
-msgstr "Analizatutako “%s“ balioa ez da baliozko D-Bus objektuaren bide-izen bat"
+msgstr ""
+"Analizatutako “%s“ balioa ez da baliozko D-Bus objektuaren bide-izen bat"
-#: gio/gdbusmessage.c:1620
+#: ../gio/gdbusmessage.c:1611
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature"
msgstr "Analizatutako “%s“ balioa ez da baliozko D-Bus sinadura"
-#: gio/gdbusmessage.c:1667
+#: ../gio/gdbusmessage.c:1658
#, c-format
msgid ""
"Encountered array of length %u byte. Maximum length is 2<<26 bytes (64 MiB)."
msgid_plural ""
"Encountered array of length %u bytes. Maximum length is 2<<26 bytes (64 MiB)."
-msgstr[0] "%u byte luzerako matrizea aurkituta. Gehienezko luzera 2<<26 byte da (64 MiB)."
-msgstr[1] "%u byte luzerako matrizea aurkituta. Gehienezko luzera 2<<26 byte da (64 MiB)."
+msgstr[0] ""
+"%u byte luzerako matrizea aurkituta. Gehienezko luzera 2<<26 byte da (64 "
+"MiB)."
+msgstr[1] ""
+"%u byte luzerako matrizea aurkituta. Gehienezko luzera 2<<26 byte da (64 "
+"MiB)."
-#: gio/gdbusmessage.c:1687
+#: ../gio/gdbusmessage.c:1678
#, c-format
msgid ""
"Encountered array of type “a%c”, expected to have a length a multiple of %u "
"bytes, but found to be %u bytes in length"
-msgstr "“a%c' motako matrizea aurkitu da, expected to have a length a multiple of %u byteko multiploko luzera edukitzea espero zen, baina %u byteko luzera du"
+msgstr ""
+"“a%c' motako matrizea aurkitu da, expected to have a length a multiple of %u "
+"byteko multiploko luzera edukitzea espero zen, baina %u byteko luzera du"
-#: gio/gdbusmessage.c:1857
+#: ../gio/gdbusmessage.c:1845
#, c-format
msgid "Parsed value “%s” for variant is not a valid D-Bus signature"
-msgstr "Analizatutako “%s“ balioa aldagaiarentzat ez da baliozko D-Bus sinadura bat"
+msgstr ""
+"Analizatutako “%s“ balioa aldagaiarentzat ez da baliozko D-Bus sinadura bat"
-#: gio/gdbusmessage.c:1881
+#: ../gio/gdbusmessage.c:1869
#, c-format
msgid ""
"Error deserializing GVariant with type string “%s” from the D-Bus wire format"
-msgstr "Errorea GVariant deserializatzean “%s“ kate motarekin D-Bus konexioko formatutik"
+msgstr ""
+"Errorea GVariant deserializatzean “%s“ kate motarekin D-Bus konexioko "
+"formatutik"
-#: gio/gdbusmessage.c:2066
+#: ../gio/gdbusmessage.c:2053
#, c-format
msgid ""
"Invalid endianness value. Expected 0x6c (“l”) or 0x42 (“B”) but found value "
"0x%02x"
-msgstr "Baliogabeko endian balioa. 0x6c (“l“) edo 0x42 (“B“) espero zen, baina 0x%02x balioa aurkitu da."
+msgstr ""
+"Baliogabeko endian balioa. 0x6c (“l“) edo 0x42 (“B“) espero zen, baina 0x"
+"%02x balioa aurkitu da."
-#: gio/gdbusmessage.c:2079
+#: ../gio/gdbusmessage.c:2066
#, c-format
msgid "Invalid major protocol version. Expected 1 but found %d"
-msgstr "Protokoloaren bertsio nagusia baliogabea. 1 espero zen, baina %d aurkitu da"
-
-#: gio/gdbusmessage.c:2132 gio/gdbusmessage.c:2724
-msgid "Signature header found but is not of type signature"
-msgstr "Sinaduraren goiburua aurkitu da, baina ez da sinadura motakoa"
+msgstr ""
+"Protokoloaren bertsio nagusia baliogabea. 1 espero zen, baina %d aurkitu da"
-#: gio/gdbusmessage.c:2144
+#: ../gio/gdbusmessage.c:2122
#, c-format
msgid "Signature header with signature “%s” found but message body is empty"
-msgstr "Sinaduraren goiburua “%s“ sinadurarekin aurkitu da, baina gorputza hutsik dago"
+msgstr ""
+"Sinaduraren goiburua “%s“ sinadurarekin aurkitu da, baina gorputza hutsik "
+"dago"
-#: gio/gdbusmessage.c:2159
+#: ../gio/gdbusmessage.c:2136
#, c-format
msgid "Parsed value “%s” is not a valid D-Bus signature (for body)"
-msgstr "Analizatutako “%s“ balioa ez da baliozko D-Bus sinadura (gorputzarentzako)"
+msgstr ""
+"Analizatutako “%s“ balioa ez da baliozko D-Bus sinadura (gorputzarentzako)"
-#: gio/gdbusmessage.c:2190
+#: ../gio/gdbusmessage.c:2166
#, 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"
-msgstr[0] "Ez dago sinaduraren goibururik mezuan, baina mezuaren gorputzak %u byte du"
-msgstr[1] "Ez dago sinaduraren goibururik mezuan, baina mezuaren gorputzak %u byte ditu"
+msgstr[0] ""
+"Ez dago sinaduraren goibururik mezuan, baina mezuaren gorputzak %u byte du"
+msgstr[1] ""
+"Ez dago sinaduraren goibururik mezuan, baina mezuaren gorputzak %u byte ditu"
-#: gio/gdbusmessage.c:2200
+#: ../gio/gdbusmessage.c:2176
msgid "Cannot deserialize message: "
msgstr "Ezin da mezua deserializatu: "
-#: gio/gdbusmessage.c:2541
+#: ../gio/gdbusmessage.c:2517
#, c-format
msgid ""
"Error serializing GVariant with type string “%s” to the D-Bus wire format"
-msgstr "Errorea GVariant serializatzean “%s“ kate motarekin D-Bus konexioaren formatura"
+msgstr ""
+"Errorea GVariant serializatzean “%s“ kate motarekin D-Bus konexioaren "
+"formatura"
-#: gio/gdbusmessage.c:2678
+#: ../gio/gdbusmessage.c:2654
#, c-format
msgid ""
-"Number of file descriptors in message (%d) differs from header field (%d)"
-msgstr "Mezuko fitxategi-deskriptoreen kopurua (%d) goiburu-eremukoaren (%d) desberdina da"
+"Message has %d file descriptors but the header field indicates %d file "
+"descriptors"
+msgstr ""
+"Mezuak fitxategi-deskriptore %d du baina goiburuko eremuak %d fitxategi-"
+"deskriptore adierazten ditu"
-#: gio/gdbusmessage.c:2686
+#: ../gio/gdbusmessage.c:2662
msgid "Cannot serialize message: "
msgstr "Ezin da mezua serializatu: "
-#: gio/gdbusmessage.c:2739
+#: ../gio/gdbusmessage.c:2706
#, c-format
msgid "Message body has signature “%s” but there is no signature header"
-msgstr "Mezuaren gorputzak “%s“ sinadura du, baina ez dago sinaduraren goibururik"
+msgstr ""
+"Mezuaren gorputzak “%s“ sinadura du, baina ez dago sinaduraren goibururik"
-#: gio/gdbusmessage.c:2749
+#: ../gio/gdbusmessage.c:2716
#, c-format
msgid ""
"Message body has type signature “%s” but signature in the header field is "
"“%s”"
-msgstr "Mezuaren gorputzak “%s“ sinadura mota du, baina goiburuaren eremuko sinadura “%s“ da"
+msgstr ""
+"Mezuaren gorputzak “%s“ sinadura mota du, baina goiburuaren eremuko sinadura "
+"“%s“ da"
-#: gio/gdbusmessage.c:2765
+#: ../gio/gdbusmessage.c:2732
#, c-format
msgid "Message body is empty but signature in the header field is “(%s)”"
-msgstr "Mezuaren gorputza hutsik dago, baina goiburuaren eremuko sinadura “(%s)“ da"
+msgstr ""
+"Mezuaren gorputza hutsik dago, baina goiburuaren eremuko sinadura “(%s)“ da"
-#: gio/gdbusmessage.c:3318
+#: ../gio/gdbusmessage.c:3285
#, c-format
msgid "Error return with body of type “%s”"
-msgstr "Errorearen itzulera “'%s“ motako gorputzarekin"
+msgstr "Errorearen itzulera “'%s“ motako gorputzarekin "
-#: gio/gdbusmessage.c:3326
+#: ../gio/gdbusmessage.c:3293
msgid "Error return with empty body"
msgstr "Errorearen itzulera gorputz hutsarekin"
-#: gio/gdbusprivate.c:2075
+#: ../gio/gdbusprivate.c:2066
#, c-format
msgid "Unable to get Hardware profile: %s"
msgstr "Ezin da hardwarearen profila eskuratu: %s"
-#: gio/gdbusprivate.c:2120
+#: ../gio/gdbusprivate.c:2111
msgid "Unable to load /var/lib/dbus/machine-id or /etc/machine-id: "
msgstr "Ezin da /var/lib/dbus/machine-id edo /etc/machine-id kargatu: "
-#: gio/gdbusproxy.c:1617
+#: ../gio/gdbusproxy.c:1611
#, c-format
msgid "Error calling StartServiceByName for %s: "
msgstr "Errorea %s(r)en StartServiceByName deia egitean: "
-#: gio/gdbusproxy.c:1640
+#: ../gio/gdbusproxy.c:1634
#, c-format
msgid "Unexpected reply %d from StartServiceByName(\"%s\") method"
-msgstr "Ustekabeko %d erantzuna StartServiceByName(“%s“) metodotik"
+msgstr "Ustekabeko %d erantzuna StartServiceByName(\"%s\") metodotik"
-#: gio/gdbusproxy.c:2740 gio/gdbusproxy.c:2875
-#, c-format
+#: ../gio/gdbusproxy.c:2719 ../gio/gdbusproxy.c:2853
msgid ""
-"Cannot invoke method; proxy is for the well-known name %s without an owner, "
-"and proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"
-msgstr "Ezin da metodoari deitu: proxyak jaberik gabeko %s izen ezaguna du eta G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START banderarekin eraiki zen"
+"Cannot invoke method; proxy is for a well-known name without an owner and "
+"proxy was constructed with the G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START flag"
+msgstr ""
+"Ezin da metodoari deitu: proxy-ak jaberik gabeko izen ezaguna du eta "
+"G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START banderarekin eraiki zen"
-#: gio/gdbusserver.c:708
+#: ../gio/gdbusserver.c:708
msgid "Abstract name space not supported"
msgstr "Izen abstraktuen lekua ez dago onartuta"
-#: gio/gdbusserver.c:795
+#: ../gio/gdbusserver.c:795
msgid "Cannot specify nonce file when creating a server"
msgstr "Ezin da izendapeneko fitxategia zehaztu zerbitzari bat sortzean"
-#: gio/gdbusserver.c:876
+#: ../gio/gdbusserver.c:876
#, c-format
msgid "Error writing nonce file at “%s”: %s"
msgstr "Errorea “%s“ izendapeneko fitxategian idaztean: %s"
-#: gio/gdbusserver.c:1047
+#: ../gio/gdbusserver.c:1047
#, c-format
msgid "The string “%s” is not a valid D-Bus GUID"
msgstr "“%s“ katea ez da baliozko D-Bus GUID bat"
-#: gio/gdbusserver.c:1087
+#: ../gio/gdbusserver.c:1087
#, c-format
msgid "Cannot listen on unsupported transport “%s”"
msgstr "Ezin da onartu gabeko “%s“ garraioa entzun"
-#: gio/gdbus-tool.c:95
-#, c-format
+#: ../gio/gdbus-tool.c:95
+#, 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"
@@ -912,7 +1018,8 @@ msgid ""
" wait Wait for a bus name to appear\n"
"\n"
"Use “%s COMMAND --help” to get help on each command.\n"
-msgstr "Komandoak:\n"
+msgstr ""
+"Komandoak:\n"
" help Informazio hau erakusten du\n"
" introspect Urruneko objektu baten introspekzioa\n"
" monitor Urruneko objektu bat monitorizatzen du\n"
@@ -922,350 +1029,372 @@ msgstr "Komandoak:\n"
"\n"
"Erabili “%s KOMANDOA --help“ komando bakoitzari dagokion laguntza lortzeko.\n"
-#: gio/gdbus-tool.c:185 gio/gdbus-tool.c:252 gio/gdbus-tool.c:324
-#: gio/gdbus-tool.c:348 gio/gdbus-tool.c:834 gio/gdbus-tool.c:1171
-#: gio/gdbus-tool.c:1613
+#: ../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
#, c-format
msgid "Error: %s\n"
msgstr "Errorea: %s\n"
-#: gio/gdbus-tool.c:196 gio/gdbus-tool.c:265 gio/gdbus-tool.c:1629
+#: ../gio/gdbus-tool.c:176 ../gio/gdbus-tool.c:240 ../gio/gdbus-tool.c:1526
#, c-format
msgid "Error parsing introspection XML: %s\n"
msgstr "Errorea introspekzioko XMLa analizatzean: %s\n"
-#: gio/gdbus-tool.c:234
+#: ../gio/gdbus-tool.c:209
#, c-format
msgid "Error: %s is not a valid name\n"
msgstr "Errorea: '%s' ez da baliozko izena\n"
-#: gio/gdbus-tool.c:382
+#: ../gio/gdbus-tool.c:357
msgid "Connect to the system bus"
msgstr "Konektatu sistemako bus-arekin"
-#: gio/gdbus-tool.c:383
+#: ../gio/gdbus-tool.c:358
msgid "Connect to the session bus"
msgstr "Konektatu saioko bus-arekin"
-#: gio/gdbus-tool.c:384
+#: ../gio/gdbus-tool.c:359
msgid "Connect to given D-Bus address"
msgstr "Konektatu emandako D-Bus helbidera"
-#: gio/gdbus-tool.c:394
+#: ../gio/gdbus-tool.c:369
msgid "Connection Endpoint Options:"
msgstr "Konexioaren amaierako puntuaren aukerak:"
-#: gio/gdbus-tool.c:395
+#: ../gio/gdbus-tool.c:370
msgid "Options specifying the connection endpoint"
msgstr "Aukerak konexioaren amaierako puntua zehaztuz"
-#: gio/gdbus-tool.c:417
+#: ../gio/gdbus-tool.c:392
#, c-format
msgid "No connection endpoint specified"
msgstr "Ez da konexioaren amaierako punturik zehaztu"
-#: gio/gdbus-tool.c:427
+#: ../gio/gdbus-tool.c:402
#, c-format
msgid "Multiple connection endpoints specified"
msgstr "Konexioaren hainbat amaierako puntu zehaztu dira"
-#: gio/gdbus-tool.c:497
+#: ../gio/gdbus-tool.c:472
#, c-format
msgid ""
"Warning: According to introspection data, interface “%s” does not exist\n"
-msgstr "Abisua: introspekzioko datuen arabera, “%s“ interfazea ez da existitzen\n"
+msgstr ""
+"Abisua: introspekzioko datuen arabera, “%s“ interfazea ez da existitzen\n"
-#: gio/gdbus-tool.c:506
+#: ../gio/gdbus-tool.c:481
#, c-format
msgid ""
"Warning: According to introspection data, method “%s” does not exist on "
"interface “%s”\n"
-msgstr "Abisua: introspekzioko datuen arabera, “%s“ metodoa ez da existitzen “%s“ interfazean\n"
+msgstr ""
+"Abisua: introspekzioko datuen arabera, “%s“ metodoa ez da existitzen “%s“ "
+"interfazean\n"
-#: gio/gdbus-tool.c:568
+#: ../gio/gdbus-tool.c:543
msgid "Optional destination for signal (unique name)"
msgstr "Seinalearen aukerazko helburua (izen esklusiboa)"
-#: gio/gdbus-tool.c:569
+#: ../gio/gdbus-tool.c:544
msgid "Object path to emit signal on"
msgstr "Objektuaren bide-izena bere gainera seinalea igortzeko"
-#: gio/gdbus-tool.c:570
+#: ../gio/gdbus-tool.c:545
msgid "Signal and interface name"
msgstr "Seinale eta interfazearen izena"
-#: gio/gdbus-tool.c:603
+#: ../gio/gdbus-tool.c:579
msgid "Emit a signal."
msgstr "Igorri seinale bat."
-#: gio/gdbus-tool.c:658 gio/gdbus-tool.c:965 gio/gdbus-tool.c:1715
-#: gio/gdbus-tool.c:1944 gio/gdbus-tool.c:2164
+#: ../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
#, c-format
msgid "Error connecting: %s\n"
msgstr "Errorea konektatzean: %s\n"
-#: gio/gdbus-tool.c:678
+#: ../gio/gdbus-tool.c:625
#, c-format
-msgid "Error: %s is not a valid unique bus name.\n"
-msgstr "Errorea: '%s' ez da bus-aren baliozko izen esklusiboa\n"
+msgid "Error: object path not specified.\n"
+msgstr "Errorea: objektuaren bide-izena ez da zehaztu.\n"
-#: gio/gdbus-tool.c:697 gio/gdbus-tool.c:1008 gio/gdbus-tool.c:1758
-msgid "Error: Object path is not specified\n"
-msgstr "Errorea: objektuaren bide-izena ez dago zehaztuta\n"
-
-#: gio/gdbus-tool.c:720 gio/gdbus-tool.c:1028 gio/gdbus-tool.c:1778
-#: gio/gdbus-tool.c:2015
+#: ../gio/gdbus-tool.c:630 ../gio/gdbus-tool.c:925 ../gio/gdbus-tool.c:1681
+#: ../gio/gdbus-tool.c:1917
#, c-format
msgid "Error: %s is not a valid object path\n"
msgstr "Errorea: '%s' ez da objektuaren baliozko bide-izena\n"
-#: gio/gdbus-tool.c:740
-msgid "Error: Signal name is not specified\n"
-msgstr "Errorea: seinalearen izena ez dago zehaztuta\n"
+#: ../gio/gdbus-tool.c:636
+#, c-format
+msgid "Error: signal not specified.\n"
+msgstr "Errorea: seinalea ez da zehaztu.\n"
-#: gio/gdbus-tool.c:754
+#: ../gio/gdbus-tool.c:643
#, c-format
-msgid "Error: Signal name “%s” is invalid\n"
-msgstr "Errorea: “%s“ seinalearen izena baliogabea da\n"
+msgid "Error: signal must be the fully-qualified name.\n"
+msgstr "Errorea: seinaleak erabat kualifikatutako izena eduki behar du.\n"
-#: gio/gdbus-tool.c:766
+#: ../gio/gdbus-tool.c:651
#, c-format
msgid "Error: %s is not a valid interface name\n"
msgstr "Errorea: '%s' ez da interfazearen baliozko izena\n"
-#: gio/gdbus-tool.c:772
+#: ../gio/gdbus-tool.c:657
#, c-format
msgid "Error: %s is not a valid member name\n"
msgstr "Errorea: '%s' ez da kidearen baliozko izena\n"
+#: ../gio/gdbus-tool.c:663
+#, c-format
+msgid "Error: %s is not a valid unique bus name.\n"
+msgstr "Errorea: '%s' ez da bus-aren baliozko izen esklusiboa\n"
+
#. Use the original non-"parse-me-harder" error
-#: gio/gdbus-tool.c:809 gio/gdbus-tool.c:1140
+#: ../gio/gdbus-tool.c:700 ../gio/gdbus-tool.c:1037
#, c-format
msgid "Error parsing parameter %d: %s\n"
msgstr "Errorea %d parametroa analizatzean: %s\n"
-#: gio/gdbus-tool.c:841
+#: ../gio/gdbus-tool.c:732
#, c-format
msgid "Error flushing connection: %s\n"
msgstr "Errorea konexioa garbitzean: %s\n"
-#: gio/gdbus-tool.c:868
+#: ../gio/gdbus-tool.c:759
msgid "Destination name to invoke method on"
msgstr "Helburuaren izena metodoari deitzeko"
-#: gio/gdbus-tool.c:869
+#: ../gio/gdbus-tool.c:760
msgid "Object path to invoke method on"
msgstr "Objektuaren bide-izena metodoari deitzeko"
-#: gio/gdbus-tool.c:870
+#: ../gio/gdbus-tool.c:761
msgid "Method and interface name"
msgstr "Metodo eta interfazearen izena"
-#: gio/gdbus-tool.c:871
+#: ../gio/gdbus-tool.c:762
msgid "Timeout in seconds"
msgstr "Denbora-muga (segundotan)"
-#: gio/gdbus-tool.c:910
+#: ../gio/gdbus-tool.c:803
msgid "Invoke a method on a remote object."
msgstr "Deitu metodo bati urruneko objektu batean."
-#: gio/gdbus-tool.c:982 gio/gdbus-tool.c:1732 gio/gdbus-tool.c:1969
+#: ../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 "Errorea: helburua ez dago zehaztuta\n"
-#: gio/gdbus-tool.c:993 gio/gdbus-tool.c:1749 gio/gdbus-tool.c:1980
+#: ../gio/gdbus-tool.c:890 ../gio/gdbus-tool.c:1652 ../gio/gdbus-tool.c:1882
#, c-format
msgid "Error: %s is not a valid bus name\n"
msgstr "Errorea: '%s' ez da busaren baliozko izena\n"
-#: gio/gdbus-tool.c:1043
+#: ../gio/gdbus-tool.c:905 ../gio/gdbus-tool.c:1661
+#, c-format
+msgid "Error: Object path is not specified\n"
+msgstr "Errorea: objektuaren bide-izena ez dago zehaztuta\n"
+
+#: ../gio/gdbus-tool.c:940
+#, c-format
msgid "Error: Method name is not specified\n"
msgstr "Errorea: metodoaren izena ez dago zehaztuta\n"
-#: gio/gdbus-tool.c:1054
+#: ../gio/gdbus-tool.c:951
#, c-format
msgid "Error: Method name “%s” is invalid\n"
msgstr "Errorea: “%s“ metodoaren izena baliogabea da\n"
-#: gio/gdbus-tool.c:1132
+#: ../gio/gdbus-tool.c:1029
#, c-format
msgid "Error parsing parameter %d of type “%s”: %s\n"
msgstr "Errorea “%2$s“ motako %1$d parametroa analizatzean: %3$s\n"
-#: gio/gdbus-tool.c:1576
+#: ../gio/gdbus-tool.c:1473
msgid "Destination name to introspect"
msgstr "Helburuko izena introspekzioa egiteko"
-#: gio/gdbus-tool.c:1577
+#: ../gio/gdbus-tool.c:1474
msgid "Object path to introspect"
msgstr "Objektuaren bide-izena introspekzioa egiteko"
-#: gio/gdbus-tool.c:1578
+#: ../gio/gdbus-tool.c:1475
msgid "Print XML"
msgstr "Inprimatu XML"
-#: gio/gdbus-tool.c:1579
+#: ../gio/gdbus-tool.c:1476
msgid "Introspect children"
msgstr "Aztertu umeen barnean"
-#: gio/gdbus-tool.c:1580
+#: ../gio/gdbus-tool.c:1477
msgid "Only print properties"
msgstr "Soilik inprimatzeko propietateak"
-#: gio/gdbus-tool.c:1667
+#: ../gio/gdbus-tool.c:1568
msgid "Introspect a remote object."
msgstr "Urruneko objektu baten introspekzioa egin."
-#: gio/gdbus-tool.c:1870
+#: ../gio/gdbus-tool.c:1773
msgid "Destination name to monitor"
msgstr "Helburuko izena monitorizatzeko"
-#: gio/gdbus-tool.c:1871
+#: ../gio/gdbus-tool.c:1774
msgid "Object path to monitor"
msgstr "Objektuaren bide-izena monitorizatzeko"
-#: gio/gdbus-tool.c:1896
+#: ../gio/gdbus-tool.c:1803
msgid "Monitor a remote object."
msgstr "Monitorizatu urruneko objektu bat."
-#: gio/gdbus-tool.c:1954
-msgid "Error: can’t monitor a non-message-bus connection\n"
-msgstr "Errorea: ezin da monitorizatu non-message-bus konexio bat\n"
-
-#: gio/gdbus-tool.c:2078
+#: ../gio/gdbus-tool.c:1980
msgid "Service to activate before waiting for the other one (well-known name)"
-msgstr "Aktibatu beharreko zerbitzua bestearen (izen ezaguna) zain egon aurretik"
+msgstr ""
+"Aktibatu beharreko zerbitzua bestearen (izen ezaguna) zain egon aurretik"
-#: gio/gdbus-tool.c:2081
+#: ../gio/gdbus-tool.c:1983
msgid ""
"Timeout to wait for before exiting with an error (seconds); 0 for no timeout "
"(default)"
-msgstr "Denbora-muga errore batekin irten aurretik zain egoteko (segundotan); 0 denbora-mugarik ez (lehenetsia)"
+msgstr ""
+"Denbora-muga errore batekin irten aurretik zain egoteko (segundotan); "
+"0 denbora-mugarik ez (lehenetsia)"
-#: gio/gdbus-tool.c:2129
+#: ../gio/gdbus-tool.c:2031
+#| msgid "[OPTION…]"
msgid "[OPTION…] BUS-NAME"
msgstr "[AUKERA…] BUS-IZENA"
-#: gio/gdbus-tool.c:2130
+#: ../gio/gdbus-tool.c:2033
msgid "Wait for a bus name to appear."
msgstr "Bus-izen bat agertzeko zain egon."
-#: gio/gdbus-tool.c:2206
+#: ../gio/gdbus-tool.c:2109
+#, c-format
+#| msgid "Error: object path not specified.\n"
msgid "Error: A service to activate for must be specified.\n"
msgstr "Errorea: zerbitzua zehaztu behar da aktibatzeko.\n"
-#: gio/gdbus-tool.c:2211
+#: ../gio/gdbus-tool.c:2114
+#, c-format
+#| msgid "Error: object path not specified.\n"
msgid "Error: A service to wait for must be specified.\n"
msgstr "Errorea: zerbitzua zehaztu behar da haren zain egoteko.\n"
-#: gio/gdbus-tool.c:2216
+#: ../gio/gdbus-tool.c:2119
+#, c-format
+#| msgid "Too many arguments"
msgid "Error: Too many arguments.\n"
msgstr "Errorea: argumentu gehiegi.\n"
-#: gio/gdbus-tool.c:2224 gio/gdbus-tool.c:2231
+#: ../gio/gdbus-tool.c:2127 ../gio/gdbus-tool.c:2134
#, 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 "Errorea: '%s' ez da busaren izen ezagun bat\n"
-#: gio/gdesktopappinfo.c:2041 gio/gdesktopappinfo.c:4822
+#: ../gio/gdesktopappinfo.c:2001 ../gio/gdesktopappinfo.c:4533
msgid "Unnamed"
msgstr "Izengabea"
-#: gio/gdesktopappinfo.c:2451
+#: ../gio/gdesktopappinfo.c:2411
msgid "Desktop file didn’t specify Exec field"
msgstr "Mahaigaineko fitxategiak ez du Exec eremua zehaztu"
-#: gio/gdesktopappinfo.c:2710
+#: ../gio/gdesktopappinfo.c:2696
msgid "Unable to find terminal required for application"
msgstr "Ezin izan da aplikazioak eskatzen duen terminala aurkitu"
-#: gio/gdesktopappinfo.c:3362
+#: ../gio/gdesktopappinfo.c:3129
#, c-format
msgid "Can’t create user application configuration folder %s: %s"
-msgstr "Ezin da erabiltzailearen aplikazioaren %s konfigurazio-karpeta sortu: %s"
+msgstr ""
+"Ezin da erabiltzailearen aplikazioaren %s konfigurazio-karpeta sortu: %s"
-#: gio/gdesktopappinfo.c:3366
+#: ../gio/gdesktopappinfo.c:3133
#, c-format
msgid "Can’t create user MIME configuration folder %s: %s"
msgstr "Ezin da erabiltzailearen MIMEren %s konfigurazio-karpeta sortu: %s"
-#: gio/gdesktopappinfo.c:3606 gio/gdesktopappinfo.c:3630
+#: ../gio/gdesktopappinfo.c:3373 ../gio/gdesktopappinfo.c:3397
msgid "Application information lacks an identifier"
msgstr "Aplikazioaren informazioari identifikatzaile bat falta zaio"
-#: gio/gdesktopappinfo.c:3864
+#: ../gio/gdesktopappinfo.c:3631
#, c-format
msgid "Can’t create user desktop file %s"
msgstr "Ezin da erabiltzailearen mahaigaineko %s fitxategia sortu"
-#: gio/gdesktopappinfo.c:3998
+#: ../gio/gdesktopappinfo.c:3765
#, c-format
msgid "Custom definition for %s"
msgstr "%s(r)en definizio pertsonalizatua"
-#: gio/gdrive.c:417
+#: ../gio/gdrive.c:417
msgid "drive doesn’t implement eject"
msgstr "gailuak ez dauka “egotzi“ inplementatuta"
#. Translators: This is an error
#. * message for drive objects that
#. * don't implement any of eject or eject_with_operation.
-#: gio/gdrive.c:495
+#: ../gio/gdrive.c:495
msgid "drive doesn’t implement eject or eject_with_operation"
msgstr "gailuak ez dauka “egotzi“ edo “egotzi eragiketarekin“ inplementatuta"
-#: gio/gdrive.c:571
+#: ../gio/gdrive.c:571
msgid "drive doesn’t implement polling for media"
msgstr "gailuak ez dauka euskarria eskaneatzeko inplementaziorik"
-#: gio/gdrive.c:778
+#: ../gio/gdrive.c:776
msgid "drive doesn’t implement start"
msgstr "gailuak ez dauka “abiatu“ inplementatuta"
-#: gio/gdrive.c:880
+#: ../gio/gdrive.c:878
msgid "drive doesn’t implement stop"
msgstr "gailuak ez dauka “gelditu“ inplementatuta"
-#: gio/gdummytlsbackend.c:195 gio/gdummytlsbackend.c:317
-#: gio/gdummytlsbackend.c:509
+#: ../gio/gdummytlsbackend.c:195 ../gio/gdummytlsbackend.c:317
+#: ../gio/gdummytlsbackend.c:509
msgid "TLS support is not available"
msgstr "TLS euskarria ez dago erabilgarri"
-#: gio/gdummytlsbackend.c:419
+#: ../gio/gdummytlsbackend.c:419
msgid "DTLS support is not available"
msgstr "DTLS euskarria ez dago erabilgarri"
-#: gio/gemblem.c:323
+#: ../gio/gemblem.c:323
#, c-format
msgid "Can’t handle version %d of GEmblem encoding"
msgstr "Ezin da GEmblem kodeketaren %d bertsioa kudeatu"
-#: gio/gemblem.c:333
+#: ../gio/gemblem.c:333
#, c-format
msgid "Malformed number of tokens (%d) in GEmblem encoding"
msgstr "Gaizki osatutako token kopurua (%d) GEmblem kodeketan"
-#: gio/gemblemedicon.c:362
+#: ../gio/gemblemedicon.c:362
#, c-format
msgid "Can’t handle version %d of GEmblemedIcon encoding"
msgstr "Ezin da GEmblemedIcon kodeketaren %d bertsioa kudeatu"
-#: gio/gemblemedicon.c:372
+#: ../gio/gemblemedicon.c:372
#, c-format
msgid "Malformed number of tokens (%d) in GEmblemedIcon encoding"
msgstr "Gaizki osatutako token kopurua (%d) GEmblemedIcon kodeketan"
-#: gio/gemblemedicon.c:395
+#: ../gio/gemblemedicon.c:395
msgid "Expected a GEmblem for GEmblemedIcon"
msgstr "GEmblen espero zen GEmblemedIcon-entzako"
-#: gio/gfile.c:1076 gio/gfile.c:1314 gio/gfile.c:1452 gio/gfile.c:1690
-#: gio/gfile.c:1745 gio/gfile.c:1803 gio/gfile.c:1887 gio/gfile.c:1944
-#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3738 gio/gfile.c:3793
-#: gio/gfile.c:4029 gio/gfile.c:4071 gio/gfile.c:4539 gio/gfile.c:4950
-#: gio/gfile.c:5035 gio/gfile.c:5125 gio/gfile.c:5222 gio/gfile.c:5309
-#: gio/gfile.c:5410 gio/gfile.c:8113 gio/gfile.c:8203 gio/gfile.c:8287
-#: gio/win32/gwinhttpfile.c:437
+#: ../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/win32/gwinhttpfile.c:437
msgid "Operation not supported"
msgstr "Eragiketa ez dago onartuta"
@@ -1273,206 +1402,206 @@ msgstr "Eragiketa ez dago onartuta"
#. * trying to find the enclosing (user visible)
#. * mount of a file, but none exists.
#.
-#: gio/gfile.c:1575
+#: ../gio/gfile.c:1468
msgid "Containing mount does not exist"
msgstr "Ontziaren muntaia ez da existitzen"
-#: gio/gfile.c:2622 gio/glocalfile.c:2446
+#: ../gio/gfile.c:2515 ../gio/glocalfile.c:2377
msgid "Can’t copy over directory"
msgstr "Ezin da direktorioaren gainean kopiatu"
-#: gio/gfile.c:2682
+#: ../gio/gfile.c:2575
msgid "Can’t copy directory over directory"
msgstr "Ezin da direktorioa kopiatu direktorio gainean"
-#: gio/gfile.c:2690
+#: ../gio/gfile.c:2583
msgid "Target file exists"
msgstr "Helburuko fitxategia existitzen da"
-#: gio/gfile.c:2709
+#: ../gio/gfile.c:2602
msgid "Can’t recursively copy directory"
msgstr "Ezin da direktorioa errekurtsiboki kopiatu"
-#: gio/gfile.c:2984
+#: ../gio/gfile.c:2889
msgid "Splice not supported"
msgstr "Lotura ez da onartzen"
-#: gio/gfile.c:2988 gio/gfile.c:3033
+#: ../gio/gfile.c:2893
#, c-format
msgid "Error splicing file: %s"
msgstr "Errorea fitxategia batzean: %s"
-#: gio/gfile.c:3149
+#: ../gio/gfile.c:3025
msgid "Copy (reflink/clone) between mounts is not supported"
msgstr "Muntaien artean kopiatzea (reflink/clone) ez dago onartuta"
-#: gio/gfile.c:3153
+#: ../gio/gfile.c:3029
msgid "Copy (reflink/clone) is not supported or invalid"
msgstr "Kopiatzea (reflink/clone) ez dago onartuta edo baliogabea da"
-#: gio/gfile.c:3158
+#: ../gio/gfile.c:3034
msgid "Copy (reflink/clone) is not supported or didn’t work"
msgstr "Kopiatzea (reflink/clone) ez dago onartuta edo ez du funtzionatzen"
-#: gio/gfile.c:3221
+#: ../gio/gfile.c:3097
msgid "Can’t copy special file"
msgstr "Ezin da fitxategi berezia kopiatu"
-#: gio/gfile.c:4019
+#: ../gio/gfile.c:3895
msgid "Invalid symlink value given"
msgstr "Esteka sinbolikoaren baliogabeko balioa eman da"
-#: gio/gfile.c:4180
+#: ../gio/gfile.c:4056
msgid "Trash not supported"
msgstr "Zakarrontzira botatzea ez dago onartuta"
-#: gio/gfile.c:4292
+#: ../gio/gfile.c:4168
#, c-format
msgid "File names cannot contain “%c”"
msgstr "Fitxategi-izenek ezin dute “%c“ eduki"
-#: gio/gfile.c:6773 gio/gvolume.c:364
+#: ../gio/gfile.c:6614 ../gio/gvolume.c:363
msgid "volume doesn’t implement mount"
msgstr "bolumenak ez dauka muntatzea inplementatuta"
-#: gio/gfile.c:6884 gio/gfile.c:6930
+#: ../gio/gfile.c:6723
msgid "No application is registered as handling this file"
msgstr "Ez da aplikaziorik erregistratu fitxategi hau kudeatzeko"
-#: gio/gfileenumerator.c:212
+#: ../gio/gfileenumerator.c:212
msgid "Enumerator is closed"
msgstr "Enumeratzailea itxi da"
-#: gio/gfileenumerator.c:219 gio/gfileenumerator.c:278
-#: gio/gfileenumerator.c:377 gio/gfileenumerator.c:476
+#: ../gio/gfileenumerator.c:219 ../gio/gfileenumerator.c:278
+#: ../gio/gfileenumerator.c:377 ../gio/gfileenumerator.c:476
msgid "File enumerator has outstanding operation"
msgstr "Fitxategiaren enumeratzaileak eragiketa bat du lanean"
-#: gio/gfileenumerator.c:368 gio/gfileenumerator.c:467
+#: ../gio/gfileenumerator.c:368 ../gio/gfileenumerator.c:467
msgid "File enumerator is already closed"
msgstr "Fitxategiaren enumeratzailea itxita dago jadanik"
-#: gio/gfileicon.c:236
+#: ../gio/gfileicon.c:236
#, c-format
msgid "Can’t handle version %d of GFileIcon encoding"
msgstr "Ezin da GFileIcon kodeketaren %d bertsioa kudeatu"
-#: gio/gfileicon.c:246
+#: ../gio/gfileicon.c:246
msgid "Malformed input data for GFileIcon"
msgstr "Gaizki osatutako sarrerako datuak GFileIcon-entzako"
-#: gio/gfileinputstream.c:149 gio/gfileinputstream.c:394
-#: gio/gfileiostream.c:167 gio/gfileoutputstream.c:164
-#: gio/gfileoutputstream.c:497
+#: ../gio/gfileinputstream.c:149 ../gio/gfileinputstream.c:394
+#: ../gio/gfileiostream.c:167 ../gio/gfileoutputstream.c:164
+#: ../gio/gfileoutputstream.c:497
msgid "Stream doesn’t support query_info"
msgstr "Korronteak ez du query_info onartzen"
-#: gio/gfileinputstream.c:325 gio/gfileiostream.c:379
-#: gio/gfileoutputstream.c:371
+#: ../gio/gfileinputstream.c:325 ../gio/gfileiostream.c:379
+#: ../gio/gfileoutputstream.c:371
msgid "Seek not supported on stream"
msgstr "Ez da bilaketarik onartzen korrontean"
-#: gio/gfileinputstream.c:369
+#: ../gio/gfileinputstream.c:369
msgid "Truncate not allowed on input stream"
msgstr "Trunkatzea ez da baimentzen sarrerako korrontean"
-#: gio/gfileiostream.c:455 gio/gfileoutputstream.c:447
+#: ../gio/gfileiostream.c:455 ../gio/gfileoutputstream.c:447
msgid "Truncate not supported on stream"
msgstr "Trunkatzea ez da onartzen korrontean"
#
-#: gio/ghttpproxy.c:91 gio/gresolver.c:377 gio/gresolver.c:529
-#: glib/gconvert.c:1785
+#: ../gio/ghttpproxy.c:91 ../gio/gresolver.c:410 ../gio/gresolver.c:476
+#: ../glib/gconvert.c:1650
msgid "Invalid hostname"
msgstr "Ostalari-izen baliogabea"
-#: gio/ghttpproxy.c:143
+#: ../gio/ghttpproxy.c:143
msgid "Bad HTTP proxy reply"
msgstr "HTTP proxy-aren okerreko erantzuna"
-#: gio/ghttpproxy.c:159
+#: ../gio/ghttpproxy.c:159
msgid "HTTP proxy connection not allowed"
msgstr "HTTP proxy-aren konexioa ez dago baimenduta"
-#: gio/ghttpproxy.c:164
+#: ../gio/ghttpproxy.c:164
msgid "HTTP proxy authentication failed"
msgstr "HTTP proxy-aren autentifikazioak huts egin du"
-#: gio/ghttpproxy.c:167
+#: ../gio/ghttpproxy.c:167
msgid "HTTP proxy authentication required"
msgstr "HTTP proxy-aren autentifikazioa behar da"
-#: gio/ghttpproxy.c:171
+#: ../gio/ghttpproxy.c:171
#, c-format
msgid "HTTP proxy connection failed: %i"
msgstr "HTTP proxy-aren konexioak huts egin du: %i"
-#: gio/ghttpproxy.c:269
+#: ../gio/ghttpproxy.c:269
msgid "HTTP proxy server closed connection unexpectedly."
msgstr "HTTP proxy zerbitzariak konexioa ustekabean itxi du."
-#: gio/gicon.c:298
+#: ../gio/gicon.c:290
#, c-format
msgid "Wrong number of tokens (%d)"
msgstr "Okerreko token kopurua (%d)"
-#: gio/gicon.c:318
+#: ../gio/gicon.c:310
#, c-format
msgid "No type for class name %s"
msgstr "Ez dago %s klasearen izen motarik"
-#: gio/gicon.c:328
+#: ../gio/gicon.c:320
#, c-format
msgid "Type %s does not implement the GIcon interface"
msgstr "%s motak ez du GIcon interfazea inplementatzen"
-#: gio/gicon.c:339
+#: ../gio/gicon.c:331
#, c-format
msgid "Type %s is not classed"
msgstr "%s mota ez du klaserik"
-#: gio/gicon.c:353
+#: ../gio/gicon.c:345
#, c-format
msgid "Malformed version number: %s"
msgstr "Gaizko osatutako bertsio zenbakia: %s"
-#: gio/gicon.c:367
+#: ../gio/gicon.c:359
#, c-format
msgid "Type %s does not implement from_tokens() on the GIcon interface"
msgstr "%s motak ez du from_tokens() inplementatzen GIcon interfazean"
-#: gio/gicon.c:469
+#: ../gio/gicon.c:461
msgid "Can’t handle the supplied version of the icon encoding"
msgstr "Ezin da ikonoaren kodeketaren emandako bertsioa kudeatu"
-#: gio/ginetaddressmask.c:182
+#: ../gio/ginetaddressmask.c:182
msgid "No address specified"
msgstr "Ez da helbiderik zehaztu"
-#: gio/ginetaddressmask.c:190
+#: ../gio/ginetaddressmask.c:190
#, c-format
msgid "Length %u is too long for address"
msgstr "%u luzera luzeegia da helbidearentzako"
-#: gio/ginetaddressmask.c:223
+#: ../gio/ginetaddressmask.c:223
msgid "Address has bits set beyond prefix length"
msgstr "Helbideak aurrizkiaren luzera baino harago bitak ditu ezarrita"
-#: gio/ginetaddressmask.c:300
+#: ../gio/ginetaddressmask.c:300
#, c-format
msgid "Could not parse “%s” as IP address mask"
msgstr "Ezin izan da “%s“ analizatu IP helbide-maskara gisa"
-#: gio/ginetsocketaddress.c:203 gio/ginetsocketaddress.c:220
-#: gio/gnativesocketaddress.c:109 gio/gunixsocketaddress.c:220
+#: ../gio/ginetsocketaddress.c:203 ../gio/ginetsocketaddress.c:220
+#: ../gio/gnativesocketaddress.c:106 ../gio/gunixsocketaddress.c:218
msgid "Not enough space for socket address"
msgstr "Ez dago nahikoa lekurik socket helbideentzako"
-#: gio/ginetsocketaddress.c:235
+#: ../gio/ginetsocketaddress.c:235
msgid "Unsupported socket address"
msgstr "Onartu gabeko socket helbidea"
-#: gio/ginputstream.c:188
+#: ../gio/ginputstream.c:188
msgid "Input stream doesn’t implement read"
msgstr "Sarrerako korronteak ez dauka irakurtzea inplementatuta"
@@ -1482,1223 +1611,1300 @@ msgstr "Sarrerako korronteak ez dauka irakurtzea inplementatuta"
#. Translators: This is an error you get if there is
#. * already an operation running against this stream when
#. * you try to start one
-#: gio/ginputstream.c:1218 gio/giostream.c:310 gio/goutputstream.c:2208
+#: ../gio/ginputstream.c:1218 ../gio/giostream.c:310
+#: ../gio/goutputstream.c:1670
msgid "Stream has outstanding operation"
msgstr "Korronteak eragiketa bat du lanean"
-#: gio/gio-tool.c:160
+#: ../gio/gio-tool.c:160
msgid "Copy with file"
msgstr "Kopiatu fitxategiarekin"
-#: gio/gio-tool.c:164
+#: ../gio/gio-tool.c:164
msgid "Keep with file when moved"
msgstr "Mantendu fitxategiarekin lekuz aldatzean"
-#: gio/gio-tool.c:205
+#: ../gio/gio-tool.c:205
msgid "“version” takes no arguments"
msgstr "“version“ ez du argumenturik hartzen"
-#: gio/gio-tool.c:207 gio/gio-tool.c:223 glib/goption.c:857
+#: ../gio/gio-tool.c:207 ../gio/gio-tool.c:223 ../glib/goption.c:857
msgid "Usage:"
msgstr "Erabilera:"
-#: gio/gio-tool.c:210
+#: ../gio/gio-tool.c:210
msgid "Print version information and exit."
msgstr "Erakutsi bertsioaren informazioa eta irten"
-#: gio/gio-tool.c:226
+#: ../gio/gio-tool.c:224
+msgid "[ARGS...]"
+msgstr "[ARGUMENTUAK...]"
+
+#: ../gio/gio-tool.c:226
msgid "Commands:"
msgstr "Komandoak:"
-#: gio/gio-tool.c:229
+#: ../gio/gio-tool.c:229
msgid "Concatenate files to standard output"
msgstr "Kateatu fitxategiak irteera estandarrera"
-#: gio/gio-tool.c:230
+#: ../gio/gio-tool.c:230
msgid "Copy one or more files"
msgstr "Kopiatu fitxategi bat edo gehiago"
-#: gio/gio-tool.c:231
+#: ../gio/gio-tool.c:231
msgid "Show information about locations"
msgstr "Erakutsi kokalekuei buruzko informazioa"
-#: gio/gio-tool.c:232
+#: ../gio/gio-tool.c:232
msgid "List the contents of locations"
msgstr "Zerrendatu kokalekuen edukia"
-#: gio/gio-tool.c:233
+#: ../gio/gio-tool.c:233
msgid "Get or set the handler for a mimetype"
msgstr "lortu edo ezarri MIME mota baten kudeatzailea"
-#: gio/gio-tool.c:234
+#: ../gio/gio-tool.c:234
msgid "Create directories"
msgstr "Sortu direktorioak"
-#: gio/gio-tool.c:235
+#: ../gio/gio-tool.c:235
msgid "Monitor files and directories for changes"
msgstr "Monitorizatu fitxategi eta direktorioen aldaketak"
-#: gio/gio-tool.c:236
+#: ../gio/gio-tool.c:236
msgid "Mount or unmount the locations"
msgstr "Muntatu edo desmuntatu kokalekuak"
-#: gio/gio-tool.c:237
+#: ../gio/gio-tool.c:237
msgid "Move one or more files"
msgstr "Aldatu fitxategi bat edo gehiago lekuz"
-#: gio/gio-tool.c:238
+#: ../gio/gio-tool.c:238
msgid "Open files with the default application"
msgstr "Ireki fitxategiak aplikazio lehenetsiarekin"
-#: gio/gio-tool.c:239
+#: ../gio/gio-tool.c:239
msgid "Rename a file"
msgstr "Aldatu fitxategi-izena"
-#: gio/gio-tool.c:240
+#: ../gio/gio-tool.c:240
msgid "Delete one or more files"
msgstr "Ezabatu fitxategi bat edo gehiago"
-#: gio/gio-tool.c:241
+#: ../gio/gio-tool.c:241
msgid "Read from standard input and save"
msgstr "Irakurri sarrera estandarretik eta gorde"
-#: gio/gio-tool.c:242
+#: ../gio/gio-tool.c:242
msgid "Set a file attribute"
msgstr "Ezarri fitxategiaren atributua"
-#: gio/gio-tool.c:243
+#: ../gio/gio-tool.c:243
msgid "Move files or directories to the trash"
msgstr "Bota fitxategi edo direktorioak zakarrontzira"
-#: gio/gio-tool.c:244
+#: ../gio/gio-tool.c:244
msgid "Lists the contents of locations in a tree"
msgstr "Zerrendatu kokalekuen edukia zuhaitz batean"
-#: gio/gio-tool.c:246
+#: ../gio/gio-tool.c:246
#, c-format
msgid "Use %s to get detailed help.\n"
msgstr "Erabili %s laguntza xehea lortzeko.\n"
-#: gio/gio-tool-cat.c:87
+#: ../gio/gio-tool-cat.c:83
+#| msgid "Error writing to file: %s"
msgid "Error writing to stdout"
msgstr "Errorea irteera arruntean (stdout) idaztean"
#. Translators: commandline placeholder
-#: 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:1212 gio/gio-tool-open.c:70
-#: 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
+#: ../gio/gio-tool-cat.c:127 ../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-rename.c:45 ../gio/gio-tool-set.c:89
+#: ../gio/gio-tool-trash.c:81 ../gio/gio-tool-tree.c:239
msgid "LOCATION"
msgstr "KOKALEKUA"
-#: gio/gio-tool-cat.c:138
+#: ../gio/gio-tool-cat.c:132
msgid "Concatenate files and print to standard output."
msgstr "Kateatu fitxategiak eta erakutsi irteera estandarrean"
-#: gio/gio-tool-cat.c:140
+#: ../gio/gio-tool-cat.c:134
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"
"like smb://server/resource/file.txt as location."
-msgstr "'cat' tresna bezala erabiltzen da 'gio cat', baina GIOren kokalekuak erabiliz lokaleko fitxategien ordez. Adibidez, honelako zerbait erabil dezakezu kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt"
+msgstr ""
+"'cat' tresna bezala erabiltzen da 'gio cat', baina GIOren kokalekuak "
+"erabiliz lokaleko fitxategien ordez. Adibidez, honelako zerbait erabil "
+"dezakezu kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt"
-#: 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-mount.c:1263 gio/gio-tool-open.c:96
-#: gio/gio-tool-remove.c:72 gio/gio-tool-trash.c:136
+#: ../gio/gio-tool-cat.c:156 ../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
msgid "No locations given"
msgstr "Ez da kokalekurik eman"
-#: gio/gio-tool-copy.c:42 gio/gio-tool-move.c:38
+#: ../gio/gio-tool-copy.c:42 ../gio/gio-tool-move.c:38
msgid "No target directory"
msgstr "Ez dago helburuko direktorioa"
-#: gio/gio-tool-copy.c:43 gio/gio-tool-move.c:39
+#: ../gio/gio-tool-copy.c:43 ../gio/gio-tool-move.c:39
msgid "Show progress"
msgstr "Erakutsi jarraipena"
-#: gio/gio-tool-copy.c:44 gio/gio-tool-move.c:40
+#: ../gio/gio-tool-copy.c:44 ../gio/gio-tool-move.c:40
msgid "Prompt before overwrite"
msgstr "Galdetu gainidatzi aurretik"
-#: gio/gio-tool-copy.c:45
+#: ../gio/gio-tool-copy.c:45
msgid "Preserve all attributes"
msgstr "Mantendu atributu guztiak"
-#: gio/gio-tool-copy.c:46 gio/gio-tool-move.c:41 gio/gio-tool-save.c:49
+#: ../gio/gio-tool-copy.c:46 ../gio/gio-tool-move.c:41
+#: ../gio/gio-tool-save.c:49
msgid "Backup existing destination files"
msgstr "Egin existitzen diren helburuko fitxategien babeskopia"
-#: gio/gio-tool-copy.c:47
+#: ../gio/gio-tool-copy.c:47
msgid "Never follow symbolic links"
msgstr "Inoiz ez jarraitu esteka sinbolikoak"
-#: gio/gio-tool-copy.c:72 gio/gio-tool-move.c:67
+#: ../gio/gio-tool-copy.c:72 ../gio/gio-tool-move.c:67
#, c-format
msgid "Transferred %s out of %s (%s/s)"
msgstr "Transferituta: %s / %s (%s/s)"
#. Translators: commandline placeholder
-#: gio/gio-tool-copy.c:98 gio/gio-tool-move.c:94
+#: ../gio/gio-tool-copy.c:98 ../gio/gio-tool-move.c:94
msgid "SOURCE"
msgstr "ITURBURUA"
#. Translators: commandline placeholder
-#: gio/gio-tool-copy.c:98 gio/gio-tool-move.c:94 gio/gio-tool-save.c:160
+#: ../gio/gio-tool-copy.c:98 ../gio/gio-tool-move.c:94
+#: ../gio/gio-tool-save.c:165
msgid "DESTINATION"
msgstr "HELBURUA"
-#: gio/gio-tool-copy.c:103
+#: ../gio/gio-tool-copy.c:103
msgid "Copy one or more files from SOURCE to DESTINATION."
msgstr "Kopiatu fitxategi bat edo gehiago ITURBURUtik HELBURUra."
-#: gio/gio-tool-copy.c:105
+#: ../gio/gio-tool-copy.c:105
msgid ""
"gio copy is similar to the traditional cp utility, but using GIO\n"
"locations instead of local files: for example, you can use something\n"
"like smb://server/resource/file.txt as location."
-msgstr "'cp' tresna bezala erabiltzen da 'gio copy', baina GIOren kokalekuak erabiliz lokaleko fitxategien ordez. Adibidez, honelako zerbait erabil dezakezu kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt"
+msgstr ""
+"'cp' tresna bezala erabiltzen da 'gio copy', baina GIOren kokalekuak "
+"erabiliz lokaleko fitxategien ordez. Adibidez, honelako zerbait erabil "
+"dezakezu kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt"
-#: gio/gio-tool-copy.c:147
+#: ../gio/gio-tool-copy.c:147
#, c-format
msgid "Destination %s is not a directory"
msgstr "'%s' helburua ez da direktorio bat"
-#: gio/gio-tool-copy.c:192 gio/gio-tool-move.c:186
+#: ../gio/gio-tool-copy.c:192 ../gio/gio-tool-move.c:185
#, c-format
msgid "%s: overwrite “%s”? "
msgstr "%s: gainidatzi “%s“? "
-#: gio/gio-tool-info.c:34
+#: ../gio/gio-tool-info.c:34
msgid "List writable attributes"
msgstr "Zerrendatu atributu idazgarriak"
-#: gio/gio-tool-info.c:35
+#: ../gio/gio-tool-info.c:35
msgid "Get file system info"
msgstr "Lortu fitxategi-sistemako informazioa"
-#: gio/gio-tool-info.c:36 gio/gio-tool-list.c:35
+#: ../gio/gio-tool-info.c:36 ../gio/gio-tool-list.c:35
msgid "The attributes to get"
msgstr "Atributuak lortzeko"
-#: gio/gio-tool-info.c:36 gio/gio-tool-list.c:35
+#: ../gio/gio-tool-info.c:36 ../gio/gio-tool-list.c:35
msgid "ATTRIBUTES"
msgstr "ATRIBUTUAK"
-#: gio/gio-tool-info.c:37 gio/gio-tool-list.c:38 gio/gio-tool-set.c:34
+#: ../gio/gio-tool-info.c:37 ../gio/gio-tool-list.c:38 ../gio/gio-tool-set.c:34
msgid "Don’t follow symbolic links"
msgstr "Ez jarraitu esteka sinbolikoak"
-#: gio/gio-tool-info.c:75
+#: ../gio/gio-tool-info.c:75
+#, c-format
msgid "attributes:\n"
msgstr "atributuak:\n"
#. Translators: This is a noun and represents and attribute of a file
-#: gio/gio-tool-info.c:127
+#: ../gio/gio-tool-info.c:127
#, c-format
msgid "display name: %s\n"
msgstr "bistaratu izena: %s\n"
#. Translators: This is a noun and represents and attribute of a file
-#: gio/gio-tool-info.c:132
+#: ../gio/gio-tool-info.c:132
#, c-format
msgid "edit name: %s\n"
msgstr "editatu izena: %s\n"
-#: gio/gio-tool-info.c:138
+#: ../gio/gio-tool-info.c:138
#, c-format
msgid "name: %s\n"
msgstr "izena: %s\n"
-#: gio/gio-tool-info.c:145
+#: ../gio/gio-tool-info.c:145
#, c-format
msgid "type: %s\n"
msgstr "mota: %s\n"
-#: gio/gio-tool-info.c:151
+#: ../gio/gio-tool-info.c:151
+#, c-format
msgid "size: "
msgstr "tamaina: "
-#: gio/gio-tool-info.c:156
+#: ../gio/gio-tool-info.c:156
+#, c-format
msgid "hidden\n"
msgstr "ezkutukoa\n"
-#: gio/gio-tool-info.c:159
+#: ../gio/gio-tool-info.c:159
#, c-format
msgid "uri: %s\n"
msgstr "URIa: %s\n"
-#: gio/gio-tool-info.c:228
+#: ../gio/gio-tool-info.c:228
+#, c-format
msgid "Settable attributes:\n"
msgstr "Atributu ezargarriak:\n"
-#: gio/gio-tool-info.c:252
+#: ../gio/gio-tool-info.c:252
+#, c-format
msgid "Writable attribute namespaces:\n"
msgstr "Atributu idazgarrien izen-espazioak:\n"
-#: gio/gio-tool-info.c:287
+#: ../gio/gio-tool-info.c:287
msgid "Show information about locations."
msgstr "Erakutsi kokalekuei buruzko informazioa."
-#: gio/gio-tool-info.c:289
+#: ../gio/gio-tool-info.c:289
msgid ""
"gio info is similar to the traditional ls utility, but using GIO\n"
"locations instead of local files: for example, you can use something\n"
"like smb://server/resource/file.txt as location. File attributes can\n"
"be specified with their GIO name, e.g. standard::icon, or just by\n"
"namespace, e.g. unix, or by “*”, which matches all attributes"
-msgstr "“ls“ tresna bezala erabiltzen da “gio info“, baina GIOren kokalekuak erabiliz \n"
+msgstr ""
+"“ls“ tresna bezala erabiltzen da “gio info“, baina GIOren kokalekuak "
+"erabiliz \n"
"lokaleko fitxategien ordez. Adibidez, honelako zerbait erabil dezakezu\n"
"kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt. Fitxategiaren\n"
"atributuak haien GIO izenekin zehatz daiteke, adibidez, standard::icon edo\n"
"izen-espazioarekin, adib. unix edo “*“ (atributu guztiekin bat datorrelarik)."
-#: gio/gio-tool-list.c:36 gio/gio-tool-tree.c:32
+#: ../gio/gio-tool-list.c:36 ../gio/gio-tool-tree.c:32
msgid "Show hidden files"
msgstr "Erakutsi ezkutuko fitxategiak"
-#: gio/gio-tool-list.c:37
+#: ../gio/gio-tool-list.c:37
msgid "Use a long listing format"
msgstr "Erabili zerrenda luzeen formatua"
-#: gio/gio-tool-list.c:39
+#: ../gio/gio-tool-list.c:39
msgid "Print full URIs"
msgstr "Erakutsi URI osoak"
-#: gio/gio-tool-list.c:170
+#: ../gio/gio-tool-list.c:170
msgid "List the contents of the locations."
msgstr "Zerrendatu kokalekuen edukia."
-#: gio/gio-tool-list.c:172
+#: ../gio/gio-tool-list.c:172
msgid ""
"gio list is similar to the traditional ls utility, but using GIO\n"
"locations instead of local files: for example, you can use something\n"
"like smb://server/resource/file.txt as location. File attributes can\n"
"be specified with their GIO name, e.g. standard::icon"
-msgstr "'ls' tresna bezala erabiltzen da 'gio list', baina GIOren kokalekuak erabiliz \n"
+msgstr ""
+"'ls' tresna bezala erabiltzen da 'gio list', baina GIOren kokalekuak "
+"erabiliz \n"
"lokaleko fitxategien ordez. Adibidez, honelako zerbait erabil dezakezu\n"
"kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt. Fixategiaren\n"
"atributuak haien GIO izenekin zehatz daiteke, adibidez, standard::icon"
#. Translators: commandline placeholder
-#: gio/gio-tool-mime.c:71
+#: ../gio/gio-tool-mime.c:71
msgid "MIMETYPE"
msgstr "MIMEMOTA"
-#: gio/gio-tool-mime.c:71
+#: ../gio/gio-tool-mime.c:71
msgid "HANDLER"
msgstr "KUDEATZAILEA"
-#: gio/gio-tool-mime.c:76
+#: ../gio/gio-tool-mime.c:76
msgid "Get or set the handler for a mimetype."
msgstr "Lortu edo ezarri MIME mota baten kudeatzailea."
-#: gio/gio-tool-mime.c:78
+#: ../gio/gio-tool-mime.c:78
msgid ""
"If no handler is given, lists registered and recommended applications\n"
"for the mimetype. If a handler is given, it is set as the default\n"
"handler for the mimetype."
-msgstr "Ez bada kudeatzailerik ematen, MIME motarentzako erregistratutako\n"
+msgstr ""
+"Ez bada kudeatzailerik ematen, MIME motarentzako erregistratutako\n"
"eta gomendatutako aplikazio guztiak zerrendatzen ditu. Kudeatzaile\n"
"bat ematen bada, MIME motaren kudeatzaile lehenetsi gisa ezarriko da."
-#: gio/gio-tool-mime.c:100
+#: ../gio/gio-tool-mime.c:100
msgid "Must specify a single mimetype, and maybe a handler"
msgstr "MIME mota bakarra zehaztu behar da, eta agian kudeatzaile bat"
-#: gio/gio-tool-mime.c:116
+#: ../gio/gio-tool-mime.c:116
#, c-format
msgid "No default applications for “%s”\n"
msgstr "Ez dago “%s“(r)en aplikazio lehenetsirik\n"
-#: gio/gio-tool-mime.c:122
+#: ../gio/gio-tool-mime.c:122
#, c-format
msgid "Default application for “%s”: %s\n"
msgstr "“%s“(r)en aplikazio lehenetsia: %s\n"
-#: gio/gio-tool-mime.c:127
+#: ../gio/gio-tool-mime.c:127
+#, c-format
msgid "Registered applications:\n"
msgstr "Erregistratutako aplikazioak:\n"
-#: gio/gio-tool-mime.c:129
+#: ../gio/gio-tool-mime.c:129
+#, c-format
msgid "No registered applications\n"
msgstr "Ez dago erregistratutako aplikaziorik\n"
-#: gio/gio-tool-mime.c:140
+#: ../gio/gio-tool-mime.c:140
+#, c-format
msgid "Recommended applications:\n"
msgstr "Gomendatutako aplikazioak:\n"
-#: gio/gio-tool-mime.c:142
+#: ../gio/gio-tool-mime.c:142
+#, c-format
msgid "No recommended applications\n"
msgstr "Ez dago gomendatutako aplikaziorik\n"
-#: gio/gio-tool-mime.c:162
+#: ../gio/gio-tool-mime.c:162
#, c-format
+#| msgid "Failed to load info for handler “%s”\n"
msgid "Failed to load info for handler “%s”"
msgstr "Huts egin du ”%s” kudeatzailearen informazioa kargatzean"
-#: gio/gio-tool-mime.c:168
+#: ../gio/gio-tool-mime.c:168
#, c-format
msgid "Failed to set “%s” as the default handler for “%s”: %s\n"
-msgstr "Huts egin du “%s“ kudeatzaile lehenetsi gisa ezartzean “%s“(r)entzako: %s\n"
+msgstr ""
+"Huts egin du “%s“ kudeatzaile lehenetsi gisa ezartzean “%s“(r)entzako: %s\n"
-#: gio/gio-tool-mkdir.c:31
+#: ../gio/gio-tool-mkdir.c:31
msgid "Create parent directories"
msgstr "Sortu direktorio gurasoak"
-#: gio/gio-tool-mkdir.c:52
+#: ../gio/gio-tool-mkdir.c:52
msgid "Create directories."
msgstr "Sortu direktorioak."
-#: gio/gio-tool-mkdir.c:54
+#: ../gio/gio-tool-mkdir.c:54
msgid ""
"gio mkdir is similar to the traditional mkdir utility, but using GIO\n"
"locations instead of local files: for example, you can use something\n"
"like smb://server/resource/mydir as location."
-msgstr "'mkdir' tresna bezala erabiltzen da 'gio mkdir', baina GIOren kokalekuak\n"
-"erabiliz lokaleko fitxategien ordez Adibidez, honelako zerbait erabil dezakezu\n"
+msgstr ""
+"'mkdir' tresna bezala erabiltzen da 'gio mkdir', baina GIOren kokalekuak\n"
+"erabiliz lokaleko fitxategien ordez Adibidez, honelako zerbait erabil "
+"dezakezu\n"
"kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt"
-#: gio/gio-tool-monitor.c:37
+#: ../gio/gio-tool-monitor.c:37
msgid "Monitor a directory (default: depends on type)"
msgstr "Monitorizatu direktorio bat (lehenetsia: motaren arabera)"
-#: gio/gio-tool-monitor.c:39
+#: ../gio/gio-tool-monitor.c:39
msgid "Monitor a file (default: depends on type)"
msgstr "Monitorizatu direktorio bat (lehenetsia: motaren arabera)"
-#: gio/gio-tool-monitor.c:41
+#: ../gio/gio-tool-monitor.c:41
msgid "Monitor a file directly (notices changes made via hardlinks)"
-msgstr "Monitorizatu fitxategi bat (esteka gogorren bidez egindako aldaketaz ohartzen du)"
+msgstr ""
+"Monitorizatu fitxategi bat (esteka gogorren bidez egindako aldaketaz "
+"ohartzen du)"
-#: gio/gio-tool-monitor.c:43
+#: ../gio/gio-tool-monitor.c:43
msgid "Monitors a file directly, but doesn’t report changes"
msgstr "Monitorizatu fitxategi bat zuzenean, baina ez eman aldaketen berri"
-#: gio/gio-tool-monitor.c:45
+#: ../gio/gio-tool-monitor.c:45
msgid "Report moves and renames as simple deleted/created events"
msgstr "Eman leku eta izen aldaketen berri ezabatutako/sortutako gertaera gisa"
-#: gio/gio-tool-monitor.c:47
+#: ../gio/gio-tool-monitor.c:47
msgid "Watch for mount events"
msgstr "Zaindu muntaketen gertaerak"
-#: gio/gio-tool-monitor.c:208
+#: ../gio/gio-tool-monitor.c:208
msgid "Monitor files or directories for changes."
msgstr "Monitorizatu fitxategi edo direktorioen aldaketak"
-#: gio/gio-tool-mount.c:63
+#: ../gio/gio-tool-mount.c:58
msgid "Mount as mountable"
msgstr "Muntatu muntagarri gisa"
-#: gio/gio-tool-mount.c:64
+#: ../gio/gio-tool-mount.c:59
msgid "Mount volume with device file"
msgstr "Muntatu bolumena gailu-fitxategiarekin"
-#: gio/gio-tool-mount.c:64 gio/gio-tool-mount.c:67
+#: ../gio/gio-tool-mount.c:59
msgid "DEVICE"
msgstr "GAILUA"
-#: gio/gio-tool-mount.c:65
+#: ../gio/gio-tool-mount.c:60
msgid "Unmount"
msgstr "Desmuntatu"
-#: gio/gio-tool-mount.c:66
+#: ../gio/gio-tool-mount.c:61
msgid "Eject"
msgstr "Egotzi"
-#: gio/gio-tool-mount.c:67
-msgid "Stop drive with device file"
-msgstr "Gelditu unitatea gailu-fitxategiarekin"
-
-#: gio/gio-tool-mount.c:68
+#: ../gio/gio-tool-mount.c:62
msgid "Unmount all mounts with the given scheme"
msgstr "Desmuntatu muntatze-puntu guztiak emandako eskemarekin"
-#: gio/gio-tool-mount.c:68
+#: ../gio/gio-tool-mount.c:62
msgid "SCHEME"
msgstr "ESKEMA"
-#: gio/gio-tool-mount.c:69
+#: ../gio/gio-tool-mount.c:63
msgid "Ignore outstanding file operations when unmounting or ejecting"
-msgstr "Ez ikusi egin amaitu gabeko fitxategien eragiketei desmuntatzean edo egozketan"
+msgstr ""
+"Ez ikusi egin amaitu gabeko fitxategien eragiketei desmuntatzean edo "
+"egozketan"
-#: gio/gio-tool-mount.c:70
+#: ../gio/gio-tool-mount.c:64
msgid "Use an anonymous user when authenticating"
msgstr "Erabili erabiltzaile anonimoa autentifikatzean"
#. Translator: List here is a verb as in 'List all mounts'
-#: gio/gio-tool-mount.c:72
+#: ../gio/gio-tool-mount.c:66
msgid "List"
msgstr "Zerrenda"
-#: gio/gio-tool-mount.c:73
+#: ../gio/gio-tool-mount.c:67
msgid "Monitor events"
msgstr "Monitorearen gertaerak"
-#: gio/gio-tool-mount.c:74
+#: ../gio/gio-tool-mount.c:68
msgid "Show extra information"
msgstr "Erakutsi informazio gehigarria"
-#: gio/gio-tool-mount.c:75
-msgid "The numeric PIM when unlocking a VeraCrypt volume"
-msgstr "Zenbakizko PIMa VeraCrypt bolumen bat desblokeatzean"
-
-#: gio/gio-tool-mount.c:75
-msgid "PIM"
-msgstr "PIM"
-
-#: gio/gio-tool-mount.c:76
-msgid "Mount a TCRYPT hidden volume"
-msgstr "Muntatu TCRYPT bolumen ezkutu bat"
-
-#: gio/gio-tool-mount.c:77
-msgid "Mount a TCRYPT system volume"
-msgstr "Muntatu TCRYPT sistema-bolumen bat"
-
-#: gio/gio-tool-mount.c:265 gio/gio-tool-mount.c:297
+#: ../gio/gio-tool-mount.c:246 ../gio/gio-tool-mount.c:276
+#| msgid "Error mounting location: Anonymous access denied\n"
msgid "Anonymous access denied"
msgstr "Anonimoki atzitzea debekatua"
-#: gio/gio-tool-mount.c:522
-msgid "No drive for device file"
-msgstr "Ez dago unitaterik gailu-fitxategirako"
-
-#: gio/gio-tool-mount.c:975
+#: ../gio/gio-tool-mount.c:897
#, c-format
msgid "Mounted %s at %s\n"
msgstr "%s hemen muntatuta: %s\n"
-#: gio/gio-tool-mount.c:1027
+#: ../gio/gio-tool-mount.c:950
+#| msgid "No volume for device file %s\n"
msgid "No volume for device file"
msgstr "Ez dago bolumenik gailu-fitxategiarentzako"
-#: gio/gio-tool-mount.c:1216
+#: ../gio/gio-tool-mount.c:1145
msgid "Mount or unmount the locations."
msgstr "Muntatu edo desmuntatu kokalekuak."
-#: gio/gio-tool-move.c:42
+#: ../gio/gio-tool-move.c:42
msgid "Don’t use copy and delete fallback"
msgstr "Ez erabili ordezkoaren kopia eta ezabatzea"
-#: gio/gio-tool-move.c:99
+#: ../gio/gio-tool-move.c:99
msgid "Move one or more files from SOURCE to DEST."
msgstr "Aldatu fitxategi bat edo gehiago lekuz ITURBURUtik HELBURUra."
-#: gio/gio-tool-move.c:101
+#: ../gio/gio-tool-move.c:101
msgid ""
"gio move is similar to the traditional mv utility, but using GIO\n"
"locations instead of local files: for example, you can use something\n"
"like smb://server/resource/file.txt as location"
-msgstr "'mv' tresna bezala erabiltzen da 'gio move', baina GIOren kokalekuak\n"
+msgstr ""
+"'mv' tresna bezala erabiltzen da 'gio move', baina GIOren kokalekuak\n"
"erabiliz lokaleko fitxategien ordez Adibidez, honelako zerbait erabil\n"
"dezakezu kokaleku gisa: smb://zerbitzaria/baliabidea/fitxategia.txt"
-#: gio/gio-tool-move.c:143
+#: ../gio/gio-tool-move.c:142
#, c-format
msgid "Target %s is not a directory"
msgstr "%s helburua ez da direktorioa"
-#: gio/gio-tool-open.c:75
+#: ../gio/gio-tool-open.c:50
msgid ""
"Open files with the default application that\n"
"is registered to handle files of this type."
-msgstr "Ireki fitxategiak mota honetako fitxategiak kudeatzeko\n"
+msgstr ""
+"Ireki fitxategiak mota honetako fitxategiak kudeatzeko\n"
"erregistratuta dagoen aplikazio lehenetsiarekin."
-#: gio/gio-tool-remove.c:31 gio/gio-tool-trash.c:31
+#: ../gio/gio-tool-remove.c:31 ../gio/gio-tool-trash.c:31
msgid "Ignore nonexistent files, never prompt"
msgstr "Ez ikusi egin existitzen ez diren fitxategiei, inoiz ere ez galdetu"
-#: gio/gio-tool-remove.c:52
+#: ../gio/gio-tool-remove.c:52
msgid "Delete the given files."
msgstr "Ezabatu emandako fitxategiak"
-#: gio/gio-tool-rename.c:45
+#: ../gio/gio-tool-rename.c:45
msgid "NAME"
msgstr "IZENA"
-#: gio/gio-tool-rename.c:50
+#: ../gio/gio-tool-rename.c:50
msgid "Rename a file."
msgstr "Aldatu fitxategi-izena."
-#: gio/gio-tool-rename.c:70
+#: ../gio/gio-tool-rename.c:70
msgid "Missing argument"
msgstr "Argumentua falta da"
-#: gio/gio-tool-rename.c:76 gio/gio-tool-save.c:190 gio/gio-tool-set.c:137
+#: ../gio/gio-tool-rename.c:76 ../gio/gio-tool-save.c:195
+#: ../gio/gio-tool-set.c:137
msgid "Too many arguments"
msgstr "Argumentu gehiegi"
-#: gio/gio-tool-rename.c:95
+#: ../gio/gio-tool-rename.c:95
#, c-format
msgid "Rename successful. New uri: %s\n"
msgstr "Izenez ongi aldatu da. URI berria: %s\n"
-#: gio/gio-tool-save.c:50
+#: ../gio/gio-tool-save.c:50
msgid "Only create if not existing"
msgstr "Sortu soilik ez bada existitzen"
-#: gio/gio-tool-save.c:51
+#: ../gio/gio-tool-save.c:51
msgid "Append to end of file"
msgstr "Erantsi fitxategiaren amaieran"
-#: gio/gio-tool-save.c:52
+#: ../gio/gio-tool-save.c:52
msgid "When creating, restrict access to the current user"
msgstr "Sortzean, murriztu uneko erabiltzailearen atzipena"
-#: gio/gio-tool-save.c:53
+#: ../gio/gio-tool-save.c:53
msgid "When replacing, replace as if the destination did not exist"
msgstr "Ordeztean, ordeztu helburukoa existituko ez balitz bezala"
#. Translators: The "etag" is a token allowing to verify whether a file has been modified
-#: gio/gio-tool-save.c:55
+#: ../gio/gio-tool-save.c:55
msgid "Print new etag at end"
msgstr "Inprimatu entitate-etiketa (etag) berria amaieran"
#. Translators: The "etag" is a token allowing to verify whether a file has been modified
-#: gio/gio-tool-save.c:57
+#: ../gio/gio-tool-save.c:57
msgid "The etag of the file being overwritten"
msgstr "Fitxategiaren entitate-etiketa (etag) gainidazten ari da"
-#: gio/gio-tool-save.c:57
+#: ../gio/gio-tool-save.c:57
msgid "ETAG"
msgstr "ENTITATE-ETIKETA (ETAG)"
-#: gio/gio-tool-save.c:113
+#: ../gio/gio-tool-save.c:119
+#| msgid "Error reading from handle: %s"
msgid "Error reading from standard input"
msgstr "Errorea sarrera arruntetik (stdin) irakurtzean"
#. Translators: The "etag" is a token allowing to verify whether a file has been modified
-#: gio/gio-tool-save.c:139
+#: ../gio/gio-tool-save.c:145
+#, c-format
msgid "Etag not available\n"
msgstr "Entitate-etiketa ez dago eskuragarri\n"
-#: gio/gio-tool-save.c:163
+#: ../gio/gio-tool-save.c:168
msgid "Read from standard input and save to DEST."
msgstr "Irakurri sarrera estandarretik eta gorde HELBIDEAN."
-#: gio/gio-tool-save.c:183
+#: ../gio/gio-tool-save.c:188
msgid "No destination given"
msgstr "Ez da helbururik eman"
-#: gio/gio-tool-set.c:33
+#: ../gio/gio-tool-set.c:33
msgid "Type of the attribute"
msgstr "Atributu mota"
-#: gio/gio-tool-set.c:33
+#: ../gio/gio-tool-set.c:33
msgid "TYPE"
msgstr "MOTA"
-#: gio/gio-tool-set.c:89
+#: ../gio/gio-tool-set.c:89
msgid "ATTRIBUTE"
msgstr "ATRIBUTUA"
-#: gio/gio-tool-set.c:89
+#: ../gio/gio-tool-set.c:89
msgid "VALUE"
msgstr "BALIOA"
-#: gio/gio-tool-set.c:93
+#: ../gio/gio-tool-set.c:93
msgid "Set a file attribute of LOCATION."
msgstr "Ezarri fitxategiaren KOKALEKUA atributua"
-#: gio/gio-tool-set.c:113
+#: ../gio/gio-tool-set.c:113
msgid "Location not specified"
msgstr "Ez da kokalekurik zehaztu"
-#: gio/gio-tool-set.c:120
+#: ../gio/gio-tool-set.c:120
msgid "Attribute not specified"
msgstr "Ez da atributurik zehaztu"
-#: gio/gio-tool-set.c:130
+#: ../gio/gio-tool-set.c:130
msgid "Value not specified"
msgstr "Ez da baliorik zehaztu"
-#: gio/gio-tool-set.c:180
+#: ../gio/gio-tool-set.c:180
#, c-format
+#| msgid "Invalid attribute type %s\n"
msgid "Invalid attribute type “%s”"
msgstr "Baliogabeko ”%s” atributu mota"
-#: gio/gio-tool-trash.c:32
+#: ../gio/gio-tool-trash.c:32
msgid "Empty the trash"
msgstr "Hustu zakarrontzia"
-#: gio/gio-tool-trash.c:86
+#: ../gio/gio-tool-trash.c:86
msgid "Move files or directories to the trash."
msgstr "Bota fitxategi edo direktorioak zakarrontzira."
-#: gio/gio-tool-tree.c:33
+#: ../gio/gio-tool-tree.c:33
msgid "Follow symbolic links, mounts and shortcuts"
msgstr "Jarraitu esteka sinbolikoak, muntatze-puntuak eta lasterbideak"
-#: gio/gio-tool-tree.c:244
+#: ../gio/gio-tool-tree.c:244
msgid "List contents of directories in a tree-like format."
msgstr "Zerrendatu direktorioen edukia zuhaitz baten bezalako formatuan."
-#: gio/glib-compile-resources.c:143 gio/glib-compile-schemas.c:1515
+#: ../gio/glib-compile-resources.c:142 ../gio/glib-compile-schemas.c:1501
#, c-format
msgid "Element <%s> not allowed inside <%s>"
msgstr "<%s> elementua ez da <%s>(r)en barruan onartzen"
-#: gio/glib-compile-resources.c:147
+#: ../gio/glib-compile-resources.c:146
#, c-format
msgid "Element <%s> not allowed at toplevel"
msgstr "<%s> elementua ez da maila gorenean onartzen"
-#: gio/glib-compile-resources.c:237
+#: ../gio/glib-compile-resources.c:237
#, c-format
msgid "File %s appears multiple times in the resource"
msgstr "%s fitxategia hainbat aldiz agertzen da baliabidean"
-#: gio/glib-compile-resources.c:248
+#: ../gio/glib-compile-resources.c:248
#, c-format
msgid "Failed to locate “%s” in any source directory"
msgstr "Huts egin du “%s“ bilatzean edozein iturburuko direktoriotan"
-#: gio/glib-compile-resources.c:259
+#: ../gio/glib-compile-resources.c:259
#, c-format
msgid "Failed to locate “%s” in current directory"
msgstr "Huts egin du “%s“ bilatzean uneko direktorioan"
-#: gio/glib-compile-resources.c:293
+#: ../gio/glib-compile-resources.c:290
#, c-format
msgid "Unknown processing option “%s”"
msgstr "Prozesuaren “%s“ aukera ezezaguna"
-#. Translators: the first %s is a gresource XML attribute,
-#. * the second %s is an environment variable, and the third
-#. * %s is a command line tool
-#.
-#: gio/glib-compile-resources.c:313 gio/glib-compile-resources.c:370
-#: gio/glib-compile-resources.c:427
+#: ../gio/glib-compile-resources.c:308 ../gio/glib-compile-resources.c:354
#, c-format
-msgid "%s preprocessing requested, but %s is not set, and %s is not in PATH"
-msgstr "%s aurreprozesatzea eskatu da, baina %s ez dago ezarrita eta %s ez dago BIDE-IZENA aukeran"
+msgid "Failed to create temp file: %s"
+msgstr "Huts egin du aldi baterako fitxategia sortu: %s"
-#: gio/glib-compile-resources.c:460
+#: ../gio/glib-compile-resources.c:382
#, c-format
msgid "Error reading file %s: %s"
msgstr "Errorea '%s' fitxategia irakurtzean: %s"
-#: gio/glib-compile-resources.c:480
+#: ../gio/glib-compile-resources.c:402
#, c-format
msgid "Error compressing file %s"
msgstr "Errorea %s fitxategia konprimitzean"
-#: gio/glib-compile-resources.c:541
+#: ../gio/glib-compile-resources.c:469
#, c-format
msgid "text may not appear inside <%s>"
msgstr "testua ezin da <%s>(r)en barruan egon"
-#: gio/glib-compile-resources.c:737 gio/glib-compile-schemas.c:2139
+#: ../gio/glib-compile-resources.c:664 ../gio/glib-compile-schemas.c:2067
msgid "Show program version and exit"
msgstr "Erakutsi programaren bertsioa eta irten"
-#: gio/glib-compile-resources.c:738
-msgid "Name of the output file"
-msgstr "Irteerako fitxategiaren izena"
+#: ../gio/glib-compile-resources.c:665
+msgid "name of the output file"
+msgstr "irteerako fitxategiaren izena"
-#: gio/glib-compile-resources.c:739
+#: ../gio/glib-compile-resources.c:666
msgid ""
-"The directories to load files referenced in FILE from (default: current "
+"The directories where files are to be read from (default to current "
"directory)"
-msgstr "FITXATEGIA atributuak erreferentziatutako fitxategiak kargatzeko direktorioak (lehenetsia: uneko direktorioa)"
+msgstr ""
+"Direktorioak, horietarik fitxategiak irakurtzeko (lehenetsia uneko "
+"direktorioa)"
-#: gio/glib-compile-resources.c:739 gio/glib-compile-schemas.c:2140
-#: gio/glib-compile-schemas.c:2169
+#: ../gio/glib-compile-resources.c:666 ../gio/glib-compile-schemas.c:2068
+#: ../gio/glib-compile-schemas.c:2096
msgid "DIRECTORY"
msgstr "DIREKTORIOA"
-#: gio/glib-compile-resources.c:740
+#: ../gio/glib-compile-resources.c:667
msgid ""
"Generate output in the format selected for by the target filename extension"
-msgstr "Sortu irteera hautatutako formatuan helburuko fitxategiaren luzapenaren arabera"
+msgstr ""
+"Sortu irteera hautatutako formatuan helburuko fitxategiaren luzapenaren "
+"arabera"
-#: gio/glib-compile-resources.c:741
+#: ../gio/glib-compile-resources.c:668
msgid "Generate source header"
msgstr "Sortu iturburuaren goiburua"
-#: gio/glib-compile-resources.c:742
-msgid "Generate source code used to link in the resource file into your code"
-msgstr "Sortu iturburu-kodea (baliabidearen fitxategia zure kodean estekatzeko erabilita)"
+#: ../gio/glib-compile-resources.c:669
+msgid "Generate sourcecode used to link in the resource file into your code"
+msgstr ""
+"Sortu iturburuaren kodea (baliabidearen fitxategia zure kodean estekatzeko "
+"erabilita)"
-#: gio/glib-compile-resources.c:743
+#: ../gio/glib-compile-resources.c:670
msgid "Generate dependency list"
msgstr "Sortu mendekotasunen zerrenda"
-#: gio/glib-compile-resources.c:744
-msgid "Name of the dependency file to generate"
-msgstr "Sortuko den mendekotasun-fitxategiaren izena"
+#: ../gio/glib-compile-resources.c:671
+msgid "name of the dependency file to generate"
+msgstr "mendekotasunen fitxategiaren izena sortzeko"
-#: gio/glib-compile-resources.c:745
+#: ../gio/glib-compile-resources.c:672
msgid "Include phony targets in the generated dependency file"
msgstr "Sartu helburu faltsuak sortutako mendekotasun-fitxategian"
-#: gio/glib-compile-resources.c:746
+#: ../gio/glib-compile-resources.c:673
msgid "Don’t automatically create and register resource"
-msgstr "Ez sortu eta erregistratu baliabidea automatikoki"
+msgstr "Ez sortu eta erregistratu baliabidea automatikoki "
-#: gio/glib-compile-resources.c:747
+#: ../gio/glib-compile-resources.c:674
msgid "Don’t export functions; declare them G_GNUC_INTERNAL"
msgstr "Ez esportatu funtzioak: deklaratu haiek G_GNUC_INTERNAL gisa"
-#: gio/glib-compile-resources.c:748
-msgid ""
-"Don’t embed resource data in the C file; assume it's linked externally "
-"instead"
-msgstr "Ez kapsulatu baliabide-datuak C fitxategian; onartu kanpotik estekatuta dagoela"
-
-#: gio/glib-compile-resources.c:749
+#: ../gio/glib-compile-resources.c:675
msgid "C identifier name used for the generated source code"
msgstr "C identifikatzailearen izena (sortutako iturburuaren kodean erabilita)"
-#: gio/glib-compile-resources.c:775
+#: ../gio/glib-compile-resources.c:701
msgid ""
"Compile a resource specification into a resource file.\n"
"Resource specification files have the extension .gresource.xml,\n"
"and the resource file have the extension called .gresource."
-msgstr "Konpilatu baliabidearen zehaztapen bat baliabideko fitxategi batean.\n"
+msgstr ""
+"Konpilatu baliabidearen zehaztapen bat baliabideko fitxategi batean.\n"
"Baliabideen zehaztapenen fitxategiak .gresource.xml luzapena dute,\n"
"eta baliabideen fitxategiek berriz .gresource luzapena."
-#: gio/glib-compile-resources.c:797
+#: ../gio/glib-compile-resources.c:723
+#, c-format
msgid "You should give exactly one file name\n"
msgstr "Fitxategi baten izena bakarrik eman behar duzu\n"
-#: gio/glib-compile-schemas.c:95
+#: ../gio/glib-compile-schemas.c:95
#, c-format
msgid "nick must be a minimum of 2 characters"
msgstr "goitizenak gutxienez 2 karaktere eduki behar ditu"
-#: gio/glib-compile-schemas.c:106
+#: ../gio/glib-compile-schemas.c:106
#, c-format
+#| msgid "Invalid symlink value given"
msgid "Invalid numeric value"
msgstr "Baliogabeko zenbakizko balioa"
-#: gio/glib-compile-schemas.c:114
+#: ../gio/glib-compile-schemas.c:114
#, c-format
+#| msgid "<%s id='%s'> already specified"
msgid "<value nick='%s'/> already specified"
msgstr "<value nick='%s'/> jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:122
+#: ../gio/glib-compile-schemas.c:122
#, c-format
+#| msgid "<key name='%s'> already specified"
msgid "value='%s' already specified"
msgstr "\"value='%s'\" jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:136
+#: ../gio/glib-compile-schemas.c:136
#, c-format
msgid "flags values must have at most 1 bit set"
msgstr "balioen banderek 1 bit ezarrita eduki behar dute"
-#: gio/glib-compile-schemas.c:161
+#: ../gio/glib-compile-schemas.c:161
#, c-format
msgid "<%s> must contain at least one <value>"
msgstr "<%s>(e)k gutxienez <value> bat eduki behar du"
-#: gio/glib-compile-schemas.c:317
+#: ../gio/glib-compile-schemas.c:315
#, c-format
+#| msgid "No connection endpoint specified"
msgid "<%s> is not contained in the specified range"
msgstr "<%s> ez dago zehaztutako barrutian"
-#: gio/glib-compile-schemas.c:329
+#: ../gio/glib-compile-schemas.c:327
#, c-format
msgid "<%s> is not a valid member of the specified enumerated type"
msgstr "<%s> ez da zehaztutako zenbatutako motaren baliozko kidea"
-#: gio/glib-compile-schemas.c:335
+#: ../gio/glib-compile-schemas.c:333
#, c-format
msgid "<%s> contains string not in the specified flags type"
msgstr "<%s>(e)k badu katerik zehaztutako bandera motetan ez dagoena"
-#: gio/glib-compile-schemas.c:341
+#: ../gio/glib-compile-schemas.c:339
#, c-format
msgid "<%s> contains a string not in <choices>"
msgstr "<%s>(e)k badu katerik <choices>-en ez dagoena"
-#: gio/glib-compile-schemas.c:375
+#: ../gio/glib-compile-schemas.c:373
+#| msgid "<key name='%s'> already specified"
msgid "<range/> already specified for this key"
msgstr "<range/> jadanik zehaztuta gako honentzat"
-#: gio/glib-compile-schemas.c:393
+#: ../gio/glib-compile-schemas.c:391
#, c-format
msgid "<range> not allowed for keys of type “%s”"
-msgstr "<range> ez dago baimenduta “%s“ motako gakoentzako"
+msgstr "<range> ez dago baimenduta \"%s\" motako gakoentzako"
-#: gio/glib-compile-schemas.c:410
+#: ../gio/glib-compile-schemas.c:408
#, c-format
msgid "<range> specified minimum is greater than maximum"
msgstr "<range> zehaztutako gutxienekoa gehienezkoa baino handiagoa da"
-#: gio/glib-compile-schemas.c:435
+#: ../gio/glib-compile-schemas.c:433
#, c-format
msgid "unsupported l10n category: %s"
msgstr "onartu gabeko l10n kategoria: %s"
-#: gio/glib-compile-schemas.c:443
+#: ../gio/glib-compile-schemas.c:441
msgid "l10n requested, but no gettext domain given"
msgstr "l10n eskatuta, baina ez da gettext-en domeinurik eman"
-#: gio/glib-compile-schemas.c:455
+#: ../gio/glib-compile-schemas.c:453
msgid "translation context given for value without l10n enabled"
msgstr "balioaren emandako itzulpenaren testuingurua l10n gaitu gabe"
-#: gio/glib-compile-schemas.c:477
+#: ../gio/glib-compile-schemas.c:475
#, c-format
+#| msgid "Failed to create file “%s”: %s"
msgid "Failed to parse <default> value of type “%s”: "
-msgstr "Huts egin du “%s“ motaren <default> balioa analizatzean "
+msgstr "Huts egin du \"%s\" motaren <default> balioa analizatzean"
-#: gio/glib-compile-schemas.c:494
+#: ../gio/glib-compile-schemas.c:492
msgid ""
"<choices> cannot be specified for keys tagged as having an enumerated type"
-msgstr "Ezin da <choices> zehaztu zenbatutako mota bat baluten bezalako etiketatutako gakoentzako"
+msgstr ""
+"Ezin da <choices> zehaztu zenbatutako mota bat baluten bezalako etiketatutako "
+"gakoentzako"
-#: gio/glib-compile-schemas.c:503
+#: ../gio/glib-compile-schemas.c:501
+#| msgid "<child name='%s'> already specified"
msgid "<choices> already specified for this key"
msgstr "<choices> jadanik zehaztuta gakoarentzako"
-#: gio/glib-compile-schemas.c:515
+#: ../gio/glib-compile-schemas.c:513
#, c-format
msgid "<choices> not allowed for keys of type “%s”"
-msgstr "<choices> ez dago baimenduta “%s“ motako gakoentzako"
+msgstr "<choices> ez dago baimenduta \"%s\" motako gakoentzako"
-#: gio/glib-compile-schemas.c:531
+#: ../gio/glib-compile-schemas.c:529
#, c-format
+#| msgid "<child name='%s'> already specified"
msgid "<choice value='%s'/> already given"
msgstr "<choice value='%s'/> jadanik emanda"
-#: gio/glib-compile-schemas.c:546
+#: ../gio/glib-compile-schemas.c:544
#, c-format
msgid "<choices> must contain at least one <choice>"
msgstr "<choices>-ek gutxienez <choice> bat eduki behar du"
-#: gio/glib-compile-schemas.c:560
+#: ../gio/glib-compile-schemas.c:558
+#| msgid "<child name='%s'> already specified"
msgid "<aliases> already specified for this key"
msgstr "<aliases> jadanik zehaztuta gako honentzako"
-#: gio/glib-compile-schemas.c:564
+#: ../gio/glib-compile-schemas.c:562
msgid ""
"<aliases> can only be specified for keys with enumerated or flags types or "
"after <choices>"
-msgstr "<aliases> soilik zehatz daitezke zenbatuta edo banderak motetako gakoekin, edo <choices> ondoren"
+msgstr ""
+"<aliases> soilik zehatz daitezke zenbatuta edo banderak motetako gakoekin, "
+"edo "
+"<choices> ondoren"
-#: gio/glib-compile-schemas.c:583
+#: ../gio/glib-compile-schemas.c:581
#, c-format
msgid ""
"<alias value='%s'/> given when “%s” is already a member of the enumerated "
"type"
-msgstr "<alias value='%s'/> eman da “%s“ jadanik zenbatuta motako kide denean"
+msgstr ""
+"<alias value='%s'/> eman da \"%s\" jadanik zenbatuta motako kide denean"
-#: gio/glib-compile-schemas.c:589
+#: ../gio/glib-compile-schemas.c:587
#, c-format
msgid "<alias value='%s'/> given when <choice value='%s'/> was already given"
-msgstr "<alias value='%s'/> eman da jadanik <choice value='%s'/> emanda dagoenean"
+msgstr ""
+"<alias value='%s'/> eman da jadanik <choice value='%s'/> emanda dagoenean"
-#: gio/glib-compile-schemas.c:597
+#: ../gio/glib-compile-schemas.c:595
#, c-format
+#| msgid "<%s id='%s'> already specified"
msgid "<alias value='%s'/> already specified"
msgstr "<alias value='%s'/> jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:607
+#: ../gio/glib-compile-schemas.c:605
#, c-format
+#| msgid "The pathname “%s” is not an absolute path"
msgid "alias target “%s” is not in enumerated type"
msgstr "helburuko “%s” aliasa ez da zenbatuta motakoa"
-#: gio/glib-compile-schemas.c:608
+#: ../gio/glib-compile-schemas.c:606
#, c-format
msgid "alias target “%s” is not in <choices>"
msgstr "helburuko “%s” aliasa ez dagon <choices>-en"
-#: gio/glib-compile-schemas.c:623
+#: ../gio/glib-compile-schemas.c:621
#, c-format
msgid "<aliases> must contain at least one <alias>"
msgstr "<aliases>-ek gutxienez <alias> bat eduki behar du"
-#: gio/glib-compile-schemas.c:798
+#: ../gio/glib-compile-schemas.c:786
+#| msgid "empty names are not permitted"
msgid "Empty names are not permitted"
msgstr "Izen hutsak ez daude baimenduta"
-#: gio/glib-compile-schemas.c:808
+#: ../gio/glib-compile-schemas.c:796
#, 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 "“%s“ izena baliogabea: izenak letra minuskula batekin hasi behar dira"
-#: gio/glib-compile-schemas.c:820
+#: ../gio/glib-compile-schemas.c:808
#, 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"
-msgstr "“%s“ izena baliogabea: “%c“ karakterea baliogabea. soilik letra minuskulak, zenbakiak eta hipenazioa (“-“) onartzen dira."
+msgstr ""
+"“%s“ izena baliogabea: “%c“ karakterea baliogabea. soilik letra minuskulak, "
+"zenbakiak eta hipenazioa (“-“) onartzen dira."
-#: gio/glib-compile-schemas.c:829
+#: ../gio/glib-compile-schemas.c:817
#, c-format
+#| msgid "invalid name '%s': two successive hyphens ('--') are not permitted."
msgid "Invalid name “%s”: two successive hyphens (“--”) are not permitted"
msgstr "“%s“ izena baliogabea: bi hipenazio jarraian (“--“) ez dago onartuta."
-#: gio/glib-compile-schemas.c:838
+#: ../gio/glib-compile-schemas.c:826
#, 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 "“%s“ izena baliogabea: azken karakterea ezin da hipenazioa (“-“) izan."
-#: gio/glib-compile-schemas.c:846
+#: ../gio/glib-compile-schemas.c:834
#, c-format
+#| msgid "invalid name '%s': maximum length is 1024"
msgid "Invalid name “%s”: maximum length is 1024"
msgstr "“%s“ izena baliogabea: gehienezko luzera 1024 da"
-#: gio/glib-compile-schemas.c:918
+#: ../gio/glib-compile-schemas.c:904
#, c-format
msgid "<child name='%s'> already specified"
msgstr "<child name='%s'> jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:944
+#: ../gio/glib-compile-schemas.c:930
+#| msgid "cannot add keys to a 'list-of' schema"
msgid "Cannot add keys to a “list-of” schema"
msgstr "Ezin zaio gakorik gehitu “list-of“ eskema bati"
-#: gio/glib-compile-schemas.c:955
+#: ../gio/glib-compile-schemas.c:941
#, c-format
msgid "<key name='%s'> already specified"
msgstr "<key name='%s'> jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:973
+#: ../gio/glib-compile-schemas.c:959
#, c-format
msgid ""
"<key name='%s'> shadows <key name='%s'> in <schema id='%s'>; use <override> "
"to modify value"
-msgstr "<key name='%s'>-ek <key name='%s'> iluntzen du <schema id='%s'>-en; erabili <override> balioa aldatzeko"
+msgstr ""
+"<key name='%s'>-ek <key name='%s'> iluntzen du <schema id='%s'>-en; erabili "
+"<override> balioa aldatzeko"
-#: gio/glib-compile-schemas.c:984
+#: ../gio/glib-compile-schemas.c:970
#, 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 "<key>-rentzako hauetariko bat zehaztu behar da atributu gisa: “type“, “enum“edo “flags“"
+msgstr ""
+"<key>-rentzako hauetariko bat zehaztu behar da atributu gisa: “type“, “enum“"
+"edo “flags“"
-#: gio/glib-compile-schemas.c:1003
+#: ../gio/glib-compile-schemas.c:989
#, c-format
msgid "<%s id='%s'> not (yet) defined."
msgstr "<%s id='%s'> ez dago (oraindik) definituta."
-#: gio/glib-compile-schemas.c:1018
+#: ../gio/glib-compile-schemas.c:1004
#, c-format
+#| msgid "invalid GVariant type string '%s'"
msgid "Invalid GVariant type string “%s”"
msgstr "Baliogabeko GVariant motako “%s“ katea"
-#: gio/glib-compile-schemas.c:1048
+#: ../gio/glib-compile-schemas.c:1034
+#| msgid "<override> given but schema isn't extending anything"
msgid "<override> given but schema isn’t extending anything"
msgstr "<override> eman da, baina eskema ez da ezer hedatzen ari"
-#: gio/glib-compile-schemas.c:1061
+#: ../gio/glib-compile-schemas.c:1047
#, c-format
+#| msgid "no <key name='%s'> to override"
msgid "No <key name='%s'> to override"
msgstr "Ez dago <key name='%s'>(e)rik gainidazteko"
-#: gio/glib-compile-schemas.c:1069
+#: ../gio/glib-compile-schemas.c:1055
#, c-format
msgid "<override name='%s'> already specified"
msgstr "<override name='%s'> jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:1142
+#: ../gio/glib-compile-schemas.c:1128
#, c-format
msgid "<schema id='%s'> already specified"
msgstr "<schema id='%s'> jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:1154
+#: ../gio/glib-compile-schemas.c:1140
#, 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'> oraindik existitzen ez den “%s“ eskema hedatzen du"
-#: gio/glib-compile-schemas.c:1170
+#: ../gio/glib-compile-schemas.c:1156
#, 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'> oraindik existitzen ez den “%s“ eskemaren zerrenda da"
-#: gio/glib-compile-schemas.c:1178
+#: ../gio/glib-compile-schemas.c:1164
#, 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 "Ezin da bide-izena duen eskema baten zerrenda izan"
-#: gio/glib-compile-schemas.c:1188
+#: ../gio/glib-compile-schemas.c:1174
#, c-format
+#| msgid "Can not extend a schema with a path"
msgid "Cannot extend a schema with a path"
msgstr "Ezin da eskema bat bide-izen batekin hedatu"
-#: gio/glib-compile-schemas.c:1198
+#: ../gio/glib-compile-schemas.c:1184
#, c-format
msgid ""
"<schema id='%s'> is a list, extending <schema id='%s'> which is not a list"
-msgstr "<schema id='%s'> zerrenda bat da, zerrenda ez den <schema id='%s'> hedatzen duena"
+msgstr ""
+"<schema id='%s'> zerrenda bat da, zerrenda ez den <schema id='%s'> hedatzen "
+"duena"
-#: gio/glib-compile-schemas.c:1208
+#: ../gio/glib-compile-schemas.c:1194
#, 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”"
-msgstr "<schema id='%s' list-of='%s'>(e)k <schema id='%s' list-of='%s'> hedatzen du, baina “%s“(e)k ez du “%s“ hedatzen"
+msgstr ""
+"<schema id='%s' list-of='%s'>(e)k <schema id='%s' list-of='%s'> hedatzen du, "
+"baina “%s“(e)k ez du “%s“ hedatzen"
-#: gio/glib-compile-schemas.c:1225
+#: ../gio/glib-compile-schemas.c:1211
#, 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 "Bide-izen bat ematen bada, barra batekin (/) hasi eta amaitu behar da"
-#: gio/glib-compile-schemas.c:1232
+#: ../gio/glib-compile-schemas.c:1218
#, c-format
+#| msgid "the path of a list must end with ':/'"
msgid "The path of a list must end with “:/”"
msgstr "Zerrenda bateko bide-izena “:/“-rekin amaitu behar da"
-#: gio/glib-compile-schemas.c:1241
+#: ../gio/glib-compile-schemas.c:1227
#, c-format
msgid ""
"Warning: Schema “%s” has path “%s”. Paths starting with “/apps/”, “/"
"desktop/” or “/system/” are deprecated."
-msgstr "Abisua: “%s“ eskemak “%s“ bide-izena du. \"/apps/\", \"/desktop/\" edo \"/system/\"-ekin hasten diren bide-izenak zaharkituta daude."
+msgstr ""
+"Abisua: \"%s\" eskemak \"%s\" bide-izena du. \"/apps/\", \"/desktop/\" edo "
+"\"/system/\"-ekin "
+"hasten diren bide-izenak zaharkituta daude."
-#: gio/glib-compile-schemas.c:1271
+#: ../gio/glib-compile-schemas.c:1257
#, c-format
msgid "<%s id='%s'> already specified"
msgstr "<%s id='%s'> jadanik zehaztuta"
-#: gio/glib-compile-schemas.c:1421 gio/glib-compile-schemas.c:1437
+#: ../gio/glib-compile-schemas.c:1407 ../gio/glib-compile-schemas.c:1423
#, c-format
msgid "Only one <%s> element allowed inside <%s>"
msgstr "Soilik <%s> elementu bakarra onartzen da <%s>(r)en barruan"
-#: gio/glib-compile-schemas.c:1519
+#: ../gio/glib-compile-schemas.c:1505
#, c-format
msgid "Element <%s> not allowed at the top level"
msgstr "<%s> elementua ez da maila gorenean onartzen"
-#: gio/glib-compile-schemas.c:1537
+#: ../gio/glib-compile-schemas.c:1523
msgid "Element <default> is required in <key>"
msgstr "<default> elementua behar da <key>-en"
-#: gio/glib-compile-schemas.c:1627
+#: ../gio/glib-compile-schemas.c:1613
#, c-format
+#| msgid "text may not appear inside <%s>"
msgid "Text may not appear inside <%s>"
msgstr "Testua ezin da <%s>(r)en barruan egon"
-#: gio/glib-compile-schemas.c:1695
+#: ../gio/glib-compile-schemas.c:1681
#, c-format
msgid "Warning: undefined reference to <schema id='%s'/>"
msgstr "Abisua: definitu gabeko erreferentzia <schema id='%s'/>-erako"
#. Translators: Do not translate "--strict".
-#: gio/glib-compile-schemas.c:1834 gio/glib-compile-schemas.c:1910
-#: gio/glib-compile-schemas.c:2025
+#: ../gio/glib-compile-schemas.c:1820 ../gio/glib-compile-schemas.c:1894
+#: ../gio/glib-compile-schemas.c:1970
#, c-format
msgid "--strict was specified; exiting.\n"
msgstr "--strict zehaztu da; irtetzen.\n"
-#: gio/glib-compile-schemas.c:1844
+#: ../gio/glib-compile-schemas.c:1830
#, c-format
msgid "This entire file has been ignored.\n"
msgstr "Fitxategi oso honi ezikusi egin zaio.\n"
-#: gio/glib-compile-schemas.c:1906
+#: ../gio/glib-compile-schemas.c:1890
#, c-format
msgid "Ignoring this file.\n"
msgstr "Fitxategi honi ezikusi egiten.\n"
-#: gio/glib-compile-schemas.c:1959
+#: ../gio/glib-compile-schemas.c:1930
#, c-format
-msgid "No such key “%s” in schema “%s” as specified in override file “%s”"
-msgstr "Ez dago “%s” gakorik “%s” eskeman gainidazteko “%s” fitxategian ageri den bezala"
+msgid "No such key '%s' in schema '%s' as specified in override file '%s'"
+msgstr ""
+"Ez dago '%s' bezalako gakorik '%s' eskeman gainidazteko '%s' fitxategian "
+"ageri den bezala"
-#: gio/glib-compile-schemas.c:1965 gio/glib-compile-schemas.c:1990
-#: gio/glib-compile-schemas.c:2050 gio/glib-compile-schemas.c:2079
+#: ../gio/glib-compile-schemas.c:1936 ../gio/glib-compile-schemas.c:1994
+#: ../gio/glib-compile-schemas.c:2022
#, c-format
msgid "; ignoring override for this key.\n"
msgstr "; gainidazketari ezikusi egiten gako honentzako.\n"
-#: gio/glib-compile-schemas.c:1969 gio/glib-compile-schemas.c:1994
-#: gio/glib-compile-schemas.c:2054 gio/glib-compile-schemas.c:2083
+#: ../gio/glib-compile-schemas.c:1940 ../gio/glib-compile-schemas.c:1998
+#: ../gio/glib-compile-schemas.c:2026
#, c-format
msgid " and --strict was specified; exiting.\n"
msgstr " eta --strict zehaztu da; irtetzen.\n"
-#: gio/glib-compile-schemas.c:1984
+#: ../gio/glib-compile-schemas.c:1956
#, c-format
msgid ""
-"cannot provide per-desktop overrides for localised key “%s” in schema "
-"“%s” (override file “%s”)"
-msgstr "ezin dira mahaigainaren araberako gaindidazteak hornitu “%s” gako lokalizatuetarako “%s” eskeman (gainidatzi “%s” fitxategia)"
+"error parsing key '%s' in schema '%s' as specified in override file '%s': %s."
+msgstr ""
+"errorea '%2$s' eskemako '%1$s' gakoa analizatzean gainidazteko '%3$s' "
+"fitxategian ageri den bezala: %4$s."
-#: gio/glib-compile-schemas.c:2011
-#, c-format
-msgid ""
-"error parsing key “%s” in schema “%s” as specified in override file “%s”: %s."
-msgstr "errorea \"%s\" gakoa (“%s“ eskemakoa) analizatzean “%s” gainidazte-fitxategian ageri den bezala: %s."
-
-#: gio/glib-compile-schemas.c:2021
+#: ../gio/glib-compile-schemas.c:1966
#, c-format
msgid "Ignoring override for this key.\n"
msgstr "Gainidazketari ezikusi egiten gako honentzako.\n"
-#: gio/glib-compile-schemas.c:2040
+#: ../gio/glib-compile-schemas.c:1984
#, c-format
msgid ""
-"override for key “%s” in schema “%s” in override file “%s” is outside the "
+"override for key '%s' in schema '%s' in override file '%s' is outside the "
"range given in the schema"
-msgstr "\"%s\" gakoaren gainidaztea (“%s“ eskemakoa) “%s” gainidazte-fitxategian ageri den bezala, eskeman emandako barrutitik kanpo dago"
+msgstr ""
+"gainidazteko '%3$s' fitxategiko '%2$s' eskemako '%1$s' gakoa gainidaztea "
+"barrutitik kanpo dago emandako eskeman"
-#: gio/glib-compile-schemas.c:2069
+#: ../gio/glib-compile-schemas.c:2012
#, c-format
msgid ""
-"override for key “%s” in schema “%s” in override file “%s” is not in the "
+"override for key '%s' in schema '%s' in override file '%s' is not in the "
"list of valid choices"
-msgstr "\"%s\" gakoaren gainidaztea (“%s“ eskemakoa) “%s” gainidazte-fitxategian ageri den bezala, ez dago baliozko aukeren zerrendan"
+msgstr ""
+"gainidazteko '%3$s' fitxategiko '%2$s' eskemako '%1$s' gakoa gainidaztea ez "
+"dago baliozko aukeren zerrendan"
-#: gio/glib-compile-schemas.c:2140
+#: ../gio/glib-compile-schemas.c:2068
msgid "where to store the gschemas.compiled file"
msgstr "non gorde gschemas.compiled fitxategia"
-#: gio/glib-compile-schemas.c:2141
+#: ../gio/glib-compile-schemas.c:2069
msgid "Abort on any errors in schemas"
msgstr "Abortatu eskemetan edozer motako erroreak agertzean"
-#: gio/glib-compile-schemas.c:2142
+#: ../gio/glib-compile-schemas.c:2070
msgid "Do not write the gschema.compiled file"
msgstr "Ez idatzi gschema.compiled fitxategia"
-#: gio/glib-compile-schemas.c:2143
+#: ../gio/glib-compile-schemas.c:2071
msgid "Do not enforce key name restrictions"
msgstr "Ez derrigortu gako-izenen murriztapenik"
-#: gio/glib-compile-schemas.c:2172
+#: ../gio/glib-compile-schemas.c:2099
msgid ""
"Compile all GSettings schema files into a schema cache.\n"
"Schema files are required to have the extension .gschema.xml,\n"
"and the cache file is called gschemas.compiled."
-msgstr "Konpilatu GSettings eskemen fitxategi guztiak eskema-cache batean.\n"
+msgstr ""
+"Konpilatu GSettings eskemen fitxategi guztiak eskema-cache batean.\n"
"Eskemen fitxategiek .gschema.xml luzapena eduki behar dute,\n"
"eta cache-ko fitxategia gschemas.compiled deitzen da."
-#: gio/glib-compile-schemas.c:2193
+#: ../gio/glib-compile-schemas.c:2120
#, c-format
msgid "You should give exactly one directory name\n"
msgstr "Direktorio baten izena bakarrik eman behar duzu\n"
-#: gio/glib-compile-schemas.c:2235
+#: ../gio/glib-compile-schemas.c:2162
#, c-format
msgid "No schema files found: "
msgstr "Ez da eskemen fitxategirik aurkitu: "
-#: gio/glib-compile-schemas.c:2238
+#: ../gio/glib-compile-schemas.c:2165
#, c-format
msgid "doing nothing.\n"
msgstr "ezer ez da egiten ari.\n"
-#: gio/glib-compile-schemas.c:2241
+#: ../gio/glib-compile-schemas.c:2168
#, c-format
msgid "removed existing output file.\n"
msgstr "existitzen den irteerako fitxategia kenduta.\n"
#
-#: gio/glocalfile.c:546 gio/win32/gwinhttpfile.c:420
+#: ../gio/glocalfile.c:643 ../gio/win32/gwinhttpfile.c:420
#, c-format
msgid "Invalid filename %s"
msgstr "%s fitxategi-izen baliogabea"
-#: gio/glocalfile.c:1013
+#: ../gio/glocalfile.c:1037
#, c-format
msgid "Error getting filesystem info for %s: %s"
msgstr "Errorea %s(r)en fitxategi-sistemako informazioa lortzean: %s"
@@ -2707,511 +2913,496 @@ msgstr "Errorea %s(r)en fitxategi-sistemako informazioa lortzean: %s"
#. * the enclosing (user visible) mount of a file, but none
#. * exists.
#.
-#: gio/glocalfile.c:1152
+#: ../gio/glocalfile.c:1176
#, c-format
msgid "Containing mount for file %s not found"
msgstr "Ez da %s fitxategiaren muntai-puntua aurkitzen"
-#: gio/glocalfile.c:1175
+#: ../gio/glocalfile.c:1199
msgid "Can’t rename root directory"
msgstr "Ezin da erroko direktorioa izenez aldatu"
-#: gio/glocalfile.c:1193 gio/glocalfile.c:1216
+#: ../gio/glocalfile.c:1217 ../gio/glocalfile.c:1240
#, c-format
msgid "Error renaming file %s: %s"
msgstr "Errorea '%s' fitxategia izenez aldatzean: %s"
-#: gio/glocalfile.c:1200
+#: ../gio/glocalfile.c:1224
msgid "Can’t rename file, filename already exists"
msgstr "Ezin da fitxategia izenez aldatu, fitxategi-izena badago lehendik ere"
#
-#: gio/glocalfile.c:1213 gio/glocalfile.c:2322 gio/glocalfile.c:2350
-#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:646
+#: ../gio/glocalfile.c:1237 ../gio/glocalfile.c:2253 ../gio/glocalfile.c:2281
+#: ../gio/glocalfile.c:2438 ../gio/glocalfileoutputstream.c:549
msgid "Invalid filename"
msgstr "Fitxategi-izen baliogabea"
-#: gio/glocalfile.c:1381 gio/glocalfile.c:1396
+#: ../gio/glocalfile.c:1404 ../gio/glocalfile.c:1419
#, c-format
msgid "Error opening file %s: %s"
msgstr "Errorea '%s' fitxategia irekitzean: %s"
-#: gio/glocalfile.c:1521
+#: ../gio/glocalfile.c:1544
#, c-format
msgid "Error removing file %s: %s"
msgstr "Errorea '%s' fitxategia kentzean: %s"
-#: gio/glocalfile.c:1963
+#: ../gio/glocalfile.c:1928
#, c-format
msgid "Error trashing file %s: %s"
msgstr "Errorea '%s' fitxategia zakarrontzira botatzean: %s"
-#: gio/glocalfile.c:2004
+#: ../gio/glocalfile.c:1951
#, c-format
msgid "Unable to create trash dir %s: %s"
msgstr "Ezin izan da zakarrontziaren '%s' direktorioa sortu: %s"
-#: gio/glocalfile.c:2025
+#: ../gio/glocalfile.c:1971
#, c-format
msgid "Unable to find toplevel directory to trash %s"
msgstr "Ezin da '%s' zakarrontziaren goi-mailako direktorioa aurkitu"
-#: gio/glocalfile.c:2034
-#, c-format
-msgid "Trashing on system internal mounts is not supported"
-msgstr "Sistemaren barneko muntaietan ez da onartzen zakarrontzira botatzea"
-
-#: gio/glocalfile.c:2118 gio/glocalfile.c:2138
+#: ../gio/glocalfile.c:2050 ../gio/glocalfile.c:2070
#, c-format
msgid "Unable to find or create trash directory for %s"
msgstr "Ezin da '%s' zakarrontziaren direktorioa aurkitu edo sortu"
-#: gio/glocalfile.c:2173
+#: ../gio/glocalfile.c:2105
#, c-format
msgid "Unable to create trashing info file for %s: %s"
msgstr "Ezin da '%s' fitxategiaren zakarrontzi-informazioa sortu: %s"
-#: gio/glocalfile.c:2233
+#: ../gio/glocalfile.c:2164
#, c-format
msgid "Unable to trash file %s across filesystem boundaries"
msgstr "Ezin da '%s' fitxategia fitxategi-sistemen arteko zakarrontzira bota"
-#: gio/glocalfile.c:2237 gio/glocalfile.c:2293
+#: ../gio/glocalfile.c:2168 ../gio/glocalfile.c:2224
#, c-format
msgid "Unable to trash file %s: %s"
msgstr "Ezin da '%s' fitxategia zakarrontzira bota: %s"
-#: gio/glocalfile.c:2299
+#: ../gio/glocalfile.c:2230
#, c-format
msgid "Unable to trash file %s"
msgstr "Ezin da '%s' fitxategia zakarrontzira bota"
-#: gio/glocalfile.c:2325
+#: ../gio/glocalfile.c:2256
#, c-format
msgid "Error creating directory %s: %s"
msgstr "Errorea '%s' direktorioa sortzean: %s"
-#: gio/glocalfile.c:2354
+#: ../gio/glocalfile.c:2285
#, c-format
msgid "Filesystem does not support symbolic links"
msgstr "Fitxategi-sistemak ez ditu esteka sinbolikorik onartzen"
-#: gio/glocalfile.c:2357
+#: ../gio/glocalfile.c:2288
#, c-format
msgid "Error making symbolic link %s: %s"
msgstr "Errorea '%s' esteka sinbolikoa sortzean: %s"
-#: gio/glocalfile.c:2363 glib/gfileutils.c:2138
+#: ../gio/glocalfile.c:2294 ../glib/gfileutils.c:2077
msgid "Symbolic links not supported"
msgstr "Esteka sinbolikoak ez dira onartzen"
-#: gio/glocalfile.c:2418 gio/glocalfile.c:2453 gio/glocalfile.c:2510
+#: ../gio/glocalfile.c:2349 ../gio/glocalfile.c:2384 ../gio/glocalfile.c:2441
#, c-format
msgid "Error moving file %s: %s"
msgstr "Errorea '%s' fitxategia lekuz aldatzean: %s"
-#: gio/glocalfile.c:2441
+#: ../gio/glocalfile.c:2372
msgid "Can’t move directory over directory"
msgstr "Ezin da direktorioa lekuz aldatu direktorioaren gainera"
-#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1030
-#: gio/glocalfileoutputstream.c:1044 gio/glocalfileoutputstream.c:1059
-#: gio/glocalfileoutputstream.c:1076 gio/glocalfileoutputstream.c:1090
+#: ../gio/glocalfile.c:2398 ../gio/glocalfileoutputstream.c:933
+#: ../gio/glocalfileoutputstream.c:947 ../gio/glocalfileoutputstream.c:962
+#: ../gio/glocalfileoutputstream.c:979 ../gio/glocalfileoutputstream.c:993
msgid "Backup file creation failed"
msgstr "Huts egin du babeskopia sortzean"
-#: gio/glocalfile.c:2486
+#: ../gio/glocalfile.c:2417
#, c-format
msgid "Error removing target file: %s"
msgstr "Errorea helburuko fitxategia kentzean: %s"
-#: gio/glocalfile.c:2500
+#: ../gio/glocalfile.c:2431
msgid "Move between mounts not supported"
msgstr "Muntaien artean lekuz aldatzea ez dago onartuta"
-#: gio/glocalfile.c:2691
+#: ../gio/glocalfile.c:2622
#, c-format
msgid "Could not determine the disk usage of %s: %s"
msgstr "Ezin izan da '%s' diskoaren erabilpena zehaztu: %s"
-#: gio/glocalfileinfo.c:745
+#: ../gio/glocalfileinfo.c:731
msgid "Attribute value must be non-NULL"
msgstr "Atributuaren balioa NULL ezin da izan"
-#: gio/glocalfileinfo.c:752
+#: ../gio/glocalfileinfo.c:738
msgid "Invalid attribute type (string expected)"
msgstr "Atributu mota baliogabea (katea espero zen)"
-#: gio/glocalfileinfo.c:759
+#: ../gio/glocalfileinfo.c:745
msgid "Invalid extended attribute name"
msgstr "Atributu hedatuaren izen baliogabea"
-#: gio/glocalfileinfo.c:799
+#: ../gio/glocalfileinfo.c:785
#, c-format
msgid "Error setting extended attribute “%s”: %s"
msgstr "Errorea “%s“ atributu hedatua ezartzean: %s"
-#: gio/glocalfileinfo.c:1625
+#: ../gio/glocalfileinfo.c:1586
msgid " (invalid encoding)"
msgstr " (baliogabeko kodeketa)"
-#: gio/glocalfileinfo.c:1789 gio/glocalfileoutputstream.c:908
+#: ../gio/glocalfileinfo.c:1777 ../gio/glocalfileoutputstream.c:811
#, c-format
msgid "Error when getting information for file “%s”: %s"
msgstr "Errorea “'%s“ fitxategiaren informazioa eskuratzean: %s"
-#: gio/glocalfileinfo.c:2059
+#: ../gio/glocalfileinfo.c:2028
#, c-format
msgid "Error when getting information for file descriptor: %s"
-msgstr "Errorea fitxategiaren deskriptorearen informazioa irakurtzean: %s"
+msgstr "Errorea fitxategiaren deskriptorearen informazioa irakurtzean: %s "
-#: gio/glocalfileinfo.c:2104
+#: ../gio/glocalfileinfo.c:2073
msgid "Invalid attribute type (uint32 expected)"
msgstr "Baliogabeko atributu mota (uint32 espero zen)"
-#: gio/glocalfileinfo.c:2122
+#: ../gio/glocalfileinfo.c:2091
msgid "Invalid attribute type (uint64 expected)"
msgstr "Baliogabeko atributu mota (uint64 espero zen)"
-#: gio/glocalfileinfo.c:2141 gio/glocalfileinfo.c:2160
+#: ../gio/glocalfileinfo.c:2110 ../gio/glocalfileinfo.c:2129
msgid "Invalid attribute type (byte string expected)"
msgstr "Baliogabeko atributu mota (byte katea espero zen)"
-#: gio/glocalfileinfo.c:2207
+#: ../gio/glocalfileinfo.c:2164
msgid "Cannot set permissions on symlinks"
msgstr "Ezin da baimenik ezarri esteka sinbolikoetan"
-#: gio/glocalfileinfo.c:2223
+#: ../gio/glocalfileinfo.c:2180
#, c-format
msgid "Error setting permissions: %s"
msgstr "Errorea baimenak ezartzean: %s"
-#: gio/glocalfileinfo.c:2274
+#: ../gio/glocalfileinfo.c:2231
#, c-format
msgid "Error setting owner: %s"
msgstr "Errorea jabea ezartzean: %s"
-#: gio/glocalfileinfo.c:2297
+#: ../gio/glocalfileinfo.c:2254
msgid "symlink must be non-NULL"
msgstr "esteka sinbolikoak NULL-en desberdina izan behar du"
-#: gio/glocalfileinfo.c:2307 gio/glocalfileinfo.c:2326
-#: gio/glocalfileinfo.c:2337
+#: ../gio/glocalfileinfo.c:2264 ../gio/glocalfileinfo.c:2283
+#: ../gio/glocalfileinfo.c:2294
#, c-format
msgid "Error setting symlink: %s"
msgstr "Errorea esteka sinbolikoa ezartzean: %s"
-#: gio/glocalfileinfo.c:2316
+#: ../gio/glocalfileinfo.c:2273
msgid "Error setting symlink: file is not a symlink"
-msgstr "Errorea esteka sinbolikoa ezartzean: fitxategia ez da esteka sinboliko bat"
+msgstr ""
+"Errorea esteka sinbolikoa ezartzean: fitxategia ez da esteka sinboliko bat"
-#: gio/glocalfileinfo.c:2442
+#: ../gio/glocalfileinfo.c:2399
#, c-format
msgid "Error setting modification or access time: %s"
msgstr "Errorea eraldaketa edo atzipen ordua ezartzean: %s"
-#: gio/glocalfileinfo.c:2465
+#: ../gio/glocalfileinfo.c:2422
msgid "SELinux context must be non-NULL"
msgstr "SELinux testuinguruak NULL-en desberdina izan behar du"
-#: gio/glocalfileinfo.c:2480
+#: ../gio/glocalfileinfo.c:2437
#, c-format
msgid "Error setting SELinux context: %s"
msgstr "Errorea SELinux testuingurua ezartzean: %s"
-#: gio/glocalfileinfo.c:2487
+#: ../gio/glocalfileinfo.c:2444
msgid "SELinux is not enabled on this system"
msgstr "SELinux ez dago gaituta sistema honetan"
-#: gio/glocalfileinfo.c:2579
+#: ../gio/glocalfileinfo.c:2536
#, c-format
msgid "Setting attribute %s not supported"
msgstr "%s atributuaren ezarpena ez dago onartuta"
-#: gio/glocalfileinputstream.c:168 gio/glocalfileoutputstream.c:791
+#: ../gio/glocalfileinputstream.c:168 ../gio/glocalfileoutputstream.c:694
#, c-format
msgid "Error reading from file: %s"
-msgstr "Errorea fitxategitik irakurtzean: %s"
+msgstr "Errorea fitxategitik irakurtzean: %s "
-#: gio/glocalfileinputstream.c:199 gio/glocalfileinputstream.c:211
-#: gio/glocalfileinputstream.c:225 gio/glocalfileinputstream.c:333
-#: gio/glocalfileoutputstream.c:553 gio/glocalfileoutputstream.c:1108
+#: ../gio/glocalfileinputstream.c:199 ../gio/glocalfileinputstream.c:211
+#: ../gio/glocalfileinputstream.c:225 ../gio/glocalfileinputstream.c:333
+#: ../gio/glocalfileoutputstream.c:456 ../gio/glocalfileoutputstream.c:1011
#, c-format
msgid "Error seeking in file: %s"
msgstr "Errorea fitxategian bilatzean: %s"
-#: gio/glocalfileinputstream.c:255 gio/glocalfileoutputstream.c:343
-#: gio/glocalfileoutputstream.c:437
+#: ../gio/glocalfileinputstream.c:255 ../gio/glocalfileoutputstream.c:246
+#: ../gio/glocalfileoutputstream.c:340
#, c-format
msgid "Error closing file: %s"
msgstr "Errorea fitxategia ixtean: %s"
-#: gio/glocalfilemonitor.c:856
+#: ../gio/glocalfilemonitor.c:840
msgid "Unable to find default local file monitor type"
msgstr "Ezin da lokaleko fitxategi lehenetsiaren monitorizazio mota aurkitu"
-#: gio/glocalfileoutputstream.c:208 gio/glocalfileoutputstream.c:286
-#: gio/glocalfileoutputstream.c:323 gio/glocalfileoutputstream.c:812
+#: ../gio/glocalfileoutputstream.c:194 ../gio/glocalfileoutputstream.c:226
+#: ../gio/glocalfileoutputstream.c:715
#, c-format
msgid "Error writing to file: %s"
msgstr "Errorea fitxategian idaztean: %s"
-#: gio/glocalfileoutputstream.c:370
+#: ../gio/glocalfileoutputstream.c:273
#, c-format
msgid "Error removing old backup link: %s"
msgstr "Errorea babeskopiaren esteka zaharra kentzean: %s"
-#: gio/glocalfileoutputstream.c:384 gio/glocalfileoutputstream.c:397
+#: ../gio/glocalfileoutputstream.c:287 ../gio/glocalfileoutputstream.c:300
#, c-format
msgid "Error creating backup copy: %s"
msgstr "Errorea babeskopiaren kopia sortzean: %s"
-#: gio/glocalfileoutputstream.c:415
+#: ../gio/glocalfileoutputstream.c:318
#, c-format
msgid "Error renaming temporary file: %s"
msgstr "Errorea aldi baterako fitxategia izenez aldatzean: %s"
-#: gio/glocalfileoutputstream.c:599 gio/glocalfileoutputstream.c:1159
+#: ../gio/glocalfileoutputstream.c:502 ../gio/glocalfileoutputstream.c:1062
#, c-format
msgid "Error truncating file: %s"
msgstr "Errorea fitxategia trunkatzean: %s"
-#: gio/glocalfileoutputstream.c:652 gio/glocalfileoutputstream.c:890
-#: gio/glocalfileoutputstream.c:1140 gio/gsubprocess.c:380
+#: ../gio/glocalfileoutputstream.c:555 ../gio/glocalfileoutputstream.c:793
+#: ../gio/glocalfileoutputstream.c:1043 ../gio/gsubprocess.c:380
#, c-format
msgid "Error opening file “%s”: %s"
msgstr "Errorea “%s“ fitxategia irekitzean: %s"
-#: gio/glocalfileoutputstream.c:921
+#: ../gio/glocalfileoutputstream.c:824
msgid "Target file is a directory"
msgstr "Helburuko fitxategia direktorio bat da"
-#: gio/glocalfileoutputstream.c:926
+#: ../gio/glocalfileoutputstream.c:829
msgid "Target file is not a regular file"
msgstr "Helburuko fitxategia ez da fitxategi arrunta"
-#: gio/glocalfileoutputstream.c:938
+#: ../gio/glocalfileoutputstream.c:841
msgid "The file was externally modified"
msgstr "Fitxategia kanpotik aldatu da"
-#: gio/glocalfileoutputstream.c:1124
+#: ../gio/glocalfileoutputstream.c:1027
#, c-format
msgid "Error removing old file: %s"
msgstr "Errorea fitxategi zaharra kentzean: %s"
-#: gio/gmemoryinputstream.c:474 gio/gmemoryoutputstream.c:772
+#: ../gio/gmemoryinputstream.c:474 ../gio/gmemoryoutputstream.c:772
msgid "Invalid GSeekType supplied"
msgstr "Baliogabeko GSeekType eman da"
#
-#: gio/gmemoryinputstream.c:484
+#: ../gio/gmemoryinputstream.c:484
msgid "Invalid seek request"
msgstr "Bilaketa-eskaera baliogabea"
-#: gio/gmemoryinputstream.c:508
+#: ../gio/gmemoryinputstream.c:508
msgid "Cannot truncate GMemoryInputStream"
msgstr "Ezin da GMemoryInputStream trunkatu"
-#: gio/gmemoryoutputstream.c:567
+#: ../gio/gmemoryoutputstream.c:567
msgid "Memory output stream not resizable"
msgstr "Ezin da memoriaren irteeraren korrontea tamainaz aldatu"
-#: gio/gmemoryoutputstream.c:583
+#: ../gio/gmemoryoutputstream.c:583
msgid "Failed to resize memory output stream"
msgstr "Huts egin du memoriaren irteeraren korrontea tamainaz aldatzean"
-#: gio/gmemoryoutputstream.c:673
+#: ../gio/gmemoryoutputstream.c:673
msgid ""
"Amount of memory required to process the write is larger than available "
"address space"
-msgstr "Idazketa lantzeko behar den memoria kopurua erabilgarri dagoen helbide-espazioa baino handiagoa da"
+msgstr ""
+"Idazketa lantzeko behar den memoria kopurua erabilgarri dagoen helbide-"
+"espazioa baino handiagoa da"
-#: gio/gmemoryoutputstream.c:782
+#: ../gio/gmemoryoutputstream.c:782
msgid "Requested seek before the beginning of the stream"
msgstr "Bilaketa eskatu da korrontearen hasieraren aurretik"
-#: gio/gmemoryoutputstream.c:797
+#: ../gio/gmemoryoutputstream.c:797
msgid "Requested seek beyond the end of the stream"
msgstr "Bilaketa eskatu da korrontearen amaieraren ondoren"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement unmount.
-#: gio/gmount.c:399
+#: ../gio/gmount.c:393
msgid "mount doesn’t implement “unmount”"
msgstr "muntaiak ez dauka “unmount“ (desmuntatu) inplementatuta"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement eject.
-#: gio/gmount.c:475
+#: ../gio/gmount.c:469
msgid "mount doesn’t implement “eject”"
msgstr "muntaiak ez dauka “eject“ (egotzi) inplementatuta"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of unmount or unmount_with_operation.
-#: gio/gmount.c:553
+#: ../gio/gmount.c:547
msgid "mount doesn’t implement “unmount” or “unmount_with_operation”"
-msgstr "muntaiak ez dauka “unmount“ (desmuntatzea) edo “unmount_with_operation“ (desmuntatu eragiketarekin) inplementatuta"
+msgstr ""
+"muntaiak ez dauka “unmount“ (desmuntatzea) edo "
+"“unmount_with_operation“ (desmuntatu eragiketarekin) inplementatuta"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement any of eject or eject_with_operation.
-#: gio/gmount.c:638
+#: ../gio/gmount.c:632
msgid "mount doesn’t implement “eject” or “eject_with_operation”"
-msgstr "muntaiak ez dauka “eject“ (egotzi) edo “eject_with_operation“ (egotzi eragiketarekin) inplementatuta"
+msgstr ""
+"muntaiak ez dauka “eject“ (egotzi) edo “eject_with_operation“ (egotzi "
+"eragiketarekin) inplementatuta"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement remount.
-#: gio/gmount.c:726
+#: ../gio/gmount.c:720
msgid "mount doesn’t implement “remount”"
msgstr "muntaiak ez dauka “remount“ (birmuntaketa) inplementatuta"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: gio/gmount.c:808
+#: ../gio/gmount.c:802
msgid "mount doesn’t implement content type guessing"
msgstr "muntaiak ez dauka eduki mota sinkronoa asmatzea inplementatuta"
#. Translators: This is an error
#. * message for mount objects that
#. * don't implement content type guessing.
-#: gio/gmount.c:895
+#: ../gio/gmount.c:889
msgid "mount doesn’t implement synchronous content type guessing"
msgstr "muntaiak ez dauka eduki mota sinkronoa asmatzea inplementatuta"
-#: gio/gnetworkaddress.c:388
+#: ../gio/gnetworkaddress.c:378
#, c-format
msgid "Hostname “%s” contains “[” but not “]”"
msgstr "“%s“ ostalariak “[“dauka, baina ez “]“"
-#: gio/gnetworkmonitorbase.c:211 gio/gnetworkmonitorbase.c:315
+#: ../gio/gnetworkmonitorbase.c:206 ../gio/gnetworkmonitorbase.c:310
msgid "Network unreachable"
msgstr "Sarea atziezina"
-#: gio/gnetworkmonitorbase.c:249 gio/gnetworkmonitorbase.c:279
+#: ../gio/gnetworkmonitorbase.c:244 ../gio/gnetworkmonitorbase.c:274
msgid "Host unreachable"
msgstr "Ostalaria atziezina"
-#: gio/gnetworkmonitornetlink.c:99 gio/gnetworkmonitornetlink.c:111
-#: gio/gnetworkmonitornetlink.c:130
+#: ../gio/gnetworkmonitornetlink.c:96 ../gio/gnetworkmonitornetlink.c:108
+#: ../gio/gnetworkmonitornetlink.c:127
#, c-format
msgid "Could not create network monitor: %s"
msgstr "Ezin izan da sareko monitorea sortu: %s"
-#: gio/gnetworkmonitornetlink.c:120
+#: ../gio/gnetworkmonitornetlink.c:117
msgid "Could not create network monitor: "
msgstr "Ezin izan da sareko monitorea sortu: "
-#: gio/gnetworkmonitornetlink.c:183
+#: ../gio/gnetworkmonitornetlink.c:175
msgid "Could not get network status: "
msgstr "Ezin izan da sarearen egoera eskuratu: "
-#: gio/gnetworkmonitornm.c:313
-#, c-format
-msgid "NetworkManager not running"
-msgstr "NetworkManager ez dago abian"
-
-#: gio/gnetworkmonitornm.c:324
+#: ../gio/gnetworkmonitornm.c:329
#, c-format
msgid "NetworkManager version too old"
msgstr "NetworkManager-en bertsioa zaharregia"
-#: gio/goutputstream.c:232 gio/goutputstream.c:775
+#: ../gio/goutputstream.c:212 ../gio/goutputstream.c:560
msgid "Output stream doesn’t implement write"
msgstr "Irteerako korronteak ez dauka idaztea inplementatuta"
-#: gio/goutputstream.c:472 gio/goutputstream.c:1533
-#, c-format
-msgid "Sum of vectors passed to %s too large"
-msgstr "%s(e)ri pasatutako bektoreen batuketa handiegia da"
-
-#: gio/goutputstream.c:736 gio/goutputstream.c:1761
+#: ../gio/goutputstream.c:521 ../gio/goutputstream.c:1224
msgid "Source stream is already closed"
msgstr "Iturburuko korrontea jadanik itxi da"
-#: gio/gresolver.c:344 gio/gthreadedresolver.c:150 gio/gthreadedresolver.c:160
+#: ../gio/gresolver.c:342 ../gio/gthreadedresolver.c:116
+#: ../gio/gthreadedresolver.c:126
#, c-format
msgid "Error resolving “%s”: %s"
msgstr "Errorea “%s“ ebaztean: %s"
-#. Translators: The placeholder is for a function name.
-#: gio/gresolver.c:389 gio/gresolver.c:547
-#, c-format
-msgid "%s not implemented"
-msgstr "%s ez dago inplementatuta"
-
-#
-#: gio/gresolver.c:915 gio/gresolver.c:967
-msgid "Invalid domain"
-msgstr "Baliogabeko domeinua"
-
-#: gio/gresource.c:665 gio/gresource.c:924 gio/gresource.c:963
-#: gio/gresource.c:1087 gio/gresource.c:1159 gio/gresource.c:1232
-#: gio/gresource.c:1313 gio/gresourcefile.c:476 gio/gresourcefile.c:599
-#: gio/gresourcefile.c:736
+#: ../gio/gresource.c:606 ../gio/gresource.c:857 ../gio/gresource.c:874
+#: ../gio/gresource.c:998 ../gio/gresource.c:1070 ../gio/gresource.c:1143
+#: ../gio/gresource.c:1213 ../gio/gresourcefile.c:453
+#: ../gio/gresourcefile.c:576 ../gio/gresourcefile.c:713
#, c-format
msgid "The resource at “%s” does not exist"
msgstr "“%s“(e)ko baliabidea ez da existitzen"
-#: gio/gresource.c:830
+#: ../gio/gresource.c:771
#, c-format
msgid "The resource at “%s” failed to decompress"
msgstr "Huts egin du “%s“(e)ko baliabidea deskonprimitzean"
-#: gio/gresourcefile.c:732
+#: ../gio/gresourcefile.c:709
#, c-format
msgid "The resource at “%s” is not a directory"
msgstr "“%s“(e)ko baliabidea ez da direktorio bat"
-#: gio/gresourcefile.c:940
+#: ../gio/gresourcefile.c:917
msgid "Input stream doesn’t implement seek"
msgstr "Sarrerako korronteak ez dauka bilaketa inplementatuta"
-#: gio/gresource-tool.c:501
+#: ../gio/gresource-tool.c:494
msgid "List sections containing resources in an elf FILE"
msgstr "Zerrendatu baliabideak dituzten atalak elf fitxategi batean"
-#: gio/gresource-tool.c:507
+#: ../gio/gresource-tool.c:500
msgid ""
"List resources\n"
"If SECTION is given, only list resources in this section\n"
"If PATH is given, only list matching resources"
-msgstr "Zerrendatu baliabideak\n"
+msgstr ""
+"Zerrendatu baliabideak\n"
"ATALA ematen bada, soilik atal honetako baliabideak zerrendatu\n"
"BIDE-IZENA ematen bada, bat datozen baliabideak soilik zerrendatu"
-#: gio/gresource-tool.c:510 gio/gresource-tool.c:520
+#: ../gio/gresource-tool.c:503 ../gio/gresource-tool.c:513
msgid "FILE [PATH]"
msgstr "FITXATEGIA [BIDE-IZENA]"
-#: gio/gresource-tool.c:511 gio/gresource-tool.c:521 gio/gresource-tool.c:528
+#: ../gio/gresource-tool.c:504 ../gio/gresource-tool.c:514
+#: ../gio/gresource-tool.c:521
msgid "SECTION"
msgstr "ATALA"
-#: gio/gresource-tool.c:516
+#: ../gio/gresource-tool.c:509
msgid ""
"List resources with details\n"
"If SECTION is given, only list resources in this section\n"
"If PATH is given, only list matching resources\n"
"Details include the section, size and compression"
-msgstr "Zerrendatu baliabideak xehetasunez\n"
+msgstr ""
+"Zerrendatu baliabideak xehetasunez\n"
"ATALA ematen bada, soilik atal honetako baliabideak zerrendatu\n"
"BIDE-IZENA ematen bada, bat datozen baliabideak soilik zerrendatu\n"
"Xehetasunek atala, tamaina eta konpresioa daukate"
-#: gio/gresource-tool.c:526
+#: ../gio/gresource-tool.c:519
msgid "Extract a resource file to stdout"
msgstr "Erauzi baliabidearen fitxategia irteera estandarrean (stdout)"
-#: gio/gresource-tool.c:527
+#: ../gio/gresource-tool.c:520
msgid "FILE PATH"
msgstr "FITXATEGIA BIDE-IZENA"
-#: gio/gresource-tool.c:541
+#: ../gio/gresource-tool.c:534
msgid ""
"Usage:\n"
" gresource [--section SECTION] COMMAND [ARGS…]\n"
@@ -3225,7 +3416,8 @@ msgid ""
"\n"
"Use “gresource help COMMAND” to get detailed help.\n"
"\n"
-msgstr "Erabilera:\n"
+msgstr ""
+"Erabilera:\n"
" gresource [--section ATALA] KOMANDOA [ARGUMENTUAK...]\n"
"\n"
"Komandoak:\n"
@@ -3238,7 +3430,7 @@ msgstr "Erabilera:\n"
"Erabili “gresource help KOMANDOA“ laguntza xehea eskuratzeko.\n"
"\n"
-#: gio/gresource-tool.c:555
+#: ../gio/gresource-tool.c:548
#, c-format
msgid ""
"Usage:\n"
@@ -3246,168 +3438,184 @@ msgid ""
"\n"
"%s\n"
"\n"
-msgstr "Erabilera:\n"
+msgstr ""
+"Erabilera:\n"
" gresource %s%s%s %s\n"
"\n"
"%s\n"
"\n"
-#: gio/gresource-tool.c:562
+#: ../gio/gresource-tool.c:555
msgid " SECTION An (optional) elf section name\n"
msgstr " ATALA elf atalaren izena (aukerakoa)\n"
-#: gio/gresource-tool.c:566 gio/gsettings-tool.c:703
+#: ../gio/gresource-tool.c:559 ../gio/gsettings-tool.c:656
msgid " COMMAND The (optional) command to explain\n"
msgstr " KOMANDOA (aukerako) komandoa deskribatzeko\n"
-#: gio/gresource-tool.c:572
+#: ../gio/gresource-tool.c:565
msgid " FILE An elf file (a binary or a shared library)\n"
-msgstr " FITXATEGIA Elf fitxategia (bitarra edo partekatutako liburutegia)\n"
+msgstr ""
+" FITXATEGIA Elf fitxategia (bitarra edo partekatutako liburutegia)\n"
-#: gio/gresource-tool.c:575
+#: ../gio/gresource-tool.c:568
msgid ""
" FILE An elf file (a binary or a shared library)\n"
" or a compiled resource file\n"
-msgstr " FITXATEGIA Elf fitxategia (bitarra edo partekatutako liburutegia)\n"
+msgstr ""
+" FITXATEGIA Elf fitxategia (bitarra edo partekatutako liburutegia)\n"
" edo konpilatutako baliabidearen fitxategi bat\n"
-#: gio/gresource-tool.c:579
+#: ../gio/gresource-tool.c:572
msgid "[PATH]"
msgstr "[BIDE-IZENA]"
-#: gio/gresource-tool.c:581
+#: ../gio/gresource-tool.c:574
msgid " PATH An (optional) resource path (may be partial)\n"
-msgstr " BIDE-IZENA (aukerakoa) baliabidearen bide-izena (partziala izan daiteke)\n"
+msgstr ""
+" BIDE-IZENA (aukerakoa) baliabidearen bide-izena (partziala izan "
+"daiteke)\n"
-#: gio/gresource-tool.c:582
+#: ../gio/gresource-tool.c:575
msgid "PATH"
msgstr "BIDE-IZENA"
-#: gio/gresource-tool.c:584
+#: ../gio/gresource-tool.c:577
msgid " PATH A resource path\n"
msgstr " BIDE-IZENA Baliabidearen bide-izena\n"
-#: gio/gsettings-tool.c:51 gio/gsettings-tool.c:72 gio/gsettings-tool.c:908
+#: ../gio/gsettings-tool.c:51 ../gio/gsettings-tool.c:72
+#: ../gio/gsettings-tool.c:853
#, c-format
msgid "No such schema “%s”\n"
msgstr "Ez dago “%s“ bezalako eskemarik\n"
-#: gio/gsettings-tool.c:57
+#: ../gio/gsettings-tool.c:57
#, c-format
msgid "Schema “%s” is not relocatable (path must not be specified)\n"
msgstr "“%s“ eskema ezin da lekuz aldatu (bide-izena ez da zehaztu behar)\n"
-#: gio/gsettings-tool.c:78
+#: ../gio/gsettings-tool.c:78
#, c-format
msgid "Schema “%s” is relocatable (path must be specified)\n"
msgstr "“%s“ eskema lekuz alda daiteke (bide-izena zehaztu behar da)\n"
-#: gio/gsettings-tool.c:92
+#: ../gio/gsettings-tool.c:92
+#, c-format
msgid "Empty path given.\n"
msgstr "Bide-izen hutsa eman da.\n"
-#: gio/gsettings-tool.c:98
+#: ../gio/gsettings-tool.c:98
+#, c-format
msgid "Path must begin with a slash (/)\n"
msgstr "Bide-izena barra batekin (/) hasi behar da\n"
-#: gio/gsettings-tool.c:104
+#: ../gio/gsettings-tool.c:104
+#, c-format
msgid "Path must end with a slash (/)\n"
msgstr "Bide-izena barra batekin (/) amaitu behar da\n"
-#: gio/gsettings-tool.c:110
+#: ../gio/gsettings-tool.c:110
+#, c-format
msgid "Path must not contain two adjacent slashes (//)\n"
msgstr "Bide-izenak ezin ditu bi barra jarraian eduki (//)\n"
-#: gio/gsettings-tool.c:538
+#: ../gio/gsettings-tool.c:491
+#, c-format
msgid "The provided value is outside of the valid range\n"
msgstr "Emandako balioa baliozko barrutitik kanpo dago\n"
-#: gio/gsettings-tool.c:545
+#: ../gio/gsettings-tool.c:498
+#, c-format
msgid "The key is not writable\n"
msgstr "Gakoa ez da idazgarria\n"
-#: gio/gsettings-tool.c:581
+#: ../gio/gsettings-tool.c:534
msgid "List the installed (non-relocatable) schemas"
msgstr "Zerrendatu instalatutako eskemak (lekuz ezin direnak aldatu)"
-#: gio/gsettings-tool.c:587
+#: ../gio/gsettings-tool.c:540
msgid "List the installed relocatable schemas"
msgstr "Zerrendatu instalatutako eskemak (lekuz alda daitezkeenak)"
-#: gio/gsettings-tool.c:593
+#: ../gio/gsettings-tool.c:546
msgid "List the keys in SCHEMA"
msgstr "Zerrendatu ESKEMAko gakoak"
-#: gio/gsettings-tool.c:594 gio/gsettings-tool.c:600 gio/gsettings-tool.c:643
+#: ../gio/gsettings-tool.c:547 ../gio/gsettings-tool.c:553
+#: ../gio/gsettings-tool.c:596
msgid "SCHEMA[:PATH]"
msgstr "ESKEMA[:bide-izena]"
-#: gio/gsettings-tool.c:599
+#: ../gio/gsettings-tool.c:552
msgid "List the children of SCHEMA"
msgstr "Zerrendatu ESKEMAren umeak"
-#: gio/gsettings-tool.c:605
+#: ../gio/gsettings-tool.c:558
msgid ""
"List keys and values, recursively\n"
"If no SCHEMA is given, list all keys\n"
-msgstr "Zerrendatu gako eta balioak, errekurtsiboki\n"
+msgstr ""
+"Zerrendatu gako eta balioak, errekurtsiboki\n"
"Ez bada ESKEMArik ematen, zerrendatu gako guztiak\n"
-#: gio/gsettings-tool.c:607
+#: ../gio/gsettings-tool.c:560
msgid "[SCHEMA[:PATH]]"
msgstr "[ESKEMA[:BIDE-IZENA]]"
-#: gio/gsettings-tool.c:612
+#: ../gio/gsettings-tool.c:565
msgid "Get the value of KEY"
msgstr "Lortu GAKOAren balioa"
-#: gio/gsettings-tool.c:613 gio/gsettings-tool.c:619 gio/gsettings-tool.c:625
-#: gio/gsettings-tool.c:637 gio/gsettings-tool.c:649
+#: ../gio/gsettings-tool.c:566 ../gio/gsettings-tool.c:572
+#: ../gio/gsettings-tool.c:578 ../gio/gsettings-tool.c:590
+#: ../gio/gsettings-tool.c:602
msgid "SCHEMA[:PATH] KEY"
msgstr "ESKEMA[:BIDE-IZENA] GAKOA"
-#: gio/gsettings-tool.c:618
+#: ../gio/gsettings-tool.c:571
msgid "Query the range of valid values for KEY"
msgstr "Kontsultatu GAKOAren baliozko balioen barrutiari buruz"
-#: gio/gsettings-tool.c:624
+#: ../gio/gsettings-tool.c:577
msgid "Query the description for KEY"
msgstr "Kontsultatu GAKOAren azalpena"
-#: gio/gsettings-tool.c:630
+#: ../gio/gsettings-tool.c:583
msgid "Set the value of KEY to VALUE"
msgstr "Ezarri GAKOAren balioa BALIOArekin"
-#: gio/gsettings-tool.c:631
+#: ../gio/gsettings-tool.c:584
msgid "SCHEMA[:PATH] KEY VALUE"
msgstr "ESKEMA[:BIDE-IZENA] GAKOA BALIOA"
-#: gio/gsettings-tool.c:636
+#: ../gio/gsettings-tool.c:589
msgid "Reset KEY to its default value"
msgstr "Berrezarri GAKOA bere balio lehenetsira"
-#: gio/gsettings-tool.c:642
+#: ../gio/gsettings-tool.c:595
msgid "Reset all keys in SCHEMA to their defaults"
msgstr "Berrezarri ESKEMAko gako guztiak beraien balio lehenetsietara"
-#: gio/gsettings-tool.c:648
+#: ../gio/gsettings-tool.c:601
msgid "Check if KEY is writable"
msgstr "Begiratu GAKOA idazgarria den edo ez"
-#: gio/gsettings-tool.c:654
+#: ../gio/gsettings-tool.c:607
msgid ""
"Monitor KEY for changes.\n"
"If no KEY is specified, monitor all keys in SCHEMA.\n"
"Use ^C to stop monitoring.\n"
-msgstr "Monitorizatu GAKOAren aldaketak.\n"
+msgstr ""
+"Monitorizatu GAKOAren aldaketak.\n"
"Ez bada GAKOA zehazten, ESKEMAko gako guztiak monitorizatuko ditu.\n"
"Erabili ^C monitorizazioa gelditzeko.\n"
-#: gio/gsettings-tool.c:657
+#: ../gio/gsettings-tool.c:610
msgid "SCHEMA[:PATH] [KEY]"
msgstr "ESKEMA[:BIDE-IZENA] GAKOA"
-#: gio/gsettings-tool.c:669
+#: ../gio/gsettings-tool.c:622
msgid ""
"Usage:\n"
" gsettings --version\n"
@@ -3431,7 +3639,8 @@ msgid ""
"\n"
"Use “gsettings help COMMAND” to get detailed help.\n"
"\n"
-msgstr "Erabilera:\n"
+msgstr ""
+"Erabilera:\n"
" gsettings --version\n"
" gsettings [--schemadir ESKEMA-DIREKTORIOA] KOMANDOA [ARGUMENTUAK...]\n"
"\n"
@@ -3456,7 +3665,7 @@ msgstr "Erabilera:\n"
"Erabili “gsettings help KOMANDOA“ laguntza xehea lortzeko.\n"
"\n"
-#: gio/gsettings-tool.c:693
+#: ../gio/gsettings-tool.c:646
#, c-format
msgid ""
"Usage:\n"
@@ -3464,2338 +3673,2131 @@ msgid ""
"\n"
"%s\n"
"\n"
-msgstr "Erabilera:\n"
+msgstr ""
+"Erabilera:\n"
" gsettings [--schemadir ESKEMA-DIREKTORIOA] %s %s\n"
"\n"
"%s\n"
"\n"
-#: gio/gsettings-tool.c:699
+#: ../gio/gsettings-tool.c:652
msgid " SCHEMADIR A directory to search for additional schemas\n"
msgstr " ESKEMA-DIREKTORIOA Eskema gehigarriak bilatzeko direkotrioa\n"
-#: gio/gsettings-tool.c:707
+#: ../gio/gsettings-tool.c:660
msgid ""
" SCHEMA The name of the schema\n"
" PATH The path, for relocatable schemas\n"
-msgstr " ESKEMA Eskemaren izena\n"
+msgstr ""
+" ESKEMA Eskemaren izena\n"
" BIDE-IZENA Bide-izena, lekuz alda daitezkeen eskementzako\n"
-#: gio/gsettings-tool.c:712
+#: ../gio/gsettings-tool.c:665
msgid " KEY The (optional) key within the schema\n"
msgstr " GAKOA Eskema barruko (aukerako) gakoa\n"
-#: gio/gsettings-tool.c:716
+#: ../gio/gsettings-tool.c:669
msgid " KEY The key within the schema\n"
msgstr " GAKOA Eskema barruko gakoa\n"
-#: gio/gsettings-tool.c:720
+#: ../gio/gsettings-tool.c:673
msgid " VALUE The value to set\n"
msgstr " BALIOA Ezarriko den balioa\n"
-#: gio/gsettings-tool.c:775
+#: ../gio/gsettings-tool.c:728
#, c-format
msgid "Could not load schemas from %s: %s\n"
msgstr "Ezin izan dira eskemarik '%s'(e)ndik kargatu : %s\n"
-#: gio/gsettings-tool.c:787
+#: ../gio/gsettings-tool.c:740
+#, c-format
msgid "No schemas installed\n"
msgstr "Ez dago eskemarik instalatuta\n"
-#: gio/gsettings-tool.c:866
+#: ../gio/gsettings-tool.c:811
+#, c-format
msgid "Empty schema name given\n"
msgstr "Eskemaren izen hutsa eman da\n"
-#: gio/gsettings-tool.c:921
+#: ../gio/gsettings-tool.c:866
#, c-format
msgid "No such key “%s”\n"
msgstr "Ez dago “%s“ bezalako gakorik\n"
-#: gio/gsocket.c:373
+#: ../gio/gsocket.c:379
msgid "Invalid socket, not initialized"
msgstr "Baliogabeko socket-a, hasieratu gabe dago"
-#: gio/gsocket.c:380
+#: ../gio/gsocket.c:386
#, c-format
msgid "Invalid socket, initialization failed due to: %s"
msgstr "Baliogabeko socket-a, hasieratzeak huts egin du: %s"
-#: gio/gsocket.c:388
+#: ../gio/gsocket.c:394
msgid "Socket is already closed"
msgstr "Socket-a jadanik itxita dago"
-#: gio/gsocket.c:403 gio/gsocket.c:3027 gio/gsocket.c:4244 gio/gsocket.c:4302
+#: ../gio/gsocket.c:409 ../gio/gsocket.c:2765 ../gio/gsocket.c:3950
+#: ../gio/gsocket.c:4008
msgid "Socket I/O timed out"
-msgstr "S/Iko socketaren denbora-muga gaindituta"
+msgstr "S/Iko socket-aren denbora-muga gaindituta"
-#: gio/gsocket.c:538
+#: ../gio/gsocket.c:541
#, c-format
msgid "creating GSocket from fd: %s"
msgstr "GSocket sortzen fd-tik: %s"
-#: gio/gsocket.c:567 gio/gsocket.c:621 gio/gsocket.c:628
+#: ../gio/gsocket.c:570 ../gio/gsocket.c:624 ../gio/gsocket.c:631
#, c-format
msgid "Unable to create socket: %s"
msgstr "Ezin da socket-a sortu: %s"
-#: gio/gsocket.c:621
+#: ../gio/gsocket.c:624
msgid "Unknown family was specified"
msgstr "Familia ezezaguna zehaztu da"
-#: gio/gsocket.c:628
+#: ../gio/gsocket.c:631
msgid "Unknown protocol was specified"
msgstr "Protokolo ezezaguna zehaztu da"
-#: gio/gsocket.c:1119
+#: ../gio/gsocket.c:1122
#, c-format
msgid "Cannot use datagram operations on a non-datagram socket."
-msgstr "Ezin da datagramen eragiketarik erabili datagramak ez diren socket-etan."
+msgstr ""
+"Ezin da datagramen eragiketarik erabili datagramak ez diren socket-etan."
-#: gio/gsocket.c:1136
+#: ../gio/gsocket.c:1139
#, c-format
msgid "Cannot use datagram operations on a socket with a timeout set."
-msgstr "Ezin da datagramen eragiketarik erabili socket-etan iraungitze-denborarik ezarri gabe."
+msgstr ""
+"Ezin da datagramen eragiketarik erabili socket-etan iraungitze-denborarik "
+"ezarri gabe."
-#: gio/gsocket.c:1943
+#: ../gio/gsocket.c:1943
#, c-format
msgid "could not get local address: %s"
msgstr "ezin izan da lokaleko helbidea lortu: %s"
-#: gio/gsocket.c:1989
+#: ../gio/gsocket.c:1986
#, c-format
msgid "could not get remote address: %s"
msgstr "ezin izan da urruneko helbidea lortu: %s"
-#: gio/gsocket.c:2055
+#: ../gio/gsocket.c:2052
#, c-format
msgid "could not listen: %s"
msgstr "ezin izan da entzun: %s"
-#: gio/gsocket.c:2157
+#: ../gio/gsocket.c:2151
#, c-format
msgid "Error binding to address: %s"
msgstr "Errorea helbidea lotzean: %s"
-#: gio/gsocket.c:2215 gio/gsocket.c:2252 gio/gsocket.c:2362 gio/gsocket.c:2387
-#: gio/gsocket.c:2460 gio/gsocket.c:2518 gio/gsocket.c:2536
+#: ../gio/gsocket.c:2266 ../gio/gsocket.c:2303
#, c-format
msgid "Error joining multicast group: %s"
msgstr "Errorea multidifusioko taldean elkartzean: %s"
-#: gio/gsocket.c:2216 gio/gsocket.c:2253 gio/gsocket.c:2363 gio/gsocket.c:2388
-#: gio/gsocket.c:2461 gio/gsocket.c:2519 gio/gsocket.c:2537
+#: ../gio/gsocket.c:2267 ../gio/gsocket.c:2304
#, c-format
msgid "Error leaving multicast group: %s"
msgstr "Errorea multidifusioko taldea uztean: %s"
-#: gio/gsocket.c:2217
+#: ../gio/gsocket.c:2268
msgid "No support for source-specific multicast"
msgstr "Iturburu zehatzeko multidifusiorik ez da onartzen"
-#: gio/gsocket.c:2364
-msgid "Unsupported socket family"
-msgstr "Onartzen ez den socket familia"
-
-#: gio/gsocket.c:2389
-msgid "source-specific not an IPv4 address"
-msgstr "Iturburu zehatzekoa ez IPv4 helbidea"
-
-#: gio/gsocket.c:2407 gio/gsocket.c:2436 gio/gsocket.c:2486
-#, c-format
-msgid "Interface not found: %s"
-msgstr "Interfazea ez da aurkitu: %s"
-
-#: gio/gsocket.c:2423
-#, c-format
-msgid "Interface name too long"
-msgstr "Interfaze-izena luzeegia da"
-
-#: gio/gsocket.c:2462
-msgid "No support for IPv4 source-specific multicast"
-msgstr "IPv4 iturburu zehatzeko multidifusiorik ez da onartzen"
-
-#: gio/gsocket.c:2520
-msgid "No support for IPv6 source-specific multicast"
-msgstr "IPv6 iturburu zehatzeko multidifusiorik ez da onartzen"
-
-#: gio/gsocket.c:2729
+#: ../gio/gsocket.c:2488
#, c-format
msgid "Error accepting connection: %s"
msgstr "Errorea konexioa onartzean: %s"
-#: gio/gsocket.c:2855
+#: ../gio/gsocket.c:2609
msgid "Connection in progress"
msgstr "Konexioa lantzen"
-#: gio/gsocket.c:2906
+#: ../gio/gsocket.c:2658
msgid "Unable to get pending error: "
msgstr "Ezin da falta diren erroreak lortu: "
-#: gio/gsocket.c:3092
+#: ../gio/gsocket.c:2828
#, c-format
msgid "Error receiving data: %s"
msgstr "Errorea datuak jasotzean: %s"
-#: gio/gsocket.c:3289
+#: ../gio/gsocket.c:3023
#, c-format
msgid "Error sending data: %s"
msgstr "Errorea datuak bidaltzean: %s"
-#: gio/gsocket.c:3476
+#: ../gio/gsocket.c:3210
#, c-format
msgid "Unable to shutdown socket: %s"
msgstr "Ezin da socket-a itzali: %s"
-#: gio/gsocket.c:3557
+#: ../gio/gsocket.c:3291
#, c-format
msgid "Error closing socket: %s"
msgstr "Errorea socket-a ixtean: %s"
-#: gio/gsocket.c:4237
+#: ../gio/gsocket.c:3943
#, c-format
msgid "Waiting for socket condition: %s"
msgstr "Socket-aren baldintzen zai: %s"
-#: gio/gsocket.c:4614 gio/gsocket.c:4616 gio/gsocket.c:4762 gio/gsocket.c:4847
-#: gio/gsocket.c:5027 gio/gsocket.c:5067 gio/gsocket.c:5069
+#: ../gio/gsocket.c:4417 ../gio/gsocket.c:4497 ../gio/gsocket.c:4675
#, c-format
msgid "Error sending message: %s"
msgstr "Errorea mezua bidaltzean: %s"
-#: gio/gsocket.c:4789
+#: ../gio/gsocket.c:4441
msgid "GSocketControlMessage not supported on Windows"
msgstr "GSocketControlMessage ez da Windows sisteman onartzen"
-#: gio/gsocket.c:5260 gio/gsocket.c:5333 gio/gsocket.c:5560
+#: ../gio/gsocket.c:4894 ../gio/gsocket.c:4967 ../gio/gsocket.c:5193
#, c-format
msgid "Error receiving message: %s"
msgstr "Errorea mezua jasotzean: %s"
-#: gio/gsocket.c:5832
+#: ../gio/gsocket.c:5465
#, c-format
msgid "Unable to read socket credentials: %s"
msgstr "Ezin da socket-aren kredentzialik irakurri: %s"
-#: gio/gsocket.c:5841
+#: ../gio/gsocket.c:5474
msgid "g_socket_get_credentials not implemented for this OS"
msgstr "g_socket_get_credentials ez dago S.E. honetan inplementatuta"
-#: gio/gsocketclient.c:181
+#: ../gio/gsocketclient.c:176
#, c-format
msgid "Could not connect to proxy server %s: "
msgstr "Ezin izan da %s proxy zerbitzariarekin konektatu: "
-#: gio/gsocketclient.c:195
+#: ../gio/gsocketclient.c:190
#, c-format
msgid "Could not connect to %s: "
msgstr "Ezin izan da %s(r)ekin konektatu: "
-#: gio/gsocketclient.c:197
+#: ../gio/gsocketclient.c:192
msgid "Could not connect: "
msgstr "Ezin izan da konektatu: "
-#: gio/gsocketclient.c:1032 gio/gsocketclient.c:1749
+#: ../gio/gsocketclient.c:1027 ../gio/gsocketclient.c:1599
msgid "Unknown error on connect"
msgstr "Errore ezezaguna konexioan"
-#: gio/gsocketclient.c:1086 gio/gsocketclient.c:1657
+#: ../gio/gsocketclient.c:1081 ../gio/gsocketclient.c:1535
msgid "Proxying over a non-TCP connection is not supported."
-msgstr "TCP motakoak ez diren konexioen gainean proxy-a egitea ez dago onartuta."
+msgstr ""
+"TCP motakoak ez diren konexioen gainean proxy-a egitea ez dago onartuta."
-#: gio/gsocketclient.c:1115 gio/gsocketclient.c:1683
+#: ../gio/gsocketclient.c:1110 ../gio/gsocketclient.c:1561
#, c-format
msgid "Proxy protocol “%s” is not supported."
msgstr "Proxy-aren “%s“ protokoloa ez dago onartuta."
-#: gio/gsocketlistener.c:225
+#: ../gio/gsocketlistener.c:218
msgid "Listener is already closed"
msgstr "Entzulea jadanik itxita dago"
-#: gio/gsocketlistener.c:271
+#: ../gio/gsocketlistener.c:264
msgid "Added socket is closed"
msgstr "Gehitutako socket-a itxi da"
-#: gio/gsocks4aproxy.c:118
+#: ../gio/gsocks4aproxy.c:118
#, c-format
msgid "SOCKSv4 does not support IPv6 address “%s”"
msgstr "SOCKSv4-ek ez du “%s“ IPv6 helbidea onartzen"
-#: gio/gsocks4aproxy.c:136
+#: ../gio/gsocks4aproxy.c:136
msgid "Username is too long for SOCKSv4 protocol"
msgstr "Erabiltzaile-izena luzeegia da SOCKSv4 protokoloarentzako"
-#: gio/gsocks4aproxy.c:153
+#: ../gio/gsocks4aproxy.c:153
#, c-format
msgid "Hostname “%s” is too long for SOCKSv4 protocol"
msgstr "“%s“ ostalari-izena luzeegia da SOCKSv4 protokoloarentzako"
-#: gio/gsocks4aproxy.c:179
+#: ../gio/gsocks4aproxy.c:179
msgid "The server is not a SOCKSv4 proxy server."
msgstr "Zerbitzaria ez da SOCKSv4 proxy zerbitzari bat."
-#: gio/gsocks4aproxy.c:186
+#: ../gio/gsocks4aproxy.c:186
msgid "Connection through SOCKSv4 server was rejected"
msgstr "SOCKSv4 zerbitzariaren bidezko konexioa ukatu da"
-#: gio/gsocks5proxy.c:153 gio/gsocks5proxy.c:324 gio/gsocks5proxy.c:334
+#: ../gio/gsocks5proxy.c:153 ../gio/gsocks5proxy.c:324
+#: ../gio/gsocks5proxy.c:334
msgid "The server is not a SOCKSv5 proxy server."
msgstr "Zerbitzaria ez da SOCKSv5 proxy zerbitzari bat."
-#: gio/gsocks5proxy.c:167
+#: ../gio/gsocks5proxy.c:167
msgid "The SOCKSv5 proxy requires authentication."
msgstr "SOCKSv5 proxy-ak autentifikazioa eskatzen du."
-#: gio/gsocks5proxy.c:177
+#: ../gio/gsocks5proxy.c:177
msgid ""
"The SOCKSv5 proxy requires an authentication method that is not supported by "
"GLib."
-msgstr "SOCKSv5-ek autentifikatzeko metodo bat eskatzen du (Glib-ek onartzen ez duena)."
+msgstr ""
+"SOCKSv5-ek autentifikatzeko metodo bat eskatzen du (Glib-ek onartzen ez "
+"duena)."
-#: gio/gsocks5proxy.c:206
+#: ../gio/gsocks5proxy.c:206
msgid "Username or password is too long for SOCKSv5 protocol."
-msgstr "Erabiltzaile-izena edo pasahitza luzeegia da SOCKSv5 protokoloarentzako."
+msgstr ""
+"Erabiltzaile-izena edo pasahitza luzeegia da SOCKSv5 protokoloarentzako."
-#: gio/gsocks5proxy.c:236
+#: ../gio/gsocks5proxy.c:236
msgid "SOCKSv5 authentication failed due to wrong username or password."
-msgstr "SOCKSv5 autentifikazioak huts egin du erabiltzaile-izena edo pasahitza okerra delako."
+msgstr ""
+"SOCKSv5 autentifikazioak huts egin du erabiltzaile-izena edo pasahitza "
+"okerra delako."
-#: gio/gsocks5proxy.c:286
+#: ../gio/gsocks5proxy.c:286
#, c-format
msgid "Hostname “%s” is too long for SOCKSv5 protocol"
msgstr "“%s“ ostalari-izena luzeegia da SOCKSv5 protokoloarentzako"
-#: gio/gsocks5proxy.c:348
+#: ../gio/gsocks5proxy.c:348
msgid "The SOCKSv5 proxy server uses unknown address type."
msgstr "SOCKSv5 proxy zerbitzariak helbide mota ezezagunak erabiltzen ditu."
-#: gio/gsocks5proxy.c:355
+#: ../gio/gsocks5proxy.c:355
msgid "Internal SOCKSv5 proxy server error."
msgstr "SOCKSv5 proxy-aren zerbitzariaren barneko errorea."
-#: gio/gsocks5proxy.c:361
+#: ../gio/gsocks5proxy.c:361
msgid "SOCKSv5 connection not allowed by ruleset."
msgstr "Arauen multzoak ez du SOCKSv5 konexioa baimentzen."
-#: gio/gsocks5proxy.c:368
+#: ../gio/gsocks5proxy.c:368
msgid "Host unreachable through SOCKSv5 server."
msgstr "Ostalaria atziezina SOCKSv5 zerbitzariaren bidez."
-#: gio/gsocks5proxy.c:374
+#: ../gio/gsocks5proxy.c:374
msgid "Network unreachable through SOCKSv5 proxy."
msgstr "Sarea atziezina SOCKSv5 proxy-aren bidez."
-#: gio/gsocks5proxy.c:380
+#: ../gio/gsocks5proxy.c:380
msgid "Connection refused through SOCKSv5 proxy."
msgstr "Konexioa ukatuta SOCKSv5 proxy-aren bidez."
-#: gio/gsocks5proxy.c:386
+#: ../gio/gsocks5proxy.c:386
msgid "SOCKSv5 proxy does not support “connect” command."
msgstr "SOCKSv5 proxy-ak ez du “connect“ komandoa onartzen."
-#: gio/gsocks5proxy.c:392
+#: ../gio/gsocks5proxy.c:392
msgid "SOCKSv5 proxy does not support provided address type."
msgstr "SOCKSv5 proxy-ak ez du emandako helbide mota onartzen."
-#: gio/gsocks5proxy.c:398
+#: ../gio/gsocks5proxy.c:398
msgid "Unknown SOCKSv5 proxy error."
msgstr "SOCKSv5 proxy-aren errore ezezaguna."
-#: gio/gthemedicon.c:595
+#: ../gio/gthemedicon.c:518
#, c-format
msgid "Can’t handle version %d of GThemedIcon encoding"
msgstr "Ezin da GThemedIcon kodeketaren %d bertsioa kudeatu"
-#: gio/gthreadedresolver.c:152
+#: ../gio/gthreadedresolver.c:118
msgid "No valid addresses were found"
msgstr "Ez da baliozko helbiderik aurkitu"
-#: gio/gthreadedresolver.c:317
+#: ../gio/gthreadedresolver.c:213
#, c-format
msgid "Error reverse-resolving “%s”: %s"
msgstr "Errorea “%s“ alderantziz ebaztean: %s"
-#: gio/gthreadedresolver.c:653 gio/gthreadedresolver.c:732
-#: gio/gthreadedresolver.c:830 gio/gthreadedresolver.c:880
+#: ../gio/gthreadedresolver.c:550 ../gio/gthreadedresolver.c:630
+#: ../gio/gthreadedresolver.c:728 ../gio/gthreadedresolver.c:778
#, c-format
msgid "No DNS record of the requested type for “%s”"
msgstr "Ez dago eskatutako motaren DNS erregistrorik “%s“(r)entzako"
-#: gio/gthreadedresolver.c:658 gio/gthreadedresolver.c:835
+#: ../gio/gthreadedresolver.c:555 ../gio/gthreadedresolver.c:733
#, c-format
msgid "Temporarily unable to resolve “%s”"
msgstr "Ezin da “%s“ ebatzi aldi batean"
-#: gio/gthreadedresolver.c:663 gio/gthreadedresolver.c:840
-#: gio/gthreadedresolver.c:950
+#: ../gio/gthreadedresolver.c:560 ../gio/gthreadedresolver.c:738
#, c-format
msgid "Error resolving “%s”"
msgstr "Errorea “%s“ ebaztean"
-#: gio/gtlscertificate.c:243
-msgid "No PEM-encoded private key found"
-msgstr "Ez da PEMekin kodetutako ziurtagirik aurkitu"
-
-#: gio/gtlscertificate.c:253
+#: ../gio/gtlscertificate.c:250
msgid "Cannot decrypt PEM-encoded private key"
msgstr "Ezin da PEMekin kodetutako gako pribatua desenkriptatu"
-#: gio/gtlscertificate.c:264
+#: ../gio/gtlscertificate.c:255
+msgid "No PEM-encoded private key found"
+msgstr "Ez da PEMekin kodetutako ziurtagirik aurkitu"
+
+#: ../gio/gtlscertificate.c:265
msgid "Could not parse PEM-encoded private key"
msgstr "Ezin izan da PEMekin kodetutako gako pribatua analizatu"
-#: gio/gtlscertificate.c:291
+#: ../gio/gtlscertificate.c:290
msgid "No PEM-encoded certificate found"
msgstr "Ez da PEMekin kodetutako ziurtagirik aurkitu"
-#: gio/gtlscertificate.c:300
+#: ../gio/gtlscertificate.c:299
msgid "Could not parse PEM-encoded certificate"
msgstr "Ezin izan da PEMekin kodetutako ziurtagiririk analizatu"
-#: gio/gtlspassword.c:111
+#: ../gio/gtlspassword.c:111
msgid ""
"This is the last chance to enter the password correctly before your access "
"is locked out."
-msgstr "Hau azken aukera da pasahitza ongi sartzeko, zure sarbidetza blokeatu aurretik."
+msgstr ""
+"Hau azken aukera da pasahitza ongi sartzeko, zure sarbidetza blokeatu "
+"aurretik."
#. 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
+#: ../gio/gtlspassword.c:115
+#| 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 "Sartu diren hainbat pasahitz ez dira zuzenak, eta zure sarbidetza blokeatu egingo da hutsegite gehiagoren ondoren."
+msgstr ""
+"Sartu diren hainbat pasahitz ez dira zuzenak, eta zure sarbidetza blokeatu "
+"egingo da hutsegite gehiagoren ondoren."
-#: gio/gtlspassword.c:117
+#: ../gio/gtlspassword.c:117
msgid "The password entered is incorrect."
msgstr "Sartutako pasahitza okerrekoa da."
-#: gio/gunixconnection.c:166 gio/gunixconnection.c:563
+#: ../gio/gunixconnection.c:166 ../gio/gunixconnection.c:563
#, c-format
msgid "Expecting 1 control message, got %d"
msgid_plural "Expecting 1 control message, got %d"
msgstr[0] "Kontroleko mezu 1 espero zen, %d lortu da"
msgstr[1] "Kontroleko mezu 1 espero zen, %d lortu dira"
-#: gio/gunixconnection.c:182 gio/gunixconnection.c:575
+#: ../gio/gunixconnection.c:182 ../gio/gunixconnection.c:575
msgid "Unexpected type of ancillary data"
msgstr "Ustekabeko datu-laguntzaile mota"
-#: gio/gunixconnection.c:200
+#: ../gio/gunixconnection.c:200
#, c-format
msgid "Expecting one fd, but got %d\n"
msgid_plural "Expecting one fd, but got %d\n"
msgstr[0] "fd bat espero zen, baina %d lortu da\n"
msgstr[1] "fd bat espero zen, baina %d lortu dira\n"
-#: gio/gunixconnection.c:219
+#: ../gio/gunixconnection.c:219
msgid "Received invalid fd"
msgstr "Baliogabeko fd jasota"
-#: gio/gunixconnection.c:355
+#: ../gio/gunixconnection.c:355
msgid "Error sending credentials: "
msgstr "Errorea kredentzialak bidaltzean: "
-#: gio/gunixconnection.c:504
+#: ../gio/gunixconnection.c:504
#, c-format
msgid "Error checking if SO_PASSCRED is enabled for socket: %s"
msgstr "Errorea SO_PASSCRED gaituta dagoen begiratzean socket-arentzako: %s"
-#: gio/gunixconnection.c:520
+#: ../gio/gunixconnection.c:520
#, c-format
msgid "Error enabling SO_PASSCRED: %s"
msgstr "Errorea SO_PASSCRED gaitzean: %s"
-#: gio/gunixconnection.c:549
+#: ../gio/gunixconnection.c:549
msgid ""
"Expecting to read a single byte for receiving credentials but read zero bytes"
-msgstr "Harrerako kredentzialentzako byte bakar bat irakurtzea espero zen, baina zero byte irakurri dira."
+msgstr ""
+"Harrerako kredentzialentzako byte bakar bat irakurtzea espero zen, baina "
+"zero byte irakurri dira."
-#: gio/gunixconnection.c:589
+#: ../gio/gunixconnection.c:589
#, c-format
msgid "Not expecting control message, but got %d"
msgstr "Ez zen kontroleko mezurik espero, baina %d lortu dira"
-#: gio/gunixconnection.c:614
+#: ../gio/gunixconnection.c:614
#, c-format
msgid "Error while disabling SO_PASSCRED: %s"
msgstr "Errorea SO_PASSCRED desgaitzean: %s"
-#: gio/gunixinputstream.c:372 gio/gunixinputstream.c:393
+#: ../gio/gunixinputstream.c:372 ../gio/gunixinputstream.c:393
#, c-format
msgid "Error reading from file descriptor: %s"
-msgstr "Errorea fitxategiaren deskriptoretik irakurtzean: %s"
+msgstr "Errorea fitxategiaren deskriptoretik irakurtzean: %s "
-#: gio/gunixinputstream.c:426 gio/gunixoutputstream.c:534
-#: gio/gwin32inputstream.c:217 gio/gwin32outputstream.c:204
+#: ../gio/gunixinputstream.c:426 ../gio/gunixoutputstream.c:411
+#: ../gio/gwin32inputstream.c:217 ../gio/gwin32outputstream.c:204
#, c-format
msgid "Error closing file descriptor: %s"
-msgstr "Errorea fitxategiaren deskriptorea ixtean: %s"
+msgstr "Errorea fitxategiaren deskriptorea ixtean: %s "
-#: gio/gunixmounts.c:2650 gio/gunixmounts.c:2703
+#: ../gio/gunixmounts.c:2430 ../gio/gunixmounts.c:2483
msgid "Filesystem root"
msgstr "Fitxategi-sistemaren erroa"
-#: gio/gunixoutputstream.c:371 gio/gunixoutputstream.c:391
-#: gio/gunixoutputstream.c:478 gio/gunixoutputstream.c:498
-#: gio/gunixoutputstream.c:675
+#: ../gio/gunixoutputstream.c:358 ../gio/gunixoutputstream.c:378
#, c-format
msgid "Error writing to file descriptor: %s"
msgstr "Errorea fitxategiaren deskriptorean idaztean: %s"
-#: gio/gunixsocketaddress.c:243
+#: ../gio/gunixsocketaddress.c:241
msgid "Abstract UNIX domain socket addresses not supported on this system"
-msgstr "UNIX-eko domeinuen socket helbide abstraktuak ez daude sistema honetan onartuta"
+msgstr ""
+"UNIX-eko domeinuen socket helbide abstraktuak ez daude sistema honetan "
+"onartuta"
-#: gio/gvolume.c:438
+#: ../gio/gvolume.c:437
msgid "volume doesn’t implement eject"
msgstr "bolumenak ez dauka “egotzi“ inplementatuta"
#. Translators: This is an error
#. * message for volume objects that
#. * don't implement any of eject or eject_with_operation.
-#: gio/gvolume.c:515
+#: ../gio/gvolume.c:514
msgid "volume doesn’t implement eject or eject_with_operation"
msgstr "bolumenak ez dauka “egotzi“ edo “egotzi eragiketarekin“ inplementatuta"
-#: gio/gwin32inputstream.c:185
+#: ../gio/gwin32inputstream.c:185
#, c-format
msgid "Error reading from handle: %s"
msgstr "Errorea heldulekutik irakurtzean: %s"
-#: gio/gwin32inputstream.c:232 gio/gwin32outputstream.c:219
+#: ../gio/gwin32inputstream.c:232 ../gio/gwin32outputstream.c:219
#, c-format
msgid "Error closing handle: %s"
msgstr "Errorea heldulekua ixtean: %s"
-#: gio/gwin32outputstream.c:172
+#: ../gio/gwin32outputstream.c:172
#, c-format
msgid "Error writing to handle: %s"
msgstr "Errorea heldulekuan idaztean: %s"
-#: gio/gzlibcompressor.c:394 gio/gzlibdecompressor.c:347
+#: ../gio/gzlibcompressor.c:394 ../gio/gzlibdecompressor.c:347
msgid "Not enough memory"
msgstr "Ez dago nahikoa memoriarik"
-#: gio/gzlibcompressor.c:401 gio/gzlibdecompressor.c:354
+#: ../gio/gzlibcompressor.c:401 ../gio/gzlibdecompressor.c:354
#, c-format
msgid "Internal error: %s"
msgstr "Barneko errorea: %s"
-#: gio/gzlibcompressor.c:414 gio/gzlibdecompressor.c:368
+#: ../gio/gzlibcompressor.c:414 ../gio/gzlibdecompressor.c:368
msgid "Need more input"
msgstr "Sarrera gehiago behar dira"
#
-#: gio/gzlibdecompressor.c:340
+#: ../gio/gzlibdecompressor.c:340
msgid "Invalid compressed data"
msgstr "Konprimitutako datu baliogabeak"
-#: gio/tests/gdbus-daemon.c:18
+#: ../gio/tests/gdbus-daemon.c:18
msgid "Address to listen on"
msgstr "Helbidea entzuteko"
-#: gio/tests/gdbus-daemon.c:19
+#: ../gio/tests/gdbus-daemon.c:19
msgid "Ignored, for compat with GTestDbus"
msgstr "Ez ikusi egin GTestDBus-ekin bateragarria izateko"
-#: gio/tests/gdbus-daemon.c:20
+#: ../gio/tests/gdbus-daemon.c:20
msgid "Print address"
msgstr "Erakutsi helbidea"
-#: gio/tests/gdbus-daemon.c:21
+#: ../gio/tests/gdbus-daemon.c:21
msgid "Print address in shell mode"
msgstr "Erakutsi helbidea shell moduan"
-#: gio/tests/gdbus-daemon.c:28
+#: ../gio/tests/gdbus-daemon.c:28
msgid "Run a dbus service"
msgstr "Exekutatu dbus zerbitzua"
-#: gio/tests/gdbus-daemon.c:42
+#: ../gio/tests/gdbus-daemon.c:42
+#, c-format
msgid "Wrong args\n"
msgstr "Okerreko argumentuak\n"
-#: glib/gbookmarkfile.c:754
+#: ../glib/gbookmarkfile.c:754
#, c-format
msgid "Unexpected attribute “%s” for element “%s”"
msgstr "“%2$s“ elementuaren ustekabeko “%1$s“ atributua"
-#: glib/gbookmarkfile.c:765 glib/gbookmarkfile.c:836 glib/gbookmarkfile.c:846
-#: glib/gbookmarkfile.c:955
+#: ../glib/gbookmarkfile.c:765 ../glib/gbookmarkfile.c:836
+#: ../glib/gbookmarkfile.c:846 ../glib/gbookmarkfile.c:953
#, c-format
msgid "Attribute “%s” of element “%s” not found"
msgstr "“%2$s“ elementuaren “%1$s“ atributua ez da aurkitu"
-#: glib/gbookmarkfile.c:1164 glib/gbookmarkfile.c:1229
-#: glib/gbookmarkfile.c:1293 glib/gbookmarkfile.c:1303
+#: ../glib/gbookmarkfile.c:1123 ../glib/gbookmarkfile.c:1188
+#: ../glib/gbookmarkfile.c:1252 ../glib/gbookmarkfile.c:1262
#, c-format
msgid "Unexpected tag “%s”, tag “%s” expected"
msgstr "Ustekabeko “%s“ etiketa, “%s“ espero zen"
-#: glib/gbookmarkfile.c:1189 glib/gbookmarkfile.c:1203
-#: glib/gbookmarkfile.c:1271 glib/gbookmarkfile.c:1317
+#: ../glib/gbookmarkfile.c:1148 ../glib/gbookmarkfile.c:1162
+#: ../glib/gbookmarkfile.c:1230
#, c-format
msgid "Unexpected tag “%s” inside “%s”"
msgstr "“%2$s“ barruan ustekabeko “%1$s“ etiketa"
-#: glib/gbookmarkfile.c:1813
+#: ../glib/gbookmarkfile.c:1756
msgid "No valid bookmark file found in data dirs"
-msgstr "Ezin izan da baliozko laster-marken fitxategia aurkitu datuen direktorioan"
+msgstr ""
+"Ezin izan da baliozko laster-marken fitxategia aurkitu datuen direktorioan"
-#: glib/gbookmarkfile.c:2014
+#: ../glib/gbookmarkfile.c:1957
#, c-format
msgid "A bookmark for URI “%s” already exists"
msgstr "“%s“ URIaren laster-marka badago lehendik ere"
-#: glib/gbookmarkfile.c:2060 glib/gbookmarkfile.c:2218
-#: glib/gbookmarkfile.c:2303 glib/gbookmarkfile.c:2383
-#: glib/gbookmarkfile.c:2468 glib/gbookmarkfile.c:2551
-#: glib/gbookmarkfile.c:2629 glib/gbookmarkfile.c:2708
-#: glib/gbookmarkfile.c:2750 glib/gbookmarkfile.c:2847
-#: glib/gbookmarkfile.c:2968 glib/gbookmarkfile.c:3158
-#: glib/gbookmarkfile.c:3234 glib/gbookmarkfile.c:3402
-#: glib/gbookmarkfile.c:3491 glib/gbookmarkfile.c:3580
-#: glib/gbookmarkfile.c:3699
+#: ../glib/gbookmarkfile.c:2003 ../glib/gbookmarkfile.c:2161
+#: ../glib/gbookmarkfile.c:2246 ../glib/gbookmarkfile.c:2326
+#: ../glib/gbookmarkfile.c:2411 ../glib/gbookmarkfile.c:2494
+#: ../glib/gbookmarkfile.c:2572 ../glib/gbookmarkfile.c:2651
+#: ../glib/gbookmarkfile.c:2693 ../glib/gbookmarkfile.c:2790
+#: ../glib/gbookmarkfile.c:2910 ../glib/gbookmarkfile.c:3100
+#: ../glib/gbookmarkfile.c:3176 ../glib/gbookmarkfile.c:3344
+#: ../glib/gbookmarkfile.c:3433 ../glib/gbookmarkfile.c:3522
+#: ../glib/gbookmarkfile.c:3638
#, c-format
msgid "No bookmark found for URI “%s”"
msgstr "Ez da “%s“ URIaren laster-markarik aurkitu"
-#: glib/gbookmarkfile.c:2392
+#: ../glib/gbookmarkfile.c:2335
#, c-format
msgid "No MIME type defined in the bookmark for URI “%s”"
msgstr "Ez dago “%s“ URIaren laster-markan MIME motarik definituta"
-#: glib/gbookmarkfile.c:2477
+#: ../glib/gbookmarkfile.c:2420
#, c-format
msgid "No private flag has been defined in bookmark for URI “%s”"
msgstr "“%s“ URIaren laster-markan ez dago bandera pribaturik definituta"
-#: glib/gbookmarkfile.c:2856
+#: ../glib/gbookmarkfile.c:2799
#, c-format
msgid "No groups set in bookmark for URI “%s”"
msgstr "“%s“ URIaren laster-markan ez dago talderik ezarrita"
-#: glib/gbookmarkfile.c:3255 glib/gbookmarkfile.c:3412
+#: ../glib/gbookmarkfile.c:3197 ../glib/gbookmarkfile.c:3354
#, c-format
msgid "No application with name “%s” registered a bookmark for “%s”"
msgstr "“%s“ izeneko aplikaziorik ez du erregistratu laster-markarik '%s'(e)n"
-#: glib/gbookmarkfile.c:3435
+#: ../glib/gbookmarkfile.c:3377
#, c-format
msgid "Failed to expand exec line “%s” with URI “%s”"
msgstr "Huts egin du “%s“ exekuzioko lerroa “%s“ URIarekin hedatzean"
-#: glib/gconvert.c:474
-msgid "Unrepresentable character in conversion input"
-msgstr "Adierazi ezin den karakterea bihurketa-sarreran"
-
-#: glib/gconvert.c:501 glib/gutf8.c:865 glib/gutf8.c:1077 glib/gutf8.c:1214
-#: glib/gutf8.c:1318
+#: ../glib/gconvert.c:477 ../glib/gutf8.c:862 ../glib/gutf8.c:1074
+#: ../glib/gutf8.c:1211 ../glib/gutf8.c:1315
msgid "Partial character sequence at end of input"
msgstr "Karaktere-sekuentzia partziala sarreraren amaieran"
-#: glib/gconvert.c:770
+#: ../glib/gconvert.c:742
#, c-format
msgid "Cannot convert fallback “%s” to codeset “%s”"
msgstr "Ezin da “%s“ atzerapena “%s“ kode-multzo bihurtu"
-#: glib/gconvert.c:942
-msgid "Embedded NUL byte in conversion input"
-msgstr "NUL byte baliogabea bihurketa-sarreran"
-
-#: glib/gconvert.c:963
-msgid "Embedded NUL byte in conversion output"
-msgstr "NUL byte kapsulatua bihurketa-sarreran"
-
-#: glib/gconvert.c:1648
+#: ../glib/gconvert.c:1513
#, c-format
msgid "The URI “%s” is not an absolute URI using the “file” scheme"
msgstr "“%s“ URIa ez da “fitxategi“-eskema erabiltzen duen URI absolutua"
-#: glib/gconvert.c:1658
+#: ../glib/gconvert.c:1523
#, c-format
msgid "The local file URI “%s” may not include a “#”"
msgstr "Baliteke “%s“ URI fitxategi lokalak “#“ ez edukitzea"
-#: glib/gconvert.c:1675
+#: ../glib/gconvert.c:1540
#, c-format
msgid "The URI “%s” is invalid"
msgstr "“%s“ URI baliogabea da"
-#: glib/gconvert.c:1687
+#: ../glib/gconvert.c:1552
#, c-format
msgid "The hostname of the URI “%s” is invalid"
msgstr "“%s“ URIaren ostalari-izena baliogabea da"
-#: glib/gconvert.c:1703
+#: ../glib/gconvert.c:1568
#, c-format
msgid "The URI “%s” contains invalidly escaped characters"
msgstr "“%s“ URIak ihes-karaktere baliogabeak ditu"
-#: glib/gconvert.c:1775
+#: ../glib/gconvert.c:1640
#, c-format
msgid "The pathname “%s” is not an absolute path"
msgstr "“%s“ bide-izena ez da bide-izen absolutua"
#. Translators: this is the preferred format for expressing the date and the time
-#: glib/gdatetime.c:214
+#: ../glib/gdatetime.c:202
msgctxt "GDateTime"
msgid "%a %b %e %H:%M:%S %Y"
msgstr "%y-%m-%d %T %Z"
#. Translators: this is the preferred format for expressing the date
-#: glib/gdatetime.c:217
+#: ../glib/gdatetime.c:205
msgctxt "GDateTime"
msgid "%m/%d/%y"
msgstr "%y/%m/%d"
#. Translators: this is the preferred format for expressing the time
-#: glib/gdatetime.c:220
+#: ../glib/gdatetime.c:208
msgctxt "GDateTime"
msgid "%H:%M:%S"
msgstr "%H:%M:%S"
#. Translators: this is the preferred format for expressing 12 hour time
-#: glib/gdatetime.c:223
+#: ../glib/gdatetime.c:211
msgctxt "GDateTime"
msgid "%I:%M:%S %p"
msgstr "%I:%M:%S %p"
-#. Translators: Some languages (Baltic, Slavic, Greek, and some more)
-#. * need different grammatical forms of month names depending on whether
-#. * they are standalone or in a complete date context, with the day
-#. * number. Some other languages may prefer starting with uppercase when
-#. * they are standalone and with lowercase when they are in a complete
-#. * date context. Here are full month names in a form appropriate when
-#. * they are used standalone. If your system is Linux with the glibc
-#. * version 2.27 (released Feb 1, 2018) or newer or if it is from the BSD
-#. * family (which includes OS X) then you can refer to the date command
-#. * line utility and see what the command `date +%OB' produces. Also in
-#. * the latest Linux the command `locale alt_mon' in your native locale
-#. * produces a complete list of month names almost ready to copy and
-#. * paste here. Note that in most of the languages (western European,
-#. * non-European) there is no difference between the standalone and
-#. * complete date form.
-#.
-#: glib/gdatetime.c:262
+#: ../glib/gdatetime.c:224
msgctxt "full month name"
msgid "January"
msgstr "Urtarrila"
-#: glib/gdatetime.c:264
+#: ../glib/gdatetime.c:226
msgctxt "full month name"
msgid "February"
msgstr "Otsaila"
-#: glib/gdatetime.c:266
+#: ../glib/gdatetime.c:228
msgctxt "full month name"
msgid "March"
msgstr "Martxoa"
-#: glib/gdatetime.c:268
+#: ../glib/gdatetime.c:230
msgctxt "full month name"
msgid "April"
msgstr "Apirila"
-#: glib/gdatetime.c:270
+#: ../glib/gdatetime.c:232
msgctxt "full month name"
msgid "May"
msgstr "Maiatza"
-#: glib/gdatetime.c:272
+#: ../glib/gdatetime.c:234
msgctxt "full month name"
msgid "June"
msgstr "Ekaina"
-#: glib/gdatetime.c:274
+#: ../glib/gdatetime.c:236
msgctxt "full month name"
msgid "July"
msgstr "Uztaila"
-#: glib/gdatetime.c:276
+#: ../glib/gdatetime.c:238
msgctxt "full month name"
msgid "August"
msgstr "Abuztua"
-#: glib/gdatetime.c:278
+#: ../glib/gdatetime.c:240
msgctxt "full month name"
msgid "September"
msgstr "Iraila"
-#: glib/gdatetime.c:280
+#: ../glib/gdatetime.c:242
msgctxt "full month name"
msgid "October"
msgstr "Urria"
-#: glib/gdatetime.c:282
+#: ../glib/gdatetime.c:244
msgctxt "full month name"
msgid "November"
msgstr "Azaroa"
-#: glib/gdatetime.c:284
+#: ../glib/gdatetime.c:246
msgctxt "full month name"
msgid "December"
msgstr "Abendua"
-#. Translators: Some languages need different grammatical forms of
-#. * month names depending on whether they are standalone or in a complete
-#. * date context, with the day number. Some may prefer starting with
-#. * uppercase when they are standalone and with lowercase when they are
-#. * in a full date context. However, as these names are abbreviated
-#. * the grammatical difference is visible probably only in Belarusian
-#. * and Russian. In other languages there is no difference between
-#. * the standalone and complete date form when they are abbreviated.
-#. * If your system is Linux with the glibc version 2.27 (released
-#. * Feb 1, 2018) or newer then you can refer to the date command line
-#. * utility and see what the command `date +%Ob' produces. Also in
-#. * the latest Linux the command `locale ab_alt_mon' in your native
-#. * locale produces a complete list of month names almost ready to copy
-#. * and paste here. Note that this feature is not yet supported by any
-#. * other platform. Here are abbreviated month names in a form
-#. * appropriate when they are used standalone.
-#.
-#: glib/gdatetime.c:316
+#: ../glib/gdatetime.c:261
msgctxt "abbreviated month name"
msgid "Jan"
msgstr "Urt."
-#: glib/gdatetime.c:318
+#: ../glib/gdatetime.c:263
msgctxt "abbreviated month name"
msgid "Feb"
msgstr "Ots."
-#: glib/gdatetime.c:320
+#: ../glib/gdatetime.c:265
msgctxt "abbreviated month name"
msgid "Mar"
msgstr "Mar."
-#: glib/gdatetime.c:322
+#: ../glib/gdatetime.c:267
msgctxt "abbreviated month name"
msgid "Apr"
msgstr "Apr."
-#: glib/gdatetime.c:324
+#: ../glib/gdatetime.c:269
msgctxt "abbreviated month name"
msgid "May"
-msgstr "Maiatza"
+msgstr "Mai"
-#: glib/gdatetime.c:326
+#: ../glib/gdatetime.c:271
msgctxt "abbreviated month name"
msgid "Jun"
msgstr "Eka."
-#: glib/gdatetime.c:328
+#: ../glib/gdatetime.c:273
msgctxt "abbreviated month name"
msgid "Jul"
msgstr "Uzt."
-#: glib/gdatetime.c:330
+#: ../glib/gdatetime.c:275
msgctxt "abbreviated month name"
msgid "Aug"
msgstr "Abu."
-#: glib/gdatetime.c:332
+#: ../glib/gdatetime.c:277
msgctxt "abbreviated month name"
msgid "Sep"
msgstr "Ira."
-#: glib/gdatetime.c:334
+#: ../glib/gdatetime.c:279
msgctxt "abbreviated month name"
msgid "Oct"
msgstr "Urr."
-#: glib/gdatetime.c:336
+#: ../glib/gdatetime.c:281
msgctxt "abbreviated month name"
msgid "Nov"
msgstr "Aza."
-#: glib/gdatetime.c:338
+#: ../glib/gdatetime.c:283
msgctxt "abbreviated month name"
msgid "Dec"
msgstr "Abe."
-#: glib/gdatetime.c:353
+#: ../glib/gdatetime.c:298
msgctxt "full weekday name"
msgid "Monday"
msgstr "Astelehena"
-#: glib/gdatetime.c:355
+#: ../glib/gdatetime.c:300
msgctxt "full weekday name"
msgid "Tuesday"
msgstr "Asteartea"
-#: glib/gdatetime.c:357
+#: ../glib/gdatetime.c:302
msgctxt "full weekday name"
msgid "Wednesday"
msgstr "Asteazkena"
-#: glib/gdatetime.c:359
+#: ../glib/gdatetime.c:304
msgctxt "full weekday name"
msgid "Thursday"
msgstr "Osteguna"
-#: glib/gdatetime.c:361
+#: ../glib/gdatetime.c:306
msgctxt "full weekday name"
msgid "Friday"
msgstr "Ostirala"
-#: glib/gdatetime.c:363
+#: ../glib/gdatetime.c:308
msgctxt "full weekday name"
msgid "Saturday"
msgstr "Larunbata"
-#: glib/gdatetime.c:365
+#: ../glib/gdatetime.c:310
msgctxt "full weekday name"
msgid "Sunday"
msgstr "Igandea"
-#: glib/gdatetime.c:380
+#: ../glib/gdatetime.c:325
msgctxt "abbreviated weekday name"
msgid "Mon"
msgstr "Al."
-#: glib/gdatetime.c:382
+#: ../glib/gdatetime.c:327
msgctxt "abbreviated weekday name"
msgid "Tue"
msgstr "Ar."
-#: glib/gdatetime.c:384
+#: ../glib/gdatetime.c:329
msgctxt "abbreviated weekday name"
msgid "Wed"
msgstr "Az."
-#: glib/gdatetime.c:386
+#: ../glib/gdatetime.c:331
msgctxt "abbreviated weekday name"
msgid "Thu"
msgstr "Og."
-#: glib/gdatetime.c:388
+#: ../glib/gdatetime.c:333
msgctxt "abbreviated weekday name"
msgid "Fri"
msgstr "Or."
-#: glib/gdatetime.c:390
+#: ../glib/gdatetime.c:335
msgctxt "abbreviated weekday name"
msgid "Sat"
msgstr "Lr."
-#: glib/gdatetime.c:392
+#: ../glib/gdatetime.c:337
msgctxt "abbreviated weekday name"
msgid "Sun"
msgstr "Ig."
-#. Translators: Some languages need different grammatical forms of
-#. * month names depending on whether they are standalone or in a full
-#. * date context, with the day number. Some may prefer starting with
-#. * uppercase when they are standalone and with lowercase when they are
-#. * in a full date context. Here are full month names in a form
-#. * appropriate when they are used in a full date context, with the
-#. * day number. If your system is Linux with the glibc version 2.27
-#. * (released Feb 1, 2018) or newer or if it is from the BSD family
-#. * (which includes OS X) then you can refer to the date command line
-#. * utility and see what the command `date +%B' produces. Also in
-#. * the latest Linux the command `locale mon' in your native locale
-#. * produces a complete list of month names almost ready to copy and
-#. * paste here. In older Linux systems due to a bug the result is
-#. * incorrect in some languages. Note that in most of the languages
-#. * (western European, non-European) there is no difference between the
-#. * standalone and complete date form.
-#.
-#: glib/gdatetime.c:456
-msgctxt "full month name with day"
-msgid "January"
-msgstr "Urtarrila"
-
-#: glib/gdatetime.c:458
-msgctxt "full month name with day"
-msgid "February"
-msgstr "Otsaila"
-
-#: glib/gdatetime.c:460
-msgctxt "full month name with day"
-msgid "March"
-msgstr "Martxoa"
-
-#: glib/gdatetime.c:462
-msgctxt "full month name with day"
-msgid "April"
-msgstr "Apirila"
-
-#: glib/gdatetime.c:464
-msgctxt "full month name with day"
-msgid "May"
-msgstr "Maiatza"
-
-#: glib/gdatetime.c:466
-msgctxt "full month name with day"
-msgid "June"
-msgstr "Ekaina"
-
-#: glib/gdatetime.c:468
-msgctxt "full month name with day"
-msgid "July"
-msgstr "Uztaila"
-
-#: glib/gdatetime.c:470
-msgctxt "full month name with day"
-msgid "August"
-msgstr "Abuztua"
-
-#: glib/gdatetime.c:472
-msgctxt "full month name with day"
-msgid "September"
-msgstr "Iraila"
-
-#: glib/gdatetime.c:474
-msgctxt "full month name with day"
-msgid "October"
-msgstr "Urria"
-
-#: glib/gdatetime.c:476
-msgctxt "full month name with day"
-msgid "November"
-msgstr "Azaroa"
-
-#: glib/gdatetime.c:478
-msgctxt "full month name with day"
-msgid "December"
-msgstr "Abendua"
-
-#. Translators: Some languages need different grammatical forms of
-#. * month names depending on whether they are standalone or in a full
-#. * date context, with the day number. Some may prefer starting with
-#. * uppercase when they are standalone and with lowercase when they are
-#. * in a full date context. Here are abbreviated month names in a form
-#. * appropriate when they are used in a full date context, with the
-#. * day number. However, as these names are abbreviated the grammatical
-#. * difference is visible probably only in Belarusian and Russian.
-#. * In other languages there is no difference between the standalone
-#. * and complete date form when they are abbreviated. If your system
-#. * is Linux with the glibc version 2.27 (released Feb 1, 2018) or newer
-#. * then you can refer to the date command line utility and see what the
-#. * command `date +%b' produces. Also in the latest Linux the command
-#. * `locale abmon' in your native locale produces a complete list of
-#. * month names almost ready to copy and paste here. In other systems
-#. * due to a bug the result is incorrect in some languages.
-#.
-#: glib/gdatetime.c:543
-msgctxt "abbreviated month name with day"
-msgid "Jan"
-msgstr "Urt."
-
-#: glib/gdatetime.c:545
-msgctxt "abbreviated month name with day"
-msgid "Feb"
-msgstr "Ots."
-
-#: glib/gdatetime.c:547
-msgctxt "abbreviated month name with day"
-msgid "Mar"
-msgstr "Mar."
-
-#: glib/gdatetime.c:549
-msgctxt "abbreviated month name with day"
-msgid "Apr"
-msgstr "Apr."
-
-#: glib/gdatetime.c:551
-msgctxt "abbreviated month name with day"
-msgid "May"
-msgstr "Maiatza"
-
-#: glib/gdatetime.c:553
-msgctxt "abbreviated month name with day"
-msgid "Jun"
-msgstr "Eka."
-
-#: glib/gdatetime.c:555
-msgctxt "abbreviated month name with day"
-msgid "Jul"
-msgstr "Uzt."
-
-#: glib/gdatetime.c:557
-msgctxt "abbreviated month name with day"
-msgid "Aug"
-msgstr "Abu."
-
-#: glib/gdatetime.c:559
-msgctxt "abbreviated month name with day"
-msgid "Sep"
-msgstr "Ira."
-
-#: glib/gdatetime.c:561
-msgctxt "abbreviated month name with day"
-msgid "Oct"
-msgstr "Urr."
-
-#: glib/gdatetime.c:563
-msgctxt "abbreviated month name with day"
-msgid "Nov"
-msgstr "Aza."
-
-#: glib/gdatetime.c:565
-msgctxt "abbreviated month name with day"
-msgid "Dec"
-msgstr "Abe."
-
#. Translators: 'before midday' indicator
-#: glib/gdatetime.c:582
+#: ../glib/gdatetime.c:354
msgctxt "GDateTime"
msgid "AM"
msgstr "AM"
#. Translators: 'after midday' indicator
-#: glib/gdatetime.c:585
+#: ../glib/gdatetime.c:357
msgctxt "GDateTime"
msgid "PM"
msgstr "PM"
-#: glib/gdir.c:154
+#: ../glib/gdir.c:155
#, c-format
msgid "Error opening directory “%s”: %s"
-msgstr "Errorea “%s“ direktorioa irekitzean: %s"
+msgstr "Errorea “%s“ direktorioa irekitzean: %s "
-#: glib/gfileutils.c:716 glib/gfileutils.c:808
+#: ../glib/gfileutils.c:706 ../glib/gfileutils.c:798
#, 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] "Ezin izan da byte %lu esleitu “%s“ fitxategia irakurtzeko"
msgstr[1] "Ezin izan dira %lu byte esleitu “%s“ fitxategia irakurtzeko"
-#: glib/gfileutils.c:733
+#: ../glib/gfileutils.c:723
#, c-format
msgid "Error reading file “%s”: %s"
msgstr "Errorea “%s“ fitxategia irakurtzean: %s"
-#: glib/gfileutils.c:769
+#: ../glib/gfileutils.c:759
#, c-format
msgid "File “%s” is too large"
msgstr "“%s“ fitxategia handiegia da"
-#: glib/gfileutils.c:833
+#: ../glib/gfileutils.c:823
#, c-format
msgid "Failed to read from file “%s”: %s"
msgstr "Ezin izan da “%s“ fitxategitik irakurri: %s"
-#: glib/gfileutils.c:881 glib/gfileutils.c:953
+#: ../glib/gfileutils.c:871 ../glib/gfileutils.c:943
#, c-format
msgid "Failed to open file “%s”: %s"
-msgstr "Ezin izan da “%s“ fitxategia ireki: %s"
+msgstr "Ezin izan da “%s“ fitxategia ireki: %s "
-#: glib/gfileutils.c:893
+#: ../glib/gfileutils.c:883
#, c-format
msgid "Failed to get attributes of file “%s”: fstat() failed: %s"
-msgstr "Ezin izan dira “%s“ fitxategiko atributuak lortu, fstat() funtzioak huts egin du: %s"
+msgstr ""
+"Ezin izan dira “%s“ fitxategiko atributuak lortu, fstat() funtzioak huts "
+"egin du: %s"
-#: glib/gfileutils.c:923
+#: ../glib/gfileutils.c:913
#, c-format
msgid "Failed to open file “%s”: fdopen() failed: %s"
-msgstr "Ezin izan da “%s“ fitxategia ireki, fdopen() funtzioak huts egin du: %s"
+msgstr ""
+"Ezin izan da “%s“ fitxategia ireki, fdopen() funtzioak huts egin du: %s"
-#: glib/gfileutils.c:1022
+#: ../glib/gfileutils.c:1012
#, c-format
msgid "Failed to rename file “%s” to “%s”: g_rename() failed: %s"
-msgstr "Ezin izan da “%s“ fitxategia “%s“ gisa berrizendatu, g_rename() funtzioak huts egin du: %s"
+msgstr ""
+"Ezin izan da “%s“ fitxategia “%s“ gisa berrizendatu, g_rename() funtzioak "
+"huts egin du: %s"
-#: glib/gfileutils.c:1057 glib/gfileutils.c:1575
+#: ../glib/gfileutils.c:1047 ../glib/gfileutils.c:1554
#, c-format
msgid "Failed to create file “%s”: %s"
msgstr "Ezin izan da “%s“ fitxategia sortu: %s"
-#: glib/gfileutils.c:1084
+#: ../glib/gfileutils.c:1074
#, c-format
msgid "Failed to write file “%s”: write() failed: %s"
-msgstr "Huts egin du “%s“ fitxategian idaztean: fwrite() funtzioak huts egin du: %s"
+msgstr ""
+"Huts egin du “%s“ fitxategian idaztean: fwrite() funtzioak huts egin du: %s"
-#: glib/gfileutils.c:1127
+#: ../glib/gfileutils.c:1117
#, c-format
msgid "Failed to write file “%s”: fsync() failed: %s"
-msgstr "Huts egin du “%s“ fitxategia idaztean: fsync() funtzioak huts egin du: %s"
+msgstr ""
+"Huts egin du “%s“ fitxategia idaztean: fsync() funtzioak huts egin du: %s"
-#: glib/gfileutils.c:1262
+#: ../glib/gfileutils.c:1241
#, c-format
msgid "Existing file “%s” could not be removed: g_unlink() failed: %s"
-msgstr "“%s“ fitxategia ezin izan da kendu, g_unlik() funtzioak huts egin du: %s"
+msgstr ""
+"“%s“ fitxategia ezin izan da kendu, g_unlik() funtzioak huts egin du: %s"
-#: glib/gfileutils.c:1541
+#: ../glib/gfileutils.c:1520
#, c-format
msgid "Template “%s” invalid, should not contain a “%s”"
msgstr "“%s“ txantiloia baliogabea da, ez luke “%s“ eduki behar"
-#: glib/gfileutils.c:1554
+#: ../glib/gfileutils.c:1533
#, c-format
msgid "Template “%s” doesn’t contain XXXXXX"
msgstr "“%s“ txantiloiak ez dauka: XXXXXX"
-#: glib/gfileutils.c:2116
+#: ../glib/gfileutils.c:2058
#, c-format
msgid "Failed to read the symbolic link “%s”: %s"
msgstr "Ezin izan da “%s“ esteka sinbolikorik irakurri: %s"
-#: glib/giochannel.c:1389
+#: ../glib/giochannel.c:1388
#, c-format
msgid "Could not open converter from “%s” to “%s”: %s"
msgstr "Ezin izan da “%s“(e)tik “%s“(e)rako bihurtzailea ireki: %s"
-#: glib/giochannel.c:1734
+#: ../glib/giochannel.c:1733
msgid "Can’t do a raw read in g_io_channel_read_line_string"
msgstr "Ezin dira datu gordinak irakurri “g_io_channel_read_line_string“-en"
-#: glib/giochannel.c:1781 glib/giochannel.c:2039 glib/giochannel.c:2126
+#: ../glib/giochannel.c:1780 ../glib/giochannel.c:2038
+#: ../glib/giochannel.c:2125
msgid "Leftover unconverted data in read buffer"
msgstr "Irakurketa-bufferrean geratu diren bihurtu gabeko datuak"
-#: glib/giochannel.c:1862 glib/giochannel.c:1939
+#: ../glib/giochannel.c:1861 ../glib/giochannel.c:1938
msgid "Channel terminates in a partial character"
msgstr "Kanala karaktere partzial batean bukatzen da"
-#: glib/giochannel.c:1925
+#: ../glib/giochannel.c:1924
msgid "Can’t do a raw read in g_io_channel_read_to_end"
msgstr "Ezin dira datu gordinak irakurri “g_io_channel_read_to_end“-etik"
-#: glib/gkeyfile.c:789
+#: ../glib/gkeyfile.c:736
msgid "Valid key file could not be found in search dirs"
msgstr "Ezin izan da baliozko gakoa datuen direktorioan aurkitu"
-#: glib/gkeyfile.c:826
+#: ../glib/gkeyfile.c:773
msgid "Not a regular file"
msgstr "Ez da fitxategi arrunta"
-#: glib/gkeyfile.c:1275
+#: ../glib/gkeyfile.c:1218
#, c-format
msgid ""
"Key file contains line “%s” which is not a key-value pair, group, or comment"
-msgstr "Gako-fitxategiak “%s“ lerroa du, gako-balioa bikotea, taldea edo iruzkinik ez daukalarik"
+msgstr ""
+"Gako-fitxategiak “%s“ lerroa du, gako-balioa bikotea, taldea edo iruzkinik "
+"ez daukalarik"
#
-#: glib/gkeyfile.c:1332
+#: ../glib/gkeyfile.c:1275
#, c-format
msgid "Invalid group name: %s"
msgstr "Taldearen izen baliogabea: %s"
-#: glib/gkeyfile.c:1354
+#: ../glib/gkeyfile.c:1297
msgid "Key file does not start with a group"
msgstr "Gako-fitxategiak ez da talde batekin hasten"
#
-#: glib/gkeyfile.c:1380
+#: ../glib/gkeyfile.c:1323
#, c-format
msgid "Invalid key name: %s"
msgstr "Gakoaren izen baliogabea: %s"
-#: glib/gkeyfile.c:1407
+#: ../glib/gkeyfile.c:1350
#, c-format
msgid "Key file contains unsupported encoding “%s”"
msgstr "Gako-fitxategiak onartzen ez den “%s“ kodeketa du"
-#: glib/gkeyfile.c:1650 glib/gkeyfile.c:1823 glib/gkeyfile.c:3276
-#: glib/gkeyfile.c:3339 glib/gkeyfile.c:3469 glib/gkeyfile.c:3601
-#: glib/gkeyfile.c:3747 glib/gkeyfile.c:3976 glib/gkeyfile.c:4043
+#: ../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
#, c-format
msgid "Key file does not have group “%s”"
msgstr "Gako-fitxategiak ez dauka “%s“ taldea"
-#: glib/gkeyfile.c:1778
+#: ../glib/gkeyfile.c:1721
#, c-format
msgid "Key file does not have key “%s” in group “%s”"
msgstr "Gako-fitxategiak ez dauka “%s“ gakoa (“%s“ taldean)"
-#: glib/gkeyfile.c:1940 glib/gkeyfile.c:2056
+#: ../glib/gkeyfile.c:1883 ../glib/gkeyfile.c:1999
#, c-format
msgid "Key file contains key “%s” with value “%s” which is not UTF-8"
msgstr "Gako-fitxategiak “%s“ gakoa dauka (%s balioduna) baina ez da UTF-8"
-#: glib/gkeyfile.c:1960 glib/gkeyfile.c:2076 glib/gkeyfile.c:2518
+#: ../glib/gkeyfile.c:1903 ../glib/gkeyfile.c:2019 ../glib/gkeyfile.c:2388
#, c-format
msgid ""
"Key file contains key “%s” which has a value that cannot be interpreted."
-msgstr "Gako-fitxategiak “%s“ gakoa dauka, baina ezin den interpretatu balio bat dauka."
+msgstr ""
+"Gako-fitxategiak “%s“ gakoa dauka, baina ezin den interpretatu balio bat "
+"dauka."
-#: glib/gkeyfile.c:2736 glib/gkeyfile.c:3105
+#: ../glib/gkeyfile.c:2606 ../glib/gkeyfile.c:2975
#, c-format
msgid ""
"Key file contains key “%s” in group “%s” which has a value that cannot be "
"interpreted."
-msgstr "Gako-fitxategiak “%s“ gakoa dauka ('%s taldean), baina dagokion balioa ezin da interpretatu."
+msgstr ""
+"Gako-fitxategiak “%s“ gakoa dauka ('%s taldean), baina dagokion balioa ezin "
+"da interpretatu."
-#: glib/gkeyfile.c:2814 glib/gkeyfile.c:2891
+#: ../glib/gkeyfile.c:2684 ../glib/gkeyfile.c:2761
#, c-format
msgid "Key “%s” in group “%s” has value “%s” where %s was expected"
msgstr "“%2$s“ taldeko “%1$s“ gakoaren balioa “%3$s“ da, “%4$s“ izan ordez."
-#: glib/gkeyfile.c:4283
+#: ../glib/gkeyfile.c:4149
msgid "Key file contains escape character at end of line"
msgstr "Gako-fitxategiak ihes-karakterea dauka lerro amaieran"
-#: glib/gkeyfile.c:4305
+#: ../glib/gkeyfile.c:4171
#, c-format
msgid "Key file contains invalid escape sequence “%s”"
msgstr "Gako-fitxategiak “%s“ ihes-sekuentzia baliogabea dauka"
-#: glib/gkeyfile.c:4449
+#: ../glib/gkeyfile.c:4315
#, c-format
msgid "Value “%s” cannot be interpreted as a number."
msgstr "“%s“ balioa ezin da zenbaki gisa interpretatu"
-#: glib/gkeyfile.c:4463
+#: ../glib/gkeyfile.c:4329
#, c-format
msgid "Integer value “%s” out of range"
msgstr "“%s“ osoko balioa barrutitik kanpo"
-#: glib/gkeyfile.c:4496
+#: ../glib/gkeyfile.c:4362
#, c-format
msgid "Value “%s” cannot be interpreted as a float number."
msgstr "“%s“ balioa ezin da zenbaki mugikor gisa interpretatu."
-#: glib/gkeyfile.c:4535
+#: ../glib/gkeyfile.c:4401
#, c-format
msgid "Value “%s” cannot be interpreted as a boolean."
msgstr "“%s“ balioa ezin da boolear gisa interpretatu"
-#: glib/gmappedfile.c:129
+#: ../glib/gmappedfile.c:129
#, c-format
msgid "Failed to get attributes of file “%s%s%s%s”: fstat() failed: %s"
-msgstr "Huts egin du “%s%s%s%s“ fitxategiaren atributuak lortzean. fstat() funtzioak huts egin du: %s"
+msgstr ""
+"Huts egin du “%s%s%s%s“ fitxategiaren atributuak lortzean. fstat() funtzioak "
+"huts egin du: %s"
-#: glib/gmappedfile.c:195
+#: ../glib/gmappedfile.c:195
#, c-format
msgid "Failed to map %s%s%s%s: mmap() failed: %s"
msgstr "Huts egin %s%s%s%s mapatzean. mmap() funtzioak huts egin du: %s"
-#: glib/gmappedfile.c:262
+#: ../glib/gmappedfile.c:262
#, c-format
msgid "Failed to open file “%s”: open() failed: %s"
msgstr "Ezin izan da “%s“ fitxategia ireki, open() funtzioak huts egin du: %s"
-#: glib/gmarkup.c:398 glib/gmarkup.c:440
+#: ../glib/gmarkup.c:397 ../glib/gmarkup.c:439
#, c-format
msgid "Error on line %d char %d: "
msgstr "Errorea %d lerroko %d karakterean: "
-#: glib/gmarkup.c:462 glib/gmarkup.c:545
+#: ../glib/gmarkup.c:461 ../glib/gmarkup.c:544
#, c-format
-msgid "Invalid UTF-8 encoded text in name — not valid “%s”"
-msgstr "UTF-8 gisa kodetutako testu baliogabea izenean - “%s” ez da baliozkoa"
+msgid "Invalid UTF-8 encoded text in name - not valid '%s'"
+msgstr "UTF-8 gisa kodetutako testu baliogabea izenean - '%s' ez da baliozkoa"
-#: glib/gmarkup.c:473
+#: ../glib/gmarkup.c:472
#, c-format
-msgid "“%s” is not a valid name"
-msgstr "“%s” ez da baliozko izena"
+msgid "'%s' is not a valid name"
+msgstr "'%s' ez da baliozko izena "
-#: glib/gmarkup.c:489
+#: ../glib/gmarkup.c:488
#, c-format
-msgid "“%s” is not a valid name: “%c”"
-msgstr "“%s” ez da baliozko izena: “%c”"
+msgid "'%s' is not a valid name: '%c'"
+msgstr "'%s' ez da baliozko izena: '%c' "
-#: glib/gmarkup.c:613
+#: ../glib/gmarkup.c:598
#, c-format
msgid "Error on line %d: %s"
msgstr "Errorea %d lerroan: %s"
-#: glib/gmarkup.c:690
+#: ../glib/gmarkup.c:675
#, c-format
msgid ""
-"Failed to parse “%-.*s”, which should have been a digit inside a character "
-"reference (&#234; for example) — perhaps the digit is too large"
-msgstr "Ezin izan da “%-.*s” analizatu, digitu bat izan behar zuen karaktere-erreferentzia baten barruan (&#234; adibidez); agian digitua handiegia da"
+"Failed to parse '%-.*s', which should have been a digit inside a character "
+"reference (&#234; for example) - perhaps the digit is too large"
+msgstr ""
+"Ezin izan da '%-.*s' analizatu, digitu bat izan behar zuen karaktere-"
+"erreferentzia baten barruan (&#234; adibidez); agian digitua handiegia da"
-#: glib/gmarkup.c:702
+#: ../glib/gmarkup.c:687
msgid ""
"Character reference did not end with a semicolon; most likely you used an "
-"ampersand character without intending to start an entity — escape ampersand "
+"ampersand character without intending to start an entity - escape ampersand "
"as &amp;"
-msgstr "Karaktere-erreferentzia ez da puntu eta komaz bukatzen; ziurrenik & ikurra erabiliko zenuen entitatea hasteko asmorik gabe. Izendatu & karakterea &amp; gisa"
+msgstr ""
+"Karaktere-erreferentzia ez da puntu eta komaz bukatzen; ziurrenik & ikurra "
+"erabiliko zenuen entitatea hasteko asmorik gabe. Izendatu & karakterea &amp; "
+"gisa;"
-#: glib/gmarkup.c:728
+#: ../glib/gmarkup.c:713
#, c-format
-msgid "Character reference “%-.*s” does not encode a permitted character"
-msgstr "“%-.*s” karaktere-erreferentziak ez du baimendutako karaktere bat kodetzen"
+msgid "Character reference '%-.*s' does not encode a permitted character"
+msgstr ""
+"'%-.*s' karaktere-erreferentziak ez du baimendutako karaktere bat kodetzen"
-#: glib/gmarkup.c:766
+#: ../glib/gmarkup.c:751
msgid ""
-"Empty entity “&;” seen; valid entities are: &amp; &quot; &lt; &gt; &apos;"
-msgstr "“&;” entitatea hutsik dago; baliozko entitateak hauek dira: &amp; &quot; &lt; &gt; &apos;"
+"Empty entity '&;' seen; valid entities are: &amp; &quot; &lt; &gt; &apos;"
+msgstr ""
+"'&;' entitatea hutsik dago; baliozko entitateak hauek dira: &amp; &quot; "
+"&lt; &gt; &apos;"
-#: glib/gmarkup.c:774
+#: ../glib/gmarkup.c:759
#, c-format
-msgid "Entity name “%-.*s” is not known"
-msgstr "“%-.*s” entitate-izena ezezaguna da"
+msgid "Entity name '%-.*s' is not known"
+msgstr "'%-.*s' entitate-izena ezezaguna da"
-#: glib/gmarkup.c:779
+#: ../glib/gmarkup.c:764
msgid ""
"Entity did not end with a semicolon; most likely you used an ampersand "
-"character without intending to start an entity — escape ampersand as &amp;"
-msgstr "Entitatea ez da puntu eta komaz bukatzen; normalean & ikurra erabiltzen da entitatea hasteko asmorik gabe; izendatu & karakterea &amp; gisa"
+"character without intending to start an entity - escape ampersand as &amp;"
+msgstr ""
+"Entitatea ez da puntu eta komaz bukatzen; normalean & ikurra erabiltzen da "
+"entitatea hasteko asmorik gabe; izendatu & karakterea &amp; gisa;"
-#: glib/gmarkup.c:1187
+#: ../glib/gmarkup.c:1170
msgid "Document must begin with an element (e.g. <book>)"
msgstr "Dokumentuak elementu batez hasi behar du (adibidez, <book>)"
-#: glib/gmarkup.c:1227
+#: ../glib/gmarkup.c:1210
#, c-format
msgid ""
-"“%s” is not a valid character following a “<” character; it may not begin an "
+"'%s' is not a valid character following a '<' character; it may not begin an "
"element name"
-msgstr "“%s” ez da baliozko karakterea '<' karakterearen atzetik; baliteke elementu baten izena ez hastea"
+msgstr ""
+"'%s' ez da karaktere balioduna '<' karakterearen atzetik; baliteke elementu "
+"baten izena ez hastea"
-#: glib/gmarkup.c:1270
+#: ../glib/gmarkup.c:1252
#, c-format
msgid ""
-"Odd character “%s”, expected a “>” character to end the empty-element tag "
-"“%s”"
-msgstr "“%s” karaktere bitxia, '>' karakterea espero zen “%s” elementuaren etiketa hutsa amaitzeko"
+"Odd character '%s', expected a '>' character to end the empty-element tag "
+"'%s'"
+msgstr ""
+"'%s' karaktere bitxia, '>' karakterea espero zen '%s' elementuaren etiketa "
+"hutsa amaitzeko"
-#: glib/gmarkup.c:1352
+#: ../glib/gmarkup.c:1333
#, c-format
msgid ""
-"Odd character “%s”, expected a “=” after attribute name “%s” of element “%s”"
-msgstr "“%s” karaktere bitxia, '=' espero zen “%s” atributuaren ondoren “%s” elementuan"
+"Odd character '%s', expected a '=' after attribute name '%s' of element '%s'"
+msgstr ""
+"'%s' karaktere bitxia, '=' espero zen '$2%s' elementuaren '$1%s' "
+"atributuaren ondoren"
-#: glib/gmarkup.c:1394
+#: ../glib/gmarkup.c:1374
#, c-format
msgid ""
-"Odd character “%s”, expected a “>” or “/” character to end the start tag of "
-"element “%s”, or optionally an attribute; perhaps you used an invalid "
+"Odd character '%s', expected a '>' or '/' character to end the start tag of "
+"element '%s', or optionally an attribute; perhaps you used an invalid "
"character in an attribute name"
-msgstr "“%s” atributuaren ondoren karaktere bitxia, “>“ edo “/“ karakterea espero zen “%s” atributuaren ondoren elementuaren hasiera-etiketa bukatzeko, edo bestela atributu bat. Agian karaktere baliogabea erabili duzu atributu-izen batean"
+msgstr ""
+"'%s' karaktere bitxia, '>' edo '/' karakterea espero zen '%s' elementuaren "
+"hasiera-etiketa bukatzeko, edo bestela atributu bat. Agian karaktere "
+"baliogabea erabili duzu atributu-izen batean"
-#: glib/gmarkup.c:1439
+#: ../glib/gmarkup.c:1418
#, c-format
msgid ""
-"Odd character “%s”, expected an open quote mark after the equals sign when "
-"giving value for attribute “%s” of element “%s”"
-msgstr "“%s“ karaktere bitxia, komatxo irekia espero zen berdin ikurraren ondoren “%s“ atributuari balioa ematean “%s“ elementuan"
+"Odd character '%s', expected an open quote mark after the equals sign when "
+"giving value for attribute '%s' of element '%s'"
+msgstr ""
+"'%s' karaktere bitxia, komatxo irekia espero zen berdin ikurraren ondoren "
+"'$2%s' elementuaren '$1%s' atributuari balioa ematean"
-#: glib/gmarkup.c:1573
+#: ../glib/gmarkup.c:1551
#, c-format
msgid ""
-"“%s” is not a valid character following the characters “</”; “%s” may not "
+"'%s' is not a valid character following the characters '</'; '%s' may not "
"begin an element name"
-msgstr "“%s“ ez da karaktere balioduna “</“; karaktereen atzetik; baliteke “%s“ atributuak elementu baten izena ez hastea"
+msgstr ""
+"'%s' ez da karaktere balioduna '</'; karaktereen atzetik; baliteke '%s'e(k) "
+"elementu baten izena ez hastea"
-#: glib/gmarkup.c:1611
+#: ../glib/gmarkup.c:1587
#, c-format
msgid ""
-"“%s” is not a valid character following the close element name “%s”; the "
-"allowed character is “>”"
-msgstr "“%s“ ez da baliozko karakterea da “%s“ itxiera-elementuaren izenaren atzetik; baimendutako karakterea “>“ da"
+"'%s' is not a valid character following the close element name '%s'; the "
+"allowed character is '>'"
+msgstr ""
+"'%s' karaktere baliogabea da '%s' itxiera-elementuaren izenaren atzetik; "
+"baimendutako karakterea '>' da"
-#: glib/gmarkup.c:1623
+#: ../glib/gmarkup.c:1598
#, c-format
-msgid "Element “%s” was closed, no element is currently open"
-msgstr "“%s“ elementua itxi egin da, unean ez dago elementurik irekita"
+msgid "Element '%s' was closed, no element is currently open"
+msgstr "'%s' elementua itxi egin da, unean ez dago elementurik irekita"
-#: glib/gmarkup.c:1632
+#: ../glib/gmarkup.c:1607
#, c-format
-msgid "Element “%s” was closed, but the currently open element is “%s”"
-msgstr "“%s“ elementua itxi egin da, baina unean “%s“ elementua dago irekita"
+msgid "Element '%s' was closed, but the currently open element is '%s'"
+msgstr "'%s' elementua itxi egin da, baina unean '%s' elementua dago irekita"
-#: glib/gmarkup.c:1785
+#: ../glib/gmarkup.c:1760
msgid "Document was empty or contained only whitespace"
msgstr "Dokumentua hutsik dago edo zuriuneak bakarrik ditu"
-#: glib/gmarkup.c:1799
-msgid "Document ended unexpectedly just after an open angle bracket “<”"
-msgstr "Dokumentua ustekabean itxi da “<“ angelu-parentesi ireki baten ondoren"
+#: ../glib/gmarkup.c:1774
+msgid "Document ended unexpectedly just after an open angle bracket '<'"
+msgstr "Dokumentua ustekabean itxi da angelu-parentesi ireki baten ondoren '<'"
-#: glib/gmarkup.c:1807 glib/gmarkup.c:1852
+#: ../glib/gmarkup.c:1782 ../glib/gmarkup.c:1827
#, c-format
msgid ""
-"Document ended unexpectedly with elements still open — “%s” was the last "
+"Document ended unexpectedly with elements still open - '%s' was the last "
"element opened"
-msgstr "Dokumentua ustekabean amaitu da oraindik irekita zeuden elementuekin. “%s“ irekitako azken elementua da"
+msgstr ""
+"Dokumentua ustekabean amaitu da oraindik irekita zeuden elementuekin. '%s' "
+"irekitako azken elementua da"
-#: glib/gmarkup.c:1815
+#: ../glib/gmarkup.c:1790
#, c-format
msgid ""
"Document ended unexpectedly, expected to see a close angle bracket ending "
"the tag <%s/>"
-msgstr "Dokumentua ustekabean amaitu da, angelu-parentesi itxia ikustea espero zen <%s/> etiketa amaitzen"
+msgstr ""
+"Dokumentua ustekabean amaitu da, angelu-parentesi itxia ikustea espero nuen <"
+"%s/> etiketa amaitzen"
-#: glib/gmarkup.c:1821
+#: ../glib/gmarkup.c:1796
msgid "Document ended unexpectedly inside an element name"
msgstr "Dokumentua ustekabean amaitu da elementu-izen baten barruan"
-#: glib/gmarkup.c:1827
+#: ../glib/gmarkup.c:1802
msgid "Document ended unexpectedly inside an attribute name"
msgstr "Dokumentua ustekabean amaitu da atributu-izen baten barruan"
-#: glib/gmarkup.c:1832
+#: ../glib/gmarkup.c:1807
msgid "Document ended unexpectedly inside an element-opening tag."
-msgstr "Dokumentua ustekabean amaitu da elementua irekitzeko etiketa baten barruan."
+msgstr ""
+"Dokumentua ustekabean amaitu da elementua irekitzeko etiketa baten barruan."
-#: glib/gmarkup.c:1838
+#: ../glib/gmarkup.c:1813
msgid ""
"Document ended unexpectedly after the equals sign following an attribute "
"name; no attribute value"
-msgstr "Dokumentua ustekabean amaitu da atributu-izen baten ondorengo berdin ikurraren atzetik; ez dago atributu-baliorik"
+msgstr ""
+"Dokumentua ustekabean amaitu da atributu-izen baten ondorengo berdin "
+"ikurraren atzetik; ez dago atributu-baliorik"
-#: glib/gmarkup.c:1845
+#: ../glib/gmarkup.c:1820
msgid "Document ended unexpectedly while inside an attribute value"
msgstr "Dokumentua ustekabean amaitu da atributu-balio baten barruan"
-#: glib/gmarkup.c:1862
+#: ../glib/gmarkup.c:1836
#, c-format
-msgid "Document ended unexpectedly inside the close tag for element “%s”"
-msgstr "Dokumentua ustekabean amaitu da “%s“ elementuaren itxiera-etiketaren barruan"
+msgid "Document ended unexpectedly inside the close tag for element '%s'"
+msgstr ""
+"Dokumentua ustekabean amaitu da '%s' elementuaren itxiera-etiketaren barruan"
-#: glib/gmarkup.c:1866
-msgid ""
-"Document ended unexpectedly inside the close tag for an unopened element"
-msgstr "Dokumentua ustekabean amaitu da ireki gabeko elementu baten itxiera-etiketaren barruan"
-
-#: glib/gmarkup.c:1872
+#: ../glib/gmarkup.c:1842
msgid "Document ended unexpectedly inside a comment or processing instruction"
-msgstr "Dokumentua ustekabean amaitu da iruzkin baten barruan edo prozesatzen ari zen instrukzio baten barruan"
+msgstr ""
+"Dokumentua ustekabean amaitu da iruzkin baten barruan edo prozesatzen ari "
+"zen instrukzio baten barruan"
-#: glib/goption.c:861
+#: ../glib/goption.c:861
msgid "[OPTION…]"
msgstr "[AUKERA…]"
-#: glib/goption.c:977
+#: ../glib/goption.c:977
msgid "Help Options:"
msgstr "Laguntzako aukerak:"
-#: glib/goption.c:978
+#: ../glib/goption.c:978
msgid "Show help options"
msgstr "Erakutsi laguntzako aukerak"
-#: glib/goption.c:984
+#: ../glib/goption.c:984
msgid "Show all help options"
msgstr "Erakutsi laguntzako aukera guztiak"
-#: glib/goption.c:1047
+#: ../glib/goption.c:1047
msgid "Application Options:"
msgstr "Aplikazio-aukerak:"
-#: glib/goption.c:1049
+#: ../glib/goption.c:1049
msgid "Options:"
msgstr "Aukerak:"
-#: glib/goption.c:1113 glib/goption.c:1183
+#: ../glib/goption.c:1113 ../glib/goption.c:1183
#, c-format
msgid "Cannot parse integer value “%s” for %s"
msgstr "Ezin da “%2$s“(r)en “%1$s“ osoko balioa analizatu"
-#: glib/goption.c:1123 glib/goption.c:1191
+#: ../glib/goption.c:1123 ../glib/goption.c:1191
#, c-format
msgid "Integer value “%s” for %s out of range"
msgstr "%2$s(r)en “%1$s“ osoko balioa barrutitik kanpo"
-#: glib/goption.c:1148
+#: ../glib/goption.c:1148
#, c-format
msgid "Cannot parse double value “%s” for %s"
msgstr "Ezin da “%2$s“(r)en “%1$s“ balio bikoitza analizatu"
-#: glib/goption.c:1156
+#: ../glib/goption.c:1156
#, c-format
msgid "Double value “%s” for %s out of range"
msgstr "%2$s(r)en “%1$s“ balio bikoitza barrutitik kanpo"
-#: glib/goption.c:1448 glib/goption.c:1527
+#: ../glib/goption.c:1448 ../glib/goption.c:1527
#, c-format
msgid "Error parsing option %s"
msgstr "Errorea %s aukera analizatzean"
-#: glib/goption.c:1558 glib/goption.c:1671
+#: ../glib/goption.c:1558 ../glib/goption.c:1671
#, c-format
msgid "Missing argument for %s"
msgstr "%s(e)ko argumentua falta da"
-#: glib/goption.c:2132
+#: ../glib/goption.c:2132
#, c-format
msgid "Unknown option %s"
msgstr "%s aukera ezezaguna"
-#: glib/gregex.c:257
+#: ../glib/gregex.c:257
msgid "corrupted object"
msgstr "hondatutako objektua"
-#: glib/gregex.c:259
+#: ../glib/gregex.c:259
msgid "internal error or corrupted object"
msgstr "barneko errorea edo hondatutako objektua"
-#: glib/gregex.c:261
+#: ../glib/gregex.c:261
msgid "out of memory"
msgstr "Memoriarik ez"
-#: glib/gregex.c:266
+#: ../glib/gregex.c:266
msgid "backtracking limit reached"
msgstr "atzera-jotzearen mugara gainditua"
-#: glib/gregex.c:278 glib/gregex.c:286
+#: ../glib/gregex.c:278 ../glib/gregex.c:286
msgid "the pattern contains items not supported for partial matching"
-msgstr "ereduak zenbait elementu ditu bat etortze partzialetan onartzen ez direnak"
+msgstr ""
+"ereduak zenbait elementu ditu bat etortze partzialetan onartzen ez direnak"
-#: glib/gregex.c:280
+#: ../glib/gregex.c:280
msgid "internal error"
msgstr "barneko errorea"
-#: glib/gregex.c:288
+#: ../glib/gregex.c:288
msgid "back references as conditions are not supported for partial matching"
-msgstr "aurreko erreferentziak baldintza gisa ez daude onartuta bat etortze partzialetan"
+msgstr ""
+"aurreko erreferentziak baldintza gisa ez daude onartuta bat etortze "
+"partzialetan"
-#: glib/gregex.c:297
+#: ../glib/gregex.c:297
msgid "recursion limit reached"
msgstr "errekurtsioaren muga gainditua"
-#: glib/gregex.c:299
+#: ../glib/gregex.c:299
msgid "invalid combination of newline flags"
msgstr "lerro-jauzien banderen baliogabeko konbinazioa"
-#: glib/gregex.c:301
+#: ../glib/gregex.c:301
msgid "bad offset"
msgstr "okerreko desplazamendua"
-#: glib/gregex.c:303
+#: ../glib/gregex.c:303
msgid "short utf8"
msgstr "utf8 laburra"
-#: glib/gregex.c:305
+#: ../glib/gregex.c:305
msgid "recursion loop"
msgstr "errekurtsioaren begizta"
-#: glib/gregex.c:309
+#: ../glib/gregex.c:309
msgid "unknown error"
msgstr "errore ezezaguna"
-#: glib/gregex.c:329
+#: ../glib/gregex.c:329
msgid "\\ at end of pattern"
msgstr "\\ ereduaren amaieran"
-#: glib/gregex.c:332
+#: ../glib/gregex.c:332
msgid "\\c at end of pattern"
msgstr "\\c ereduaren amaieran"
-#: glib/gregex.c:335
+#: ../glib/gregex.c:335
msgid "unrecognized character following \\"
msgstr "karaktere ezezagunak jarraitzen dio \\ karaktereari"
-#: glib/gregex.c:338
+#: ../glib/gregex.c:338
msgid "numbers out of order in {} quantifier"
msgstr "zenbakiak barrutitik kanpo {} kuantifikatzailean"
-#: glib/gregex.c:341
+#: ../glib/gregex.c:341
msgid "number too big in {} quantifier"
msgstr "zenbaki handiegiak {} kuantifikatzaileak"
-#: glib/gregex.c:344
+#: ../glib/gregex.c:344
msgid "missing terminating ] for character class"
msgstr "karaktere-klasearen amaierako ] falta da"
-#: glib/gregex.c:347
+#: ../glib/gregex.c:347
msgid "invalid escape sequence in character class"
msgstr "karaktere-klasean baliogabeko ihes sekuentzia"
-#: glib/gregex.c:350
+#: ../glib/gregex.c:350
msgid "range out of order in character class"
msgstr "karaktere-klaseko barrutia barrutitik kanpo"
-#: glib/gregex.c:353
+#: ../glib/gregex.c:353
msgid "nothing to repeat"
msgstr "ezer ez errepikatzeko"
-#: glib/gregex.c:357
+#: ../glib/gregex.c:357
msgid "unexpected repeat"
msgstr "ustekabeko begizta"
-#: glib/gregex.c:360
+#: ../glib/gregex.c:360
msgid "unrecognized character after (? or (?-"
msgstr "karaktere ezezaguna (? edo (?- karaktereen atzetik"
-#: glib/gregex.c:363
+#: ../glib/gregex.c:363
msgid "POSIX named classes are supported only within a class"
msgstr "POSIX izeneko klaseak soilik onartzen dira klase baten barruan"
-#: glib/gregex.c:366
+#: ../glib/gregex.c:366
msgid "missing terminating )"
msgstr "amaierako ) falta da"
-#: glib/gregex.c:369
+#: ../glib/gregex.c:369
msgid "reference to non-existent subpattern"
msgstr "existitzen ez den azpieredu baten erreferentzia"
-#: glib/gregex.c:372
+#: ../glib/gregex.c:372
msgid "missing ) after comment"
msgstr "iruzkinaren ondoren ) falta da"
-#: glib/gregex.c:375
+#: ../glib/gregex.c:375
msgid "regular expression is too large"
msgstr "adierazpen erregularra luzeegia da"
-#: glib/gregex.c:378
+#: ../glib/gregex.c:378
msgid "failed to get memory"
msgstr "huts egin du memoria lortzean"
-#: glib/gregex.c:382
+#: ../glib/gregex.c:382
msgid ") without opening ("
msgstr ") dago irekierako ( gabe"
-#: glib/gregex.c:386
+#: ../glib/gregex.c:386
msgid "code overflow"
msgstr "kodea gainezkatua"
-#: glib/gregex.c:390
+#: ../glib/gregex.c:390
msgid "unrecognized character after (?<"
msgstr "karaktere ezezaguna (?< karaktereen atzetik"
-#: glib/gregex.c:393
+#: ../glib/gregex.c:393
msgid "lookbehind assertion is not fixed length"
msgstr "'lookbehind' baieztapenak ez du luzera finkorik"
-#: glib/gregex.c:396
+#: ../glib/gregex.c:396
msgid "malformed number or name after (?("
msgstr "gaizki osatutako zenbakia edo izena (?(-ren atzetik"
-#: glib/gregex.c:399
+#: ../glib/gregex.c:399
msgid "conditional group contains more than two branches"
msgstr "baldintza taldeak bi adar baino gehiago ditu"
-#: glib/gregex.c:402
+#: ../glib/gregex.c:402
msgid "assertion expected after (?("
msgstr "baieztapena espero zen (?)-ren atzetik"
#. translators: '(?R' and '(?[+-]digits' are both meant as (groups of)
#. * sequences here, '(?-54' would be an example for the second group.
#.
-#: glib/gregex.c:409
+#: ../glib/gregex.c:409
msgid "(?R or (?[+-]digits must be followed by )"
msgstr "(?R edo (?[+-] digituak )-rekin jarraitu behar dira"
-#: glib/gregex.c:412
+#: ../glib/gregex.c:412
msgid "unknown POSIX class name"
msgstr "POSIX klasearen izen ezezaguna"
-#: glib/gregex.c:415
+#: ../glib/gregex.c:415
msgid "POSIX collating elements are not supported"
msgstr "Tartekatutako POSIX elementuak ez daude onartuta"
-#: glib/gregex.c:418
+#: ../glib/gregex.c:418
msgid "character value in \\x{...} sequence is too large"
msgstr "\\x{...} sekuentziako karaktere-balioa luzeegia da"
-#: glib/gregex.c:421
+#: ../glib/gregex.c:421
msgid "invalid condition (?(0)"
msgstr "baliogabeko (?(0) baldintza"
-#: glib/gregex.c:424
+#: ../glib/gregex.c:424
msgid "\\C not allowed in lookbehind assertion"
msgstr "\\C ez dago baimenduta 'lookbehind' baieztapenean"
-#: glib/gregex.c:431
+#: ../glib/gregex.c:431
msgid "escapes \\L, \\l, \\N{name}, \\U, and \\u are not supported"
msgstr "\\L, \\l, \\N{izena}, \\U, eta \\u ihes-karaktereak ez daude onartuta"
-#: glib/gregex.c:434
+#: ../glib/gregex.c:434
msgid "recursive call could loop indefinitely"
msgstr "dei errekurtsiboa amaierarik gabeko begiztan sar daiteke"
-#: glib/gregex.c:438
+#: ../glib/gregex.c:438
msgid "unrecognized character after (?P"
msgstr "karaktere ezezaguna (?P karaktereen atzetik"
-#: glib/gregex.c:441
+#: ../glib/gregex.c:441
msgid "missing terminator in subpattern name"
msgstr "amaierako karakterea falta da azpiereduko izenean"
-#: glib/gregex.c:444
+#: ../glib/gregex.c:444
msgid "two named subpatterns have the same name"
msgstr "bi azpiereduk izen berdina dute"
-#: glib/gregex.c:447
+#: ../glib/gregex.c:447
msgid "malformed \\P or \\p sequence"
msgstr "gaizki osatutako \\P edo \\p sekuentzia"
-#: glib/gregex.c:450
+#: ../glib/gregex.c:450
msgid "unknown property name after \\P or \\p"
msgstr "propietate-izen ezezaguna \\P edo \\p atzetik"
-#: glib/gregex.c:453
+#: ../glib/gregex.c:453
msgid "subpattern name is too long (maximum 32 characters)"
msgstr "azpiereduaren izena luzeegia (32 karaktere gehienez)"
-#: glib/gregex.c:456
+#: ../glib/gregex.c:456
msgid "too many named subpatterns (maximum 10,000)"
msgstr "izendun azpieredu gehiegi (10.000 gehienez)"
-#: glib/gregex.c:459
+#: ../glib/gregex.c:459
msgid "octal value is greater than \\377"
msgstr "balio zortzitarra \\377 baino handiagoa"
-#: glib/gregex.c:463
+#: ../glib/gregex.c:463
msgid "overran compiling workspace"
msgstr "konpilazioaren laneko area gainezkatua"
-#: glib/gregex.c:467
+#: ../glib/gregex.c:467
msgid "previously-checked referenced subpattern not found"
msgstr "ez da aurrez egiaztatutako erreferentziatutako azpieredua aurkitu"
-#: glib/gregex.c:470
+#: ../glib/gregex.c:470
msgid "DEFINE group contains more than one branch"
msgstr "DEFINE taldeak adar bat baino gehiago ditu"
-#: glib/gregex.c:473
+#: ../glib/gregex.c:473
msgid "inconsistent NEWLINE options"
msgstr "NEWLINE aukera kontraesankorra"
-#: glib/gregex.c:476
+#: ../glib/gregex.c:476
msgid ""
"\\g is not followed by a braced, angle-bracketed, or quoted name or number, "
"or by a plain number"
-msgstr "\\g ez da parentesi, kortxete edo aipu motako izena edo zenbaki, edo zenbaki soil batekin jarraitzen"
+msgstr ""
+"\\g ez da parentesi, kortxete edo aipu motako izena edo zenbaki, edo zenbaki "
+"soil batekin jarraitzen"
-#: glib/gregex.c:480
+#: ../glib/gregex.c:480
msgid "a numbered reference must not be zero"
msgstr "zenbatutako erreferentzia bat ezin du zero izan"
-#: glib/gregex.c:483
+#: ../glib/gregex.c:483
msgid "an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT)"
-msgstr "argumentu bat ez dago onartuta (*ACCEPT), (*FAIL), edo (*COMMIT)-entzako"
+msgstr ""
+"argumentu bat ez dago onartuta (*ACCEPT), (*FAIL), edo (*COMMIT)-entzako"
-#: glib/gregex.c:486
+#: ../glib/gregex.c:486
msgid "(*VERB) not recognized"
-msgstr "(*VERB) ez da ezagutzen"
+msgstr "(*VERB) ez da ezagutzen "
-#: glib/gregex.c:489
+#: ../glib/gregex.c:489
msgid "number is too big"
msgstr "zenbakia handiegia da"
-#: glib/gregex.c:492
+#: ../glib/gregex.c:492
msgid "missing subpattern name after (?&"
msgstr "azpiereduaren izena falta da (?& ondoren"
-#: glib/gregex.c:495
+#: ../glib/gregex.c:495
msgid "digit expected after (?+"
msgstr "digitua espero zen (?+ ondoren"
-#: glib/gregex.c:498
+#: ../glib/gregex.c:498
msgid "] is an invalid data character in JavaScript compatibility mode"
-msgstr "] datuen baliogabeko karaktere bat da JavaScript-en bateragarritasun moduan"
+msgstr ""
+"] datuen baliogabeko karaktere bat da JavaScript-en bateragarritasun moduan "
-#: glib/gregex.c:501
+#: ../glib/gregex.c:501
msgid "different names for subpatterns of the same number are not allowed"
msgstr "zenbaki berdinaren azpiereduen izen desberdinak ez daude onartuta"
-#: glib/gregex.c:504
+#: ../glib/gregex.c:504
msgid "(*MARK) must have an argument"
msgstr "(*MARK) argumentu bat eduki behar du"
-#: glib/gregex.c:507
+#: ../glib/gregex.c:507
msgid "\\c must be followed by an ASCII character"
msgstr "\\c ondoren ASCII karaktere bat behar da"
-#: glib/gregex.c:510
+#: ../glib/gregex.c:510
msgid "\\k is not followed by a braced, angle-bracketed, or quoted name"
-msgstr "\\k ondoren ez dago parentesi, kortxete edo aipatutako izen bat"
+msgstr "\\k ondoren ez dago parentesi, kortxete edo aipatutako izen bat "
-#: glib/gregex.c:513
+#: ../glib/gregex.c:513
msgid "\\N is not supported in a class"
msgstr "\\N ez dago klase batean onartuta"
-#: glib/gregex.c:516
+#: ../glib/gregex.c:516
msgid "too many forward references"
msgstr "aurreranzko erreferentzia gehiegi"
-#: glib/gregex.c:519
+#: ../glib/gregex.c:519
msgid "name is too long in (*MARK), (*PRUNE), (*SKIP), or (*THEN)"
msgstr "izena luzeegia da (*MARK), (*PRUNE), (*SKIP), edo (*THEN)-en"
-#: glib/gregex.c:522
+#: ../glib/gregex.c:522
msgid "character value in \\u.... sequence is too large"
msgstr "\\u sekuentziako karaktere-balioa luzeegia da"
-#: glib/gregex.c:745 glib/gregex.c:1983
+#: ../glib/gregex.c:745 ../glib/gregex.c:1977
#, c-format
msgid "Error while matching regular expression %s: %s"
msgstr "Errorea %s adierazpen erregularra bilatzean: %s"
-#: glib/gregex.c:1316
+#: ../glib/gregex.c:1316
msgid "PCRE library is compiled without UTF8 support"
msgstr "PCRE liburutegia UTF8 euskarri gabe konpilatua"
-#: glib/gregex.c:1320
+#: ../glib/gregex.c:1320
msgid "PCRE library is compiled without UTF8 properties support"
msgstr "PCRE liburutegia UTF8 propietateen euskarri gabe konpilatua"
-#: glib/gregex.c:1328
+#: ../glib/gregex.c:1328
msgid "PCRE library is compiled with incompatible options"
msgstr "PCRE liburutegia aukera bateragarririk gabe konpilatua"
-#: glib/gregex.c:1357
+#: ../glib/gregex.c:1357
#, c-format
msgid "Error while optimizing regular expression %s: %s"
msgstr "Errorea %s adierazpen erregularra optimizatzean: %s"
-#: glib/gregex.c:1437
+#: ../glib/gregex.c:1437
#, c-format
msgid "Error while compiling regular expression %s at char %d: %s"
msgstr "Errorea %s adierazpen erregularra %d karakterean konpilatzean: %s"
-#: glib/gregex.c:2419
+#: ../glib/gregex.c:2413
msgid "hexadecimal digit or “}” expected"
msgstr "digitu hamaseitarra edo “}“ espero zen"
-#: glib/gregex.c:2435
+#: ../glib/gregex.c:2429
msgid "hexadecimal digit expected"
msgstr "digitu hamaseitarra espero zen"
-#: glib/gregex.c:2475
+#: ../glib/gregex.c:2469
msgid "missing “<” in symbolic reference"
msgstr "“<“ falta da erreferentzia sinbolikoan"
-#: glib/gregex.c:2484
+#: ../glib/gregex.c:2478
msgid "unfinished symbolic reference"
msgstr "amaitu gabeko erreferentzia sinbolikoa"
-#: glib/gregex.c:2491
+#: ../glib/gregex.c:2485
msgid "zero-length symbolic reference"
msgstr "zero luzerako erreferentzia sinbolikoa"
-#: glib/gregex.c:2502
+#: ../glib/gregex.c:2496
msgid "digit expected"
msgstr "digitua espero zen"
-#: glib/gregex.c:2520
+#: ../glib/gregex.c:2514
msgid "illegal symbolic reference"
msgstr "erreferentzia sinboliko ilegala"
-#: glib/gregex.c:2583
+#: ../glib/gregex.c:2576
msgid "stray final “\\”"
msgstr "“\\“ katearen amaieran"
-#: glib/gregex.c:2587
+#: ../glib/gregex.c:2580
msgid "unknown escape sequence"
msgstr "ihes-sekuentzi ezezaguna"
-#: glib/gregex.c:2597
+#: ../glib/gregex.c:2590
#, c-format
msgid "Error while parsing replacement text “%s” at char %lu: %s"
msgstr "Errorea ordezko “%s“ testua analizatzean %lu karakterean: %s"
-#: glib/gshell.c:94
+#: ../glib/gshell.c:94
msgid "Quoted text doesn’t begin with a quotation mark"
msgstr "Komatxo arteko testua ez da komatxoekin hasten"
-#: glib/gshell.c:184
+#: ../glib/gshell.c:184
msgid "Unmatched quotation mark in command line or other shell-quoted text"
-msgstr "Bat ez datozen komatxoak daude komando-lerroan edo shell-ak aipatutako beste testu batean"
+msgstr ""
+"Bat ez datozen komatxoak daude komando-lerroan edo shell-ak aipatutako beste "
+"testu batean"
-#: glib/gshell.c:580
+#: ../glib/gshell.c:580
#, c-format
msgid "Text ended just after a “\\” character. (The text was “%s”)"
msgstr "Testua “\\“ karakterearen atzetik amaitu da (testua “%s“ zen)"
-#: glib/gshell.c:587
+#: ../glib/gshell.c:587
#, c-format
msgid "Text ended before matching quote was found for %c. (The text was “%s”)"
-msgstr "Testua %c(r)en komatxoak aurkitu baino lehen amaitu da (testua “%s“ zen)"
+msgstr ""
+"Testua %c(r)en komatxoak aurkitu baino lehen amaitu da (testua “%s“ zen)"
-#: glib/gshell.c:599
+#: ../glib/gshell.c:599
msgid "Text was empty (or contained only whitespace)"
msgstr "Testua hutsik dago (edo zuriuneak bakarrik ditu)"
-#: glib/gspawn.c:315
+#: ../glib/gspawn.c:250
#, c-format
msgid "Failed to read data from child process (%s)"
msgstr "Ezin izan da daturik irakurri prozesu umetik (%s)"
-#: glib/gspawn.c:463
+#: ../glib/gspawn.c:394
#, c-format
msgid "Unexpected error in select() reading data from a child process (%s)"
msgstr "Ustekabeko errorea select()-en, datuak prozesu umetik irakurtzen (%s)"
-#: glib/gspawn.c:548
+#: ../glib/gspawn.c:479
#, c-format
msgid "Unexpected error in waitpid() (%s)"
msgstr "Ustekabeko errorea waitpid()-en (%s)"
-#: glib/gspawn.c:1056 glib/gspawn-win32.c:1329
+#: ../glib/gspawn.c:886 ../glib/gspawn-win32.c:1231
#, c-format
msgid "Child process exited with code %ld"
msgstr "Prozesu umea amaitu da %ld kodearekin"
-#: glib/gspawn.c:1064
+#: ../glib/gspawn.c:894
#, c-format
msgid "Child process killed by signal %ld"
msgstr "Prozesu umea %ld seinaleak hilda"
-#: glib/gspawn.c:1071
+#: ../glib/gspawn.c:901
#, c-format
msgid "Child process stopped by signal %ld"
msgstr "Prozesu umea %ld seinaleak geldituta"
-#: glib/gspawn.c:1078
+#: ../glib/gspawn.c:908
#, c-format
msgid "Child process exited abnormally"
msgstr "Prozesu umea ustekabean amaituta"
-#: glib/gspawn.c:1405 glib/gspawn-win32.c:350 glib/gspawn-win32.c:358
+#: ../glib/gspawn.c:1313 ../glib/gspawn-win32.c:337 ../glib/gspawn-win32.c:345
#, c-format
msgid "Failed to read from child pipe (%s)"
-msgstr "Ezin izan da kanalizazio umetik irakurri (%s)"
-
-#: glib/gspawn.c:1653
-#, c-format
-msgid "Failed to spawn child process “%s” (%s)"
-msgstr "Ezin izan da “%s“ prozesu umea abiarazi (%s)"
+msgstr "Ezin izan da kanalizazio umetik irakurri (%s) "
-#: glib/gspawn.c:1692
+#: ../glib/gspawn.c:1383
#, c-format
msgid "Failed to fork (%s)"
msgstr "Ezin da sardetu (%s)"
-#: glib/gspawn.c:1841 glib/gspawn-win32.c:381
+#: ../glib/gspawn.c:1532 ../glib/gspawn-win32.c:368
#, c-format
msgid "Failed to change to directory “%s” (%s)"
msgstr "Ezin izan da “%s“ direktoriora aldatu (%s)"
-#: glib/gspawn.c:1851
+#: ../glib/gspawn.c:1542
#, c-format
msgid "Failed to execute child process “%s” (%s)"
msgstr "Ezin izan da “%s“ prozesu umea exekutatu (%s)"
-#: glib/gspawn.c:1861
+#: ../glib/gspawn.c:1552
#, c-format
msgid "Failed to redirect output or input of child process (%s)"
msgstr "Ezin izan da prozesu umearen irteera edo sarrera birbideratu (%s)"
-#: glib/gspawn.c:1870
+#: ../glib/gspawn.c:1561
#, c-format
msgid "Failed to fork child process (%s)"
msgstr "Ezin izan da prozesu umea sardetu (%s)"
-#: glib/gspawn.c:1878
+#: ../glib/gspawn.c:1569
#, c-format
msgid "Unknown error executing child process “%s”"
msgstr "Errore ezezaguna “%s“ prozesu umea exekutatzean"
-#: glib/gspawn.c:1902
+#: ../glib/gspawn.c:1593
#, c-format
msgid "Failed to read enough data from child pid pipe (%s)"
msgstr "Ezin izan da nahikoa datu irakurri pid kanalizazio umetik (%s)"
-#: glib/gspawn-win32.c:294
+#: ../glib/gspawn-win32.c:281
msgid "Failed to read data from child process"
msgstr "Ezin izan da daturik irakurri prozesu umetik"
-#: glib/gspawn-win32.c:311
+#: ../glib/gspawn-win32.c:298
#, c-format
msgid "Failed to create pipe for communicating with child process (%s)"
-msgstr "Ezin izan da kanalizazioa sortu prozesu umearekin komunikatzeko (%s)"
+msgstr "Ezin izan da kanalizazioa sortu prozesu umearekin komunikatzeko (%s) "
-#: glib/gspawn-win32.c:387 glib/gspawn-win32.c:392 glib/gspawn-win32.c:511
+#: ../glib/gspawn-win32.c:374 ../glib/gspawn-win32.c:493
#, c-format
msgid "Failed to execute child process (%s)"
msgstr "Ezin izan da prozesu umea exekutatu (%s)"
#
-#: glib/gspawn-win32.c:461
+#: ../glib/gspawn-win32.c:443
#, c-format
msgid "Invalid program name: %s"
msgstr "Programaren izen baliogabea: %s"
-#: glib/gspawn-win32.c:471 glib/gspawn-win32.c:725
+#: ../glib/gspawn-win32.c:453 ../glib/gspawn-win32.c:720
#, c-format
msgid "Invalid string in argument vector at %d: %s"
msgstr "Kate baliogabea %d(e)ko bektorearen argumentuan: %s"
-#: glib/gspawn-win32.c:482 glib/gspawn-win32.c:740
+#: ../glib/gspawn-win32.c:464 ../glib/gspawn-win32.c:735
#, c-format
msgid "Invalid string in environment: %s"
msgstr "Kate baliogabea ingurunean: %s"
-#: glib/gspawn-win32.c:721
+#: ../glib/gspawn-win32.c:716
#, c-format
msgid "Invalid working directory: %s"
msgstr "Laneko direktorio baliogabea: %s"
#
-#: glib/gspawn-win32.c:783
+#: ../glib/gspawn-win32.c:781
#, c-format
msgid "Failed to execute helper program (%s)"
msgstr "Ezin izan da laguntza-programa exekutatu (%s)"
-#: glib/gspawn-win32.c:1056
+#: ../glib/gspawn-win32.c:995
msgid ""
"Unexpected error in g_io_channel_win32_poll() reading data from a child "
"process"
-msgstr "Ustekabeko errorea gertatu da 'g_io_channel_win32_poll()'-en prozesu umetik datuak irakurtzean"
+msgstr ""
+"Ustekabeko errorea gertatu da 'g_io_channel_win32_poll()'-en prozesu umetik "
+"datuak irakurtzean"
-#: glib/gstrfuncs.c:3286 glib/gstrfuncs.c:3388
+#: ../glib/gstrfuncs.c:3247 ../glib/gstrfuncs.c:3348
msgid "Empty string is not a number"
msgstr "Kate hutsa ez da zenbaki bat"
-#: glib/gstrfuncs.c:3310
+#: ../glib/gstrfuncs.c:3271
#, c-format
+#| msgid "'%s' is not a valid name"
msgid "“%s” is not a signed number"
msgstr "“%s” ez da zeinudun zenbaki bat"
-#: glib/gstrfuncs.c:3320 glib/gstrfuncs.c:3424
+#: ../glib/gstrfuncs.c:3281 ../glib/gstrfuncs.c:3384
#, c-format
msgid "Number “%s” is out of bounds [%s, %s]"
msgstr "“%s” zenbakia barrutitik kanpo [%s, %s]"
-#: glib/gstrfuncs.c:3414
+#: ../glib/gstrfuncs.c:3374
#, c-format
+#| msgid "'%s' is not a valid name"
msgid "“%s” is not an unsigned number"
msgstr "“%s” ez da zeinurik gabeko zenbaki bat"
-#: glib/gutf8.c:811
+#: ../glib/gutf8.c:808
msgid "Failed to allocate memory"
msgstr "Huts egin du memoria esleitzean"
-#: glib/gutf8.c:944
+#: ../glib/gutf8.c:941
msgid "Character out of range for UTF-8"
msgstr "Karakterea UTF-8 barrutitik kanpo"
-#: glib/gutf8.c:1045 glib/gutf8.c:1054 glib/gutf8.c:1184 glib/gutf8.c:1193
-#: glib/gutf8.c:1332 glib/gutf8.c:1429
+#: ../glib/gutf8.c:1042 ../glib/gutf8.c:1051 ../glib/gutf8.c:1181
+#: ../glib/gutf8.c:1190 ../glib/gutf8.c:1329 ../glib/gutf8.c:1426
msgid "Invalid sequence in conversion input"
msgstr "Sekuentzia baliogabea bihurketa-sarreran"
-#: glib/gutf8.c:1343 glib/gutf8.c:1440
+#: ../glib/gutf8.c:1340 ../glib/gutf8.c:1437
msgid "Character out of range for UTF-16"
msgstr "Karakterea UTF-16 barrutitik kanpo"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2339
-#, c-format
-msgid "%.1f kB"
-msgstr "%.1f kB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2341
-#, c-format
-msgid "%.1f MB"
-msgstr "%.1f MB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2343
-#, c-format
-msgid "%.1f GB"
-msgstr "%.1f GB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2345
-#, c-format
-msgid "%.1f TB"
-msgstr "%.1f TB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2347
-#, c-format
-msgid "%.1f PB"
-msgstr "%.1f PB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2349
-#, c-format
-msgid "%.1f EB"
-msgstr "%.1f EB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2353
-#, c-format
-msgid "%.1f KiB"
-msgstr "%.1f KiB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2355
-#, c-format
-msgid "%.1f MiB"
-msgstr "%.1f MiB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2357
-#, c-format
-msgid "%.1f GiB"
-msgstr "%.1f GiB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2359
-#, c-format
-msgid "%.1f TiB"
-msgstr "%.1f TiB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2361
-#, c-format
-msgid "%.1f PiB"
-msgstr "%.1f PiB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2363
+#: ../glib/gutils.c:2149 ../glib/gutils.c:2176 ../glib/gutils.c:2282
#, c-format
-msgid "%.1f EiB"
-msgstr "%.1f EiB"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2367
-#, c-format
-msgid "%.1f kb"
-msgstr "%.1f kb"
-
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2369
-#, c-format
-msgid "%.1f Mb"
-msgstr "%.1f Mb"
+msgid "%u byte"
+msgid_plural "%u bytes"
+msgstr[0] "byte %u"
+msgstr[1] "%u byte"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2371
+#: ../glib/gutils.c:2155
#, c-format
-msgid "%.1f Gb"
-msgstr "%.1f Gb"
+msgid "%.1f KiB"
+msgstr "%.1f KiB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2373
+#: ../glib/gutils.c:2157
#, c-format
-msgid "%.1f Tb"
-msgstr "%.1f Tb"
+msgid "%.1f MiB"
+msgstr "%.1f MiB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2375
+#: ../glib/gutils.c:2160
#, c-format
-msgid "%.1f Pb"
-msgstr "%.1f Pb"
+msgid "%.1f GiB"
+msgstr "%.1f GiB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2377
+#: ../glib/gutils.c:2163
#, c-format
-msgid "%.1f Eb"
-msgstr "%.1f Eb"
+msgid "%.1f TiB"
+msgstr "%.1f TiB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2381
+#: ../glib/gutils.c:2166
#, c-format
-msgid "%.1f Kib"
-msgstr "%.1f Kib"
+msgid "%.1f PiB"
+msgstr "%.1f PiB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2383
+#: ../glib/gutils.c:2169
#, c-format
-msgid "%.1f Mib"
-msgstr "%.1f Mib"
+msgid "%.1f EiB"
+msgstr "%.1f EiB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2385
+#: ../glib/gutils.c:2182
#, c-format
-msgid "%.1f Gib"
-msgstr "%.1f Gib"
+msgid "%.1f kB"
+msgstr "%.1f kB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2387
+#: ../glib/gutils.c:2185 ../glib/gutils.c:2300
#, c-format
-msgid "%.1f Tib"
-msgstr "%.1f Tib"
+msgid "%.1f MB"
+msgstr "%.1f MB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2389
+#: ../glib/gutils.c:2188 ../glib/gutils.c:2305
#, c-format
-msgid "%.1f Pib"
-msgstr "%.1f Pib"
+msgid "%.1f GB"
+msgstr "%.1f GB"
-#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2391
+#: ../glib/gutils.c:2190 ../glib/gutils.c:2310
#, c-format
-msgid "%.1f Eib"
-msgstr "%.1f Eib"
+msgid "%.1f TB"
+msgstr "%.1f TB"
-#: glib/gutils.c:2425 glib/gutils.c:2551
+#: ../glib/gutils.c:2193 ../glib/gutils.c:2315
#, c-format
-msgid "%u byte"
-msgid_plural "%u bytes"
-msgstr[0] "byte %u"
-msgstr[1] "%u byte"
+msgid "%.1f PB"
+msgstr "%.1f PB"
-#: glib/gutils.c:2429
+#: ../glib/gutils.c:2196 ../glib/gutils.c:2320
#, c-format
-msgid "%u bit"
-msgid_plural "%u bits"
-msgstr[0] "bit %u"
-msgstr[1] "%u bit"
+msgid "%.1f EB"
+msgstr "%.1f EB"
#. Translators: the %s in "%s bytes" will always be replaced by a number.
-#: glib/gutils.c:2496
+#: ../glib/gutils.c:2233
#, c-format
msgid "%s byte"
msgid_plural "%s bytes"
msgstr[0] "byte %s"
msgstr[1] "%s byte"
-#. Translators: the %s in "%s bits" will always be replaced by a number.
-#: glib/gutils.c:2501
-#, c-format
-msgid "%s bit"
-msgid_plural "%s bits"
-msgstr[0] "bit %s"
-msgstr[1] "%s byte"
-
#. 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:2564
+#: ../glib/gutils.c:2295
#, c-format
msgid "%.1f KB"
msgstr "%.1f KB"
-#: glib/gutils.c:2569
-#, c-format
-msgid "%.1f MB"
-msgstr "%.1f MB"
+msgctxt "full month name with day"
+msgid "January"
+msgstr "Urtarrila"
-#: glib/gutils.c:2574
-#, c-format
-msgid "%.1f GB"
-msgstr "%.1f GB"
+msgctxt "full month name with day"
+msgid "February"
+msgstr "Otsaila"
-#: glib/gutils.c:2579
-#, c-format
-msgid "%.1f TB"
-msgstr "%.1f TB"
+msgctxt "full month name with day"
+msgid "March"
+msgstr "Martxoa"
-#: glib/gutils.c:2584
-#, c-format
-msgid "%.1f PB"
-msgstr "%.1f PB"
+msgctxt "full month name with day"
+msgid "April"
+msgstr "Apirila"
-#: glib/gutils.c:2589
-#, c-format
-msgid "%.1f EB"
-msgstr "%.1f EB"
+msgctxt "full month name with day"
+msgid "May"
+msgstr "Maiatza"
-#~ msgid "No such method '%s'"
-#~ msgstr "Ez dago '%s' bezalako metodorik"
+msgctxt "full month name with day"
+msgid "June"
+msgstr "Ekaina"
-#~ msgid ""
-#~ "Cannot determine bus address from DBUS_STARTER_BUS_TYPE environment "
-#~ "variable - unknown value '%s'"
-#~ msgstr ""
-#~ "Ezin da bus-aren helbidea zehaztua inguruneko DBUS_STARTER_BUS_TYPE "
-#~ "aldagaitik. '%s' balio ezezaguna"
+msgctxt "full month name with day"
+msgid "July"
+msgstr "Uztaila"
-#~ msgid ""
-#~ "Message has %d file descriptors but the header field indicates %d file "
-#~ "descriptors"
-#~ msgstr ""
-#~ "Mezuak fitxategi-deskriptore %d du baina goiburuko eremuak %d fitxategi-"
-#~ "deskriptore adierazten ditu"
+msgctxt "full month name with day"
+msgid "August"
+msgstr "Abuztua"
+
+msgctxt "full month name with day"
+msgid "September"
+msgstr "Iraila"
+
+msgctxt "full month name with day"
+msgid "October"
+msgstr "Urria"
+
+msgctxt "full month name with day"
+msgid "November"
+msgstr "Azaroa"
+
+msgctxt "full month name with day"
+msgid "December"
+msgstr "Abendua"
-#~ msgid "Error: object path not specified.\n"
-#~ msgstr "Errorea: objektuaren bide-izena ez da zehaztu.\n"
+msgctxt "abbreviated month name with day"
+msgid "Jan"
+msgstr "Urt."
-#~ msgid "Error: signal not specified.\n"
-#~ msgstr "Errorea: seinalea ez da zehaztu.\n"
+msgctxt "abbreviated month name with day"
+msgid "Feb"
+msgstr "Ots."
-#~ msgid "Error: signal must be the fully-qualified name.\n"
-#~ msgstr "Errorea: seinaleak erabat kualifikatutako izena eduki behar du.\n"
+msgctxt "abbreviated month name with day"
+msgid "Mar"
+msgstr "Mar."
-#~ msgid "[ARGS...]"
-#~ msgstr "[ARGUMENTUAK...]"
+msgctxt "abbreviated month name with day"
+msgid "Apr"
+msgstr "Apr."
+
+msgctxt "abbreviated month name with day"
+msgid "May"
+msgstr "Mai"
-#~ msgid "Failed to create temp file: %s"
-#~ msgstr "Huts egin du aldi baterako fitxategia sortu: %s"
+msgctxt "abbreviated month name with day"
+msgid "Jun"
+msgstr "Eka."
+
+msgctxt "abbreviated month name with day"
+msgid "Jul"
+msgstr "Uzt."
+
+msgctxt "abbreviated month name with day"
+msgid "Aug"
+msgstr "Abu."
+
+msgctxt "abbreviated month name with day"
+msgid "Sep"
+msgstr "Ira."
+
+msgctxt "abbreviated month name with day"
+msgid "Oct"
+msgstr "Urr."
+
+msgctxt "abbreviated month name with day"
+msgid "Nov"
+msgstr "Aza."
+
+msgctxt "abbreviated month name with day"
+msgid "Dec"
+msgstr "Abe."
#~ msgid "No such interface"
#~ msgstr "Ez dago halako interfazerik"
diff --git a/po/nl.po b/po/nl.po
index 385b07358..c969abe5e 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -11,7 +11,7 @@ msgid ""
msgstr ""
"Project-Id-Version: glib\n"
"Report-Msgid-Bugs-To: https://gitlab.gnome.org/GNOME/glib/issues\n"
-"POT-Creation-Date: 2019-03-05 11:46+0000\n"
+"POT-Creation-Date: 2019-01-24 14:43+0000\n"
"PO-Revision-Date: 2019-02-26 14:51+0100\n"
"Last-Translator: Nathan Follens <nthn@unseen.is>\n"
"Language-Team: Dutch <gnome-nl-list@gnome.org>\n"
@@ -279,7 +279,7 @@ msgstr "De stroom is al gesloten"
msgid "Truncate not supported on base stream"
msgstr "Afkappen wordt niet ondersteund op een datastroom"
-#: gio/gcancellable.c:319 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1402
+#: gio/gcancellable.c:317 gio/gdbusconnection.c:1867 gio/gdbusprivate.c:1402
#: gio/gsimpleasyncresult.c:871 gio/gsimpleasyncresult.c:897
#, c-format
msgid "Operation was cancelled"
@@ -932,52 +932,52 @@ msgstr ""
msgid "Cannot serialize message: "
msgstr ""
-#: gio/gdbusmessage.c:2739
+#: gio/gdbusmessage.c:2740
#, c-format
msgid "Message body has signature “%s” but there is no signature header"
msgstr ""
-#: gio/gdbusmessage.c:2749
+#: gio/gdbusmessage.c:2750
#, c-format
msgid ""
"Message body has type signature “%s” but signature in the header field is "
"“%s”"
msgstr ""
-#: gio/gdbusmessage.c:2765
+#: gio/gdbusmessage.c:2766
#, c-format
msgid "Message body is empty but signature in the header field is “(%s)”"
msgstr ""
-#: gio/gdbusmessage.c:3318
+#: gio/gdbusmessage.c:3319
#, c-format
msgid "Error return with body of type “%s”"
msgstr ""
-#: gio/gdbusmessage.c:3326
+#: gio/gdbusmessage.c:3327
msgid "Error return with empty body"
msgstr ""
-#: gio/gdbusprivate.c:2075
+#: gio/gdbusprivate.c:2066
#, c-format
msgid "Unable to get Hardware profile: %s"
msgstr "Kan hardware-profiel niet verkrijgen: %s"
-#: gio/gdbusprivate.c:2120
+#: gio/gdbusprivate.c:2111
msgid "Unable to load /var/lib/dbus/machine-id or /etc/machine-id: "
msgstr ""
-#: gio/gdbusproxy.c:1617
+#: gio/gdbusproxy.c:1611
#, c-format
msgid "Error calling StartServiceByName for %s: "
msgstr ""
-#: gio/gdbusproxy.c:1640
+#: gio/gdbusproxy.c:1634
#, c-format
msgid "Unexpected reply %d from StartServiceByName(\"%s\") method"
msgstr ""
-#: gio/gdbusproxy.c:2740 gio/gdbusproxy.c:2875
+#: gio/gdbusproxy.c:2734 gio/gdbusproxy.c:2869
#, c-format
msgid ""
"Cannot invoke method; proxy is for the well-known name %s without an owner, "
@@ -1285,7 +1285,7 @@ msgid "Error: %s is not a valid well-known bus name.\n"
msgstr "Fout: %s is geen geldige unieke busnaam.\n"
# naamloos/zonder naam/onbenoemd
-#: gio/gdesktopappinfo.c:2041 gio/gdesktopappinfo.c:4822
+#: gio/gdesktopappinfo.c:2041 gio/gdesktopappinfo.c:4680
msgid "Unnamed"
msgstr "Zonder naam"
@@ -1300,29 +1300,29 @@ msgstr "Desktopbestand bevat geen Exec-veld"
msgid "Unable to find terminal required for application"
msgstr "Kan geen terminalvenster vinden voor het uitvoeren van het programma"
-#: gio/gdesktopappinfo.c:3362
+#: gio/gdesktopappinfo.c:3222
#, fuzzy, c-format
#| msgid "Can't create user application configuration folder %s: %s"
msgid "Can’t create user application configuration folder %s: %s"
msgstr "Kan persoonlijke programmaconfiguratiemap %s niet aanmaken: %s"
-#: gio/gdesktopappinfo.c:3366
+#: gio/gdesktopappinfo.c:3226
#, fuzzy, c-format
#| msgid "Can't create user MIME configuration folder %s: %s"
msgid "Can’t create user MIME configuration folder %s: %s"
msgstr "Kan persoonlijke MIME-configuratiemap %s niet aanmaken: %s"
-#: gio/gdesktopappinfo.c:3606 gio/gdesktopappinfo.c:3630
+#: gio/gdesktopappinfo.c:3466 gio/gdesktopappinfo.c:3490
msgid "Application information lacks an identifier"
msgstr ""
-#: gio/gdesktopappinfo.c:3864
+#: gio/gdesktopappinfo.c:3724
#, fuzzy, c-format
#| msgid "Can't create user desktop file %s"
msgid "Can’t create user desktop file %s"
msgstr "Kan desktopbestand %s niet aanmaken"
-#: gio/gdesktopappinfo.c:3998
+#: gio/gdesktopappinfo.c:3858
#, c-format
msgid "Custom definition for %s"
msgstr "Zelfgemaakte definitie voor %s"
@@ -1404,7 +1404,7 @@ msgstr "GEmblem voor GEmblemedIcon verwacht"
#: gio/gfile.c:2008 gio/gfile.c:2063 gio/gfile.c:3738 gio/gfile.c:3793
#: gio/gfile.c:4029 gio/gfile.c:4071 gio/gfile.c:4539 gio/gfile.c:4950
#: gio/gfile.c:5035 gio/gfile.c:5125 gio/gfile.c:5222 gio/gfile.c:5309
-#: gio/gfile.c:5410 gio/gfile.c:8113 gio/gfile.c:8203 gio/gfile.c:8287
+#: gio/gfile.c:5410 gio/gfile.c:7988 gio/gfile.c:8078 gio/gfile.c:8162
#: gio/win32/gwinhttpfile.c:437
msgid "Operation not supported"
msgstr "De bewerking is niet mogelijk"
@@ -1418,7 +1418,7 @@ msgstr "De bewerking is niet mogelijk"
msgid "Containing mount does not exist"
msgstr "Het koppelpunt hiervan bestaat niet"
-#: gio/gfile.c:2622 gio/glocalfile.c:2446
+#: gio/gfile.c:2622 gio/glocalfile.c:2441
#, fuzzy
#| msgid "Can't copy over directory"
msgid "Can’t copy over directory"
@@ -1495,7 +1495,7 @@ msgstr "Het teken ‘%c’ mag niet in een bestandsnaam voorkomen"
msgid "volume doesn’t implement mount"
msgstr "volumen begrijpt de opdracht ‘aankoppelen’ niet"
-#: gio/gfile.c:6884 gio/gfile.c:6930
+#: gio/gfile.c:6882
msgid "No application is registered as handling this file"
msgstr "Er is geen programma toegewezen om dit bestand te openen"
@@ -1763,7 +1763,7 @@ msgstr "Fout bij schrijven naar stdout"
#: 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:1212 gio/gio-tool-open.c:70
+#: gio/gio-tool-monitor.c:203 gio/gio-tool-mount.c:1212 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"
@@ -1781,7 +1781,7 @@ msgid ""
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-mount.c:1263 gio/gio-tool-open.c:96
+#: gio/gio-tool-monitor.c:228 gio/gio-tool-mount.c:1263 gio/gio-tool-open.c:139
#: gio/gio-tool-remove.c:72 gio/gio-tool-trash.c:136
msgid "No locations given"
msgstr "Geen locaties opgegeven"
@@ -2116,6 +2116,8 @@ msgid "The numeric PIM when unlocking a VeraCrypt volume"
msgstr ""
#: gio/gio-tool-mount.c:75
+#| msgctxt "GDateTime"
+#| msgid "PM"
msgid "PIM"
msgstr "PIM"
@@ -2169,7 +2171,7 @@ msgstr ""
msgid "Target %s is not a directory"
msgstr "Doelbestand is geen map"
-#: gio/gio-tool-open.c:75
+#: gio/gio-tool-open.c:118
msgid ""
"Open files with the default application that\n"
"is registered to handle files of this type."
@@ -2868,12 +2870,12 @@ msgstr "niets doen.\n"
msgid "removed existing output file.\n"
msgstr ""
-#: gio/glocalfile.c:546 gio/win32/gwinhttpfile.c:420
+#: gio/glocalfile.c:544 gio/win32/gwinhttpfile.c:420
#, c-format
msgid "Invalid filename %s"
msgstr "Ongeldige bestandsnaam: %s"
-#: gio/glocalfile.c:1013
+#: gio/glocalfile.c:1011
#, fuzzy, c-format
#| msgid "Error getting filesystem info: %s"
msgid "Error getting filesystem info for %s: %s"
@@ -2884,147 +2886,147 @@ msgstr "Fout bij het ophalen van informatie over bestandssysteem: %s"
#. * the enclosing (user visible) mount of a file, but none
#. * exists.
#.
-#: gio/glocalfile.c:1152
+#: gio/glocalfile.c:1150
#, fuzzy, c-format
#| msgid "Containing mount does not exist"
msgid "Containing mount for file %s not found"
msgstr "Het koppelpunt hiervan bestaat niet"
-#: gio/glocalfile.c:1175
+#: gio/glocalfile.c:1173
#, fuzzy
#| msgid "Can't rename root directory"
msgid "Can’t rename root directory"
msgstr "Kan de root-map niet hernoemen"
-#: gio/glocalfile.c:1193 gio/glocalfile.c:1216
+#: gio/glocalfile.c:1191 gio/glocalfile.c:1214
#, fuzzy, c-format
#| msgid "Error reading file %s: %s"
msgid "Error renaming file %s: %s"
msgstr "Fout bij lezen van bestand %s: %s"
-#: gio/glocalfile.c:1200
+#: gio/glocalfile.c:1198
msgid "Can’t rename file, filename already exists"
msgstr "Kan bestand niet hernoemen; bestandsnaam reeds in gebruik"
# ongeldige naam voor bestand/ongeldige bestandsnaam
-#: gio/glocalfile.c:1213 gio/glocalfile.c:2322 gio/glocalfile.c:2350
-#: gio/glocalfile.c:2507 gio/glocalfileoutputstream.c:646
+#: gio/glocalfile.c:1211 gio/glocalfile.c:2317 gio/glocalfile.c:2345
+#: gio/glocalfile.c:2502 gio/glocalfileoutputstream.c:646
msgid "Invalid filename"
msgstr "Ongeldige bestandsnaam"
# lezen/openen
-#: gio/glocalfile.c:1381 gio/glocalfile.c:1396
+#: gio/glocalfile.c:1379 gio/glocalfile.c:1394
#, fuzzy, c-format
#| msgid "Error opening file '%s': %s"
msgid "Error opening file %s: %s"
msgstr "Fout bij het openen van bestand ‘%s’: %s"
# volledig verwijderen/definitief verwijderen/verwijderen
-#: gio/glocalfile.c:1521
+#: gio/glocalfile.c:1519
#, fuzzy, c-format
#| msgid "Error removing file: %s"
msgid "Error removing file %s: %s"
msgstr "Fout bij het verwijderen van bestand: %s"
# naar prullenbak verplaatsen/verwijderen
-#: gio/glocalfile.c:1963
+#: gio/glocalfile.c:1958
#, fuzzy, c-format
#| msgid "Error trashing file: %s"
msgid "Error trashing file %s: %s"
msgstr "Fout bij het verplaatsen naar de prullenbak van bestand: %s"
-#: gio/glocalfile.c:2004
+#: gio/glocalfile.c:1999
#, c-format
msgid "Unable to create trash dir %s: %s"
msgstr "Kan de prullenbakmap %s niet aanmaken: %s"
-#: gio/glocalfile.c:2025
+#: gio/glocalfile.c:2020
#, fuzzy, c-format
#| msgid "Unable to find toplevel directory for trash"
msgid "Unable to find toplevel directory to trash %s"
msgstr "Kan de bovenliggende map voor de prullenbak niet vinden"
# (nog) niet mogelijk/niet ondersteund
-#: gio/glocalfile.c:2034
+#: gio/glocalfile.c:2029
#, fuzzy, c-format
msgid "Trashing on system internal mounts is not supported"
msgstr "Verplaatsen tussen aankoppelpunten is niet mogelijk"
-#: gio/glocalfile.c:2118 gio/glocalfile.c:2138
+#: gio/glocalfile.c:2113 gio/glocalfile.c:2133
#, fuzzy, c-format
#| msgid "Unable to find or create trash directory"
msgid "Unable to find or create trash directory for %s"
msgstr "Kan prullenbakmap niet vinden of aanmaken"
-#: gio/glocalfile.c:2173
+#: gio/glocalfile.c:2168
#, fuzzy, c-format
#| msgid "Unable to create trashing info file: %s"
msgid "Unable to create trashing info file for %s: %s"
msgstr "Kan prullenbak-informatiebestand ‘%s’ niet aanmaken"
-#: gio/glocalfile.c:2233
+#: gio/glocalfile.c:2228
#, c-format
msgid "Unable to trash file %s across filesystem boundaries"
msgstr ""
-#: gio/glocalfile.c:2237 gio/glocalfile.c:2293
+#: gio/glocalfile.c:2232 gio/glocalfile.c:2288
#, c-format
msgid "Unable to trash file %s: %s"
msgstr "Kan het bestand %s niet naar de prullenbak verplaatsen: %s"
-#: gio/glocalfile.c:2299
+#: gio/glocalfile.c:2294
#, c-format
msgid "Unable to trash file %s"
msgstr "Kan het bestand %s niet naar de prullenbak verplaatsen"
-#: gio/glocalfile.c:2325
+#: gio/glocalfile.c:2320
#, fuzzy, c-format
#| msgid "Error creating directory '%s': %s"
msgid "Error creating directory %s: %s"
msgstr "Fout bij het aanmaken van map ‘%s’: %s"
-#: gio/glocalfile.c:2354
+#: gio/glocalfile.c:2349
#, c-format
msgid "Filesystem does not support symbolic links"
msgstr "Bestandssysteem ondersteunt geen symbolische verwijzingen"
-#: gio/glocalfile.c:2357
+#: gio/glocalfile.c:2352
#, fuzzy, c-format
#| msgid "Error making symbolic link: %s"
msgid "Error making symbolic link %s: %s"
msgstr "Fout bij het maken van symbolische verwijzing: %s"
-#: gio/glocalfile.c:2363 glib/gfileutils.c:2138
+#: gio/glocalfile.c:2358 glib/gfileutils.c:2138
msgid "Symbolic links not supported"
msgstr "Symbolische verwijzingen zijn niet mogelijk"
-#: gio/glocalfile.c:2418 gio/glocalfile.c:2453 gio/glocalfile.c:2510
+#: gio/glocalfile.c:2413 gio/glocalfile.c:2448 gio/glocalfile.c:2505
#, fuzzy, c-format
#| msgid "Error moving file: %s"
msgid "Error moving file %s: %s"
msgstr "Fout bij het verplaatsen van bestand: %s"
-#: gio/glocalfile.c:2441
+#: gio/glocalfile.c:2436
msgid "Can’t move directory over directory"
msgstr "Kan map niet over andere map heen verplaatsen"
-#: gio/glocalfile.c:2467 gio/glocalfileoutputstream.c:1030
+#: gio/glocalfile.c:2462 gio/glocalfileoutputstream.c:1030
#: gio/glocalfileoutputstream.c:1044 gio/glocalfileoutputstream.c:1059
#: gio/glocalfileoutputstream.c:1076 gio/glocalfileoutputstream.c:1090
msgid "Backup file creation failed"
msgstr "Aanmaken van backupbestand is mislukt"
-#: gio/glocalfile.c:2486
+#: gio/glocalfile.c:2481
#, c-format
msgid "Error removing target file: %s"
msgstr "Fout bij het verwijderen doelbestand: %s"
# (nog) niet mogelijk/niet ondersteund
-#: gio/glocalfile.c:2500
+#: gio/glocalfile.c:2495
msgid "Move between mounts not supported"
msgstr "Verplaatsen tussen aankoppelpunten is niet mogelijk"
-#: gio/glocalfile.c:2691
+#: gio/glocalfile.c:2686
#, fuzzy, c-format
#| msgid "could not get remote address: %s"
msgid "Could not determine the disk usage of %s: %s"
@@ -3315,7 +3317,7 @@ msgid "mount doesn’t implement synchronous content type guessing"
msgstr ""
"mount heeft geen ondersteuning voor inhoudstype raden op synchrone wijze"
-#: gio/gnetworkaddress.c:388
+#: gio/gnetworkaddress.c:384
#, fuzzy, c-format
#| msgid "Hostname '%s' contains '[' but not ']'"
msgid "Hostname “%s” contains “[” but not “]”"
@@ -3871,30 +3873,30 @@ msgid "Waiting for socket condition: %s"
msgstr ""
# openen/lezen
-#: gio/gsocket.c:4614 gio/gsocket.c:4616 gio/gsocket.c:4762 gio/gsocket.c:4847
-#: gio/gsocket.c:5027 gio/gsocket.c:5067 gio/gsocket.c:5069
+#: gio/gsocket.c:4612 gio/gsocket.c:4756 gio/gsocket.c:4841 gio/gsocket.c:5021
+#: gio/gsocket.c:5059
#, c-format
msgid "Error sending message: %s"
msgstr "Fout bij versturen van bericht: %s"
-#: gio/gsocket.c:4789
+#: gio/gsocket.c:4783
#, fuzzy
msgid "GSocketControlMessage not supported on Windows"
msgstr "GSocketControlMessage wordt niet ondersteund op windows"
# volledig verwijderen/definitief verwijderen/verwijderen
-#: gio/gsocket.c:5260 gio/gsocket.c:5333 gio/gsocket.c:5560
+#: gio/gsocket.c:5248 gio/gsocket.c:5321 gio/gsocket.c:5548
#, c-format
msgid "Error receiving message: %s"
msgstr "Fout bij ontvangen van bericht: %s"
-#: gio/gsocket.c:5832
+#: gio/gsocket.c:5820
#, fuzzy, c-format
#| msgid "Unable to create socket: %s"
msgid "Unable to read socket credentials: %s"
msgstr "Kan socket niet aanmaken: %s"
-#: gio/gsocket.c:5841
+#: gio/gsocket.c:5829
msgid "g_socket_get_credentials not implemented for this OS"
msgstr ""
@@ -3913,16 +3915,16 @@ msgstr "Kon niet verbinden met %s: "
msgid "Could not connect: "
msgstr "Kon niet verbinden: "
-#: gio/gsocketclient.c:1032 gio/gsocketclient.c:1749
+#: gio/gsocketclient.c:1032 gio/gsocketclient.c:1714
msgid "Unknown error on connect"
msgstr "Onbekende fout bij verbinden"
-#: gio/gsocketclient.c:1086 gio/gsocketclient.c:1657
+#: gio/gsocketclient.c:1086 gio/gsocketclient.c:1626
#, fuzzy
msgid "Proxying over a non-TCP connection is not supported."
msgstr "Proxy-protocol ‘%s’ wordt niet ondersteund."
-#: gio/gsocketclient.c:1115 gio/gsocketclient.c:1683
+#: gio/gsocketclient.c:1115 gio/gsocketclient.c:1652
#, fuzzy, c-format
#| msgid "Proxy protocol '%s' is not supported."
msgid "Proxy protocol “%s” is not supported."
@@ -4057,7 +4059,7 @@ msgid "Temporarily unable to resolve “%s”"
msgstr "Kan tijdelijk geen resolve doen voor ‘%s’"
#: gio/gthreadedresolver.c:663 gio/gthreadedresolver.c:840
-#: gio/gthreadedresolver.c:950
+#: gio/gthreadedresolver.c:948
#, fuzzy, c-format
msgid "Error resolving “%s”"
msgstr "Fout bij het verwijderen van bestand: %s"
@@ -6039,158 +6041,182 @@ msgid "Character out of range for UTF-16"
msgstr "Teken valt buiten het bereik van UTF-16"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2339
+#: glib/gutils.c:2384
#, c-format
+#| msgid "%.1f kB"
msgid "%.1f kB"
msgstr "%.1f kB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2341
+#: glib/gutils.c:2386
#, c-format
+#| msgid "%.1f MB"
msgid "%.1f MB"
msgstr "%.1f MB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2343
+#: glib/gutils.c:2388
#, c-format
+#| msgid "%.1f GB"
msgid "%.1f GB"
msgstr "%.1f GB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2345
+#: glib/gutils.c:2390
#, c-format
+#| msgid "%.1f TB"
msgid "%.1f TB"
msgstr "%.1f TB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2347
+#: glib/gutils.c:2392
#, c-format
+#| msgid "%.1f PB"
msgid "%.1f PB"
msgstr "%.1f PB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2349
+#: glib/gutils.c:2394
#, c-format
+#| msgid "%.1f EB"
msgid "%.1f EB"
msgstr "%.1f EB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2353
+#: glib/gutils.c:2398
#, c-format
+#| msgid "%.1f KiB"
msgid "%.1f KiB"
msgstr "%.1f KiB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2355
+#: glib/gutils.c:2400
#, c-format
+#| msgid "%.1f MiB"
msgid "%.1f MiB"
msgstr "%.1f MiB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2357
+#: glib/gutils.c:2402
#, c-format
+#| msgid "%.1f GiB"
msgid "%.1f GiB"
msgstr "%.1f GiB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2359
+#: glib/gutils.c:2404
#, c-format
+#| msgid "%.1f TiB"
msgid "%.1f TiB"
msgstr "%.1f TiB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2361
+#: glib/gutils.c:2406
#, c-format
+#| msgid "%.1f PiB"
msgid "%.1f PiB"
msgstr "%.1f PiB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2363
+#: glib/gutils.c:2408
#, c-format
+#| msgid "%.1f EiB"
msgid "%.1f EiB"
msgstr "%.1f EiB"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2367
+#: glib/gutils.c:2412
#, c-format
+#| msgid "%.1f kb"
msgid "%.1f kb"
msgstr "%.1f kb"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2369
+#: glib/gutils.c:2414
#, c-format
+#| msgid "%.1f Mb"
msgid "%.1f Mb"
msgstr "%.1f Mb"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2371
+#: glib/gutils.c:2416
#, c-format
+#| msgid "%.1f Gb"
msgid "%.1f Gb"
msgstr "%.1f Gb"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2373
+#: glib/gutils.c:2418
#, c-format
+#| msgid "%.1f Tb"
msgid "%.1f Tb"
msgstr "%.1f Tb"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2375
+#: glib/gutils.c:2420
#, c-format
+#| msgid "%.1f Pb"
msgid "%.1f Pb"
msgstr "%.1f Pb"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2377
+#: glib/gutils.c:2422
#, c-format
+#| msgid "%.1f Eb"
msgid "%.1f Eb"
msgstr "%.1f Eb"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2381
+#: glib/gutils.c:2426
#, c-format
+#| msgid "%.1f Kib"
msgid "%.1f Kib"
msgstr "%.1f Kib"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2383
+#: glib/gutils.c:2428
#, c-format
+#| msgid "%.1f Mib"
msgid "%.1f Mib"
msgstr "%.1f Mib"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2385
+#: glib/gutils.c:2430
#, c-format
+#| msgid "%.1f Gib"
msgid "%.1f Gib"
msgstr "%.1f Gib"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2387
+#: glib/gutils.c:2432
#, c-format
+#| msgid "%.1f Tib"
msgid "%.1f Tib"
msgstr "%.1f Tib"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2389
+#: glib/gutils.c:2434
#, c-format
+#| msgid "%.1f Pib"
msgid "%.1f Pib"
msgstr "%.1f Pib"
#. Translators: Keep the no-break space between %.1f and the unit symbol
-#: glib/gutils.c:2391
+#: glib/gutils.c:2436
#, c-format
+#| msgid "%.1f Eib"
msgid "%.1f Eib"
msgstr "%.1f Eib"
# ook byte voor meervoud (het bestand is 29 byte groot)
-#: glib/gutils.c:2425 glib/gutils.c:2551
+#: glib/gutils.c:2470 glib/gutils.c:2596
#, c-format
msgid "%u byte"
msgid_plural "%u bytes"
msgstr[0] "%u byte"
msgstr[1] "%u byte"
-#: glib/gutils.c:2429
+#: glib/gutils.c:2474
#, c-format
msgid "%u bit"
msgid_plural "%u bits"
@@ -6199,7 +6225,7 @@ msgstr[1] "%u bits"
# ook byte voor meervoud (het bestand is 29 byte groot)
#. Translators: the %s in "%s bytes" will always be replaced by a number.
-#: glib/gutils.c:2496
+#: glib/gutils.c:2541
#, c-format
msgid "%s byte"
msgid_plural "%s bytes"
@@ -6207,7 +6233,7 @@ msgstr[0] "%s byte"
msgstr[1] "%s byte"
#. Translators: the %s in "%s bits" will always be replaced by a number.
-#: glib/gutils.c:2501
+#: glib/gutils.c:2546
#, c-format
msgid "%s bit"
msgid_plural "%s bits"
@@ -6219,32 +6245,32 @@ msgstr[1] "%s bits"
#. * compatibility. Users will not see this string unless a program is using this deprecated function.
#. * Please translate as literally as possible.
#.
-#: glib/gutils.c:2564
+#: glib/gutils.c:2609
#, c-format
msgid "%.1f KB"
msgstr "%.1f KB"
-#: glib/gutils.c:2569
+#: glib/gutils.c:2614
#, c-format
msgid "%.1f MB"
msgstr "%.1f MB"
-#: glib/gutils.c:2574
+#: glib/gutils.c:2619
#, c-format
msgid "%.1f GB"
msgstr "%.1f GB"
-#: glib/gutils.c:2579
+#: glib/gutils.c:2624
#, c-format
msgid "%.1f TB"
msgstr "%.1f TB"
-#: glib/gutils.c:2584
+#: glib/gutils.c:2629
#, c-format
msgid "%.1f PB"
msgstr "%.1f PB"
-#: glib/gutils.c:2589
+#: glib/gutils.c:2634
#, c-format
msgid "%.1f EB"
msgstr "%.1f EB"
diff --git a/tests/meson.build b/tests/meson.build
index 11075dd8e..288c5b847 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -10,7 +10,7 @@ test_env.set('G_DEBUG', 'gc-friendly')
test_env.set('MALLOC_CHECK_', '2')
test_env.set('MALLOC_PERTURB_', '@0@'.format(random_number % 256))
-test_cargs = ['-DG_LOG_DOMAIN="GLib"']
+test_cargs = ['-DG_LOG_DOMAIN="GLib"', '-UG_DISABLE_ASSERT']
subdir('gobject')
subdir('refcount')
diff --git a/tests/refcount/properties.c b/tests/refcount/properties.c
index c68234216..376d9313c 100644
--- a/tests/refcount/properties.c
+++ b/tests/refcount/properties.c
@@ -35,7 +35,7 @@ struct _GTestClass
};
static GType my_test_get_type (void);
-static volatile gboolean stopping;
+static gboolean stopping;
static void my_test_class_init (GTestClass * klass);
static void my_test_init (GTest * test);
@@ -177,7 +177,7 @@ run_thread (GTest * test)
{
gint i = 1;
- while (!stopping) {
+ while (!g_atomic_int_get (&stopping)) {
my_test_do_property (test);
if ((i++ % 10000) == 0)
{
@@ -210,14 +210,14 @@ main (int argc, char **argv)
g_signal_connect (test, "notify::dummy", G_CALLBACK (dummy_notify), NULL);
}
- stopping = FALSE;
+ g_atomic_int_set (&stopping, FALSE);
for (i = 0; i < N_THREADS; i++)
test_threads[i] = g_thread_create ((GThreadFunc) run_thread, test_objects[i], TRUE, NULL);
g_usleep (3000000);
- stopping = TRUE;
+ g_atomic_int_set (&stopping, TRUE);
g_print ("\nstopping\n");
/* join all threads */