chore: AI slop cleanup — remove broken symlinks, .rej/.orig files, empty dirs, stale patch refs
This commit is contained in:
Submodule local/recipes/dev/libtool/source deleted from 95108dbce5
@@ -1 +0,0 @@
|
||||
../../../local/patches/redox-drm/P1-intel-gen-gate.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../local/patches/redox-drm/P2-intel-display-fixes.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../local/patches/redox-drm/P3-intel-gen8-gen9-firmware.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../local/patches/redox-drm/P4-virtio-gpu-driver.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../patches/redox-drm/P6-pcid-coordinate-handoff.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../patches/redox-drm/P7-unreachable-pattern-cleanup.patch
|
||||
@@ -1,2 +0,0 @@
|
||||
[org.gtk.test.per-desktop:GNOME-Classic]
|
||||
desktop = "GNOME Classic"
|
||||
@@ -1,225 +0,0 @@
|
||||
<schemalist>
|
||||
|
||||
<schema id="org.gtk.test" path="/tests/" gettext-domain="test">
|
||||
<key name="greeting" type="s">
|
||||
<default l10n="messages">"Hello, earthlings"</default>
|
||||
<summary>A greeting</summary>
|
||||
<description>
|
||||
Greeting of the invading martians
|
||||
</description>
|
||||
</key>
|
||||
<key name="farewell" type="s">
|
||||
<default l10n="messages">"So long"</default>
|
||||
</key>
|
||||
|
||||
<child name='basic-types' schema='org.gtk.test.basic-types'/>
|
||||
<child name='complex-types' schema='org.gtk.test.complex-types'/>
|
||||
<child name='localized' schema='org.gtk.test.localized'/>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.no-path">
|
||||
<key name="test-boolean" type="b">
|
||||
<default>true</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.basic-types" path="/tests/basic-types/">
|
||||
<key name="test-boolean" type="b">
|
||||
<default>true</default>
|
||||
</key>
|
||||
<key name="test-byte" type="y">
|
||||
<default>25</default>
|
||||
</key>
|
||||
<key name="test-int16" type="n">
|
||||
<default>-1234</default>
|
||||
</key>
|
||||
<key name="test-uint16" type="q">
|
||||
<default>1234</default>
|
||||
</key>
|
||||
<key name="test-int32" type="i">
|
||||
<default>-123456</default>
|
||||
</key>
|
||||
<key name="test-uint32" type="u">
|
||||
<default>123456</default>
|
||||
</key>
|
||||
<key name="test-int64" type="x">
|
||||
<default>-123456789</default>
|
||||
</key>
|
||||
<key name="test-uint64" type="t">
|
||||
<default>123456789</default>
|
||||
</key>
|
||||
<key name="test-double" type="d">
|
||||
<default>123.456</default>
|
||||
</key>
|
||||
<key name="test-string" type="s">
|
||||
<default>"a string, it seems"</default>
|
||||
</key>
|
||||
<key name="test-objectpath" type="o">
|
||||
<default>"/a/object/path"</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.complex-types" path="/tests/complex-types/">
|
||||
<key name="test-tuple" type="(s(ii))">
|
||||
<default>("one",(2,3))</default>
|
||||
</key>
|
||||
<key name="test-array" type="ai">
|
||||
<default>[0,1,2,3,4,5]</default>
|
||||
</key>
|
||||
<key name="test-dict" type="a{sau}">
|
||||
<default>
|
||||
{
|
||||
"AC": [0,0, 0,0,0,0,0,0],
|
||||
"IV": [0,0, 0,0,0,0,0,0]
|
||||
}
|
||||
</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.localized" path="/tests/localized/" gettext-domain="test">
|
||||
<key name="error-message" type="s">
|
||||
<default l10n="messages">"Unnamed"</default>
|
||||
</key>
|
||||
<key name="backspace" type="s">
|
||||
<default l10n="messages" context="keyboard label">"BackSpace"</default>
|
||||
</key>
|
||||
<key name="midnight" type="s">
|
||||
<default l10n="time">"12:00 AM"</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.binding" path="/tests/binding/">
|
||||
<key name="bool" type="b">
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key name="anti-bool" type="b">
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key name="byte" type="y">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="int16" type="n">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="uint16" type="q">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="int" type="i">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="uint" type="u">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="int64" type="x">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="uint64" type="t">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="double" type="d">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="string" type="s">
|
||||
<default>""</default>
|
||||
</key>
|
||||
<key name="chararray" type="ay">
|
||||
<default>[48, 49]</default>
|
||||
</key>
|
||||
<key name="strv" type="as">
|
||||
<default>[]</default>
|
||||
</key>
|
||||
<key name="enum" enum="org.gtk.test.TestEnum">
|
||||
<default>'foo'</default>
|
||||
</key>
|
||||
<key name="flags" flags="org.gtk.test.TestFlags">
|
||||
<default>['mourning', 'laughing']</default>
|
||||
</key>
|
||||
<key name="range" type='u'>
|
||||
<default>33</default>
|
||||
<range min="2" max="44"/>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.enums' path='/tests/enums/'>
|
||||
<key name='test' enum='org.gtk.test.TestEnum'>
|
||||
<default>'bar'</default>
|
||||
<aliases>
|
||||
<alias value='qux' target='quux'/>
|
||||
</aliases>
|
||||
</key>
|
||||
<key name='f-test' flags='org.gtk.test.TestFlags'>
|
||||
<default>[]</default>
|
||||
<aliases>
|
||||
<alias value='speaking' target='talking'/>
|
||||
</aliases>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.enums.direct' path='/tests/enums/'>
|
||||
<key name='f-test' type='as'>
|
||||
<default>[]</default>
|
||||
</key>
|
||||
<key name='test' type='s'>
|
||||
<default>'bar'</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.range' path='/tests/range/'>
|
||||
<key name='val' type='i'>
|
||||
<default>33</default>
|
||||
<range min='2' max='44'/>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.range.direct' path='/tests/range/'>
|
||||
<key name='val' type='i'>
|
||||
<default>33</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.mapped' path='/tests/mapped/'>
|
||||
<key name='val' type='i'>
|
||||
<default>0</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.descriptions" path="/a/">
|
||||
<key name='a' type='i'>
|
||||
<summary>
|
||||
a paragraph.
|
||||
|
||||
with some whitespace.
|
||||
|
||||
because not everyone has a great editor.
|
||||
|
||||
|
||||
|
||||
|
||||
lots of space is as one.
|
||||
</summary>
|
||||
<default>0</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.extends.base'>
|
||||
<key name='int32' type='i'>
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name='string' type='s'>
|
||||
<default>''</default>
|
||||
</key>
|
||||
</schema>
|
||||
<schema id='org.gtk.test.extends.extended' extends='org.gtk.test.extends.base'>
|
||||
<override name="int32">42</override>
|
||||
<key name='another-int32' type='i'>
|
||||
<default>0</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.per-desktop" path="/tests/per-desktop/">
|
||||
<key name="desktop" type="s">
|
||||
<default>"GNOME"</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
</schemalist>
|
||||
@@ -1,299 +0,0 @@
|
||||
project('libevdev', 'c',
|
||||
version: '1.13.2', # change autotools version too
|
||||
license: 'MIT/Expat',
|
||||
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
|
||||
meson_version: '>= 0.56.0')
|
||||
|
||||
libevdev_version = meson.project_version().split('.')
|
||||
|
||||
dir_root = meson.project_source_root()
|
||||
dir_src = dir_root / 'libevdev'
|
||||
dir_src_test = dir_root / 'test'
|
||||
|
||||
# Include directories
|
||||
includes_include = include_directories('include')
|
||||
|
||||
# DO NOT MODIFY THIS
|
||||
# Use symbol versioning instead.
|
||||
libevdev_lt_c=5
|
||||
libevdev_lt_r=0
|
||||
libevdev_lt_a=3
|
||||
|
||||
# convert to soname
|
||||
libevdev_so_version = '@0@.@1@.@2@'.format((libevdev_lt_c - libevdev_lt_a),
|
||||
libevdev_lt_a, libevdev_lt_r)
|
||||
|
||||
|
||||
# Compiler setup
|
||||
cc = meson.get_compiler('c')
|
||||
cppflags = ['-Wno-unused-parameter', '-fvisibility=hidden']
|
||||
cflags = cppflags + ['-Wmissing-prototypes', '-Wstrict-prototypes']
|
||||
add_project_arguments(cflags, language: 'c')
|
||||
add_project_arguments(cppflags, language: 'cpp')
|
||||
|
||||
# config.h
|
||||
config_h = configuration_data()
|
||||
config_h.set('_GNU_SOURCE', '1')
|
||||
|
||||
# Dependencies
|
||||
pkgconfig = import('pkgconfig')
|
||||
dep_lm = cc.find_library('m')
|
||||
dep_rt = cc.find_library('rt')
|
||||
|
||||
input_h = dir_root / 'include' / 'linux' / host_machine.system() / 'input.h'
|
||||
input_event_codes_h = dir_root / 'include' / 'linux' / host_machine.system() / 'input-event-codes.h'
|
||||
|
||||
# event-names.h
|
||||
make_event_names = find_program('libevdev/make-event-names.py')
|
||||
event_names_h = configure_file(input: 'libevdev/libevdev.h',
|
||||
output: 'event-names.h',
|
||||
command: [make_event_names, input_h, input_event_codes_h],
|
||||
capture: true)
|
||||
|
||||
|
||||
# libevdev.so
|
||||
install_headers('libevdev/libevdev.h',
|
||||
'libevdev/libevdev-uinput.h',
|
||||
subdir: 'libevdev-1.0/libevdev')
|
||||
src_libevdev = [event_names_h] + files(
|
||||
'libevdev/libevdev.h',
|
||||
'libevdev/libevdev-int.h',
|
||||
'libevdev/libevdev-util.h',
|
||||
'libevdev/libevdev-uinput.c',
|
||||
'libevdev/libevdev-uinput.h',
|
||||
'libevdev/libevdev-uinput-int.h',
|
||||
'libevdev/libevdev.c',
|
||||
'libevdev/libevdev-names.c',
|
||||
'include/linux/input.h',
|
||||
'include/linux/uinput.h',
|
||||
)
|
||||
|
||||
mapfile = dir_src / 'libevdev.sym'
|
||||
version_flag = '-Wl,--version-script,@0@'.format(mapfile)
|
||||
lib_libevdev = library('evdev',
|
||||
src_libevdev,
|
||||
include_directories: [includes_include],
|
||||
dependencies: [dep_rt],
|
||||
version: libevdev_so_version,
|
||||
link_args: version_flag,
|
||||
link_depends: mapfile,
|
||||
install: true
|
||||
)
|
||||
|
||||
inc_libevdev = include_directories('.')
|
||||
dep_libevdev = declare_dependency(link_with: lib_libevdev,
|
||||
include_directories: [inc_libevdev])
|
||||
|
||||
pkgconfig.generate(
|
||||
filebase: 'libevdev',
|
||||
name: 'libevdev',
|
||||
description: 'Handler library for evdev events',
|
||||
version: meson.project_version(),
|
||||
libraries: lib_libevdev,
|
||||
subdirs: 'libevdev-1.0',
|
||||
)
|
||||
|
||||
man_config = configuration_data()
|
||||
man_config.set('PACKAGE_VERSION', meson.project_version())
|
||||
manpage = configure_file(input: 'doc/libevdev.man.in',
|
||||
output: 'libevdev.3',
|
||||
configuration: man_config)
|
||||
install_man(manpage)
|
||||
|
||||
|
||||
# tools
|
||||
if not get_option('tools').disabled()
|
||||
executable('libevdev-events',
|
||||
sources: ['tools/libevdev-events.c'],
|
||||
include_directories: [includes_include],
|
||||
dependencies: dep_libevdev,
|
||||
install: false)
|
||||
executable('libevdev-list-codes',
|
||||
sources: ['tools/libevdev-list-codes.c'],
|
||||
include_directories: [includes_include],
|
||||
dependencies: dep_libevdev,
|
||||
install: false)
|
||||
executable('touchpad-edge-detector',
|
||||
sources: ['tools/touchpad-edge-detector.c'],
|
||||
include_directories: [includes_include],
|
||||
dependencies: [dep_libevdev, dep_lm],
|
||||
install: true)
|
||||
executable('mouse-dpi-tool',
|
||||
sources: ['tools/mouse-dpi-tool.c'],
|
||||
include_directories: [includes_include],
|
||||
dependencies: dep_libevdev,
|
||||
install: true)
|
||||
executable('libevdev-tweak-device',
|
||||
sources: ['tools/libevdev-tweak-device.c'],
|
||||
include_directories: [includes_include],
|
||||
dependencies: dep_libevdev,
|
||||
install: true)
|
||||
install_man('tools/libevdev-tweak-device.1',
|
||||
'tools/touchpad-edge-detector.1',
|
||||
'tools/mouse-dpi-tool.1')
|
||||
endif
|
||||
|
||||
# tests
|
||||
dep_check = dependency('check', version: '>= 0.9.9',
|
||||
required: get_option('tests'))
|
||||
if dep_check.found()
|
||||
executable('test-link',
|
||||
sources: ['test/test-link.c'],
|
||||
include_directories: [includes_include],
|
||||
dependencies: dep_libevdev,
|
||||
install: false)
|
||||
executable('test-compile-pedantic',
|
||||
sources: ['test/test-compile-pedantic.c'],
|
||||
c_args: ['-pedantic', '-Werror', '-std=c89'],
|
||||
include_directories: [includes_include],
|
||||
dependencies: dep_libevdev,
|
||||
install: false)
|
||||
|
||||
src_common = [
|
||||
'test/test-common-uinput.c',
|
||||
'test/test-common-uinput.h',
|
||||
'test/test-common.c',
|
||||
'test/test-common.h',
|
||||
'test/test-main.c',
|
||||
]
|
||||
test_event_codes = executable('test-event-codes',
|
||||
sources: src_common + [
|
||||
'test/test-event-codes.c',
|
||||
'test/test-event-names.c',
|
||||
'test/test-context.c',
|
||||
],
|
||||
include_directories: [includes_include],
|
||||
dependencies: [dep_libevdev, dep_check],
|
||||
install: false)
|
||||
test('test-event-codes', test_event_codes, suite: ['library', 'needs-uinput'])
|
||||
|
||||
test_internals = executable('test-internals',
|
||||
sources: src_common + [
|
||||
'test/test-int-queue.c',
|
||||
],
|
||||
include_directories: [includes_include],
|
||||
dependencies: [dep_libevdev, dep_check],
|
||||
install: false)
|
||||
test('test-internals', test_internals, suite: ['library', 'needs-uinput'])
|
||||
|
||||
test_uinput = executable('test-uinput',
|
||||
sources: src_common + [
|
||||
'test/test-uinput.c',
|
||||
],
|
||||
include_directories: [includes_include],
|
||||
dependencies: [dep_libevdev, dep_check],
|
||||
install: false)
|
||||
test('test-uinput', test_uinput, suite: ['library', 'needs-uinput'])
|
||||
|
||||
test_libevdev = executable('test-libevdev',
|
||||
sources: src_common + [
|
||||
'test/test-libevdev-init.c',
|
||||
'test/test-libevdev-has-event.c',
|
||||
'test/test-libevdev-events.c',
|
||||
],
|
||||
include_directories: [includes_include],
|
||||
dependencies: [dep_libevdev, dep_check],
|
||||
install: false)
|
||||
test('test-libevdev', test_libevdev, suite: ['library', 'needs-uinput'], env: ['CK_DEFAULT_TIMEOUT=10'])
|
||||
|
||||
test_kernel = executable('test-kernel',
|
||||
sources: src_common + [
|
||||
'test/test-kernel.c',
|
||||
],
|
||||
include_directories: [includes_include],
|
||||
dependencies: [dep_libevdev, dep_check],
|
||||
install: false)
|
||||
test('test-kernel', test_kernel, suite: ['kernel', 'needs-uinput'])
|
||||
|
||||
|
||||
valgrind = find_program('valgrind', required: false)
|
||||
if valgrind.found()
|
||||
valgrind_env = environment()
|
||||
valgrind_env.set('CK_TIMEOUT_MULTIPLIER', '10')
|
||||
valgrind_env.set('CK_FORK', 'no')
|
||||
valgrind_env.set('RUNNING_ON_VALGRIND', '1')
|
||||
valgrind_suppressions_file = dir_src_test / 'valgrind.suppressions'
|
||||
add_test_setup('valgrind',
|
||||
exe_wrapper: [ valgrind,
|
||||
'--leak-check=full',
|
||||
'--gen-suppressions=all',
|
||||
'--error-exitcode=3',
|
||||
'--suppressions=' + valgrind_suppressions_file ],
|
||||
env: valgrind_env,
|
||||
timeout_multiplier: 100)
|
||||
else
|
||||
message('valgrind not found, disabling valgrind test suite')
|
||||
endif
|
||||
|
||||
test_static_link = find_program('test/test-static-symbols-leak.sh')
|
||||
test('static-symbols-leak', test_static_link,
|
||||
args: [meson.current_build_dir()],
|
||||
suite: 'static')
|
||||
endif
|
||||
|
||||
doxygen = find_program('doxygen', required: get_option('documentation'))
|
||||
if doxygen.found()
|
||||
src_doxygen = files(
|
||||
# source files
|
||||
dir_src / 'libevdev.h',
|
||||
dir_src / 'libevdev-uinput.h',
|
||||
# style files
|
||||
'doc/style/bootstrap.css',
|
||||
'doc/style/customdoxygen.css',
|
||||
'doc/style/doxy-boot.js',
|
||||
'doc/style/dynsections.js',
|
||||
'doc/style/footer.html',
|
||||
'doc/style/header.html',
|
||||
'doc/style/layout.xml',
|
||||
'doc/style/libevdevdoxygen.css',
|
||||
'doc/style/LICENSE',
|
||||
'doc/style/README.md',
|
||||
'doc/style/style.css',
|
||||
)
|
||||
doxyfiles = []
|
||||
foreach f: src_doxygen
|
||||
df = configure_file(input: f,
|
||||
output: '@PLAINNAME@',
|
||||
copy: true)
|
||||
doxyfiles += [df]
|
||||
endforeach
|
||||
|
||||
doc_config = configuration_data()
|
||||
doc_config.set('PACKAGE_NAME', meson.project_name())
|
||||
doc_config.set('PACKAGE_VERSION', meson.project_version())
|
||||
doc_config.set('builddir', meson.current_build_dir())
|
||||
doc_config.set('top_srcdir', dir_root)
|
||||
doc_config.set('srcdir', dir_root / 'doc')
|
||||
|
||||
doxyfile = configure_file(input: 'doc/libevdev.doxygen.in',
|
||||
output: 'libevdev.doxygen',
|
||||
configuration: doc_config)
|
||||
custom_target('doxygen',
|
||||
input: [doxyfiles, doxyfile] + src_doxygen,
|
||||
output: ['.'],
|
||||
command: [doxygen, doxyfile],
|
||||
install: false,
|
||||
build_by_default: true)
|
||||
endif
|
||||
|
||||
# Coverity breaks because it doesn't define _Float128 correctly, you'll end
|
||||
# up with a bunch of messages in the form:
|
||||
# "/usr/include/stdlib.h", line 133: error #20: identifier "_Float128" is
|
||||
# undefined
|
||||
# extern _Float128 strtof128 (const char *__restrict __nptr,
|
||||
# ^
|
||||
# We don't use float128 ourselves, it gets pulled in from math.h or
|
||||
# something, so let's just define it as uint128 and move on.
|
||||
# Unfortunately we can't detect the coverity build at meson configure
|
||||
# time, we only know it fails at runtime. So make this an option instead, to
|
||||
# be removed when coverity fixes this again.
|
||||
if get_option('coverity')
|
||||
config_h.set('_Float128', '__uint128_t')
|
||||
config_h.set('_Float32', 'int')
|
||||
config_h.set('_Float32x', 'int')
|
||||
config_h.set('_Float64', 'long')
|
||||
config_h.set('_Float64x', 'long')
|
||||
endif
|
||||
|
||||
############ output files ############
|
||||
configure_file(output: 'config.h', configuration: config_h)
|
||||
@@ -1 +0,0 @@
|
||||
../../../../local/patches/qtbase/futex-redox-support.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../../local/patches/qtbase/qtwayland-empty-cursor-guards.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../../local/patches/qtbase/qtwaylandscanner-null-guard-listeners.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../../local/patches/dbus/dbus-root-uid.patch
|
||||
@@ -1 +0,0 @@
|
||||
../../../../local/patches/libwayland/redox.patch
|
||||
@@ -1,2 +0,0 @@
|
||||
[org.gtk.test.per-desktop:GNOME-Classic]
|
||||
desktop = "GNOME Classic"
|
||||
@@ -1,225 +0,0 @@
|
||||
<schemalist>
|
||||
|
||||
<schema id="org.gtk.test" path="/tests/" gettext-domain="test">
|
||||
<key name="greeting" type="s">
|
||||
<default l10n="messages">"Hello, earthlings"</default>
|
||||
<summary>A greeting</summary>
|
||||
<description>
|
||||
Greeting of the invading martians
|
||||
</description>
|
||||
</key>
|
||||
<key name="farewell" type="s">
|
||||
<default l10n="messages">"So long"</default>
|
||||
</key>
|
||||
|
||||
<child name='basic-types' schema='org.gtk.test.basic-types'/>
|
||||
<child name='complex-types' schema='org.gtk.test.complex-types'/>
|
||||
<child name='localized' schema='org.gtk.test.localized'/>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.no-path">
|
||||
<key name="test-boolean" type="b">
|
||||
<default>true</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.basic-types" path="/tests/basic-types/">
|
||||
<key name="test-boolean" type="b">
|
||||
<default>true</default>
|
||||
</key>
|
||||
<key name="test-byte" type="y">
|
||||
<default>25</default>
|
||||
</key>
|
||||
<key name="test-int16" type="n">
|
||||
<default>-1234</default>
|
||||
</key>
|
||||
<key name="test-uint16" type="q">
|
||||
<default>1234</default>
|
||||
</key>
|
||||
<key name="test-int32" type="i">
|
||||
<default>-123456</default>
|
||||
</key>
|
||||
<key name="test-uint32" type="u">
|
||||
<default>123456</default>
|
||||
</key>
|
||||
<key name="test-int64" type="x">
|
||||
<default>-123456789</default>
|
||||
</key>
|
||||
<key name="test-uint64" type="t">
|
||||
<default>123456789</default>
|
||||
</key>
|
||||
<key name="test-double" type="d">
|
||||
<default>123.456</default>
|
||||
</key>
|
||||
<key name="test-string" type="s">
|
||||
<default>"a string, it seems"</default>
|
||||
</key>
|
||||
<key name="test-objectpath" type="o">
|
||||
<default>"/a/object/path"</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.complex-types" path="/tests/complex-types/">
|
||||
<key name="test-tuple" type="(s(ii))">
|
||||
<default>("one",(2,3))</default>
|
||||
</key>
|
||||
<key name="test-array" type="ai">
|
||||
<default>[0,1,2,3,4,5]</default>
|
||||
</key>
|
||||
<key name="test-dict" type="a{sau}">
|
||||
<default>
|
||||
{
|
||||
"AC": [0,0, 0,0,0,0,0,0],
|
||||
"IV": [0,0, 0,0,0,0,0,0]
|
||||
}
|
||||
</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.localized" path="/tests/localized/" gettext-domain="test">
|
||||
<key name="error-message" type="s">
|
||||
<default l10n="messages">"Unnamed"</default>
|
||||
</key>
|
||||
<key name="backspace" type="s">
|
||||
<default l10n="messages" context="keyboard label">"BackSpace"</default>
|
||||
</key>
|
||||
<key name="midnight" type="s">
|
||||
<default l10n="time">"12:00 AM"</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.binding" path="/tests/binding/">
|
||||
<key name="bool" type="b">
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key name="anti-bool" type="b">
|
||||
<default>false</default>
|
||||
</key>
|
||||
<key name="byte" type="y">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="int16" type="n">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="uint16" type="q">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="int" type="i">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="uint" type="u">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="int64" type="x">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="uint64" type="t">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="double" type="d">
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name="string" type="s">
|
||||
<default>""</default>
|
||||
</key>
|
||||
<key name="chararray" type="ay">
|
||||
<default>[48, 49]</default>
|
||||
</key>
|
||||
<key name="strv" type="as">
|
||||
<default>[]</default>
|
||||
</key>
|
||||
<key name="enum" enum="org.gtk.test.TestEnum">
|
||||
<default>'foo'</default>
|
||||
</key>
|
||||
<key name="flags" flags="org.gtk.test.TestFlags">
|
||||
<default>['mourning', 'laughing']</default>
|
||||
</key>
|
||||
<key name="range" type='u'>
|
||||
<default>33</default>
|
||||
<range min="2" max="44"/>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.enums' path='/tests/enums/'>
|
||||
<key name='test' enum='org.gtk.test.TestEnum'>
|
||||
<default>'bar'</default>
|
||||
<aliases>
|
||||
<alias value='qux' target='quux'/>
|
||||
</aliases>
|
||||
</key>
|
||||
<key name='f-test' flags='org.gtk.test.TestFlags'>
|
||||
<default>[]</default>
|
||||
<aliases>
|
||||
<alias value='speaking' target='talking'/>
|
||||
</aliases>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.enums.direct' path='/tests/enums/'>
|
||||
<key name='f-test' type='as'>
|
||||
<default>[]</default>
|
||||
</key>
|
||||
<key name='test' type='s'>
|
||||
<default>'bar'</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.range' path='/tests/range/'>
|
||||
<key name='val' type='i'>
|
||||
<default>33</default>
|
||||
<range min='2' max='44'/>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.range.direct' path='/tests/range/'>
|
||||
<key name='val' type='i'>
|
||||
<default>33</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.mapped' path='/tests/mapped/'>
|
||||
<key name='val' type='i'>
|
||||
<default>0</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.descriptions" path="/a/">
|
||||
<key name='a' type='i'>
|
||||
<summary>
|
||||
a paragraph.
|
||||
|
||||
with some whitespace.
|
||||
|
||||
because not everyone has a great editor.
|
||||
|
||||
|
||||
|
||||
|
||||
lots of space is as one.
|
||||
</summary>
|
||||
<default>0</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id='org.gtk.test.extends.base'>
|
||||
<key name='int32' type='i'>
|
||||
<default>0</default>
|
||||
</key>
|
||||
<key name='string' type='s'>
|
||||
<default>''</default>
|
||||
</key>
|
||||
</schema>
|
||||
<schema id='org.gtk.test.extends.extended' extends='org.gtk.test.extends.base'>
|
||||
<override name="int32">42</override>
|
||||
<key name='another-int32' type='i'>
|
||||
<default>0</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
<schema id="org.gtk.test.per-desktop" path="/tests/per-desktop/">
|
||||
<key name="desktop" type="s">
|
||||
<default>"GNOME"</default>
|
||||
</key>
|
||||
</schema>
|
||||
|
||||
</schemalist>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,124 +0,0 @@
|
||||
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
|
||||
Copyright (C) 2008-2024 Free Software Foundation, Inc.
|
||||
Written by Bruno Haible <bruno@clisp.org>, 2008.
|
||||
|
||||
This file 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 file 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>
|
||||
|
||||
/* Specification. */
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined _WIN32 && ! defined __CYGWIN__
|
||||
|
||||
# include <stdio.h>
|
||||
|
||||
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
|
||||
# include "msvc-inval.h"
|
||||
# endif
|
||||
|
||||
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
|
||||
static int
|
||||
_setmaxstdio_nothrow (int newmax)
|
||||
{
|
||||
int result;
|
||||
|
||||
TRY_MSVC_INVAL
|
||||
{
|
||||
result = _setmaxstdio (newmax);
|
||||
}
|
||||
CATCH_MSVC_INVAL
|
||||
{
|
||||
result = -1;
|
||||
}
|
||||
DONE_MSVC_INVAL;
|
||||
|
||||
return result;
|
||||
}
|
||||
# else
|
||||
# define _setmaxstdio_nothrow _setmaxstdio
|
||||
# endif
|
||||
|
||||
/* Cache for the previous getdtablesize () result. Safe to cache because
|
||||
Windows also lacks setrlimit. */
|
||||
static int dtablesize;
|
||||
|
||||
int
|
||||
getdtablesize (void)
|
||||
{
|
||||
if (dtablesize == 0)
|
||||
{
|
||||
/* We are looking for the number N such that the valid file descriptors
|
||||
are 0..N-1. It can be obtained through a loop as follows:
|
||||
{
|
||||
int fd;
|
||||
for (fd = 3; fd < 65536; fd++)
|
||||
if (dup2 (0, fd) == -1)
|
||||
break;
|
||||
return fd;
|
||||
}
|
||||
On Windows XP, the result is 2048.
|
||||
The drawback of this loop is that it allocates memory for a libc
|
||||
internal array that is never freed.
|
||||
|
||||
The number N can also be obtained as the upper bound for
|
||||
_getmaxstdio (). _getmaxstdio () returns the maximum number of open
|
||||
FILE objects. The sanity check in _setmaxstdio reveals the maximum
|
||||
number of file descriptors. This too allocates memory, but it is
|
||||
freed when we call _setmaxstdio with the original value. */
|
||||
int orig_max_stdio = _getmaxstdio ();
|
||||
unsigned int bound;
|
||||
for (bound = 0x10000; _setmaxstdio_nothrow (bound) < 0; bound = bound / 2)
|
||||
;
|
||||
_setmaxstdio_nothrow (orig_max_stdio);
|
||||
dtablesize = bound;
|
||||
}
|
||||
return dtablesize;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
# include <limits.h>
|
||||
# include <sys/resource.h>
|
||||
|
||||
# ifndef RLIM_SAVED_CUR
|
||||
# define RLIM_SAVED_CUR RLIM_INFINITY
|
||||
# endif
|
||||
# ifndef RLIM_SAVED_MAX
|
||||
# define RLIM_SAVED_MAX RLIM_INFINITY
|
||||
# endif
|
||||
|
||||
# ifdef __CYGWIN__
|
||||
/* Cygwin 1.7.25 auto-increases the RLIMIT_NOFILE soft limit until it
|
||||
hits the compile-time constant hard limit of 3200. We might as
|
||||
well just report the hard limit. */
|
||||
# define rlim_cur rlim_max
|
||||
# endif
|
||||
|
||||
int
|
||||
getdtablesize (void)
|
||||
{
|
||||
struct rlimit lim;
|
||||
|
||||
if (getrlimit (RLIMIT_NOFILE, &lim) == 0
|
||||
&& 0 <= lim.rlim_cur && lim.rlim_cur <= INT_MAX
|
||||
&& lim.rlim_cur != RLIM_INFINITY
|
||||
&& lim.rlim_cur != RLIM_SAVED_CUR
|
||||
&& lim.rlim_cur != RLIM_SAVED_MAX)
|
||||
return lim.rlim_cur;
|
||||
|
||||
return INT_MAX;
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user